diff --git a/AtlasTest/ControlTest/CMakeLists.txt b/AtlasTest/ControlTest/CMakeLists.txt
index 0e02c5462dfa9ece467af505cfea2bd9a5995973..3ed034263831c1fe580d47cece1eab811c90f6bc 100644
--- a/AtlasTest/ControlTest/CMakeLists.txt
+++ b/AtlasTest/ControlTest/CMakeLists.txt
@@ -1,26 +1,8 @@
-################################################################################
-# Package: ControlTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ControlTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   AtlasTest/TestTools
-   Control/AthenaExamples/AthExFortranAlgorithm
-   Control/AthenaExamples/AthExStoreGateExample
-   Control/AthenaPython
-   PRIVATE
-   Control/AthContainers
-   Control/AthLinks
-   Control/AthenaExamples/ToyConversion
-   Control/AthenaKernel
-   Control/SGTools
-   Control/StoreGate
-   GaudiKernel )
-
 # Helper variable(s):
 set( _jobOPath
    "${CMAKE_CURRENT_SOURCE_DIR}/share:${CMAKE_JOBOPT_OUTPUT_DIRECTORY}" )
diff --git a/AtlasTest/ControlTest/share/DataLink_test.ref b/AtlasTest/ControlTest/share/DataLink_test.ref
index 22c2f1bb3acf7a26a7c0fb0c51b7ec4005c78a4d..aebe2225790cbe25a451d8262ae44b959e3474f8 100644
Binary files a/AtlasTest/ControlTest/share/DataLink_test.ref and b/AtlasTest/ControlTest/share/DataLink_test.ref differ
diff --git a/AtlasTest/ControlTest/share/FortranAlgorithm.ref b/AtlasTest/ControlTest/share/FortranAlgorithm.ref
index aa8ed1629804537c840c6d159f317bcdab71acfb..159d8fe1964676ae32674cbd8b8187746a95302c 100644
--- a/AtlasTest/ControlTest/share/FortranAlgorithm.ref
+++ b/AtlasTest/ControlTest/share/FortranAlgorithm.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 FortranAlgorithm     INFO calling initialize_()
diff --git a/AtlasTest/ControlTest/share/HelloWorld.ref b/AtlasTest/ControlTest/share/HelloWorld.ref
index 351a208fa2f8e519ff7878f82d17b4204c9c1d62..e8eb8bbcce2c0ac1883b6ef7680b0af2be7ab54f 100644
--- a/AtlasTest/ControlTest/share/HelloWorld.ref
+++ b/AtlasTest/ControlTest/share/HelloWorld.ref
@@ -7,7 +7,7 @@ JobOptionsSvc        INFO
 //==============================================================
 
 //no EventSelector
-ApplicationMgr.DLLs   += { "AthenaServices" };
+ApplicationMgr.Dlls   += { "AthenaServices" };
 ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
 //--------------------------------------------------------------
 // StoreGate services configuration
@@ -15,7 +15,7 @@ ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
 // --> Including file StoreGate/StoreGate_jobOptions.txt
 
 
-ApplicationMgr.DLLs   += { "StoreGate", "CLIDSvc" };
+ApplicationMgr.Dlls   += { "StoreGate", "CLIDSvc" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore" };
 ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
@@ -30,7 +30,7 @@ ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
 // Load the Interval of Validity Service
 //
 //------------------------------------------------------------------------
-ApplicationMgr.DLLs += { "IOVSvc" };
+ApplicationMgr.Dlls += { "IOVSvc" };
 ApplicationMgr.ExtSvc += { "IOVSvc" };
 
 
@@ -50,7 +50,7 @@ ApplicationMgr.ExtSvc += { "EvtPersistencySvc/EventPersistencySvc",
 //--------------------------------------------------------------
 
 //load relevant libraries
-ApplicationMgr.DLLs += { "AthExHelloWorld" };
+ApplicationMgr.Dlls += { "AthExHelloWorld" };
 
 //top algorithms to be run
 ApplicationMgr.TopAlg = { "HelloWorld" };
diff --git a/AtlasTest/ControlTest/share/HistNtup.ref b/AtlasTest/ControlTest/share/HistNtup.ref
index 6616b32c4962650893f19f1fd938e0e23e5181e3..89e881fc33e3917ffb3c7d83e71b55959deb50b1 100644
--- a/AtlasTest/ControlTest/share/HistNtup.ref
+++ b/AtlasTest/ControlTest/share/HistNtup.ref
@@ -36,7 +36,7 @@ ApplicationMgr.ExtSvc += { "IncidentSvc/IncidentSvc",
 			   "ChronoStatSvc/ChronoStatSvc"
 			 };	
 
-ApplicationMgr.DLLs   += { "AthenaServices" };
+ApplicationMgr.Dlls   += { "AthenaServices" };
 ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
 ApplicationMgr.OutStreamType = "AthenaOutputStream";
 AthenaEventLoopMgr.OutStreamType = "AthenaOutputStream";
@@ -47,7 +47,7 @@ AthenaEventLoopMgr.OutStreamType = "AthenaOutputStream";
 // --> Including file StoreGate/StoreGate_jobOptions.txt
 
 
-ApplicationMgr.DLLs   += { "StoreGate", "CLIDSvc" };
+ApplicationMgr.Dlls   += { "StoreGate", "CLIDSvc" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore" };
 ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
@@ -62,7 +62,7 @@ ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
 // Load the Interval of Validity Service
 //
 //------------------------------------------------------------------------
-ApplicationMgr.DLLs += { "IOVSvc" };
+ApplicationMgr.Dlls += { "IOVSvc" };
 ApplicationMgr.ExtSvc += { "IOVSvc" };
 
 
@@ -84,7 +84,7 @@ ApplicationMgr.ExtSvc += { "IOVSvc" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "DetDescrCnvSvc" };
+ApplicationMgr.Dlls += { "DetDescrCnvSvc" };
 
 // Add in services
 //  (NOTE: the following does not yet work for the detector store)
@@ -111,7 +111,7 @@ DetDescrCnvSvc.IdDictName = "IdDictParser/ATLAS_IDS.xml";
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "IdDictDetDescrCnv" };
+ApplicationMgr.Dlls += { "IdDictDetDescrCnv" };
 
 
 // <-- End of including file IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.txt
@@ -136,7 +136,7 @@ ApplicationMgr.DLLs += { "IdDictDetDescrCnv" };
 // General Application Configuration options
 //--------------------------------------------------------------
 
-ApplicationMgr.DLLs   += { "ZebraTDRCnv" , "HbookCnv"};
+ApplicationMgr.Dlls   += { "ZebraTDRCnv" , "HbookCnv"};
 ApplicationMgr.ExtSvc += { "ZebraTDRCnvSvc", 
                           "ZebraTDREventSelector/EventSelector" };
 ApplicationMgr.EvtSel = "EventSelector";
@@ -171,7 +171,7 @@ JobOptionsSvc        INFO // <-- End of including file IdDictDetDescrCnv/IdDictD
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "InDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "InDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "InDetMgr" };
@@ -186,7 +186,7 @@ DetDescrCnvSvc.DetectorManagers += { "InDetMgr" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "LArDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "LArDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "LArMgr" };
@@ -199,7 +199,7 @@ DetDescrCnvSvc.DetectorManagers += { "LArMgr" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "CaloDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "CaloDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "CaloMgr" };
@@ -218,7 +218,7 @@ DetDescrCnvSvc.DetectorManagers += { "CaloMgr" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "MuonDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "MuonDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "MuonMgr" };
@@ -233,11 +233,11 @@ DetDescrCnvSvc.DecodeIdDict = true;
 // Private Application Configuration options
 //--------------------------------------------------------------
 //load relevant libraries
-ApplicationMgr.DLLs += { "AthExHistNtup" };      
+ApplicationMgr.Dlls += { "AthExHistNtup" };      
 
 // Select the appropriate shared library
-ApplicationMgr.DLLs += { "HbookCnv" };
-////ApplicationMgr.DLLs += { "RootHistCnv" };
+ApplicationMgr.Dlls += { "HbookCnv" };
+////ApplicationMgr.Dlls += { "RootHistCnv" };
 
 // Select HBOOK or ROOT persistency (HBOOK is default)
 ApplicationMgr.HistogramPersistency = "HBOOK";
diff --git a/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref b/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref
index bd6986a7717ea9410bc609bcd51dcc567a1a25ad..d878a6df7cc3c62a1c4257f0f03771bfc8e49769 100644
--- a/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref
+++ b/AtlasTest/ControlTest/share/ProxyProviderSvc_test.ref
@@ -1,43 +1,54 @@
 
 
-Initializing Gaudi ApplicationMgr using job opts ../share/ProxyProviderSvc_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/joboptions/ControlTest/StoreGateTestCommon.txt
+Initializing Gaudi ApplicationMgr using job opts /build/GMR/577.3/athena/AtlasTest/ControlTest/share/ProxyProviderSvc_test.txt
+JobOptionsSvc        INFO # =======> /build/GMR/577.3/build/build/Athena/x86_64-centos7-gcc8-opt/jobOptions/ControlTest/StoreGateTestCommon.txt
 JobOptionsSvc        INFO # (5,1): ApplicationMgr.ExtSvc += ["StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore", "StoreGateSvc/ConditionStore"]
 JobOptionsSvc        INFO # (6,1): AuditorSvc.Auditors += ["AlgContextAuditor"]
 JobOptionsSvc        INFO # (7,1): StoreGateSvc.OutputLevel = 1
 JobOptionsSvc        INFO # (8,1): StoreGateSvc.ActivateHistory = 0
 JobOptionsSvc        INFO # (9,1): CLIDSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (10,1): MessageSvc.useColors = 1
-JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/joboptions/ToyConversion/ToyConversionOpts.txt
+JobOptionsSvc        INFO # =======> /build/GMR/577.3/build/build/Athena/x86_64-centos7-gcc8-opt/jobOptions/ToyConversion/ToyConversionOpts.txt
 JobOptionsSvc        INFO # (5,1): EventPersistencySvc.CnvServices += ["ToyConversionSvc"]
-JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/ProxyProviderSvc_test.txt
+JobOptionsSvc        INFO # =======> /build/GMR/577.3/athena/AtlasTest/ControlTest/share/ProxyProviderSvc_test.txt
 JobOptionsSvc        INFO # (7,1): ProxyProviderSvc.OutputLevel = 1
 JobOptionsSvc        INFO # (9,1): ClassIDSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (10,1): MessageSvc.setVerbose = ["DataProxy", "EventPersistencySvc", "ToyConversionSvc", "StoreGateSvc", "EventDataSvc", "HistogramDataSvc", "ServiceManager", "HistogramPersistencySvc", "HistoryStore", "DetectorStore", "ApplicationMgr", "ProxyProviderSvc"]
 JobOptionsSvc        INFO # (11,1): MessageSvc.setDebug = ["ClassIDSvc"]
-JobOptionsSvc        INFO Job options successfully read in from ../share/ProxyProviderSvc_test.txt
+JobOptionsSvc        INFO Job options successfully read in from /build/GMR/577.3/athena/AtlasTest/ControlTest/share/ProxyProviderSvc_test.txt
 ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Tue Jul 17 15:42:25 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r2)
+                                          running on zeus on Tue Jul 28 09:01:40 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service DetectorStore
 DetectorStore       DEBUG Service base class initialized successfully
 DetectorStore     VERBOSE Initializing DetectorStore - package version StoreGate-00-00-00
 DetectorStore       DEBUG trying to create store SGImplSvc/DetectorStore_Impl
+DetectorStore_Impl  DEBUG Property update for OutputLevel : new value = 1
+DetectorStore_ImplVERBOSE Initializing DetectorStore_Impl - package version StoreGate-00-00-00
+DetectorStore_Impl  DEBUG Service base class initialized successfully
 EventPersistenc...  DEBUG  'CnvServices':[ 'ToyConversionSvc' ]
 EventPersistenc...  DEBUG Service base class initialized successfully
+DetectorStore_ImplVERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 ClassIDSvc          DEBUG Service base class initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 2468 CLIDRegistry entries for module ALL
-ClassIDSvc          DEBUG processCLIDDB: read 702 entries from CLIDDB file: /home/sss/atlas/dvtest/build/share/clid.db
+ClassIDSvc           INFO  getRegistryEntries: read 808 CLIDRegistry entries for module ALL
+ClassIDSvc          DEBUG processCLIDDB: read 1747 entries from CLIDDB file: /build/GMR/577.3/build/build/Athena/x86_64-centos7-gcc8-opt/share/clid.db
+DetectorStore_ImplVERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
 ProxyProviderSvc  VERBOSE Initializing ProxyProviderSvc - package version SGComps-00-00-00
 ProxyProviderSvc  VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
+ProxyProviderSvc    DEBUG Service base class initialized successfully
 ServiceManager      DEBUG Initializing service HistoryStore
 HistoryStore        DEBUG Service base class initialized successfully
 HistoryStore      VERBOSE Initializing HistoryStore - package version StoreGate-00-00-00
 HistoryStore        DEBUG trying to create store SGImplSvc/HistoryStore_Impl
+HistoryStore_Impl   DEBUG Property update for OutputLevel : new value = 1
+HistoryStore_Impl VERBOSE Initializing HistoryStore_Impl - package version StoreGate-00-00-00
+HistoryStore_Impl   DEBUG Service base class initialized successfully
+HistoryStore_Impl VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
+HistoryStore_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
 ServiceManager      DEBUG Initializing service ConditionStore
 ServiceManager      DEBUG Initializing service AppMgrRunable
 ServiceManager      DEBUG Initializing service EventLoopMgr
@@ -48,7 +59,7 @@ EventDataSvc      VERBOSE ServiceLocatorHelper::service: found service IncidentS
 HistogramDataSvc    DEBUG Service base class initialized successfully
 HistogramDataSvc  VERBOSE ServiceLocatorHelper::service: found service IncidentSvc
 HistogramPersis...  DEBUG Service base class initialized successfully
-HistogramPersis...WARNING Histograms saving not required.
+HistogramPersis...  DEBUG Histograms saving not required.
 HistogramDataSvc  VERBOSE ServiceLocatorHelper::service: found service HistogramPersistencySvc
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
@@ -60,15 +71,15 @@ StoreGateSvc_Impl VERBOSE Initializing StoreGateSvc_Impl - package version Store
 StoreGateSvc_Impl   DEBUG Service base class initialized successfully
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
-StoreGateSvc_Impl   DEBUG  Bound handle 0x7ffc9a030060 to proxy 0x955930
+ClassIDSvc           INFO  getRegistryEntries: read 1019 CLIDRegistry entries for module ALL
 ToyConversionSvc    DEBUG Service base class initialized successfully
 EventPersistenc...VERBOSE ServiceLocatorHelper::service: found service ToyConversionSvc
 EventPersistenc...   INFO Added successfully Conversion service:ToyConversionSvc
-ClassIDSvc           INFO  getRegistryEntries: read 374 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 1 proxy for ClassID 8107 (Bar): 
- flags: (  valid,   locked,  reset) --- data:   0x957570 --- key: aBar
+ flags: (  valid,   locked,  reset) --- data:  0x4bb7d50 --- key: aBar
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 StoreGateSvc        DEBUG Retrieved const pointer to object aFoo  of type Foo(CLID 8101)
@@ -77,18 +88,15 @@ Now we expect to see an error message:
 ToyConversionSvc     INFO No converter for object   CLID= 8109
 DataProxy         WARNING accessData: conversion failed for data object 8109/aFooBar
  Returning NULL DataObject pointer  
-SG::DataProxy_castWARNING this proxy 0x967500 has a NULL data object ptr
+SG::DataProxy_castWARNING this proxy 0x512fb80 has a NULL data object ptr
 <<---Error Message Ends-------
 *** ProxyProviderSvc_test OK ***
 *** ProxyProviderSvc_test RecordBeforeRead BEGINS ***
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  reset object aBar CLID 8107 address 0x957570
-DataProxy         VERBOSE requestRelease():  reset object aFoo CLID 8101 address 0x963fd0
-DataProxy         VERBOSE requestRelease():  reset object aFooBar CLID 8109 address 0
 StoreGateSvc_Impl WARNING record_impl: you are recording an object with key existingFoo, type Foo (CLID 8101)
  There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated.
-StoreGateSvc        DEBUG Recorded object @0x955c10 with key existingFoo of type Foo(CLID 8101)
- in DataObject @0x963fd0
+StoreGateSvc        DEBUG Recorded object @0x4e61ac0 with key existingFoo of type Foo(CLID 8101)
+ in DataObject @0x4f560f0
  object modifiable when retrieved
 StoreGateSvc        DEBUG Retrieved const pointer to object existingFoo  of type Foo(CLID 8101)
 6.28
@@ -103,15 +111,15 @@ Now we expect to see an error message:
 <<---Error Message Ends-------
 StoreGateSvc_Impl WARNING record_impl: you are recording an object with key privFoo, type Foo (CLID 8101)
  There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated.
-StoreGateSvc        DEBUG Recorded object @0x971af0 with key privFoo of type Foo(CLID 8101)
- in DataObject @0x96fe90
+StoreGateSvc        DEBUG Recorded object @0x4da0030 with key privFoo of type Foo(CLID 8101)
+ in DataObject @0x4ed9a00
  object modifiable when retrieved
-StoreGateSvc        DEBUG overwrite: Recorded object @0x971ab0 with key privFoo of type Foo(CLID 8101)
- in DataObject @0x967d80
+StoreGateSvc        DEBUG overwrite: Recorded object @0x4dbd370 with key privFoo of type Foo(CLID 8101)
+ in DataObject @0x4ff46e0
  object modifiable when retrieved
 StoreGateSvc        DEBUG Retrieved non-const pointer to object privFoo  of type Foo(CLID 8101)
-StoreGateSvc        DEBUG Recorded object @0x971ad0 with key silly33 of type Foo(CLID 8101)
- in DataObject @0x969e00
+StoreGateSvc        DEBUG Recorded object @0x1d4f000 with key silly33 of type Foo(CLID 8101)
+ in DataObject @0x509ef70
  object modifiable when retrieved
 StoreGateSvc        DEBUG Retrieved non-const pointer to object silly33  of type Foo(CLID 8101)
 Now we expect to see an error message:
@@ -130,18 +138,7 @@ Now we expect to see an error message:
 
 *** ProxyProviderSvc_test HLTAutoKeyReset BEGINS ***
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-DataProxy         VERBOSE requestRelease():  release  object aBar CLID 8107 address 0
-DataProxy         VERBOSE requestRelease():  release  object silly33 CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object privFoo CLID 8101 address 0x967d80
-DataProxy         VERBOSE requestRelease():  release  object diskFoo CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object existingFoo CLID 8101 address 0x963fd0
-DataProxy         VERBOSE requestRelease():  release  object aFooBar CLID 8109 address 0
-DataProxy         VERBOSE requestRelease():  release  object aFoo CLID 8101 address 0
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object HLTAutoKey_1 CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  reset object NOT_HLTAutoKey_3 CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object HLTAutoKey_2 CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object HLTAutoKey_3 CLID 8101 address 0
 *** ProxyProviderSvc_test HLTAutoKeyReset OK ***
 
 
@@ -149,31 +146,26 @@ DataProxy         VERBOSE requestRelease():  release  object HLTAutoKey_3 CLID 8
 
 
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-DataProxy         VERBOSE requestRelease():  release  object NOT_HLTAutoKey_3 CLID 8101 address 0
-DataProxy         VERBOSE requestRelease():  release  object HLTAutoKey_1 CLID 8101 address 0
 =============Event #0 starts
-StoreGateSvc        DEBUG overwrite: Recorded object @0x971ad0 with key toOverwrite of type FooBar(CLID 8109)
- in DataObject @0x965c10
+StoreGateSvc        DEBUG overwrite: Recorded object @0x4dfc8d0 with key toOverwrite of type FooBar(CLID 8109)
+ in DataObject @0x4f0e360
  object modifiable when retrieved
 Overwritten FooBar i=0
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x965c10
 FooBar i=0 deleted
 =============Event #1 starts
-StoreGateSvc        DEBUG overwrite: Recorded object @0x949920 with key toOverwrite of type FooBar(CLID 8109)
- in DataObject @0x965c10
+StoreGateSvc        DEBUG overwrite: Recorded object @0x4ea01f0 with key toOverwrite of type FooBar(CLID 8109)
+ in DataObject @0x4f0e360
  object modifiable when retrieved
 Overwritten FooBar i=1
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x965c10
 FooBar i=1 deleted
 =============Event #2 starts
-StoreGateSvc        DEBUG overwrite: Recorded object @0x96fd00 with key toOverwrite of type FooBar(CLID 8109)
- in DataObject @0x965c10
+StoreGateSvc        DEBUG overwrite: Recorded object @0x4ee38b0 with key toOverwrite of type FooBar(CLID 8109)
+ in DataObject @0x4f0e360
  object modifiable when retrieved
 Overwritten FooBar i=2
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-DataProxy         VERBOSE requestRelease():  release  object toOverwrite CLID 8109 address 0x965c10
 FooBar i=2 deleted
 *** ProxyProviderSvc_test Overwrite OK ***
 
diff --git a/AtlasTest/ControlTest/share/StoreGateDFlow.ref b/AtlasTest/ControlTest/share/StoreGateDFlow.ref
index 12d0575924c489e2148c3e40fe5cbc3ae287dd8f..f23c79a9db03441ddad2e5ebab6c3f6eaf258441 100644
--- a/AtlasTest/ControlTest/share/StoreGateDFlow.ref
+++ b/AtlasTest/ControlTest/share/StoreGateDFlow.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
diff --git a/AtlasTest/ControlTest/share/StoreGateGen.ref b/AtlasTest/ControlTest/share/StoreGateGen.ref
index 7a568f53481ca4056773b44d44e81ea03f76e465..5fe74ce69534b04920a43be4112f0e05c3ff27ee 100644
--- a/AtlasTest/ControlTest/share/StoreGateGen.ref
+++ b/AtlasTest/ControlTest/share/StoreGateGen.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 1095 CLIDRegistry entries for module ALL
diff --git a/AtlasTest/ControlTest/share/StoreGatePileUp.ref b/AtlasTest/ControlTest/share/StoreGatePileUp.ref
index c39372fa1705d5167ea0bf050ecabb8285a439c1..8f8dae5f060c9a52bed6fe8536ec96271d1435b3 100644
--- a/AtlasTest/ControlTest/share/StoreGatePileUp.ref
+++ b/AtlasTest/ControlTest/share/StoreGatePileUp.ref
@@ -36,7 +36,7 @@ ApplicationMgr.ExtSvc += { "IncidentSvc/IncidentSvc",
 			   "ChronoStatSvc/ChronoStatSvc"
 			 };	
 
-ApplicationMgr.DLLs   += { "AthenaServices" };
+ApplicationMgr.Dlls   += { "AthenaServices" };
 ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
 ApplicationMgr.OutStreamType = "AthenaOutputStream";
 AthenaEventLoopMgr.OutStreamType = "AthenaOutputStream";
@@ -47,7 +47,7 @@ AthenaEventLoopMgr.OutStreamType = "AthenaOutputStream";
 // --> Including file $STOREGATEROOT/share/StoreGate_jobOptions.txt
 
 
-ApplicationMgr.DLLs   += { "StoreGate", "CLIDSvc" };
+ApplicationMgr.Dlls   += { "StoreGate", "CLIDSvc" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore" };
 ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
@@ -70,7 +70,7 @@ ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "DetDescrCnvSvc" };
+ApplicationMgr.Dlls += { "DetDescrCnvSvc" };
 
 // Add in services
 //  (NOTE: the following does not yet work for the detector store)
@@ -97,7 +97,7 @@ DetDescrCnvSvc.IdDictName = "ATLAS_IDS.xml";
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "IdDictDetDescrCnv" };
+ApplicationMgr.Dlls += { "IdDictDetDescrCnv" };
 
 
 // <-- End of including file $IDDICTDETDESCRCNVROOT/share/IdDictDetDescrCnv_joboptions.txt
@@ -124,7 +124,7 @@ DetDescrCnvSvc.CompactIDsOnly = true;
 // General Application Configuration options
 //--------------------------------------------------------------
 
-ApplicationMgr.DLLs   += { "ZebraTDRCnv" , "HbookCnv"};
+ApplicationMgr.Dlls   += { "ZebraTDRCnv" , "HbookCnv"};
 ApplicationMgr.ExtSvc += { "ZebraTDRCnvSvc", 
                           "ZebraTDREventSelector/EventSelector" };
 //--------------------------------------------------------------
@@ -154,7 +154,7 @@ JobOptionsSvc        INFO
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "IdDictDetDescrCnv" };
+ApplicationMgr.Dlls += { "IdDictDetDescrCnv" };
 
 
 // <-- End of including file $IDDICTDETDESCRCNVROOT/share/IdDictDetDescrCnv_joboptions.txt
@@ -167,7 +167,7 @@ ApplicationMgr.DLLs += { "IdDictDetDescrCnv" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "InDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "InDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "InDetMgr" };
@@ -182,7 +182,7 @@ DetDescrCnvSvc.DetectorManagers += { "InDetMgr" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "LArDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "LArDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "LArMgr" };
@@ -198,7 +198,7 @@ DetDescrCnvSvc.DetectorManagers += { "LArMgr" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "TileDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "TileDetMgrDetDescrCnv" };
 
 // Add Tile to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "TileMgr" };
@@ -213,7 +213,7 @@ DetDescrCnvSvc.DetectorManagers += { "TileMgr" };
 //
 
 // DLLs 
-ApplicationMgr.DLLs += { "MuonDetMgrDetDescrCnv" };
+ApplicationMgr.Dlls += { "MuonDetMgrDetDescrCnv" };
 
 // Add InDet to list of DetectorManagers to be loaded at startup
 DetDescrCnvSvc.DetectorManagers += { "MuonMgr" };
@@ -228,7 +228,7 @@ DetDescrCnvSvc.DecodeIdDict = true;
 //--------------------------------------------------------------
 
 //load relevant libraries
-ApplicationMgr.DLLs += { "AthenaServices", "AthExStoreGateExample", "PileUpTools"};
+ApplicationMgr.Dlls += { "AthenaServices", "AthExStoreGateExample", "PileUpTools"};
 
 //load pileup merge svc
 ApplicationMgr.ExtSvc += { "PileUpMergeSvc" };
diff --git a/AtlasTest/ControlTest/share/StoreGateReentrant.ref b/AtlasTest/ControlTest/share/StoreGateReentrant.ref
index 5104751ec7a0088ff4ec7f87bc7bc690f409baa4..f105b785bed8f9074d02c7584a43cc4d5c7f75bb 100644
--- a/AtlasTest/ControlTest/share/StoreGateReentrant.ref
+++ b/AtlasTest/ControlTest/share/StoreGateReentrant.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 1095 CLIDRegistry entries for module ALL
diff --git a/AtlasTest/ControlTest/share/SubAlg.ref b/AtlasTest/ControlTest/share/SubAlg.ref
index 0ab96d13a12034fddca3759634dd2fc05893b263..6426e1d6e9f30e108fa533f3b3ee13c68459063b 100644
--- a/AtlasTest/ControlTest/share/SubAlg.ref
+++ b/AtlasTest/ControlTest/share/SubAlg.ref
@@ -6,7 +6,7 @@ JobOptionsSvc        INFO
 //
 //==============================================================
 //no EventSelector
-ApplicationMgr.DLLs   += { "AthenaServices" };
+ApplicationMgr.Dlls   += { "AthenaServices" };
 ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
 //--------------------------------------------------------------
 // StoreGate services configuration
@@ -14,7 +14,7 @@ ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
 // --> Including file StoreGate/StoreGate_jobOptions.txt
 
 
-ApplicationMgr.DLLs   += { "StoreGate", "CLIDSvc" };
+ApplicationMgr.Dlls   += { "StoreGate", "CLIDSvc" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore" };
 ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
@@ -29,7 +29,7 @@ ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
 // Load the Interval of Validity Service
 //
 //------------------------------------------------------------------------
-ApplicationMgr.DLLs += { "IOVSvc" };
+ApplicationMgr.Dlls += { "IOVSvc" };
 ApplicationMgr.ExtSvc += { "IOVSvc" };
 
 
@@ -46,7 +46,7 @@ ApplicationMgr.ExtSvc += { "EvtPersistencySvc/EventPersistencySvc",
 // Private Application Configuration options
 //--------------------------------------------------------------
 //load relevant libraries
-ApplicationMgr.DLLs += { "AthExSubAlg" };
+ApplicationMgr.Dlls += { "AthExSubAlg" };
 
 //top algorithms to be run
 ApplicationMgr.TopAlg = { "MainAlg" };
diff --git a/AtlasTest/ControlTest/share/test_handleTest.ref b/AtlasTest/ControlTest/share/test_handleTest.ref
index 6e53c9baa67898ba1c550ca1da027b4cd26fc943..de89d91f661edd20f011abd9e3619f018727b38f 100644
--- a/AtlasTest/ControlTest/share/test_handleTest.ref
+++ b/AtlasTest/ControlTest/share/test_handleTest.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
diff --git a/AtlasTest/ControlTest/share/test_interactive_athena.ref b/AtlasTest/ControlTest/share/test_interactive_athena.ref
index 161461ebda64a4a60369eba707a8961ac0a9fd6b..d7942e92b68245eaad7fd1a312d991186437d546 100644
--- a/AtlasTest/ControlTest/share/test_interactive_athena.ref
+++ b/AtlasTest/ControlTest/share/test_interactive_athena.ref
@@ -20,7 +20,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/AtlasTest/CppUnitExample/CMakeLists.txt b/AtlasTest/CppUnitExample/CMakeLists.txt
deleted file mode 100644
index bb0acf6dd5926d097f2de43b01e226669d01eeb7..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitExample/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Package: CppUnitExample
-################################################################################
-
-# Declare the package name:
-atlas_subdir( CppUnitExample )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          AtlasTest/TestTools )
-
-# Install files from the package:
-atlas_install_headers( CppUnitExample )
-
diff --git a/AtlasTest/CppUnitExample/CppUnitExample/ComplexNumber.h b/AtlasTest/CppUnitExample/CppUnitExample/ComplexNumber.h
deleted file mode 100755
index 4f649efc865ea5a0daac9380d24edd0c4c950d35..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitExample/CppUnitExample/ComplexNumber.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CPPUNITEXAMPLE_COMPLEXNUMBER_H
-#define CPPUNITEXAMPLE_COMPLEXNUMBER_H
-/// Example standalone class to test with CppUnit 
-/// borrowed from http://CppUnit.sourceforge.net/cppunit_cookbook.html
-
-class ComplexNumber { 
-  friend bool operator ==(const ComplexNumber& a, const ComplexNumber& b);
-  friend ComplexNumber operator +(const ComplexNumber& a, const ComplexNumber& b);
-  double real, imaginary;
- public:
-   ComplexNumber( double r, double i = 0 ) 
-     : real(r)
-         , imaginary(i) 
-   {
-   }
- };
-
- bool operator ==( const ComplexNumber &a, const ComplexNumber &b )
- { 
-   return a.real == b.real  &&  a.imaginary == b.imaginary; 
- }
- ComplexNumber operator +( const ComplexNumber &a, const ComplexNumber &b )
- { 
-   return ComplexNumber(a.real+b.real,a.imaginary+b.imaginary); 
- }
-#endif // CPPUNITEXAMPLE_COMPLEXNUMBER_H 
-
diff --git a/AtlasTest/CppUnitExample/test/ComplexNumberTest_CppUnit.cxx b/AtlasTest/CppUnitExample/test/ComplexNumberTest_CppUnit.cxx
deleted file mode 100755
index b74bd12452be4fcb88d922631a205a77c2858a42..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitExample/test/ComplexNumberTest_CppUnit.cxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include"CppUnitExample/ComplexNumber.h" 
-#include<cppunit/extensions/HelperMacros.h>
-#include<cppunit/Exception.h>
-#include<iostream>
-/** Class to test the "ComplexNumber.h" class 
-*
-*  Use the HelperMacros.h header file to establish in a easy 
-*  way the "ComplexNumberTest" test suite in which you can 
-*  place all the tests ("testEquality", "testAddition"... ) 
-*  concerning the tested class "ComplexNumber.h"
-*/
-class ComplexNumberTest : public CppUnit::TestFixture
-{
-/// Definition of the unit test suite "ComplexNumberTest"
- CPPUNIT_TEST_SUITE( ComplexNumberTest );
- CPPUNIT_TEST( testEquality );
- CPPUNIT_TEST( testAddition );
- CPPUNIT_TEST_SUITE_END();
- private:
-   ComplexNumber *m_10_1, *m_1_1, *m_11_2;
- public:
-   void setUp()
-   {
-     m_10_1 = new ComplexNumber(10,1);
-     m_1_1  = new ComplexNumber(1,1);
-     m_11_2 = new ComplexNumber(11,2);  
-   }
-   void tearDown()
-   {
-     delete m_10_1;
-     delete m_1_1;
-     delete m_11_2;
-   }
-/// the first test
-   void testEquality()
-   {
-     std::cout << " " << std::endl;
-     std::cout << "================================================================" << std::endl;
-     std::cout << "This is a simple CppUnit test of class ComplexNumber." << std::endl;
-     std::cout << "Other CppUnit tests can be included in ATLAS nightlies." << std::endl;   
-     std::cout << "Details in http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/" << std::endl;
-     std::cout << "OO/dist/nightlies/nicoswww/cppunit_testing.html" << std::endl;
-     std::cout << "================================================================" << std::endl;
-     CPPUNIT_ASSERT( (*m_10_1 == *m_10_1) );
-     CPPUNIT_ASSERT_MESSAGE( "This test fails intentionally", *m_10_1 == *m_1_1 );
-   }
-/// the second test
-   void testAddition()
-   {
-     CPPUNIT_ASSERT( *m_10_1 + *m_1_1 == *m_11_2 );
-   }
-};
-/// Registration of the test suite "ComplexNumberTest", so it 
-/// will be recognized by the main test program which drives the 
-/// different tests. 
-CPPUNIT_TEST_SUITE_REGISTRATION(ComplexNumberTest);
-/// CppUnit test-driver common for all the cppunit test classes.
-#include <TestTools/CppUnit_testdriver.cxx>
- 
diff --git a/AtlasTest/CppUnitSGServiceExample/CMakeLists.txt b/AtlasTest/CppUnitSGServiceExample/CMakeLists.txt
deleted file mode 100644
index 951da83d5ec9aeb8031f8df17389af2e6c701343..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitSGServiceExample/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Package: CppUnitSGServiceExample
-################################################################################
-
-# Declare the package name:
-atlas_subdir( CppUnitSGServiceExample )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          AtlasTest/TestTools
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          Control/StoreGate
-                          GaudiKernel )
-
-# Install files from the package:
-atlas_install_headers( CppUnitSGServiceExample )
-
diff --git a/AtlasTest/CppUnitSGServiceExample/CppUnitSGServiceExample/SimpleDataVector.h b/AtlasTest/CppUnitSGServiceExample/CppUnitSGServiceExample/SimpleDataVector.h
deleted file mode 100755
index 6f6734ced27053c457f677dec8266a91b50e93f0..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitSGServiceExample/CppUnitSGServiceExample/SimpleDataVector.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include <cassert>
-#include <iostream>
-#include <string>
-#include <vector>
-#include "AthContainers/DataVector.h"
-#include "StoreGate/StoreGateSvc.h"
-#include "AthenaKernel/getMessageSvc.h"
-#include "GaudiKernel/MsgStream.h"
-
-using namespace std;
-
-struct SimpleTestStruct {
-  int m_int;
-  float m_float;
-  string m_string;
-  virtual ~SimpleTestStruct()
-  {
-    //    cout << " ----> Destructor of SimpleTestStruct called for " << this << endl;
-  }
-  SimpleTestStruct() : m_int(1), m_float(2.), m_string("SimpleString") { }
-  SimpleTestStruct(int j) : m_int(j), m_float(2.), m_string("SimpleString") { }
-  SimpleTestStruct(const SimpleTestStruct& aaa) :
-  m_int(aaa.m_int), m_float(2.),
-  m_string("SimpleString") { }
-  void foo() { /* cout << "foo called" << m_int << endl; */}
-  void fooMessageSvc() {
-    MsgStream log( Athena::getMessageSvc(), "SimpleDataVector" );
-    log << MSG::INFO
-	<< "In SimpleDataVector Gaudi message service is called -" << endl 
-        << "and it prints the value of integer data member:" << m_int 
-        << endmsg;
-  }
-};
-
-class SimpleTestContainer : public DataVector<SimpleTestStruct>
-{
- public:
-  SimpleTestContainer() : DataVector<SimpleTestStruct>() { };
-  virtual ~SimpleTestContainer() {}
-};
-                                                                                
diff --git a/AtlasTest/CppUnitSGServiceExample/share/dummy_options.txt b/AtlasTest/CppUnitSGServiceExample/share/dummy_options.txt
deleted file mode 100644
index d39a83bdbe256b6d64db5434f873bd64770488ff..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitSGServiceExample/share/dummy_options.txt
+++ /dev/null
@@ -1 +0,0 @@
-#empty file
diff --git a/AtlasTest/CppUnitSGServiceExample/test/SimpleDataVectorTest_CppUnit.cxx b/AtlasTest/CppUnitSGServiceExample/test/SimpleDataVectorTest_CppUnit.cxx
deleted file mode 100755
index 3947743fe5616788494cf30fed0230c193f5e878..0000000000000000000000000000000000000000
--- a/AtlasTest/CppUnitSGServiceExample/test/SimpleDataVectorTest_CppUnit.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include"CppUnitSGServiceExample/SimpleDataVector.h" 
-#include<cppunit/extensions/HelperMacros.h>
-#include<cppunit/Exception.h>
-#include<iostream>
-/** Class to test the "SimpleDataVector.h" class 
-*   StoreGate service required
-*
-*  Use the HelperMacros.h header file to establish in a easy 
-*  way the "SimpleDataVectorTest" test suite in which you can 
-*  place all the tests concerning the tested class
-*/
-class SimpleDataVectorTest : public CppUnit::TestFixture
-{
-/// Definition of the unit test suite "SimpleDataVectorTest"
- CPPUNIT_TEST_SUITE( SimpleDataVectorTest );
- CPPUNIT_TEST( testSDV );
- CPPUNIT_TEST( testSDV_false_negative );
- CPPUNIT_TEST_SUITE_END();
- private:
-
- public:
-   void setUp()
-   {
-   }
-   void tearDown()
-   {
-   }
-/// the test
-   void testSDV()
-   {
-     std::cout << " " << std::endl;
-     std::cout << "================================================================" << std::endl;
-     std::cout << "This is a simple CppUnit test of class SimpleDataVector." << std::endl;
-     std::cout << "The CppUnit test driver with StoreGate service is used." << std::endl; 
-     std::cout << "CppUnit tests can be included in ATLAS nightlies." << std::endl;   
-     std::cout << "Details in http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/" << std::endl;
-     std::cout << "OO/dist/nightlies/nicoswww/cppunit_testing.html" << std::endl;
-     std::cout << "================================================================" << std::endl;
-                                                                             
-     typedef DataVector<int> IntVector;
-     IntVector intV;
-     CPPUNIT_ASSERT(intV.empty());
-     intV.reserve(10);
-     CPPUNIT_ASSERT(intV.capacity() == 10);
-     unsigned int i;
-     const unsigned int IFILL(3);
-     for (i=0; i<IFILL; ++i)  intV.push_back(new int(i));
-     CPPUNIT_ASSERT (IFILL == intV.size());
-     CPPUNIT_ASSERT(distance(intV.begin(), intV.end()) == (int)IFILL);
-     CPPUNIT_ASSERT(*(intV.front()) == 0);
-     CPPUNIT_ASSERT(2 == *(intV.back()));
-     intV.front() = new int(7);
-     CPPUNIT_ASSERT(7 == *(intV.front()));
-     *(intV.back()) = 3;
-
-     DataVector<SimpleTestStruct>* aa = new DataVector<SimpleTestStruct>();
-     aa->push_back(new SimpleTestStruct());
-     aa->push_back(new SimpleTestStruct(9));
-
-     CPPUNIT_ASSERT(2 == aa->size());
-
-     DataVector<SimpleTestStruct>::iterator iter = aa->begin();
-     int n = 0;
-     for (; iter != aa->end(); iter++) {
-       (*iter)->foo();
-       (*iter)->fooMessageSvc(); 
-       n++;
-     }
-     CPPUNIT_ASSERT(2 == n);
-
-     delete aa;
-   }
-void testSDV_false_negative()
-  {
-    DataVector<SimpleTestStruct>* aa = new DataVector<SimpleTestStruct>();
-    aa->push_back(new SimpleTestStruct(9));
-    CPPUNIT_ASSERT_MESSAGE( "This test fails intentionally", 2 == aa->size());
-    delete aa;
-  }
-};
-/// Registration of the test suite "SimpleDataVectorTest", so it 
-/// will be recognized by the main test program which drives the 
-/// different tests. 
-CPPUNIT_TEST_SUITE_REGISTRATION(SimpleDataVectorTest);
-/// CppUnit test-driver common for all the cppunit test classes.
-#include <TestTools/CppUnit_SGtestdriver.cxx>
diff --git a/AtlasTest/DatabaseTest/AthenaDBTestRec/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaDBTestRec/CMakeLists.txt
index 85cc80bc4082db746d6f50676ea59d6978ffece3..704ee3d8a815b269e4c187483fe4bf6820e506cd 100644
--- a/AtlasTest/DatabaseTest/AthenaDBTestRec/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaDBTestRec/CMakeLists.txt
@@ -1,66 +1,43 @@
-################################################################################
-# Package: AthenaDBTestRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaDBTestRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          PRIVATE
-                          Database/APR/CollectionBase
-                          Database/APR/CollectionUtilities
-                          Database/APR/PersistencySvc
-                          Database/APR/StorageSvc
-                          Database/APR/FileCatalog
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/CoraCool
-                          Database/PersistentDataModel
-                          Event/EventInfo )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( COOL COMPONENTS CoolKernel CoolApplication )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 include_directories(src)
 
 # Component(s) in the package:
 atlas_add_library( AthenaDBTestRecLib
                    src/lib/*.cxx
-                   PUBLIC_HEADERS AthenaDBTestRec
-                   PRIVATE_INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib
-                   PRIVATE_LINK_LIBRARIES ${COOL_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CollectionBase CollectionUtilities PersistencySvc StorageSvc CoraCool PersistentDataModel EventInfo )
+                   NO_PUBLIC_HEADERS
+                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel StoreGateLib
+                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} )
 
 atlas_add_component( AthenaDBTestRec
                      src/components/*.cxx
-                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${COOL_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GaudiKernel CollectionBase CollectionUtilities PersistencySvc StorageSvc AthenaPoolCnvSvcLib CoraCool PersistentDataModel EventInfo AthenaDBTestRecLib )
+                     LINK_LIBRARIES AthenaDBTestRecLib )
 
 atlas_add_poolcnv_library( AthenaDBTestRecPoolCnv
                            src/*.cxx
                            FILES AthenaDBTestRec/TestCoolRecPoolData.h AthenaDBTestRec/TestCoolRecPoolDataColl.h
                            MULT_CHAN_TYPES TestCoolRecPoolDataColl
-                           INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${COOL_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GaudiKernel CollectionBase CollectionUtilities PersistencySvc StorageSvc AthenaPoolCnvSvcLib CoraCool PersistentDataModel EventInfo AthenaDBTestRecLib )
+                           INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                           LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaDBTestRecLib AthenaPoolCnvSvcLib CoraCool PersistentDataModel )
 
 atlas_add_dictionary( AthenaDBTestRecDataDict
                       AthenaDBTestRec/AthenaDBTestRecDataDict.h
                       AthenaDBTestRec/selection.xml
-                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${COOL_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GaudiKernel CollectionBase CollectionUtilities PersistencySvc StorageSvc AthenaPoolCnvSvcLib CoraCool PersistentDataModel EventInfo AthenaDBTestRecLib )
+                      LINK_LIBRARIES AthenaDBTestRecLib )
 
 atlas_add_executable( TestCoolRecWriter
                       src/app/*.cxx
-                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${COOL_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GaudiKernel CollectionBase CollectionUtilities PersistencySvc StorageSvc AthenaPoolCnvSvcLib CoraCool PersistentDataModel EventInfo AthenaDBTestRecLib )
+                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                      LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaDBTestRecLib CoraCool FileCatalog PersistencySvc PersistentDataModel StorageSvc )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
index de5c3546a8e579ae286762390634d489f29ae480..a7fb457b335839975438997baec4ee4949dd90ba 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
@@ -1,28 +1,8 @@
-################################################################################
-# Package: AthenaPoolMultiTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaPoolMultiTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          AtlasTest/DatabaseTest/AthenaPoolTestData
-                          Control/AthenaBaseComps
-                          Control/SGTools
-                          Control/StoreGate
-                          DataQuality/GoodRunsLists
-                          Database/APR/CollectionBase
-                          Database/APR/CollectionUtilities
-                          Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/PersistentDataModel
-                          Database/AthenaPOOL/DBDataModel
-                          Event/ByteStreamCnvSvc
-                          Event/ByteStreamData
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 
@@ -31,12 +11,11 @@ atlas_add_component( AthenaPoolMultiTest
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaPoolTestData AthenaBaseComps SGTools StoreGateLib SGtests GoodRunsListsLib CollectionBase CollectionUtilities AthenaPoolExampleData AthenaPoolUtilities PersistentDataModel DBDataModel ByteStreamData ByteStreamData_test xAODEventInfo GaudiKernel )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaPoolExampleData AthenaPoolTestData AthenaPoolUtilities DBDataModel GaudiKernel GoodRunsListsLib PersistentDataModel SGTools StoreGateLib xAODEventInfo )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
 
-
 function (athenapoolmultitest_run_test testName jo postScript)
   cmake_parse_arguments( ARG "" "DEPENDS" "" ${ARGN} )
 
@@ -54,7 +33,6 @@ function (athenapoolmultitest_run_test testName jo postScript)
   endif()
 endfunction (athenapoolmultitest_run_test)
 
-
 athenapoolmultitest_run_test( AthenaPoolMultiTestBuildInput SplittableData_jo
                               post_check_bi )
 athenapoolmultitest_run_test( AthenaPoolMultiTestEventSplit EventSplit_jo
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt
index 12f3ebb13d59421501fb7f8be8afdaaf47542ad0..7b8b914ac8a36a3aaa1a4e8dfc575dc586c099e0 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt
@@ -1,44 +1,8 @@
-################################################################################
-# Package: AthenaPoolTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaPoolTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          AtlasTest/DatabaseTest/AthenaPoolTestData
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          DetectorDescription/GeoPrimitives
-                          DetectorDescription/Identifier
-                          Event/EventInfo
-                          Event/EventInfoMgt
-                          GaudiKernel
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-                          InnerDetector/InDetRawEvent/InDetRawData
-                          InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack
-                          InnerDetector/InDetRecEvent/InDetPrepRawData
-                          InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-                          LArCalorimeter/LArRecEvent
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkCompetingRIOsOnTrack
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkMaterialOnTrack
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkEvent/TrkVertexOnTrack )
-
-# External dependencies:
-find_package( Eigen )
-
 # Component(s) in the package:
 atlas_add_component( AthenaPoolTest
                      src/AthenaPoolTestDataReader.cxx
@@ -58,8 +22,7 @@ atlas_add_component( AthenaPoolTest
                      src/FakeTrackBuilder.cxx
                      src/RDOReaderDoubleSelector.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaPoolTestData CaloDetDescrLib CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GeoPrimitives Identifier EventInfo GaudiKernel InDetIdentifier InDetReadoutGeometry InDetRawData InDetCompetingRIOsOnTrack InDetPrepRawData InDetRIO_OnTrack LArRecEvent TrkSurfaces TrkCompetingRIOsOnTrack TrkEventPrimitives TrkMaterialOnTrack TrkParameters TrkTrack TrkVertexOnTrack EventInfoMgtLib )
+                     LINK_LIBRARIES AthenaPoolTestData CaloDetDescrLib CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GeoPrimitives Identifier EventInfo GaudiKernel InDetIdentifier InDetReadoutGeometry InDetRawData InDetCompetingRIOsOnTrack InDetPrepRawData InDetRIO_OnTrack LArRecEvent TrkSurfaces TrkCompetingRIOsOnTrack TrkEventPrimitives TrkMaterialOnTrack TrkParameters TrkTrack TrkVertexOnTrack EventInfoMgtLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py b/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py
index 9b619d1ae391a0178ae792cd6d353ff8b24e90a9..e30900b884e79ab38e5144a7e795613a640f692b 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/share/AthenaPoolTestWrite.py
@@ -23,9 +23,6 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 ## get a handle to the ApplicationManager
 from AthenaCommon.AppMgr import theApp
 
-# Set handler for traceback
-svcMgr.CoreDumpSvc.FatalHandler = 438
-
 #--------------------------------------------------------------
 # Load POOL support
 #--------------------------------------------------------------
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/share/AtlfastPoolWriteOptions.ref b/AtlasTest/DatabaseTest/AthenaPoolTest/share/AtlfastPoolWriteOptions.ref
index 6f6fd154b1fe0057b5a3cb5f8e71d96a25a16210..6e3be6c88bc7c6fdee6a469d7b8dc55ff6cb7b6e 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/share/AtlfastPoolWriteOptions.ref
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/share/AtlfastPoolWriteOptions.ref
@@ -467,7 +467,7 @@ ApplicationMgr       INFO Successfully loaded modules: AthenaPoolTest
 # load converter and append to event object ItemList
 # For example, LArAthenaPool should include
 #
-# ApplicationMgr.DLLs += { "LArAthenaPool" };
+# ApplicationMgr.Dlls += { "LArAthenaPool" };
 # Stream1.ItemList += { "2701#*", "2731#*" };
 theApp.Dlls += [ "PoolSvc", "AthenaPoolCnvSvc", "AthenaPoolCnvSvcPoolCnv" ]
 theApp.ExtSvc += [ "PoolSvc", "AthenaPoolCnvSvc" ]
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/CMakeLists.txt
index 388f80c985df70d583a367db20c27a34e7867a38..d1019322bdeaaf3f35b977c2a588685fb6777de8 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/CMakeLists.txt
@@ -1,35 +1,15 @@
-################################################################################
-# Package: AthenaPoolTestAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaPoolTestAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/DataModelAthenaPool
-                          PRIVATE
-                          AtlasTest/DatabaseTest/AthenaPoolTestData
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AtlasSealCLHEP )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( AthenaPoolTestAthenaPoolPoolCnv
                            src/*.cxx
                            FILES AthenaPoolTestData/IAthenaPoolTestCollection.h AthenaPoolTestData/AthenaPoolTestMatrix.h AthenaPoolTestData/AthenaPoolTestMap.h AthenaPoolTestData/FauxTriggerMap.h AthenaPoolTestData/dummy_A.h AthenaPoolTestData/dummy_E.h AthenaPoolTestData/TrigPath.h AthenaPoolTestData/TestGaudiProperty.h AthenaPoolTestData/PixelRDOElemLinkVec.h
-                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthenaPoolTestData AthenaPoolCnvSvcLib AthenaPoolUtilities AtlasSealCLHEP )
+                           LINK_LIBRARIES AthenaPoolCnvSvcLib AthenaPoolTestData DataModelAthenaPoolLib )
 
 atlas_add_dictionary( AthenaPoolTestAthenaPoolCnvDict
                       AthenaPoolTestAthenaPool/AthenaPoolTestAthenaPoolDict.h
                       AthenaPoolTestAthenaPool/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthenaPoolTestData AthenaPoolCnvSvcLib AthenaPoolUtilities AtlasSealCLHEP )
-
-# Install files from the package:
-atlas_install_headers( AthenaPoolTestAthenaPool )
-
+                      LINK_LIBRARIES DataModelAthenaPoolLib AthenaPoolTestData AthenaPoolCnvSvcLib AthenaPoolUtilities )
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTestData/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolTestData/CMakeLists.txt
index 777af4338919e0ebe68d3b1452dd3d2814e4c666..07aaa0a93b566222f803329bfd41fb6941c8c088 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTestData/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolTestData/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: AthenaPoolTestData
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaPoolTestData )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Control/AthLinks
-                          Control/AthContainers
-                          GaudiKernel
-                          InnerDetector/InDetRawEvent/InDetRawData )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
diff --git a/AtlasTest/DatabaseTest/CoraCoolTest/CMakeLists.txt b/AtlasTest/DatabaseTest/CoraCoolTest/CMakeLists.txt
index 19c22704b13eb7dbc8ae93f97eadfe8f907c5ec8..7c5e75b5882f0ea2bc884d001f76f26e64382767 100644
--- a/AtlasTest/DatabaseTest/CoraCoolTest/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/CoraCoolTest/CMakeLists.txt
@@ -1,24 +1,16 @@
-################################################################################
-# Package: CoraCoolTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CoraCoolTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/CoraCool )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_executable( CoraCoolExample
                       src/CoraCoolExample.cxx
-                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CoraCool )
-
+                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                      LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CoraCool )
 
 atlas_install_scripts( share/CoraCoolExample_SQLite.sh )
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/CMakeLists.txt b/AtlasTest/DatabaseTest/IOVDbTestAlg/CMakeLists.txt
index c15c4eadde705fbadda52655a33f319b336434ab..e5c891348769afe670c16789fb2e1987bec99325 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: IOVDbTestAlg
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IOVDbTestAlg )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          AtlasTest/DatabaseTest/IOVDbTestConditions
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/RegistrationServices
-                          Event/EventInfo )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 
@@ -26,7 +12,7 @@ atlas_add_component( IOVDbTestAlg
                      src/IOVDbTestCoolDCS.cxx
                      src/IOVDbTestAlg_entries.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} IOVDbTestConditions AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities EventInfo RegistrationServicesLib )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} IOVDbTestConditions AthenaBaseComps AthenaKernel StoreGateLib GaudiKernel AthenaPoolUtilities RegistrationServicesLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
@@ -46,7 +32,6 @@ function (iovdbtestalg_run_test testName jo)
   endif()
 endfunction (iovdbtestalg_run_test)
 
-
 # Write out some simple objects and register them in IOVDb - COOL version:
 iovdbtestalg_run_test( IOVDbTestWriteCool IOVDbTestAlgWriteCool )
 # Read back the object using IOVDb - COOL version:
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py
index 65ba6a330b63eeb88fc40d1fc64d132b3fc688dd..b2b80b07ef4ccf43b860f7410bb0834b7efc54a4 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py
+++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/share/IOVDbTestAlgReadCoolFromMetaData.py
@@ -28,9 +28,6 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 ## get a handle on the ToolSvc
 from AthenaCommon.AppMgr import ToolSvc
 
-# Set handler for traceback
-svcMgr.CoreDumpSvc.FatalHandler = 438
-
 #svcMgr.EventSelector.InputCollections = [ "SimplePoolFile1.root" ]
 svcMgr.EventSelector.InputCollections = [ "SimpleEventPoolFile.root" ]
 
diff --git a/AtlasTest/DatabaseTest/IOVDbTestAthenaPool/CMakeLists.txt b/AtlasTest/DatabaseTest/IOVDbTestAthenaPool/CMakeLists.txt
index a88fd759f00d41797f93307014a8cc5e30de0096..afb51a7008d2e5fcdf9f26f1a29a1d33e487e42b 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestAthenaPool/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/IOVDbTestAthenaPool/CMakeLists.txt
@@ -1,22 +1,11 @@
-################################################################################
-# Package: IOVDbTestAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IOVDbTestAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AtlasSealCLHEP
-                          PRIVATE
-                          AtlasTest/DatabaseTest/IOVDbTestConditions
-                          Database/AthenaPOOL/AthenaPoolCnvSvc )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( IOVDbTestAthenaPoolPoolCnv
                            src/*.cxx
                            FILES IOVDbTestConditions/IOVDbTestAmdbCorrection.h IOVDbTestConditions/IOVDbTestMDTEleMap.h IOVDbTestConditions/IOVDbTestMDTEleMapColl.h
                            MULT_CHAN_TYPES IOVDbTestMDTEleMapColl
-                           LINK_LIBRARIES AthenaPoolUtilities AtlasSealCLHEP IOVDbTestConditions AthenaPoolCnvSvcLib )
-
+                           LINK_LIBRARIES AthenaPoolUtilities IOVDbTestConditions AthenaPoolCnvSvcLib )
diff --git a/AtlasTest/DatabaseTest/IOVDbTestConditions/CMakeLists.txt b/AtlasTest/DatabaseTest/IOVDbTestConditions/CMakeLists.txt
index f27f17e594ae1cfae4a247b21446be9e086a6d81..05f06a18d6cda13b81166633cff41e69ae9b6ebe 100644
--- a/AtlasTest/DatabaseTest/IOVDbTestConditions/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/IOVDbTestConditions/CMakeLists.txt
@@ -1,18 +1,10 @@
-################################################################################
-# Package: IOVDbTestConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IOVDbTestConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( IOVDbTestConditions
@@ -20,14 +12,10 @@ atlas_add_library( IOVDbTestConditions
                    src/IOVDbTestMDTEleMap.cxx
                    PUBLIC_HEADERS IOVDbTestConditions
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel AthenaPoolUtilities
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel AthenaPoolUtilities )
 
 atlas_add_dictionary( IOVDbTestConditionsDict
                       IOVDbTestConditions/IOVDbTestConditionsDict.h
                       IOVDbTestConditions/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel AthenaPoolUtilities IOVDbTestConditions )
-
+                      LINK_LIBRARIES IOVDbTestConditions )
diff --git a/AtlasTest/GoogleTestTools/CMakeLists.txt b/AtlasTest/GoogleTestTools/CMakeLists.txt
index f67739b77ba00a7eb5a788ccdeec7239423e7526..33da7bfd397fde6d92346dfc30d5fd4858db02e1 100644
--- a/AtlasTest/GoogleTestTools/CMakeLists.txt
+++ b/AtlasTest/GoogleTestTools/CMakeLists.txt
@@ -1,18 +1,9 @@
-# $Id: CMakeLists.txt 744649 2016-05-03 19:33:39Z krasznaa $
-################################################################################
-# Package: GoogleTestTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GoogleTestTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-  PUBLIC
-  Control/AthenaCommon
-  PRIVATE
-  GaudiKernel )
-
+# External package dependencies:
 find_package( GMock )
 
 # In standalone mode we just use the headers from the package. While in
@@ -36,8 +27,3 @@ atlas_add_test( GoogleTestToolsTests
   SOURCES test/gt_GoogleTestTools.cxx
   INCLUDE_DIRS ${GMOCK_INCLUDE_DIRS} 
   LINK_LIBRARIES ${GMOCK_LIBRARIES} GaudiKernel GoogleTestTools )
-
-# Install files from the package:
-# atlas_install_python_modules( python/*.py )
-# atlas_install_joboptions( share/*.py )
-# atlas_install_scripts( share/runUnitTests.sh share/post.sh )
diff --git a/AtlasTest/PyAthenaTests/CMakeLists.txt b/AtlasTest/PyAthenaTests/CMakeLists.txt
index f03389e3b583488b9ce53fc3f88c3612f372910c..da55f3a34732d5ac3bedfe2cc4df8f6d0b64b960 100644
--- a/AtlasTest/PyAthenaTests/CMakeLists.txt
+++ b/AtlasTest/PyAthenaTests/CMakeLists.txt
@@ -1,18 +1,10 @@
-################################################################################
-# Package: PyAthenaTests
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PyAthenaTests )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaExamples/AthExThinning
-                          Control/AthenaPython )
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( test/*.ref )
 atlas_install_scripts( test/*.py )
-
diff --git a/AtlasTest/TestTools/CMakeLists.txt b/AtlasTest/TestTools/CMakeLists.txt
index aae7a855606f3a526ea3093908a06c04d82ecb3a..e65e1bfc7b3e53ce536b9897878653fa437e7334 100644
--- a/AtlasTest/TestTools/CMakeLists.txt
+++ b/AtlasTest/TestTools/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: TestTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TestTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   GaudiKernel )
-
 # In standalone mode we just use the headers from the package. While in
 # offline mode we build a proper library.
 if( XAOD_STANDALONE )
diff --git a/AtlasTest/TestTools/TestTools/CppUnit_SGtestdriver.cxx b/AtlasTest/TestTools/TestTools/CppUnit_SGtestdriver.cxx
index 18c5ab91a8304c71d1218e039040d6ccff717c8a..d20edf736771fdfb08502bc882455c7f0045bad9 100755
--- a/AtlasTest/TestTools/TestTools/CppUnit_SGtestdriver.cxx
+++ b/AtlasTest/TestTools/TestTools/CppUnit_SGtestdriver.cxx
@@ -82,8 +82,8 @@ bool setupStoreGate()
   {    // Build a default list of options.
     std::list<std::string> opts;
     opts.push_back("#pragma print off");
-    opts.push_back("ApplicationMgr.DLLs += { \"StoreGate\" };");
-    //opts.push_back("ApplicationMgr.DLLs += { \"CLIDSvc\" };");
+    opts.push_back("ApplicationMgr.Dlls += { \"StoreGate\" };");
+    //opts.push_back("ApplicationMgr.Dlls += { \"CLIDSvc\" };");
     opts.push_back("ApplicationMgr.ExtSvc += { \"ClassIDSvc\" };");
     opts.push_back("ApplicationMgr.ExtSvc += { \"StoreGateSvc\", \"StoreGateSvc/DetectorStore\", \"StoreGateSvc/HistoryStore\" };");
     opts.push_back("ApplicationMgr.ExtSvc += { \"ActiveStoreSvc\" };");
diff --git a/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.ref b/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.ref
index 0b02550e6802d890c378379a4057de7019482732..56d318502d7b70455840da51995001db18b2d5e0 100644
--- a/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.ref
+++ b/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloCompactCellTool_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build-dvtest/../tests/../share/CaloCompactCellTool_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps", "CaloTriggerTool"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps", "CaloTriggerTool"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloCompactCellTool_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.txt b/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.txt
index 0dc9dec0ecec08f4dd40a8450ee42ed712681d19..b69004e2db2b87c42f4fbed1a352214452b8f3f3 100644
--- a/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.txt
+++ b/Calorimeter/CaloCnv/CaloTPCnv/share/CaloCompactCellTool_test.txt
@@ -1,2 +1,2 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps", "CaloTriggerTool" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps", "CaloTriggerTool" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
diff --git a/Calorimeter/CaloEvent/share/CaloCellContainer_test.ref b/Calorimeter/CaloEvent/share/CaloCellContainer_test.ref
index 422a971a768c85a1e76b678c333ff7082b247fa8..f495b64b896bc6ce19b987827bb32630fd9d6075 100644
--- a/Calorimeter/CaloEvent/share/CaloCellContainer_test.ref
+++ b/Calorimeter/CaloEvent/share/CaloCellContainer_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloCellContainer_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/CaloCellContainer_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloCellContainer_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloEvent/share/CaloCellContainer_test.txt b/Calorimeter/CaloEvent/share/CaloCellContainer_test.txt
index dae64b09f4f22ed7c79f1886401d5f466bab00f8..7a62d9fe77da0cf0d0cbc0da69a7694363ba0940 100644
--- a/Calorimeter/CaloEvent/share/CaloCellContainer_test.txt
+++ b/Calorimeter/CaloEvent/share/CaloCellContainer_test.txt
@@ -1,2 +1,2 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
diff --git a/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.ref b/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.ref
index 5b95656245d2e17116c53e6f0bc3f90a622561ec..3967cb2cf5853856054fb1302fef0f8031d84e77 100644
--- a/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.ref
+++ b/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloCellContainer_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3e/Calorimeter/CaloEvent/run/../share/CaloCellContainer_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloCellContainer_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.txt b/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.txt
index dae64b09f4f22ed7c79f1886401d5f466bab00f8..7a62d9fe77da0cf0d0cbc0da69a7694363ba0940 100644
--- a/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.txt
+++ b/Calorimeter/CaloEvent/share/CaloCellPrefetchIterator_test.txt
@@ -1,2 +1,2 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
diff --git a/Calorimeter/CaloEvent/share/CaloConstCellContainer_test.ref b/Calorimeter/CaloEvent/share/CaloConstCellContainer_test.ref
index c748ac64b66be3f48987617167792945903d18b7..2752368b4d0a453fe9b76e685539cd29159e7d24 100644
--- a/Calorimeter/CaloEvent/share/CaloConstCellContainer_test.ref
+++ b/Calorimeter/CaloEvent/share/CaloConstCellContainer_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloCellContainer_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/CaloCellContainer_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloCellContainer_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.ref b/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.ref
index 4318ac7ac6bf26a4f5a4a44d0dee3871fc1ffcc8..e623fd4982fedb2387f5ec529d1339bb7a96c103 100644
--- a/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.ref
+++ b/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloTopoTowerContainer_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Calorimeter/CaloEvent/run/../share/CaloTopoTowerContainer_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloTopoTowerContainer_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.txt b/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.txt
index 7b6025a7cbdc4c4a933d9f56208cc72db38a7ca1..584034897969d1428e564ba6038b678203d11ab7 100644
--- a/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.txt
+++ b/Calorimeter/CaloEvent/share/CaloTopoTowerContainer_test.txt
@@ -1,3 +1,3 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
 #include "IOVSvc/IOVSvc.txt"
diff --git a/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py b/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
index cc06f3cb0f776be43ea46e8559a8f6e0efcc47a8..f0e1d87ec017aa9d2d75883a8c1ed3f6378cb587 100644
--- a/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
+++ b/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
@@ -27,6 +27,9 @@ def LArCellMonConfigOld(inputFlags):
         from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault
         LuminosityCondAlgDefault()
 
+    from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
+    CaloNoiseCondAlg()
+
     LArCellMonConfigCore(helper, LArCellMonAlg,inputFlags,isCosmics, isMC)
 
     from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool
diff --git a/Calorimeter/CaloRec/python/CaloRecoConfig.py b/Calorimeter/CaloRec/python/CaloRecoConfig.py
index 2776fb87aa85d554baf9b5feee117665ceef20c6..36365c7e2a51dd05b33bddee5c5818a6e9099f13 100644
--- a/Calorimeter/CaloRec/python/CaloRecoConfig.py
+++ b/Calorimeter/CaloRec/python/CaloRecoConfig.py
@@ -13,7 +13,7 @@ def CaloRecoCfg(configFlags):
 
 
         from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
-        result.merge( ByteStreamReadCfg(configFlags,typeNames=['TileDigitsContainer/TileDigitsCnt','TileRawChannelContainer/TileRawChannelCnt']))
+        result.merge( ByteStreamReadCfg(configFlags,type_names=['TileDigitsContainer/TileDigitsCnt','TileRawChannelContainer/TileRawChannelCnt']))
 
 
         from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
diff --git a/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref b/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
index 307513df7dc226b19b6cda1ba098917074797dda..2880871f0ece09cab24d86b6865443af704842b7 100644
--- a/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
+++ b/Calorimeter/CaloRec/share/ToolConstantsCondAlg_test.ref
@@ -8,7 +8,6 @@ ApplicationMgr    SUCCESS
                                           running on 1fe14f8366e2 on Tue Jul 21 15:04:16 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-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) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 23453 CLIDRegistry entries for module ALL
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h
index dbf88a61f706a099e1e04bf1193fdde048783d86..7f3e89cbf8689ef3700e4d9b098617b03b4b99f5 100644
--- a/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h
+++ b/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h
@@ -29,7 +29,6 @@
 #include "GaudiKernel/EventContext.h"
 
 class CaloCell_ID;
-class CaloDetDescrManager;
 class ICalorimeterNoiseTool;
 class CaloCluster;
 
@@ -94,7 +93,6 @@ class CaloLCWeightTool : public AthAlgTool, virtual public IClusterCellWeightToo
 
 
   const CaloCell_ID* m_calo_id;
-  const CaloDetDescrManager* m_calo_dd_man; 
   
   SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","electronicNoise","SG Key of CaloNoise data object"};
 };
diff --git a/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.ref b/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.ref
index 6c8e3fcd74fa006a1fa3b58c1e0c2dba1a84bffe..aef00a56498f04b15b444c54bf4b25ea15acf9cb 100644
--- a/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.ref
+++ b/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloLayerCalculator_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/CaloLayerCalculator_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloLayerCalculator_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.txt b/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.txt
index 7b6025a7cbdc4c4a933d9f56208cc72db38a7ca1..584034897969d1428e564ba6038b678203d11ab7 100644
--- a/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.txt
+++ b/Calorimeter/CaloUtils/share/CaloLayerCalculator_test.txt
@@ -1,3 +1,3 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
 #include "IOVSvc/IOVSvc.txt"
diff --git a/Calorimeter/CaloUtils/share/CaloVertexedCell_test.ref b/Calorimeter/CaloUtils/share/CaloVertexedCell_test.ref
index 962f35a63e69c960464c7a4a72b0a6039e8a1447..ca494e1a6ded84f817433932662791d7de49e601 100644
--- a/Calorimeter/CaloUtils/share/CaloVertexedCell_test.ref
+++ b/Calorimeter/CaloUtils/share/CaloVertexedCell_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloLayerCalculator_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/CaloLayerCalculator_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloLayerCalculator_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloUtils/share/CaloVertexedCluster_test.ref b/Calorimeter/CaloUtils/share/CaloVertexedCluster_test.ref
index ed1674e8a53b6323848e7c3f422301bb9a86d31f..ebcb6f2680ad4657026373c8e7cac51664013bdf 100644
--- a/Calorimeter/CaloUtils/share/CaloVertexedCluster_test.ref
+++ b/Calorimeter/CaloUtils/share/CaloVertexedCluster_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/CaloLayerCalculator_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/CaloLayerCalculator_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/CaloLayerCalculator_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref b/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref
index effb93abb5340053f06f8af040660b34511f2f96..7e2e703b76ab4bf85884fb9a5da9af9ebba2b0c1 100644
--- a/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref
+++ b/Calorimeter/CaloUtils/share/ToolWithConstants_test.ref
@@ -8,7 +8,6 @@ ApplicationMgr    SUCCESS
                                           running on 1fe14f8366e2 on Tue Jul 21 15:04:26 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-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) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx
index ecdc57592ecac85a5f762866752ae5698e15bdf4..44c3707d59652d6027807d86b1e5cf836af485d0 100644
--- a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx
+++ b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx
@@ -26,7 +26,6 @@
 #include "CaloEvent/CaloPrefetch.h"
 #include "xAODCaloEvent/CaloCluster.h"
 
-#include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "xAODCaloEvent/CaloClusterKineHelper.h"
 
@@ -38,8 +37,7 @@ CaloLCWeightTool::CaloLCWeightTool(const std::string& type,
     m_signalOverNoiseCut(2),
     m_useHadProbability(false),
     m_interpolate(false),
-    m_calo_id(nullptr),
-    m_calo_dd_man(nullptr)
+    m_calo_id(nullptr)
 {
 
   declareInterface<IClusterCellWeightTool>(this);
@@ -80,10 +78,8 @@ StatusCode CaloLCWeightTool::initialize()
 
   ATH_CHECK( m_key.initialize() );
 
-  // pointer to detector manager:
-  ATH_CHECK( detStore()->retrieve (m_calo_dd_man, "CaloMgr") );
-  m_calo_id   = m_calo_dd_man->getCaloCell_ID();
-   
+  ATH_CHECK( detStore()->retrieve( m_calo_id, "CaloCell_ID") );
+
   m_sampnames.reserve(CaloSampling::Unknown);
   for (int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) {
      m_sampnames.push_back(CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp));
diff --git a/Commission/CommissionUtils/share/AnaCosmic.py b/Commission/CommissionUtils/share/AnaCosmic.py
index 642cc9f1fcceda10c7e5649c87987a24764e5daa..1170445faf288103a347894ec648a4aca274a0e1 100644
--- a/Commission/CommissionUtils/share/AnaCosmic.py
+++ b/Commission/CommissionUtils/share/AnaCosmic.py
@@ -24,13 +24,13 @@ include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" )
 
 
 
-theApp.DLLs +=["LArAthenaPoolPoolCnv"] 
-theApp.DLLs +=["TileEventAthenaPoolPoolCnv"] 
-theApp.DLLs +=["GeneratorObjectsAthenaPoolPoolCnv"] 
-theApp.DLLs +=["TruthExamples"] 
+theApp.Dlls +=["LArAthenaPoolPoolCnv"] 
+theApp.Dlls +=["TileEventAthenaPoolPoolCnv"] 
+theApp.Dlls +=["GeneratorObjectsAthenaPoolPoolCnv"] 
+theApp.Dlls +=["TruthExamples"] 
 
 # add user Dlls and TopAlg.
-# theApp.DLLs +=["XYZ"] 
+# theApp.Dlls +=["XYZ"] 
 # theApp.TopAlg = ["UVW"] 
 
 # CBNT 
diff --git a/Commission/CommissionUtils/share/CBNT_TTR_jobOptions.py b/Commission/CommissionUtils/share/CBNT_TTR_jobOptions.py
index b6a8b826d03692ec346177c0ba1083e3529e3318..8eabd64c330c962ef14ea4795e808b864a3fa6cb 100644
--- a/Commission/CommissionUtils/share/CBNT_TTR_jobOptions.py
+++ b/Commission/CommissionUtils/share/CBNT_TTR_jobOptions.py
@@ -1,4 +1,4 @@
-theApp.DLLs += ["CommissionUtils"] 
+theApp.Dlls += ["CommissionUtils"] 
 
 # jamie boyd - 1/6/2012 removing all references to CBNT but not testing!
 #CBNT_Athena.Members += [ "CBNT_TTR" ]
diff --git a/Commission/CommissionUtils/share/DigitCosmic.py b/Commission/CommissionUtils/share/DigitCosmic.py
index 86e5cbebeacdc5708bfbe94853a9b82f5850343f..b91dd1cc715fa0a5b16c70cc6c900a9ef40f0087 100644
--- a/Commission/CommissionUtils/share/DigitCosmic.py
+++ b/Commission/CommissionUtils/share/DigitCosmic.py
@@ -30,9 +30,9 @@ if not 'outputfile' in dir() :
 EventSelector.InputCollections=[inputfile]
 Stream1.OutputFile = outputfile 
 
-theApp.DLLs += ["GeneratorObjectsAthenaPoolPoolCnv"] 
-theApp.DLLs += ["G4SimAthenaPOOLPoolCnv"] 
-theApp.DLLs += ["CommissionAthenaPoolPoolCnv"] 
+theApp.Dlls += ["GeneratorObjectsAthenaPoolPoolCnv"] 
+theApp.Dlls += ["G4SimAthenaPOOLPoolCnv"] 
+theApp.Dlls += ["CommissionAthenaPoolPoolCnv"] 
 include ("CommissionEvent/CommissionEventDict_joboptions.py")
 
 digitmaker1.SkipNoHit=True
@@ -45,7 +45,7 @@ TileHitVecToCnt.UseTriggerTime  = True;
 TileHitVecToCnt.TriggerTimeToolName  = "CosmicTriggerTimeTool" 
 
 # insert ComTimeRec at the beginning of the TopAlgs.
-theApp.DLLs += ["CommissionRec"] 
+theApp.Dlls += ["CommissionRec"] 
 topAlgs = theApp.TopAlg ; 
 
 theApp.TopAlg = ["ComTimeRec"] 
@@ -70,7 +70,7 @@ theApp.EvtMax = 2000
 IOVDbSvc.ManageConnections = TRUE
 
 MessageSvc.infoLimit = 1000000 
-theApp.DLLs += ["CommissionUtils"]
+theApp.Dlls += ["CommissionUtils"]
 PileUpMergeSvc = Service("PileUpMergeSvc") 
 PileUpMergeSvc.TriggerTimeTool = "CosmicTriggerTimeTool" 
 
diff --git a/Commission/CommissionUtils/share/RecoCosmic.py b/Commission/CommissionUtils/share/RecoCosmic.py
index 1ecc8c3e400521996c30706af63a1f225acc1031..7f24f6f9e25ee9739191cf0ed536520f0150bfb3 100644
--- a/Commission/CommissionUtils/share/RecoCosmic.py
+++ b/Commission/CommissionUtils/share/RecoCosmic.py
@@ -56,13 +56,13 @@ slimmer.ClusterContainerNames = ["EMTopoCluster","CaloTopoCluster"]
 slimmer.CellContainerName = "ClusterOnly" 
 
 
-theApp.DLLs +=["LArAthenaPoolPoolCnv"] 
-theApp.DLLs +=["TileEventAthenaPoolPoolCnv"] 
-theApp.DLLs +=["GeneratorObjectsAthenaPoolPoolCnv"] 
-theApp.DLLs +=["G4SimAthenaPOOLPoolCnv"] 
-theApp.DLLs +=["RecAthenaPoolPoolCnv"] 
-theApp.DLLs +=["TruthExamples"] 
-theApp.DLLs +=["LArRawUtils", "LArROD"] 
+theApp.Dlls +=["LArAthenaPoolPoolCnv"] 
+theApp.Dlls +=["TileEventAthenaPoolPoolCnv"] 
+theApp.Dlls +=["GeneratorObjectsAthenaPoolPoolCnv"] 
+theApp.Dlls +=["G4SimAthenaPOOLPoolCnv"] 
+theApp.Dlls +=["RecAthenaPoolPoolCnv"] 
+theApp.Dlls +=["TruthExamples"] 
+theApp.Dlls +=["LArRawUtils", "LArROD"] 
 
 #theApp.TopAlg += ["DumpMC"] 
 #DumpMC = Algorithm("DumpMC") 
diff --git a/Control/AthAllocators/CMakeLists.txt b/Control/AthAllocators/CMakeLists.txt
index 59c14870c6fbd83ef6b4d57b1f40ede1b752c9f8..175553176c3deec7667daef4e270b2cd890c5d21 100644
--- a/Control/AthAllocators/CMakeLists.txt
+++ b/Control/AthAllocators/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: AthAllocators
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthAllocators )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   PRIVATE
-   Control/CxxUtils
-   AtlasTest/TestTools )
-
 # External dependencies:
 find_package( Boost COMPONENTS thread )
 
diff --git a/Control/AthAllocators/share/DataPool_test.txt b/Control/AthAllocators/share/DataPool_test.txt
index a47946e04274cd48cc518a8b3809d41befe29384..5fbb5f9dcff9f1c0934bfc088c9d687dad0ff59a 100644
--- a/Control/AthAllocators/share/DataPool_test.txt
+++ b/Control/AthAllocators/share/DataPool_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: DataPool_test.txt,v 1.1 2003-04-02 19:35:10 calaf Exp $
 
-//ApplicationMgr.DLLs += { "StoreGate" };
+//ApplicationMgr.Dlls += { "StoreGate" };
 MessageSvc.OutputLevel = 2;
 
 ApplicationMgr.ExtSvc += {"IncidentSvc", "ChronoStatSvc", "AuditorSvc"};
diff --git a/Control/AthAnalysisBaseComps/CMakeLists.txt b/Control/AthAnalysisBaseComps/CMakeLists.txt
index 4b171ae550f0fd62d8b4c2fb7c7e378c357a4345..c13ebc8ff61880e49fd774eb2bf22fc1d3033bbb 100644
--- a/Control/AthAnalysisBaseComps/CMakeLists.txt
+++ b/Control/AthAnalysisBaseComps/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: AthAnalysisBaseComps
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthAnalysisBaseComps )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          Control/AthContainers
-                          Database/IOVDbDataModel
-                          GaudiKernel )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -26,15 +16,12 @@ atlas_add_library( AthAnalysisBaseCompsLib
 
 atlas_add_component( AthAnalysisBaseComps
                      src/components/*.cxx
-                     PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES AthenaBaseComps IOVDbDataModel GaudiKernel StoreGateLib SGtests AthContainers AthAnalysisBaseCompsLib
-                     PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES})
+                     LINK_LIBRARIES AthAnalysisBaseCompsLib )
 
 atlas_add_dictionary( AthAnalysisBaseCompsDict
                       AthAnalysisBaseComps/AthAnalysisBaseCompsDict.h
                       AthAnalysisBaseComps/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps StoreGateLib SGtests IOVDbDataModel GaudiKernel AthContainers AthAnalysisBaseCompsLib )
+                      LINK_LIBRARIES AthAnalysisBaseCompsLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Control/AthContainersInterfaces/CMakeLists.txt b/Control/AthContainersInterfaces/CMakeLists.txt
index 06cdc743d6aa166d0c45f15f165c83b9935adf1b..c743ac5c62a66c88d0f81f5acf035cbefef75860 100644
--- a/Control/AthContainersInterfaces/CMakeLists.txt
+++ b/Control/AthContainersInterfaces/CMakeLists.txt
@@ -1,33 +1,19 @@
-# $Id: CMakeLists.txt 781615 2016-11-01 16:20:50Z ssnyder $
-################################################################################
-# Package: AthContainersInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthContainersInterfaces )
 
 # Extra dependencies, based on the build environment:
 if( NOT XAOD_STANDALONE )
-   set( extra_deps Control/AthenaKernel )
    set( extra_libs AthenaKernel )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/CxxUtils
-   ${extra_deps} )
-
-# External dependencies:
-find_package( Boost )
-
 # Interface library for the package:
 atlas_add_library( AthContainersInterfaces
    AthContainersInterfaces/*.h AthContainersInterfaces/*.icc
    INTERFACE
    PUBLIC_HEADERS AthContainersInterfaces
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES CxxUtils ${Boost_LIBRARIES} ${extra_libs} )
+   LINK_LIBRARIES CxxUtils ${extra_libs} )
 
 # Test(s) in the package:
 atlas_add_test( AuxStore_traits_test
diff --git a/Control/AthContainersRoot/CMakeLists.txt b/Control/AthContainersRoot/CMakeLists.txt
index 7e80cbc8b6638d5ee7f932b312fac654632c1b80..4458818f04969a507fd3ddb9e5e6367ef6d63e98 100644
--- a/Control/AthContainersRoot/CMakeLists.txt
+++ b/Control/AthContainersRoot/CMakeLists.txt
@@ -1,30 +1,18 @@
-################################################################################
-# Package: AthContainersRoot
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthContainersRoot )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Control/AthContainersInterfaces
-                          Control/RootUtils
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/CxxUtils )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core )
+find_package( ROOT COMPONENTS Core Tree )
 
 # Component(s) in the package:
 atlas_add_library( AthContainersRoot
                    src/*.cxx
                    PUBLIC_HEADERS AthContainersRoot
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks RootUtils )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks CxxUtils RootUtils
+                   LINK_LIBRARIES AthenaKernel GaudiKernel AthContainersInterfaces )
 
 
 atlas_add_dictionary( AthContainersRootTestDict
diff --git a/Control/AthLinks/CMakeLists.txt b/Control/AthLinks/CMakeLists.txt
index 007227125646a80fc9b4097a49c642873cb281aa..3dded6a50af61a92773dd18203888003732d4c14 100644
--- a/Control/AthLinks/CMakeLists.txt
+++ b/Control/AthLinks/CMakeLists.txt
@@ -1,22 +1,11 @@
-################################################################################
-# Package: AthLinks
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthLinks )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          Control/SGTools
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
+find_package( ROOT COMPONENTS Core )
 
 # Component(s) in the package:
 atlas_add_library( AthLinks
@@ -25,106 +14,33 @@ atlas_add_library( AthLinks
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( AthLinksDict
                       AthLinks/AthLinksDict.h
                       AthLinks/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( exceptions_test
-                SOURCES
-                test/exceptions_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( DataProxyHolder_test
-                SOURCES
-                test/DataProxyHolder_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( IndexHolder_test
-                SOURCES
-                test/IndexHolder_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( IdentContIndex_test
-                SOURCES
-                test/IdentContIndex_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( ForwardIndexingPolicy_test
-                SOURCES
-                test/ForwardIndexingPolicy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( SetIndexingPolicy_test
-                SOURCES
-                test/SetIndexingPolicy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( MapIndexingPolicy_test
-                SOURCES
-                test/MapIndexingPolicy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( IdentContIndexingPolicy_test
-                SOURCES
-                test/IdentContIndexingPolicy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( IsSTLSequence_test
-                SOURCES
-                test/IsSTLSequence_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( DataLinkBase_test
-                SOURCES
-                test/DataLinkBase_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( DataLink_test
-                SOURCES
-                test/DataLink_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( ElementLinkBase_test
-                SOURCES
-                test/ElementLinkBase_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( GenericElementLinkBase_test
-                SOURCES
-                test/GenericElementLinkBase_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( ElementLink_test
-                SOURCES
-                test/ElementLink_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( ElementLinkFwd_test
-                SOURCES
-                test/ElementLinkFwd_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
-
-atlas_add_test( AssociationMap_test
-                SOURCES
-                test/AssociationMap_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils SGTools GaudiKernel TestTools AthLinks )
+                      LINK_LIBRARIES AthLinks )
+
+# Tests in the package:
+function( _add_test name )
+   atlas_add_test( ${name}
+                   SOURCES test/${name}.cxx
+                   LINK_LIBRARIES AthLinks TestTools )
+endfunction( _add_test )
+
+_add_test( exceptions_test )
+_add_test( DataProxyHolder_test )
+_add_test( IndexHolder_test )
+_add_test( IdentContIndex_test )
+_add_test( ForwardIndexingPolicy_test )
+_add_test( SetIndexingPolicy_test )
+_add_test( MapIndexingPolicy_test )
+_add_test( IdentContIndexingPolicy_test )
+_add_test( IsSTLSequence_test )
+_add_test( DataLinkBase_test )
+_add_test( DataLink_test )
+_add_test( ElementLinkBase_test )
+_add_test( GenericElementLinkBase_test )
+_add_test( ElementLink_test )
+_add_test( ElementLinkFwd_test )
+_add_test( AssociationMap_test )
diff --git a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.h b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.h
index 84b0614291b2590699ddbef39f1f4accc33a007d..ae9f7e1721087ce68480a5bff361ece79fcd3fe5 100644
--- a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.h
+++ b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.h
@@ -140,6 +140,11 @@ private:
    * Throws ExcNullReadHandle on failure.
    */
   const_pointer_type checkedCPtr();
+
+  /**
+   * @brief Helper: dereference the pointer.
+   */
+  const_pointer_type getCPtr() const;
 }; 
 
 
diff --git a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.icc b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.icc
index 25b2e07fdff4b8c09de50edf7be09876c9d48a8e..e3aba5c8546b47db65ae95f8932a8b7cca6180ea 100644
--- a/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.icc
+++ b/Control/AthToolSupport/AsgDataHandles/AsgDataHandles/ReadHandle.icc
@@ -109,10 +109,7 @@ inline
 typename ReadHandle<T>::const_pointer_type
 ReadHandle<T>::cptr()
 {
-  const T *result = nullptr;
-  if (!xAOD::TActiveEvent::event()->retrieve (result, key(), true))
-    throw std::runtime_error ("failed to retrieve " + key());
-  return result;
+  return getCPtr();
 }
 
 
@@ -161,7 +158,7 @@ inline
 typename ReadHandle<T>::const_pointer_type
 ReadHandle<T>::get() const
 {
-  return cptr();
+  return getCPtr();
 }
 
 
@@ -195,6 +192,21 @@ ReadHandle<T>::checkedCPtr()
 }
 
 
+/**
+ * @brief Helper: dereference the pointer.
+ * Throws ExcNullReadHandle on failure.
+ */
+template <class T>
+inline
+typename ReadHandle<T>::const_pointer_type
+ReadHandle<T>::getCPtr() const
+{
+  const T *result = nullptr;
+  (void) xAOD::TActiveEvent::event()->retrieve (result, key(), true);
+  return result;
+}
+
+
 /**
  * @brief Return a @c ReadHandle referencing @c key.
  * @param key The key object holding the clid/key/store.
diff --git a/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/AsgExampleToolsDict.h b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/AsgExampleToolsDict.h
index bb6ce3289bc663974fe4daef438312b20ed27548..f2bf45164df00a8021ea9318bf359feb322a9af5 100644
--- a/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/AsgExampleToolsDict.h
+++ b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/AsgExampleToolsDict.h
@@ -7,6 +7,7 @@
 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #endif
 
+#include "AsgExampleTools/DataHandleTestTool.h"
 #include "AsgExampleTools/UnitTestTool3.h"
 #include "AsgExampleTools/UnitTestTool2.h"
 #include "AsgExampleTools/UnitTestTool1A.h"
diff --git a/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/DataHandleTestTool.h b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/DataHandleTestTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf592fab88e8e1a3401199bb5eff994495b19ab4
--- /dev/null
+++ b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/DataHandleTestTool.h
@@ -0,0 +1,57 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Nils Krumnack
+
+
+
+#ifndef ASG_TOOLS__DATA_HANDLES_TEST_TOOL_H
+#define ASG_TOOLS__DATA_HANDLES_TEST_TOOL_H
+
+#include <AsgTools/AsgTool.h>
+#include <AsgExampleTools/IDataHandleTestTool.h>
+#include <AsgDataHandles/ReadHandleKey.h>
+
+// AthSimulation doesn't contain the muon-container, so we can't
+// really build the tool, but it is simpler to build an empty tool
+// than to exclude the tool completely from the AthSimulation build.
+#ifndef SIMULATIONBASE
+#include <xAODMuon/MuonContainer.h>
+#endif
+
+namespace asg
+{
+  /// \brief a tool used to unit test AnaToolHandle
+  ///
+  /// This allows to unit test the various capabilities of
+  /// stand-alone data handles in a controlled fashion.
+
+  struct DataHandleTestTool : virtual public IDataHandleTestTool,
+			 public AsgTool
+  {
+    ASG_TOOL_CLASS (DataHandleTestTool, IDataHandleTestTool)
+
+    /// \brief standard constructor
+  public:
+    DataHandleTestTool (const std::string& val_name);
+
+    /// \brief standard destructor
+  public:
+    ~DataHandleTestTool ();
+
+  public:
+    StatusCode initialize () override;
+
+  public:
+    void runTest () override;
+
+  public:
+#ifndef SIMULATIONBASE
+    SG::ReadHandleKey<xAOD::MuonContainer> m_readKey {this, "readKey", "Muons", "regular read key"};
+#endif
+    bool m_readFailure {false};
+  };
+}
+
+#endif
diff --git a/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/IDataHandleTestTool.h b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/IDataHandleTestTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a5e96a61c4c14502698cd6bd87a6ab154b34b96
--- /dev/null
+++ b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/IDataHandleTestTool.h
@@ -0,0 +1,29 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Nils Krumnack
+
+
+
+#ifndef ASG_TOOLS__I_DATA_HANDLE_TEST_TOOL_H
+#define ASG_TOOLS__I_DATA_HANDLE_TEST_TOOL_H
+
+#include <AsgTools/IAsgTool.h>
+
+namespace asg
+{
+  /// \brief the interface for \ref DataHandleTestTool
+
+  class IDataHandleTestTool : virtual public IAsgTool
+  {
+    // Declare the interface that this class provides
+    ASG_TOOL_INTERFACE( CP::IDataHandleTestTool )
+
+    /// \brief run the test
+  public:
+    virtual void runTest () = 0;
+  };
+}
+
+#endif
diff --git a/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/selection.xml b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/selection.xml
index 7417c49482ad13dca316240a48892a321e3220dd..47bba34f9ec1d46259596022ad1cd9f8765dbee4 100644
--- a/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/selection.xml
+++ b/Control/AthToolSupport/AsgExampleTools/AsgExampleTools/selection.xml
@@ -2,6 +2,7 @@
 <lcgdict>
 
    <!-- Unit test types: -->
+   <class name="asg::DataHandleTestTool" />
    <class name="asg::UnitTestTool3" />
    <class name="asg::UnitTestTool2" />
    <class name="asg::UnitTestTool1A" />
diff --git a/Control/AthToolSupport/AsgExampleTools/CMakeLists.txt b/Control/AthToolSupport/AsgExampleTools/CMakeLists.txt
index 0d07295c6071fee23c095f9b9c3c8cc19e1205f2..cb7fec41ad7ed5cf27731e6677be7f3381e3fe92 100644
--- a/Control/AthToolSupport/AsgExampleTools/CMakeLists.txt
+++ b/Control/AthToolSupport/AsgExampleTools/CMakeLists.txt
@@ -5,21 +5,21 @@
 # Declare the package name:
 atlas_subdir( AsgExampleTools )
 
-# Extra dependencies based on the build environment:
-set( extra_deps )
-if( XAOD_STANDALONE )
-   set( extra_deps Control/xAODRootAccess )
+if (SIMULATIONBASE)
+  set (extra_dep )
+  set (extra_lib )
 else()
-   set( extra_deps Control/AthenaBaseComps GaudiKernel )
+  set (extra_dep Event/xAOD/xAODMuon)
+  set (extra_lib xAODMuon)
 endif()
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs(
    PUBLIC
+   Control/AthToolSupport/AsgDataHandles
    Control/AthToolSupport/AsgTools
-   PRIVATE
    Control/AthToolSupport/AsgTesting
-   ${extra_deps} )
+   ${extra_dep})
 
 # External dependencies:
 find_package( GTest )
@@ -33,7 +33,7 @@ atlas_add_root_dictionary( AsgExampleToolsLib AsgExampleToolsCintDict
 atlas_add_library( AsgExampleToolsLib
    AsgExampleTools/*.h Root/*.cxx ${AsgExampleToolsCintDict}
    PUBLIC_HEADERS AsgExampleTools
-   LINK_LIBRARIES AsgTools AsgTestingLib )
+   LINK_LIBRARIES AsgTools AsgDataHandlesLib AsgTestingLib ${extra_lib} )
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( AsgExampleTools
@@ -101,6 +101,12 @@ if( XAOD_STANDALONE )
       LINK_LIBRARIES ${GTEST_LIBRARIES} AsgTools AsgExampleToolsLib AsgTestingLib )
    set_tests_properties (AsgExampleTools_gt_asgtools_toolhandle_test_ctest PROPERTIES LABELS "AsgTools;AsgExampleTools" )
 
+   atlas_add_test( gt_DataHandlesTest
+      SOURCES test/gt_DataHandlesTest.cxx
+      INCLUDE_DIRS ${GTEST_INCLUDE_DIRS}
+      LINK_LIBRARIES ${GTEST_LIBRARIES} AsgTools AsgExampleToolsLib AsgTestingLib )
+   set_tests_properties (AsgExampleTools_gt_DataHandlesTest_ctest PROPERTIES LABELS "AsgDataHandles;AsgExampleTools" )
+
 endif()
 
 
diff --git a/Control/AthToolSupport/AsgExampleTools/Root/DataHandleTestTool.cxx b/Control/AthToolSupport/AsgExampleTools/Root/DataHandleTestTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..18778a38bad3f6b6bcf1b16326b1a036d45d22a1
--- /dev/null
+++ b/Control/AthToolSupport/AsgExampleTools/Root/DataHandleTestTool.cxx
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Nils Krumnack
+
+
+
+//
+// includes
+//
+
+#include <AsgExampleTools/DataHandleTestTool.h>
+
+#include <AsgDataHandles/ReadHandle.h>
+#include <AsgTesting/UnitTest.h>
+#include <gtest/gtest.h>
+#include <map>
+
+//
+// method implementations
+//
+
+namespace asg
+{
+  DataHandleTestTool ::
+  DataHandleTestTool (const std::string& val_name)
+    : AsgTool (val_name)
+  {
+    declareProperty ("readFailure", m_readFailure, "whether to expect a read failure");
+  }
+
+
+
+  DataHandleTestTool ::
+  ~DataHandleTestTool ()
+  {
+  }
+
+
+
+  StatusCode DataHandleTestTool ::
+  initialize ()
+  {
+#ifndef SIMULATIONBASE
+    ANA_CHECK (m_readKey.initialize ());
+#endif
+    return StatusCode::SUCCESS;
+  }
+
+
+
+  void DataHandleTestTool ::
+  runTest ()
+  {
+#ifndef SIMULATIONBASE
+    const xAOD::MuonContainer *muonsStore {nullptr};
+    ASSERT_SUCCESS (evtStore()->retrieve (muonsStore, "Muons"));
+
+    auto readHandle = makeHandle (m_readKey);
+    if (m_readFailure == false)
+      EXPECT_EQ (muonsStore, readHandle.get());
+    else
+      EXPECT_EQ (nullptr, readHandle.get());
+#endif
+  }
+}
diff --git a/Control/AthToolSupport/AsgExampleTools/src/components/AsgExampleTools_entries.cxx b/Control/AthToolSupport/AsgExampleTools/src/components/AsgExampleTools_entries.cxx
index e5313cbc47f9697d66c0c8a206c044be8cd36fbd..978309b448d7cf2f40b4415ddf99ad137c9892e5 100644
--- a/Control/AthToolSupport/AsgExampleTools/src/components/AsgExampleTools_entries.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/src/components/AsgExampleTools_entries.cxx
@@ -3,6 +3,7 @@
 #include "../AsgExampleAlgorithm.h"
 #include "AsgExampleTools/AsgHelloTool.h"
 
+#include <AsgExampleTools/DataHandleTestTool.h>
 #include <AsgExampleTools/UnitTestTool1.h>
 #include <AsgExampleTools/UnitTestTool1A.h>
 #include <AsgExampleTools/UnitTestTool2.h>
@@ -12,6 +13,7 @@ DECLARE_COMPONENT( AsgHelloTool )
 
 DECLARE_COMPONENT( AsgExampleAlgorithm )
 
+DECLARE_COMPONENT( asg::DataHandleTestTool )
 DECLARE_COMPONENT( asg::UnitTestTool1 )
 DECLARE_COMPONENT( asg::UnitTestTool1A )
 DECLARE_COMPONENT( asg::UnitTestTool2 )
diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_DataHandlesTest.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_DataHandlesTest.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9b01506da3aa42edef4e7dafa2fc378d0e0f4259
--- /dev/null
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_DataHandlesTest.cxx
@@ -0,0 +1,94 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Nils Krumnack
+
+
+
+//
+// includes
+//
+
+#include <AsgTools/AsgToolConfig.h>
+#include <AsgMessaging/MessageCheck.h>
+#include <AsgTesting/UnitTest.h>
+#include <AsgExampleTools/IDataHandleTestTool.h>
+#include <xAODRootAccess/TEvent.h>
+#include <xAODRootAccess/TStore.h>
+#include <TFile.h>
+#include <cmath>
+#include <gtest/gtest.h>
+#include <sstream>
+
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+//
+// method implementations
+//
+
+using namespace asg::msgUserCode;
+
+namespace asg
+{
+  struct DataHandlesTest : public ::testing::Test
+  {
+    static void SetUpTestCase ()
+    {
+      const char *test_file = getenv ("ASG_TEST_FILE_MC");
+      ASSERT_NE (nullptr, test_file);
+      file.reset (TFile::Open (test_file, "READ"));
+      ASSERT_NE (nullptr, file);
+    }
+
+    static void TearDownTestCase ()
+    {
+      file.reset ();
+    }
+
+    virtual void SetUp () override
+    {
+      ASSERT_NE (nullptr, file);
+      ASSERT_SUCCESS (event.readFrom (file.get()));
+      ASSERT_TRUE (event.getEntry (0) >= 0);
+    }
+
+    /// \brief make a unique tool name to be used in unit tests
+    std::string makeUniqueName ()
+    {
+      static unsigned index = 0;
+      std::ostringstream str;
+      str << "unique" << ++ index;
+      return str.str();
+    }
+
+    static inline std::unique_ptr<TFile> file;
+    xAOD::TEvent event;
+    xAOD::TStore store;
+    AsgToolConfig config {"asg::DataHandleTestTool/" + makeUniqueName()};
+    std::shared_ptr<void> cleanup;
+    ToolHandle<IDataHandleTestTool> tool;
+  };
+
+
+
+  // just test that a basic read handle access works
+  TEST_F (DataHandlesTest, base_test)
+  {
+    ASSERT_SUCCESS (config.makeTool (tool, cleanup));
+    tool->runTest ();
+  }
+
+
+
+  // just test that reading unknown objects fails as it should
+  TEST_F (DataHandlesTest, read_failure)
+  {
+    config.setPropertyFromString ("readFailure", "1");
+    config.setPropertyFromString ("readKey", "MuonsFailure");
+    ASSERT_SUCCESS (config.makeTool (tool, cleanup));
+    tool->runTest ();
+  }
+}
+
+ATLAS_GOOGLE_TEST_MAIN
diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_TProperty.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_TProperty.cxx
index be4f23434df3413049023e7fb73106f2413871ff..2e1573307d84ab999b7804bf58ab2cf8c4c7e0d3 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_TProperty.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_TProperty.cxx
@@ -229,6 +229,13 @@ namespace asg
       ASSERT_EQ (0, value);
     }
 
+    TEST (SetStringHelperTest, set_bool)
+    {
+      bool value = true;
+      ASSERT_SUCCESS (SetStringHelper<bool>::set ("1", value));
+      ASSERT_EQ (true, value);
+    }
+
     TEST (SetStringHelperTest, set_enum)
     {
       MSG::Level value = MSG::Level::INFO;
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AsgComponentConfig.icc b/Control/AthToolSupport/AsgTools/AsgTools/AsgComponentConfig.icc
index baa59e6b5729690a2098b32d3ca6a389ad8b2346..e68faefcb3c11eb662df36437182935fbabadea8 100644
--- a/Control/AthToolSupport/AsgTools/AsgTools/AsgComponentConfig.icc
+++ b/Control/AthToolSupport/AsgTools/AsgTools/AsgComponentConfig.icc
@@ -13,6 +13,7 @@
 #include <AsgTools/MessageCheckAsgTools.h>
 
 #ifdef XAOD_STANDALONE
+#include <AsgTools/AsgComponent.h>
 #include <AsgTools/TProperty.h>
 #endif
 
diff --git a/Control/AthenaAuditors/CMakeLists.txt b/Control/AthenaAuditors/CMakeLists.txt
index bb03d5081093980b696554167933988d50a326d7..539333a39296b47dbbf5de9ef751e6b3c89a2a2e 100644
--- a/Control/AthenaAuditors/CMakeLists.txt
+++ b/Control/AthenaAuditors/CMakeLists.txt
@@ -1,30 +1,17 @@
-################################################################################
-# Package: AthenaAuditors
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaAuditors )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/CoWTools
-   Control/AthenaKernel
-   Control/CxxUtils
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
-find_package( ROOT COMPONENTS Core Tree )
 find_package( gdb )
 find_package( gperftools )
 find_package( libunwind )
-find_package( ZLIB )
 
 # Skip building the package if an external is not available.
-if( ( NOT Boost_FOUND ) OR ( NOT ROOT_FOUND ) OR ( NOT GDB_FOUND ) OR
-    ( NOT GPERFTOOLS_FOUND ) OR ( NOT LIBUNWIND_FOUND ) OR ( NOT ZLIB_FOUND ) )
+if( ( NOT Boost_FOUND ) OR ( NOT GDB_FOUND ) OR
+    ( NOT GPERFTOOLS_FOUND ) OR ( NOT LIBUNWIND_FOUND ) )
   message( WARNING "Not all externals available, not building AthenaAuditors." )
   return()
 endif()
@@ -32,8 +19,6 @@ endif()
 # Component(s) in the package:
 atlas_add_component( AthenaAuditors
    src/*.h src/*.cxx src/components/*.cxx
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${GDB_INCLUDE_DIRS}
-   ${LIBUNWIND_INCLUDE_DIRS} ${GPERFTOOLS_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${GDB_LIBRARIES}
-   ${LIBUNWIND_LIBRARIES} ${ZLIB_LIBRARIES} ${CMAKE_DL_LIBS}
-   AthenaBaseComps CoWTools GaudiKernel )
+   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${GDB_INCLUDE_DIRS} ${LIBUNWIND_INCLUDE_DIRS} ${GPERFTOOLS_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${GDB_LIBRARIES} ${LIBUNWIND_LIBRARIES} ${CMAKE_DL_LIBS}
+   AthenaBaseComps AthenaKernel CxxUtils GaudiKernel )
diff --git a/Control/AthenaCommon/python/AppMgr.py b/Control/AthenaCommon/python/AppMgr.py
index dd79b332b8ff577ebcdae5d324c71980547169f3..da5b9ac56618e92582a45619114f15062553e9ba 100755
--- a/Control/AthenaCommon/python/AppMgr.py
+++ b/Control/AthenaCommon/python/AppMgr.py
@@ -729,7 +729,7 @@ class AthAppMgr( AppMgr ):
       try:
          from AthenaCommon.Debugging import DbgStage
          if DbgStage.value == "exec":
-            from Debugging import hookDebugger
+            from .Debugging import hookDebugger
             hookDebugger()
       except ImportError:
          pass
diff --git a/Control/AthenaCommon/python/CFElements.py b/Control/AthenaCommon/python/CFElements.py
index c7996cbdc326d846ad6266a79d7a955e39b5a306..baa105312be9803c8105e05f5a0d016b50d489d9 100755
--- a/Control/AthenaCommon/python/CFElements.py
+++ b/Control/AthenaCommon/python/CFElements.py
@@ -82,21 +82,22 @@ def getAllSequenceNames(seq, depth=0):
     return seqNameList
 
 def checkSequenceConsistency( seq ):
-    """ Enforce rules for sequence graph - identical items can only appear at same depth """
-    seqNameList = getAllSequenceNames(seq)
-    names = [sNL[0] for sNL in seqNameList]
-
-    for item, count in collections.Counter(names).items():
-        if count > 1:
-            depths = set()
-            for (name, depth) in seqNameList:
-                if name == item:
-                  depths.add(depth)
-            if len(depths) > 1:
-                if names[0] == name:
-                    raise RuntimeError("Sequence %s contains sub-sequence %s" %(name, name) )
-                else:
-                    raise RuntimeError("Sequence %s contains sub-sequence %s at different depths" %(names[0], item,) )
+    """ Enforce rules for sequence graph - identical items can not be added to itself (even indirectly) """
+
+    def __noSubSequenceOfName( s, n, seen = set() ):
+        seen = seen.copy()
+        seen.add (s)
+        for c in getSequenceChildren( s ):
+            if c in seen:
+                raise RuntimeError("Sequence {} contains itself".format(compName(c)) )
+            if isSequence( c ):
+                if compName(c) == n:
+                    raise RuntimeError("Sequence {} contains sub-sequence of the same name".format(n) )
+                __noSubSequenceOfName( c, compName(c), seen ) # check each sequence for repetition as well
+                __noSubSequenceOfName( c, n, seen )
+
+    __noSubSequenceOfName( seq, compName(seq) )
+
 
 
 def stepSeq(name, filterAlg, rest):
@@ -352,3 +353,20 @@ class TestConf2CF( unittest.TestCase,  TestCF ):
         nest2.Members += [__mkAlg("SomeAlg2")]
         nest2.Members += [__mkAlg("SomeAlg3")]
         self.top = top
+
+class TestNest( unittest.TestCase ):
+    def test( self ):
+        Configurable.configurableRun3Behavior=1
+        top = parOR("top")
+        nest1 = parOR("nest1")
+        nest2 = seqAND("nest2")
+        top.Members += [nest1, nest2]
+
+        deep_nest1 = seqAND("deep_nest1")
+        nest1.Members += [deep_nest1]
+
+        nest2.Members += [nest1] # that one is ok
+        checkSequenceConsistency( top )
+        deep_nest1.Members += [nest1] # introducing an issue
+        self.assertRaises( RuntimeError, checkSequenceConsistency, top )
+
diff --git a/Control/AthenaCommon/python/ConfigurationShelve.py b/Control/AthenaCommon/python/ConfigurationShelve.py
index 461bd058add0e3f00991a9cbbaf6631d55d3da8b..ffbb125095d7a62c28804c4a36a46971443e27ea 100644
--- a/Control/AthenaCommon/python/ConfigurationShelve.py
+++ b/Control/AthenaCommon/python/ConfigurationShelve.py
@@ -305,6 +305,9 @@ def loadJobOptionsCatalogue( cfg_fname ):
  # restore job catalogue entries
    import GaudiPython.Bindings as gaudi
    for client in jocat:
+      if client == "ApplicationMgr":
+         # ApplicationMgr properties are already set
+         continue
       for n,v in six.iteritems(jocat[ client ]):
          # In Gaudi v28, the second argument of the ctor is passed by move,
          # which pyroot doesn't handle correctly.  Do this as a workaround.
diff --git a/Control/AthenaCommon/share/GenerateBootstrapTest.ref b/Control/AthenaCommon/share/GenerateBootstrapTest.ref
index f192f34d09382e00b8e561e48cd3151e65c84a56..1458f3c147c2978aad06b1d7c4fcc7aaa2e5a99d 100644
--- a/Control/AthenaCommon/share/GenerateBootstrapTest.ref
+++ b/Control/AthenaCommon/share/GenerateBootstrapTest.ref
@@ -4,13 +4,13 @@ copy bootstrap.pkl
 ... Read 2 items from python pickle file:  bootstrap.pkl
 ... Read 2 items from python pickle file:  bootstrap_test.pkl
 Given list of size 0. Not looking for differences.
-Step 1: reference file #components: 27
-Step 2: file to check  #components: 27
+Step 1: reference file #components: 28
+Step 2: file to check  #components: 28
 Willing to acquire file bootstrap_threaded.pkl from
 /build/mnowak/work/sealsvc/build/x86_64-centos7-gcc8-opt/share/bootstrap_threaded.pkl
 copy bootstrap_threaded.pkl
 ... Read 2 items from python pickle file:  bootstrap_threaded.pkl
 ... Read 2 items from python pickle file:  bootstrap_threaded_test.pkl
 Given list of size 0. Not looking for differences.
-Step 1: reference file #components: 33
-Step 2: file to check  #components: 33
+Step 1: reference file #components: 34
+Step 2: file to check  #components: 34
diff --git a/Control/AthenaCommon/share/Preparation.py b/Control/AthenaCommon/share/Preparation.py
index 5787138fd8ccd20dfe49053b207ca92da50afd91..8bf10b03a4dee40126f1edb487303a453c758a12 100644
--- a/Control/AthenaCommon/share/Preparation.py
+++ b/Control/AthenaCommon/share/Preparation.py
@@ -82,10 +82,6 @@ if min_cppyy_vmem_growth:
    del vmem_before_cppyy
 del min_cppyy_vmem_growth, grow_vmem, vmem_mb
 
-if not (not opts.run_batch and theApp.EventLoop == "PyAthenaEventLoopMgr"):
-   # make SIG_INT fatal
-   svcMgr.CoreDumpSvc.FatalHandler = -1
-   pass
 
 ## now import the top-level module which eases interactive work and/or
 ## python-based components: a pure python module
diff --git a/Control/AthenaCommon/share/bootstrap.pkl b/Control/AthenaCommon/share/bootstrap.pkl
index 23d4121dede4e14939bf33368f9ffaa649d061fa..1f9067c79c008b22f79765672be3434d59fcda8a 100644
Binary files a/Control/AthenaCommon/share/bootstrap.pkl and b/Control/AthenaCommon/share/bootstrap.pkl differ
diff --git a/Control/AthenaCommon/share/bootstrap_threaded.pkl b/Control/AthenaCommon/share/bootstrap_threaded.pkl
index 5792db164840bfecbd343f40b20fc39d7a21d99c..3de8cc67c8703e88e3f3356f672f32686471e2af 100644
Binary files a/Control/AthenaCommon/share/bootstrap_threaded.pkl and b/Control/AthenaCommon/share/bootstrap_threaded.pkl differ
diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt
index d8903a3aa1e973dd7fa55083498d5078f654735b..79d9249c519102e88b769bac41b4495240535939 100644
--- a/Control/AthenaConfiguration/CMakeLists.txt
+++ b/Control/AthenaConfiguration/CMakeLists.txt
@@ -25,11 +25,11 @@ atlas_add_test( AthConfigFlagsTest
    SCRIPT python -m unittest AthenaConfiguration.AthConfigFlags
    POST_EXEC_SCRIPT nopost.sh )
 
-if( NOT GENERATIONBASE )
-    atlas_add_test( AllConfigFlagsTest_EVNT_test
-                    SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_EVNT.py
-                    PROPERTIES TIMEOUT 300  )
+atlas_add_test( AllConfigFlagsTest_EVNT_test
+                SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_EVNT.py
+                PROPERTIES TIMEOUT 300  )
 
+if( NOT GENERATIONBASE )
     atlas_add_test( AllConfigFlagsTest_HITS_test
                     SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_HITS.py
                     PROPERTIES TIMEOUT 300  )
diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index 32c87029a88f1744b10f2f8e647917e1e6b844cf..e5be898d987fa04e401a946c05a89c91c1d5664a 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -1,10 +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
 
 from __future__ import print_function
 
 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
 from AthenaCommon.SystemOfUnits import TeV
-from AthenaConfiguration.AutoConfigFlags import GetFileMD, GetDetDescrInfo
+from AthenaConfiguration.AutoConfigFlags import GetFileMD
 from PyUtils.moduleExists import moduleExists
 
 
@@ -123,13 +123,10 @@ def _createCfgFlags():
     _addFlagsCategory(acf, "Overlay", __overlay, 'OverlayConfiguration' )
 
 #Geo Model Flags:
-    acf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout
-    acf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoAtlas",None) or "ATLAS-R2-2016-01-00-01") #
-    acf.addFlag("GeoModel.Align.Dynamic", lambda prevFlags : (not prevFlags.Detector.Simulate and not prevFlags.Input.isMC))
-    acf.addFlag("GeoModel.StripGeoType", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('StripGeoType',"GMX")) # Based on CommonGeometryFlags.StripGeoType
-    acf.addFlag("GeoModel.Run", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('Run',"RUN2")) # Based on CommonGeometryFlags.Run (InDetGeometryFlags.isSLHC replaced by GeoModel.Run=="RUN4")
-    acf.addFlag("GeoModel.Type", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('GeoType',"UNDEFINED")) # Geometry type in {ITKLoI, ITkLoI-VF, etc...}
-    acf.addFlag("GeoModel.IBLLayout", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('IBLlayout',"UNDEFINED")) # IBL layer layout  in {"planar", "3D", "noIBL", "UNDEFINED"}
+    def __geomodel():
+        from AthenaConfiguration.GeoModelConfigFlags import createGeoModelConfigFlags
+        return createGeoModelConfigFlags()
+    acf.addFlagsCategory( "GeoModel", __geomodel )
 
 #IOVDbSvc Flags:
     acf.addFlag("IOVDb.GlobalTag",lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("IOVDbGlobalTag",None) or "CONDBR2-BLKPA-2017-05")
@@ -196,12 +193,16 @@ def _createCfgFlags():
     _addFlagsCategory(acf,"BTagging",__btagging, 'BTagging')
 
     def __dq():
-        from AthenaMonitoring.DQConfigFlags import createDQConfigFlags, createComplexDQConfigFlags
+        from AthenaMonitoring.DQConfigFlags import createDQConfigFlags
         dqf = createDQConfigFlags()
-        dqf.join( createComplexDQConfigFlags() )
         return dqf
     _addFlagsCategory(acf, "DQ", __dq, 'AthenaMonitoring' )
 
+    def __perfmon():
+        from PerfMonComps.PerfMonConfigFlags import createPerfMonConfigFlags
+        return createPerfMonConfigFlags()
+    _addFlagsCategory(acf, "PerfMon", __perfmon, 'PerfMonComps')
+
     return acf
 
 
diff --git a/Control/AthenaConfiguration/python/AthConfigFlags.py b/Control/AthenaConfiguration/python/AthConfigFlags.py
index 12ba8defa33909d35452297b1cd08a64a7c246b8..08401b990dae87cefc686d550fd6bad41d85f8ce 100644
--- a/Control/AthenaConfiguration/python/AthConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AthConfigFlags.py
@@ -1,10 +1,10 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from __future__ import print_function
-import six
 
 from copy import deepcopy
 from AthenaCommon.Logging import logging
+_msg = logging.getLogger('AthConfigFlags')
 class CfgFlag(object):
     __slots__ = ['_value','_setDef']
 
@@ -23,12 +23,12 @@ class CfgFlag(object):
     def set(self,value):
         self._value=value
         return
-    
+
     def get(self,flagdict=None):
         if self._value is None:
             #Have to call the method to obtain the default value
             self._value=self._setDef(flagdict)
-        return deepcopy(self._value) 
+        return deepcopy(self._value)
 
     def __repr__(self):
         if self._value is not None:
@@ -42,21 +42,50 @@ class FlagAddress(object):
         if isinstance(f, AthConfigFlags):
             self._flags = f
             self._name = name
-            
+
         elif isinstance(f, FlagAddress):
             self._flags = f._flags
             self._name  = f._name+"."+name
 
-    def __getattr__(self, name):        
+    def __getattr__(self, name):
+        # the logic it implemets is as follows:
+        # full flag name is formed from the path + name passsed as an argument
+        # first try if the flags is available (most frequent case)
+        # if not see if the path+name is used in one of the flags of longer name (having more pieces)
+        # if not try dynamic flags loading
+        # after basically above stops are repeated
+
         merged = self._name + "." + name
+        _msg.debug("Flags addr __getattr__ %s", merged )
         if self._flags.hasFlag( merged ):
+            _msg.debug("Flags addr __getattr__ there %s", merged )
             return self._flags._get( merged )
-        return FlagAddress( self, name )
+
+        if self._flags.hasCategory( merged ): # the flag name is not complete yet
+            _msg.debug("Flags addr __getattr__ category there %s", merged )
+            return FlagAddress( self, name )
+
+        _msg.debug("Flags addr __getattr__ need dynaload %s", merged  )
+        self._flags._loadDynaFlags( merged )
+
+        if self._flags.hasCategory( merged ): # the flag name is not complete yet
+            _msg.debug("Flags addr __getattr__ category there after dynaload %s", merged )
+            return FlagAddress( self, name )
+
+        if self._flags.hasFlag( merged ):
+            return self._flags._get( merged )
+        raise RuntimeError( "No such flag: {}  The name is likely incomplete.".format(merged) )
 
     def __setattr__( self, name, value ):
         if name.startswith("_"):
             return object.__setattr__(self, name, value)
         merged = self._name + "." + name
+
+        if not self._flags.hasFlag( merged ): # flag ismisisng, try loading dynamic ones
+            self._flags._loadDynaFlags( merged )
+
+        if not self._flags.hasFlag( merged ):
+            raise RuntimeError( "No such flag: {}  The name is likely incomplete.".format(merged) )
         return self._flags._set( merged, value )
 
     def __cmp__(self, other):
@@ -74,67 +103,109 @@ class FlagAddress(object):
 
     def __bool__(self):
         raise RuntimeError( "No such flag: "+ self._name+".  The name is likely incomplete." )
-        
+
 
 
 class AthConfigFlags(object):
 
     def __init__(self,inputflags=None):
-        self._msg = logging.getLogger('AthConfigFlags')
-        
+
+
         if inputflags:
             self._flagdict=inputflags
         else:
             self._flagdict=dict()
         self._locked=False
         self._dynaflags = dict()
+        self._loaded    = set() # dynamic dlags that were loaded
 
     def __getattr__(self, name):
+        _msg.debug("AthConfigFlags __getattr__ %s", name )
+        if name in self._flagdict:
+            return self._get(name)
         return FlagAddress(self, name)
 
+    def __setattr__(self, name, value):
+        if name.startswith("_"):
+            return object.__setattr__(self, name, value)
+
+        _msg.debug("AthConfigFlags __getattr__ %s", name )
+        if name in self._flagdict:
+            return self._set(name, value)
+        raise RuntimeError( "No such flag: "+ name+".  The name is likely incomplete." )
+
+
     def addFlag(self,name,setDef=None):
         if (self._locked):
             raise RuntimeError("Attempt to add a flag to an already-locked container")
 
         if name in self._flagdict:
             raise KeyError("Duplicated flag name: {}".format( name ))
-        
         self._flagdict[name]=CfgFlag(setDef)
         return
-    
-    def addFlagsCategory(self, name, generator):
-        self._dynaflags[name] = generator
+
+    def addFlagsCategory(self, path, generator, prefix=False):
+        """
+        The path is the beginning of the flag name, that is, if it is "X" the flags generated by the generator should be "X.*"
+        The generator is a function that returns flags container, the flags have to start with the same path
+        When the prefix is set to True the flags created by the generator when added are prefixed by the "path"
+
+        Supported calls are then:
+         addFlagsCategory("A", g) - where g is function creating flags  is f.addFlag("A.x", someValue)
+         addFlagsCategory("A", g, True) - when flags are defined in g like this: f.addFalg("x", somevalue),
+        The later option allows to share one generation function among the flags that are later loaded in a different paths.
+        """
+        self._dynaflags[path] = (generator, prefix)
 
     def needFlagsCategory(self, name):
+        """ public interface for _loadDynaFlags """
         self._loadDynaFlags( name )
-    
+
     def _loadDynaFlags(self, name):
-        flagBaseName = name.split('.')[0]
-        if flagBaseName in self._dynaflags:
-            self._msg.debug("dynamically loading the flag {}".format( flagBaseName) )
-            isLocked = self._locked
-            self._locked = False
-            self.join( self._dynaflags[flagBaseName]() )
-            self._locked = isLocked
-            del self._dynaflags[flagBaseName]
+        """
+        loads the flags of the form "A.B.C" first attemprintg the path "A" then "A.B" and then "A.B.C"
+        """
+        def __load_impl( flagBaseName ):
+            if flagBaseName in self._loaded:
+                _msg.debug("Flags %s already loaded",flagBaseName  )
+                return
+            if flagBaseName in self._dynaflags:
+                _msg.debug("Dynamically loading the flags under %s", flagBaseName )
+                isLocked = self._locked
+                self._locked = False
+                generator, prefix = self._dynaflags[flagBaseName]
+                self.join( generator(), flagBaseName if prefix else "" )
+                self._locked = isLocked
+                del self._dynaflags[flagBaseName]
+                self._loaded.add(flagBaseName)
+
+        pathfrags = name.split('.')
+        for maxf in range(1, len(pathfrags)+1):
+            __load_impl( '.'.join(pathfrags[:maxf]) )
 
     def loadAllDynamicFlags(self):
-        # Need to convert to a list since _loadDynaFlags may change the dict.
-        for prefix in list(self._dynaflags.keys()):
-            self._loadDynaFlags( prefix )
-
-    def hasFlag(self, name):        
-        if name in self._flagdict: 
+        """Force load all the dynamic flags """
+        while len(self._dynaflags) != 0:
+            # Need to convert to a list since _loadDynaFlags may change the dict.
+            for prefix in list(self._dynaflags.keys()):
+                self._loadDynaFlags( prefix )
+
+    def hasCategory(self, name):
+        path = name+'.'
+        for f in self._flagdict.keys():
+            if f.startswith(path):
+                return True
+        return False
+
+    def hasFlag(self, name):
+        if name in self._flagdict:
             return True
-        self._msg.debug("Flag not loaded yet {}".format( name ) )
-        self._loadDynaFlags( name.split('.')[0] )
-        return name in self._flagdict
+        _msg.debug("Flag %s absent, possibly not loaded yet?", name )
+        return False
 
     def _set(self,name,value):
-
         if (self._locked):
             raise RuntimeError("Attempt to set a flag of an already-locked container")
-        self._loadDynaFlags( name )
         if name in self._flagdict:
             self._flagdict[name].set(value)
             return
@@ -144,9 +215,8 @@ class AthConfigFlags(object):
         if len(closestMatch)>0:
             errString+=". Did you mean \'{}\'?".format(  closestMatch[0] )
         raise KeyError(errString)
-        
-    def _get(self,name):        
-        self._loadDynaFlags( name )
+
+    def _get(self,name):
         if name in self._flagdict:
             return self._flagdict[name].get(self)
 
@@ -176,11 +246,12 @@ class AthConfigFlags(object):
     def cloneAndReplace(self,subsetToReplace,replacementSubset):
         #This is to replace subsets of configuration flags like
         #egamamaFlags.GSF by egamma.TrigGSFFlavor1
-        self.dump()
-        self._msg.info("cloning flags and replacing {} by {}".format( subsetToReplace, replacementSubset ) )
+        #self.dump()
+        _msg.info("cloning flags and replacing {} by {}".format( subsetToReplace, replacementSubset ) )
 
         self._loadDynaFlags( subsetToReplace )
-        
+        self._loadDynaFlags( replacementSubset )
+
         if not subsetToReplace.endswith("."):
             subsetToReplace+="."
             pass
@@ -188,59 +259,61 @@ class AthConfigFlags(object):
             replacementSubset+="."
             pass
 
-        #Sanity check: Don't replace a by a 
+        #Sanity check: Don't replace a by a
         if (subsetToReplace == replacementSubset):
-            raise RuntimeError("Called cloneAndReplace with identical strings")
-                
+            raise RuntimeError("Can not replace flags {} with themselves".format(subsetToReplace))
+
+
         replacedNames=set()
         replacementNames=set()
         newFlagDict=dict()
         for (name,flag) in self._flagdict.items():
             if name.startswith(subsetToReplace):
-                replacedNames.add(name[len(subsetToReplace):]) #Add the
-                pass #Do not copy stuff thats going to be replaced
+                replacedNames.add(name[len(subsetToReplace):]) #Remember replaced flag for the check later
             elif name.startswith(replacementSubset):
                 subName=name[len(replacementSubset):]
-                replacementNames.add(subName)
+                replacementNames.add(subName) # remember replacement name
                 #Move the flag to the new name:
-                
-                newFlagDict[subsetToReplace+subName]=deepcopy(flag) 
-                #If we lock the container right away, we don't need to deepcopy
+
+                newFlagDict[subsetToReplace+subName]=deepcopy(flag)
                 pass
-            else: 
+            else:
                 newFlagDict[name]=deepcopy(flag) #All other flags are simply copied
-                #If we lock the container right away, we don't need to deepcopy
                 pass
             #End loop over flags
             pass
 
         #Last sanity check: Make sure that teh replaced section still contains teh same names:
         if (replacedNames!=replacementNames):
-            self._msg.error(replacedNames)
-            self._msg.error(replacementNames)
-            raise RuntimeError("Attempt to replace incompatible subsets: None matching flag names are " 
+            _msg.error(replacedNames)
+            _msg.error(replacementNames)
+            raise RuntimeError("Attempt to replace incompatible subsets: None matching flag names are "
                                + repr(replacedNames ^ replacementNames ))
         newFlags = AthConfigFlags(newFlagDict)
         newFlags._dynaflags = deepcopy(self._dynaflags)
-        newFlags.dump()
         return newFlags
 
 
 
     def join(self, other, prefix=''):
+        """
+        Merges two flag containers
+        When the prefix is passed each flag from the "other" is prefixed by "prefix."
+        """
         if (self._locked):
             raise RuntimeError("Attempt to join with and already-locked container")
 
-        for (name,flag) in six.iteritems(other._flagdict):
+        for (name,flag) in other._flagdict.items():
             fullName = prefix+"."+name if prefix != "" else name
             if fullName in self._flagdict:
                 raise KeyError("Duplicated flag name: {}".format( fullName ) )
             self._flagdict[fullName]=flag
 
-        for (name,loader) in six.iteritems(other._dynaflags):
+        for (name,loader) in other._dynaflags.items():
             if prefix+"."+name in self._dynaflags:
                 raise KeyError("Duplicated dynamic flags name: {}".format( name ) )
-            self.join( loader(), name )
+        self._dynaflags.update(other._dynaflags)
+            #self.join( loader(), name )
 
         return
 
@@ -253,17 +326,23 @@ class AthConfigFlags(object):
             return
         print("Flag categories that can be loaded dynamically")
         print("{:25} : {:>30} : {}".format( "Category","Generator name", "Defined in" ) )
-        for name,gen in sorted(six.iteritems(self._dynaflags)):
-            print("{:25} : {:>30} : {}".format( name, gen.__name__, '/'.join(six.get_function_code(gen).co_filename.split('/')[-2:]) ) )
+        for name,gen_and_prefix in sorted(self._dynaflags.items()):
+            print("{:25} : {:>30} : {}".format( name, gen_and_prefix[0].__name__, '/'.join(gen_and_prefix[0].__code__.co_filename.split('/')[-2:]) ) )
 
 
-    def initAll(self): #Mostly a self-test method
+    def initAll(self):
+        """
+        Mostly a self-test method
+        """
         for n,f in list(self._flagdict.items()):
             f.get(self)
         return
 
-    # scripts calling AthConfigFlags.fillFromArgs can extend this parser, and pass their version to fillFromArgs
+
     def getArgumentParser(self):
+        """
+        Scripts calling AthConfigFlags.fillFromArgs can extend this parser, and pass their version to fillFromArgs
+        """
         import argparse
         parser= argparse.ArgumentParser()
         parser.add_argument("-d","--debug",default=None,help="attach debugger (gdb) before run, <stage>: conf, init, exec, fini")
@@ -276,7 +355,6 @@ class AthConfigFlags(object):
     # parser argument must be an ArgumentParser returned from getArgumentParser()
     def fillFromArgs(self,listOfArgs=None,parser=None):
         """
-
         Used to set flags from command-line parameters, like ConfigFlags.fillFromArgs(sys.argv[1:])
         """
         import sys
@@ -300,7 +378,7 @@ class AthConfigFlags(object):
 
         if args.filesInput:
             self.Input.Files=args.filesInput.split(",")
-        
+
         if args.loglevel:
             from AthenaCommon import Constants
             if hasattr(Constants,args.loglevel):
@@ -318,9 +396,12 @@ class AthConfigFlags(object):
                 raise ValueError("Can't interpret argument {}, expected a key=value format".format( arg ) )
 
             key=argsplit[0].strip()
+
+            if not self.hasFlag(key):
+                self._loadDynaFlags( '.'.join(key.split('.')[:-1]) ) # for a flag A.B.C dymanic flags from category A.B
             if not self.hasFlag(key):
                 raise KeyError("{} is not a known configuration flag".format( key ) )
-            
+
             value=argsplit[1].strip()
 
             try:
@@ -338,10 +419,10 @@ class AthConfigFlags(object):
 
 
 import unittest
-class TestFlagsSetup(unittest.TestCase):    
+class TestFlagsSetup(unittest.TestCase):
     def setUp(self):
         self.flags = AthConfigFlags()
-        self.flags.addFlag("A", True)
+        self.flags.addFlag("Atest", True)
         self.flags.addFlag("A.One", True)
         self.flags.addFlag("A.B.C", False)
         self.flags.addFlag("A.dependentFlag", lambda prevFlags: ["FALSE VALUE", "TRUE VALUE"][prevFlags.A.B.C] )
@@ -354,13 +435,13 @@ class TestAccess(TestFlagsSetup):
         self.assertTrue( self.flags.A.B.C, "Flag value not changed")
 
 
-class TestWrongAccess(TestFlagsSetup):    
+class TestWrongAccess(TestFlagsSetup):
     def runTest(self):
         print("""... Acess to the flag that are missnames should give an exception""")
         with self.assertRaises(RuntimeError):
             print(".... test printout {}".format( self.flags.A is True ))
             print(".... test printout {}".format( self.flags.A.B == 6 ))
-            
+
 
 
 class TestDependentFlag(TestFlagsSetup):
@@ -376,18 +457,19 @@ class TestFlagsSetupDynamic(TestFlagsSetup):
 
         def theXFlags():
             nf = AthConfigFlags()
-            nf.addFlag("X.a", 17)
-            nf.addFlag("X.b", 55)
-            nf.addFlag("X.c", "Hello")
+            nf.addFlag("a", 17)
+            nf.addFlag("b", 55)
+            nf.addFlag("c", "Hello")
             return nf
 
+
         def theZFlags():
             nf = AthConfigFlags()
             nf.addFlag("Z.A", 7)
             nf.addFlag("Z.B", True)
             nf.addFlag("Z.C.setting", 99)
-            nf.addFlagsCategory( 'Z', theXFlags )
-            nf.addFlagsCategory( 'Z.clone', theXFlags )
+            nf.addFlagsCategory( 'Z.Xclone1', theXFlags, prefix=True )
+            nf.addFlagsCategory( 'Z.Xclone2', theXFlags, prefix=True )
             return nf
 
         def theTFlags():
@@ -396,56 +478,58 @@ class TestFlagsSetupDynamic(TestFlagsSetup):
             return nf
 
         self.flags.addFlagsCategory( 'Z', theZFlags )
-        self.flags.addFlagsCategory( 'X', theXFlags )
+        self.flags.addFlagsCategory( 'X', theXFlags, prefix=True )
         self.flags.addFlagsCategory( 'T', theTFlags )
+        print("... Setup of dynamic flags loading test")
         self.flags.dump()
         print("")
 
 class TestDynamicFlagsDump(TestFlagsSetupDynamic):
     def runTest(self):
         print("""... Check if dump with unloaded flags works""")
-        self.flags.dump()        
+        self.flags.dump()
         print("")
 
 class TestDynamicFlagsRead(TestFlagsSetupDynamic):
     def runTest(self):
         print("""... Check if dynamic flags reading works""")
         self.assertEqual( self.flags.X.a, 17, "dynamically loaded flags have wrong value")
-        self.flags.dump()
         print("")
         self.assertEqual( self.flags.Z.A, 7, "dynamically loaded flags have wrong value")
-        self.assertEqual( self.flags.Z.X.b, 55, "dynamically loaded flags have wrong value")
-        self.flags.dump()        
+        self.assertEqual( self.flags.Z.Xclone1.b, 55, "dynamically loaded flags have wrong value")
+        self.flags.Z.Xclone2.b = 56
+        self.assertEqual( self.flags.Z.Xclone2.b, 56, "dynamically loaded flags have wrong value")
+        self.flags.dump()
         print("")
 
 class TestDynamicFlagsSet(TestFlagsSetupDynamic):
     def runTest(self):
         print("""... Check if dynamic flags setting works""")
         self.flags.Z.A = 15
-        self.flags.Z.X.a = 20
+        self.flags.Z.Xclone1.a = 20
         self.flags.X.a = 30
-        self.assertEqual( self.flags.Z.X.a, 20, "dynamically loaded flags have wrong value")
+        self.assertEqual( self.flags.Z.Xclone1.a, 20, "dynamically loaded flags have wrong value")
         self.assertEqual( self.flags.X.a, 30, "dynamically loaded flags have wrong value")
         self.assertEqual( self.flags.Z.A, 15, "dynamically loaded flags have wrong value")
-        self.flags.dump()        
+        self.flags.dump()
         print("")
 
 class TestOverwriteFlags(TestFlagsSetupDynamic):
     def runTest(self):
         print("""... Check if overwiting works""")
-        self.flags.Z.clone.X.a = 20
+        self.flags.Z.Xclone1.a = 20
         self.flags.X.a = 30
-        copyf = self.flags.cloneAndReplace( "X", "Z.clone.X")
+        copyf = self.flags.cloneAndReplace( "X", "Z.Xclone1")
         self.assertEqual( copyf.X.a, 20, "dynamically loaded flags have wrong value")
         self.assertEqual( copyf.T.Abool, False, "The flags clone does not have dynamic flags")
         copyf.dump()
         print("")
 
-class flagsFromArgsTest(unittest.TestCase): 
+class flagsFromArgsTest(unittest.TestCase):
     def setUp(self):
         self.flags = AthConfigFlags()
         self.flags.addFlag('Exec.OutputLevel',3) #Global Output Level
-        self.flags.addFlag('Exec.MaxEvents',-1) 
+        self.flags.addFlag('Exec.MaxEvents',-1)
         self.flags.addFlag("Exec.SkipEvents",0)
         self.flags.addFlag("Exec.DebugStage","")
         self.flags.addFlag('Input.Files',[])
@@ -476,4 +560,3 @@ if __name__ == "__main__":
     suite.addTest(TestOverwriteFlags())
     runner = unittest.TextTestRunner(failfast=False)
     runner.run(suite)
-
diff --git a/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py b/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py
index 286ad3ac1b0268be55061f905808ca968d2489da..49e1531a915686fe19cf43b2fe070391e30351fa 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulatorTest.py
@@ -192,6 +192,7 @@ class ForbidRecursiveSequences( unittest.TestCase ):
         # \__ AthAlgSeq (seq: PAR AND)
         #    \__ seq1 (seq: SEQ AND)
         #       \__ seq1 (seq: SEQ AND)
+        print("")
         def selfSequence():
             from AthenaCommon.CFElements import seqAND
             accTop = ComponentAccumulator()
@@ -228,13 +229,14 @@ class ForbidRecursiveSequences( unittest.TestCase ):
         def selfGrandParentSequence():
             from AthenaCommon.CFElements import seqAND
             accTop = ComponentAccumulator()
+            accTop.wasMerged()
             seq1 = seqAND("seq1")
             seq2 = seqAND("seq2")
             seq1_again = seqAND("seq1")
             accTop.addSequence(seq1)
             accTop.addSequence(seq2, parentName = "seq1")
             accTop.addSequence(seq1_again, parentName = "seq2")
-            accTop.wasMerged()
+
 
         #Can't merge sequences with the same name two steps below itself, e.g.
         # \__ AthAlgSeq (seq: PAR AND)
@@ -246,15 +248,24 @@ class ForbidRecursiveSequences( unittest.TestCase ):
             acc1=ComponentAccumulator()
             acc1.wasMerged()
             acc1.addSequence(seqAND("seq1"))
+
             acc2=ComponentAccumulator()
             acc2.wasMerged()
             acc2.addSequence(seqAND("seq2"))
-            acc2.addSequence(seqAND("seq1"), "seq2")
-            acc1.merge(acc2)
+            acc2.addSequence(seqAND("seq1"), parentName = "seq2")
+            acc1.merge(acc2, sequenceName="seq1")
 
+        print("selfSequence")
         self.assertRaises(RuntimeError, selfSequence )
+        print("selfSequence done")
+
+        print("selfGrandParentSequence")
         self.assertRaises(RuntimeError, selfGrandParentSequence )
+        print("selfGrandParentSequence done")
+
+        print("selfMergedGrandParentSequence")
         self.assertRaises(RuntimeError, selfMergedGrandParentSequence )
+        print("selfMergedGrandParentSequence done")
 
 class FailedMerging( unittest.TestCase ):
     def runTest( self ):
diff --git a/Control/AthenaConfiguration/python/GeoModelConfigFlags.py b/Control/AthenaConfiguration/python/GeoModelConfigFlags.py
new file mode 100644
index 0000000000000000000000000000000000000000..53fea8c5945ff2f91eaf28805dcc695a22bf0a00
--- /dev/null
+++ b/Control/AthenaConfiguration/python/GeoModelConfigFlags.py
@@ -0,0 +1,15 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+from AthenaConfiguration.AutoConfigFlags import GetFileMD, GetDetDescrInfo
+
+def createGeoModelConfigFlags():
+    gcf=AthConfigFlags()
+    gcf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout
+    gcf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoAtlas",None) or "ATLAS-R2-2016-01-00-01") #
+    gcf.addFlag("GeoModel.Align.Dynamic", lambda prevFlags : (not prevFlags.Detector.Simulate and not prevFlags.Input.isMC))
+    gcf.addFlag("GeoModel.StripGeoType", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('StripGeoType',"GMX")) # Based on CommonGeometryFlags.StripGeoType
+    gcf.addFlag("GeoModel.Run", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('Run',"RUN2")) # Based on CommonGeometryFlags.Run (InDetGeometryFlags.isSLHC replaced by GeoModel.Run=="RUN4")
+    gcf.addFlag("GeoModel.Type", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('GeoType',"UNDEFINED")) # Geometry type in {ITKLoI, ITkLoI-VF, etc...}
+    gcf.addFlag("GeoModel.IBLLayout", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('IBLlayout',"UNDEFINED")) # IBL layer layout  in {"planar", "3D", "noIBL", "UNDEFINED"}
+    return gcf
diff --git a/Control/AthenaConfiguration/python/MainServicesConfig.py b/Control/AthenaConfiguration/python/MainServicesConfig.py
index f728d8a1dff791b57a7285ae0072090e3e03d221..9a9d69b62a55c9f4962ba4218e7b19cbdbc5d6e8 100644
--- a/Control/AthenaConfiguration/python/MainServicesConfig.py
+++ b/Control/AthenaConfiguration/python/MainServicesConfig.py
@@ -79,10 +79,7 @@ def MainServicesCfg(cfgFlags):
     cfg.addService(StoreGateSvc("HistoryStore"))
     cfg.addService(StoreGateSvc("ConditionStore"))
     
-    CoreDumpSvc=CompFactory.CoreDumpSvc
-    #438 is the logical or of  FATAL_ON_QUIT, FATAL_ON_INT, FATAL_DUMP_SIG, FATAL_DUMP_STACK, FATAL_DUMP_CONTEXT, FATAL_AUTO_EXIT
-    #as defiend in Control/AthenaServices/src/SetFatalHandler.h 
-    cfg.addService(CoreDumpSvc(FatalHandler = 438))
+    cfg.addService(CompFactory.CoreDumpSvc())
 
     cfg.setAppProperty('InitializationLoopCheck',False)
 
diff --git a/Control/AthenaConfiguration/python/new_confTool.py b/Control/AthenaConfiguration/python/new_confTool.py
index 8f893b9fab8dd3e563fc697e25afad100717c3ca..710c8ada2cd731f8e5a8cd69e286e6a1370612fe 100644
--- a/Control/AthenaConfiguration/python/new_confTool.py
+++ b/Control/AthenaConfiguration/python/new_confTool.py
@@ -104,11 +104,11 @@ def _compareCollection(ref_collection, chk_collection, args):
             chk = _findByName(name, chk_collection)
             if not ref:
                 print(
-                    f"\n\033[91m Component {name} \033[94m exists only in Chk \033[0m \033[0m \n"
+                    "\n\033[91m Component %s \033[94m exists only in Chk \033[0m \033[0m \n" % name
                 )
             elif not chk:
                 print(
-                    f"\n\033[91m Component {name} \033[92m exists only in Ref \033[0m \033[0m \n"
+                    "\n\033[91m Component %s \033[92m exists only in Ref \033[0m \033[0m \n" % name
                 )
             elif not _equalComponent(ref, chk):
                 _compareComponent(ref, chk, args)
@@ -118,15 +118,15 @@ def _compareCollection(ref_collection, chk_collection, args):
         for key in all_keys:
             if key not in ref_collection:
                 print(
-                    f"{key} = {chk_collection[key]}: \033[94m exists only in Chk \033[0m \033[91m<< !!!\033[0m"
+                    "%s= %s: \033[94m exists only in Chk \033[0m \033[91m<< !!!\033[0m" % (key, chk_collection[key])
                 )
             elif key not in chk_collection:
                 print(
-                    f"{key} = {ref_collection[key]}: \033[92m exists only in Ref \033[0m \033[91m<< !!!\033[0m"
+                    "%s= %s: \033[92m exists only in Ref \033[0m \033[91m<< !!!\033[0m" % (key, ref_collection[key])
                 )
             elif ref_collection[key] != chk_collection[key]:
                 print(
-                    f"{key} : \033[92m {str(ref_collection[key])} \033[0m vs \033[94m {str(chk_collection[key])} \033[0m \033[91m<< !!!\033[0m"
+                    "%s : \033[92m %s \033[0m vs \033[94m %s \033[0m \033[91m<< !!!\033[0m" % (key, str(ref_collection[key]), str(chk_collection[key]))
                 )
 
 
@@ -140,13 +140,13 @@ def _compareComponent(compRef, compChk, args, level=0):
     for prop in all_descriptors:
         if prop not in ref_keys:
             print(
-                f"{prop} = {compChk[prop]}: \033[94m exists only in Chk \033[0m \033[91m<< !!!\033[0m"
+                "%s = %s: \033[94m exists only in Chk \033[0m \033[91m<< !!!\033[0m" % (prop, compChk[prop])
             )
             continue
 
         if prop not in chk_keys:
             print(
-                f"{prop} = {compRef[prop]}: \033[92m exists only in Ref \033[0m \033[91m<< !!!\033[0m"
+                "%s = %s: \033[92m exists only in Ref \033[0m \033[91m<< !!!\033[0m" % (prop, compRef[prop])
             )
             continue
 
@@ -161,11 +161,11 @@ def _compareComponent(compRef, compChk, args, level=0):
             diffmarker = " \033[91m<< !!!\033[0m"
 
         print(
-            f"{'>> '*level}{prop} : \033[92m {str(ref_val)} \033[0m vs \033[94m {str(chk_val)} \033[0m {diffmarker}"
+            "%s%s : \033[92m %s \033[0m vs \033[94m %s \033[0m %s" % ('>> '*level, prop, str(ref_val), str(chk_val), diffmarker)
         )
 
         if isinstance(ref_val, Configurable):
-            print(f"vvv")
+            print("vvv")
             _compareComponent(ref_val, chk_val, args, level + 1)
 
 
@@ -210,15 +210,15 @@ def _getFlattenedProperties(obj):
         if isinstance(val, Configurable):
             propstr += "({0}:{1})".format(key, _getFlattenedProperties(val))
         elif isinstance(val, str):
-            propstr += f"({val})"
+            propstr += "(%s)" % val
         elif hasattr(val, "__iter__"):
             for th in val:
                 if isinstance(th, Configurable):
                     propstr += "({0}:{1})".format(th.name, _getFlattenedProperties(th))
                 elif isinstance(th, str) and "{" in th:  # parse dict saved as a string
-                    propstr += f"({str(sorted(json.loads(th).items()))})"
+                    propstr += "(%s)" % str(sorted(json.loads(th).items()))
                 else:
-                    propstr += f"({th})"
+                    propstr += "(%s)" % th
         else:
             propstr += "({0}:{1})".format(key, str(val))
     return propstr
diff --git a/Control/AthenaConfiguration/python/testAllConfigFlags_EVNT.py b/Control/AthenaConfiguration/python/testAllConfigFlags_EVNT.py
index f1be0c500765fabca2d501be22fa2c52371a1122..b9bd346b50294cb5d3c04b11c2a4ae967d1179a7 100755
--- a/Control/AthenaConfiguration/python/testAllConfigFlags_EVNT.py
+++ b/Control/AthenaConfiguration/python/testAllConfigFlags_EVNT.py
@@ -1,10 +1,17 @@
 #!/usr/bin/env python
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from __future__ import print_function
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 ConfigFlags.Input.Files = defaultTestFiles.EVNT
-ConfigFlags._loadDynaFlags("Detector")
+
+havedet = True
+try:
+    import DetDescrCnvSvc # noqa: F401
+except ImportError:
+    havedet = False
+if havedet:
+    ConfigFlags._loadDynaFlags("Detector")
 
 # Don't fail just because G4AtlasApps isn't present in this build.
 havesim = True
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorld.ref b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorld.ref
index 588d9b72275da21fec75f1409705dafbe9736414..49b4b722b2f8ed276d2efd91c211a0f52c55ad78 100644
--- a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorld.ref
+++ b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorld.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref
index dc58ee004249ae55b14718cb2ac1e03242ca176e..583a64cd37296ee88ce6e5637c171209ed0d1c22 100644
--- a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref
+++ b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_1.ref
@@ -24,7 +24,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7399 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc                                     0    INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref
index 10b7ac00d61df8ac7466fc7654f71721df010e24..eaed697ec894d4f9ee430ed7d898491153cf39f9 100644
--- a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref
+++ b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref
@@ -24,7 +24,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7399 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc                                     0    INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
diff --git a/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref b/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref
index 586d2d4f1c576c7adfb6377a80765051b2ca2b77..72945edca5e24f5224e65a35767cc2cfb4f442e7 100644
--- a/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref
+++ b/Control/AthenaExamples/AthExJobOptions/share/BasicJobOptions.ref
@@ -396,7 +396,6 @@ ApplicationMgr                     INFO Updating Gaudi::PluginService::SetDebug(
 AthDictLoaderSvc                   INFO in initialize...
 AthDictLoaderSvc                   INFO acquired Dso-registry
 ClassIDSvc                         INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc                        INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr                 INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 TopAlgorithm                      DEBUG Property update for OutputLevel : new value = 2
diff --git a/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref b/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref
index bbd63539ec779d1e5210b3d43c109a33035b52d8..8d79e66e7ff4acb72465c4593ea8c2c14a3cfdc2 100644
--- a/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref
+++ b/Control/AthenaExamples/AthExJobOptions/share/CustomToolJobOptions.ref
@@ -310,7 +310,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 MyTopAlg.Custom...   INFO Retrieved TheToolPubTool = PublicToolHandle('ConcreteTool/PublicConcreteTool')
diff --git a/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref b/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref
index d83f9be46c556ed037a78ad2bfcbfa4a53ae2fd8..f509c44a3cb518058ea3b55c6cc1a74bcf0e2668 100644
--- a/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref
+++ b/Control/AthenaExamples/AthExJobOptions/share/CustomTopAlgorithmJobOptions.ref
@@ -105,7 +105,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 MyCustomAlg          INFO Retrieved TheTool = PrivateToolHandle('ConcreteTool/ConcreteTool')
diff --git a/Control/AthenaExamples/AthExStoreGateExample/share/SGTutorial_jobOptions.txt b/Control/AthenaExamples/AthExStoreGateExample/share/SGTutorial_jobOptions.txt
index bf13e979386c1d0e376b9f3d2990d810030249a0..ec8adccb9885a6d86668dc8fdc0d9d9ec7fffa1a 100755
--- a/Control/AthenaExamples/AthExStoreGateExample/share/SGTutorial_jobOptions.txt
+++ b/Control/AthenaExamples/AthExStoreGateExample/share/SGTutorial_jobOptions.txt
@@ -12,7 +12,7 @@
 //--------------------------------------------------------------
 
 //load relevant libraries
-ApplicationMgr.DLLs += { "SGTutorial" };
+ApplicationMgr.Dlls += { "SGTutorial" };
 
 //top algorithms to be run
 ApplicationMgr.TopAlg = { "SGWrite", "SGRead" };
diff --git a/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateExample_Gen_jobOptions.txt b/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateExample_Gen_jobOptions.txt
index a1665c2d26cbc2d53c8572a70e0c0d61190209bf..e9cbfdee6d6bfc3c60b8acd7d1c5d3db9dda8d33 100755
--- a/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateExample_Gen_jobOptions.txt
+++ b/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateExample_Gen_jobOptions.txt
@@ -12,7 +12,7 @@
 //--------------------------------------------------------------
 
 //load relevant libraries
-ApplicationMgr.DLLs += { "AthExStoreGateExample" };
+ApplicationMgr.Dlls += { "AthExStoreGateExample" };
 
 //top algorithms to be run
 ApplicationMgr.TopAlg = { "WriteData", "ReadData" };
diff --git a/Control/AthenaExamples/AthExStoreGateExample/src/ReadPileUpData.cxx b/Control/AthenaExamples/AthExStoreGateExample/src/ReadPileUpData.cxx
index acd60bea60f73c3c6d5b9634cf0952b368fe11f8..1b9e3e0f880281b8f35f9b9eb58d3417fc479cce 100755
--- a/Control/AthenaExamples/AthExStoreGateExample/src/ReadPileUpData.cxx
+++ b/Control/AthenaExamples/AthExStoreGateExample/src/ReadPileUpData.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
 */
 
 #undef NDEBUG
@@ -40,8 +40,6 @@ StatusCode ReadPileUpData::initialize(){
     ATH_MSG_ERROR ("Could not find StoreGateSvc");
     return StatusCode::FAILURE;
   }
-  //another way of doing the above (not mt-safe)
-  //   p_SGevent = StoreGate::pointer();
   //locate the PileUpMergeSvc and initialize our local ptr
   if (!(service("PileUpMergeSvc", p_mergeSvc)).isSuccess() || 
       0 == p_mergeSvc) {
diff --git a/Control/AthenaIPCTools/CMakeLists.txt b/Control/AthenaIPCTools/CMakeLists.txt
index 8908d562d51340774a9c94361b2f011820807b3b..08ef40fb3c3baf5a6a8cb6dbdbf3fbfbf89023be 100644
--- a/Control/AthenaIPCTools/CMakeLists.txt
+++ b/Control/AthenaIPCTools/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: AthenaIPCTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaIPCTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-			  Control/AthenaBaseComps
-			  Control/AthenaKernel
-			  GaudiKernel )	
-
 # External dependencies:
 find_package( Boost )
 find_package( yampl )
diff --git a/Control/AthenaInterprocess/CMakeLists.txt b/Control/AthenaInterprocess/CMakeLists.txt
index 96bae6c96ce529ec3d3b30a62e0e2d6fbeef78ea..930a75e505307e456fbfdf08386a16bd1c3adc1e 100644
--- a/Control/AthenaInterprocess/CMakeLists.txt
+++ b/Control/AthenaInterprocess/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: AthenaInterprocess
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaInterprocess )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-   Control/AthenaKernel
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 find_package( UUID )
diff --git a/Control/AthenaKernel/CMakeLists.txt b/Control/AthenaKernel/CMakeLists.txt
index 0c39c9702932da1b0f1f13c9216790ae20486add..e170a93a179ecf848d0e2606a966d4be243d9155 100644
--- a/Control/AthenaKernel/CMakeLists.txt
+++ b/Control/AthenaKernel/CMakeLists.txt
@@ -1,26 +1,12 @@
-################################################################################
-# Package: AthenaKernel
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaKernel )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/CxxUtils
-   Control/DataModelRoot
-   Control/RootUtils
-   GaudiKernel
-   PRIVATE
-   AtlasTest/TestTools
-   )
-
 # External dependencies:
 find_package( Boost COMPONENTS program_options regex filesystem thread )
-find_package( ROOT COMPONENTS Core )
 find_package( UUID )
-find_package(CLHEP)
+find_package( CLHEP )
 find_package( TBB )
 # Only link agains the RT library if it's available.
 find_library( RT_LIBRARY rt )
@@ -33,12 +19,9 @@ atlas_add_library( AthenaKernel
    AthenaKernel/*.h AthenaKernel/*.icc src/*.cxx
    PUBLIC_HEADERS AthenaKernel
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} 
-   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} ${UUID_LIBRARIES} CxxUtils DataModelRoot
-   RootUtils
-   GaudiKernel ${RT_LIBRARY}
-   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES}
-   ${CMAKE_DL_LIBS} )
+   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${UUID_LIBRARIES} ${RT_LIBRARY} CxxUtils DataModelRoot GaudiKernel
+   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${CMAKE_DL_LIBS} RootUtils )
 
 atlas_add_dictionary( AthenaKernelDict
    AthenaKernel/AthenaKernelDict.h
@@ -120,10 +103,9 @@ atlas_add_test( SlotSpecificObj_test
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( DataBucket_test
-               SOURCES
-               test/DataBucket_test.cxx
-               INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-               LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools )
+   SOURCES
+   test/DataBucket_test.cxx
+   LINK_LIBRARIES AthenaKernel TestTools )
 
 atlas_add_test( RCUUpdater_test
    SOURCES test/RCUUpdater_test.cxx
diff --git a/Control/AthenaMP/CMakeLists.txt b/Control/AthenaMP/CMakeLists.txt
index ff837a4c6d7cbc006ba0923e49609ee6de89ab6b..34973fe9d020ddb4aeec74da72e6bb1ad876a6ad 100644
--- a/Control/AthenaMP/CMakeLists.txt
+++ b/Control/AthenaMP/CMakeLists.txt
@@ -1,36 +1,22 @@
-################################################################################
-# Package: AthenaMP
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaMP )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaInterprocess
-                          Control/AthenaMPTools
-                          Control/StoreGate
-                          GaudiKernel )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Core PyROOT Tree MathCore Hist RIO pthread )
-find_package( Threads )
+find_package( Boost COMPONENTS filesystem )
 
 # Component(s) in the package:
 atlas_add_component( AthenaMP
                      src/*.cxx
                      src/components/*.cxx
                      src/memory-profiler/getPss.cc
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaInterprocess StoreGateLib SGtests AthenaMPToolsLib GaudiKernel )
+                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaInterprocess AthenaMPToolsLib GaudiKernel StoreGateLib )
 
 atlas_add_executable( getSharedMemory
                       src/memory-profiler/getSharedMemory.cc
-                      src/memory-profiler/getPss.cc
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaInterprocess StoreGateLib SGtests GaudiKernel )
+                      src/memory-profiler/getPss.cc )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/tests/*.py )
diff --git a/Control/AthenaMPTools/CMakeLists.txt b/Control/AthenaMPTools/CMakeLists.txt
index ce4f961be109d1dbe3bf5ee1d87e0fbfab9c35c3..dce52da4fede938f3f0c4328d959cdcfa90c4694 100644
--- a/Control/AthenaMPTools/CMakeLists.txt
+++ b/Control/AthenaMPTools/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: AthenaMPTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaMPTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaInterprocess
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( yampl )
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/IMonitorToolBase.h b/Control/AthenaMonitoring/AthenaMonitoring/IMonitorToolBase.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ITriggerTranslatorTool.h b/Control/AthenaMonitoring/AthenaMonitoring/ITriggerTranslatorTool.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/LogFileMsgStream.h b/Control/AthenaMonitoring/AthenaMonitoring/LogFileMsgStream.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolBase.h b/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolBase.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolTest.h b/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolTest.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitorToolBase.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitorToolBase.h
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/CMakeLists.txt b/Control/AthenaMonitoring/CMakeLists.txt
index 0b0be0bfc78e5cda161b7ab93dbaf2947b3e325a..ca5e9b503c19059f04a8e9bf01347a3490abe786 100644
--- a/Control/AthenaMonitoring/CMakeLists.txt
+++ b/Control/AthenaMonitoring/CMakeLists.txt
@@ -1,33 +1,11 @@
-################################################################################
-# Package: AthenaMonitoring
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaMonitoring )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-    PUBLIC
-        Control/AthenaBaseComps
-        Control/AthenaMonitoringKernel
-        LumiBlock/LumiBlockComps
-        LumiBlock/LumiBlockData
-        Trigger/TrigEvent/TrigDecisionInterface
-        Trigger/TrigAnalysis/TrigDecisionTool
-    PRIVATE
-        AtlasTest/TestTools
-        Control/AthenaKernel
-        Control/SGMon/SGAudCore
-        Database/AthenaPOOL/AthenaPoolUtilities
-        Event/EventInfo
-        Tools/LWHists
-        Trigger/TrigAnalysis/TrigAnalysisInterfaces
-        MuonSpectrometer/MuonAlignment/MuonAlignmentData
-)
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Hist )
+find_package( ROOT COMPONENTS Core Hist MathCore )
 find_package( Boost )
 
 # Component(s) in the package:
@@ -42,23 +20,28 @@ atlas_add_library(
         ${Boost_INCLUDE_DIRS}
         ${CORAL_INCLUDE_DIRS}
     LINK_LIBRARIES
-        ${Boost_LIBRARIES}
         ${ROOT_LIBRARIES}
         AthenaBaseComps
         AthenaMonitoringKernelLib
         GaudiKernel
-        LumiBlockCompsLib
         LumiBlockData
-        TrigDecisionToolLib
         TrigAnalysisInterfaces
+        TrigDecisionInterface
+        TrigDecisionToolLib
     PRIVATE_LINK_LIBRARIES
+        ${Boost_LIBRARIES}
         ${CORAL_LIBRARIES}
         AthenaKernel
+        CxxUtils
         SGAudCore
+        StoreGateLib
         AthenaPoolUtilities
         EventInfo
         LWHists
         MuonAlignmentData
+        InDetReadoutGeometry
+        MuonAlignmentData
+        TRT_ReadoutGeometry
 )
 
 atlas_add_component(
@@ -68,11 +51,8 @@ atlas_add_component(
         ${CORAL_INCLUDE_DIRS}
     LINK_LIBRARIES
         AthenaMonitoringLib
-        AthenaMonitoringKernelLib
-        LumiBlockData
         LWHists
         SGAudCore
-        TrigDecisionToolLib
         MuonAlignmentData
 )
 
diff --git a/Control/AthenaMonitoring/python/DQConfigFlags.py b/Control/AthenaMonitoring/python/DQConfigFlags.py
index bf7157de5b3573bc0c4f0522827401d79a61101b..08ce9be8d9a482e6a02983b8fe6450370481ebbb 100644
--- a/Control/AthenaMonitoring/python/DQConfigFlags.py
+++ b/Control/AthenaMonitoring/python/DQConfigFlags.py
@@ -34,9 +34,17 @@ def createDQConfigFlags():
     # temp thing for steering from inside old-style ...
     acf.addFlag('DQ.isReallyOldStyle', False)
 
+    # computed
+    acf.addFlag('DQ.Environment', getEnvironment )
+    acf.addFlag('DQ.DataType', getDataType )
+    
     # steering ...
     for flag in _steeringFlags + _lowLevelSteeringFlags:
-        acf.addFlag('DQ.Steering.' + flag, True)
+        arg = True
+        if flag == 'doJetTagMon':
+            arg = lambda x: x.DQ.DataType != 'cosmics' # noqa: E731
+        acf.addFlag('DQ.Steering.' + flag, arg)
+
     # HLT steering ...
     from PyUtils.moduleExists import moduleExists
     if moduleExists ('TrigHLTMonitoring'):
@@ -44,12 +52,6 @@ def createDQConfigFlags():
         acf.join(createHLTDQConfigFlags())
     return acf
 
-def createComplexDQConfigFlags():
-    acf=AthConfigFlags()
-    acf.addFlag('DQ.Environment', getEnvironment )
-    acf.addFlag('DQ.DataType', getDataType )
-    return acf
-
 def getDataType(flags):
     if flags.Input.isMC:
         return 'monteCarlo'
diff --git a/Control/AthenaMonitoring/src/AthenaMon.cxx b/Control/AthenaMonitoring/src/AthenaMon.cxx
old mode 100755
new mode 100644
index fde82b4bd63511bad60eb3dd8011abef53171572..8de2e1e099c581052852e52dacf5aab6263a62f1
--- a/Control/AthenaMonitoring/src/AthenaMon.cxx
+++ b/Control/AthenaMonitoring/src/AthenaMon.cxx
@@ -17,7 +17,7 @@
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/ListItem.h"
 
-#include "AthenaMonitoring/AthenaMon.h"
+#include "AthenaMon.h"
 
 class ISvcLocator;
 // class AlgFactory;
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMon.h b/Control/AthenaMonitoring/src/AthenaMon.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/AthenaMon.h
rename to Control/AthenaMonitoring/src/AthenaMon.h
diff --git a/Control/AthenaMonitoring/src/AthenaMonManager.cxx b/Control/AthenaMonitoring/src/AthenaMonManager.cxx
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/src/DQBadLBFilterAlg.cxx b/Control/AthenaMonitoring/src/DQBadLBFilterAlg.cxx
index 71a1063f1740cbe1b6403dcd891eda5366933801..431e0c3f1121d21594555a21be337dce5f2790d7 100644
--- a/Control/AthenaMonitoring/src/DQBadLBFilterAlg.cxx
+++ b/Control/AthenaMonitoring/src/DQBadLBFilterAlg.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/DQBadLBFilterAlg.h"
+#include "DQBadLBFilterAlg.h"
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
 #include "AthenaPoolUtilities/AthenaAttributeListSpecification.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/DQBadLBFilterAlg.h b/Control/AthenaMonitoring/src/DQBadLBFilterAlg.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/DQBadLBFilterAlg.h
rename to Control/AthenaMonitoring/src/DQBadLBFilterAlg.h
diff --git a/Control/AthenaMonitoring/src/DQDummyFilterTool.cxx b/Control/AthenaMonitoring/src/DQDummyFilterTool.cxx
index bdd06bf69fe04c54100b1471109093b18f3dd5fa..83cd5f688ddd40f6d2819b2ae6d202b747072367 100644
--- a/Control/AthenaMonitoring/src/DQDummyFilterTool.cxx
+++ b/Control/AthenaMonitoring/src/DQDummyFilterTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/DQDummyFilterTool.h"
+#include "DQDummyFilterTool.h"
 
 DQDummyFilterTool::DQDummyFilterTool(const std::string& type,const std::string& name,const IInterface* parent)
 : AthAlgTool( type, name, parent )
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/DQDummyFilterTool.h b/Control/AthenaMonitoring/src/DQDummyFilterTool.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/DQDummyFilterTool.h
rename to Control/AthenaMonitoring/src/DQDummyFilterTool.h
diff --git a/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx b/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx
index 03c9b000b627c5ff14702caa1e7a959765bdef5a..1a0efb7640700c276d36acf7684a1c5b558366a6 100644
--- a/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx
+++ b/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/DQEventFlagFilterTool.h"
+#include "DQEventFlagFilterTool.h"
 #include "AthenaKernel/errorcheck.h"
 
 DQEventFlagFilterTool::DQEventFlagFilterTool(const std::string& type,const std::string& name,const IInterface* parent)
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/DQEventFlagFilterTool.h b/Control/AthenaMonitoring/src/DQEventFlagFilterTool.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/DQEventFlagFilterTool.h
rename to Control/AthenaMonitoring/src/DQEventFlagFilterTool.h
diff --git a/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx b/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx
index ac43549272bd3a6125404eba20081eeb33a3ed44..533b8d022b84b178928d1130a90c90758b602f41 100644
--- a/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx
+++ b/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/DQFilledBunchFilterTool.h"
+#include "DQFilledBunchFilterTool.h"
 #include "AthenaKernel/errorcheck.h"
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/DQFilledBunchFilterTool.h b/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/DQFilledBunchFilterTool.h
rename to Control/AthenaMonitoring/src/DQFilledBunchFilterTool.h
diff --git a/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx
index dbd137d514154bab4189d8f47808432b25b0c343..bb5f2a98b66a9d4748c8c03bea1c770412a9eabc 100644
--- a/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx
+++ b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/ExampleMonitorAlgorithm.h"
+#include "ExampleMonitorAlgorithm.h"
 
 ExampleMonitorAlgorithm::ExampleMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
 :AthMonitorAlgorithm(name,pSvcLocator)
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ExampleMonitorAlgorithm.h b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/ExampleMonitorAlgorithm.h
rename to Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.h
diff --git a/Control/AthenaMonitoring/src/FastPhysMonToolBase.cxx b/Control/AthenaMonitoring/src/FastPhysMonToolBase.cxx
index 37c591ef1e6b02d7f077bde5aa16fe8774c91e0b..5a301c3015ea1e28a1eb6952f55c51ace5c2207e 100644
--- a/Control/AthenaMonitoring/src/FastPhysMonToolBase.cxx
+++ b/Control/AthenaMonitoring/src/FastPhysMonToolBase.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/FastPhysMonToolBase.h"
+#include "FastPhysMonToolBase.h"
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "EventInfo/EventInfo.h"
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/FastPhysMonToolBase.h b/Control/AthenaMonitoring/src/FastPhysMonToolBase.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/FastPhysMonToolBase.h
rename to Control/AthenaMonitoring/src/FastPhysMonToolBase.h
diff --git a/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx b/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/src/ManagedMonitorToolTest.cxx b/Control/AthenaMonitoring/src/ManagedMonitorToolTest.cxx
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/src/MonitorToolBase.cxx b/Control/AthenaMonitoring/src/MonitorToolBase.cxx
old mode 100755
new mode 100644
diff --git a/Control/AthenaMonitoring/src/TriggerTranslatorSimple.cxx b/Control/AthenaMonitoring/src/TriggerTranslatorSimple.cxx
index 547bc2c877c7b076d6a35ee232786a5f945a1aa4..89b316b601925b62f250f30ce7a7f0e5a8f11572 100644
--- a/Control/AthenaMonitoring/src/TriggerTranslatorSimple.cxx
+++ b/Control/AthenaMonitoring/src/TriggerTranslatorSimple.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/TriggerTranslatorSimple.h"
+#include "TriggerTranslatorSimple.h"
 #include "boost/algorithm/string/split.hpp"
 #include "boost/algorithm/string/classification.hpp"
 
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/TriggerTranslatorSimple.h b/Control/AthenaMonitoring/src/TriggerTranslatorSimple.h
similarity index 100%
rename from Control/AthenaMonitoring/AthenaMonitoring/TriggerTranslatorSimple.h
rename to Control/AthenaMonitoring/src/TriggerTranslatorSimple.h
diff --git a/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx b/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx
index a8158c190faeb99204172e5bfdffe35b52a6fd03..e56d94b55642596d31a47744f8d5868a2e1bc70b 100644
--- a/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx
+++ b/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx
@@ -2,17 +2,17 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaMonitoring/AthenaMon.h"
+#include "../AthenaMon.h"
 #include "AthenaMonitoring/AthenaMonManager.h"
 #include "AthenaMonitoring/ManagedMonitorToolTest.h"
 #include "AthenaMonitoring/DQAtlasReadyFilterTool.h"
-#include "AthenaMonitoring/DQFilledBunchFilterTool.h"
-#include "AthenaMonitoring/DQEventFlagFilterTool.h"
-#include "AthenaMonitoring/DQDummyFilterTool.h"
+#include "../DQFilledBunchFilterTool.h"
+#include "../DQEventFlagFilterTool.h"
+#include "../DQDummyFilterTool.h"
 #include "AthenaMonitoring/DQBadLBFilterTool.h"
-#include "AthenaMonitoring/DQBadLBFilterAlg.h"
-#include "AthenaMonitoring/TriggerTranslatorSimple.h"
-#include "AthenaMonitoring/ExampleMonitorAlgorithm.h"
+#include "../DQBadLBFilterAlg.h"
+#include "../TriggerTranslatorSimple.h"
+#include "../ExampleMonitorAlgorithm.h"
 #include "../ForceIDConditionsAlg.h"
 #include "../ForceMSConditionsAlg.h"
 
diff --git a/Control/AthenaMonitoring/test/test_run3dq_r22_esd_cosmics.sh b/Control/AthenaMonitoring/test/test_run3dq_r22_esd_cosmics.sh
new file mode 100755
index 0000000000000000000000000000000000000000..e329e982014bfa0a3d4e26f9c2d83ca47ff65a3c
--- /dev/null
+++ b/Control/AthenaMonitoring/test/test_run3dq_r22_esd_cosmics.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# art-description: ESD->HIST, R22 cosmics data ESD
+# art-type: grid
+# art-memory: 3072
+# art-include: master/Athena
+# art-output: ExampleMonitorOutput.root
+# art-output: log*
+
+art.py download Tier0ChainTests test_q220.sh
+ESDFILE=(./ref-*/myESD.pool.root)
+Run3DQTestingDriver.py 'Input.Files=["'${ESDFILE}'"]' DQ.Steering.doHLTMon=False > log.HIST_Creation 2>&1
+
+echo "art-result: $? HIST_Creation"
+rm -rf ref-*
+
+ArtPackage=$1
+ArtJobName=$2
+art.py download ${ArtPackage} ${ArtJobName}
+REFFILE=(./ref-*/ExampleMonitorOutput.root)
+hist_diff.sh ExampleMonitorOutput.root $REFFILE -x TIME_execute -i > log.HIST_Diff 2>&1
+echo "art-result: $? HIST_Diff"
diff --git a/Control/AthenaMonitoringKernel/share/GenericMon.txt b/Control/AthenaMonitoringKernel/share/GenericMon.txt
index c0d05d2cec80818f46bf7f5c7599205c7a49713d..84e46740614e87d9af006749ba00b78a6c4f9cdd 100644
--- a/Control/AthenaMonitoringKernel/share/GenericMon.txt
+++ b/Control/AthenaMonitoringKernel/share/GenericMon.txt
@@ -1,7 +1,7 @@
 // -*- C -*-
 // startup script for GenericMonTool tests
 
-ApplicationMgr.DLLs += { "StoreGate", "AthenaMonitoringKernel" };
+ApplicationMgr.Dlls += { "StoreGate", "AthenaMonitoringKernel" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore" };
 ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
diff --git a/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt b/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt
index 9fe26a0cb394d670a057a0b21d69ce1b0fc2cd74..fbd796536063787b9676d029f172aaf29c832b9d 100644
--- a/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt
+++ b/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt
@@ -1,7 +1,7 @@
 // -*- C -*-
 // startup script for GenericMonTool tests
 
-ApplicationMgr.DLLs += { "StoreGate", "AthenaMonitoringKernel" };
+ApplicationMgr.Dlls += { "StoreGate", "AthenaMonitoringKernel" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore" };
 ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
diff --git a/Control/AthenaPython/CMakeLists.txt b/Control/AthenaPython/CMakeLists.txt
index 7f2e1eff24ad5e82f28ec3e192d6a32c7ec0a22a..222c1fc684cc30d272a99731ad1275b0dfa9617c 100644
--- a/Control/AthenaPython/CMakeLists.txt
+++ b/Control/AthenaPython/CMakeLists.txt
@@ -1,23 +1,11 @@
-################################################################################
-# Package: AthenaPython
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaPython )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          PRIVATE
-                          Control/RootUtils
-                          Control/DataModelRoot )
-
 # External dependencies:
 find_package( Python COMPONENTS Development )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread PyROOT )
+find_package( ROOT COMPONENTS Core PyROOT )
 
 # Component(s) in the package:
 atlas_add_library( AthenaPython
@@ -25,18 +13,16 @@ atlas_add_library( AthenaPython
                    PUBLIC_HEADERS AthenaPython
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}
                    LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Python_LIBRARIES} CxxUtils DataModelRoot )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Python_LIBRARIES} CxxUtils DataModelRoot RootUtils )
 
 atlas_add_component( AthenaPythonComps
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}
                      LINK_LIBRARIES AthenaPython )
 
 atlas_add_dictionary( AthenaPythonDict
                       AthenaPython/AthenaPythonDict.h
                       AthenaPython/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Python_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel CxxUtils DataModelRoot AthenaPython )
+                      LINK_LIBRARIES AthenaPython )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/tests
diff --git a/Control/AthenaServices/CMakeLists.txt b/Control/AthenaServices/CMakeLists.txt
index f4db16f2b5439c81d8c61d05c298437ef53827e3..0ff3c5f1a5fa2875dbfedbac6e914d902ddeec8d 100644
--- a/Control/AthenaServices/CMakeLists.txt
+++ b/Control/AthenaServices/CMakeLists.txt
@@ -1,34 +1,8 @@
-################################################################################
-# Package: AthenaServices
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaServices )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthToolSupport/AsgTools
-   AtlasTest/TestTools
-   Control/AthContainersInterfaces
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/RootUtils
-   Control/CxxUtils
-   Control/AthContainers
-   Control/DataModelRoot
-   Control/Navigation
-   Control/PerformanceMonitoring/PerfMonEvent
-   Control/PerformanceMonitoring/PerfMonKernel
-   Control/RngComps
-   Control/SGTools
-   Control/StoreGate
-   Database/PersistentDataModel
-   Event/EventInfo
-   Event/xAOD/xAODEventInfo
-   Event/EventInfoUtils
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost COMPONENTS thread )
 find_package( CLHEP )
@@ -41,7 +15,7 @@ atlas_add_component( AthenaServices src/*.cxx src/components/*.cxx
    ${CLHEP_INCLUDE_DIRS} ${YAMPL_INCLUDE_DIRS}
    LINK_LIBRARIES ${Boost_LIBRARIES} ${Python_LIBRARIES} ${YAMPL_LIBRARIES}
    ${CLHEP_LIBRARIES} z TestTools AsgTools AthenaBaseComps AthenaKernel RootUtils CxxUtils
-   AthContainers DataModelRoot Navigation PerfMonEvent PerfMonKernel SGTools
+   AthContainers AthContainersInterfaces DataModelRoot Navigation PerfMonEvent PerfMonKernel SGTools
    StoreGateLib SGtests PersistentDataModel EventInfo xAODEventInfo EventInfoUtils GaudiKernel )
 
 # Test library checking the ability to build T/P converters:
diff --git a/Control/AthenaServices/share/AtDSFMT_test.txt b/Control/AthenaServices/share/AtDSFMT_test.txt
index 0ae90be83740d491849cd205500a3be8d71bb398..f7eba831962ffea473cf4ec07182e04e331841a6 100644
--- a/Control/AthenaServices/share/AtDSFMT_test.txt
+++ b/Control/AthenaServices/share/AtDSFMT_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: AtDSFMT_test.txt,v 1.2 2007-06-24 05:37:15 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "AtDSFMTGenSvc", "AtDSFMTGenSvc/AtDSFMTGenSvc2", "AtDSFMTGenSvc/AtDSFMTGenSvc3"  };
 ApplicationMgr.ExtSvcCreates = false;
 
diff --git a/Control/AthenaServices/share/AtRanlux_test.ref b/Control/AthenaServices/share/AtRanlux_test.ref
index dff59b8bf39f6bcf732c4624f4007455949dee68..0352f50b5560a5f8aa7d8f8b39012637b3bf0fd1 100644
--- a/Control/AthenaServices/share/AtRanlux_test.ref
+++ b/Control/AthenaServices/share/AtRanlux_test.ref
@@ -4,7 +4,7 @@ Initializing Gaudi ApplicationMgr using job opts ../share/AtRanlux_test.txt
 JobOptionsSvc        INFO 
 //GP:================================================================================
 //GP: include "../share/AtRanlux_test.txt"                                    (0,0)
-ApplicationMgr.DLLs +=  [ "AthenaServices" ] ;                          //GP: (1,1)
+ApplicationMgr.Dlls +=  [ "AthenaServices" ] ;                          //GP: (1,1)
 ApplicationMgr.ExtSvc +=  [ "AtRanluxGenSvc" , "AtRanluxGenSvc/AtRanluxGenSvc2" , "AtRanluxGenSvc/AtRanluxGenSvc3" ] ;//GP: (1,1)
 ApplicationMgr.ExtSvcCreates = 0;                                       //GP: (1,1)
 MessageSvc.OutputLevel = 2;                                             //GP: (1,1)
diff --git a/Control/AthenaServices/share/AtRanlux_test.txt b/Control/AthenaServices/share/AtRanlux_test.txt
index 1bdb8a414f37b02f8051e355ba1452fbc164047f..bd3dcb31ba8dd343c5c8e3341088c81095a8b42e 100644
--- a/Control/AthenaServices/share/AtRanlux_test.txt
+++ b/Control/AthenaServices/share/AtRanlux_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: AtRanlux_test.txt,v 1.2 2007-06-24 05:37:15 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "AtRanluxGenSvc", "AtRanluxGenSvc/AtRanluxGenSvc2", "AtRanluxGenSvc/AtRanluxGenSvc3"  };
 ApplicationMgr.ExtSvcCreates = false;
 
diff --git a/Control/AthenaServices/share/AtRndmGen_test.ref b/Control/AthenaServices/share/AtRndmGen_test.ref
index c58c2e863b3fd9c2ce97c3ac55f79124a592c90d..8ed35afecb2dfee18548c1c34259420a9c48547e 100644
--- a/Control/AthenaServices/share/AtRndmGen_test.ref
+++ b/Control/AthenaServices/share/AtRndmGen_test.ref
@@ -4,7 +4,7 @@ Initializing Gaudi ApplicationMgr using job opts ../share/AtRndmGen_test.txt
 JobOptionsSvc        INFO 
 //GP:================================================================================
 //GP: include "../share/AtRndmGen_test.txt"                                   (0,0)
-ApplicationMgr.DLLs +=  [ "AthenaServices" ] ;                          //GP: (1,1)
+ApplicationMgr.Dlls +=  [ "AthenaServices" ] ;                          //GP: (1,1)
 ApplicationMgr.ExtSvc +=  [ "AtRndmGenSvc" , "AtRndmGenSvc/AtRndmGenSvc2" , "AtRndmGenSvc/AtRndmGenSvc3" ] ;//GP: (1,1)
 ApplicationMgr.ExtSvcCreates = 0;                                       //GP: (1,1)
 MessageSvc.OutputLevel = 2;                                             //GP: (1,1)
diff --git a/Control/AthenaServices/share/AtRndmGen_test.txt b/Control/AthenaServices/share/AtRndmGen_test.txt
index d839d74c1ea418741914838169868c02a5b23315..3e81463c51fb33137e7a11709add7f0fc2f68c41 100644
--- a/Control/AthenaServices/share/AtRndmGen_test.txt
+++ b/Control/AthenaServices/share/AtRndmGen_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: AtRndmGen_test.txt,v 1.2 2002-11-27 23:29:41 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 
 ApplicationMgr.ExtSvc += { "AtRndmGenSvc", "AtRndmGenSvc/AtRndmGenSvc2", "AtRndmGenSvc/AtRndmGenSvc3"  };
 ApplicationMgr.ExtSvcCreates = false;
diff --git a/Control/AthenaServices/share/AthDictLoaderSvc.ref b/Control/AthenaServices/share/AthDictLoaderSvc.ref
index bf7ba0ac76f36e0a7f2164038faf35bd4bbc9c14..23a45a59381a26cd6e5857ebcd1b91a436a8e52e 100644
--- a/Control/AthenaServices/share/AthDictLoaderSvc.ref
+++ b/Control/AthenaServices/share/AthDictLoaderSvc.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3361 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/AthenaServices/share/AthTPCnvSvc.ref b/Control/AthenaServices/share/AthTPCnvSvc.ref
index 9717790050a9e6b8ec5a48ed37d1a58957a36784..2d8416a38361f7b64e6f89a12dce62a6198587ac 100644
--- a/Control/AthenaServices/share/AthTPCnvSvc.ref
+++ b/Control/AthenaServices/share/AthTPCnvSvc.ref
@@ -20,7 +20,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3361 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ApplicationMgr       INFO Application Manager Initialized successfully
diff --git a/Control/AthenaServices/share/AthenaEventLoopMgr_test.ref b/Control/AthenaServices/share/AthenaEventLoopMgr_test.ref
index fd38e430c3ff5d6c4e3db107b3566193b76adfd0..c85d4bf1b8dfa8237cabcfd049dca171356dce32 100644
--- a/Control/AthenaServices/share/AthenaEventLoopMgr_test.ref
+++ b/Control/AthenaServices/share/AthenaEventLoopMgr_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/AthenaEventLoopMgr_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/AthenaEventLoopMgr_test.txt
-JobOptionsSvc        INFO # (5,1): ApplicationMgr.DLLs += ["AthenaServices"]
+JobOptionsSvc        INFO # (5,1): ApplicationMgr.Dlls += ["AthenaServices"]
 JobOptionsSvc        INFO # (6,1): ApplicationMgr.ExtSvc += ["AthenaEventLoopMgr/AthenaEventLoopMgr1"]
 JobOptionsSvc        INFO # (7,1): ApplicationMgr.ExtSvc += ["AthenaEventLoopMgr/AthenaEventLoopMgr2"]
 JobOptionsSvc        INFO # (8,1): ApplicationMgr.ExtSvc += ["TestEvtSelector"]
diff --git a/Control/AthenaServices/share/AthenaEventLoopMgr_test.txt b/Control/AthenaServices/share/AthenaEventLoopMgr_test.txt
index 4dc0801890d895c38d78e130afc0606253ae7666..544faaaaf3d4cdd5466bfdd2f86513afe5c70369 100644
--- a/Control/AthenaServices/share/AthenaEventLoopMgr_test.txt
+++ b/Control/AthenaServices/share/AthenaEventLoopMgr_test.txt
@@ -2,7 +2,7 @@
 
 // $Id$
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "AthenaEventLoopMgr/AthenaEventLoopMgr1" };
 ApplicationMgr.ExtSvc += { "AthenaEventLoopMgr/AthenaEventLoopMgr2" };
 ApplicationMgr.ExtSvc += { "TestEvtSelector" };
diff --git a/Control/AthenaServices/share/ConditionsCleanerSvc_test.ref b/Control/AthenaServices/share/ConditionsCleanerSvc_test.ref
index 44b11296bdca45151b065a84e61e26c4b3462af3..59906d837c8e012395e4d57667a54a3344f5e7a0 100644
--- a/Control/AthenaServices/share/ConditionsCleanerSvc_test.ref
+++ b/Control/AthenaServices/share/ConditionsCleanerSvc_test.ref
@@ -3,7 +3,7 @@ ConditionsCleanerSvc_test
 
 Initializing Gaudi ApplicationMgr using job opts ../share/ConditionsCleanerSvc_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/ConditionsCleanerSvc_test.txt
-JobOptionsSvc        INFO # (5,1): ApplicationMgr.DLLs += ["AthenaServices"]
+JobOptionsSvc        INFO # (5,1): ApplicationMgr.Dlls += ["AthenaServices"]
 JobOptionsSvc        INFO # (6,1): ApplicationMgr.ExtSvc += ["Athena::ConditionsCleanerSvc/ConditionsCleanerSvc1"]
 JobOptionsSvc        INFO # (7,1): ApplicationMgr.ExtSvc += ["Athena::ConditionsCleanerSvc/ConditionsCleanerSvc2"]
 JobOptionsSvc        INFO # (8,1): ConditionsCleanerSvc2.CleanerSvc = "ConditionsCleanerTest"
diff --git a/Control/AthenaServices/share/ConditionsCleanerSvc_test.txt b/Control/AthenaServices/share/ConditionsCleanerSvc_test.txt
index cd930ce9f695ceff7c91c19a9426d64aa3b4b79f..d6fe14618a0428e20e6bff71e59e2dbec645738a 100644
--- a/Control/AthenaServices/share/ConditionsCleanerSvc_test.txt
+++ b/Control/AthenaServices/share/ConditionsCleanerSvc_test.txt
@@ -2,7 +2,7 @@
 
 // $Id$
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "Athena::ConditionsCleanerSvc/ConditionsCleanerSvc1" };
 ApplicationMgr.ExtSvc += { "Athena::ConditionsCleanerSvc/ConditionsCleanerSvc2" };
 ConditionsCleanerSvc2.CleanerSvc = "ConditionsCleanerTest";
diff --git a/Control/AthenaServices/share/FPEControlSvc_test.ref b/Control/AthenaServices/share/FPEControlSvc_test.ref
index 390c5f6f4b650520e6c5c567f4f61e5a2cec015f..f7b1bcefc261dd8e900c6c9a4067676ae11d7ef1 100644
--- a/Control/AthenaServices/share/FPEControlSvc_test.ref
+++ b/Control/AthenaServices/share/FPEControlSvc_test.ref
@@ -3,7 +3,7 @@
 Initializing Gaudi ApplicationMgr using job opts ../share/FPEControlSvc_test.txt
 /cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 16, which is not a valid value for type 'bool'
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/AthenaServices/share/../share/FPEControlSvc_test.txt
-JobOptionsSvc        INFO # (5,1): ApplicationMgr.DLLs += ["AthenaServices"]
+JobOptionsSvc        INFO # (5,1): ApplicationMgr.Dlls += ["AthenaServices"]
 JobOptionsSvc        INFO # (6,1): ApplicationMgr.ExtSvc += ["FPEControlSvc"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/FPEControlSvc_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Control/AthenaServices/share/FPEControlSvc_test.txt b/Control/AthenaServices/share/FPEControlSvc_test.txt
index 852a3a8c8ade26d5c590138097937a31f2adb56e..ea960fbfb1867b77850ea206b75e46136867198d 100644
--- a/Control/AthenaServices/share/FPEControlSvc_test.txt
+++ b/Control/AthenaServices/share/FPEControlSvc_test.txt
@@ -2,5 +2,5 @@
 
 // $Id: FPEControlSvc_test.txt,v 1.1 2007-11-09 05:05:09 ssnyder Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "FPEControlSvc" };
diff --git a/Control/AthenaServices/share/MixingEventSelector_test.txt b/Control/AthenaServices/share/MixingEventSelector_test.txt
index 978d15e924cb34dd7d3b2d7b63077e7ee757ba11..359e05b43fd2cc656d33f6f2cc5763fc43b2682a 100644
--- a/Control/AthenaServices/share/MixingEventSelector_test.txt
+++ b/Control/AthenaServices/share/MixingEventSelector_test.txt
@@ -6,13 +6,13 @@
 
 #include "AthenaCommon/Atlas.UnixStandardJob.txt"
 
-ApplicationMgr.DLLs   += {  "PoolSvc", 
+ApplicationMgr.Dlls   += {  "PoolSvc", 
                             "AthenaPoolCnvSvc", "EventSelectorAthenaPool"
                          };
 
 EventPersistencySvc.CnvServices     += { "AthenaPoolCnvSvc" };
 
-ApplicationMgr.DLLs += { "McEventSelector" };
+ApplicationMgr.Dlls += { "McEventSelector" };
 
 
 #include "AthenaSealSvc/AthenaSealSvc_joboptions.txt"
@@ -21,7 +21,7 @@ ApplicationMgr.DLLs += { "McEventSelector" };
 #include "EventAthenaPool/EventAthenaPool_joboptions.txt"
 #include "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.txt"
 #include "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.txt"
-ApplicationMgr.DLLs += { "AthenaPoolCnvSvcPoolCnv" };
+ApplicationMgr.Dlls += { "AthenaPoolCnvSvcPoolCnv" };
 //--------------------------------------------------------------
 // Event related parameters
 //--------------------------------------------------------------
@@ -95,8 +95,8 @@ Stream1.OutputLevel = 2;
 //
 // write out a summary of the time spent
 //
-ApplicationMgr.DLLs += { "GaudiAud" };
+ApplicationMgr.Dlls += { "GaudiAud" };
 AuditorSvc.Auditors  += { "ChronoAuditor"};
 
-ApplicationMgr.DLLs   += { "TruthExamples" };
+ApplicationMgr.Dlls   += { "TruthExamples" };
 //ApplicationMgr.TopAlg += { "DumpMC" };
diff --git a/Control/AthenaServices/share/SimplePOSIXTimeKeeperOptions.txt b/Control/AthenaServices/share/SimplePOSIXTimeKeeperOptions.txt
index ff9f3d21d2e8437940beaa92284ddd6765fc97b5..966e911abfbba8e07994e6e5df27cc9fb643560c 100644
--- a/Control/AthenaServices/share/SimplePOSIXTimeKeeperOptions.txt
+++ b/Control/AthenaServices/share/SimplePOSIXTimeKeeperOptions.txt
@@ -2,5 +2,5 @@
 
 // $Id: SimplePOSIXTimeKeeperOptions.txt,v 1.1 2004-01-08 02:21:03 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "SimplePOSIXTimeKeeperSvc" };
diff --git a/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref b/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref
index 4c1356f0733494fa48e55940c3138c4417da15af..58e5f63aa2f1290687473a7c10b295d0f4b8253a 100644
--- a/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref
+++ b/Control/AthenaServices/share/SimplePOSIXTimeKeeperSvc.ref
@@ -25,7 +25,6 @@ SimplePOSIXTime...   INFO Initializing SimplePOSIXTimeKeeperSvc - package versio
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3733 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ApplicationMgr       INFO Application Manager Initialized successfully
diff --git a/Control/AthenaServices/share/TestStopRun.ref b/Control/AthenaServices/share/TestStopRun.ref
index b82c7a1bb534e97827f8b3e127c89775f52a9f49..5037afbd9a45740e28f556fb9b055423699b51dc 100644
--- a/Control/AthenaServices/share/TestStopRun.ref
+++ b/Control/AthenaServices/share/TestStopRun.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3361 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ApplicationMgr       INFO Application Manager Initialized successfully
diff --git a/Control/AthenaServices/src/ThinningCacheTool.cxx b/Control/AthenaServices/src/ThinningCacheTool.cxx
index ef17ecb19b2785beeaa669da023564fd89dec588..2f9377662934bf900a0a55852c6033bcc7b8c8f9 100644
--- a/Control/AthenaServices/src/ThinningCacheTool.cxx
+++ b/Control/AthenaServices/src/ThinningCacheTool.cxx
@@ -59,6 +59,12 @@ StatusCode ThinningCacheTool::preStream()
 {
   m_cache.clear();
 
+  // Nothing to do if we don't have an extended event context.
+  EventContext ctx = Gaudi::Hive::currentContext();
+  if (!Atlas::hasExtendedEventContext (ctx)) {
+    return StatusCode::SUCCESS;
+  }
+
   // Examine all ThinningDecision objects in the store.
   SG::ConstIterator<SG::ThinningDecision> beg;
   SG::ConstIterator<SG::ThinningDecision> end;
@@ -98,7 +104,6 @@ StatusCode ThinningCacheTool::preStream()
   // in the EventContext.
   if (!m_cache.empty() || m_cache.trigNavigationThinningSvc()) {
     m_cache.lockOwned();
-    EventContext ctx = Gaudi::Hive::currentContext();
     Atlas::getExtendedEventContext (ctx).setThinningCache (&m_cache);
     Gaudi::Hive::setCurrentContext (ctx);
   }
diff --git a/Control/CLIDComps/CMakeLists.txt b/Control/CLIDComps/CMakeLists.txt
index 9c9dd0d9b7d9718112a729d7a5b04fb21694a61a..4fde0c3de3c78989e3b76d79a82a7dccb17d7824 100644
--- a/Control/CLIDComps/CMakeLists.txt
+++ b/Control/CLIDComps/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: CLIDComps
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CLIDComps )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthenaKernel
-   AtlasTest/TestTools
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost COMPONENTS program_options )
 
@@ -20,7 +11,7 @@ atlas_add_component( CLIDComps
    src/*.h src/*.cxx src/components/*.cxx
    NOCLIDDB
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel GaudiKernel )
+   LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel CxxUtils GaudiKernel )
 
 # Executable(s) in the package:
 atlas_add_executable( genCLIDDB
diff --git a/Control/CoWTools/CMakeLists.txt b/Control/CoWTools/CMakeLists.txt
index e50e862715c6afbfe9e58c3c6bd62cfab23162d4..70b27fe1c5072d250180590d71171d73c3f7eba8 100644
--- a/Control/CoWTools/CMakeLists.txt
+++ b/Control/CoWTools/CMakeLists.txt
@@ -1,15 +1,8 @@
-# $Id: CMakeLists.txt 739580 2016-04-12 07:51:11Z krasznaa $
-################################################################################
-# Package: CoWTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CoWTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( CoWTools
    CoWTools/*.h src/*.cxx
diff --git a/Control/CxxUtils/CMakeLists.txt b/Control/CxxUtils/CMakeLists.txt
index 77a10b423aa03accc96a9ee1299acfcaa378845b..c585cbf5741a87da9a2041e5523aaffceb147df6 100644
--- a/Control/CxxUtils/CMakeLists.txt
+++ b/Control/CxxUtils/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: CxxUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CxxUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE AtlasTest/TestTools )
-
 # External dependencies:
 find_package( Boost COMPONENTS program_options regex filesystem thread system timer unit_test_framework )
 find_package( TBB )
@@ -123,7 +117,6 @@ endforeach()
 # Needed because this executable directly uses multiversioned functions.
 set_property( TARGET CxxUtils_crc64_test PROPERTY POSITION_INDEPENDENT_CODE ON )
 
-
 # If we are in release rebuilding mode, stop here:
 if( ATLAS_RELEASE_MODE )
    return()
diff --git a/Control/CxxUtils/CxxUtils/features.h b/Control/CxxUtils/CxxUtils/features.h
index 94d4e915e0e889764eebac21b9ebf64ef9c2c36a..dcd5c1b86a22810e1ecec4a51084331c95c67e9f 100644
--- a/Control/CxxUtils/CxxUtils/features.h
+++ b/Control/CxxUtils/CxxUtils/features.h
@@ -11,33 +11,34 @@
  * @brief Some additional feature test macros.
  */
 
-
 #ifndef CXXUTILS_FEATURES_H
 #define CXXUTILS_FEATURES_H
 
-
-/// Do we have function multiversioning  GCC and Clang > 7 support __attribute__ target
-#if defined(__ELF__) && defined(__GNUC__) && !defined(__CLING__) && !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
+/// Do we have function multiversioning?  GCC and clang > 7 support
+/// the target attribute
+#if defined(__ELF__) && defined(__GNUC__) && !defined(__CLING__) &&            \
+  !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
 # define HAVE_FUNCTION_MULTIVERSIONING 1
 #else
 # define HAVE_FUNCTION_MULTIVERSIONING 0
 #endif
 
-/// Do we have the target_clones attribute?  Clang 9 does not.
-#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
+/// Do we have the target_clones attribute?  clang  does not support it
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) &&             \
+  !defined(__COVERITY__) && !defined(__CUDACC__)
 # define HAVE_TARGET_CLONES 1
 #else
 # define HAVE_TARGET_CLONES 0
 #endif
 
-/// Do we have function multiversioning supporting all GCC extensions
-#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
+/// Do we have support for all GCC intrinsics?
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) &&             \
+  !defined(__COVERITY__) && !defined(__CUDACC__)
 # define HAVE_GCC_INTRINSICS 1
 #else
 # define HAVE_GCC_INTRINSICS 0
 #endif
 
-
 /// Do we have the bit-counting intrinsics?
 // __builtin_ctz
 // __builtin_ctzl
@@ -54,14 +55,13 @@
 # define HAVE_BITCOUNT_INTRINSICS 0
 #endif
 
-
 // Do we have the vector_size attribute for writing explicitly
 // vectorized code?
-#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ICC) && !defined(__COVERITY__) && !defined(__CUDACC__)
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ICC) &&            \
+  !defined(__COVERITY__) && !defined(__CUDACC__)
 # define HAVE_VECTOR_SIZE_ATTRIBUTE 1
 #else
 # define HAVE_VECTOR_SIZE_ATTRIBUTE 0
 #endif
 
-
 #endif // not CXXUTILS_FEATURES_H
diff --git a/Control/CxxUtils/CxxUtils/vectorize.h b/Control/CxxUtils/CxxUtils/vectorize.h
index eb32777845ee527a71bc4aad14e52a27a2f8fb06..987dd8ca9de2851dfef755f46f78fc5249c6cbcd 100644
--- a/Control/CxxUtils/CxxUtils/vectorize.h
+++ b/Control/CxxUtils/CxxUtils/vectorize.h
@@ -9,20 +9,35 @@
  * @brief Helper to enable auto-vectorization.
  *
  * Athena is usually built with -O2, which doesn't fully enable
- * autovectorization.  Add ATH_ENABLE_VECTORIZATION; at the start
- * of a compilation unit to enable it for this file..
+ * autovectorization in gcc (it does in clang).
+ *
+ * Add
+ * ATH_ENABLE_VECTORIZATION;
+ * at the start of a compilation unit
+ * to enable it for this file.
+ *
+ * Add
+ * ATH_ENABLE_FUNCTION_VECTORIZATION
+ * before a function to enable it for just
+ * this function
  */
 
-
 #ifndef CXXUTILS_VECTORIZE_H
 #define CXXUTILS_VECTORIZE_H
 
-
-#if defined(__GNUC__) && !defined(__clang__)
-# define ATH_ENABLE_VECTORIZATION _Pragma ("GCC optimize (\"tree-vectorize\")") \
-    class ATH_ENABLE_VECTORIZATION_SWALLOW_SEMICOLON
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__COVERITY__) &&  \
+  !defined(__CUDACC__)
+# define ATH_ENABLE_VECTORIZATION                                                              \
+  _Pragma("GCC optimize (\"tree-vectorize\")") class ATH_ENABLE_VECTORIZATION_SWALLOW_SEMICOLON
 #else
 # define ATH_ENABLE_VECTORIZATION class ATH_ENABLE_VECTORIZATION_SWALLOW_SEMICOLON
 #endif
 
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__COVERITY__) &&  \
+  !defined(__CUDACC__)
+# define ATH_ENABLE_FUNCTION_VECTORIZATION __attribute__((optimize("tree-vectorize")))
+#else
+# define ATH_ENABLE_FUNCTION_VECTORIZATION
+#endif
+
 #endif // not CXXUTILS_VECTORIZE_H
diff --git a/Control/DataModelAthenaPool/CMakeLists.txt b/Control/DataModelAthenaPool/CMakeLists.txt
index e09566b6213c3b7c24fefde2524598024db5856a..19e155bd76f4c48cd27e9c733c0c006a39f3d9fd 100644
--- a/Control/DataModelAthenaPool/CMakeLists.txt
+++ b/Control/DataModelAthenaPool/CMakeLists.txt
@@ -1,29 +1,11 @@
-################################################################################
-# Package: DataModelAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/Navigation
-                          Control/RootUtils
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/SGTools
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AthenaPOOL/RootConversions )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core RIO )
 
 # Component(s) in the package:
 atlas_add_library( DataModelAthenaPoolLib
@@ -31,70 +13,36 @@ atlas_add_library( DataModelAthenaPoolLib
                    PUBLIC_HEADERS DataModelAthenaPool
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils GaudiKernel RootUtilsPyROOT AthenaPoolCnvSvcLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools SGTools AthenaPoolUtilities RootConversions )
+                   LINK_LIBRARIES AthLinks AthenaBaseComps AthenaKernel AthenaPoolCnvSvcLib GaudiKernel Navigation RootUtils
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers RootConversions )
 
 atlas_add_component( DataModelAthenaPool
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                      LINK_LIBRARIES DataModelAthenaPoolLib )
 
 atlas_add_dictionary( DataModelAthenaPoolDictDict
                       DataModelAthenaPool/DataModelAthenaPoolDict.h
                       DataModelAthenaPool/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( DataLink_p2_test
-                SOURCES
-                test/DataLink_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( ElementLinkCnv_p1_test
-                SOURCES
-                test/ElementLinkCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( ElementLinkCnv_p2_test
-                SOURCES
-                test/ElementLinkCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( ElementLinkCnv_p3_test
-                SOURCES
-                test/ElementLinkCnv_p3_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( NavigableCnv_p1_test
-                SOURCES
-                test/NavigableCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( NavigableCnv_p2_test
-                SOURCES
-                test/NavigableCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( ElementLinkVectorCnv_p1_test
-                SOURCES
-                test/ElementLinkVectorCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
-
-atlas_add_test( VectorElementLinkCnv_p1_test
-                SOURCES
-                test/VectorElementLinkCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel Navigation RootUtils RootUtilsPyROOT GaudiKernel TestTools SGTools AthenaPoolCnvSvcLib AthenaPoolUtilities RootConversions DataModelAthenaPoolLib )
+                      LINK_LIBRARIES DataModelAthenaPoolLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py
-                              POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/DataModelAthenaPool_jobOptions.py )
 
+# Tests in the package:
+function( _add_test name )
+   atlas_add_test( ${name}
+                   SOURCES
+                   test/${name}.cxx
+                   LINK_LIBRARIES DataModelAthenaPoolLib SGTools )
+endfunction( _add_test )
+
+_add_test( DataLink_p2_test )
+_add_test( ElementLinkCnv_p1_test )
+_add_test( ElementLinkCnv_p2_test )
+_add_test( ElementLinkCnv_p3_test )
+_add_test( NavigableCnv_p1_test )
+_add_test( NavigableCnv_p2_test )
+_add_test( ElementLinkVectorCnv_p1_test )
+_add_test( VectorElementLinkCnv_p1_test )
+
diff --git a/Control/DataModelRoot/CMakeLists.txt b/Control/DataModelRoot/CMakeLists.txt
index ba8b1ba365fc7bccd2a99ddd4f20813f2ea7006b..d440eb34ca01035bc276d23e48fec3c199bb1e70 100644
--- a/Control/DataModelRoot/CMakeLists.txt
+++ b/Control/DataModelRoot/CMakeLists.txt
@@ -1,29 +1,20 @@
-################################################################################
-# Package: DataModelRoot
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelRoot )
 
-atlas_depends_on_subdirs (
-  PUBLIC
-  Control/CxxUtils
-  PRIVATE
-  Control/RootUtils )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core RIO )
 
 # Component(s) in the package:
 atlas_add_library( DataModelRoot
                    src/*.cxx
                    PUBLIC_HEADERS DataModelRoot
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES RootUtils ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils
+                   PRIVATE_LINK_LIBRARIES RootUtils )
 
 atlas_add_dictionary( DataModelRootDict
                       DataModelRoot/DataModelRootDict.h
                       DataModelRoot/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelRoot )
-
+                      LINK_LIBRARIES DataModelRoot )
diff --git a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead.ref
index 82e06afa8b242772c35676e9abd7d4b1a4de253e..b73da2d57da9f8d35441dbe13336d8c050173f0f 100644
--- a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead2.ref b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead2.ref
index ea7d672151f8ffbd215faf0b2759165c6c491345..c4f6c4d13edfe31f9689b69e25c71ffcef3e396e 100644
--- a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead2.ref
@@ -24,7 +24,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead3.ref b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead3.ref
index 7f2ff1550045dc3802e0bf64da2fc2b52ed4641b..f3da1a438a05736f7acee886403ca70095a56fc6 100644
--- a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead3.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestRead3.ref
@@ -24,7 +24,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestTypelessRead.ref b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestTypelessRead.ref
index 40c35af9252eeab2efe511a288ce5d1eadf69bfa..052fba9fa990eefbd89325b77f068722114fffa5 100644
--- a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestTypelessRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestTypelessRead.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestWrite.ref b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestWrite.ref
index d6f18c572eb13c43e1aa7e8e25393a6cd9c3f5f3..76043f536e59197cf206a6accc164a315e4fc44b 100644
--- a/Control/DataModelTest/DataModelRunTests/share/AuxDataTestWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/AuxDataTestWrite.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref
index dc65254f1a8c4fe108d01bc2c94f48cccd973cb6..0d1bd78b71be54e6cb5b5cb788c7ed9e2082db2a 100644
--- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref
@@ -23,7 +23,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3269 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 8126 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
index bd66d9bf5fbba534f415fdd4a4a1e60246ebd662..a57229cabe99a46be80112ad0c0e12dc59a480b9 100644
--- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestWrite.ref
@@ -29,7 +29,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3308 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref b/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref
index 0dea05f80c3dd9270abe028689497ea16382749f..2eee7689daf9eee1e73947f72250644d3bc4d529 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReadWrite.ref
@@ -40,7 +40,6 @@ ApplicationMgr                                     INFO Updating Gaudi::PluginSe
 AthDictLoaderSvc                                   INFO in initialize...
 AthDictLoaderSvc                                   INFO acquired Dso-registry
 ClassIDSvc                                         INFO  getRegistryEntries: read 3463 CLIDRegistry entries for module ALL
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr                                 INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 1934 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReader.ref b/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
index 949f0f0f2818e2410e513b5712286704d94c0702..319d8ff0b75f35e48da615b66f5bbece9a3bc949 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
@@ -27,7 +27,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 1877 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
index b9b84056afff82f3d047d60b3336b336d2daa459..750f7b01db70de1dab659af9af29f8ab824757f6 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
@@ -31,7 +31,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref b/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
index 3d64138a90e9bb285ed6d5e1634bd86c36fb83a8..62c522b7d4813bc40ff2ce3431fa30ce04f68c34 100644
--- a/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3045 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 770 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead.ref
index 2665615eb3a9f93e0c0149736daaa23a1f4a2f09..195a8a82f5e88546df82078cff17be8d9c19da13 100644
--- a/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead2.ref b/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead2.ref
index 95d851ebc957068978f3174e19126b8ba153ed27..ff2a02d957e1a34c189e033041e0657087831521 100644
--- a/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/DataModelTestRead2.ref
@@ -24,7 +24,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/DataModelTestWrite.ref b/Control/DataModelTest/DataModelRunTests/share/DataModelTestWrite.ref
index bb3fe591d7b92330988e5b70cb93e34c42e2f260..58a3562dea790c0892fc2e788510e54951e0ec6f 100644
--- a/Control/DataModelTest/DataModelRunTests/share/DataModelTestWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/DataModelTestWrite.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref
index 6fcb1184575d11de5b35fa744aded81fcc5a4769..b638b15f051a1ad24abae18fa71de8fe7f7085f4 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref
@@ -23,7 +23,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
index eaa9eb5ba873de7faa40ccb48aeaafc1f3e4e177..4a36780ffeb517501df32efbf799366695fb2885 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
@@ -27,7 +27,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7399 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc                                     0    INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref
index a4bf4b3be7d677305d73140372ac760eda240919..28e8821620d44bde373da2362903f50b3128e51f 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 1796 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
index e332deb86ee7f3f1e58ba87ad1161647768419a5..d818e736b2f12408d2b7d02963b25f787a30b236 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
@@ -28,7 +28,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
index 1cd3f4c0e259209fcd4df52e345c22f27f7303b0..2be80a31b53315dda307c1df69af43b1b09c95d9 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7341 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 xAODMaker::Even...   INFO Initialising - Package version: xAODEventFormatCnv-00-00-00
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref
index 456d2950c22a299ba4bc818f99780cd955ea830e..cb179b0dee16807d5afe9c863d71a4c29c3aa7f2 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 6156 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref
index 9d6235eebc95c6bade0e3e410d72811f13e3d0f2..11bed3cc456b1c2a8a3d23a08116f688bed1f782 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref
@@ -24,7 +24,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 584 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref
index c7c6e0bdd44e3783766184647fcd524765763f85..64298519096b798deefc81dff68586cef7633adf 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3MT.ref
@@ -28,7 +28,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter.ref
index 271c7476437d197698308d9a390f06879bd02c7b..ab38979d191fee5b08878b61d59602c903cbd07e 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 8043 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref
index 791bf34583deb2accd7af07a414302c989d5a15a..43eed183f37b0bb5e981690a93e7f6c04b9ed035 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref
@@ -24,7 +24,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 6156 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref
index a6d4abb1bc82b70fbe702c8fa713081bb317253e..e4900e1253e53b46be306fe19125c8893e43a57c 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 8052 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref
index a38ab8a6545b689f2f86491e97cf8f61b6b41e60..60236d55cd6765f218b42c3e7fa6b2412b88918e 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRenameMT.ref
@@ -28,7 +28,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref
index 87da2a5db0410525c4be15ff10ccd34dca958212..a94946954a00d5a914f6e6502e17247925017838 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref
@@ -24,7 +24,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3753 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 10214 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1.ref
index 0bf94489fa258576c0349fcdc61bd36c3babbd58..af969dc4c5553845640d5a7ba7839ea20a479115 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1.ref
@@ -23,7 +23,6 @@ AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2318 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 6620 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
index 8bc2d62a85bc33647bdff8d40a45f49ffb54a2e2..35c3b22070fff485104f4abb482483d4d742e9dc 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
@@ -27,7 +27,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2.ref
index 389c8fce6a83e2d1204b7d2e716e93e873bb2b79..c72d1a54d82323ccf8eb5521bd56966e9a0ca239 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 1796 CLIDRegistry entries for module ALL
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
index 38509da50cf6efee04c870c818bd11c61557823b..f62e506c8f5c23478ae719bfbb4ad684c65aed49 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
@@ -28,7 +28,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 3835 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                              INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref
index c0782b2564640035eca33ce3a95930095bb31a55..2272c70c137943a91f3394f1cc32c0117b1aac6a 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7169 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 PyComponentMgr       INFO Initializing PyComponentMgr...
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite.ref
index 08215795569ea1a16840e83ff0b1acdeda5649c1..ed710141d3d468cd2093520e8027fc34d3be6f55 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3108 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 xAODMaker::Even...   INFO Initialising - Package version: xAODEventFormatCnv-00-00-00
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned.ref
index 57c9a6aa750d2726f3ed3bfd4113281606b3be7c..14c62efb04c45e5a7874f73566c7fdd880e171b2 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned.ref
@@ -25,7 +25,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3871 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 xAODMaker::Even...   INFO Initialising - Package version: xAODEventFormatCnv-00-00-00
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
index 58266754b72a77ad7a9e4227a9c5775e495453de..1be2dece11432261ff94162de45ef22aaf492359 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
@@ -1,28 +1,8 @@
-################################################################################
-# Package: DataModelTestDataCommon
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelTestDataCommon )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthContainersInterfaces
-                          Control/AthenaKernel
-                          Event/xAOD/xAODCore
-                          Event/xAOD/xAODTrigger
-                          GaudiKernel
-                          PRIVATE
-                          Event/EventInfo
-                          Control/AthLinks
-                          Control/StoreGate
-                          Control/AthenaBaseComps
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/RegistrationServices
-			  Database/PersistentDataModel
-                          Trigger/TrigDataAccess/TrigSerializeCnvSvc )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -31,29 +11,27 @@ atlas_add_library( DataModelTestDataCommonLib
                    src/*.cxx
                    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 RegistrationServicesLib )
+                   LINK_LIBRARIES AthContainers AthContainersInterfaces AthenaPoolUtilities AthLinks AthenaKernel EventInfo GaudiKernel RegistrationServicesLib xAODCore xAODTrigger
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps CxxUtils PersistentDataModel StoreGateLib )
 
 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 RegistrationServicesLib )
+                     LINK_LIBRARIES DataModelTestDataCommonLib )
 
 atlas_add_dictionary( DataModelTestDataCommonDict
                       DataModelTestDataCommon/DataModelTestDataCommonDict.h
                       DataModelTestDataCommon/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthenaKernel xAODCore xAODTrigger GaudiKernel AthLinks DataModelTestDataCommonLib
+                      LINK_LIBRARIES DataModelTestDataCommonLib
                       NO_ROOTMAP_MERGE
                       EXTRA_FILES src/dict/*.cxx
                       ELEMENT_LINKS DMTest::BAuxVec DMTest::CVec_v1 )
 
-
 atlas_add_sercnv_library ( DataModelTestDataCommonSerCnv
-  FILES DataModelTestDataCommon/CVec.h DataModelTestDataCommon/CView.h DataModelTestDataCommon/CAuxContainer.h
-  TYPES_WITH_NAMESPACE DMTest::CVec DMTest::CView DMTest::CAuxContainer
-  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-  LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthenaKernel xAODCore xAODTrigger GaudiKernel AthLinks TrigSerializeCnvSvcLib DataModelTestDataCommonLib )
+                           FILES DataModelTestDataCommon/CVec.h DataModelTestDataCommon/CView.h DataModelTestDataCommon/CAuxContainer.h
+                           TYPES_WITH_NAMESPACE DMTest::CVec DMTest::CView DMTest::CAuxContainer
+                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                           LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelTestDataCommonLib TrigSerializeCnvSvcLib )
 
 # Install files from the package:
 atlas_install_scripts( scripts/*.py )
diff --git a/Control/DataModelTest/DataModelTestDataRead/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataRead/CMakeLists.txt
index f50079e43ee51ef2ea9b96b877893c13cd5c6356..7d7b724a907b8128707c0fa2a55805dd246285b0 100644
--- a/Control/DataModelTest/DataModelTestDataRead/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataRead/CMakeLists.txt
@@ -1,55 +1,28 @@
-################################################################################
-# Package: DataModelTestDataRead
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelTestDataRead )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/AthenaKernel
-                          Control/DataModelAthenaPool
-                          Control/DataModelTest/DataModelTestDataCommon
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthContainersInterfaces
-                          Control/AthenaBaseComps
-                          Control/CxxUtils
-                          Control/StoreGate
-                          Event/xAOD/xAODCore
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigEvent/TrigNavigation )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( DataModelTestDataReadLib
                    src/*.cxx
                    PUBLIC_HEADERS DataModelTestDataRead
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthContainers AthLinks DataModelTestDataCommonLib GaudiKernel DataModelAthenaPoolLib StoreGateLib SGtests TrigSteeringEvent TrigNavigationLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils xAODCore )
+                   LINK_LIBRARIES AthContainers AthLinks AthenaKernel DataModelAthenaPoolLib DataModelTestDataCommonLib TrigNavigationLib xAODCore
+                   PRIVATE_LINK_LIBRARIES AthContainersInterfaces AthenaBaseComps CxxUtils GaudiKernel StoreGateLib TrigSteeringEvent )
 
 atlas_add_component( DataModelTestDataRead
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks DataModelAthenaPoolLib DataModelTestDataCommonLib GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests xAODCore TrigSteeringEvent DataModelTestDataReadLib )
+                     LINK_LIBRARIES DataModelTestDataReadLib )
 
 atlas_add_dictionary( DataModelTestDataReadDict
                       DataModelTestDataRead/DataModelTestDataReadDict.h
                       DataModelTestDataRead/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks DataModelAthenaPoolLib DataModelTestDataCommonLib GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests xAODCore DataModelTestDataReadLib
+                      LINK_LIBRARIES DataModelTestDataReadLib
                       NO_ROOTMAP_MERGE
                       EXTRA_FILES src/dict/*.cxx
                       ELEMENT_LINKS DataVector<DMTest::B> )
 
-
 atlas_add_sercnv_library ( DataModelTestDataReadSerCnv
   FILES DataModelTestDataRead/HVec.h DataModelTestDataRead/HView.h DataModelTestDataRead/HAuxContainer.h
   TYPES_WITH_NAMESPACE DMTest::HVec DMTest::HView DMTest::HAuxContainer
-  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-  LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers xAODCore xAODTrigger GaudiKernel AthLinks TrigSerializeCnvSvcLib DataModelTestDataCommonLib DataModelTestDataReadLib )
+  LINK_LIBRARIES DataModelTestDataReadLib TrigSerializeCnvSvcLib )
diff --git a/Control/DataModelTest/DataModelTestDataReadCnv/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataReadCnv/CMakeLists.txt
index a9ade5a93433a6a7fa4a8191fec0c2bcf34b1d26..410f15da91ddfee5d4f30a1f4135ae207c411969 100644
--- a/Control/DataModelTest/DataModelTestDataReadCnv/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataReadCnv/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: DataModelTestDataReadCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelTestDataReadCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/DataModelTest/DataModelTestDataCommon
-                          Control/DataModelTest/DataModelTestDataRead
-                          Database/AthenaPOOL/AthenaPoolCnvSvc )
-
-# tag no_merge_componentslist was not recognized in automatic conversion in cmt2cmake
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( DataModelTestDataReadCnvPoolCnv
                            src/*.cxx
diff --git a/Control/DataModelTest/DataModelTestDataWrite/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataWrite/CMakeLists.txt
index 66ec36d5e5ef3c2dd5474cf368079b3bb58f526a..2e619ecb3f8fa2a59401d4d829dde16e907476bb 100644
--- a/Control/DataModelTest/DataModelTestDataWrite/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataWrite/CMakeLists.txt
@@ -1,56 +1,28 @@
-################################################################################
-# Package: DataModelTestDataWrite
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelTestDataWrite )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/AthenaKernel
-                          Control/DataModelAthenaPool
-                          Control/DataModelTest/DataModelTestDataCommon
-                          Event/xAOD/xAODCore
-                          GaudiKernel
-                          PRIVATE
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigEvent/TrigNavigation
-                          Control/AthContainersInterfaces
-                          Control/AthenaBaseComps
-                          Control/CxxUtils
-                          Control/StoreGate )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( DataModelTestDataWriteLib
                    src/*.cxx
                    PUBLIC_HEADERS DataModelTestDataWrite
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthContainers AthLinks DataModelTestDataCommonLib xAODCore GaudiKernel DataModelAthenaPoolLib StoreGateLib SGtests TrigNavigationLib TrigSteeringEvent
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils )
+                   LINK_LIBRARIES AthContainers AthLinks AthenaKernel DataModelAthenaPoolLib DataModelTestDataCommonLib TrigNavigationLib xAODCore
+                   PRIVATE_LINK_LIBRARIES AthContainersInterfaces AthenaBaseComps GaudiKernel StoreGateLib TrigSteeringEvent )
 
 atlas_add_component( DataModelTestDataWrite
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks DataModelAthenaPoolLib DataModelTestDataCommonLib xAODCore GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests TrigSteeringEvent DataModelTestDataWriteLib )
+                     LINK_LIBRARIES DataModelTestDataWriteLib )
 
 atlas_add_dictionary( DataModelTestDataWriteDict
                       DataModelTestDataWrite/DataModelTestDataWriteDict.h
                       DataModelTestDataWrite/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks DataModelAthenaPoolLib DataModelTestDataCommonLib xAODCore GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests DataModelTestDataWriteLib
+                      LINK_LIBRARIES DataModelTestDataWriteLib
                       NO_ROOTMAP_MERGE
                       EXTRA_FILES src/dict/*.cxx
                       ELEMENT_LINKS DataVector<DMTest::B> )
 
-
-
 atlas_add_sercnv_library ( DataModelTestDataWriteSerCnv
   FILES DataModelTestDataWrite/HVec.h DataModelTestDataWrite/HView.h DataModelTestDataWrite/HAuxContainer.h
   TYPES_WITH_NAMESPACE DMTest::HVec DMTest::HView DMTest::HAuxContainer
-  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-  LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers xAODCore xAODTrigger GaudiKernel AthLinks TrigSerializeCnvSvcLib DataModelTestDataCommonLib DataModelTestDataWriteLib )
+  LINK_LIBRARIES DataModelTestDataWriteLib TrigSerializeCnvSvcLib )
diff --git a/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt
index 6c2c91a569fb58012560c6911371f6f07c8e61b4..e629baee950adf6f5905fe32dcd50dab82d5d1f6 100644
--- a/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: DataModelTestDataWriteCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DataModelTestDataWriteCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Control/DataModelTest/DataModelTestDataCommon
-                          Control/DataModelTest/DataModelTestDataWrite
-                          Database/AthenaPOOL/AthenaPoolCnvSvc )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 atlas_add_library( DataModelTestDataWriteCnv
                    DataModelTestDataWriteCnv/CLinksAOD_p1.h
                    INTERFACE
@@ -29,11 +16,9 @@ atlas_add_poolcnv_library( DataModelTestDataWriteCnvPoolCnv
                            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 DataModelTestDataWriteCnv )
 
-
 atlas_add_dictionary( DataModelTestDataWriteCnvDict
                       DataModelTestDataWriteCnv/DataModelTestDataWriteCnvDict.h
                       DataModelTestDataWriteCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelTestDataCommonLib DataModelTestDataWriteCnv
+                      LINK_LIBRARIES DataModelTestDataCommonLib DataModelTestDataWriteCnv
                       NO_ROOTMAP_MERGE )
 
diff --git a/Control/GaudiSequencer/CMakeLists.txt b/Control/GaudiSequencer/CMakeLists.txt
index c8eb9219bd55813790114245aa77e63844fc949a..6c63ec9c46bc86f3fe6a4e68c94fad9a94cfc3c2 100644
--- a/Control/GaudiSequencer/CMakeLists.txt
+++ b/Control/GaudiSequencer/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: GaudiSequencer
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GaudiSequencer )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          GaudiKernel )
-
 # External dependencies:
 find_package( valgrind )
 
diff --git a/Control/IOVSvc/share/IOVSvcTool_test.ref b/Control/IOVSvc/share/IOVSvcTool_test.ref
index 88465c94287646eb2d6a3075e3e53bacc878854a..1c035c978afbfdba04ab25afa86fcd359f6e6d09 100644
--- a/Control/IOVSvc/share/IOVSvcTool_test.ref
+++ b/Control/IOVSvc/share/IOVSvcTool_test.ref
@@ -3,7 +3,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/IOVSvc/share/IOVSvcTool_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/IOVSvc/share/IOVSvcTool_test.txt
-JobOptionsSvc        INFO # (2,1): ApplicationMgr.DLLs += ["StoreGate", "IOVSvc"]
+JobOptionsSvc        INFO # (2,1): ApplicationMgr.Dlls += ["StoreGate", "IOVSvc"]
 JobOptionsSvc        INFO # (3,1): ApplicationMgr.CreateSvc += ["StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO # (5,1): MessageSvc.OutputLevel = 2
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/IOVSvc/share/IOVSvcTool_test.txt
diff --git a/Control/IOVSvc/share/IOVSvcTool_test.txt b/Control/IOVSvc/share/IOVSvcTool_test.txt
index cf43223ddaf08a1ab2d3d0b28f2ad41e328dcce3..21ed8f26a60baf2ab05c4251e70ec532a18f3852 100644
--- a/Control/IOVSvc/share/IOVSvcTool_test.txt
+++ b/Control/IOVSvc/share/IOVSvcTool_test.txt
@@ -1,5 +1,5 @@
 //job opts for IOVSvcTool unit test
-ApplicationMgr.DLLs += { "StoreGate", "IOVSvc" };
+ApplicationMgr.Dlls += { "StoreGate", "IOVSvc" };
 ApplicationMgr.CreateSvc += { "StoreGateSvc/DetectorStore" };
 
 MessageSvc.OutputLevel = 2;
diff --git a/Control/Navigation/CMakeLists.txt b/Control/Navigation/CMakeLists.txt
index f20b96dc7912d2bc5c1d4412c17595c5d7c1446a..bf3331d55820d140adf5b84f046414df97349770 100644
--- a/Control/Navigation/CMakeLists.txt
+++ b/Control/Navigation/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: Navigation
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Navigation )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthAllocators
-   Control/AthLinks
-   Control/AthenaKernel
-   PRIVATE
-   Control/AthContainers
-   AtlasTest/TestTools
-   Control/StoreGate
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 find_package( UUID )
@@ -27,7 +13,7 @@ atlas_add_library( Navigation Navigation/*.h Navigation/*.icc src/*.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${UUID_INCLUDE_DIRS}
    LINK_LIBRARIES ${Boost_LIBRARIES} AthAllocators AthLinks AthenaKernel
-   PRIVATE_LINK_LIBRARIES ${UUID_LIBRARIES} )
+   PRIVATE_LINK_LIBRARIES ${UUID_LIBRARIES} GaudiKernel )
 
 atlas_add_dictionary( NavigationDict
    Navigation/NavigationDict.h Navigation/selection.xml
@@ -40,13 +26,10 @@ atlas_add_test( NavigationToken_test
 
 atlas_add_test( NavigableIterator_test
    SOURCES test/NavigableIterator_test.cxx
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} AthContainers TestTools 
-   StoreGateLib GaudiKernel Navigation
+   LINK_LIBRARIES AthContainers TestTools StoreGateLib GaudiKernel Navigation
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( AthenaBarCodeImpl_test
    SOURCES test/AthenaBarCodeImpl_test.cxx
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} Navigation
+   LINK_LIBRARIES Navigation
    POST_EXEC_SCRIPT nopost.sh )
diff --git a/Control/Navigation/share/NavigableIterator_test.ref b/Control/Navigation/share/NavigableIterator_test.ref
index 4f9997010e17fe47e7c2edd6554af55f566035d4..32c0ec270d84d36713bede9f476af6d7bf74e056 100644
--- a/Control/Navigation/share/NavigableIterator_test.ref
+++ b/Control/Navigation/share/NavigableIterator_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/NavigableIterator_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/Navigation/run/../share/NavigableIterator_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/NavigableIterator_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Control/Navigation/share/NavigableIterator_test.txt b/Control/Navigation/share/NavigableIterator_test.txt
index dae64b09f4f22ed7c79f1886401d5f466bab00f8..7a62d9fe77da0cf0d0cbc0da69a7694363ba0940 100644
--- a/Control/Navigation/share/NavigableIterator_test.txt
+++ b/Control/Navigation/share/NavigableIterator_test.txt
@@ -1,2 +1,2 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
diff --git a/Control/PerformanceMonitoring/PerfMonAna/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonAna/CMakeLists.txt
index 4427629d39627b13bd5dc75965d1dcb2d3b569b3..cd6c384f07969c5793da4d1b121d6b5b597a7197 100644
--- a/Control/PerformanceMonitoring/PerfMonAna/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonAna/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: PerfMonAna
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonAna )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/PerformanceMonitoring/PerfMonEvent )
-
 # External dependencies:
 find_package( pandas )
 find_package( sqlalchemy )
diff --git a/Control/PerformanceMonitoring/PerfMonComps/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonComps/CMakeLists.txt
index efa4b530d8c5379395a01139f84d20eeb34c7d14..c553528b686e5a1f1564dbc26be0474fb6468932 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonComps/CMakeLists.txt
@@ -1,30 +1,15 @@
-################################################################################
-# Package: PerfMonComps
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonComps )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/RootUtils
-   Control/CxxUtils
-   Control/PerformanceMonitoring/PerfMonEvent
-   Control/PerformanceMonitoring/PerfMonKernel
-   Control/SGTools
-   Control/StoreGate
-   GaudiKernel
-   Tools/PyUtils )
-
 # External dependencies:
 find_package( AIDA )
 find_package( Boost )
 find_package( Python COMPONENTS Development )
 find_package( ROOT COMPONENTS Core PyROOT )
 find_package( nlohmann_json )
+find_package( psutil )
 
 # Component(s) in the package:
 atlas_add_component( PerfMonComps
diff --git a/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonCompsConfig.py b/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonCompsConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..8f41afd32b225f955498a2fc3069139e79572ffd
--- /dev/null
+++ b/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonCompsConfig.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+from AthenaCommon.Logging import logging
+
+## A minimal new-style configuration for PerfMonMTSvc
+def PerfMonMTSvcCfg(flags, **kwargs):
+    """ Configuring PerfMonMTSvc """
+   
+    # Get the logger
+    log = logging.getLogger("PerfMonMTSvcCfg")
+    log.info("Configuring PerfMonMTSvc with flags:")
+    log.info("  >> doFastMonMT {}".format(flags.PerfMon.doFastMonMT))
+    log.info("  >> doFullMonMT {}".format(flags.PerfMon.doFullMonMT))
+
+    # Check if basic monitoring is asked for
+    if not flags.PerfMon.doFastMonMT and not flags.PerfMon.doFullMonMT:
+        log.info("Nothing to be done...")
+        return ComponentAccumulator()
+
+    # Hook to PerfMonMTSvc
+    PerfMonMTSvc = CompFactory.PerfMonMTSvc
+
+    # Set the main properties for the service
+    import os,psutil
+    kwargs.setdefault("wallTimeOffset",
+                      psutil.Process(os.getpid()).create_time() * 1000)
+    kwargs.setdefault("numberOfThreads",
+                      max(1,flags.Concurrency.NumThreads))
+    kwargs.setdefault("numberOfSlots",
+                      max(1,flags.Concurrency.NumConcurrentEvents))
+    kwargs.setdefault("doComponentLevelMonitoring",
+                      flags.PerfMon.doFullMonMT)
+
+    # Get CA and add the service 
+    acc = ComponentAccumulator()
+    acc.addService(PerfMonMTSvc(**kwargs), create=True)
+
+    # Enable the auditors that are necessarry for the service
+    acc.setAppProperty("AuditAlgorithms", True)
+    acc.setAppProperty("AuditTools", True)
+    acc.setAppProperty("AuditServices", True)
+
+    # Add the algorithm that is necessary for the service
+    PerfMonMTAlg = CompFactory.PerfMonMTAlg
+    acc.addEventAlgo(PerfMonMTAlg(), sequenceName='AthAlgSeq')
+    
+    # Return the CA
+    return acc
diff --git a/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonConfigFlags.py b/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonConfigFlags.py
new file mode 100644
index 0000000000000000000000000000000000000000..353af4479999516aaa9078ef398d8d691e12bed8
--- /dev/null
+++ b/Control/PerformanceMonitoring/PerfMonComps/python/PerfMonConfigFlags.py
@@ -0,0 +1,12 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.AthConfigFlags import AthConfigFlags
+
+def createPerfMonConfigFlags():
+    pcf = AthConfigFlags()
+
+    # Two basic flags for PerfMonMT
+    pcf.addFlag('PerfMon.doFastMonMT', False)
+    pcf.addFlag('PerfMon.doFullMonMT', False)
+    
+    return pcf
diff --git a/Control/PerformanceMonitoring/PerfMonEvent/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonEvent/CMakeLists.txt
index 303cad9ae74956016a5f374ef10061676d47b886..b8b87a5a403e069c7fad82484258ca9006814de9 100644
--- a/Control/PerformanceMonitoring/PerfMonEvent/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonEvent/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: PerfMonEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # External dependencies:
 find_package( Python COMPONENTS Development )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
diff --git a/Control/PerformanceMonitoring/PerfMonGPerfTools/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonGPerfTools/CMakeLists.txt
index 19e20715ccaf15bdfb113be6970d8d9553ac62fa..80172bc979b80455a623759c4e9177b3c81233e6 100644
--- a/Control/PerformanceMonitoring/PerfMonGPerfTools/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonGPerfTools/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: PerfMonGPerfTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonGPerfTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 # External dependencies:
 find_package( gperftools COMPONENTS profiler )
 
@@ -29,8 +20,7 @@ atlas_add_component( PerfMonGPerfTools
                      LINK_LIBRARIES ${GPERFTOOLS_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel )
 
 # Install files from the package:
-atlas_install_headers( PerfMonGPerfTools )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( scripts/*.py scripts/gathena )
 
diff --git a/Control/PerformanceMonitoring/PerfMonKernel/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonKernel/CMakeLists.txt
index e3068845381a3298f44297bad54d9aafbb272e55..9e25e2831531903de0e1107f1b7abd23fa18e69f 100644
--- a/Control/PerformanceMonitoring/PerfMonKernel/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonKernel/CMakeLists.txt
@@ -1,16 +1,10 @@
-################################################################################
-# Package: PerfMonKernel
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonKernel )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( PerfMonKernel
diff --git a/Control/PerformanceMonitoring/PerfMonTests/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonTests/CMakeLists.txt
index e7231f868e1a5f23eaaa9f8c068cf32c8149db73..024fa60ea6359a8d89763856e5e7be48f707dac0 100644
--- a/Control/PerformanceMonitoring/PerfMonTests/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonTests/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: PerfMonTests
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonTests )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/AthAllocators
-                          Control/AthContainers
-                          Control/PerformanceMonitoring/PerfMonComps
-                          Control/PerformanceMonitoring/PerfMonKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          PhysicsAnalysis/TruthParticleID/McParticleTests
-                          Reconstruction/Jet/JetRec )
-
 # External dependencies:
 find_package( CLHEP )
 
@@ -26,43 +11,37 @@ atlas_add_component( PerfMonTests
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthAllocators AthContainers PerfMonKernel StoreGateLib SGtests GaudiKernel )
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthAllocators AthContainers PerfMonKernel GaudiKernel )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py share/tests/*.py )
 
-
 atlas_add_test( NoopAlg
    SCRIPT test/NoopAlg.sh
    PROPERTIES TIMEOUT 600
    LOG_IGNORE_PATTERN "running" )
 
-
 atlas_add_test( NoopAlg_WriteDataHdr
    SCRIPT test/NoopAlg_WriteDataHdr.sh
    PROPERTIES TIMEOUT 600
    LOG_IGNORE_PATTERN "running" )
 
-
 atlas_add_test( NoopAlg_WriteEvtInfo
    SCRIPT test/NoopAlg_WriteEvtInfo.sh
    PROPERTIES TIMEOUT 600
    LOG_IGNORE_PATTERN "running" )
 
-
 atlas_add_test( LeakyAlg
    SCRIPT test/LeakyAlg.sh
    PROPERTIES TIMEOUT 600
    LOG_IGNORE_PATTERN "running" )
 
-
 atlas_add_test( BasicAlg
    SCRIPT test/BasicAlg.sh
    PROPERTIES TIMEOUT 600
    LOG_IGNORE_PATTERN "running" )
 
-
 atlas_add_test( BaseLine
    SCRIPT test/BaseLine.sh
    PROPERTIES TIMEOUT 600
diff --git a/Control/PerformanceMonitoring/PerfMonTests/python/IoTestsLib.py b/Control/PerformanceMonitoring/PerfMonTests/python/IoTestsLib.py
index d08ffc5d9dc03a58937ed776cfa29778386e24d1..35865b6066f91c8ce71de4252d9b82b805f39a9e 100644
--- a/Control/PerformanceMonitoring/PerfMonTests/python/IoTestsLib.py
+++ b/Control/PerformanceMonitoring/PerfMonTests/python/IoTestsLib.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 PerfMonTests.IoTestsLib
 ## @date April 2009
@@ -12,6 +12,7 @@ a set of simple minded functions to test ROOT I/O (from python)
 """
 
 from array import array as carray
+from builtins import range
 
 import random
 # set some dummy seed, for reproducibility
@@ -62,7 +63,7 @@ def comp_delta(d, verbose=False):
 def import_ROOT():
     import sys
     # for ROOT...
-    if not '-b' in sys.argv:
+    if '-b' not in sys.argv:
         sys.argv.insert(1, '-b')
     import ROOT
     return ROOT
@@ -85,8 +86,8 @@ def io_test1_write(fname, nevts=1000, sz=1000, dtype='i'):
     from random import randint
     
     fill = t.Fill
-    for i in xrange(nevts):
-        for j in xrange(sz):
+    for i in range(nevts):
+        for j in range(sz):
             data[j] = randint(0, sz)
         fill()
 
@@ -106,7 +107,7 @@ def io_test1_read(fname, verbose=False):
     tot_bytes = 0
     get_entry = t.GetEntry
     start = pymon()
-    for ievt in xrange(nevts):
+    for ievt in range(nevts):
         # copy next entry into memory and verify
         nb = get_entry(ievt)
         if nb <= 0:
@@ -144,10 +145,10 @@ def io_test2_write(fname, nevts=1000, sz=1000, dtype='i'):
     from random import randint
     
     fill = t.Fill
-    for i in xrange(nevts):
+    for i in range(nevts):
         jmax = randint(1, sz)
         n[0] = jmax
-        for j in xrange(jmax):
+        for j in range(jmax):
             data[j] = randint(0, sz)
         fill()
 
@@ -167,7 +168,7 @@ def io_test2_read(fname, verbose=False):
     tot_bytes = 0
     get_entry = t.GetEntry
     start = pymon()
-    for ievt in xrange(nevts):
+    for ievt in range(nevts):
         # copy next entry into memory and verify
         nb = get_entry(ievt)
         if nb <= 0:
@@ -206,7 +207,7 @@ if __name__ == "__main__":
                        nevts=100000, sz=1000,
                        dtype='i')
     mon_data['io_test1-ints'] = []
-    for _ in xrange(nreads):
+    for _ in range(nreads):
         mon_data['io_test1-ints'].append(comp_delta(io_test1_read(fname=fname)))
 
     # io_test1 - floats
@@ -215,7 +216,7 @@ if __name__ == "__main__":
                        nevts=100000, sz=1000,
                        dtype='f')
     mon_data['io_test1-flts'] = []
-    for _ in xrange(nreads):
+    for _ in range(nreads):
         mon_data['io_test1-flts'].append(comp_delta(io_test1_read(fname=fname)))
 
     # -----
@@ -228,7 +229,7 @@ if __name__ == "__main__":
                        nevts=100000, sz=1000,
                        dtype='i')
     mon_data['io_test2-ints'] = []
-    for _ in xrange(nreads):
+    for _ in range(nreads):
         mon_data['io_test2-ints'].append(comp_delta(io_test2_read(fname=fname)))
 
     # io_test2 - floats
@@ -237,7 +238,7 @@ if __name__ == "__main__":
                        nevts=100000, sz=1000,
                        dtype='f')
     mon_data['io_test2-flts'] = []
-    for _ in xrange(nreads):
+    for _ in range(nreads):
         mon_data['io_test2-flts'].append(comp_delta(io_test2_read(fname=fname)))
 
 
diff --git a/Control/PerformanceMonitoring/PerfMonTests/python/tests.py b/Control/PerformanceMonitoring/PerfMonTests/python/tests.py
index a345c5ab6050539e8dabbd94119a67c837103843..fe292367180d1b7bcee82e9255efe7ccbf853000 100755
--- a/Control/PerformanceMonitoring/PerfMonTests/python/tests.py
+++ b/Control/PerformanceMonitoring/PerfMonTests/python/tests.py
@@ -1,14 +1,12 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ##
 ## A little py-module holding methods to ease the scheduling of PerfMonTests
 ## @author: Sebastien Binet
-## $Id: tests.py,v 1.5 2007-11-12 01:04:14 binet Exp $
 
 from __future__ import print_function
 
 import os
-import sys
 from AthenaCommon import ChapPy
 
 from future import standard_library
@@ -22,7 +20,6 @@ from TestTools.iobench import workDir
 ###-----------------------------------------------------
 ## Little helper to validate output of jobs
 from TestTools.iobench import ScOutput
-from TestTools.iobench import BenchSequence
 
 def testPerfMon( jobOptName      = "PerfMonTests/test_perfMonSvc_noopalg.py",
                  perfMonFileName = "perfmon.noopalg.root",
diff --git a/Control/PerformanceMonitoring/PerfMonVTune/CMakeLists.txt b/Control/PerformanceMonitoring/PerfMonVTune/CMakeLists.txt
index fa0737f564b4e9922e7a3a1693cf4d34a0bd517e..51ae73f5f861936e0c7e2a7917ea2067ad9f859b 100644
--- a/Control/PerformanceMonitoring/PerfMonVTune/CMakeLists.txt
+++ b/Control/PerformanceMonitoring/PerfMonVTune/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: PerfMonVTune
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PerfMonVTune )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 ####
 # VTune hack for the time-being
 find_program( VTUNE_EXECUTABLE amplxe-cl )
@@ -31,7 +22,6 @@ atlas_add_component( PerfMonVTune
                      LINK_LIBRARIES GaudiKernel AthenaBaseComps AthenaKernel ${ITT_LIBRARY} ${CMAKE_DL_LIBS} )
 
 # Install files from the package:
-atlas_install_headers( PerfMonVTune )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( scripts/*.py )
diff --git a/Control/PerformanceMonitoring/PerfMonVTune/python/JobOptCfg.py b/Control/PerformanceMonitoring/PerfMonVTune/python/JobOptCfg.py
index 8a4799668a83a85207f3f55237417aec9ca32e07..a11dfffed8f2adf8992e42fa5e8024c57aa75133 100644
--- a/Control/PerformanceMonitoring/PerfMonVTune/python/JobOptCfg.py
+++ b/Control/PerformanceMonitoring/PerfMonVTune/python/JobOptCfg.py
@@ -1,6 +1,6 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from PerfMonVTuneConf import VTuneProfilerService as _VTuneProfilerService
+from PerfMonVTune.PerfMonVTuneConf import VTuneProfilerService as _VTuneProfilerService
 
 class VTuneProfilerService( _VTuneProfilerService ):
     
diff --git a/Control/RngComps/CMakeLists.txt b/Control/RngComps/CMakeLists.txt
index 5637fe4f0874c411b5ffabf6d6034183483fc328..b45cb27210eab970b634750e123963c2b4bea398 100644
--- a/Control/RngComps/CMakeLists.txt
+++ b/Control/RngComps/CMakeLists.txt
@@ -1,23 +1,12 @@
-################################################################################
-# Package: RngComps
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RngComps )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   AtlasTest/TestTools
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Simulation/Tools/AtlasCLHEP_RandomGenerators )
-
 # External dependencies:
 find_package( Boost )
 find_package( CLHEP )
+find_package( TBB )
 
 # Component(s) in the package:
 atlas_add_component( RngComps src/*.h src/*.cxx src/components/*.cxx
@@ -61,8 +50,7 @@ atlas_add_test( TestSeedRunEvent
 atlas_add_test( RNGWrapper_test
    SOURCES test/RNGWrapper_test.cxx
    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} TestTools AthenaKernel StoreGateLib
-   GaudiKernel AtlasCLHEP_RandomGenerators )
+   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} AthenaKernel AtlasCLHEP_RandomGenerators TestTools )
 
 atlas_add_test( RandomServices_test
                 SCRIPT test/RandomServices_test.py )
diff --git a/Control/RngComps/share/AtDSFMT_test.txt b/Control/RngComps/share/AtDSFMT_test.txt
index 0ae90be83740d491849cd205500a3be8d71bb398..f7eba831962ffea473cf4ec07182e04e331841a6 100644
--- a/Control/RngComps/share/AtDSFMT_test.txt
+++ b/Control/RngComps/share/AtDSFMT_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: AtDSFMT_test.txt,v 1.2 2007-06-24 05:37:15 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "AtDSFMTGenSvc", "AtDSFMTGenSvc/AtDSFMTGenSvc2", "AtDSFMTGenSvc/AtDSFMTGenSvc3"  };
 ApplicationMgr.ExtSvcCreates = false;
 
diff --git a/Control/RngComps/share/AtRanlux_test.ref b/Control/RngComps/share/AtRanlux_test.ref
index 5a9ba67517b84f71665bde3ec9ef83707834e57a..dca3dda744612a134d636ed854bbb8d91d8b520d 100644
--- a/Control/RngComps/share/AtRanlux_test.ref
+++ b/Control/RngComps/share/AtRanlux_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/AtRanlux_test.txt
 JobOptionsSvc        INFO # =======> /home/leggett/work/v30r1.002/src/Control/RngComps/share/../share/AtRanlux_test.txt
-JobOptionsSvc        INFO # (5,1): ApplicationMgr.DLLs += ["AthenaServices"]
+JobOptionsSvc        INFO # (5,1): ApplicationMgr.Dlls += ["AthenaServices"]
 JobOptionsSvc        INFO # (6,1): ApplicationMgr.ExtSvc += ["AtRanluxGenSvc", "AtRanluxGenSvc/AtRanluxGenSvc2", "AtRanluxGenSvc/AtRanluxGenSvc3"]
 JobOptionsSvc        INFO # (7,1): ApplicationMgr.ExtSvcCreates = 0
 JobOptionsSvc        INFO # (9,1): MessageSvc.OutputLevel = 2
diff --git a/Control/RngComps/share/AtRanlux_test.txt b/Control/RngComps/share/AtRanlux_test.txt
index 1bdb8a414f37b02f8051e355ba1452fbc164047f..bd3dcb31ba8dd343c5c8e3341088c81095a8b42e 100644
--- a/Control/RngComps/share/AtRanlux_test.txt
+++ b/Control/RngComps/share/AtRanlux_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: AtRanlux_test.txt,v 1.2 2007-06-24 05:37:15 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 ApplicationMgr.ExtSvc += { "AtRanluxGenSvc", "AtRanluxGenSvc/AtRanluxGenSvc2", "AtRanluxGenSvc/AtRanluxGenSvc3"  };
 ApplicationMgr.ExtSvcCreates = false;
 
diff --git a/Control/RngComps/share/AtRndmGen_test.ref b/Control/RngComps/share/AtRndmGen_test.ref
index a8e1457403ff6fe2443a61f5d6caedc8b04e233c..dcb6f191c0d015c90221f2265abdb0f97c0e4c07 100644
--- a/Control/RngComps/share/AtRndmGen_test.ref
+++ b/Control/RngComps/share/AtRndmGen_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/AtRndmGen_test.txt
 JobOptionsSvc        INFO # =======> /home/leggett/work/v30r1.002/src/Control/RngComps/share/../share/AtRndmGen_test.txt
-JobOptionsSvc        INFO # (5,1): ApplicationMgr.DLLs += ["AthenaServices"]
+JobOptionsSvc        INFO # (5,1): ApplicationMgr.Dlls += ["AthenaServices"]
 JobOptionsSvc        INFO # (7,1): ApplicationMgr.ExtSvc += ["AtRndmGenSvc", "AtRndmGenSvc/AtRndmGenSvc2", "AtRndmGenSvc/AtRndmGenSvc3"]
 JobOptionsSvc        INFO # (8,1): ApplicationMgr.ExtSvcCreates = 0
 JobOptionsSvc        INFO # (10,1): MessageSvc.OutputLevel = 2
diff --git a/Control/RngComps/share/AtRndmGen_test.txt b/Control/RngComps/share/AtRndmGen_test.txt
index d839d74c1ea418741914838169868c02a5b23315..3e81463c51fb33137e7a11709add7f0fc2f68c41 100644
--- a/Control/RngComps/share/AtRndmGen_test.txt
+++ b/Control/RngComps/share/AtRndmGen_test.txt
@@ -2,7 +2,7 @@
 
 // $Id: AtRndmGen_test.txt,v 1.2 2002-11-27 23:29:41 calaf Exp $
 
-ApplicationMgr.DLLs += { "AthenaServices" };
+ApplicationMgr.Dlls += { "AthenaServices" };
 
 ApplicationMgr.ExtSvc += { "AtRndmGenSvc", "AtRndmGenSvc/AtRndmGenSvc2", "AtRndmGenSvc/AtRndmGenSvc3"  };
 ApplicationMgr.ExtSvcCreates = false;
diff --git a/Control/RngComps/share/TestSeedRunEvent.ref b/Control/RngComps/share/TestSeedRunEvent.ref
index 9e99663e8b14bbc87cb86cce867bb9e0663673a2..1f9dccd671a47b2bf438f324708e27609c7b3ab0 100644
--- a/Control/RngComps/share/TestSeedRunEvent.ref
+++ b/Control/RngComps/share/TestSeedRunEvent.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 AtRanTestAlg        DEBUG Property update for OutputLevel : new value = 2
diff --git a/Control/RootUtils/CMakeLists.txt b/Control/RootUtils/CMakeLists.txt
index 9f5008148faf6e7f85efc25f8adc34cb27619459..806b64cd0aa65d39050b06602f64f6f132a7e568 100644
--- a/Control/RootUtils/CMakeLists.txt
+++ b/Control/RootUtils/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: RootUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RootUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/CxxUtils
-                          PRIVATE
-                          AtlasTest/TestTools )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( Python COMPONENTS Development )
@@ -42,7 +34,6 @@ atlas_add_library( RootUtilsPyROOT
                    LINK_LIBRARIES ${Python_LIBRARIES} ${Boost_LIBRARIES} RootUtils
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools )
 
-
 atlas_add_dictionary( RootUtilsPyROOTDict
                       RootUtils/RootUtilsPyROOTDict.h
                       RootUtils/selection_PyROOT.xml
diff --git a/Control/SGComps/CMakeLists.txt b/Control/SGComps/CMakeLists.txt
index ccd063bec780c018d13291f262270a166df02a96..cc3482fed378e4c81a885258889e0f135edbce23 100644
--- a/Control/SGComps/CMakeLists.txt
+++ b/Control/SGComps/CMakeLists.txt
@@ -1,53 +1,34 @@
-################################################################################
-# Package: SGComps
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( SGComps )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   AtlasTest/TestTools
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/SGTools
-   Control/StoreGate
-   Control/AthLinks
-   Control/AthContainersInterfaces
-   Control/AthContainers
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 find_package( ROOT COMPONENTS Core )
 
 # Component(s) in the package:
-atlas_add_component( SGComps src/*.h src/*.cxx src/components/*.cxx
+atlas_add_component( SGComps
+   src/*.h src/*.cxx src/components/*.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} TestTools AthenaBaseComps AthenaKernel
-   SGTools StoreGateLib SGtests GaudiKernel AthLinks AthContainers )
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthContainersInterfaces AthLinks AthenaBaseComps AthenaKernel CxxUtils GaudiKernel SGTools StoreGateLib )
 
-atlas_install_python_modules( python/*.py 
-                              POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
 # Declare the test(s) of the package:
 atlas_add_test( SGFolder_test
    SOURCES test/SGFolder_test.cxx src/SGFolder.cxx
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES TestTools GaudiKernel SGTools AthenaKernel AthenaBaseComps AthLinks
+   LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel SGTools TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
  atlas_add_test( ProxyProviderSvc_test
    SOURCES test/ProxyProviderSvc_test.cxx
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES TestTools GaudiKernel SGTools AthenaKernel AthenaBaseComps AthLinks
+   LINK_LIBRARIES AthenaKernel GaudiKernel SGTools TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
  atlas_add_test( AddressRemappingSvc_test
    SOURCES test/AddressRemappingSvc_test.cxx
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES TestTools GaudiKernel SGTools AthenaKernel AthenaBaseComps AthLinks
+   LINK_LIBRARIES AthContainersInterfaces AthenaBaseComps AthenaKernel GaudiKernel SGTools TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( AddressRemappingConfig_test
diff --git a/Control/StoreGate/src/setupStoreGate.cxx b/Control/StoreGate/src/setupStoreGate.cxx
index 1fb6fbd3bd6013ba3c34a83dfb273c1e689d2e2f..913f2bd0f6d0a3d93c043929d2f2265724fb923a 100644
--- a/Control/StoreGate/src/setupStoreGate.cxx
+++ b/Control/StoreGate/src/setupStoreGate.cxx
@@ -44,8 +44,8 @@ bool setupStoreGate (std::string progname,
     {
       std::list<std::string> opts;
       opts.push_back("#pragma print off");
-      opts.push_back("ApplicationMgr.DLLs += { \"StoreGate\" };");
-      //opts.push_back("ApplicationMgr.DLLs += { \"CLIDSvc\" };");
+      opts.push_back("ApplicationMgr.Dlls += { \"StoreGate\" };");
+      //opts.push_back("ApplicationMgr.Dlls += { \"CLIDSvc\" };");
       opts.push_back("ApplicationMgr.ExtSvc += { \"ClassIDSvc\" };");
       opts.push_back("ApplicationMgr.ExtSvc += { \"StoreGateSvc\", \"StoreGateSvc/DetectorStore\", \"StoreGateSvc/HistoryStore\" };");
       opts.push_back("ApplicationMgr.ExtSvc += { \"ActiveStoreSvc\" };");
diff --git a/Control/StoreGate/test/VarHandleKeyProperty_test.cxx b/Control/StoreGate/test/VarHandleKeyProperty_test.cxx
index e05f07c80d44984cf762cfc075fcfe822bb0f680..dd41003f2fae52167f596fa3a2eb1a937df2dcf0 100644
--- a/Control/StoreGate/test/VarHandleKeyProperty_test.cxx
+++ b/Control/StoreGate/test/VarHandleKeyProperty_test.cxx
@@ -187,12 +187,12 @@ public:
   virtual StatusCode queryInterface(const InterfaceID &/*ti*/, void** /*pp*/) override
   { std::abort(); }
 
-  virtual StatusCode setProperty( const Property& p ) override
-  { return mgr.setProperty(p); }
   virtual StatusCode setProperty( const std::string& s ) override
   { return mgr.setProperty(s); }
-  virtual StatusCode setProperty( const std::string& n, const std::string& v ) override
-  { return mgr.setProperty(n, v); }
+  virtual StatusCode setProperty( const std::string& n, const Gaudi::Details::PropertyBase& p ) override
+  { return mgr.setProperty(n, p); }
+  virtual StatusCode setPropertyRepr( const std::string& n, const std::string& r ) override
+  { return mgr.setPropertyRepr(n,r); }
   virtual StatusCode getProperty( Property* p ) const override
   { return mgr.getProperty (p); }
   virtual const Property& getProperty( const std::string& name) const override
diff --git a/Control/StoreGate/test/VarHandleProperty_test.cxx b/Control/StoreGate/test/VarHandleProperty_test.cxx
index 8443c28fee2ad017e1d7296c263b3b9cc7877394..9736dda12934f07ab2d665ff58496f0ae01caf2d 100644
--- a/Control/StoreGate/test/VarHandleProperty_test.cxx
+++ b/Control/StoreGate/test/VarHandleProperty_test.cxx
@@ -50,12 +50,12 @@ public:
   virtual StatusCode queryInterface(const InterfaceID &/*ti*/, void** /*pp*/) override
   { std::abort(); }
 
-  virtual StatusCode setProperty( const Property& p ) override
-  { return mgr.setProperty(p); }
   virtual StatusCode setProperty( const std::string& s ) override
   { return mgr.setProperty(s); }
-  virtual StatusCode setProperty( const std::string& n, const std::string& v ) override
-  { return mgr.setProperty(n, v); }
+  virtual StatusCode setProperty( const std::string& n, const Gaudi::Details::PropertyBase& p ) override
+  { return mgr.setProperty(n, p); }
+  virtual StatusCode setPropertyRepr( const std::string& n, const std::string& r ) override
+  { return mgr.setPropertyRepr(n,r); }
   virtual StatusCode getProperty( Property* p ) const override
   { return mgr.getProperty (p); }
   virtual const Property& getProperty( const std::string& name) const override
diff --git a/Control/Valkyrie/CMakeLists.txt b/Control/Valkyrie/CMakeLists.txt
index a3e523e618ce47abd77cb576833af64708352386..a6b3ba8e6571ce1889420975330723f2b8b2cb23 100644
--- a/Control/Valkyrie/CMakeLists.txt
+++ b/Control/Valkyrie/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: Valkyrie
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Valkyrie )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaCommon
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( valgrind )
diff --git a/Control/Valkyrie/python/JobOptCfg.py b/Control/Valkyrie/python/JobOptCfg.py
index fa5ed4521563eb7b170e1cd99c66c908ecd08229..03e740b557371fb25a7f01eed80649847767e521 100644
--- a/Control/Valkyrie/python/JobOptCfg.py
+++ b/Control/Valkyrie/python/JobOptCfg.py
@@ -5,16 +5,16 @@
 # @author: Frank Winklmeier
 
 # import the automatically generated Configurable
-from ValkyrieConf import ValgrindSvc as _ValgrindSvc
+from Valkyrie.ValkyrieConf import ValgrindSvc as _ValgrindSvc
 
 class ValgrindSvc( _ValgrindSvc):
-   
+
     __slots__ = ( )      # enforce no new properties
 
     def __init__(self, name = "ValgrindSvc", **kwargs ):
        # have to call base init
        kwargs['name'] = name
-       super( ValgrindSvc, self ).__init__( **kwargs )       
+       super( ValgrindSvc, self ).__init__( **kwargs )
 #       return
 
 #    def setDefaults( cls, handle ):
@@ -35,4 +35,4 @@ class ValgrindSvc( _ValgrindSvc):
 
     pass  # class ValgrindSvc
 
- 
+
diff --git a/Control/xAODDataSource/CMakeLists.txt b/Control/xAODDataSource/CMakeLists.txt
index eaa136f2594073e31f621703da24b7ab096caea3..cb80de808345da0b5844a56a42762b941f8d79b3 100644
--- a/Control/xAODDataSource/CMakeLists.txt
+++ b/Control/xAODDataSource/CMakeLists.txt
@@ -3,13 +3,6 @@
 # Set the name of the package.
 atlas_subdir( xAODDataSource )
 
-# Set its dependencies on other packages.
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/CxxUtils
-   Control/RootUtils
-   Control/xAODRootAccess )
-
 # External dependencies. VDT is necessary because the DataFrame code has
 # a public dependency on it.
 find_package( ROOT COMPONENTS Core Tree TreePlayer RIO ROOTDataFrame )
diff --git a/DataQuality/DataQualityConfigurations/CMakeLists.txt b/DataQuality/DataQualityConfigurations/CMakeLists.txt
index dcae0a350cdbe48b2a0184e61aaa170de03bc7cc..4e11aa4cc5d6bd0511d9b265642564e0b9044ac0 100644
--- a/DataQuality/DataQualityConfigurations/CMakeLists.txt
+++ b/DataQuality/DataQualityConfigurations/CMakeLists.txt
@@ -54,7 +54,7 @@ foreach( hanfile collisions_run collisions_minutes10
       ${CMAKE_CURRENT_SOURCE_DIR}/config ${configOutputFile}
       # Build binary config
       COMMAND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh
-      han-config-gen ${configOutputFile}
+      han-config-gen ${configOutputFile} -b true
       # Deploy binary config
       COMMAND ${CMAKE_COMMAND} -E copy
       ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${hanfile}.hcfg
diff --git a/DataQuality/DataQualityConfigurations/config/common/collisions_run.config b/DataQuality/DataQualityConfigurations/config/common/collisions_run.config
index 9da3e17599e6e20302f18274a15c31f8b2d9b23c..6205a7511aec2dd54f8b7fd97c2379ab10916dd1 100644
--- a/DataQuality/DataQualityConfigurations/config/common/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/common/collisions_run.config
@@ -7,6 +7,7 @@ reference CentrallyManagedReferences {
   file = data18_13TeV.00358031.express_express.merge.HIST.f961_h322._0001.1
   path = run_358031
   info = Run 358031, express_express
+  #database = collisions
   name = same_name
 }
 
@@ -15,6 +16,7 @@ reference CentrallyManagedReferences_Main {
   file = data18_13TeV.00358031.physics_Main.merge.HIST.f961_h322._0001.1
   path = run_358031
   info = Run 358031, physics_Main
+  #database = collisions
   name = same_name
 }
 
@@ -23,6 +25,7 @@ reference CentrallyManagedReferences_Trigger {
   file = data18_13TeV.00356177.express_express.merge.HIST.f956_h317._0001.1
   path = run_356177
   info = Run 356177, express_express
+  #database = collisions
   name = same_name
 }
 
@@ -31,6 +34,7 @@ reference CentrallyManagedReferences_TriggerMain {
   file = data18_13TeV.00356177.physics_Main.merge.HIST.f956_h319._0001.1
   path = run_356177
   info = Run 356177, physics_Main
+  #database = collisions
   name = same_name
 }
 
@@ -39,10 +43,10 @@ reference CentrallyManagedReferences_TriggerBphysLS {
   file = data18_13TeV.00356177.physics_BphysLS.merge.HIST.f961_h322._0001.1
   path = run_356177
   info = Run 356177, physics_BphysLS
+  #database = collisions
   name = same_name
 }
 
-
 ####################
 # Common Algorithms
 ####################
diff --git a/DataQuality/DataQualityConfigurations/config/common/cosmics_run.config b/DataQuality/DataQualityConfigurations/config/common/cosmics_run.config
index 3327a54eaed4566a8927d464c52c5187c3e71949..ea7d1442fe4c5f920bf1518415547995b522c6ce 100644
--- a/DataQuality/DataQualityConfigurations/config/common/cosmics_run.config
+++ b/DataQuality/DataQualityConfigurations/config/common/cosmics_run.config
@@ -2,11 +2,13 @@
 # References
 #######################
 
+
 reference CentrallyManagedReferences {
   location = /eos/atlas/atlascerngroupdisk/data-dqm/references/,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-dqm/references/
   file = data16_cos.00306147.express_express.merge.HIST.f738_h161._0001.1
   path = run_306147
   info = Run 306147, express
+  #database = cosmics
   name = same_name
 }
 
@@ -15,6 +17,7 @@ reference CentrallyManagedReferences_Main {
   file = data16_cos.00306147.express_express.merge.HIST.f738_h161._0001.1
   path = run_306147
   info = Run 306147, express
+  #database = cosmics
   name = same_name
 }
 
@@ -23,6 +26,7 @@ reference CentrallyManagedReferences_Trigger {
   file = data16_cos.00306147.express_express.merge.HIST.f738_h161._0001.1
   path = run_306147
   info = Run 306147, express
+  #database = cosmics
   name = same_name
 }
 
@@ -31,6 +35,7 @@ reference CentrallyManagedReferences_TriggerMain {
   file = data16_cos.00306147.express_express.merge.HIST.f738_h161._0001.1
   path = run_306147
   info = Run 306147, express
+  #database = cosmics
   name = same_name
 }
 
diff --git a/DataQuality/DataQualityConfigurations/config/common/heavyions_run.config b/DataQuality/DataQualityConfigurations/config/common/heavyions_run.config
index 51be8d8f9cec6fd2c81b7b06c43915865135d58f..df8db9207e7e8b7b60d29fa763326a81dc6959c8 100644
--- a/DataQuality/DataQualityConfigurations/config/common/heavyions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/common/heavyions_run.config
@@ -7,6 +7,7 @@ reference CentrallyManagedReferences {
   file = data18_hi.00365678.express_express.merge.HIST.f1021_h331._0001.1
   path = run_365678
   info = Run 365678, express
+  #database = heavyions
   name = same_name
 }
 
@@ -15,6 +16,7 @@ reference CentrallyManagedReferences_Main {
   file = data18_hi.00365678.express_express.merge.HIST.f1021_h331._0001.1
   path = run_365678
   info = Run 365678, physics_Main
+  #database = heavyions
   name = same_name
 }
 
@@ -23,6 +25,7 @@ reference CentrallyManagedReferences_Trigger {
   file = data18_hi.00365573.express_express.merge.HIST.f1021_h331._0001.1
   path = run_365573
   info = Run 365573, express
+  #database = heavyions
   name = same_name
 }
 
@@ -31,6 +34,7 @@ reference CentrallyManagedReferences_TriggerMain {
   file = data18_hi.00365573.express_express.merge.HIST.f1021_h331._0001.1
   path = run_365573
   info = Run 365573, physics_Main
+  #database = heavyions
   name = same_name
 }
 
@@ -39,6 +43,7 @@ reference CentrallyManagedReferences_UPC {
   file = data18_hi.00365678.physics_UPC.merge.HIST.f1022_h331._0001.1
   path = run_365678
   info = Run 365678, physics_UPC
+  #database = heavyions
   name = same_name
 }
 
@@ -47,6 +52,7 @@ reference CentrallyManagedReferences_TriggerUPC {
   file = data18_hi.00365573.physics_UPC.merge.HIST.f1022_h331._0001.1
   path = run_365573
   info = Run 365573, physics_UPC
+  #database = heavyions
   name = same_name
 }
 
@@ -55,6 +61,7 @@ reference CentrallyManagedReferences_HardProbes {
   file = data18_hi.00365678.physics_HardProbes.merge.HIST.f1021_h331._0001.1
   path = run_365678
   info = Run 365678, physics_HardProbes
+  #database = heavyions
   name = same_name
 }
 
@@ -63,9 +70,11 @@ reference CentrallyManagedReferences_TriggerHardProbes {
   file = data18_hi.00365573.physics_HardProbes.merge.HIST.f1021_h331._0001.1
   path = run_365573
   info = Run 365573, physics_HardProbes
+  #database = heavyions
   name = same_name
 }
 
+
 ####################
 # Common Algorithms
 ####################
diff --git a/DataQuality/DataQualityInterfaces/CMakeLists.txt b/DataQuality/DataQualityInterfaces/CMakeLists.txt
index 9d2ecff821188fc55edaa28b3de1b3a1ff0f80b2..380a68b28a7bb6134bba071d92242003888ab372 100644
--- a/DataQuality/DataQualityInterfaces/CMakeLists.txt
+++ b/DataQuality/DataQualityInterfaces/CMakeLists.txt
@@ -9,12 +9,15 @@ atlas_subdir( DataQualityInterfaces )
 find_package( Boost COMPONENTS system regex thread filesystem )
 find_package( ROOT COMPONENTS Cint Hist RIO Tree Core MathCore pthread Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
 find_package( tdaq-common COMPONENTS dqm_core_io dqm_core dqm_dummy_io dqm_dummy )
+find_package( COOL COMPONENTS CoolKernel CoolApplication )
+find_package( CORAL COMPONENTS CoralBase )
+find_package( nlohmann_json )
 
 # Component(s) in the package:
 atlas_add_root_dictionary( DataQualityInterfaces
                            DataQualityInterfacesDictSource
-                           ROOT_HEADERS DataQualityInterfaces/MiniConfig.h DataQualityInterfaces/MiniConfigTreeNode.h DataQualityInterfaces/HanApp.h DataQualityInterfaces/HanConfig.h DataQualityInterfaces/HanConfigAlgLimit.h DataQualityInterfaces/HanConfigAlgPar.h DataQualityInterfaces/HanConfigParMap.h DataQualityInterfaces/HanConfigAssessor.h DataQualityInterfaces/HanConfigCompAlg.h DataQualityInterfaces/HanConfigGroup.h DataQualityInterfaces/HanConfigMetadata.h DataQualityInterfaces/ConditionsSingleton.h DataQualityInterfaces/LinkDef.h
-                           EXTERNAL_PACKAGES ROOT  Boost tdaq-common )
+                           ROOT_HEADERS DataQualityInterfaces/DatabaseConfig.h DataQualityInterfaces/MiniConfig.h DataQualityInterfaces/MiniConfigTreeNode.h DataQualityInterfaces/HanApp.h DataQualityInterfaces/HanConfig.h DataQualityInterfaces/HanConfigAlgLimit.h DataQualityInterfaces/HanConfigAlgPar.h DataQualityInterfaces/HanConfigParMap.h DataQualityInterfaces/HanConfigAssessor.h DataQualityInterfaces/HanConfigCompAlg.h DataQualityInterfaces/HanConfigGroup.h DataQualityInterfaces/HanConfigMetadata.h DataQualityInterfaces/ConditionsSingleton.h DataQualityInterfaces/LinkDef.h
+                           EXTERNAL_PACKAGES ROOT  Boost tdaq-common COOL CORAL nlohmann_json)
 
 atlas_add_library( DataQualityInterfaces
                    src/HanAlgorithmConfig.cxx
@@ -29,6 +32,7 @@ atlas_add_library( DataQualityInterfaces
                    src/HanConfigMetadata.cxx
                    src/HanOutput.cxx
                    src/MiniConfig.cxx
+                   src/DatabaseConfig.cxx
                    src/MiniConfigTreeNode.cxx
                    src/CompositeAlgorithm.cxx
                    src/HanInputRootFile.cxx
@@ -36,8 +40,8 @@ atlas_add_library( DataQualityInterfaces
                    src/ConditionsSingleton.cxx
                    ${DataQualityInterfacesDictSource}
                    PUBLIC_HEADERS DataQualityInterfaces
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} )
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} nlohmann_json::nlohmann_json ${COOL_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} nlohmann_json::nlohmann_json ${CORAL_LIBRARIES} ${COOL_LIBRARIES} )
 
 atlas_add_executable( han
                       src/han.cxx
@@ -46,8 +50,8 @@ atlas_add_executable( han
 
 atlas_add_executable( han-config-gen
                       src/han_config_gen.cxx
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} DataQualityInterfaces )
+                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}  nlohmann_json::nlohmann_json ${COOL_INCLUDE_DIRS}
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} DataQualityInterfaces nlohmann_json::nlohmann_json ${CORAL_LIBRARIES} ${COOL_LIBRARIES} )
 
 atlas_add_executable( han-config-print
                       src/han_config_print.cxx
diff --git a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/DatabaseConfig.h b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/DatabaseConfig.h
new file mode 100644
index 0000000000000000000000000000000000000000..37a7824d9c6c25f9a25f70f01b4a6edc19aaaf87
--- /dev/null
+++ b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/DatabaseConfig.h
@@ -0,0 +1,43 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef dqiDatabaseConfig_h
+#define dqiDatabaseConfig_h
+
+#include <iostream>
+#include <optional>
+#include <nlohmann/json.hpp>
+#include "CoolKernel/IFolder.h"
+#include "CoolKernel/IDatabase.h"
+
+namespace dqi {
+
+class DatabaseConfig {
+
+public:
+  DatabaseConfig(std::string connectionString, long runNumber);
+  nlohmann::json GetPayload(std::string tag);
+
+  bool IsConnected() const;
+  void Disconnect();
+
+private:
+  const std::string m_connectionString;
+  const long m_runNumber;
+
+  bool m_dbConnected;
+  bool m_folderConnected;
+
+  std::unordered_map<std::string, nlohmann::json> m_jsonData;
+  cool::IFolderPtr m_folder;
+  cool::IDatabasePtr m_database;
+
+  long GetRunNumber() const;
+  nlohmann::json LoadPayload(std::string tag);
+
+  void Connect();
+};
+
+}
+#endif
diff --git a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/HanConfig.h b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/HanConfig.h
index 91f266872276c9a363d58439c2c8b342a8f7bd31..8c655f6fed6c2839a143b1732a636003730ed0e9 100644
--- a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/HanConfig.h
+++ b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/HanConfig.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 dqiHanConfig_h
@@ -16,6 +16,7 @@
 #include "DataQualityInterfaces/MiniConfigTreeNode.h"
 #include "DataQualityInterfaces/HanConfigAssessor.h"
 #include "DataQualityInterfaces/HanConfigCompAlg.h"
+#include "DataQualityInterfaces/DatabaseConfig.h"
 
 #ifndef __CINT__
 #include <boost/shared_ptr.hpp>
@@ -44,17 +45,17 @@ public:
 
   HanConfig();
   virtual ~HanConfig();
-  
-  
-  virtual void AssembleAndSave( std::string infileName, std::string outfileName );
-  
+
+
+  virtual void AssembleAndSave( std::string infileName, std::string outfileName, std::string connectionString, long runNumber, bool bulk);
+
   virtual void BuildMonitors( std::string configName, dqm_core::Input& input, HanOutput& output );
 #ifndef __CINT__
   virtual boost::shared_ptr<dqm_core::Region> BuildMonitorsNewRoot( std::string configName, dqm_core::Input& input, dqm_core::Output& output );
 #endif
   virtual void BuildConfigOutput( std::string configName, TFile* inputFile, std::string path,
                                   std::map<std::string,TSeqCollection*>* outputMap, TSeqCollection *outputList );
-  
+
   virtual TObject* GetReference( std::string& groupName, std::string& name );
   virtual const HanConfigAssessor* GetAssessor( std::string& groupName, std::string& name ) const;
 
@@ -74,19 +75,28 @@ protected:
     HanConfig::DirMap_t& m_directories;
     TMap* m_refsourcedata;
   };
-  
+
+  class RefWriter : public MiniConfigTreeNode::Writer {
+  public:
+    RefWriter( DatabaseConfig& databaseConfig_, const bool bulk);
+    virtual void Write( MiniConfigTreeNode* node);
+  protected:
+    DatabaseConfig& m_databaseConfig;
+    const bool m_bulk;
+  };
+
   class AssessmentVisitorBase : public MiniConfigTreeNode::Visitor {
   public:
     AssessmentVisitorBase( HanConfigGroup* root_, const MiniConfig& algConfig_,
                            const MiniConfig& thrConfig_, const MiniConfig& refConfig_,
                            TFile* outfile_, HanConfig::DirMap_t& directories_,
 			   TMap* refsourcedata_ );
-  
+
   protected:
-  
+
     void GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
                                     std::string assessorName = "" ) const;
-    
+
     HanConfigGroup* m_root;
     const MiniConfig& m_algConfig;
     const MiniConfig& m_thrConfig;
@@ -96,10 +106,12 @@ protected:
     TMap* m_refsourcedata;
     // File cache
     mutable std::map<std::string, std::shared_ptr<TFile> > m_filecache;
+    // following is so we can skip repeated attempts to open nonexistent files
+    mutable std::unordered_set<std::string> m_badPaths;
     std::shared_ptr<TFile> GetROOTFile(std::string& fname) const;
   };
-  
-  
+
+
   class RegionVisitor : public AssessmentVisitorBase {
   public:
     RegionVisitor( HanConfigGroup* root_, const MiniConfig& algConfig_,
@@ -107,8 +119,8 @@ protected:
                    HanConfig::DirMap_t& directories_ );
     virtual void Visit( const MiniConfigTreeNode* node ) const;
   };
-  
-  
+
+
   class AssessmentVisitor : public AssessmentVisitorBase {
   public:
     AssessmentVisitor( HanConfigGroup* root_, const MiniConfig& algConfig_,
@@ -126,8 +138,8 @@ protected:
       Visit( const HanConfigAssessor* node, boost::shared_ptr<dqm_core::Region> ) const;
   protected:
     std::set<std::string>& m_regexes;
-  };  
-  
+  };
+
   class ConfigVisitor : public HanConfigAssessor::Visitor {
   public:
     ConfigVisitor( TFile* file_, dqm_core::Output* output_ );
@@ -138,7 +150,7 @@ protected:
     dqm_core::Output* m_output;
   };
 #endif
-  
+
   class CompAlgVisitor : public MiniConfigTreeNode::Visitor {
   public:
     CompAlgVisitor( TFile* outfile_ , const MiniConfig& compAlgConfig_);
@@ -147,7 +159,7 @@ protected:
     TFile* m_outfile;
     const MiniConfig& m_compAlgConfig;
   };
-  
+
   class MetadataVisitor : public MiniConfigTreeNode::Visitor {
   public:
     MetadataVisitor( TFile* outfile_ , const MiniConfig& metadataConfig_);
@@ -156,18 +168,18 @@ protected:
     TFile* m_outfile;
     const MiniConfig& m_metadataConfig;
   };
-  
+
 
   bool Initialize( std::string configName );
-  
-  
+
+
   TFile*             m_config;
 #ifndef __CINT__
   boost::shared_ptr<dqm_core::Region>  m_dqRoot;
 #endif
   HanConfigGroup*    m_top_level;
   TSeqCollection*    m_metadata;
-  
+
 //Get rid of Root macros that confuse Doxygen
 ///\cond CLASSDEF
   ClassDef( HanConfig, 0 ) // Creates a Han configuration from a MiniConfig
diff --git a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfig.h b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfig.h
index 4890ba5eda849889d1d1a5dcc3fd3f0ba6410a0a..adc71efbdf751d368668b8d1b2917013547b1548 100644
--- a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfig.h
+++ b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfig.h
@@ -27,39 +27,40 @@ class MiniConfig : public TObject {
 public:
 
   MiniConfig();
-  
+
   virtual ~MiniConfig();
-  
+
   virtual void AddKeyword( std::string keyword_ );
   virtual void AddAttributeKeyword( std::string keyword_ );
 
   virtual void SetAttribKeywordPropagateDown( bool propagateDown );
-  
+
   virtual bool ReadFile( std::string fileName );
-  
-  
+
+
   virtual std::string GetStringAttribute( std::string objName, std::string attName ) const;
-  
+
   virtual int GetIntAttribute( std::string objName, std::string attName ) const;
-  
+
   virtual float GetFloatAttribute( std::string objName, std::string attName ) const;
-  
+
   virtual void GetAttributeNames( std::string objName, std::set<std::string>& attSet ) const;
-  
+
   virtual void SendVisitor( const MiniConfigTreeNode::Visitor& visitor ) const;
-  
-  
+
+  virtual void SendWriter(MiniConfigTreeNode::Writer& writer );
+
 protected:
 
   typedef std::set<std::string>     KeySet_t;
   typedef KeySet_t::const_iterator  KeyIter_t;
-  
+
   KeySet_t             m_keywords;
   KeySet_t             m_attKeywords;
   MiniConfigTreeNode*  m_tree;
 
   bool m_propagateDown;
-  
+
 private:
 
 //Get rid of Root macros that confuse Doxygen
@@ -71,4 +72,3 @@ private:
 } // namespace dqi
 
 #endif
-
diff --git a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfigTreeNode.h b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfigTreeNode.h
index 60b7d04953b9c7d6aa9d5270619ff9b49b2369cf..79047c9010626325831a0854ef08c46bf94635dc 100644
--- a/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfigTreeNode.h
+++ b/DataQuality/DataQualityInterfaces/DataQualityInterfaces/MiniConfigTreeNode.h
@@ -33,13 +33,18 @@ public:
     virtual void Visit( const MiniConfigTreeNode* node ) const = 0;
   };
 
+  class Writer {
+  public:
+    virtual ~Writer() { }
+    virtual void Write(MiniConfigTreeNode* node ) = 0;
+  };
 
   MiniConfigTreeNode( std::string name_, MiniConfigTreeNode* parent_ );
-  
+
   virtual ~MiniConfigTreeNode();
-  
+
   virtual const char* GetName() const;
-  
+
   virtual const char* GetPathName() const;
 
 
@@ -47,38 +52,40 @@ public:
   * Returns a daughter of this node, creating one if necessary.  This method only returns
   * daughters, not granddaughters.
   */
-  
+
   virtual MiniConfigTreeNode*        GetNewDaughter( std::string name_ );
-  
+
   virtual MiniConfigTreeNode*        GetDaughter( std::string name_ ) const;
-  
+
   virtual MiniConfigTreeNode*        GetParent() const;
-  
+
   virtual std::map<std::string,dqi::MiniConfigTreeNode*> GetDaughters() const;
-  
+
  /**
   * This function takes the full path name of a subnode (in UNIX directory style) and
   * returns the corresponding subnode of this node, traversing the entire subtree until it is found.
   * If the bottom of the tree is reached before the full path has been used, the last node found
   * is returned.  If any part of the path is invalid before reaching the end of the tree, 0 is returned.
   */
-  
+
   virtual const MiniConfigTreeNode*  GetNode( std::string name_ ) const;
-  
-  
+
+
   virtual void                   SetAttribute( std::string attName, std::string attValue, bool isAttribKeyword = false );
-  
+
   virtual std::string            GetAttribute( std::string attName, bool calledFromDaughter = false ) const;
 
   virtual std::string            GetAttributeLocal( std::string attName ) const;
-  
+
   virtual void                   GetAttributeNames( std::set<std::string>& attSet, bool calledFromDaughter = false ) const;
-  
+
   virtual void                   GetAttributeNamesLocal( std::set<std::string>& attSet ) const;
-  
-  
+
+
   virtual void                   Accept( const Visitor& visitor ) const;
 
+  virtual void                   Accept(Writer& writer );
+
   virtual void                   SetAttribKeywordPropagateDown( bool propagateDown );
 
   virtual bool                   GetAttribKeywordPropagateDown() const;
@@ -87,14 +94,14 @@ protected:
 
   typedef std::map<std::string,MiniConfigTreeNode*>  NodeMap_t;
   typedef NodeMap_t::const_iterator              NodeIter_t;
-  
+
   typedef std::map<std::string,std::pair<std::string,bool> >      AttMap_t;
   typedef AttMap_t::const_iterator               AttIter_t;
-  
+
   const std::string  m_name;
   mutable std::string  m_path;
   MiniConfigTreeNode*    m_parent;
-  
+
   NodeMap_t          m_daughters;
   AttMap_t           m_attributes;
 
@@ -111,4 +118,3 @@ private:
 } // namespace dqi
 
 #endif
-
diff --git a/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx b/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c2950099fecc81cd58947a59debe488130f8c0c7
--- /dev/null
+++ b/DataQuality/DataQualityInterfaces/src/DatabaseConfig.cxx
@@ -0,0 +1,110 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include <iostream>
+#include <nlohmann/json.hpp>
+
+#include "CoolApplication/DatabaseSvcFactory.h"
+#include "CoolKernel/IDatabase.h"
+#include "CoolKernel/IDatabaseSvc.h"
+#include "CoolKernel/IObject.h"
+#include "CoolKernel/IFolder.h"
+#include "CoolKernel/IObject.h"
+
+#include "DataQualityInterfaces/DatabaseConfig.h"
+#include <array>
+
+namespace dqi {
+
+DatabaseConfig::
+DatabaseConfig(std::string connectionString, long runNumber)
+  : m_connectionString(connectionString)
+  , m_runNumber((runNumber << 32) + 1)
+  , m_dbConnected(false)
+  , m_folderConnected(false)
+{
+}
+
+void
+DatabaseConfig::
+Disconnect()
+{
+    if(m_dbConnected) {
+      m_database->closeDatabase();
+      m_dbConnected = false;
+      m_folderConnected = false;
+    }
+}
+
+void
+DatabaseConfig::
+Connect()
+{
+  try {
+    cool::IDatabaseSvc& dbSvc = cool::DatabaseSvcFactory::databaseService();
+    m_database = dbSvc.openDatabase(m_connectionString, true);
+
+  } catch (std::exception& e) {
+    std::cerr << "Unable to open database -> " << e.what() << '\n';
+    return;
+  }
+  m_dbConnected = true;
+  try {
+    m_folder= m_database->getFolder("/GLOBAL/DQM/REFERENCES");
+
+  } catch (std::exception& e) {
+    std::cerr << "Unable loading folder for this tag/run-> " << e.what() << '\n';
+    return;
+  }
+  m_folderConnected = true;
+}
+
+nlohmann::json
+DatabaseConfig::
+GetPayload(std::string tag)
+{
+  if(!m_dbConnected && !m_folderConnected) {
+    Connect();
+  }
+  if(m_jsonData.find(tag) == m_jsonData.end()) {
+    return LoadPayload(tag);
+  }
+  return m_jsonData.at(tag);
+}
+
+nlohmann::json
+DatabaseConfig::
+LoadPayload(std::string tag)
+{
+  nlohmann::json jsonData;
+  if(m_dbConnected && m_folderConnected) {
+    try {
+      cool::IObjectPtr object = m_folder->findObject(GetRunNumber(), 1, tag);
+
+      std::string data = object->payloadValue("jsonData");
+      jsonData = nlohmann::json::parse(data);
+      m_jsonData[tag] = jsonData;
+
+    } catch (std::exception& e) {
+      std::cerr << "Error: Failed loading payload for this tag/run-> " << e.what() << '\n';
+    }
+  }
+  return jsonData;
+}
+
+bool
+DatabaseConfig::
+IsConnected() const
+{
+  return m_dbConnected && m_folderConnected;
+}
+
+long
+DatabaseConfig::
+GetRunNumber() const
+{
+  return m_runNumber;
+}
+
+}
diff --git a/DataQuality/DataQualityInterfaces/src/HanConfig.cxx b/DataQuality/DataQualityInterfaces/src/HanConfig.cxx
index 3c2addf9f96dfd757faa5b0e0ef0992f7ed928f3..72c01c3b545b209a9a1362c3e82211eebc5876f4 100644
--- a/DataQuality/DataQualityInterfaces/src/HanConfig.cxx
+++ b/DataQuality/DataQualityInterfaces/src/HanConfig.cxx
@@ -42,6 +42,7 @@
 #include "DataQualityInterfaces/HanOutput.h"
 #include "DataQualityInterfaces/MiniConfig.h"
 #include "DataQualityInterfaces/HanUtils.h"
+#include "DataQualityInterfaces/DatabaseConfig.h"
 #include <boost/regex.hpp>
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -81,12 +82,12 @@ HanConfig::
 
 void
 HanConfig::
-AssembleAndSave( std::string infileName, std::string outfileName )
+AssembleAndSave( std::string infileName, std::string outfileName, std::string connectionString, long runNumber, bool bulk)
 {
   std::unique_ptr< TFile > outfile( TFile::Open( outfileName.c_str(),
                                                  "RECREATE" ) );
   DirMap_t directories;
-  
+
   // Collect reference histograms and copy to config file
   MiniConfig refconfig;
   refconfig.AddKeyword("reference");
@@ -94,13 +95,18 @@ AssembleAndSave( std::string infileName, std::string outfileName )
   TMap refsourcedata;
   RefVisitor refvisitor( outfile.get(), directories, &refsourcedata );
   refconfig.SendVisitor( refvisitor );
-  
+
+  DatabaseConfig databaseConfig(connectionString, runNumber);
+  RefWriter refwriter(databaseConfig, bulk);
+  refconfig.SendWriter( refwriter );
+  databaseConfig.Disconnect();
+
   // Collect threshold definitions
   MiniConfig thrconfig;
   thrconfig.AddKeyword("thresholds");
   thrconfig.AddAttributeKeyword("limits");
   thrconfig.ReadFile(infileName);
-  
+
   // Collect algorithm definitions
   MiniConfig algconfig;
   algconfig.AddKeyword("algorithm");
@@ -110,21 +116,21 @@ AssembleAndSave( std::string infileName, std::string outfileName )
   MiniConfig regconfig;
   regconfig.AddKeyword("output");
   regconfig.ReadFile(infileName);
-  
+
   // Collect histogram definitions
   MiniConfig histconfig;
   histconfig.AddKeyword("dir");
   histconfig.AddAttributeKeyword("hist");
   histconfig.SetAttribKeywordPropagateDown(false);
   histconfig.ReadFile(infileName);
-  
+
   // Collect and write composite-algorithm definitions
   MiniConfig compalgconfig;
   compalgconfig.AddKeyword("compositealgorithm");
   compalgconfig.ReadFile(infileName);
   CompAlgVisitor compalgvisitor(outfile.get(), compalgconfig);
   compalgconfig.SendVisitor(compalgvisitor);
-  
+
   MiniConfig metadataconfig;
   metadataconfig.AddKeyword("metadata");
   metadataconfig.ReadFile(infileName);
@@ -137,11 +143,11 @@ AssembleAndSave( std::string infileName, std::string outfileName )
 
   RegionVisitor regvisitor( root.get(), algconfig, thrconfig, refconfig, directories );
   regconfig.SendVisitor( regvisitor );
-  
-  AssessmentVisitor histvisitor( root.get(), algconfig, thrconfig, refconfig, outfile.get(), 
-				 directories, &refsourcedata );  
+
+  AssessmentVisitor histvisitor( root.get(), algconfig, thrconfig, refconfig, outfile.get(),
+				 directories, &refsourcedata );
   histconfig.SendVisitor( histvisitor );
-  
+
   outfile->WriteTObject(&refsourcedata, "refsourcedata");
   outfile->cd();
   root->Write();
@@ -157,9 +163,9 @@ BuildMonitors( std::string configName, dqm_core::Input& input, HanOutput& output
   if( !isInitialized ) {
     return;
   }
-  
+
   m_dqRoot = BuildMonitorsNewRoot( configName, input, output );
-  
+
   output.setConfig( this );
 }
 
@@ -171,7 +177,7 @@ BuildMonitorsNewRoot( std::string configName, dqm_core::Input& input, dqm_core::
   if( !isInitialized ) {
     return boost::shared_ptr<dqm_core::Region>();
   }
-  
+
   std::string algName( m_top_level->GetAlgName() );
   std::string algLibName( m_top_level->GetAlgLibName() );
   if( algLibName != "" ) {
@@ -184,7 +190,7 @@ BuildMonitorsNewRoot( std::string configName, dqm_core::Input& input, dqm_core::
   }
   dqm_core::RegionConfig regc( algName, 1.0 );
   boost::shared_ptr<dqm_core::Region> retval(dqm_core::Region::createRootRegion( "top_level", input, output, regc ));
-  
+
   ConfigVisitor confvisitor( m_config, &output );
   m_top_level->Accept( confvisitor, retval );
   return retval;
@@ -199,21 +205,21 @@ BuildConfigOutput( std::string configName, TFile* inputFile, std::string path,
   if( !isInitialized ) {
     return;
   }
-  
+
   if( inputFile == 0 ) {
     return;
   }
-  
+
   TDirectory* basedir(0);
   if( path != "" ) {
     std::string pathForSearch = path;
     pathForSearch += "/dummyName";
     basedir = ChangeInputDir( inputFile, pathForSearch );
   }
-  
+
   if( basedir == 0 )
     basedir = inputFile;
-  
+
   TIter mdIter(m_metadata);
   TSeqCollection* mdList = newTList("HanMetadata_");
   HanConfigMetadata* md(0);
@@ -222,7 +228,7 @@ BuildConfigOutput( std::string configName, TFile* inputFile, std::string path,
   }
   TSeqCollection* top_level_list = m_top_level->GetList(basedir,*outputMap);
   top_level_list->Add( mdList );
-  outputList->Add( top_level_list );  
+  outputList->Add( top_level_list );
 }
 
 
@@ -233,7 +239,7 @@ GetReference( std::string& groupName, std::string& name )
   /*  if( m_top_level == 0 ) {
     return 0;
   }
-  
+
   HanConfigGroup* parent = m_top_level->GetNode(groupName);
   if( parent == 0 ) {
     parent = m_top_level;
@@ -251,13 +257,15 @@ GetReference( std::string& groupName, std::string& name )
 	return ref;
     }
   }
-  
+
   return 0;
 }
 
-std::string 
+std::string
 SplitReference(std::string refPath, std::string refName )
 {
+  // this will never be run in a multithread environment
+  static std::unordered_set<std::string> badPaths;
   //Split comma sepated inputs into individual file names
   std::string delimiter = ",";
   std::vector<std::string> refFileList;
@@ -275,15 +283,17 @@ SplitReference(std::string refPath, std::string refName )
     std::string fileName=refFileList.at(i)+refName;
     size_t first = fileName.find_first_not_of(" ");
     fileName.erase(0, first);
+    if (badPaths.find(fileName) != badPaths.end()) continue;
     if (gROOT->GetListOfFiles()->FindObject(fileName.c_str()) ) {
       return fileName;
-    } 
+    }
     else {
       if(TFile::Open(fileName.c_str())){
 	return fileName;
       }
       else{
-	std::cerr << "Unable to open " << fileName << ", trying next reference file" << std::endl;
+        badPaths.insert(fileName);
+	std::cerr << "Unable to open " << fileName << ", trying next reference file option" << std::endl;
       }
     }
   }
@@ -298,20 +308,20 @@ GetAssessor( std::string& groupName, std::string& name ) const
   if( m_top_level == 0 ) {
     return 0;
   }
-  
+
   HanConfigGroup* parent = m_top_level->GetNode(groupName);
   if( parent == 0 ) {
     parent = m_top_level;
   }
-  
+
   const HanConfigAssessor& a = parent->GetAssessor(name);
 
   return new HanConfigAssessor(a);
-} 
+}
 
 void
 HanConfig::
-GetRegexList(std::set<std::string>& regexlist) 
+GetRegexList(std::set<std::string>& regexlist)
 {
   RegexVisitor rv(regexlist);
   m_top_level->Accept(rv, boost::shared_ptr<dqm_core::Region>());
@@ -368,10 +378,39 @@ Visit( const MiniConfigTreeNode* node ) const
     if (! m_refsourcedata->FindObject(fileName.c_str())) {
       m_refsourcedata->Add(fnameostr, refInfo != "" ? new TObjString(refInfo.c_str())
 			   : new TObjString("Reference"));
-    }  
+    }
   }
 }
 
+HanConfig::RefWriter::
+RefWriter( DatabaseConfig& databaseConfig_, const bool bulk)
+  : m_databaseConfig(databaseConfig_),
+    m_bulk(bulk)
+{
+}
+
+
+void
+HanConfig::RefWriter::
+Write( MiniConfigTreeNode* node )
+{
+  std::string database = node->GetAttribute("database");
+
+  if(database != "") {
+    database += (m_bulk ? "-physics-UPD4" : "-express-UPD1");
+    nlohmann::json jsonPayload = m_databaseConfig.GetPayload(database);
+    std::string reference = node->GetName();
+
+    if(jsonPayload.find(reference) != jsonPayload.end()) {
+      nlohmann::json referenceJson = jsonPayload[reference];
+      for (nlohmann::json::iterator it = referenceJson.begin(); it != referenceJson.end(); ++it) {
+        node->SetAttribute(it.key(), it.value(), false);
+      }
+    } else {
+      std::cerr << "Unable to find reference definition in database: " << reference << '\n';
+    }
+   }
+}
 
 HanConfig::AssessmentVisitorBase::
 AssessmentVisitorBase( HanConfigGroup* root_, const MiniConfig& algConfig_,
@@ -396,12 +435,16 @@ GetROOTFile( std::string& fname ) const
   if (it != end(m_filecache)) {
     return it->second;
   } else {
+    if (m_badPaths.find(fname) != m_badPaths.end()) {
+      return std::shared_ptr<TFile>(nullptr);
+    }
     std::shared_ptr<TFile> thisptr(TFile::Open(fname.c_str()));
     if (thisptr.get()) {
       return ( m_filecache[fname] = thisptr );
      } else {
+       m_badPaths.insert(fname);
       return thisptr;
-    }	  
+    }
   }
 }
 
@@ -426,7 +469,7 @@ float AttribToFloat(const MiniConfigTreeNode* node, const std::string attrib,
 
 void
 HanConfig::AssessmentVisitorBase::
-GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID, 
+GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
                            std::string assessorName ) const
 {
   // bool hasName(false);
@@ -479,7 +522,7 @@ GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
       // for each condition ...
       for(size_t t=0;t<condPairs.size();t++){
 	std::string refID=condPairs.at(t).second;
-	std::string cond=condPairs.at(t).first;	
+	std::string cond=condPairs.at(t).first;
 	std::vector<std::string> refIDVec;
 	TObjArray *toarray(0);
 	bool isMultiRef(false);
@@ -532,13 +575,13 @@ GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
 	      m_outfile->cd(); //we are writing to the / folder of file
 	      TObject* obj;
 	      obj = key->ReadObj();
-	      if (isMultiRef) { 
+	      if (isMultiRef) {
 		TObject* cobj = obj->Clone();
 		TH1* hobj = dynamic_cast<TH1*>(cobj);
 		if (hobj) {
 		  hobj->SetName(thisRefID.c_str());
 		}
-		toarray->Add(cobj); 
+		toarray->Add(cobj);
 		delete obj;
 	      } else {
 		std::string algRefUniqueName=algRefFile+":/"+absAlgRefName;
@@ -586,8 +629,8 @@ GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
 	      }
 	    }
 	  }
-	} 
-	    
+	}
+
 	if (isMultiRef) {
 	  std::string algRefUniqueName=cond+"_multiple:/"+absAlgRefName;
 	  newRefId=CS.getNewReferenceName(algRefUniqueName,true);
@@ -608,9 +651,9 @@ GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
 	    std::cerr<<"Warning New reference id is empty for refId=\""
 		     <<refID<<"\", cond=\""<<cond<<"\", assessorName= \""
 		     <<assessorName<<"\""<<std::endl;
-		     } 
+		     }
 	} */
-	
+
 	if(!cond.empty()){
 	  newRefString<<cond<<":"<<newRefId<<";";
 	}else{
@@ -618,7 +661,7 @@ GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
 	}
       }
       dqpar->SetAlgRefName((newRefString.str()));
-			       
+
 //       std::string algRefName( m_refConfig.GetStringAttribute(refID,"name") );
 //       std::string algRefPath( m_refConfig.GetStringAttribute(refID,"path") );
 //       std::string absAlgRefName("");
@@ -676,15 +719,15 @@ Visit( const MiniConfigTreeNode* node ) const
   const MiniConfigTreeNode* parent = node->GetParent();
   if( parent == 0 )
     return;
-  
+
   const MiniConfigTreeNode* grandparent = parent->GetParent();
   auto alloc = std::make_unique<HanConfigGroup>();
   HanConfigGroup* reg = (grandparent==0) ? m_root : alloc.get();
-  
+
   std::string regName( node->GetName() );
   reg->SetName( regName );
   reg->SetPathName( node->GetPathName() );
-  
+
   std::string algID( node->GetAttribute("algorithm") );
   if( algID != "" ) {
     GetAlgorithmConfiguration( reg, algID );
@@ -715,7 +758,7 @@ RegexVisitor( std::set<std::string>& regexes_ )
 {
 }
 
-boost::shared_ptr<dqm_core::Node> 
+boost::shared_ptr<dqm_core::Node>
 HanConfig::RegexVisitor::
 Visit( const HanConfigAssessor* node, boost::shared_ptr<dqm_core::Region> ) const
 {
@@ -752,18 +795,18 @@ Visit( const MiniConfigTreeNode* node ) const
     const MiniConfigTreeNode* histNode = node->GetDaughter( *h );
     if( histNode == 0 )
       continue;
-    
+
     algID = histNode->GetAttribute("algorithm");
     regID = histNode->GetAttribute("output");
-    
+
     if( algID == "" ) {
       std::cerr << "No \"algorithm\" defined for " << histNode->GetPathName() << "\n";
       continue;
     }
-    
+
     if( regID == "" )
       regID = "top_level";
-    
+
     std::string strNodeName(histNode->GetName());
     std::string strHistName, strFullHistName;
     std::string::size_type atsign = strNodeName.find("@");
@@ -778,10 +821,10 @@ Visit( const MiniConfigTreeNode* node ) const
 
     if( strHistName == "all_in_dir" )
       continue;
-    
+
     if( defined.find(histNode->GetPathName()) != defined.end() )
       continue;
-    
+
     HanConfigAssessor dqpar;
     dqpar.SetName( histNode->GetPathName() );
 
@@ -790,16 +833,16 @@ Visit( const MiniConfigTreeNode* node ) const
     if (regexflag == "1" || regexflag == "true" || regexflag == "yes") {
     	dqpar.SetIsRegex(true);
     }
-    
+
     if (histNode->GetAttribute("weight") != "") {
       std::ostringstream err;
       err << "Weight attribute not a floating point type for " << histNode->GetPathName() << "; setting to zero";
       dqpar.SetWeight(AttribToFloat(histNode, "weight",
 				    err.str()));
     }
-        
+
     GetAlgorithmConfiguration( &dqpar, algID, strFullHistName );
-   
+
     std::set<std::string> histAtt2;
     histNode->GetAttributeNames( histAtt2 );
     std::set<std::string>::const_iterator histAttEnd2 = histAtt2.end();
@@ -818,7 +861,7 @@ Visit( const MiniConfigTreeNode* node ) const
     HanConfigParMap parMap;
     parMap.SetName("inputname"); parMap.SetValue( strFullHistName );
     dqpar.AddAnnotation(parMap);
-       
+
     HanConfigGroup* dqreg = m_root->GetNode( regID );
     dqreg = (dqreg==0) ? m_root : dqreg;
     if( dqreg != 0 ) {
@@ -826,12 +869,12 @@ Visit( const MiniConfigTreeNode* node ) const
     }
     defined.insert( strFullHistName );
   }
-  
+
   for( std::set<std::string>::const_iterator h = histAtt.begin(); h != histAttEnd; ++h ) {
     const MiniConfigTreeNode* histNode = node->GetDaughter( *h );
     if( histNode == 0 )
       continue;
-    
+
     algID = histNode->GetAttribute("algorithm");
     regID = histNode->GetAttribute("output");
 
@@ -839,7 +882,7 @@ Visit( const MiniConfigTreeNode* node ) const
       std::cerr << "No \"algorithm\" defined for " << histNode->GetPathName() << "\n";
       continue;
     }
-    
+
     if( regID == "" )
       regID = "top_level";
 
@@ -858,7 +901,7 @@ Visit( const MiniConfigTreeNode* node ) const
     }
 
     if( strHistName == "all_in_dir" ) {
-	
+
       std::string regexflag(histNode->GetAttribute("regex"));
       if (histNode->GetAttribute("regex") != "") {
       	std::cerr << "WARNING: all_in_dir and regex are incompatible; ignoring regex flag for " << histNode->GetPathName()
@@ -875,18 +918,18 @@ Visit( const MiniConfigTreeNode* node ) const
         std::cerr << "WARNING: No \"file\" defined for " << histNode->GetPathName() << "\n";
         continue;
       }
-      
+
       std::string refPath( m_refConfig.GetStringAttribute(refID,"path") );
-      
+
       std::string objPath("");
       std::string absObjPath("");
-      
+
       refFile = SplitReference( m_refConfig.GetStringAttribute(refID,"location"), refFile);
       std::shared_ptr<TFile> infile( GetROOTFile(refFile) );
       TDirectory* basedir(0);
       TDirectory* dir(0);
       TKey* key;
-      
+
       if( refPath != "" ) {
         //std::cout << "Searching under path \"" << refPath << "\" for " << "\"" << histNode->GetPathName() << "\"\n";
         absObjPath += refPath;
@@ -899,10 +942,10 @@ Visit( const MiniConfigTreeNode* node ) const
           continue;
         }
       }
-      
+
       if( basedir == 0 )
         basedir = infile.get();
-      
+
       std::string allPathName( histNode->GetPathName() );
       std::string::size_type i = allPathName.find_last_of('/');
       if( i != std::string::npos ) {
@@ -911,13 +954,13 @@ Visit( const MiniConfigTreeNode* node ) const
         absObjPath += std::string( allPathName, 0, i );
         absObjPath += "/";
       }
-      
+
       dir = ChangeInputDir( basedir, histNode->GetPathName() );
       if( dir == 0 ) {
         std::cerr << "INFO: Cannot find path \"" << absObjPath << "\" in reference file\n";
         continue;
       }
-      
+
       TIter next( dir->GetListOfKeys() );
       std::string objName;
       std::string absObjName;
@@ -931,21 +974,21 @@ Visit( const MiniConfigTreeNode* node ) const
         TEfficiency* tmpe = dynamic_cast<TEfficiency*>(tmpobj);
         if( tmph == 0 && tmpg == 0 && tmpe == 0 )
           continue;
-        
+
         objName = objPath;
         objName += std::string( tmpobj->GetName() );
         absObjName = absObjPath;
         absObjName += std::string( tmpobj->GetName() );
         delete tmpobj;
-        
+
         if( defined.find(objName) != defined.end() ||
 	    localdefined.find(objName) != localdefined.end() )
           continue;
-        
+
         TKey* test = getObjKey( infile.get(), absObjName );
         if( test == 0 )
           continue;
-        
+
         HanConfigAssessor dqpar;
         dqpar.SetName( objName + extension );
         GetAlgorithmConfiguration( &dqpar, algID, objName );
@@ -983,7 +1026,7 @@ Visit( const MiniConfigTreeNode* node ) const
         }
         localdefined.insert( objName );
       }
-      
+
       continue;
     }
   }
@@ -1013,7 +1056,7 @@ Visit( const HanConfigAssessor* node, boost::shared_ptr<dqm_core::Region> dqPare
       //std::cout << "Can't load library " << algLibName << ". Continuing regardless ..." << std::endl;
     }
   }
-  
+
   if( gnode != 0 ) {
     dqm_core::RegionConfig regc( algName, node->GetWeight() );
     std::string regName( gnode->GetPathName() );
@@ -1021,10 +1064,10 @@ Visit( const HanConfigAssessor* node, boost::shared_ptr<dqm_core::Region> dqPare
     m_output->addListener(regName, dqParent.get());
     return reg;
   }
-  
+
   std::string inputData( node->GetHistPath() );
   HanAlgorithmConfig* algConfig = new HanAlgorithmConfig( *node, m_file );
-  dqm_core::ParameterConfig parc( inputData, algName, node->GetWeight(), 
+  dqm_core::ParameterConfig parc( inputData, algName, node->GetWeight(),
 				  std::shared_ptr<HanAlgorithmConfig>(algConfig), node->GetIsRegex() );
   boost::shared_ptr<dqm_core::Node> par(dqParent->addParameter( node->GetName(), parc ));
   m_output->addListener(node->GetName(), dqParent.get());
@@ -1046,11 +1089,11 @@ Visit( const MiniConfigTreeNode* node ) const
 {
   m_outfile->cd();
   std::map<std::string,MiniConfigTreeNode*> daughters = node->GetDaughters();
-  std::map<std::string,MiniConfigTreeNode*>::const_iterator nodeiterEnd = daughters.end();  
+  std::map<std::string,MiniConfigTreeNode*>::const_iterator nodeiterEnd = daughters.end();
   for( std::map<std::string,MiniConfigTreeNode*>::const_iterator iter = daughters.begin(); iter != nodeiterEnd; ++iter ) {
     std::string compAlgID = iter->second->GetName();
     std::string compAlgKey = iter->first;
-    
+
     HanConfigCompAlg* compAlg = new HanConfigCompAlg();
     std::set<std::string> compAlgAtt;
     m_compAlgConfig.GetAttributeNames(compAlgID, compAlgAtt);
@@ -1062,7 +1105,7 @@ Visit( const MiniConfigTreeNode* node ) const
         std::string subAlgs( m_compAlgConfig.GetStringAttribute(compAlgID,"subalgs") );
         std::string::size_type pos = subAlgs.find(',');
         for(int size=subAlgs.size(), sizeOld=-8;
-    	    size != sizeOld; 
+    	    size != sizeOld;
     	    subAlgs.erase(0, pos+1), pos = subAlgs.find(","),sizeOld=size, size=subAlgs.size()) {
             //std::cout << "  --> adding component algorithm: " <<  subAlgs.substr(0,pos) << std::endl;
             compAlg->AddAlg( subAlgs.substr(0,pos));
@@ -1072,7 +1115,7 @@ Visit( const MiniConfigTreeNode* node ) const
         std::string libs( m_compAlgConfig.GetStringAttribute(compAlgID,"libnames") );
         std::string::size_type pos = libs.find(',');
         for(int size=libs.size(), sizeOld=-8;
-    	    size != sizeOld; 
+    	    size != sizeOld;
     	    libs.erase(0, pos+1), pos = libs.find(","),sizeOld=size, size=libs.size()) {
             //std::cout << "  --> using library: " <<  libs.substr(0,pos) << std::endl;
             compAlg->AddLib( libs.substr(0,pos));
@@ -1082,7 +1125,7 @@ Visit( const MiniConfigTreeNode* node ) const
     compAlg->Write();
   }
 }
-  
+
 HanConfig::MetadataVisitor::
 MetadataVisitor(TFile* outfile_, const MiniConfig& metadataConfig_)
   : m_outfile(outfile_)
@@ -1108,9 +1151,9 @@ Visit( const MiniConfigTreeNode* node ) const
       m_outfile->cd();
     }
   }
-    
+
   std::map<std::string,MiniConfigTreeNode*> daughters = node->GetDaughters();
-  std::map<std::string,MiniConfigTreeNode*>::const_iterator nodeiterEnd = daughters.end();  
+  std::map<std::string,MiniConfigTreeNode*>::const_iterator nodeiterEnd = daughters.end();
   for( std::map<std::string,MiniConfigTreeNode*>::const_iterator iter = daughters.begin(); iter != nodeiterEnd; ++iter ) {
     std::string metadataID = iter->second->GetName();
 
@@ -1127,14 +1170,14 @@ Visit( const MiniConfigTreeNode* node ) const
     delete metadata;
   }
 }
-   
+
 
 bool
 HanConfig::
 Initialize( std::string configName )
 {
   if( m_config == 0 || m_top_level == 0 ) {
-    
+
     delete m_config;
     delete m_top_level;
     if (m_metadata) {
@@ -1154,7 +1197,7 @@ Initialize( std::string configName )
     } else {
       std::cerr << "Can't retrieve reference source info" << std::endl;
     }
-    
+
     TIter nextKey( m_config->GetListOfKeys() );
     TKey* compAlgKey(0);
     while( (compAlgKey = dynamic_cast<TKey*>( nextKey() )) != 0 ) {
@@ -1166,7 +1209,7 @@ Initialize( std::string configName )
       }
       delete obj;
     }
-    
+
     TKey* key(0);
 
     m_metadata = newTList("HanMetadata");
@@ -1198,7 +1241,7 @@ Initialize( std::string configName )
       return false;
     }
   }
-  
+
   return true;
 }
 
@@ -1235,7 +1278,7 @@ ChangeInputDir( TDirectory* dir, std::string path )
     }
     return ChangeInputDir( dir, pName );
   }
-  
+
   return dir;
 }
 
@@ -1246,7 +1289,7 @@ ChangeOutputDir( TFile* file, std::string path, DirMap_t& directories )
 {
 	if( file == 0 )
 		return 0;
-	
+
   std::string::size_type i = path.find_last_of('/');
   if( i != std::string::npos ) {
     std::string subPath( path, 0, i );
@@ -1272,9 +1315,8 @@ ChangeOutputDir( TFile* file, std::string path, DirMap_t& directories )
       return dir;
     }
   }
-	
+
   return file;
 }
 
 } // namespace dqi
-
diff --git a/DataQuality/DataQualityInterfaces/src/MiniConfig.cxx b/DataQuality/DataQualityInterfaces/src/MiniConfig.cxx
index 684a503402986f614c7399382679faab443d3fea..af8bf1bb5f7f1bc8a5c842e7c6d4e4c502d29f49 100644
--- a/DataQuality/DataQualityInterfaces/src/MiniConfig.cxx
+++ b/DataQuality/DataQualityInterfaces/src/MiniConfig.cxx
@@ -9,6 +9,7 @@
 #include <fstream>
 #include <iostream>
 #include <sstream>
+#include <optional>
 //#include <algorithm>
 
 #include "boost/algorithm/string/case_conv.hpp"
@@ -74,19 +75,19 @@ MiniConfig::
 ReadFile( std::string fileName )
 {
   bool success(true);
-  
+
   delete m_tree;
   m_tree = new MiniConfigTreeNode( "global", 0 );
   m_tree->SetAttribKeywordPropagateDown( m_propagateDown );
   MiniConfigTreeNode* node = m_tree;
-  
+
   std::ifstream file( fileName.c_str() );
   if( !file ) {
     std::cerr << "MiniConfig::ReadFile(): "
               << "cannot read from file: " << fileName << "\n";
     return false;
   }
-  
+
   std::string line;
   char c;
   std::string key;
@@ -96,31 +97,31 @@ ReadFile( std::string fileName )
   std::string val;
   int skipCount(0);
   int lineNumber = 0;
-  
+
   while( getline(file,line) ) {
     ++lineNumber;
     std::istringstream linestream(line);
     c = 0;
-    
+
     while( linestream.get(c) ) {
       // ignore leading whitespace
       if( !isspace(c) ) {
         break;
       }
     }
-    
+
     // ignore empty lines
     if( c == 0 || isspace(c) ) {
       continue;
     }
-    
+
     // ignore comments
     if( c == '#' ) {
       continue;
     }
-    
+
     linestream.putback(c);
-    
+
     // check for: }
     linestream >> sep;
     if( !linestream ) {
@@ -144,10 +145,10 @@ ReadFile( std::string fileName )
       }
       continue;
     }
-    
+
     // check for: <att> = <val>
     att = sep;
-    linestream >> sep;    
+    linestream >> sep;
     if( !linestream ) {
       std::cerr << "MiniConfig::ReadFile(): "
                 << "badly formatted line: \"" << line << "\", line number " << lineNumber << "\n";
@@ -165,11 +166,11 @@ ReadFile( std::string fileName )
         continue;
       }
       if( skipCount == 0 ) {
-	node->SetAttribute( att, val, false );
+        node->SetAttribute( att, val, false );
       }
       continue;
     }
-    
+
     // check for: keyword <identifier> {
     key = att;
     const std::string& lokey = boost::algorithm::to_lower_copy(key);
@@ -183,7 +184,7 @@ ReadFile( std::string fileName )
       continue;
     }
     if( sep == "{" ) {
-      if( m_keywords.find(key) != m_keywords.end() 
+      if( m_keywords.find(key) != m_keywords.end()
 	  || m_keywords.find(lokey) != m_keywords.end() ) {
         node = node->GetNewDaughter( id );
       }
@@ -197,12 +198,12 @@ ReadFile( std::string fileName )
       }
       continue;
     }
-    
+
     std::cerr << "MiniConfig::ReadFile(): "
               << "badly formatted line: \"" << line << "\", line number " << lineNumber << "\n";
     success = false;
   }
-  
+
   return success;
 }
 
@@ -216,7 +217,7 @@ GetStringAttribute( std::string objName, std::string attName ) const
               << "not configured (no file has been read)\n";
     return std::string("");
   }
-  
+
   const MiniConfigTreeNode* node = m_tree->GetNode( objName );
   if( node == 0 ) {
     std::cerr << "MiniConfig::GetStringAttribute(): "
@@ -236,14 +237,14 @@ GetIntAttribute( std::string objName, std::string attName ) const
               << "not configured (no file has been read)\n";
     return 0;
   }
-  
+
   const MiniConfigTreeNode* node = m_tree->GetNode( objName );
   if( node == 0 ) {
     std::cerr << "MiniConfig::GetIntAttribute(): "
               << "\"" << objName << "\" does not exist\n";
     return 0;
   }
-  
+
   int val;
   std::string valstring = node->GetAttribute( attName );
   std::istringstream valstream(valstring);
@@ -253,7 +254,7 @@ GetIntAttribute( std::string objName, std::string attName ) const
               << "\"" << attName << "\" not an integer type\n";
     return 0;
   }
-  
+
   return val;
 }
 
@@ -267,14 +268,14 @@ GetFloatAttribute( std::string objName, std::string attName ) const
               << "not configured (no file has been read)\n";
     return 0;
   }
-  
+
   const MiniConfigTreeNode* node = m_tree->GetNode( objName );
   if( node == 0 ) {
     std::cerr << "MiniConfig::GetFloatAttribute(): "
               << "\"" << objName << "\" does not exist\n";
     return 0;
   }
-  
+
   float val;
   std::string valstring = node->GetAttribute( attName );
   std::istringstream valstream(valstring);
@@ -284,7 +285,7 @@ GetFloatAttribute( std::string objName, std::string attName ) const
               << ": \"" << attName << "\" not a floating-point type\n";
     return 0;
   }
-  
+
   return val;
 }
 
@@ -294,20 +295,20 @@ MiniConfig::
 GetAttributeNames( std::string objName, std::set<std::string>& attSet ) const
 {
   attSet.clear();
-  
+
   if( m_tree == 0 ) {
     std::cerr << "MiniConfig::GetAttributeNames(): "
               << "not configured (no file has been read)\n";
     return;
   }
-  
+
   const MiniConfigTreeNode* node = m_tree->GetNode( objName );
   if( node == 0 ) {
     std::cerr << "MiniConfig::GetAttributeNames(): "
               << "\"" << objName << "\" does not exist\n";
     return;
   }
-  
+
   node->GetAttributeNames( attSet );
 }
 
@@ -324,6 +325,17 @@ SendVisitor( const MiniConfigTreeNode::Visitor& visitor ) const
   }
 }
 
+void
+MiniConfig::
+SendWriter(MiniConfigTreeNode::Writer& writer)
+{
+  if( m_tree == 0 ) {
+    std::cerr << "MiniConfig::SendWriter(): "
+              << "not configured (no file has been read)\n";
+  } else {
+    m_tree->Accept(writer);
+  }
+}
 
-} // namespace dqi
 
+} // namespace dqi
diff --git a/DataQuality/DataQualityInterfaces/src/MiniConfigTreeNode.cxx b/DataQuality/DataQualityInterfaces/src/MiniConfigTreeNode.cxx
index 7e552b61976546a65fc7ed7d90c5f5a4fc57d659..f19819762ba2c787db823b350229a4a613b4f2ef 100644
--- a/DataQuality/DataQualityInterfaces/src/MiniConfigTreeNode.cxx
+++ b/DataQuality/DataQualityInterfaces/src/MiniConfigTreeNode.cxx
@@ -74,7 +74,7 @@ GetNewDaughter( std::string name_ )
   if( i != m_daughters.end() ) {
     return i->second;
   }
-  
+
   MiniConfigTreeNode* node = new MiniConfigTreeNode( name_, this );
   node->SetAttribKeywordPropagateDown(this->m_propagateDown);
   NodeMap_t::value_type nodeVal( name_, node );
@@ -103,7 +103,7 @@ GetParent() const
 }
 
 
-std::map<std::string,MiniConfigTreeNode*> 
+std::map<std::string,MiniConfigTreeNode*>
 MiniConfigTreeNode::
 GetDaughters() const
 {
@@ -117,7 +117,7 @@ GetNode( std::string name_ ) const
   if( m_daughters.size() == 0 ) {
     return this;
   }
-  
+
   std::string::size_type k = name_.find_first_of('/');
   if( k != std::string::npos ) {
     std::string dName( name_, 0, k );
@@ -132,7 +132,7 @@ GetNode( std::string name_ ) const
     }
     return GetNode( pName );
   }
-  
+
   NodeIter_t i = m_daughters.find( name_ );
   if( i == m_daughters.end() ) {
     return this;
@@ -167,7 +167,7 @@ GetAttribute( std::string attName, bool calledFromDaughter ) const
   return i->second.first;
 }
 
-// Like GetAttributes, but only returns attributes of *this* node, 
+// Like GetAttributes, but only returns attributes of *this* node,
 // not inherited ones
 std::string
 MiniConfigTreeNode::
@@ -225,6 +225,18 @@ Accept( const Visitor& visitor ) const
   }
 }
 
+void
+MiniConfigTreeNode::
+Accept(Writer& writer )
+{
+  writer.Write(this);
+  NodeIter_t daugEnd = m_daughters.end();
+  for( NodeIter_t i = m_daughters.begin(); i != daugEnd; ++i ) {
+    MiniConfigTreeNode* node = i->second;
+    node->Accept(writer);
+  }
+}
+
 void
 MiniConfigTreeNode::
 SetAttribKeywordPropagateDown( bool propagateDown )
@@ -240,4 +252,3 @@ GetAttribKeywordPropagateDown() const
 }
 
 } // namespace dqi
-
diff --git a/DataQuality/DataQualityInterfaces/src/han_config_gen.cxx b/DataQuality/DataQualityInterfaces/src/han_config_gen.cxx
index 06250c8199a5c96a5a96ba74e50b0e75ad5dece3..5a569247e132b212797850a1ef128ea129622184 100644
--- a/DataQuality/DataQualityInterfaces/src/han_config_gen.cxx
+++ b/DataQuality/DataQualityInterfaces/src/han_config_gen.cxx
@@ -1,9 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
- * $Id: han_config_gen.cxx,v 1.3 2009-02-09 15:19:59 ponyisi Exp $
+ * $Id: han_config_gen.cxx,v 1.3 2009-02-09 15:19:59 ponyisi $
  */
 
 #include <iostream>
@@ -20,6 +20,11 @@ void usage( const std::string& command_name, int exit_code );
 class CmdLineArgs {
 public:
   CmdLineArgs( int argc, char *argv[] );
+
+  
+  std::string m_connectionString =  "sqlite://;schema=/afs/cern.ch/user/a/atlasdqm/dqmdisk1/cherrypy-devel/RefDB.db;dbname=REFDB";
+  long m_runNumber = 2147483646;
+  bool m_bulk = false; 
   
   std::string command;
   std::string mconfig;
@@ -45,7 +50,7 @@ int main( int argc, char *argv[] )
   outfileName += ".hcfg";
   
   dqi::HanConfig config;
-  config.AssembleAndSave( infileName, outfileName );
+  config.AssembleAndSave( infileName, outfileName, arg.m_connectionString, arg.m_runNumber, arg.m_bulk);
   return 0;
 }
 
@@ -60,11 +65,44 @@ CmdLineArgs::
 CmdLineArgs( int argc, char *argv[] )
 {
   command = argv[0];
-  if( argc > 3 ) usage( command, 1 );
+  if( argc > 10 ) usage( command, 1 );
   if( argc < 2 ) usage( command, 0 );
   
   mconfig = argv[1];
-  if(argc==3)conds=argv[2];
+  
+  if(argc >= 3) {
+    int ic = 2;
+    while(ic < argc) {
+      int ir = argc - ic;
+      std::string par0 = argv[ic];
+      if(par0 == "-c") {
+      	if(ir > 1) {
+      	  m_connectionString = argv[ic + 1];
+          std::cout << "Setting DB connection string to " << m_connectionString << std::endl;
+	        ++ic;
+	      }
+      } else if(par0 == "-r") {
+	      if(ir > 1) {
+	        try {
+	          m_runNumber = std::stol(argv[ic + 1]);
+            std::cout << "Setting run number to " << m_runNumber << std::endl;
+	          ++ic;
+	        } catch(std::exception& e) {
+	          std::cout << "Error with input arguments, specified run " << argv[ic+1] << " not a long" << '\n';
+	        }
+	      }
+      } else if(par0 == "-b") {
+	      if(ir > 1) {
+	        m_bulk = (strcmp(argv[ic+1], "true") == 0);
+          std::cout << "Setting bulk processing mode to " << (m_bulk ? "true" : "false") << std::endl;
+	        ++ic;
+	      }
+      } else {
+	      conds = argv[ic];
+      }
+      ++ic;
+    }
+  }
 }
 
 
diff --git a/DataQuality/DataQualityUtils/CMakeLists.txt b/DataQuality/DataQualityUtils/CMakeLists.txt
index de9d784c7824656d7f8c04d4f75f39caae5805df..565713764670446a23d7975934fc08ad5a1427f6 100644
--- a/DataQuality/DataQualityUtils/CMakeLists.txt
+++ b/DataQuality/DataQualityUtils/CMakeLists.txt
@@ -83,13 +83,12 @@ atlas_add_executable( han-results-print
 atlas_install_python_modules( python/*.py
    POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-select E11,E402,W1 --extend-ignore E731 )
 
-atlas_install_scripts( scripts/CreateDB.py scripts/CreateDB_Histo.py scripts/DQHistogramMerge.py scripts/DQHistogramPrintStatistics.py scripts/DQWebDisplay.py scripts/hancool_histo.py scripts/hancool.py scripts/handi.py scripts/DQFileMove.py scripts/CreateMDTConfig_algos.sh scripts/CreateMDTConfig_chambers.sh scripts/CreateMDTConfig_config.sh scripts/CreateMDTConfig_files.sh scripts/CreateMDTConfig_readme.sh scripts/DQM_Tier0Wrapper_trf.py scripts/DQM_Tier0Wrapper_tf.py scripts/DQHistogramMergeRegExp.py scripts/dq_make_web_display.py scripts/ScanHistFile.py scripts/physval_make_web_display.py )
+atlas_install_scripts( scripts/DQHistogramMerge.py scripts/DQHistogramPrintStatistics.py scripts/DQWebDisplay.py scripts/hancool_histo.py scripts/hancool.py scripts/handi.py scripts/DQFileMove.py scripts/CreateMDTConfig_algos.sh scripts/CreateMDTConfig_chambers.sh scripts/CreateMDTConfig_config.sh scripts/CreateMDTConfig_files.sh scripts/CreateMDTConfig_readme.sh scripts/DQM_Tier0Wrapper_trf.py scripts/DQM_Tier0Wrapper_tf.py scripts/DQHistogramMergeRegExp.py scripts/dq_make_web_display.py scripts/ScanHistFile.py scripts/physval_make_web_display.py )
 
 # Aliases:
 atlas_add_alias( DQHistogramPrintStatistics "DQHistogramPrintStatistics.py" )
 atlas_add_alias( CreateMDTConfig_files "CreateMDTConfig_files.sh" )
 atlas_add_alias( CreateMDTConfig_algos "CreateMDTConfig_algos.sh" )
-atlas_add_alias( CreateDB_Histo "CreateDB_Histo.py" )
 atlas_add_alias( hancool "hancool.py" )
 atlas_add_alias( handi "handi.py" )
 atlas_add_alias( CreateMDTConfig_config "CreateMDTConfig_config.sh" )
diff --git a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
index ef29476bcdd3b1b575d9f0a8a4407bd6ba782929..694dec0587e05648ed4f8ba95b098668b59b72c0 100755
--- a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
+++ b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
@@ -125,7 +125,7 @@ static IntDbArray   s_int_Blob;
 
 
 RootTreeContainer::RootTreeContainer()
-: m_tree(nullptr), m_type(0), m_dbH(POOL_StorageType), 
+: m_tree(nullptr), m_type(0), m_dbH(POOL_StorageType),
   m_rootDb(nullptr), m_branchName(), m_ioBytes(0), m_treeFillMode(false),
   m_isDirty(false)
 {
@@ -148,7 +148,7 @@ long long int RootTreeContainer::size()    {
      TBranch * pBranch = m_tree->GetBranch(m_branchName.c_str());
      if (pBranch == nullptr) return 0;
      s += pBranch->GetEntries();
-  } else {     
+  } else {
      s += m_tree->GetEntries();
   }
   return s;
@@ -189,7 +189,7 @@ DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
              auto *store = reinterpret_cast<SG::IAuxStoreIO*>( (char*)dsc.object + dsc.aux_iostore_IFoffset );
              // cout << "---    store object= " <<hex << store <<dec << " in " << dsc.branch->GetName()  <<endl;
              // cout << "       obj=" << hex << dsc.object << dec << "  offset=" <<  dsc.aux_iostore_IFoffset << endl;
-             const SG::auxid_set_t selection = store->getSelectedAuxIDs(); 
+             const SG::auxid_set_t selection = store->getSelectedAuxIDs();
              log << DbPrintLvl::Debug << "       Attributes= " << selection.size() << DbPrint::endmsg;
              for(SG::auxid_t id : selection) {
                 BranchDesc&       newBrDsc( m_auxBranchMap[id] );
@@ -243,8 +243,8 @@ DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
       }
       if ( nullptr == p.ptr )   {
          DbPrint err( m_name);
-         err << DbPrintLvl::Error 
-             << "[RootTreeContainer] Could not write an object" 
+         err << DbPrintLvl::Error
+             << "[RootTreeContainer] Could not write an object"
              << DbPrint::endmsg;
          return Error;
       }
@@ -269,13 +269,13 @@ DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
          }
       }
    }
-      
+
    if( !isBranchContainer() ) {
       // Single Container per TTree - just Fill it now
       num_bytes = m_tree->Fill();
    } else if( m_treeFillMode ) {
       // Multiple containers per TTree - mark TTree for later Fill at commit
-      // cout << "----- " << m_name << " : TTree=" << m_tree->GetName() << " : marking DIRTY " << endl;       
+      // cout << "----- " << m_name << " : TTree=" << m_tree->GetName() << " : marking DIRTY " << endl;
       if( m_isDirty ) {
          DbPrint log(m_name);
          log << DbPrintLvl::Error << "Attempt to write to a Branch Container twice in the same transaction! "
@@ -290,7 +290,7 @@ DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
    }
    // else (branch container NOT in tree fill mode)
    // do nothing, the branch was filled in the previous block already
-    
+
    for(k=m_branches.begin(); k !=m_branches.end(); ++k) {
       switch ( (*k).column->typeID() )    {
        case DbColumn::BLOB:
@@ -306,8 +306,8 @@ DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
       return Success;
    }
    DbPrint err( m_name);
-   err << DbPrintLvl::Error 
-       << "[RootTreeContainer] Could not write an object" 
+   err << DbPrintLvl::Error
+       << "[RootTreeContainer] Could not write an object"
        << DbPrint::endmsg;
    m_ioBytes = -1;
    return Error;
@@ -324,7 +324,7 @@ DbStatus RootTreeContainer::fetch(DbSelect& sel)  {
     sel.link().second++;
     return DbContainerImp::fetch(sel.link(), sel.link());
   }
-  DbSelect::Ptr<TTreeFormula>* stmt = 
+  DbSelect::Ptr<TTreeFormula>* stmt =
     dynamic_cast<DbSelect::Ptr<TTreeFormula>* >(sel.statement());
   if ( stmt ) {
     TTreeFormula* selStmt = stmt->m_ptr;
@@ -362,7 +362,7 @@ DbStatus RootTreeContainer::fetch(DbSelect& sel)  {
 #include <iostream>
 using namespace std;
 
-DbStatus 
+DbStatus
 RootTreeContainer::loadObject(void** obj_p, ShapeH /*shape*/, Token::OID_t& oid)
 {
   long long evt_id = oid.second;
@@ -384,7 +384,7 @@ RootTreeContainer::loadObject(void** obj_p, ShapeH /*shape*/, Token::OID_t& oid)
          case DbColumn::TOKEN:
             // set data pointer to the object data member for this branch
             p = *obj_p;
-            p.c_str += dsc.column->offset(); 
+            p.c_str += dsc.column->offset();
             break;
          case DbColumn::BLOB:
             dsc.object = &s_char_Blob;
@@ -467,12 +467,12 @@ RootTreeContainer::loadObject(void** obj_p, ShapeH /*shape*/, Token::OID_t& oid)
   catch (...)   {
      DbPrint err(m_name);
      err << DbPrintLvl::Fatal << "[RootTreeContainer] "
-         << "Unknown exception occurred. Cannot give more details." 
+         << "Unknown exception occurred. Cannot give more details."
          << DbPrint::endmsg;
   }
   DbPrint log(m_name);
-  log << DbPrintLvl::Info << "Cannot load entry No." << evt_id << "..." 
-      << (m_branchName.empty() ? " Tree has " : " Branch has " ) 
+  log << DbPrintLvl::Info << "Cannot load entry No." << evt_id << "..."
+      << (m_branchName.empty() ? " Tree has " : " Branch has " )
       << size() << " Entries in total." << DbPrint::endmsg;
   m_ioBytes = -1;
   return Error;
@@ -498,7 +498,7 @@ DbStatus RootTreeContainer::close()   {
       // This somehow fails for templates.
       dsc.clazz->Destructor(dsc.buffer);
     }
-  }      
+  }
   m_branches.clear();
   m_auxBranchMap.clear();
   m_rootDb = nullptr;
@@ -507,12 +507,11 @@ DbStatus RootTreeContainer::close()   {
 }
 
 
-DbStatus RootTreeContainer::open( const DbDatabase& dbH, 
-                                  const std::string& nam, 
-                                  const DbTypeInfo* info, 
-                                  DbAccessMode mode)  
+DbStatus RootTreeContainer::open( const DbDatabase& dbH,
+                                  const std::string& nam,
+                                  const DbTypeInfo* info,
+                                  DbAccessMode mode)
 {
-   TClass::GetClass("DataLink_p2");
    DbPrint log(nam);
    m_branches.clear();
    m_name = nam;
@@ -546,8 +545,8 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
       if (m_rootDb)
          m_tree = (TTree*)m_rootDb->file()->Get(treeName.c_str());
 
-      bool hasBeenCreated = (m_branchName.empty() 
-                             ? m_tree != nullptr 
+      bool hasBeenCreated = (m_branchName.empty()
+                             ? m_tree != nullptr
                              : (m_tree && m_tree->GetBranch(m_branchName.c_str()) != nullptr));
       if ( hasBeenCreated && (mode&pool::READ || mode&pool::UPDATE) )   {
          int count;
@@ -627,7 +626,7 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
                }
             }
             else  {
-               log << DbPrintLvl::Warning << "Branch with name:" << colnam 
+               log << DbPrintLvl::Warning << "Branch with name:" << colnam
                    << " not present in container:" << m_name << " of type "
                    << ROOTTREE_StorageType.storageName()
                    << DbPrint::endmsg;
@@ -644,7 +643,7 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
          return Success;
       }
       else if ( !hasBeenCreated && mode&pool::CREATE )    {
-         int count, defSplitLevel=99, 
+         int count, defSplitLevel=99,
             defAutoSave=16*1024*1024, defBufferSize=16*1024,
             branchOffsetTabLen=0, containerSplitLevel=defSplitLevel, auxSplitLevel=defSplitLevel;
          DbStatus res = Success;
@@ -709,7 +708,7 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
                 case DbColumn::LONG_STRING:
                 case DbColumn::NTCHAR:
                 case DbColumn::LONG_NTCHAR:
-                case DbColumn::TOKEN:      
+                case DbColumn::TOKEN:
                    iret=addBranch(*i,dsc,"/C");
                    break;
                 case DbColumn::BLOB:
@@ -717,7 +716,7 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
                    break;
                 case DbColumn::ANY:
                 case DbColumn::POINTER:
-                   iret=addObject(*i, dsc, (*i)->typeName(), containerSplitLevel, defBufferSize, branchOffsetTabLen); 
+                   iret=addObject(*i, dsc, (*i)->typeName(), containerSplitLevel, defBufferSize, branchOffsetTabLen);
                    break;
                 default:
                    return Error;
@@ -744,14 +743,14 @@ DbStatus RootTreeContainer::open( const DbDatabase& dbH,
          }
          catch (...)   {
             DbPrint err( m_name);
-            err << DbPrintLvl::Fatal << "Unknown exception occurred. Cannot give more details." 
+            err << DbPrintLvl::Fatal << "Unknown exception occurred. Cannot give more details."
                 << DbPrint::endmsg;
             debugBreak(nam, "Cannot open ROOT container(Tree/Branch)");
             res = Error;
          }
       }
    }
-   log << DbPrintLvl::Error << "Cannot open container '" << nam << "', invalid Database handle." 
+   log << DbPrintLvl::Error << "Cannot open container '" << nam << "', invalid Database handle."
        << DbPrint::endmsg;
    return Error;
 }
@@ -780,7 +779,7 @@ DbStatus  RootTreeContainer::select(DbSelect& sel)    {
 DbStatus  RootTreeContainer::addObject(const DbColumn* col,
                                        BranchDesc& dsc,
                                        const std::string& typ,
-                                       int defSplitLevel, 
+                                       int defSplitLevel,
                                        int defBufferSize,
                                        int branchOffsetTabLen)
 {
@@ -805,7 +804,7 @@ DbStatus  RootTreeContainer::addObject(const DbColumn* col,
             if ( dsc.branch )  {
                dsc.leaf = dsc.branch->GetLeaf(nam.c_str());
                dsc.branch->SetAutoDelete(kFALSE);
-               // AUTO-DELETE is now OFF. 
+               // AUTO-DELETE is now OFF.
                // This ensures, that all objects can be deleted
                // by the framework. Keep the created object in the
                // branch descriptor to allow selections
@@ -817,7 +816,7 @@ DbStatus  RootTreeContainer::addObject(const DbColumn* col,
                   TClass *storeTClass = dsc.clazz->GetBaseClass("SG::IAuxStoreIO");
                   if( storeTClass ) {
                      // This is a class implementing SG::IAuxStoreIO
-                     dsc.aux_iostore_IFoffset = dsc.clazz->GetBaseClassOffset( storeTClass );               
+                     dsc.aux_iostore_IFoffset = dsc.clazz->GetBaseClassOffset( storeTClass );
                   }
                }
                return Success;
@@ -830,7 +829,7 @@ DbStatus  RootTreeContainer::addObject(const DbColumn* col,
    }
    catch (...)   {
       DbPrint err( m_name);
-      err << DbPrintLvl::Fatal << "Unknown exception occurred. Cannot give more details." 
+      err << DbPrintLvl::Fatal << "Unknown exception occurred. Cannot give more details."
           << DbPrint::endmsg;
       debugBreak(m_name, "Cannot attach ROOT object branch.", true);
    }
@@ -847,11 +846,11 @@ DbStatus  RootTreeContainer::addObject(const DbColumn* col,
 
 void RootTreeContainer::createBasicAuxBranch(const std::string& branchname, const std::string& leafname, BranchDesc& dsc)
 {
-   DbPrint log( m_name); 
+   DbPrint log( m_name);
    log << DbPrintLvl::Debug << "createBasicAuxBranch: " << branchname << ", leaf:" << leafname << DbPrint::endmsg;
    dsc.is_basic_type = true;
-   dsc.branch = m_tree->Branch(branchname.c_str(), dsc.buffer, leafname.c_str(), 2048);         
-//   if( dsc.branch )  dsc.leaf = dsc.branch->GetLeaf(bnam);            
+   dsc.branch = m_tree->Branch(branchname.c_str(), dsc.buffer, leafname.c_str(), 2048);
+//   if( dsc.branch )  dsc.leaf = dsc.branch->GetLeaf(bnam);
 }
 
 
@@ -864,29 +863,29 @@ DbStatus  RootTreeContainer::addAuxBranch(const std::string& attribute,
    string branch_name = RootAuxDynIO::auxBranchName(attribute, m_branchName);
    dsc.branch = nullptr;
    try {
-      if( *typeinfo == typeid(UInt_t) ) 
+      if( *typeinfo == typeid(UInt_t) )
          createBasicAuxBranch(branch_name, attribute + "/i", dsc);
       else if( *typeinfo == typeid(Int_t) )
          createBasicAuxBranch(branch_name, attribute + "/I", dsc);
-      else if( *typeinfo == typeid(Double_t) ) 
+      else if( *typeinfo == typeid(Double_t) )
          createBasicAuxBranch(branch_name, attribute + "/D", dsc);
-      else if( *typeinfo == typeid(Float_t) ) 
+      else if( *typeinfo == typeid(Float_t) )
          createBasicAuxBranch(branch_name, attribute + "/F", dsc);
-      else if( *typeinfo == typeid(Long64_t) ) 
+      else if( *typeinfo == typeid(Long64_t) )
          createBasicAuxBranch(branch_name, attribute + "/L", dsc);
-      else if( *typeinfo == typeid(ULong64_t) ) 
+      else if( *typeinfo == typeid(ULong64_t) )
          createBasicAuxBranch(branch_name, attribute + "/l", dsc);
-      else if( *typeinfo == typeid(Short_t) ) 
+      else if( *typeinfo == typeid(Short_t) )
          createBasicAuxBranch(branch_name, attribute + "/S", dsc);
-      else if( *typeinfo == typeid(UShort_t) ) 
+      else if( *typeinfo == typeid(UShort_t) )
          createBasicAuxBranch(branch_name, attribute + "/s", dsc);
-      else if( *typeinfo == typeid(Char_t) ) 
+      else if( *typeinfo == typeid(Char_t) )
          createBasicAuxBranch(branch_name, attribute + "/B", dsc);
-      else if( *typeinfo == typeid(UChar_t) ) 
+      else if( *typeinfo == typeid(UChar_t) )
          createBasicAuxBranch(branch_name, attribute + "/b", dsc);
-      else if( *typeinfo == typeid(bool) ) 
+      else if( *typeinfo == typeid(bool) )
          createBasicAuxBranch(branch_name, attribute + "/O", dsc);
-      else if( *typeinfo == typeid(char*) || *typeinfo == typeid(unsigned char*) )  
+      else if( *typeinfo == typeid(char*) || *typeinfo == typeid(unsigned char*) )
          createBasicAuxBranch(branch_name, attribute + "/C", dsc);
       else {
          TClass* cl = TClass::GetClass(typenam.c_str());
@@ -912,14 +911,14 @@ DbStatus  RootTreeContainer::addAuxBranch(const std::string& attribute,
    }
    catch (...)   {
       DbPrint err( branch_name );
-      err << DbPrintLvl::Fatal << "Unknown exception occurred. Cannot give more details." 
+      err << DbPrintLvl::Fatal << "Unknown exception occurred. Cannot give more details."
           << DbPrint::endmsg;
       debugBreak(branch_name, "Cannot attach ROOT branch for AUX attribute.", true);
    }
 
    if( dsc.branch )  {
       dsc.branch->SetAutoDelete(kFALSE);
-      // AUTO-DELETE is now OFF. 
+      // AUTO-DELETE is now OFF.
       // This ensures, that all objects can be deleted
       // by the framework. Keep the created object in the
       // branch descriptor to allow selections
@@ -927,7 +926,7 @@ DbStatus  RootTreeContainer::addAuxBranch(const std::string& attribute,
       //setBranchOffsetTabLen( dsc.branch, branchOffsetTabLen );
       return Success;
    }
-   
+
    DbPrint log("RootStorageSvc::addAuxBranch");
    log << DbPrintLvl::Error << "Failed to create Auxiliary branch '" << branch_name << "'."
        << " Class " << typenam << error_type << DbPrint::endmsg;
@@ -937,7 +936,7 @@ DbStatus  RootTreeContainer::addAuxBranch(const std::string& attribute,
 
 
 
-DbStatus 
+DbStatus
 RootTreeContainer::addBranch(const DbColumn* col,BranchDesc& dsc,const std::string& desc) {
   const char* nam  = (m_branchName.empty() ? col->name().c_str() : m_branchName.c_str());
   std::string  coldesc = col->name() + desc;
@@ -960,11 +959,11 @@ void RootTreeContainer::setBranchOffsetTabLen(TBranch* b, int offsettab_len)
 {
    if( offsettab_len > 0 ) {
       if( b->GetEntryOffsetLen() > 0 )
-         b->SetEntryOffsetLen( offsettab_len ); 
+         b->SetEntryOffsetLen( offsettab_len );
       TIter biter( b->GetListOfBranches() );
       TBranch* subbranch(nullptr);
       while( (subbranch = (TBranch*)biter.Next()) ) {
-         setBranchOffsetTabLen( subbranch, offsettab_len ); 
+         setBranchOffsetTabLen( subbranch, offsettab_len );
       }
    }
 }
@@ -972,7 +971,7 @@ void RootTreeContainer::setBranchOffsetTabLen(TBranch* b, int offsettab_len)
 
 
 /// Access options
-DbStatus RootTreeContainer::getOption(DbOption& opt)  const  { 
+DbStatus RootTreeContainer::getOption(DbOption& opt)  const  {
   if ( m_tree )  {
     const char* n = opt.name().c_str();
     if ( !strcasecmp(n,"BYTES_IO") )  {
@@ -981,7 +980,7 @@ DbStatus RootTreeContainer::getOption(DbOption& opt)  const  {
              const_cast<RootTreeContainer*>(this)->m_ioBytes += branch.aux_reader->getBytesRead();
              branch.aux_reader->resetBytesRead();
           }
-       }                                          
+       }
        return opt._setValue((int)m_ioBytes);
     }
     else if ( !strcasecmp(n,"BRANCH") )  {
@@ -1097,11 +1096,11 @@ DbStatus RootTreeContainer::getOption(DbOption& opt)  const  {
       }
     }
   }
-  return Error;  
+  return Error;
 }
 
 /// Set options
-DbStatus RootTreeContainer::setOption(const DbOption& opt)  { 
+DbStatus RootTreeContainer::setOption(const DbOption& opt)  {
   if ( m_tree )  {
     const char* n = opt.name().c_str();
     if ( ::toupper(n[0]) == 'B' )  {
@@ -1184,12 +1183,12 @@ DbStatus RootTreeContainer::setOption(const DbOption& opt)  {
       }
     }
   }
-  return Error;  
+  return Error;
 }
 
 
 /// Execute transaction action
-DbStatus RootTreeContainer::transAct(Transaction::Action action) 
+DbStatus RootTreeContainer::transAct(Transaction::Action action)
 {
    // execure action on the base class first
    DbStatus status = DbContainerImp::transAct(action);
@@ -1222,7 +1221,7 @@ DbStatus RootTreeContainer::transAct(Transaction::Action action)
          m_tree->AutoSave();
       } else if (branchEntries < treeEntries) {
          DbPrint log(m_name);
-         log << DbPrintLvl::Error << "Every branch must have the same number of entries." 
+         log << DbPrintLvl::Error << "Every branch must have the same number of entries."
              << DbPrint::endmsg;
          return Error;
       }
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPoolDouble.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPoolDouble.py
index d864e50325ce7ad09f870a6d1b6a25342f6ad03e..dc683bc12cc5247ee4b6b42d1b0ebb6ec8225894 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPoolDouble.py
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPoolDouble.py
@@ -48,8 +48,39 @@ def _configureReadAthenaPoolDouble():
     if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'):
         svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool()
 
+    # BS specifics
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+    if overlayFlags.isDataOverlay():
+        # Load ByteStreamEventStorageInputSvc
+        if not hasattr (svcMgr, 'ByteStreamInputSvc'):
+            svcMgr += CfgMgr.ByteStreamEventStorageInputSvc ("ByteStreamInputSvc",
+                                                             EventInfoKey=overlayFlags.bkgPrefix() + "EventInfo")
+
+        # Load ROBDataProviderSvc
+        if not hasattr (svcMgr, 'ROBDataProviderSvc'):
+            svcMgr += CfgMgr.ROBDataProviderSvc ("ROBDataProviderSvc")
+
+        # Load ByteStreamCnvSvc
+        if not hasattr (svcMgr, 'ByteStreamCnvSvc'):
+            svcMgr += CfgMgr.ByteStreamCnvSvc ("ByteStreamCnvSvc")
+
+        svcMgr.EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ]
+
+        # Add in ByteStreamAddressProviderSvc
+        if not hasattr (svcMgr, 'ByteStreamAddressProviderSvc'):
+            svcMgr += CfgMgr.ByteStreamAddressProviderSvc ("ByteStreamAddressProviderSvc")
+        svcMgr.ProxyProviderSvc.ProviderNames += [ "ByteStreamAddressProviderSvc" ]
+
+        # Enable ByteStream to read MetaData
+        svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ]
+        if not hasattr (svcMgr.ToolSvc, 'ByteStreamMetadataTool'):
+            svcMgr.ToolSvc += CfgMgr.ByteStreamMetadataTool()
+
     # Add in EventSelector
-    svcMgr += CfgMgr.EventSelectorAthenaPool("SecondaryEventSelector", IsSecondary=True)
+    if overlayFlags.isDataOverlay():
+        svcMgr += CfgMgr.EventSelectorByteStream("SecondaryEventSelector", IsSecondary=True, ByteStreamInputSvc="ByteStreamInputSvc")
+    else:
+        svcMgr += CfgMgr.EventSelectorAthenaPool("SecondaryEventSelector", IsSecondary=True)
     svcMgr += CfgMgr.DoubleEventSelectorAthenaPool("DoubleEventSelector")    
     theApp.EvtSel = "DoubleEventSelectorAthenaPool/DoubleEventSelector"
 
@@ -58,11 +89,12 @@ def _configureReadAthenaPoolDouble():
         svcMgr += CfgMgr.AthenaPoolAddressProviderSvc ("AthenaPoolAddressProviderSvcPrimary")
     svcMgr.ProxyProviderSvc.ProviderNames += [ "AthenaPoolAddressProviderSvc/AthenaPoolAddressProviderSvcPrimary" ]
     svcMgr.AthenaPoolAddressProviderSvcPrimary.DataHeaderKey = "EventSelector"
-    svcMgr.AthenaPoolAddressProviderSvcPrimary.AttributeListKey = "Input"
-    if not hasattr (svcMgr, 'AthenaPoolAddressProviderSvcSecondary'):
-        svcMgr += CfgMgr.AthenaPoolAddressProviderSvc ("AthenaPoolAddressProviderSvcSecondary")
-    svcMgr.ProxyProviderSvc.ProviderNames += [ "AthenaPoolAddressProviderSvc/AthenaPoolAddressProviderSvcSecondary" ]
-    svcMgr.AthenaPoolAddressProviderSvcSecondary.DataHeaderKey = "SecondaryEventSelector"
+    if not overlayFlags.isDataOverlay():
+        svcMgr.AthenaPoolAddressProviderSvcPrimary.AttributeListKey = "Input"
+        if not hasattr (svcMgr, 'AthenaPoolAddressProviderSvcSecondary'):
+            svcMgr += CfgMgr.AthenaPoolAddressProviderSvc ("AthenaPoolAddressProviderSvcSecondary")
+        svcMgr.ProxyProviderSvc.ProviderNames += [ "AthenaPoolAddressProviderSvc/AthenaPoolAddressProviderSvcSecondary" ]
+        svcMgr.AthenaPoolAddressProviderSvcSecondary.DataHeaderKey = "SecondaryEventSelector"
 
     # Set up DataVector/DataProxyStorage backwards compatibility.
     #from DataModelAthenaPool import DataModelCompatSvc
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py
index e484ee2ef16cef9445a464475fc6e56ead4537ba..5c7ca61ae79795dcffe4d8ee7c0661cc33615ae2 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py
@@ -10,7 +10,7 @@
 # Each subsystem should provide additional jobOpt fragments to load converter and append
 # to event object ItemList. For example, LArAthenaPool should include:
 #
-# ApplicationMgr.DLLs += [ "LArAthenaPool" ];
+# ApplicationMgr.Dlls += [ "LArAthenaPool" ];
 # Stream1.ItemList += [ "2701#*", "2731#*" ];
 #
 #==============================================================
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Append.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Append.ref
index a0eb50309d3759b9656950c8fdee1900b349fc24..1c812214bc92bae382c9d235adf86c1443865d0c 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Append.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Append.ref
@@ -22,7 +22,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 916 CLIDRegistry entries for module ALL
 WriteData           DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
index c7f71e8c55284fddfd4488906f1eafec5617c10b..1d9b634e6412cb1f7127eea040e84dcea2f1b03a 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 581 CLIDRegistry entries for module ALL
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
index 332960873608f5f2f6ea474c4b592ea0a1b0a721..e8b8791da6a99bb389c5a9bd0771f1ca44ac0a8b 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
@@ -23,7 +23,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 608 CLIDRegistry entries for module ALL
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
index 6d8bb5dc9ed45a4f09a3f3e28b081a1c21a594a1..9c9e89381bdae68b6d8a7871cc6b34815de7e310 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
@@ -21,7 +21,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3286 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ReadCond            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
index 12631ae123ea54dea30b41495f98cf8ffe535452..7d016fd5f3f7e26c842e419a85acec8500c621f3 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
@@ -21,7 +21,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3286 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
index d2f7896312d7344848ad627bd8f14e34ba752004..1fd48fdd5a07c0805484a39a9030667db53332e4 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
@@ -23,7 +23,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 343 CLIDRegistry entries for module ALL
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
index c576ae85eac675e2be9beebc0d0a2d2022a7a56d..59a28458c346407ea752448a68761a80faf0cc93 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
@@ -23,7 +23,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 343 CLIDRegistry entries for module ALL
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
index d8c6e1b7e6cc52e123158644417d6891ec9156ab..4dd9744a18932ade06092566880324259538fc26 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
@@ -23,7 +23,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 343 CLIDRegistry entries for module ALL
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
index e7e66cec097c99827faee7609dea1fbab683f099..d55e8196116aebbf6d413d8eef65b4d6d62b7aa8 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
@@ -21,7 +21,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3286 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
index f20695bda6bf4703219e24b05bb71b84c7e694da..11cee7683d3b287186f8aeba42b592c214e7f238 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
@@ -21,7 +21,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3286 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref
index d25babd49f746dc062e09c64db17d90156f73af3..39c733ba4d5c1ccce54581a61a5be51874ab15aa 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref
@@ -22,7 +22,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2946 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 889 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
index bfddf027237b878d502f2bcce8e25ba914b72f08..31e2e179bfa35f205980d18ab9a0153535712e23 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
@@ -21,7 +21,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3286 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 846 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref
index 240402bc6c2d4cc9b4f1953c32ab2f250bf0c026..af732998301db8652f3a1e2849f6c5ff2e40a4bd 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref
@@ -22,7 +22,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 2918 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 916 CLIDRegistry entries for module ALL
 ReadData            DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
index f919a38bc0f9e7108b399f03cf4bb81f25da83d1..118106d403c66a1906a0feee5e2fe5929277d4c4 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
@@ -21,7 +21,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3286 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 1182 CLIDRegistry entries for module ALL
 Stream1             DEBUG Property update for OutputLevel : new value = 2
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
index b962c72f12bea2d14cdd0fdd10bb093d568caf69..c8d4caec16563d87deda75e27cd1a3a07bce097f 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
@@ -23,7 +23,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 343 CLIDRegistry entries for module ALL
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
index 47e2f6a252ae6ea13491d40633ff5d7ddcd1a2e2..965308e67d21df5df428f258e3f79d995a567559 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
@@ -26,7 +26,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3459 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ClassIDSvc           INFO  getRegistryEntries: read 705 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 581 CLIDRegistry entries for module ALL
diff --git a/Database/AthenaPOOL/AthenaPoolTools/share/EventCount_jobOptions.py b/Database/AthenaPOOL/AthenaPoolTools/share/EventCount_jobOptions.py
index 1e3f7f990d85ab857d077d49e49871086cff81ac..1fa766038c56f205c2bcf20d636f0383a41da417 100755
--- a/Database/AthenaPOOL/AthenaPoolTools/share/EventCount_jobOptions.py
+++ b/Database/AthenaPOOL/AthenaPoolTools/share/EventCount_jobOptions.py
@@ -20,9 +20,6 @@ from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
 alg = xAODMaker__EventInfoCnvAlg()
 topSequence += alg
 
-# from EventBookkeeperTools.CutFlowHelpers import CreateBookkeeperDumperTool
-# CreateBookkeeperDumperTool()
-
 from AthenaPoolTools.AthenaPoolToolsConf import EventCount
 topSequence += EventCount( OutputLevel = INFO,
                            Dump        = True )
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py
index 8886c0392837785e5d19f26dc7d6c16b103a56a3..7fea06f370e4f8022859615d13887c26ac352aec 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py
@@ -6,6 +6,7 @@
 ##  creation: David Cote (May 2008)                   ##
 ########################################################
 from __future__ import print_function
+import os
 
 class AugmentedStreamBase:
     """This class manages common methods of AugmentedPoolStream and AugmentedByteStream."""
@@ -272,9 +273,7 @@ class AugmentedByteStream( AugmentedStreamBase ):
         svcMgr.ToolSvc += self.bsCopyTool
 
         #default output directory
-        import subprocess
-        cmd='pwd'
-        (statusCode,outDir) = subprocess.getstatusoutput(cmd)
+        outDir = os.getcwd()
         outDir+="/"
 
         # BS output Svc
diff --git a/DetectorDescription/AtlasDetDescr/CMakeLists.txt b/DetectorDescription/AtlasDetDescr/CMakeLists.txt
index 56b098975cea5358642f74da480d24115b0aa454..1d31be5baf9a50859ee3472dd477f7b5fa107ed9 100644
--- a/DetectorDescription/AtlasDetDescr/CMakeLists.txt
+++ b/DetectorDescription/AtlasDetDescr/CMakeLists.txt
@@ -1,34 +1,18 @@
-################################################################################
-# Package: AtlasDetDescr
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AtlasDetDescr )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/IdDict
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( AtlasDetDescr
                    src/AtlasDetectorID.cxx
                    src/AtlasDetectorIDHelper.cxx
                    src/AtlasRegionHelper.cxx
                    PUBLIC_HEADERS AtlasDetDescr
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} IdDict Identifier AthenaKernel
+                   LINK_LIBRARIES IdDict Identifier AthenaKernel
                    PRIVATE_LINK_LIBRARIES GaudiKernel )
 
 atlas_add_dictionary( AtlasDetDescrDict
                       AtlasDetDescr/AtlasDetDescrDict.h
                       AtlasDetDescr/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} IdDict Identifier GaudiKernel AtlasDetDescr )
-
+                      LINK_LIBRARIES AtlasDetDescr )
diff --git a/DetectorDescription/DetDescrCnvSvc/CMakeLists.txt b/DetectorDescription/DetDescrCnvSvc/CMakeLists.txt
index 4c554ff2279f6eaf7b0ebd504c762b6c222917ab..6aa548919590f30ae50c23e9c2a281c7287b1cc8 100644
--- a/DetectorDescription/DetDescrCnvSvc/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCnvSvc/CMakeLists.txt
@@ -1,27 +1,20 @@
-################################################################################
-# Package: DetDescrCnvSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrCnvSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate )
-
 # Component(s) in the package:
 atlas_add_library( DetDescrCnvSvcLib
                    src/*.cxx
                    PUBLIC_HEADERS DetDescrCnvSvc
-                   LINK_LIBRARIES GaudiKernel StoreGateLib SGtests )
+                   LINK_LIBRARIES GaudiKernel
+                   PRIVATE_LINK_LIBRARIES StoreGateLib )
 
 atlas_add_component( DetDescrCnvSvc
                      src/components/*.cxx
-                     LINK_LIBRARIES GaudiKernel StoreGateLib SGtests DetDescrCnvSvcLib )
+                     LINK_LIBRARIES DetDescrCnvSvcLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py b/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py
index e14007180aacd961effc971c54c8d436ee3f9b46..a4b0ec6b8b273d09afac5f3472b5326aab0784cc 100755
--- a/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.py
+++ b/DetectorDescription/DetDescrCnvSvc/python/DetStoreConfig.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
 
 #
 # Joboptions for bootstrapping the loading of the DetectorStore with
@@ -6,11 +6,10 @@
 #
 
 def _setupDetStoreConfig():
-    from AthenaCommon.AppMgr import theApp
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
     # first, make sure we create a DetectorStore
-    import AthenaCommon.AtlasUnixStandardJob
+    import AthenaCommon.AtlasUnixStandardJob  # noqa: F401
     #theApp.CreateSvc += [ svcMgr.DetectorStore.getFullName() ]
 
     # now configure the Detector Description converter service
diff --git a/DetectorDescription/DetDescrCnvSvc/share/DetStore.py b/DetectorDescription/DetDescrCnvSvc/share/DetStore.py
deleted file mode 100755
index 2a82ceb54d7087f627ec131df3f73e07b2fc98f8..0000000000000000000000000000000000000000
--- a/DetectorDescription/DetDescrCnvSvc/share/DetStore.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Joboptions for bootstrapping the loading of the DetectorStore with
-# the DetDescrCnvSvc
-#
-
-# Adds and instantiates the DetDescrCnvSvc service. It is assumed that
-# a view of the application manager is available as 'theApp'
-
-
-from AthenaCommon.AppMgr import theApp
-theApp.Dlls   += [ 'DetDescrCnvSvc' ]
-theApp.ExtSvc += [ 'DetDescrCnvSvc' ]
-
-# Create service and add to list of conversion services
-#
-#  NOTE: the following does not yet work for the detector store
-# theApp.ExtSvc += { "DetPersistencySvc/DetectorPersistencySvc", 
-#  		      "DetDescrCnvSvc" };
-#DetectorPersistencySvc.CnvServices += { "DetDescrCnvSvc" };
-DetDescrCnvSvc = Service( "DetDescrCnvSvc" )
-EventPersistencySvc.CnvServices = [ "DetDescrCnvSvc" ]
-
-# Specify primary Identifier dictionary to be used
-DetDescrCnvSvc.IdDictName = "IdDictParser/ATLAS_IDS.xml";
-
-# Specify whether CSC/sTgc/MM muon chambers are part of the detector
-from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
-DetDescrCnvSvc.HasCSC = MuonGeometryFlags.hasCSC()
-DetDescrCnvSvc.HasSTgc = MuonGeometryFlags.hasSTGC()
-DetDescrCnvSvc.HasMM = MuonGeometryFlags.hasMM()
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/CMakeLists.txt
index 3df4f31b2327159e4745e77d6f18d7274604dc18..90dd161089c2109259f83b80db84c75b1fa1b527 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/CMakeLists.txt
@@ -1,22 +1,11 @@
-################################################################################
-# Package: DetDescrCondAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrCondAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          DetectorDescription/DetDescrCond/DetDescrCondTPCnv
-                          DetectorDescription/DetDescrCond/DetDescrConditions )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( DetDescrCondAthenaPoolPoolCnv
                            src/*.cxx
                            FILES DetDescrConditions/AlignableTransform.h DetDescrConditions/AlignableTransformContainer.h DetDescrConditions/DetCondCFloat.h DetDescrConditions/DetCondKeyTrans.h DetDescrConditions/DetStatusMap.h
                            MULT_CHAN_TYPES AlignableTransformContainer
-                           LINK_LIBRARIES AthenaPoolUtilities AthenaPoolCnvSvcLib DetDescrCondTPCnv DetDescrConditions )
-
+                           LINK_LIBRARIES AthenaPoolCnvSvcLib DetDescrCondTPCnv DetDescrConditions )
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt
index ee6c3b1a0b64c282f9a25e43bf9427924769d204..38ea725012fc895f8f3e8f6c4f03c78f51cf40bf 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt
@@ -1,28 +1,10 @@
-################################################################################
-# Package: DetDescrCondExample
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrCondExample )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          DetectorDescription/GeoPrimitives
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/DetDescrCond/DetDescrCondTools
-                          DetectorDescription/DetDescrCond/DetDescrConditions
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry )
-
 # External dependencies:
-find_package( Eigen )
-find_package( ROOT COMPONENTS Hist Core Tree MathCore RIO pthread )
+find_package( ROOT COMPONENTS Hist Core RIO )
 
 # Component(s) in the package:
 atlas_add_component( DetDescrCondExample
@@ -31,10 +13,8 @@ atlas_add_component( DetDescrCondExample
                      src/ReadWriteCoolStrFile.cxx
                      src/CoolHistExample.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives Identifier GaudiKernel StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions InDetReadoutGeometry DetDescrCondToolsLib )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities DetDescrCondToolsLib DetDescrConditions GaudiKernel GeoModelInterfaces GeoPrimitives Identifier InDetReadoutGeometry )
 
 # Install files from the package:
-atlas_install_headers( DetDescrCondExample )
 atlas_install_joboptions( share/*.py )
-
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondTPCnv/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetDescrCondTPCnv/CMakeLists.txt
index d24d9b81f6c77add5ea939f8f544921a7d38f829..2f93c590e02a6956f37fb5fe2d8d77d0a1468b4f 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondTPCnv/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCond/DetDescrCondTPCnv/CMakeLists.txt
@@ -1,66 +1,48 @@
-################################################################################
-# Package: DetDescrCondTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrCondTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          AtlasTest/TestTools
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/RootConversions
-                          DetectorDescription/DetDescrCond/DetDescrConditions
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core )
 
 # Component(s) in the package:
 atlas_add_tpcnv_library( DetDescrCondTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS DetDescrCondTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                          PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                          PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel )
+                         LINK_LIBRARIES LINK_LIBRARIES AthenaPoolCnvSvcLib DetDescrConditions Identifier RootConversions
+                         PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} )
 
 atlas_add_dictionary( DetDescrCondTPCnvDict
                       DetDescrCondTPCnv/DetDescrCondTPCnvDict.h
                       DetDescrCondTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel DetDescrCondTPCnv )
+                      LINK_LIBRARIES DetDescrCondTPCnv )
 
+# Test in the package:
 atlas_add_test( DetStatusMapCnv_p1_test
                 SOURCES
                 test/DetStatusMapCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel DetDescrCondTPCnv )
+                LINK_LIBRARIES DetDescrCondTPCnv GaudiKernel TestTools )
 
 atlas_add_test( AlignableTransformCnv_p1_test
                 SOURCES
                 test/AlignableTransformCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel DetDescrCondTPCnv )
+                LINK_LIBRARIES DetDescrCondTPCnv GaudiKernel TestTools )
 
 atlas_add_test( DetCondCFloatCnv_p1_test
                 SOURCES
                 test/DetCondCFloatCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel DetDescrCondTPCnv )
+                LINK_LIBRARIES DetDescrCondTPCnv GaudiKernel TestTools )
 
 atlas_add_test( DetDescrCondIdentifier_old_cnv_test
                 SOURCES
                 test/DetDescrCondIdentifier_old_cnv_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel DetDescrCondTPCnv )
+                LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils DetDescrCondTPCnv TestTools )
 
 atlas_add_test( DetCondKeyTransCnv_p1_test
                 SOURCES
                 test/DetCondKeyTransCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaPoolCnvSvcLib RootConversions DetDescrConditions Identifier GaudiKernel DetDescrCondTPCnv )
-
+                LINK_LIBRARIES DetDescrCondTPCnv GaudiKernel TestTools )
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondTools/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetDescrCondTools/CMakeLists.txt
index 4b38f78173666730bb7d22a7a562469f03614941..e3a6dd96302e10c4ad6eb2f89309d53b3a7ba465 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondTools/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCond/DetDescrCondTools/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: DetDescrCondTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrCondTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          PRIVATE
-                          Database/APR/FileCatalog
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AthenaPOOL/PoolSvc
-                          DetectorDescription/DetDescrCond/DetDescrConditions
-                          DetectorDescription/Identifier )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Hist Tree RIO Core MathCore pthread )
diff --git a/DetectorDescription/DetDescrCond/DetDescrConditions/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetDescrConditions/CMakeLists.txt
index d228f9320b1ebab7074f7d901089499709c1d875..80dd042d4b51be454c7468502d33541e7e7ee40d 100644
--- a/DetectorDescription/DetDescrCond/DetDescrConditions/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCond/DetDescrConditions/CMakeLists.txt
@@ -1,21 +1,11 @@
-################################################################################
-# Package: DetDescrConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-			  Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( DetDescrConditions
@@ -27,14 +17,10 @@ atlas_add_library( DetDescrConditions
                    src/DetStatusMap.cxx
                    PUBLIC_HEADERS DetDescrConditions
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaPoolUtilities Identifier GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel AthenaPoolUtilities GaudiKernel Identifier )
 
 atlas_add_dictionary( DetDescrConditionsDict
                       DetDescrConditions/DetDescrConditionsDict.h
                       DetDescrConditions/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaPoolUtilities Identifier GaudiKernel DetDescrConditions )
-
+                      LINK_LIBRARIES DetDescrConditions )
diff --git a/DetectorDescription/DetDescrCond/DetectorStatus/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetectorStatus/CMakeLists.txt
index 96942605f8f4e9881749204e390b5b068d305204..1df633de731b09046ecf2810131469e9bc315580 100644
--- a/DetectorDescription/DetDescrCond/DetectorStatus/CMakeLists.txt
+++ b/DetectorDescription/DetDescrCond/DetectorStatus/CMakeLists.txt
@@ -1,17 +1,10 @@
-################################################################################
-# Package: DetectorStatus
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # Package is now a rump of a few Python libraries kept around for potential 
 # Run 1 compatibility
 
-
 # Declare the package name:
 atlas_subdir( DetectorStatus )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/DetDescrCond/DetDescrConditions
-			  )
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/DetectorDescription/DetDescrDictionary/CMakeLists.txt b/DetectorDescription/DetDescrDictionary/CMakeLists.txt
index 63ac02076dcd58f5d38f4481021eb0c81bcd77ca..7c4f3ce790e3a0784edd933eb5a43e468eb23882 100644
--- a/DetectorDescription/DetDescrDictionary/CMakeLists.txt
+++ b/DetectorDescription/DetDescrDictionary/CMakeLists.txt
@@ -1,25 +1,10 @@
-################################################################################
-# Package: DetDescrDictionary
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DetDescrDictionary )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          DetectorDescription/Identifier )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_dictionary( DetDescrDict
                       DetDescrDictionary/DetDescrDictionaryDict.h
                       DetDescrDictionary/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers Identifier )
-
-# Install files from the package:
-atlas_install_headers( DetDescrDictionary )
-
+                      LINK_LIBRARIES AthContainers Identifier )
diff --git a/DetectorDescription/DetDescrDictionary/DetDescrDictionary/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/DetDescrDictionary/DetDescrDictionary/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..94f6ecbef52ffe40b3c9433b8a7c5a22319fc077
--- /dev/null
+++ b/DetectorDescription/DetDescrDictionary/DetDescrDictionary/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+DetectorDescription/DetDescrDictionary
diff --git a/DetectorDescription/IRegionSelector/CMakeLists.txt b/DetectorDescription/IRegionSelector/CMakeLists.txt
index 8ab50c51f64e1bcd41bb6c3af866f69c75f0a6b3..7be03db626a08d7216d24ad19e0c5fd720ddac73 100644
--- a/DetectorDescription/IRegionSelector/CMakeLists.txt
+++ b/DetectorDescription/IRegionSelector/CMakeLists.txt
@@ -1,19 +1,8 @@
-# $Id: CMakeLists.txt 749910 2016-05-26 15:00:09Z krasznaa $
-################################################################################
-# Package: IRegionSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IRegionSelector )
 
-# Declare the package's dependencies. But only for an Athena build:
-if( NOT XAOD_STANDALONE )
-   atlas_depends_on_subdirs( PUBLIC
-      Control/AthenaKernel
-      DetectorDescription/Identifier
-      GaudiKernel )
-endif()
-
 # Component(s) in the package:
 if( XAOD_STANDALONE )
    atlas_add_library( IRegionSelector
diff --git a/DetectorDescription/IRegionSelector/IRegionSelector/RegSelCaloLUTCondData.h b/DetectorDescription/IRegionSelector/IRegionSelector/RegSelCaloLUTCondData.h
deleted file mode 100644
index 345efdff5d82fb2886453256fef1bbf939bb2570..0000000000000000000000000000000000000000
--- a/DetectorDescription/IRegionSelector/IRegionSelector/RegSelCaloLUTCondData.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* emacs: this is -*- c++ -*- */
-/**
- **   @file    RegSelCaloLUTCondData.h        
- **                   
- **   @author  sutt
- **   @date    Tue  4 Feb 2020 15:25:00 CET
- **
- **   $Id: RegSelCaloLUTCondData.h, v0.0   Sat 21 March 2020 15:25:00 CET sutt $
- **
- **   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
- **/
-
-#ifndef  REGSELCALOLUTCONDDATA_H
-#define  REGSELCALOLUTCONDDATA_H
-
-#include "AthenaKernel/CondCont.h"
-#include "AthenaKernel/CLASS_DEF.h"
-
-#include "IRegionSelector/RegSelCondData.h"
-#include "RegionSelector/RegSelectorHashMap.h"
-
-typedef RegSelCondData<RegSelectorHashMap> RegSelCaloLUTCondData;
-
-CLASS_DEF ( RegSelCaloLUTCondData, 232357481, 0 )
-CONDCONT_DEF ( RegSelCaloLUTCondData, 198043569 );
-
-
-
-#endif // REGSELCALOLUTCONDDATA_H
diff --git a/DetectorDescription/IRegionSelector/IRegionSelector/RegSelLUTCondData.h b/DetectorDescription/IRegionSelector/IRegionSelector/RegSelLUTCondData.h
deleted file mode 100644
index 01341212f7aaee381b3b03adb7b074faf59be6ba..0000000000000000000000000000000000000000
--- a/DetectorDescription/IRegionSelector/IRegionSelector/RegSelLUTCondData.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* emacs: this is -*- c++ -*- */
-/**
- **   @file    RegSelLUTCondData.h        
- **                   
- **   @author  sutt
- **   @date    Tue  4 Feb 2020 15:25:00 CET
- **
- **   $Id: RegSelLUTCondData.h, v0.0   Tue  4 Feb 2020 15:25:00 CET sutt $
- **
- **   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
- **/
-
-#ifndef  REGSELLUTCONDDATA_H
-#define  REGSELLUTCONDDATA_H
-
-#include "AthenaKernel/CondCont.h"
-#include "AthenaKernel/CLASS_DEF.h"
-
-#include "RegSelLUT/RegSelSiLUT.h"
-#include "IRegionSelector/RegSelCondData.h"
-
-typedef RegSelCondData<RegSelSiLUT> RegSelLUTCondData;
-
-CLASS_DEF ( RegSelLUTCondData, 244180796, 0 )
-CONDCONT_DEF ( RegSelLUTCondData, 30547718 );
-
-#endif // REGSELLUTCONDDATA_H
diff --git a/DetectorDescription/IdDict/CMakeLists.txt b/DetectorDescription/IdDict/CMakeLists.txt
index 30002ee5b0378ba8ef20afb692aeae57f6fa7a51..fb4386437b893551863b7f637ed080ff08c3faab 100644
--- a/DetectorDescription/IdDict/CMakeLists.txt
+++ b/DetectorDescription/IdDict/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: IdDict
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IdDict )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/Identifier )
-
 # Component(s) in the package:
 atlas_add_library( IdDict
                    src/IdDictMgr.cxx
@@ -16,7 +10,6 @@ atlas_add_library( IdDict
                    PUBLIC_HEADERS IdDict
                    LINK_LIBRARIES Identifier )
 
-
 # Code in this file makes heavy use of eigen and runs orders of magnitude
 # more slowly without optimization.  So force this to be optimized even
 # in debug builds.  If you need to debug it you might want to change this.
diff --git a/DetectorDescription/IdDictDetDescr/CMakeLists.txt b/DetectorDescription/IdDictDetDescr/CMakeLists.txt
index 0ab2617d32f14eccfd8f411051077c5041719417..e306411bdf8abf3fc0ac3c1eb15eeac989ea1cc5 100644
--- a/DetectorDescription/IdDictDetDescr/CMakeLists.txt
+++ b/DetectorDescription/IdDictDetDescr/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: IdDictDetDescr
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IdDictDetDescr )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/IdDict
-                          PRIVATE
-                          DetectorDescription/Identifier )
-
 # Component(s) in the package:
 atlas_add_library( IdDictDetDescr
                    src/IdDictManager.cxx
diff --git a/DetectorDescription/IdDictDetDescr/IdDictDetDescr/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/IdDictDetDescr/IdDictDetDescr/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..250ccf9d0ef1631121723a339ad8cdf107dc598d
--- /dev/null
+++ b/DetectorDescription/IdDictDetDescr/IdDictDetDescr/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+DetectorDescription/IdDictDetDescr
diff --git a/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt b/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt
index 01cc2ba353e7a1e65e4f0c24496adccc55ac3d64..22bfe74b9205a21764d95424df7c8a98a472a62d 100644
--- a/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt
+++ b/DetectorDescription/IdDictDetDescrCnv/CMakeLists.txt
@@ -1,34 +1,12 @@
-################################################################################
-# Package: IdDictDetDescrCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IdDictDetDescrCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/RDBAccessSvc
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/DetDescrCnvSvc
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          DetectorDescription/IdDictDetDescr
-                          DetectorDescription/IdDictParser
-                          DetectorDescription/Identifier
-                          GaudiKernel )
-
-# External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-
 # Component(s) in the package:
 atlas_add_component( IdDictDetDescrCnv
                      src/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AtlasDetDescr DetDescrCnvSvcLib GeoModelUtilities IdDictDetDescr IdDictParser Identifier GaudiKernel RDBAccessSvcLib )
+                     LINK_LIBRARIES AthenaBaseComps AthenaKernel AtlasDetDescr DetDescrCnvSvcLib GaudiKernel GeoModelInterfaces GeoModelUtilities IdDictDetDescr IdDictParser Identifier RDBAccessSvcLib StoreGateLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/DetectorDescription/IdDictDetDescrCnv/share/Load_IdDictCnvTest_joboptions.py b/DetectorDescription/IdDictDetDescrCnv/share/Load_IdDictCnvTest_joboptions.py
deleted file mode 100755
index 3cd94169d335c558d96684747716b13bd8156132..0000000000000000000000000000000000000000
--- a/DetectorDescription/IdDictDetDescrCnv/share/Load_IdDictCnvTest_joboptions.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Test joboptions for the loading of the IdDictCnvTest
-#
-# For MC EventSelector:
-theApp.setup( MONTECARLO )
-
-# For ZebraTDR EventSelector
-##include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt"
-include( "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" )
-
-# Turn on the reading of the dictionary
-DetDescrCnvSvc = Service( "DetDescrCnvSvc" )
-DetDescrCnvSvc.DecodeIdDict = TRUE
-# Algs
-theApp.TopAlg += [ "IdDictCnvTest" ]
-# Set xml file to read in for each system 
-#  - only needed if default is not ok
-#DetDescrCnvSvc.AtlasIDFileName = "IdDictATLAS.xml";
-#DetDescrCnvSvc.InDetIDFileName = "IdDictInnerDetector.xml";
-#DetDescrCnvSvc.LArIDFileName   = "IdDictLArCalorimeter.xml";
-#DetDescrCnvSvc.TileIDFileName  = "IdDictTileCalorimeter.xml";
-#DetDescrCnvSvc.LVL1IDFileName  = "IdDictLVL1Calorimeter.xml";
-DetDescrCnvSvc.MuonIDFileName  = "IdDictMuonSpectrometer_P.03.xml";
-# One may turn off the read of one of more system iddict files
-#DetDescrCnvSvc.InDetIDFileName = "NULL";
-#DetDescrCnvSvc.LArIDFileName   = "NULL";
-#DetDescrCnvSvc.TileIDFileName  = "NULL";
-#DetDescrCnvSvc.LVL1IDFileName  = "NULL";
-#DetDescrCnvSvc.MuonIDFileName  = "NULL";
-#--------------------------------------------------------------
-# Set output level threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-#--------------------------------------------------------------
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel      = 2
-# Provide dictionary file
-#DetDescrCnvSvc.IdDictName = "ATLAS_IDS.xml";
-# Number of events to be processed (default is 10)
-theApp.EvtMax = 2
-# Provide a first/last range or a list
-#EventSelector.runs = {1, 100000};
-#EventSelector.firstRun = 1;
-#EventSelector.lastRun  = 100000;
diff --git a/DetectorDescription/IdDictParser/CMakeLists.txt b/DetectorDescription/IdDictParser/CMakeLists.txt
index df9dc06412ff9c86817074cd29d87d9f94b8bd73..1f36b437d4cb6d931d3b0832dfb59435fdd8f58a 100644
--- a/DetectorDescription/IdDictParser/CMakeLists.txt
+++ b/DetectorDescription/IdDictParser/CMakeLists.txt
@@ -1,31 +1,21 @@
-################################################################################
-# Package: IdDictParser
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IdDictParser )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/IdDict
-                          Tools/XMLCoreParser
-                          PRIVATE
-                          DetectorDescription/Identifier )
-
 # Component(s) in the package:
 atlas_add_library( IdDictParser
                    src/IdDictParser.cxx
                    PUBLIC_HEADERS IdDictParser
-                   LINK_LIBRARIES IdDict XMLCoreParser
-                   PRIVATE_LINK_LIBRARIES Identifier )
+                   LINK_LIBRARIES IdDict XMLCoreParser )
 
 atlas_add_executable( tid
                       test/tid.cxx
-                      LINK_LIBRARIES IdDict XMLCoreParser Identifier IdDictParser )
+                      LINK_LIBRARIES IdDictParser Identifier )
 
 atlas_add_executable( test_det_id
                       test/test_indet_id.cxx
-                      LINK_LIBRARIES IdDict XMLCoreParser Identifier IdDictParser )
+                      LINK_LIBRARIES IdDictParser Identifier )
 
 atlas_add_dictionary( IdDictParserDict
                       IdDictParser/IdDictParserDict.h
diff --git a/DetectorDescription/Identifier/CMakeLists.txt b/DetectorDescription/Identifier/CMakeLists.txt
index 7f3640b14a607ebc32efb6d4943ba96247e9dbe3..9e5611a25ed56999002aeca4a3f107adc1e171e7 100644
--- a/DetectorDescription/Identifier/CMakeLists.txt
+++ b/DetectorDescription/Identifier/CMakeLists.txt
@@ -1,13 +1,8 @@
-################################################################################
-# Package: Identifier
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Identifier )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 
diff --git a/DetectorDescription/RegSelLUT/CMakeLists.txt b/DetectorDescription/RegSelLUT/CMakeLists.txt
index d61cd8c58364a5ed8507d1f1c3957e0a330cc2f4..d9fe6499ee07053baf537a8f9d0857f2f76782ef 100644
--- a/DetectorDescription/RegSelLUT/CMakeLists.txt
+++ b/DetectorDescription/RegSelLUT/CMakeLists.txt
@@ -1,20 +1,10 @@
-################################################################################
-# Package: RegSelLUT
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RegSelLUT )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          DetectorDescription/IRegionSelector
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( RegSelLUT
                    src/*.cxx
                    PUBLIC_HEADERS RegSelLUT
                    LINK_LIBRARIES AthenaKernel Identifier GaudiKernel IRegionSelector )
-
diff --git a/DetectorDescription/RegSelSvcTest/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/RegSelSvcTest/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..5677ecac3126b867d582f080dfb05e5bfd0fe81b
--- /dev/null
+++ b/DetectorDescription/RegSelSvcTest/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+DetectorDescription/RegSelSvcTest
diff --git a/DetectorDescription/RegSelSvcTest/CMakeLists.txt b/DetectorDescription/RegSelSvcTest/CMakeLists.txt
index d012927d7ae5af0404c7d2006581ac514ccab628..002f6167d5cad2ba731aa32492a4d58d24ea20f5 100644
--- a/DetectorDescription/RegSelSvcTest/CMakeLists.txt
+++ b/DetectorDescription/RegSelSvcTest/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: RegSelSvcTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RegSelSvcTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          GaudiKernel
-                          DetectorDescription/IRegionSelector
-                          Control/AthenaBaseComps
-			              Trigger/TrigEvent/TrigSteeringEvent
-			              AtlasTest/TestTools )
-
 # Component(s) in the package:
 atlas_add_component( RegSelSvcTest
                      src/*.cxx src/components/*.cxx
diff --git a/DetectorDescription/RegionSelector/CMakeLists.txt b/DetectorDescription/RegionSelector/CMakeLists.txt
index 5697b57639a86074b7c521dfb947cb4db8702731..7e0e34584e59ea40c07717a6faba90bb647c9f3d 100644
--- a/DetectorDescription/RegionSelector/CMakeLists.txt
+++ b/DetectorDescription/RegionSelector/CMakeLists.txt
@@ -1,42 +1,23 @@
-################################################################################
-# Package: RegionSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RegionSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/IRegionSelector
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          DetectorDescription/RegSelLUT
-                          InnerDetector/InDetConditions/InDetConditionsSummaryService
-                          InnerDetector/InDetDetDescr/SCT_Cabling
-                          Tools/PathResolver )
-
 # Component(s) in the package:
 atlas_add_library( RegionSelectorLib
                    src/*.cxx
                    PUBLIC_HEADERS RegionSelector
-                   LINK_LIBRARIES AthenaKernel IRegionSelector Identifier GaudiKernel StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES AthenaBaseComps AthenaPoolUtilities RegSelLUT PathResolver SCT_CablingLib GeoModelInterfaces InDetConditionsSummaryService )
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel GeoModelInterfaces IRegionSelector Identifier RegSelLUT SCT_CablingLib
+                   PRIVATE_LINK_LIBRARIES AthenaPoolUtilities CxxUtils InDetConditionsSummaryService PathResolver StoreGateLib )
 
 atlas_add_component( RegionSelector
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaKernel IRegionSelector Identifier GaudiKernel AthenaBaseComps StoreGateLib SGtests AthenaPoolUtilities RegSelLUT PathResolver RegionSelectorLib SCT_CablingLib GeoModelInterfaces )
+                     LINK_LIBRARIES RegionSelectorLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
-atlas_install_joboptions( share/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+# Tests in the package:
 atlas_add_test( RegSelConfigTest
                 SCRIPT python -m RegionSelector.RegSelConfig
                 PROPERTIES TIMEOUT 300
diff --git a/DetectorDescription/RegionSelector/RegionSelector/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/RegionSelector/RegionSelector/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..b85eb00edef175bc560059b6d8124bebf71f6b8b
--- /dev/null
+++ b/DetectorDescription/RegionSelector/RegionSelector/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+DetectorDescription/RegionSelector
diff --git a/DetectorDescription/RegionSelector/doc/packagedoc.h b/DetectorDescription/RegionSelector/doc/packagedoc.h
index eefd738513cc95ba0364af4cd5bb7924849f96c4..bd61d78dea56bf7c4ea72a0cfbe2420b0a2117b3 100644
--- a/DetectorDescription/RegionSelector/doc/packagedoc.h
+++ b/DetectorDescription/RegionSelector/doc/packagedoc.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
 */
 
 /**
@@ -96,8 +96,6 @@ RegionSelector is configured by the RegSelSvcDefault
 configurable. Declaring the ServiceHandle as shown above should
 generate the configuration you need automatically.
 
-For backward compatability it can be imported, instantiated and added to the ServiceMgr by including the file "RegionSelector/RegionSelector_jobOptions.py". 
-
 RegionSelector has the following properties:
 
   - @c @b RegionType (@c @b string): not used;
diff --git a/DetectorDescription/RegionSelector/share/RegionSelector_jobOptions.py b/DetectorDescription/RegionSelector/share/RegionSelector_jobOptions.py
deleted file mode 100755
index 9ee192b130adbe5ed6cd827ed54721dbbf5540f4..0000000000000000000000000000000000000000
--- a/DetectorDescription/RegionSelector/share/RegionSelector_jobOptions.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Joboptions fragement for backward compatability;
-# please import configurables yourself instead.
-from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-from AthenaCommon.AppMgr import ServiceMgr
-theRegSelSvc = RegSelSvcDefault()
-ServiceMgr += theRegSelSvc
-
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.h b/DetectorDescription/RegionSelector/src/RegSelSvc.h
index 2a4a2b5bb553dd594e963b906e9025900ea21e43..aa10fb208b6fbfab5a57b3867fbe4a8dc2b20b1a 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.h
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.h
@@ -18,6 +18,7 @@
 #include "IRegionSelector/RegSelEnums.h"
 #include "RegionSelector/RegSelectorMap.h"
 #include "RegionSelector/RegSelectorHashMap.h"
+#include "CxxUtils/checker_macros.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 
@@ -47,12 +48,12 @@ class StoreGateSvc;
      GaudiSvc/.../src/ToolSvc/ToolSvc.cpp
      GaudiSvc/.../src/ToolSvc/ToolSvc.h
 
-     It still needs to be made thread-safe.
+     This service is deprecated.
 
      @author Simon George
 */
 
-class RegSelSvc: public extends2<AthService, IRegSelSvc, IIncidentListener>
+class ATLAS_NOT_THREAD_SAFE RegSelSvc: public extends2<AthService, IRegSelSvc, IIncidentListener>
 {
  public:
   /** @c Standard constructor for Gaudi services.
diff --git a/DetectorDescription/RoiDescriptor/CMakeLists.txt b/DetectorDescription/RoiDescriptor/CMakeLists.txt
index 48042153f849d1d5b9876b4db7ee24dd13f7394c..79747489870afee9dfb8b5aaee820411fc8e8329 100644
--- a/DetectorDescription/RoiDescriptor/CMakeLists.txt
+++ b/DetectorDescription/RoiDescriptor/CMakeLists.txt
@@ -1,31 +1,16 @@
-################################################################################
-# Package: RoiDescriptor
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RoiDescriptor )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/IRegionSelector )
-
-# External dependencies:
-find_package( Boost COMPONENTS program_options regex )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( RoiDescriptor
                    Root/RoiDescriptor.cxx
                    Root/RoiUtil.cxx
                    PUBLIC_HEADERS RoiDescriptor
-                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES IRegionSelector ${Boost_LIBRARIES}
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES IRegionSelector )
 
 atlas_add_dictionary( RoiDescriptorDict
                       RoiDescriptor/RoiDescriptorDict.h
                       RoiDescriptor/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} IRegionSelector RoiDescriptor )
-
+                      LINK_LIBRARIES RoiDescriptor )
diff --git a/DetectorDescription/RoiDescriptor/RoiDescriptor/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/RoiDescriptor/RoiDescriptor/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..b3b7f99649bd9cc23f92fa41db4fc371b1426f59
--- /dev/null
+++ b/DetectorDescription/RoiDescriptor/RoiDescriptor/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+DetectorDescription/RoiDescriptor
diff --git a/DetectorDescription/RoiDescriptor/Root/RoiDescriptor.cxx b/DetectorDescription/RoiDescriptor/Root/RoiDescriptor.cxx
index a938b74912b109b15eede82df656cdf1f4f32ada..79147111cabb43c20fbfbc9812d96eabffb03325 100644
--- a/DetectorDescription/RoiDescriptor/Root/RoiDescriptor.cxx
+++ b/DetectorDescription/RoiDescriptor/Root/RoiDescriptor.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
 */
 
 /**************************************************************************
@@ -33,7 +33,7 @@ static const float  M_PIF = float(M_PI);
 /// overall configuration - perhaps by an RoiBuilder class  
 const double RoiDescriptor::s_zedWidthDefault = 225;
 
-static int RoiVersion = 4;
+static const int RoiVersion = 4;
 
 RoiDescriptor::RoiDescriptor( bool fullscan )
   : m_phi(0), m_eta(0), m_zed(0), 
diff --git a/Event/ByteStreamCnvSvc/CMakeLists.txt b/Event/ByteStreamCnvSvc/CMakeLists.txt
index 0a9a8bc4cfcb17e5857d8d972dadc3f08750ef67..7ebfa49d91c177ddd53d9b51bba900a84074610e 100644
--- a/Event/ByteStreamCnvSvc/CMakeLists.txt
+++ b/Event/ByteStreamCnvSvc/CMakeLists.txt
@@ -1,30 +1,8 @@
-################################################################################
-# Package: ByteStreamCnvSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamCnvSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   Event/ByteStreamCnvSvcBase
-   Event/ByteStreamData
-   GaudiKernel
-   PRIVATE
-   Control/AthenaKernel
-   Control/SGTools
-   Control/StoreGate
-   Database/APR/CollectionBase
-   Database/APR/FileCatalog
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Database/PersistentDataModel
-   Event/EventInfo
-   Event/xAOD/xAODEventInfo
-   Event/xAOD/xAODTrigger
-   Event/ByteStreamCnvSvcLegacy )
-
 # External dependencies:
 find_package( Boost COMPONENTS system )
 find_package( CORAL COMPONENTS CoralBase )
@@ -62,7 +40,6 @@ atlas_add_executable( AtlListBSEvents test/AtlListBSEvents.cxx
    INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
    LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${Boost_LIBRARIES} )
 
-
 # Test(s) in the package:
 atlas_add_test( BSEventSelector
    SCRIPT "athena.py ByteStreamCnvSvc/BSEventSelector_test_jobOptions.py"
diff --git a/Event/ByteStreamCnvSvc/doc/ByteStream.txt b/Event/ByteStreamCnvSvc/doc/ByteStream.txt
index 5c6ccec61398f45a6b6cafe5b4210d05f406e3a2..43e5bd17da84cf37fcf8fd3f46c5eaea893e8420 100644
--- a/Event/ByteStreamCnvSvc/doc/ByteStream.txt
+++ b/Event/ByteStreamCnvSvc/doc/ByteStream.txt
@@ -287,7 +287,7 @@ Here is the jobOptions from LArByteStream.
  
 // define how the LArRawChannels are created. 
 // ... omitted. 
-ApplicationMgr.DLLs += {"LArByteStream", "RMS_LArByteStream" }  ;
+ApplicationMgr.Dlls += {"LArByteStream", "RMS_LArByteStream" }  ;
 // Select types to be written
 StreamBS.Itemlist +={"2721#*"} ; 
 			  
diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
index cc56305d7343063bcf88f23b847058d74404e1dd..81e839e26de8128dd987efcf02ade43d5da7a73b 100644
--- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
+++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
@@ -1,107 +1,182 @@
-#
-#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-#
+#!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""Set up to read and/or write bytestream files.
 
+This module configures the Athena components required to read from
+RAW/bytestream input. Use either byteStreamReadCfg to set up for reading
+and byteStreamWriteCfg to set up for writing. Merge the component accumulator
+the functions return into your job configuration as needed.
+
+Executing this module will run a short test over 10 events. The events are read
+from the default bytestream input on CVMFS and written to a local bytestream
+file.
+
+    Typical usage examples:
+
+        component_accumulator.merge(byteStreamReadCfg(ConfigFlags))
+"""
+import AthenaConfiguration.ComponentFactory
+import AthenaConfiguration.AllConfigFlags
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from AthenaConfiguration.ComponentFactory import CompFactory
+from AthenaConfiguration.TestDefaults import defaultTestFiles
+from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+from AthenaCommon.Configurable import Configurable
+from AthenaCommon.Logging import logging
+from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
 
 
-def ByteStreamReadCfg( inputFlags, typeNames=[] ):
-    """
-    Creates accumulator for BS reading
-    """
+def ByteStreamReadCfg(flags, type_names=None):
+    """Set up to read from a bytestream file
 
-    acc = ComponentAccumulator()
+    The function adds the components required to read events and metadata from
+    bytestream input. May be used to read events from a secondary input as well
+    primary input file.
 
-    ByteStreamCnvSvc, ByteStreamEventStorageInputSvc, EventSelectorByteStream=CompFactory.getComps("ByteStreamCnvSvc","ByteStreamEventStorageInputSvc","EventSelectorByteStream",)
+    Args:
+        flags:      Job configuration, usually derived from ConfigFlags
+        type_names: (optional) specific type names for address provider to find
 
-    if inputFlags.Input.SecondaryFiles:
-        filenames = inputFlags.Input.SecondaryFiles
-        eventSelector = EventSelectorByteStream("SecondaryEventSelector", IsSecondary=True)
-        eventSelector.Input = filenames
-        acc.addService( eventSelector )
+    Returns:
+        A component accumulator fragment containing the components required to
+        read from bytestream. Should be merged into main job configuration.
+    """
+    result = ComponentAccumulator()
+    comp_factory = AthenaConfiguration.ComponentFactory.CompFactory
+
+    bytestream_conversion = comp_factory.ByteStreamCnvSvc()
+    result.addService(bytestream_conversion)
+
+    bytestream_input = comp_factory.ByteStreamEventStorageInputSvc(
+        name="ByteStreamInputSvc",
+        EventInfoKey="{}EventInfo".format(
+            flags.Overlay.BkgPrefix if flags.Overlay.DataOverlay else ""
+        ),
+    )
+    result.addService(bytestream_input)
+
+    if flags.Input.SecondaryFiles:
+        event_selector = comp_factory.EventSelectorByteStream(
+            name="SecondaryEventSelector",
+            IsSecondary=True,
+            Input=flags.Input.SecondaryFiles,
+            ByteStreamInputSvc=bytestream_input.name,
+        )
+        result.addService(event_selector)
     else:
-        filenames = inputFlags.Input.Files
-
-        xAODMaker__EventInfoSelectorTool = CompFactory.xAODMaker.EventInfoSelectorTool
-        xconv = xAODMaker__EventInfoSelectorTool()
-        eventSelector = EventSelectorByteStream("EventSelector")
-        eventSelector.Input = filenames
-        eventSelector.HelperTools += [xconv]
-        eventSelector.SkipEvents=inputFlags.Exec.SkipEvents
-        acc.addService( eventSelector )
-        acc.setAppProperty( "EvtSel", eventSelector.name )
-
-    bsInputSvc = ByteStreamEventStorageInputSvc( "ByteStreamInputSvc" )
-    if inputFlags.Overlay.DataOverlay:
-        bsInputSvc.EventInfoKey = inputFlags.Overlay.BkgPrefix + "EventInfo"
-    acc.addService( bsInputSvc )
-
-    EvtPersistencySvc=CompFactory.EvtPersistencySvc
-    eventPersistencySvc = EvtPersistencySvc( "EventPersistencySvc" )
-    acc.addService( eventPersistencySvc )
-    
-    bsCnvSvc = ByteStreamCnvSvc()
-    eventSelector.ByteStreamInputSvc = bsInputSvc.name
-    eventPersistencySvc.CnvServices = [ bsCnvSvc.name ]
-    acc.addService( bsCnvSvc )
-
-    ROBDataProviderSvc=CompFactory.ROBDataProviderSvc
-    robDPSvc = ROBDataProviderSvc()
-    acc.addService( robDPSvc )
-
-    ByteStreamAddressProviderSvc=CompFactory.ByteStreamAddressProviderSvc
-    bsAddressProviderSvc = ByteStreamAddressProviderSvc(TypeNames=typeNames)
-    acc.addService( bsAddressProviderSvc )
-    
-    ProxyProviderSvc=CompFactory.ProxyProviderSvc
-
-    from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
-    acc.merge(MetaDataSvcCfg(inputFlags, ["IOVDbMetaDataTool", "ByteStreamMetadataTool"]))
-    
-    proxy = ProxyProviderSvc()
-    proxy.ProviderNames += [ bsAddressProviderSvc.name ]
-    acc.addService( proxy )
-
-    return acc
-
-def ByteStreamWriteCfg( flags, typeNames=[] ):
-    acc = ComponentAccumulator("AthOutSeq")
-    outputSvc = CompFactory.ByteStreamEventStorageOutputSvc()
-    outputSvc.MaxFileMB = 15000
-    # event (beyond which it creates a new file)
-    outputSvc.MaxFileNE = 15000000
-    outputSvc.OutputDirectory = "./"
-    outputSvc.AppName = "Athena"
+        event_selector = comp_factory.EventSelectorByteStream(
+            name="EventSelector",
+            Input=flags.Input.Files,
+            SkipEvents=flags.Exec.SkipEvents,
+            ByteStreamInputSvc=bytestream_input.name,
+        )
+        event_selector.HelperTools += [
+            comp_factory.xAODMaker.EventInfoSelectorTool()
+        ]
+        result.addService(event_selector)
+        result.setAppProperty("EvtSel", event_selector.name)
+
+    event_persistency = comp_factory.EvtPersistencySvc(
+        name="EventPersistencySvc", CnvServices=[bytestream_conversion.name]
+    )
+    result.addService(event_persistency)
+
+    result.addService(comp_factory.ROBDataProviderSvc())
+
+    address_provider = comp_factory.ByteStreamAddressProviderSvc(
+        TypeNames=type_names if type_names else list(),
+    )
+    result.addService(address_provider)
+
+    result.merge(
+        MetaDataSvcCfg(flags, ["IOVDbMetaDataTool", "ByteStreamMetadataTool"])
+    )
+
+    proxy = comp_factory.ProxyProviderSvc()
+    proxy.ProviderNames += [address_provider.name]
+    result.addService(proxy)
+
+    return result
+
+
+def ByteStreamWriteCfg(flags, type_names=None):
+    """Set up output stream in RAW/bytestream format
+
+    Configure components responsible for writing bytestream format. Write job
+    results to bytestream file. ATLAS file naming conventions are enforced as
+    determined from the given configuration flags.
+
+    Args:
+        flags:      Job configuration, usually derived from ConfigFlags
+        type_names: (optional) Specify item list for output stream to write
+
+    Returns:
+        A component accumulator fragment containing the components required to
+        write to bytestream. Should be merged into main job configuration.
+    """
+    all_runs = set(flags.Input.RunNumber)
+    assert (
+        len(all_runs) == 1
+    ), "Input is from multiple runs, do not know which one to use {}".format(
+        all_runs
+    )
+
+    result = ComponentAccumulator("AthOutSeq")
+    comp_factory = AthenaConfiguration.ComponentFactory.CompFactory
+
+    event_storage_output = comp_factory.ByteStreamEventStorageOutputSvc(
+        MaxFileMB=15000,
+        MaxFileNE=15000000,  # event (beyond which it creates a new file)
+        OutputDirectory="./",
+        AppName="Athena",
+        RunNumber=all_runs.pop(),
+    )
+    result.addService(event_storage_output)
     # release variable depends the way the env is configured
-    #FileTag = release
-    allRuns = set(flags.Input.RunNumber)
-    assert len(allRuns) == 1, "The input is from multiple runs, do not know which one to use {}".format(allRuns)
-    outputSvc.RunNumber = allRuns.pop()
+    # FileTag = release
 
-    bsCnvSvc  = CompFactory.ByteStreamCnvSvc("ByteStreamCnvSvc")
+    bytestream_conversion = comp_factory.ByteStreamCnvSvc(
+        name="ByteStreamCnvSvc",
+        ByteStreamOutputSvcList=[event_storage_output.getName()],
+    )
+    result.addService(bytestream_conversion)
 
-    bsCnvSvc.ByteStreamOutputSvcList = [ outputSvc.getName() ]
-    streamAlg = CompFactory.AthenaOutputStream( "BSOutputStreamAlg",
-                                                EvtConversionSvc = bsCnvSvc.getName(),
-                                                OutputFile = "ByteStreamEventStorageOutputSvc",
-                                                ItemList = typeNames )
+    output_stream = comp_factory.AthenaOutputStream(
+        name="BSOutputStreamAlg",
+        EvtConversionSvc=bytestream_conversion.name,
+        OutputFile="ByteStreamEventStorageOutputSvc",
+        ItemList=type_names if type_names else list(),
+    )
+    result.addEventAlgo(output_stream, primary=True)
 
-    acc.addService( outputSvc )
-    acc.addService( bsCnvSvc )
-    acc.addEventAlgo( streamAlg, primary = True )
-    return acc
+    return result
 
 
+def main():
+    """Run a functional test if module is executed"""
+    log = logging.getLogger('ByteStreamConfig')
+    Configurable.configurableRun3Behavior = True
 
-if __name__ == "__main__":
-    from AthenaConfiguration.AllConfigFlags import ConfigFlags    
-    from AthenaConfiguration.TestDefaults import defaultTestFiles
-    from AthenaCommon.Configurable import Configurable
-    Configurable.configurableRun3Behavior=True
+    config_flags = AthenaConfiguration.AllConfigFlags.ConfigFlags
+    config_flags.Input.Files = defaultTestFiles.RAW
+    config_flags.Output.doWriteBS = True
+    config_flags.lock()
 
-    ConfigFlags.Input.Files = defaultTestFiles.RAW
-
-    acc = ByteStreamReadCfg( ConfigFlags )
-    acc.store( open( "test.pkl", "wb" ) )
+    read = ByteStreamReadCfg(config_flags)
+    read.store(open("test.pkl", "wb"))
     print("All OK")
+
+    write = ByteStreamWriteCfg(config_flags)
+    write.printConfig()
+    log.info("Write setup OK")
+
+    acc = MainServicesCfg(config_flags)
+    acc.merge(read)
+    acc.merge(write)
+    acc.printConfig()
+    log.info("Config OK")
+
+    acc.run(10)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ATLAS_CHECK_THREAD_SAFETY b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..a52a59a2d4d21c27d41e324ab27d19f94855cf51
--- /dev/null
+++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/ByteStreamCnvSvcBase
diff --git a/Event/ByteStreamCnvSvcBase/CMakeLists.txt b/Event/ByteStreamCnvSvcBase/CMakeLists.txt
index cec0ade0db7f6d2adde2150922b6c6a79ed6e84b..b51e5a18b1ca55ce51a766258ca232f9945640b6 100644
--- a/Event/ByteStreamCnvSvcBase/CMakeLists.txt
+++ b/Event/ByteStreamCnvSvcBase/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: ByteStreamCnvSvcBase
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamCnvSvcBase )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Event/ByteStreamData
-                          GaudiKernel
-                          PRIVATE
-                          Control/SGTools
-			  AtlasTest/TestTools )
-
 # External dependencies:
 find_package( tdaq-common COMPONENTS eformat eformat_write )
 
@@ -29,15 +16,12 @@ atlas_add_library( ByteStreamCnvSvcBaseLib
 
 atlas_add_component( ByteStreamCnvSvcBase
                      src/components/*.cxx
-                     INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests ByteStreamData ByteStreamData_test GaudiKernel SGTools ByteStreamCnvSvcBaseLib )
-
-
-atlas_add_test( ROBDataProviderSvcMT		 
-		SCRIPT test/test_ROBDataProviderSvcMT.sh		
-		PROPERTIES TIMEOUT 1200 )
-#
+                     LINK_LIBRARIES ByteStreamCnvSvcBaseLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
 
+# Tests in the package:
+atlas_add_test( ROBDataProviderSvcMT
+		SCRIPT test/test_ROBDataProviderSvcMT.sh
+		PROPERTIES TIMEOUT 1200 )
diff --git a/Event/ByteStreamCnvSvcLegacy/CMakeLists.txt b/Event/ByteStreamCnvSvcLegacy/CMakeLists.txt
index 7561b31f5bf11f6058e4a27abaf0cd59346b53ac..775000f22bbc8684cd26e7e4c3efdf39aeb1cc04 100644
--- a/Event/ByteStreamCnvSvcLegacy/CMakeLists.txt
+++ b/Event/ByteStreamCnvSvcLegacy/CMakeLists.txt
@@ -1,7 +1,4 @@
-# $Id: CMakeLists.txt 756859 2016-06-22 10:53:03Z krasznaa $
-################################################################################
-# Package: ByteStreamCnvSvcLegacy
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamCnvSvcLegacy )
diff --git a/Event/ByteStreamData/ByteStreamData/ATLAS_CHECK_THREAD_SAFETY b/Event/ByteStreamData/ByteStreamData/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..797ff54a0931560f017376438e04395b06b37d1a
--- /dev/null
+++ b/Event/ByteStreamData/ByteStreamData/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/ByteStreamData
diff --git a/Event/ByteStreamData/CMakeLists.txt b/Event/ByteStreamData/CMakeLists.txt
index 4b0fb94f8f2b87d54861d872133a76330d403812..1f8554f05be569cf1dfca915fadc5036eeb02b31 100644
--- a/Event/ByteStreamData/CMakeLists.txt
+++ b/Event/ByteStreamData/CMakeLists.txt
@@ -1,17 +1,8 @@
-# $Id: CMakeLists.txt 782284 2016-11-04 08:07:16Z krasznaa $
-################################################################################
-# Package: ByteStreamData
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamData )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaKernel
-   Control/AthContainers )
-
 # External dependencies:
 find_package( tdaq-common COMPONENTS DataReader )
 
diff --git a/Event/ByteStreamEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY b/Event/ByteStreamEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..355444cf82c17ed2f7151f3aaa2cee806bff55f5
--- /dev/null
+++ b/Event/ByteStreamEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/ByteStreamEventAthenaPool
diff --git a/Event/ByteStreamEventAthenaPool/CMakeLists.txt b/Event/ByteStreamEventAthenaPool/CMakeLists.txt
index 1e93fa1d6517bc15c6e13ea6632c812335d558ae..43aba7ba3d298d134f2f6c787405358fe575a074 100644
--- a/Event/ByteStreamEventAthenaPool/CMakeLists.txt
+++ b/Event/ByteStreamEventAthenaPool/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: ByteStreamEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Event/ByteStreamData
-                          Event/ByteStreamEventTPCnv )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( ByteStreamEventAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ATLAS_CHECK_THREAD_SAFETY b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..7d0bf8761b3f2dc6c7ae773c495143bcce509578
--- /dev/null
+++ b/Event/ByteStreamEventPTCnv/ByteStreamEventPTCnv/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/ByteStreamEventPTCnv
diff --git a/Event/ByteStreamEventPTCnv/CMakeLists.txt b/Event/ByteStreamEventPTCnv/CMakeLists.txt
index 4c1839c2daa6ffa27b292b5142caed98a03a94fe..a564ac451801144d1c3d65a1e9bfa328860579d9 100644
--- a/Event/ByteStreamEventPTCnv/CMakeLists.txt
+++ b/Event/ByteStreamEventPTCnv/CMakeLists.txt
@@ -1,27 +1,15 @@
-################################################################################
-# Package: ByteStreamEventPTCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamEventPTCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/ByteStreamEventTPCnv )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( ByteStreamEventPTCnv
                          src/*.cxx
                          PUBLIC_HEADERS ByteStreamEventPTCnv
-                         PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} ByteStreamEventTPCnv )
+                         LINK_LIBRARIES ByteStreamEventTPCnv )
 
 atlas_add_dictionary( ByteStreamEventPTCnvDict
                       ByteStreamEventPTCnv/ByteStreamEventPTCnvDict.h
                       ByteStreamEventPTCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ByteStreamEventTPCnv ByteStreamEventPTCnv )
-
+                      LINK_LIBRARIES ByteStreamEventPTCnv )
diff --git a/Event/ByteStreamEventTPCnv/ByteStreamEventTPCnv/ATLAS_CHECK_THREAD_SAFETY b/Event/ByteStreamEventTPCnv/ByteStreamEventTPCnv/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..12c42e547065e0d211feea0a6787a023a5adc4fd
--- /dev/null
+++ b/Event/ByteStreamEventTPCnv/ByteStreamEventTPCnv/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/ByteStreamEventTPCnv
diff --git a/Event/ByteStreamEventTPCnv/CMakeLists.txt b/Event/ByteStreamEventTPCnv/CMakeLists.txt
index 22ff43f590d0b22cf1b24652d5ce3df921df26d5..7f569b61c52dcce40ba9dffa9e1d5463c2382aea 100644
--- a/Event/ByteStreamEventTPCnv/CMakeLists.txt
+++ b/Event/ByteStreamEventTPCnv/CMakeLists.txt
@@ -1,34 +1,20 @@
-################################################################################
-# Package: ByteStreamEventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamEventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Event/ByteStreamData )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( ByteStreamEventTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS ByteStreamEventTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib ByteStreamData ByteStreamData_test )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib ByteStreamData )
 
 atlas_add_dictionary( ByteStreamEventTPCnvDict
                       ByteStreamEventTPCnv/ByteStreamEventTPCnvDict.h
                       ByteStreamEventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib ByteStreamData ByteStreamData_test ByteStreamEventTPCnv )
+                      LINK_LIBRARIES ByteStreamEventTPCnv )
 
 atlas_add_dictionary( OLD_ByteStreamEventTPCnvDict
                       ByteStreamEventTPCnv/ByteStreamEventTPCnvDict.h
                       ByteStreamEventTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib ByteStreamData ByteStreamData_test ByteStreamEventTPCnv )
-
+                      LINK_LIBRARIES ByteStreamEventTPCnv )
diff --git a/Event/ByteStreamStoragePlugins/ATLAS_CHECK_THREAD_SAFETY b/Event/ByteStreamStoragePlugins/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..533126bc27a6a5eb310b9df86023cef2fe310eb3
--- /dev/null
+++ b/Event/ByteStreamStoragePlugins/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/ByteStreamStoragePlugins
diff --git a/Event/ByteStreamStoragePlugins/CMakeLists.txt b/Event/ByteStreamStoragePlugins/CMakeLists.txt
index 12c18db67f031fd006353e2eb7f545eb6e0bcc93..61811b70e08688fd908498bc2d9f9f6a259daef5 100644
--- a/Event/ByteStreamStoragePlugins/CMakeLists.txt
+++ b/Event/ByteStreamStoragePlugins/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: ByteStreamStoragePlugins
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamStoragePlugins )
diff --git a/Event/ByteStreamTest/CMakeLists.txt b/Event/ByteStreamTest/CMakeLists.txt
index 4e6b4f54509f4c5a9e63164635eb0aafb5ee94e5..77ab2ace114d60e85f61dd7abf2ecd049ea3f043 100644
--- a/Event/ByteStreamTest/CMakeLists.txt
+++ b/Event/ByteStreamTest/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: ByteStreamTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ByteStreamTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/MinimalRunTime
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/ByteStreamCnvSvc
-                          Event/ByteStreamData
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_component( ByteStreamTest
                      src/EvenEventsSelectorTool.cxx
@@ -25,7 +12,6 @@ atlas_add_component( ByteStreamTest
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
 
-
 function (bytestreamtest_run_test jo)
   cmake_parse_arguments( ARG "" "DEPENDS" "" ${ARGN} )
 
@@ -42,7 +28,6 @@ function (bytestreamtest_run_test jo)
   endif()
 endfunction (bytestreamtest_run_test)
 
-
 #bytestreamtest_run_test( SkipAll )
 bytestreamtest_run_test( SkipOne )
 bytestreamtest_run_test( SkipNone )
diff --git a/Event/EventCommonTPCnv/share/EventCommonTPCnv_test.txt b/Event/EventCommonTPCnv/share/EventCommonTPCnv_test.txt
index 52e74f3f3960da310f117cb262b0f82eafbfe2b6..ec4df14e6475f3329b47b6070761b55c56129784 100644
--- a/Event/EventCommonTPCnv/share/EventCommonTPCnv_test.txt
+++ b/Event/EventCommonTPCnv/share/EventCommonTPCnv_test.txt
@@ -1,2 +1,2 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc" };
diff --git a/Event/EventCommonTPCnv/share/INav4MomAssocsCnv_p1_test.ref b/Event/EventCommonTPCnv/share/INav4MomAssocsCnv_p1_test.ref
index 4fea735023171b1b557046323b0908fe330ec394..c0d495514b55f8b1e3602a5da35482157fe5700d 100644
--- a/Event/EventCommonTPCnv/share/INav4MomAssocsCnv_p1_test.ref
+++ b/Event/EventCommonTPCnv/share/INav4MomAssocsCnv_p1_test.ref
@@ -3,7 +3,7 @@ INav4MomAssocsCnv_p1_test
 
 Initializing Gaudi ApplicationMgr using job opts ../share/EventCommonTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/EventCommonTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/EventCommonTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/scripts/Overlay_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/scripts/Overlay_tf.py
deleted file mode 100755
index 8a0cea6953100b1440d127bc3aa132b35a152e07..0000000000000000000000000000000000000000
--- a/Event/EventOverlay/EventOverlayJobTransforms/scripts/Overlay_tf.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-"""
-Run overlay between either pre-mixed MC background RDO or zero-bias data RDO and hard scatter HITS
-"""
-
-import sys
-import time
-
-# Setup core logging here
-from PyJobTransforms.trfLogger import msg
-msg.info('logging set in %s' % sys.argv[0])
-
-from PyJobTransforms.transform import transform
-from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments, addTriggerArguments
-from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
-
-# Prodsys hack...
-ListOfDefaultPositionalKeys=['--AFPOn', '--ALFAOn', '--AMIConfig', '--AMITag', '--AddCaloDigi', '--DBRelease', '--FwdRegionOn', '--LucidOn', '--ReadByteStream', '--ZDCOn', '--argJSON', '--asetup', '--athena', '--athenaMPMergeTargetSize', '--athenaopts', '--attempt', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--digiRndmSvc', '--digiSeedOffset1', '--digiSeedOffset2', '--digiSteeringConf', '--doAllNoise', '--dumpJSON', '--dumpPickle', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--fSampltag', '--fileValidation', '--geometryVersion', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputFileValidation', '--inputHITSFile', '--inputRDO_BKGFile', '--jobid', '--maxEvents', '--orphanKiller', '--outputFileValidation', '--outputRDOFile', '--outputRDO_FILTFile', '--outputRDO_SGNLFile', '--parallelFileValidation', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--reportType', '--runNumber', '--samplingFractionDbTag', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--steering', '--taskid', '--tcmalloc', '--tmpRDO', '--tmpRDO_FILT', '--triggerConfig', '--valgrind', '--valgrindbasicopts', '--valgrindextraopts']
-
-@stdTrfExceptionHandler
-@sigUsrStackTrace
-
-def main():
-
-    msg.info('This is %s' % sys.argv[0])
-
-    trf = getTransform()
-    trf.parseCmdLineArgs(sys.argv[1:])
-    trf.execute()
-    trf.generateReport()
-
-    msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
-    sys.exit(trf.exitCode)
-
-def getTransform():
-    executorSet = set()
-    from EventOverlayJobTransforms.overlayTransformUtils import addOverlayArguments, addOverlaySubstep
-    addOverlaySubstep(executorSet)
-    trf = transform(executor = executorSet, description = 'ATLAS Overlay transform. Inputs must be HITS. Outputs must be RDO.')
-    addAthenaArguments(trf.parser)
-    addDetectorArguments(trf.parser)
-    addTriggerArguments(trf.parser, addTrigFilter=False)
-    addOverlayArguments(trf.parser)
-    return trf
-
-if __name__ == '__main__':
-    main()
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py
index 8dfc573dad6cfc4ace70cdf30af4874f5801f50b..98881914bf59ad105554eb508cfcc519e65c49be 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/BeamOverlay_jobOptions.py
@@ -5,10 +5,13 @@ from AthenaCommon.DetFlags import DetFlags
 
 if DetFlags.overlay.BCM_on():
     if overlayFlags.isDataOverlay():
-        job.InDetBCMRawDataProvider.RDOKey = overlayFlags.dataStore() + "+BCM_RDOs"
+        if overlayFlags.isOverlayMT():
+            job.InDetBCMRawDataProvider.RDOKey = overlayFlags.bkgPrefix() + "BCM_RDOs"
+        else:
+            job.InDetBCMRawDataProvider.RDOKey = overlayFlags.dataStore() + "+BCM_RDOs"
 
     from AthenaCommon import CfgGetter
     job += CfgGetter.getAlgorithm("BCM_OverlayDigitization")
     job += CfgGetter.getAlgorithm("BCMOverlay")
     if DetFlags.overlay.Truth_on():
-        job += CfgGetter.getAlgorithm("BCMSDOOverlay")
\ No newline at end of file
+        job += CfgGetter.getAlgorithm("BCMSDOOverlay")
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py
index ecf033ea09316635751d20c4c64d990c08a588b2..79a9ebf8093662f92a34405b0d6a2dc16efd9767 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py
@@ -34,11 +34,18 @@ if DetFlags.overlay.LAr_on():
           #inhibit the reading of LArawChanels, they are created offline from the overlaid LArDigits:
           job.LArRawDataReadingAlg.LArRawChannelKey="" 
           #Configure the reading of the background digits from ByteStream
-          job.LArRawDataReadingAlg.LArDigitKey=overlayFlags.dataStore()+"+FREE"
+          if overlayFlags.isOverlayMT():
+             job.LArRawDataReadingAlg.LArDigitKey="FREE"
+          else:
+             job.LArRawDataReadingAlg.LArDigitKey=overlayFlags.dataStore()+"+FREE"
        except AttributeError:
           #in case the LArRawDataReadingAlg was not set up by someone:
-          job+=LArRawDataReadingAlg(LArRawChannelKey="",
-                                    LArDigitKey=overlayFlags.dataStore()+"+FREE")
+          if overlayFlags.isOverlayMT():
+             job+=LArRawDataReadingAlg(LArRawChannelKey="",
+                                       LArDigitKey="FREE")
+          else:   
+             job+=LArRawDataReadingAlg(LArRawChannelKey="",
+                                       LArDigitKey=overlayFlags.dataStore()+"+FREE")
           pass
 
     from LArDigitization.LArDigitGetter import LArDigitGetter
@@ -84,10 +91,18 @@ if DetFlags.overlay.Tile_on():
        theTileDigitsMaker.OnlyUseContainerName = False
     if overlayFlags.isDataOverlay():
        theApp.Dlls += [ "TileByteStream"]
-       ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/TileRawChannelCnt"]
-       ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileDigitsContainer/TileDigitsCnt"]
-       ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileL2Container/TileL2Cnt"]
-       ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/MuRcvRawChCnt"]
-       ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileDigitsContainer/MuRcvDigitsCnt"]
+
+       if overlayFlags.isOverlayMT():
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/" + overlayFlags.bkgPrefix() + "TileRawChannelCnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileDigitsContainer/" + overlayFlags.bkgPrefix() + "TileDigitsCnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileL2Container/" + overlayFlags.bkgPrefix() + "TileL2Cnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/" + overlayFlags.bkgPrefix() + "MuRcvRawChCnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileDigitsContainer/" + overlayFlags.bkgPrefix() + "MuRcvDigitsCnt"]
+       else:
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/TileRawChannelCnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileDigitsContainer/TileDigitsCnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileL2Container/TileL2Cnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/MuRcvRawChCnt"]
+          ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileDigitsContainer/MuRcvDigitsCnt"]
 
 #--------------------
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py
index e3e6e80525e777723bb6c0920b79d6763e2f1981..6efe458c0d172c192058fb3fc11d87b6ed1f339a 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py
@@ -27,12 +27,14 @@ try:
     from RecAlgs.RecAlgsConf import TimingAlg
     job += TimingAlg("OverlayTimerBegin",
                      TimingObjOutputName="HITStoRDO_timings")
-except:
-    OverlayLog.warning('Could not add TimingAlg, no timing info will be written out.')
+except Exception:
+    from AthenaCommon.Logging import logging
+    logOverlay = logging.getLogger('Overlay')
+    logOverlay.warning('Could not add TimingAlg, no timing info will be written out.')
 
 # Copy over timings if needed
-job += CfgGetter.getAlgorithm("CopyTimings")
-
+if not overlayFlags.isDataOverlay():
+    job += CfgGetter.getAlgorithm("CopyTimings")
 
 #-------------------------
 # Double event selector
@@ -40,8 +42,13 @@ job += CfgGetter.getAlgorithm("CopyTimings")
 import AthenaPoolCnvSvc.ReadAthenaPoolDouble
 from AthenaCommon.AppMgr import ServiceMgr
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolRDOInput()
-ServiceMgr.SecondaryEventSelector.InputCollections = athenaCommonFlags.PoolHitsInput()
+if overlayFlags.isDataOverlay():
+    ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolHitsInput()
+    ServiceMgr.SecondaryEventSelector.Input = athenaCommonFlags.FilesInput()
+    ServiceMgr.SecondaryEventSelector.ProcessBadEvent = True
+else:
+    ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolRDOInput()
+    ServiceMgr.SecondaryEventSelector.InputCollections = athenaCommonFlags.PoolHitsInput()
 if athenaCommonFlags.SkipEvents.statusOn:
     ServiceMgr.DoubleEventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 
@@ -91,3 +98,7 @@ if overlayFlags.processLegacyEventInfo() and not hasattr(job, "xAODMaker::EventI
 
 # Run the xAOD::EventInfo overlay
 job += CfgGetter.getAlgorithm("EventInfoOverlay")
+
+# Setup BS conversion for data overlay
+if overlayFlags.isDataOverlay():
+    include("RecExCommon/BSRead_config.py")
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
index 3707ba1695c061a7c3c854bc62925afcf549d75a..3b8446676e948f8d0172a9d3c5bdac656d27458d 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
@@ -20,7 +20,10 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
             job += CfgGetter.getAlgorithm("PixelSDOOverlay")
 
         if overlayFlags.isDataOverlay():
-            job.InDetPixelRawDataProvider.RDOKey = overlayFlags.dataStore()+"+PixelRDOs"
+            if overlayFlags.isOverlayMT():
+                job.InDetPixelRawDataProvider.RDOKey = overlayFlags.bkgPrefix()+"PixelRDOs"
+            else:
+                job.InDetPixelRawDataProvider.RDOKey = overlayFlags.dataStore()+"+PixelRDOs"
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "PixelRDO_Container/PixelRDOs" ]
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::PixelClusterContainer/PixelOnlineClusters" ]
         else:
@@ -51,9 +54,14 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
         if overlayFlags.isDataOverlay():
             include("InDetRecExample/InDetRecConditionsAccess.py")
 
-            job.InDetSCTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+SCT_RDOs"
-            job.InDetSCTRawDataProvider.LVL1IDKey = overlayFlags.dataStore()+"+SCT_LVL1ID"
-            job.InDetSCTRawDataProvider.BCIDKey = overlayFlags.dataStore()+"+SCT_BCID"
+            if overlayFlags.isOverlayMT():
+                job.InDetSCTRawDataProvider.RDOKey = overlayFlags.bkgPrefix()+"SCT_RDOs"
+                job.InDetSCTRawDataProvider.LVL1IDKey = overlayFlags.bkgPrefix()+"SCT_LVL1ID"
+                job.InDetSCTRawDataProvider.BCIDKey = overlayFlags.bkgPrefix()+"SCT_BCID"
+            else:
+                job.InDetSCTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+SCT_RDOs"
+                job.InDetSCTRawDataProvider.LVL1IDKey = overlayFlags.dataStore()+"+SCT_LVL1ID"
+                job.InDetSCTRawDataProvider.BCIDKey = overlayFlags.dataStore()+"+SCT_BCID"
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "SCT_RDO_Container/SCT_RDOs" ]
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::SCT_ClusterContainer/SCT_OnlineClusters" ]
 
@@ -77,7 +85,10 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
         include("InDetRecExample/InDetRecConditionsAccess.py")
         
         if overlayFlags.isDataOverlay():
-            job.InDetTRTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+TRT_RDOs"
+            if overlayFlags.isOverlayMT():
+                job.InDetTRTRawDataProvider.RDOKey = overlayFlags.bkgPrefix()+"TRT_RDOs"
+            else:
+                job.InDetTRTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+TRT_RDOs"
             #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TRT_RDO_Container/TRT_RDOs" ]
 
             #from IOVDbSvc.CondDB import conddb
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.Overlay_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.Overlay_tf.py
deleted file mode 100644
index 5900f11b765ef019988df9099c9fa2f3e1b28199..0000000000000000000000000000000000000000
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.Overlay_tf.py
+++ /dev/null
@@ -1,243 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-#-------------------------------------
-# Common data and MC overlay skeleton
-#-------------------------------------
-from AthenaCommon.Logging import logging
-OverlayLog = logging.getLogger('overlay')
-OverlayLog.info('****************** STARTING OVERLAY *****************')
-
-OverlayLog.info('**** Transformation run arguments')
-OverlayLog.info(str(runArgs))
-
-# PerfMon
-from PerfMonComps.PerfMonFlags import jobproperties as pm
-pm.PerfMonFlags.doMonitoring = True  # to enable monitoring
-pm.PerfMonFlags.doFastMon = True     # to only enable a lightweight monitoring
-
-# Pre-exec
-if hasattr(runArgs, "preExec") and runArgs.preExec != 'NONE':
-    for cmd in runArgs.preExec:
-        exec(cmd)
-
-# Pre-include
-if hasattr(runArgs, 'preInclude'):
-    for cf in runArgs.preInclude:
-        include(cf)
-
-#----------------------------
-# Set flags from job options
-#----------------------------
-from AthenaCommon.GlobalFlags  import globalflags
-from Digitization.DigitizationFlags import digitizationFlags
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from OverlayCommonAlgs.OverlayFlags import overlayFlags
-
-# TODO: handle MC and data overlay in the same transform
-globalflags.isOverlay.set_Value_and_Lock(True)
-globalflags.DataSource.set_Value_and_Lock('geant4')
-
-overlayFlags.isDataOverlay.set_Value_and_Lock(False)
-# TODO: temporarily force MT
-overlayFlags.isOverlayMT.set_Value_and_Lock(True)
-
-# Common athena flags
-if hasattr(runArgs, "skipEvents"):
-    athenaCommonFlags.SkipEvents.set_Value_and_Lock(runArgs.skipEvents)
-if hasattr(runArgs, "maxEvents"):
-    athenaCommonFlags.EvtMax.set_Value_and_Lock(runArgs.maxEvents)
-
-if hasattr(runArgs, "inputHITSFile"):
-    athenaCommonFlags.PoolHitsInput.set_Value_and_Lock(runArgs.inputHITSFile)
-else:
-    raise RuntimeError("No input HITS file defined")
-
-if hasattr(runArgs, "inputRDO_BKGFile"):
-    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock(runArgs.inputRDO_BKGFile)
-else:
-    raise RuntimeError("No input RDO file defined")
-
-if hasattr(runArgs, "outputRDOFile"):
-    athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock(runArgs.outputRDOFile)
-else:
-    raise RuntimeError("No output RDO file defined")
-
-if hasattr(runArgs, "outputRDO_SGNLFile"):
-    overlayFlags.signalOnlyOutput.set_Value_and_Lock(True)
-    overlayFlags.PoolSignalRDOOutput.set_Value_and_Lock(runArgs.outputRDO_SGNLFile)
-else:
-    overlayFlags.signalOnlyOutput.set_Value_and_Lock(False)
-
-if hasattr(runArgs, "geometryVersion"):
-    globalflags.DetDescrVersion.set_Value_and_Lock(runArgs.geometryVersion)
-if hasattr(runArgs, "conditionsTag"):
-    globalflags.ConditionsTag.set_Value_and_Lock(runArgs.conditionsTag)
-
-# Digitization flags
-if hasattr(runArgs, "digiSeedOffset1"):
-    digitizationFlags.rndmSeedOffset1 = int(runArgs.digiSeedOffset1)
-if hasattr(runArgs, "digiSeedOffset2"):
-    digitizationFlags.rndmSeedOffset2 = int(runArgs.digiSeedOffset2)
-if hasattr(runArgs, "samplingFractionDbTag"):
-    digitizationFlags.physicsList = runArgs.samplingFractionDbTag
-if hasattr(runArgs, "digiRndmSvc"):
-    digitizationFlags.rndmSvc = runArgs.digiRndmSvc
-if hasattr(runArgs, "AddCaloDigi"):
-    digitizationFlags.experimentalDigi += ["AddCaloDigi"]
-
-# TODO: investigate why this is even needed
-from RecExConfig.RecFlags import rec
-rec.projectName = 'IS_SIMULATION'
-
-
-#----------------------------
-# Setup detector flags
-#----------------------------
-OverlayLog.info("================ DetFlags ================ ")
-if 'DetFlags' in dir():
-    OverlayLog.warning("DetFlags already defined! This means DetFlags should have been fully configured already..")
-else:
-    from AthenaCommon.DetFlags import DetFlags
-    DetFlags.all_setOn()
-    DetFlags.bpipe_setOff()
-    DetFlags.FTK_setOff()
-
-    if hasattr(runArgs, "triggerConfig") and runArgs.triggerConfig == "NONE":
-        DetFlags.LVL1_setOff()
-    else:
-        DetFlags.LVL1_setOn()
-
-    DetFlags.digitize.LVL1_setOff()
-
-from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
-if not MuonGeometryFlags.hasCSC(): DetFlags.CSC_setOff()
-if not MuonGeometryFlags.hasSTGC(): DetFlags.sTGC_setOff()
-if not MuonGeometryFlags.hasMM(): DetFlags.Micromegas_setOff()
-
-# TODO: need to do it better
-# DetFlags.makeRIO.all_setOff() # needed for MT TRT conditions
-DetFlags.pileup.all_setOff()
-DetFlags.readRDOBS.all_setOff()
-DetFlags.readRDOPool.all_setOff()
-DetFlags.readRIOBS.all_setOff()
-DetFlags.readRIOPool.all_setOff()
-DetFlags.simulate.all_setOff()
-DetFlags.writeBS.all_setOff()
-DetFlags.writeRIOPool.all_setOff()
-
-DetFlags.Print()
-
-
-#-------------------------------------------------------------
-# Read Simulation MetaData (unless override flag set to True)
-# ------------------------------------------------------------
-if 'ALL' in digitizationFlags.overrideMetadata.get_Value():
-    OverlayLog.info("Skipping input file MetaData check.")
-else:
-    from EventOverlayJobTransforms.OverlayReadMetaData import readInputFileMetadata
-    readInputFileMetadata()
-
-DetFlags.Print()
-
-#-------------------------
-# Conditions
-#-------------------------
-from IOVDbSvc.CondDB import conddb
-if hasattr(runArgs, 'conditionsTag') and runArgs.conditionsTag not in ['', 'NONE']:
-    globalflags.ConditionsTag = runArgs.conditionsTag
-    if len(globalflags.ConditionsTag()) != 0:
-        conddb.setGlobalTag(globalflags.ConditionsTag())
-
-
-# LVL1 Trigger Menu
-if hasattr(runArgs, "triggerConfig") and runArgs.triggerConfig!="NONE":
-    # LVL1 Trigger Menu
-    # PJB 9/2/2009 Setup the new triggerConfig flags here
-    from TriggerJobOpts.TriggerFlags import TriggerFlags
-    triggerArg = runArgs.triggerConfig
-    #if not prefixed with LVL1: add it here
-    Args = triggerArg.split(":")
-    if Args[0] != "LVL1":
-        TriggerFlags.triggerConfig ="LVL1:"+triggerArg
-    else:
-        TriggerFlags.triggerConfig =triggerArg
-    overlaylog.info( 'triggerConfig argument is: %s ', TriggerFlags.triggerConfig.get_Value() )
-    from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
-    cfg = TriggerConfigGetter("HIT2RDO")
-
-
-#-------------------------
-# Configuration
-#-------------------------
-OverlayLog.info("================ Configure ================= ")
-
-# Initialise overlay
-include("EventOverlayJobTransforms/ConfiguredOverlayMT_jobOptions.py")
-
-# load the input properly
-include("EventOverlayJobTransforms/OverlayInput_jobOptions.py")
-
-if DetFlags.overlay.Truth_on():
-    include("EventOverlayJobTransforms/TruthOverlay_jobOptions.py")
-
-if DetFlags.overlay.BCM_on() or DetFlags.overlay.Lucid_on():
-    include ( "EventOverlayJobTransforms/BeamOverlay_jobOptions.py" )
-
-if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on():
-    include("EventOverlayJobTransforms/InnerDetectorOverlay_jobOptions.py")
-
-if DetFlags.overlay.LAr_on() or DetFlags.overlay.Tile_on():
-    include ( "EventOverlayJobTransforms/CaloOverlay_jobOptions.py" )
-
-if (MuonGeometryFlags.hasCSC() and DetFlags.overlay.CSC_on()) or DetFlags.overlay.MDT_on() or DetFlags.overlay.RPC_on() or DetFlags.overlay.TGC_on() or (MuonGeometryFlags.hasSTGC() and DetFlags.overlay.sTGC_on()) or (MuonGeometryFlags.hasMM() and DetFlags.overlay.Micromegas_on()):
-    include ( "EventOverlayJobTransforms/MuonOverlay_jobOptions.py" )
-
-if DetFlags.overlay.LVL1_on():
-   include ( "EventOverlayJobTransforms/Level1Overlay_jobOptions.py" )
-
-# save the overlay output
-include("EventOverlayJobTransforms/OverlayOutput_jobOptions.py")
-
-# save the signal-only output
-if overlayFlags.signalOnlyOutput() == True:
-    include("EventOverlayJobTransforms/SignalOutput_jobOptions.py")
-
-
-#-------------------------
-# Random numbers
-#-------------------------
-# TODO: move somewhere more appropriate
-from AthenaCommon.ConfigurableDb import getConfigurable
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr += getConfigurable(digitizationFlags.rndmSvc.get_Value())()
-digitizationFlags.rndmSeedList.addtoService()
-digitizationFlags.rndmSeedList.printSeeds()
-
-
-#-------------------------
-# Logging
-#-------------------------
-ServiceMgr.MessageSvc.OutputLevel = INFO
-ServiceMgr.MessageSvc.Format = "% F%45W%S%5W%e%s%7W%R%T %0W%M"
-
-# Post-include
-if hasattr(runArgs, "postInclude"):
-    for fragment in runArgs.postInclude:
-        include(fragment)
-
-# Post-exec
-if hasattr(runArgs, "postExec") and runArgs.postExec != 'NONE':
-    for cmd in runArgs.postExec:
-        exec(cmd)
-
-# Patch /TagInfo metadata container
-# TODO: move somewhere more appropriate
-ServiceMgr.TagInfoMgr.ExtraTagValuePairs.update(overlayFlags.extraTagInfoPairs.get_Value())
-
-if hasattr(runArgs, 'AMITag'):
-    if runArgs.AMITag != "NONE":
-        ServiceMgr.TagInfoMgr.ExtraTagValuePairs.update({"AMITag" : runArgs.AMITag})
-
-#================================================================
-OverlayLog.info("\nOverlay: OutputStream = \n" + str(outStream))
-OverlayLog.info("\nOverlay: ServiceMgr = \n" + str(ServiceMgr))
diff --git a/Event/EventOverlay/OverlayByteStreamAlgs/CMakeLists.txt b/Event/EventOverlay/OverlayByteStreamAlgs/CMakeLists.txt
index a4998e22dfbc5560c20110ecd403e40a8247c33f..899ed6e11c7a89212223ce2c46a448f432c2ebe3 100644
--- a/Event/EventOverlay/OverlayByteStreamAlgs/CMakeLists.txt
+++ b/Event/EventOverlay/OverlayByteStreamAlgs/CMakeLists.txt
@@ -1,24 +1,14 @@
-################################################################################
-# Package: OverlayByteStreamAlgs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( OverlayByteStreamAlgs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          Event/ByteStreamCnvSvc
-                          Trigger/TrigConfiguration/TrigConfInterfaces
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigT1/TrigT1Result )
+# External dependencies:
+find_package( ROOT COMPONENTS MathCore )
 
 # Component(s) in the package:
 atlas_add_component( OverlayByteStreamAlgs
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES GaudiKernel AthenaBaseComps ByteStreamCnvSvcLib StoreGateLib
-                     TrigSteeringEvent TrigT1Result )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                     LINK_LIBRARIES LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel ByteStreamCnvSvcLib GaudiKernel StoreGateLib TrigConfHLTData TrigConfInterfaces TrigSteeringEvent TrigT1Result )
diff --git a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainerFwd.h b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainerFwd.h
index 3ff64a1908024a62bb51879948eccafbb739334c..bd13ba74f56700b62fdd74547c388a91217f335d 100644
--- a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainerFwd.h
+++ b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainerFwd.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id$
 #ifndef XAODCALOEVENT_CALOCLUSTERCONTAINERFWD_V1_H
 #define XAODCALOEVENT_CALOCLUSTERCONTAINERFWD_V1_H
 
@@ -12,11 +11,11 @@
 #include "xAODCaloEvent/CaloClusterFwd.h"
 #include "xAODBase/IParticleContainer.h"
 
-DATAVECTOR_BASE_FWD( xAOD::CaloCluster_v1, xAOD::IParticle );
+DATAVECTOR_BASE_FWD( xAOD::CaloCluster, xAOD::IParticle );
 
 namespace xAOD {
    /// Define the cluster container as a simple DataVector
-   typedef DataVector< CaloCluster_v1 > CaloClusterContainer_v1;
+   typedef DataVector< CaloCluster > CaloClusterContainer;
 }
 
 
diff --git a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloClusterContainer_v1.h b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloClusterContainer_v1.h
index 6d99188d3288862ffc9320e84d42ad252f145e0c..83492d94419e5364811c0977c1803a43cf7c8c02 100644
--- a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloClusterContainer_v1.h
+++ b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloClusterContainer_v1.h
@@ -1,29 +1,21 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id: CaloClusterContainer_v1.h 783594 2016-11-11 05:03:25Z ssnyder $
 #ifndef XAODCALOEVENT_VERSIONS_CALOCLUSTERCONTAINER_V1_H
 #define XAODCALOEVENT_VERSIONS_CALOCLUSTERCONTAINER_V1_H
 
 // EDM include(s):
 #include "AthContainers/DataVector.h"
 #include "xAODBase/IParticleContainer.h"
-
 // Local include(s):
 #include "xAODCaloEvent/versions/CaloCluster_v1.h"
-#include "xAODCaloEvent/CaloClusterContainerFwd.h"
-
-// Finish declaration of IParticle as a base class of CaloCluster_v1:
-DATAVECTOR_BASE_FIN( xAOD::CaloCluster_v1, xAOD::IParticle );
 
 namespace xAOD {
    /// Define the cluster container as a simple DataVector
    typedef DataVector< CaloCluster_v1 > CaloClusterContainer_v1;
 }
 
-
-
 #endif // XAODCALOEVENT_VERSIONS_CALOCLUSTERCONTAINER_V1_H
diff --git a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h
index 228729201e31fd695318cfa25a2a56423dcb615e..8df01154389bf733fd267b18626aa0745e4535c2 100644
--- a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h
+++ b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h
@@ -32,6 +32,9 @@ extern "C" {
 // ROOT include(s):
 #include "Math/Vector4D.h"
 
+//Already include the DataVector specialization for this type
+#include "xAODCaloEvent/CaloClusterContainerFwd.h"
+
 // Declare a dummy CaloClusterCellLink definition for standalone compilation:
 #if defined(GENERATIONBASE) || defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
 class CaloClusterCellLink {};
@@ -795,4 +798,8 @@ namespace xAOD {
 
 } // namespace xAOD
 
+// Finish declaration of IParticle as a base class of CaloCluster_v1:
+DATAVECTOR_BASE_FIN( xAOD::CaloCluster_v1, xAOD::IParticle );
+
+
 #endif // XAODCALOEVENT_VERSIONS_CALOCLUSTER_V1_H
diff --git a/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx b/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx
index b90f821fa84b6f7c245665bf4d0d02e115863144..12082d97ac42f6c6c50029a06c307755c6d8863f 100644
--- a/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx
+++ b/Event/xAOD/xAODCoreAthenaPool/src/xAODShallowAuxContainerCnv.cxx
@@ -30,7 +30,8 @@ xAODShallowAuxContainerCnv::createPersistentWithKey( xAOD::ShallowAuxContainer*
          {
            key2.erase (key2.size()-4, 4);
          }
-         const SG::ThinningDecisionBase* dec = SG::getThinningDecision (key2);
+         const SG::ThinningInfo* info = SG::getThinningInfo (key2);
+         const SG::ThinningDecisionBase* dec = info ? info->m_decision : nullptr;
          if (dec) {
            nremaining = dec->thinnedSize();
          }
@@ -53,6 +54,7 @@ xAODShallowAuxContainerCnv::createPersistentWithKey( xAOD::ShallowAuxContainer*
             // Skip null auxids (happens if we don't have the dictionary)
             if(auxid == SG::null_auxid) continue;
             // Skip non-selected dynamic variables.
+            if (info && info->vetoed (auxid)) continue;
             if (sel_auxids.count(auxid) == 0) continue;
             // Create the target variable:
             void* dst = newcont->getStore()->getData (auxid, nremaining, nremaining); //use store's getData directly, not the container's getData ... saves on a copy!
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainerFwd.h b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainerFwd.h
index a2fa3dc3bfe3d37a1833b07a71aafebac35a1949..78a05f6ea76d7c7cda7f6a2085b6b3118e71a308 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainerFwd.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/EgammaContainerFwd.h
@@ -15,7 +15,7 @@
 DATAVECTOR_BASE_FWD( xAOD::Egamma, xAOD::IParticle);
 namespace xAOD {
    /// Definition of the current "egamma container version"
-  typedef DataVector<Egamma > EgammaContainer;
+  typedef DataVector<Egamma> EgammaContainer;
 }
 
 #endif // XAODEGAMMA_EGAMMACONTAINERFWD_H
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainerFwd.h b/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainerFwd.h
index f2ea470e7788adb3e36a307efeee330a5cddca43..b04a179edfa82ccc06e4d7e1a09eb3270d996f23 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainerFwd.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainerFwd.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id: ElectronContainerFwd.h 644948 2015-02-07 01:33:06Z christos $
 #ifndef XAODEGAMMA_ELECTRONCONTAINERFWD_H
 #define XAODEGAMMA_ELECTRONCONTAINERFWD_H
 
@@ -15,7 +14,7 @@
 DATAVECTOR_BASE_FWD( xAOD::Electron, xAOD::Egamma );
 namespace xAOD {
    /// The container is a simple typedef for now
-   typedef DataVector< xAOD::Electron > ElectronContainer;
+   typedef DataVector< xAOD::Electron> ElectronContainer;
 }
 
 
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainerFwd.h b/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainerFwd.h
index 17dfa03ced7a5876551c303c90bc04fbe16f6dad..ff0d5cfec83fd11be67a9bf6dff1f65d8ea02083 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainerFwd.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/PhotonContainerFwd.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id: PhotonContainerFwd.h 644948 2015-02-07 01:33:06Z christos $
 #ifndef XAODEGAMMA_PHOTONCONTAINERFWD_H
 #define XAODEGAMMA_PHOTONCONTAINERFWD_H
 
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/EgammaContainer_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/EgammaContainer_v1.h
index a979e2ca3a65c76aa60e629c7ebe4fe084b9550e..c32376588189f66513e15f6c7bad96def292ff2a 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/EgammaContainer_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/EgammaContainer_v1.h
@@ -11,13 +11,9 @@
 // Core include(s):
 #include "AthContainers/DataVector.h"
 #include "xAODBase/IParticleContainer.h"
-
 // Local include(s):
 #include "xAODEgamma/versions/Egamma_v1.h"
-#include "xAODEgamma/EgammaContainerFwd.h"
 
-//Need that to compler the DATAVECTOR_BASE_FWD
-template struct DataVector_detail::DVLEltBaseInit< xAOD::Egamma_v1>;
 namespace xAOD {
    /// The container is a simple typedef for now
    typedef DataVector< xAOD::Egamma_v1 > EgammaContainer_v1;
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h
index 8ae0072015844e97dddba79c74ad5f2e94d174f9..f0d1f4724d0a052316c68c90ec8a0248d33f3827 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Egamma_v1.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: Egamma_v1.h 788131 2016-12-05 16:24:11Z christos $
 #ifndef XAODEGAMMA_VERSIONS_EGAMMA_V1_H
 #define XAODEGAMMA_VERSIONS_EGAMMA_V1_H
 
@@ -36,6 +35,10 @@
 // ROOT include(s):
 #include "Math/Vector4D.h"
 
+//Already include the DataVector specialization for this type
+#include "xAODEgamma/EgammaContainerFwd.h"
+
+
 namespace xAOD {
 
   /// @class xAOD::Egamma
@@ -415,5 +418,7 @@ namespace xAOD {
 
 } // namespace xAOD
 
+//Finish declaration of IParticle as a base class of Egamma
+DATAVECTOR_BASE_FIN(xAOD::Egamma_v1, xAOD::IParticle);
 
 #endif // XAODEGAMMA_VERSIONS_EGAMMA_V1_H
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/ElectronContainer_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/ElectronContainer_v1.h
index 1790d455fa4477e6652f074e7ed3a409bcaef85f..d90313240238874f10bdbed8bfbb2dd6a1b8dff9 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/ElectronContainer_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/ElectronContainer_v1.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id: ElectronContainer_v1.h 644948 2015-02-07 01:33:06Z christos $
 #ifndef XAODEGAMMA_VERSIONS_ELECTRONCONTAINER_V1_H
 #define XAODEGAMMA_VERSIONS_ELECTRONCONTAINER_V1_H
 
@@ -14,10 +13,7 @@
 // Local include(s):
 #include "xAODEgamma/versions/Electron_v1.h"
 #include "xAODEgamma/versions/EgammaContainer_v1.h"
-#include "xAODEgamma/ElectronContainerFwd.h"
 
-//Need that to compler the DATAVECTOR_BASE_FWD
-template struct DataVector_detail::DVLEltBaseInit< xAOD::Electron_v1>;
 
 namespace xAOD {
    /// The container is a simple typedef for now
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Electron_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Electron_v1.h
index f3a6987423f29c0d16ebe168cb8805785ecfb7a8..5a8c4afd76b796dd7c49b2d9bf1e161c89fb24bf 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Electron_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Electron_v1.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: Electron_v1.h 636327 2014-12-16 16:34:24Z christos $
 #ifndef XAODEGAMMA_VERSIONS_ELECTRON_V1_H
 #define XAODEGAMMA_VERSIONS_ELECTRON_V1_H
 	
@@ -20,6 +19,9 @@
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
 
+//Already include the DataVector specialization for this type
+#include "xAODEgamma/ElectronContainerFwd.h"
+
 namespace xAOD {
 
   /// @class xAOD::Electron
@@ -131,7 +133,8 @@ namespace xAOD {
   }; // Electron Class
 
 }//  xAOD namespace
-
+//Finish declaration of Egamma as a base class of Electron
+DATAVECTOR_BASE_FIN(xAOD::Electron_v1, xAOD::Egamma);
 
 #endif // XAODEGAMMA_VERSIONS_ELECTRON_V1_H
 
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/PhotonContainer_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/PhotonContainer_v1.h
index bd0ce52c3a974ccdbc5d87c30027465eda9ec7e9..eed00ac5db553cd14803eed73e8d300abebd8b92 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/PhotonContainer_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/PhotonContainer_v1.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id: PhotonContainer_v1.h 644948 2015-02-07 01:33:06Z christos $
 #ifndef XAODEGAMMA_VERSIONS_PHOTONCONTAINER_V1_H
 #define XAODEGAMMA_VERSIONS_PHOTONCONTAINER_V1_H
 
@@ -14,10 +13,6 @@
 // Local include(s):
 #include "xAODEgamma/versions/Photon_v1.h"
 #include "xAODEgamma/versions/EgammaContainer_v1.h"
-#include "xAODEgamma/PhotonContainerFwd.h"
-
-//Need that to compler the DATAVECTOR_BASE_FWD
-template struct DataVector_detail::DVLEltBaseInit< xAOD::Photon_v1>;
 
 namespace xAOD {
    /// The container is a simple typedef for now
diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h
index d9338c8be41df155ca12fe05e9c8b1c0c45b4ee5..54095fa979653d3bcc5aab60337482298def5259 100644
--- a/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h
+++ b/Event/xAOD/xAODEgamma/xAODEgamma/versions/Photon_v1.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: Photon_v1.h 667341 2015-05-15 14:39:34Z christos $
 #ifndef XAODEGAMMA_VERSIONS_PHOTON_V1_H
 #define XAODEGAMMA_VERSIONS_PHOTON_V1_H
 
@@ -20,6 +19,10 @@
 #include "xAODEgamma/versions/Egamma_v1.h"
 #include "xAODEgamma/PhotonxAODHelpers.h"
 
+//Already include the DataVector specialization for this type
+#include "xAODEgamma/PhotonContainerFwd.h"
+
+
 namespace xAOD {
 
   /// @class xAOD::Photon
@@ -119,5 +122,6 @@ namespace xAOD {
 
 }//  xAOD namespace
 
-
+//Finish declaration of Egamma as base class of Photon_v1
+DATAVECTOR_BASE_FIN(xAOD::Photon_v1, xAOD::Egamma);
 #endif // XAODEGAMMA_VERSIONS_PHOTON_V1_H
diff --git a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h
index d20cba2aa19b56fabc6e8b6c61dc2cf14d208f67..8e804b5541673f58016f83b9fe820a091332b3c6 100644
--- a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h
+++ b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataMarkUpTool.h
@@ -74,10 +74,10 @@ namespace xAODMaker {
       /// @{
 
       /// Function collecting the metadata from a new input file
-      virtual StatusCode beginInputFile();
+      virtual StatusCode beginInputFile() override;
 
       /// Function writing the collected metadata to the output
-      virtual StatusCode metaDataStop();
+      virtual StatusCode metaDataStop() override;
 
       /// @}
 
diff --git a/Event/xAOD/xAODTracking/xAODTracking/NeutralParticleContainerFwd.h b/Event/xAOD/xAODTracking/xAODTracking/NeutralParticleContainerFwd.h
index 0c8bef3b2f3cd99ae6f123f8e943c405ff20e8f0..f74a98a5ac46390c78ecd4ce06bf812df3cce41c 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/NeutralParticleContainerFwd.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/NeutralParticleContainerFwd.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id$
 #ifndef XAODTRACKING_NEUTRALPARTICLECONTAINERFWD_H
 #define XAODTRACKING_NEUTRALPARTICLECONTAINERFWD_H
 
@@ -21,7 +20,7 @@
 DATAVECTOR_BASE_FWD( xAOD::NeutralParticle, xAOD::IParticle );
 namespace xAOD {
    /// Provide a forward declaration for NeutralParticleContainer
-   typedef DataVector< NeutralParticle > NeutralParticleContainer;
+   typedef DataVector< NeutralParticle> NeutralParticleContainer;
 }
 
 #endif // XAODTRACKING_NEUTRALPARTICLECONTAINERFWD_H
diff --git a/Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainerFwd.h b/Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainerFwd.h
index d50a2f106738acc962ddc8878fb2af34994460eb..cc05041629c587c8d837a667e6fd427847f23bf3 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainerFwd.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/TrackParticleContainerFwd.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- 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
 */
 
-// $Id$
 #ifndef XAODTRACKING_TRACKPARTICLECONTAINERFWD_H
 #define XAODTRACKING_TRACKPARTICLECONTAINERFWD_H
 
@@ -23,7 +22,7 @@
 DATAVECTOR_BASE_FWD( xAOD::TrackParticle, xAOD::IParticle );
 namespace xAOD {
    /// Provide a forward declaration for TrackParticleContainer
-   typedef DataVector< TrackParticle > TrackParticleContainer;
+   typedef DataVector< TrackParticle> TrackParticleContainer;
 }
 
 #endif // XAODTRACKING_TRACKPARTICLECONTAINERFWD_H
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleContainer_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleContainer_v1.h
index 5cdea055abff6a4e8a676aaf8fc77042614bd302..bcb67aca4bda5c58de0c7815bb37f6c673bbdd03 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleContainer_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticleContainer_v1.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 XAODTRACKING_VERSIONS_NEUTRALPARTICLECONTAINER_V1_H
@@ -12,10 +12,6 @@
  
 // Local include(s):
 #include "xAODTracking/versions/NeutralParticle_v1.h"
-#include "xAODTracking/NeutralParticleContainerFwd.h"
-
-// To complete the DATAVECTOR_BASE macro:
-template struct DataVector_detail::DVLEltBaseInit< xAOD::NeutralParticle_v1 >;
 
 namespace xAOD {
    /// The container is a simple typedef for now
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h
index 7f7002a8573c0c78893244a4f56c2991eb8bade5..e35519f6576b881f78ed32615e036b6800a3a29c 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/NeutralParticle_v1.h
@@ -28,6 +28,8 @@
 // ROOT include(s):
 #include "Math/Vector4D.h"
 
+//Already include the DataVector specialization for this type
+#include "xAODTracking/NeutralParticleContainerFwd.h"
 
 namespace xAOD {
   /// Class describing a NeutralParticle.
@@ -146,5 +148,8 @@ namespace xAOD {
 
 } // namespace xAOD
 
+// Finish declaration of IParticle as a base class of NeutralParticle_v1
+DATAVECTOR_BASE_FIN( xAOD::NeutralParticle_v1, xAOD::IParticle );
+
 
 #endif // XAODTRACKING_VERSIONS_NEUTRALPARTICLE_V1_H
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticleContainer_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticleContainer_v1.h
index d03a53c4c07e290a00fcc3712d37bb8c1802bd0c..b4b8543b370fd51c374417f769ccfb646777c3b8 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticleContainer_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticleContainer_v1.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 XAODTRACKING_VERSIONS_TRACKPARTICLECONTAINER_V1_H
@@ -12,10 +12,6 @@
  
 // Local include(s):
 #include "xAODTracking/versions/TrackParticle_v1.h"
-#include "xAODTracking/TrackParticleContainerFwd.h"
-
-// To complete the DATAVECTOR_BASE macro:
-template struct DataVector_detail::DVLEltBaseInit< xAOD::TrackParticle_v1 >;
 
 namespace xAOD {
    /// The container is a simple typedef for now
diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h
index 1332801c9be87dd3d32e47fbf544a3bc3bfa190d..b2b0a0c24c0b9afc481437347226aa5aa1b5ebe6 100644
--- a/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h
+++ b/Event/xAOD/xAODTracking/xAODTracking/versions/TrackParticle_v1.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAODTRACKING_VERSIONS_TRACKPARTICLE_V1_H
@@ -31,6 +31,8 @@ extern "C" {
 // ROOT include(s):
 #include "Math/Vector4D.h"
 
+//Already include the DataVector specialization for this type
+#include "xAODTracking/TrackParticleContainerFwd.h"
 namespace xAOD {
 
   /// Class describing a TrackParticle.
@@ -348,5 +350,7 @@ private:
 
   } // namespace xAOD
 
+// Finish declaration of IParticle as a base class of TrackParticle_v1
+DATAVECTOR_BASE_FIN( xAOD::TrackParticle_v1, xAOD::IParticle );
 
 #endif // XAODTRACKING_VERSIONS_TrackParticle_v1_H
diff --git a/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v2.cxx b/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v2.cxx
index 008b2740df27248c88573ec51438277d7f0b862a..8ddf3ac9e232e226bfd78e3880022b88e3501d50 100644
--- a/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v2.cxx
+++ b/Event/xAOD/xAODTrigMuon/Root/L2StandAloneMuonAuxContainer_v2.cxx
@@ -197,6 +197,31 @@ namespace xAOD {
       AUX_VARIABLE( cscHitTime );
       AUX_VARIABLE( cscHitResidual );
 
+      AUX_VARIABLE( stgcClusterLayer );
+      AUX_VARIABLE( stgcClusterIsOutlier );
+      AUX_VARIABLE( stgcClusterType );
+      AUX_VARIABLE( stgcClusterEta );
+      AUX_VARIABLE( stgcClusterPhi );
+      AUX_VARIABLE( stgcClusterR );
+      AUX_VARIABLE( stgcClusterZ );
+      AUX_VARIABLE( stgcClusterResidualR );
+      AUX_VARIABLE( stgcClusterResidualPhi );
+      AUX_VARIABLE( stgcClusterStationEta );
+      AUX_VARIABLE( stgcClusterStationPhi );
+      AUX_VARIABLE( stgcClusterStationName );
+
+      AUX_VARIABLE( mmClusterLayer );
+      AUX_VARIABLE( mmClusterIsOutlier );
+      AUX_VARIABLE( mmClusterEta );
+      AUX_VARIABLE( mmClusterPhi );
+      AUX_VARIABLE( mmClusterR );
+      AUX_VARIABLE( mmClusterZ );
+      AUX_VARIABLE( mmClusterResidualR );
+      AUX_VARIABLE( mmClusterResidualPhi );
+      AUX_VARIABLE( mmClusterStationEta );
+      AUX_VARIABLE( mmClusterStationPhi );
+      AUX_VARIABLE( mmClusterStationName );
+
    }
 
 } // namespace xAOD
diff --git a/Event/xAOD/xAODTrigMuon/xAODTrigMuon/versions/L2StandAloneMuonAuxContainer_v2.h b/Event/xAOD/xAODTrigMuon/xAODTrigMuon/versions/L2StandAloneMuonAuxContainer_v2.h
index b5e203a635454291b7ec6455e70c3b605a32f190..8607761dfcef7bc80e3306b6e333f5ee22656718 100644
--- a/Event/xAOD/xAODTrigMuon/xAODTrigMuon/versions/L2StandAloneMuonAuxContainer_v2.h
+++ b/Event/xAOD/xAODTrigMuon/xAODTrigMuon/versions/L2StandAloneMuonAuxContainer_v2.h
@@ -241,6 +241,33 @@ namespace xAOD {
       std::vector< std::vector< float > >    cscHitTime;
       std::vector< std::vector< float > >    cscHitResidual;
 
+      // sTGC clusters
+      std::vector< std::vector< unsigned int > > stgcClusterLayer;
+      std::vector< std::vector< int > >          stgcClusterIsOutlier;
+      std::vector< std::vector< int > >          stgcClusterType;
+      std::vector< std::vector< float > >        stgcClusterEta;
+      std::vector< std::vector< float > >        stgcClusterPhi;
+      std::vector< std::vector< float > >        stgcClusterR;
+      std::vector< std::vector< float > >        stgcClusterZ;
+      std::vector< std::vector< float > >        stgcClusterResidualR;
+      std::vector< std::vector< float > >        stgcClusterResidualPhi;
+      std::vector< std::vector< int > >          stgcClusterStationEta;
+      std::vector< std::vector< int > >          stgcClusterStationPhi;
+      std::vector< std::vector< int > >          stgcClusterStationName;
+
+      // MM clusters
+      std::vector< std::vector< unsigned int > > mmClusterLayer;
+      std::vector< std::vector< int > >          mmClusterIsOutlier;
+      std::vector< std::vector< float > >        mmClusterEta;
+      std::vector< std::vector< float > >        mmClusterPhi;
+      std::vector< std::vector< float > >        mmClusterR;
+      std::vector< std::vector< float > >        mmClusterZ;
+      std::vector< std::vector< float > >        mmClusterResidualR;
+      std::vector< std::vector< float > >        mmClusterResidualPhi;
+      std::vector< std::vector< int > >          mmClusterStationEta;
+      std::vector< std::vector< int > >          mmClusterStationPhi;
+      std::vector< std::vector< int > >          mmClusterStationName;
+
       /// @}
 
    }; // class L2StandAloneMuonAuxContainer_v2
diff --git a/ForwardDetectors/AFP/AFP_Monitoring/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Monitoring/CMakeLists.txt
index 4547f9c73a4e495c805e71e28a6d25fecc5114d6..997328fabc6bca9cc5f4dd4cbf1c6afce9ebb1e1 100644
--- a/ForwardDetectors/AFP/AFP_Monitoring/CMakeLists.txt
+++ b/ForwardDetectors/AFP/AFP_Monitoring/CMakeLists.txt
@@ -1,33 +1,16 @@
-# $Id: CMakeLists.txt 766963 2016-08-08 20:07:09Z ggach $
-################################################################################
-# Package: AFP_Monitoring
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AFP_Monitoring )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-   Control/AthenaMonitoring
-   Event/xAOD/xAODForward
-   ForwardDetectors/AFP/AFP_RawEv
-   PRIVATE
-   Tools/LWHists
-   Event/xAOD/xAODEventInfo
-   )
-
 # External dependencies:
-
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-
+find_package( ROOT COMPONENTS Hist )
 
 # Component(s) in the package:
 atlas_add_component( AFP_Monitoring
    src/*.cxx
    src/components/*.cxx
-   PUBLIC_HEADERS AFP_Monitoring
-   INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-   LINK_LIBRARIES AthenaMonitoringLib LWHists xAODForward xAODEventInfo AFP_RawEv)
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AFP_RawEv AthenaBaseComps AthenaMonitoringLib GaudiKernel LWHists LumiBlockCompsLib xAODEventInfo xAODForward )
 
-atlas_install_headers( AFP_Monitoring )
+# Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
index 1fa860d0bc2158e1346b2a8f6d585e4cfde034a5..a519f97ac988fe54759430396c3fe8c4f07ddacf 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h
@@ -16,9 +16,6 @@ typedef HepMC3::ConstGenParticlePtr ConstGenParticlePtr;
 inline GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom = HepMC3::FourVector::ZERO_VECTOR(), int pid = 0, int status = 0) {
   return std::make_shared<HepMC3::GenParticle>(mom,pid,status);
 }
-inline GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom, int pid , int status , HepMC::Flow fl, HepMC::Polarization pol) {
-  return std::make_shared<HepMC3::GenParticle>(mom,pid,status);
-}
 inline int barcode(GenParticlePtr p){ 
 	std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode");
 		 return barcode?(barcode->value()):0;
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
index e1a6cc5524eb0b69b1b178bdc1fbd154e66f443a..15f53b7f031cccdab93ffca384868d4a4f17e089 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
@@ -34,14 +34,6 @@ inline int barcode(HepMC3::GenVertex p){
 		 return barcode?(barcode->value()):0;
 }
 
-inline std::vector<HepMC3::GenVertexPtr> DESCENDANTS(HepMC3::GenVertexPtr endvtx)
-{
-return std::vector<HepMC3::GenVertexPtr>();	
-}
-inline std::vector<HepMC3::ConstGenVertexPtr> DESCENDANTS(HepMC3::ConstGenVertexPtr endvtx)
-{
-return std::vector<HepMC3::ConstGenVertexPtr>();	
-}
 inline void* raw_pointer(GenVertexPtr p){ return p.get();}
 inline const void* raw_pointer(ConstGenVertexPtr p){ return p.get();}
 }
diff --git a/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx b/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
index 33d3db71016e55c5f2f3f1fde6593bdfcd834793..2fd85be565967b3964c94243f4b28a0671658717 100644
--- a/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
+++ b/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
@@ -97,8 +97,8 @@ StatusCode BeamHaloGeneratorAlg::genInitialize() {
     const Int_t nbins_E = 60;
     double xmin = 1e-2;
     double xmax = 3.5e3;
-    double logxmin = log10(xmin);
-    double logxmax = log10(xmax);
+    double logxmin = std::log10(xmin);
+    double logxmax = std::log10(xmax);
     double binwidth = (logxmax-logxmin)/nbins_E;
     Double_t xbins[nbins_E+1];
     xbins[0] = xmin;
diff --git a/Generators/CosmicGenerator/share/jobOptions_CosmicGenerator.txt b/Generators/CosmicGenerator/share/jobOptions_CosmicGenerator.txt
index abceedc42f18325760e0c79e0c13970e5119feaf..287f66c1d16b25759977db9b08c4e767c12a4879 100644
--- a/Generators/CosmicGenerator/share/jobOptions_CosmicGenerator.txt
+++ b/Generators/CosmicGenerator/share/jobOptions_CosmicGenerator.txt
@@ -12,7 +12,7 @@
 //--------------------------------------------------------------
 //load relevant libraries
 
-ApplicationMgr.DLLs  += { "CosmicGenerator","TruthExamples" };      
+ApplicationMgr.Dlls  += { "CosmicGenerator","TruthExamples" };      
 ApplicationMgr.TopAlg = { "CosmicGenerator","DumpMC" };
 
 // The following is needed to load the Athena Random
diff --git a/Generators/CosmicGenerator/share/jobOptions_PixelEndCapCosmicGenerator.txt b/Generators/CosmicGenerator/share/jobOptions_PixelEndCapCosmicGenerator.txt
index 083a609511e029b303fccab49c02df0977103029..b42a8b58f68a7fa148d086112de04ba3fc9793fd 100644
--- a/Generators/CosmicGenerator/share/jobOptions_PixelEndCapCosmicGenerator.txt
+++ b/Generators/CosmicGenerator/share/jobOptions_PixelEndCapCosmicGenerator.txt
@@ -12,7 +12,7 @@
 //--------------------------------------------------------------
 //load relevant libraries
 
-ApplicationMgr.DLLs  += { "CosmicGenerator","TruthExamples" };      
+ApplicationMgr.Dlls  += { "CosmicGenerator","TruthExamples" };      
 ApplicationMgr.TopAlg = { "CosmicGenerator","DumpMC" };
 
 // The following is needed to load the Athena Random
diff --git a/Generators/CosmicGenerator/src/CosmicGenerator.cxx b/Generators/CosmicGenerator/src/CosmicGenerator.cxx
index b4ba40d23038e143992c38b22481477d4608dbdc..11a0c08867e0d757bd45f033414f44fa726305a8 100644
--- a/Generators/CosmicGenerator/src/CosmicGenerator.cxx
+++ b/Generators/CosmicGenerator/src/CosmicGenerator.cxx
@@ -351,11 +351,11 @@ StatusCode CosmicGenerator::callGenerator() {
 
           if (vert_radius>m_radius) {
             phi1=atan2(vert.z(),vert.x())+M_PI;
-            float delta_phi=asin(m_radius/vert_radius);
+            float delta_phi=std::asin(m_radius/vert_radius);
             phi1=phi1+CLHEP::RandFlat::shoot(engine, -delta_phi, delta_phi);
           }
-          pp.setX(mag1*sin(theta1)*cos(phi1));
-          pp.setY(mag1*sin(theta1)*sin(phi1));
+          pp.setX(mag1*sin(theta1)*std::cos(phi1));
+          pp.setY(mag1*sin(theta1)*std::sin(phi1));
 
         } else {
           vert = generateVertex();
@@ -368,9 +368,9 @@ StatusCode CosmicGenerator::callGenerator() {
           mag1=pp.rho();
         }
 
-        CLHEP::Hep3Vector pp_corr(mag1*sin(theta1)*cos(phi1),
-                           -mag1*cos(theta1),
-                           mag1*sin(theta1)*sin(phi1));
+        CLHEP::Hep3Vector pp_corr(mag1*sin(theta1)*std::cos(phi1),
+                           -mag1*std::cos(theta1),
+                           mag1*std::sin(theta1)*std::sin(phi1));
         CLHEP::Hep3Vector direction(pp_corr.x(),pp_corr.y(), pp_corr.z());
 
         // if optimization activated, check for the direction of the generated muon
@@ -378,7 +378,7 @@ StatusCode CosmicGenerator::callGenerator() {
 
           CLHEP::Hep3Vector center_dir=m_center-vert3;
           double beta=direction.angle(center_dir);
-          double alpha=asin(m_radius/center_dir.r());
+          double alpha=std::asin(m_radius/center_dir.r());
 
           if(std::abs(beta)<alpha) {
 
@@ -728,13 +728,13 @@ bool CosmicGenerator::exzCut(const CLHEP::Hep3Vector& pos,const CLHEP::HepLorent
         double r =0;
         bool cut = false;
         if(pos.z()<0){
-          r = sqrt((pow(pos.x(),2)+pow(pos.z()+28000,2))) ; //FIXME Hardcoded values!
+          r = std::sqrt((std::pow(pos.x(),2)+std::pow(pos.z()+28000,2))) ; //FIXME Hardcoded values!
           double e = 0.45238*r+5000 ;  //FIXME Hardcoded values!
           cut = p.e()*m_GeV>e;
         }
         else
         {
-          r = sqrt((pow(pos.x(),2)+pow(pos.z()-20000,2))) ; //FIXME Hardcoded values!
+          r = std::sqrt((std::pow(pos.x(),2)+std::pow(pos.z()-20000,2))) ; //FIXME Hardcoded values!
           if(r<15000) { //FIXME Hardcoded values!
             cut = true;
           } else
@@ -767,10 +767,10 @@ double CosmicGenerator::pathLengthInRock(double xgen, double ygen, double zgen,
 
   // direction of trajectory
   // x=x0 - t sinth cosphi; y=y0 + t costh; z=z0 - t sinth sinphi
-  double cosphi = cos(phi);
-  double sinphi = sin(phi);
-  double costh = cos(theta);
-  double sinth = sin(theta);
+  double cosphi = std::cos(phi);
+  double sinphi = std::sin(phi);
+  double costh = std::cos(theta);
+  double sinth = std::sin(theta);
 
   double y0 = m_ysurface;
   double t = (ygen-y0)/costh;
@@ -787,8 +787,8 @@ double CosmicGenerator::pathLengthInRock(double xgen, double ygen, double zgen,
   if (min_dist14<p14_radius) {
 
     // z values at intersections
-    double z_plus14  = -cosphi*z_mid14+sinphi*sqrt(pow(p14_radius,2.)-pow(z_mid14,2.)) + p14_z;
-    double z_minus14 = -cosphi*z_mid14-sinphi*sqrt(pow(p14_radius,2.)-pow(z_mid14,2.)) + p14_z;
+    double z_plus14  = -cosphi*z_mid14+sinphi*std::sqrt(std::pow(p14_radius,2.)-std::pow(z_mid14,2.)) + p14_z;
+    double z_minus14 = -cosphi*z_mid14-sinphi*std::sqrt(std::pow(p14_radius,2.)-std::pow(z_mid14,2.)) + p14_z;
 
     // y values at intersections
     double y_plus14  = y0-costh*(z_plus14-z0)/sinth/sinphi;
@@ -811,8 +811,8 @@ double CosmicGenerator::pathLengthInRock(double xgen, double ygen, double zgen,
   if (min_dist16<p16_radius) {
 
     // z values at intersections
-    double z_plus16  = -cosphi*z_mid16+sinphi*sqrt(pow(p16_radius,2.)-pow(z_mid16,2.)) + p16_z;
-    double z_minus16 = -cosphi*z_mid16-sinphi*sqrt(pow(p16_radius,2.)-pow(z_mid16,2.)) + p16_z;
+    double z_plus16  = -cosphi*z_mid16+sinphi*std::sqrt(std::pow(p16_radius,2.)-std::pow(z_mid16,2.)) + p16_z;
+    double z_minus16 = -cosphi*z_mid16-sinphi*std::sqrt(std::pow(p16_radius,2.)-std::pow(z_mid16,2.)) + p16_z;
 
     // determine y values at intersections
     double y_plus16  = y0-costh*(z_plus16-z0)/sinth/sinphi;
@@ -840,10 +840,10 @@ bool CosmicGenerator::pointsAtPixels(double xgen, double ygen, double zgen, doub
 
   // direction of trajectory
   // x=xgen+ t sinth cosphi; y=ygen+t costh; z=zgen+t sinth sinphi
-  double cosphi = cos(phi);
-  double sinphi = sin(phi);
-  double costh = cos(theta);
-  double sinth = sin(theta);
+  double cosphi = std::cos(phi);
+  double sinphi = std::sin(phi);
+  double costh = std::cos(theta);
+  double sinth = std::sin(theta);
   double t = ygen/costh;  //for parameterized trajectory
   double x_pos = xgen + t*sinth*cosphi; //x position at y=0
   double z_pos = zgen + t*sinth*sinphi; //z position at y=0
diff --git a/Generators/CosmicGenerator/src/CosmicGun.cxx b/Generators/CosmicGenerator/src/CosmicGun.cxx
index 4af7a5dd34990c61bf0ee8fb8bc654b9addc6fcc..31b0981999befe8fc441e11a9a292869b03ae8a5 100644
--- a/Generators/CosmicGenerator/src/CosmicGun.cxx
+++ b/Generators/CosmicGenerator/src/CosmicGun.cxx
@@ -70,8 +70,8 @@ CosmicGun::CosmicGun(void){
   m_printmod = 50;
 
   coscut_.ctcut = m_coscut;
-  genpar_.LEMIN = log10(m_emin);
-  genpar_.LEMAX = log10(m_emax);
+  genpar_.LEMIN = std::log10(m_emin);
+  genpar_.LEMAX = std::log10(m_emax);
   genpar_.NBIN  = 100;
   genpar_.LBINWID = (genpar_.LEMAX-genpar_.LEMIN)/genpar_.NBIN;
 
@@ -118,10 +118,10 @@ CLHEP::HepLorentzVector CosmicGun::GenerateEvent(void){
   }
   m_event++;
   
-  float sinth = sqrt( 1-pow(cosevt_.COSTH,2) );
+  float sinth = std::sqrt( 1-std::pow(cosevt_.COSTH,2) );
   float e  = cosevt_.ENER;
-  float px = cosevt_.ENER * sinth * sin( cosevt_.PHI);
-  float py = cosevt_.ENER * sinth * cos( cosevt_.PHI);
+  float px = cosevt_.ENER * sinth * std::sin( cosevt_.PHI);
+  float py = cosevt_.ENER * sinth * std::cos( cosevt_.PHI);
   float pz = cosevt_.ENER * cosevt_.COSTH;
   CLHEP::HepLorentzVector p(px,py,pz,e);
 
@@ -147,8 +147,8 @@ void CosmicGun::SetEnergyRange(float emin, float emax){
   m_emin = emin;
   m_emax = emax;
 
-  genpar_.LEMIN = log10(m_emin);
-  genpar_.LEMAX = log10(m_emax);
+  genpar_.LEMIN = std::log10(m_emin);
+  genpar_.LEMAX = std::log10(m_emax);
   genpar_.NBIN  = 100;
   genpar_.LBINWID = (genpar_.LEMAX-genpar_.LEMIN)/genpar_.NBIN;
 
diff --git a/Generators/EvtGen_i/share/ReadGen.py b/Generators/EvtGen_i/share/ReadGen.py
index b3a9b8633f0b2b61a0355e79afa3eb2d711c7a53..90b1b3b18466dd0b1c255fc2def80178f62ec565 100644
--- a/Generators/EvtGen_i/share/ReadGen.py
+++ b/Generators/EvtGen_i/share/ReadGen.py
@@ -270,7 +270,7 @@ if doBphysNtuple or doCBNT:
     HistogramPersistencySvc.OutputFile = "histo.root"
     theApp.Dlls                       += [ "RootHistCnv" ]
     theApp.HistogramPersistency        = "ROOT"
-    #theApp.DLLs                       += [ "HbookCnv" ]
+    #theApp.Dlls                       += [ "HbookCnv" ]
     #theApp.HistogramPersistency        = "HBOOK"
     #HbookHistSvc                       = Service( "HbookHistSvc")
     #HbookHistSvc.NPAWC                 = 1500000
diff --git a/Generators/FlowAfterburner/FlowAfterburner/AddFlowByShifting.h b/Generators/FlowAfterburner/FlowAfterburner/AddFlowByShifting.h
index e788faa5202805a42d1d4029193160d9f37eabea..e4f86d06456a8957b411b024a2533c96a8631789 100644
--- a/Generators/FlowAfterburner/FlowAfterburner/AddFlowByShifting.h
+++ b/Generators/FlowAfterburner/FlowAfterburner/AddFlowByShifting.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
 */
 
 // File:  Generators/FlowAfterburnber/AddFlowByShifting.h
@@ -27,6 +27,7 @@
 #include <CLHEP/Random/RandomEngine.h>
 #include "AthenaKernel/IAtRndmGenSvc.h"
 #include "GeneratorObjects/McEventCollection.h"
+#include "AtlasHepMC/Relatives.h"
 
 #include <gsl/gsl_errno.h>
 #include <gsl/gsl_math.h>
diff --git a/Generators/FlowAfterburner/src/AddFlowByShifting.cxx b/Generators/FlowAfterburner/src/AddFlowByShifting.cxx
index b13cd775e762efd262bf3e66c9eb22e4320cc243..676674f4a71b749d19eb4dc7f790eb069a6c32af 100644
--- a/Generators/FlowAfterburner/src/AddFlowByShifting.cxx
+++ b/Generators/FlowAfterburner/src/AddFlowByShifting.cxx
@@ -245,11 +245,13 @@ StatusCode AddFlowByShifting::execute() {
 
 #ifdef HEPMC3
     int particles_in_event = (*itr)->particles().size();
+    m_particles_processed = 0;
+    for ( auto parent: mainvtx->particles_out()) {
 #else
     int particles_in_event = (*itr)->particles_size();
-#endif
     m_particles_processed = 0;
     for ( auto parent: *mainvtx) {
+#endif
 
       // Process particles from main vertex
       CLHEP::HepLorentzVector momentum(parent->momentum().px(),
@@ -350,11 +352,15 @@ void AddFlowByShifting::MoveDescendantsToParent
     ATH_MSG_DEBUG("Processing branch of parent particle "<< HepMC::barcode(parent));
 
     // now rotate descendant vertices
+#ifdef HEPMC3
+    for (HepMC::GenVertexPtr descvtx:  HepMC::descendant_vertices(endvtx)) {
+#else
     for ( HepMC::GenVertex::vertex_iterator
 	    descvtxit = endvtx->vertices_begin(HepMC::descendants);
 	  descvtxit != endvtx->vertices_end(HepMC::descendants);
 	  ++descvtxit) {
       auto descvtx = (*descvtxit);
+#endif
       ATH_MSG_DEBUG("Processing vertex " << HepMC::barcode(descvtx));
 
       // rotate vertex
@@ -368,7 +374,11 @@ void AddFlowByShifting::MoveDescendantsToParent
       }
 
       // now rotate their associated particles
+#ifdef HEPMC3
+      for (auto descpart: descvtx->particles_out()){
+#else
       for (auto descpart: *descvtx){
+#endif
         CLHEP::HepLorentzVector momentum(descpart->momentum().px(),
 				  descpart->momentum().py(),
 				  descpart->momentum().pz(),
diff --git a/Generators/FlowAfterburner/src/CheckFlow.cxx b/Generators/FlowAfterburner/src/CheckFlow.cxx
index cc3af1f4af077bd0d4555e3bddcaab833232fb20..db8292b1d171dd79ebe1c65467468976a70c6400 100644
--- a/Generators/FlowAfterburner/src/CheckFlow.cxx
+++ b/Generators/FlowAfterburner/src/CheckFlow.cxx
@@ -203,7 +203,7 @@ StatusCode CheckFlow::execute() {
   // Iterate over MC particles  We are using the IsGenStable predicate from
   // IsGenStable ifs;
   GenAll ifs;
-  MCParticleCollection particles;
+  std::vector<HepMC::ConstGenParticlePtr> particles;
   StatusCode stat = m_tesIO->getMC(particles, &ifs, m_key);
   if (stat.isFailure()) {
     msg(MSG::ERROR) << "Could not find " << m_key << endmsg;
diff --git a/Generators/FlowAfterburner/src/CheckFlow_New.cxx b/Generators/FlowAfterburner/src/CheckFlow_New.cxx
index 087b4188d005b54de324977a45d93bfcb7857b71..a7cebbd8be5c2fa6a67a8877163224667b435eeb 100644
--- a/Generators/FlowAfterburner/src/CheckFlow_New.cxx
+++ b/Generators/FlowAfterburner/src/CheckFlow_New.cxx
@@ -279,7 +279,7 @@ StatusCode CheckFlow_New::execute() {
 
   // Iterate over all MC particles
   GenAll ifs;
-  MCParticleCollection particles;
+  std::vector<HepMC::ConstGenParticlePtr> particles;
   StatusCode stat = m_tesIO->getMC(particles, &ifs, m_key);
   if (stat.isFailure()) {
     msg(MSG::ERROR) << "Could not find " << m_key << endmsg;
diff --git a/Generators/FlowAfterburner/src/CheckFlow_New_Minbias.cxx b/Generators/FlowAfterburner/src/CheckFlow_New_Minbias.cxx
index daeb30c2f5390ab6abb4d4dc3c379c05792ed5d9..764f5ce9be07b8762b6a6dc62b799995d7d072fe 100644
--- a/Generators/FlowAfterburner/src/CheckFlow_New_Minbias.cxx
+++ b/Generators/FlowAfterburner/src/CheckFlow_New_Minbias.cxx
@@ -259,7 +259,7 @@ StatusCode CheckFlow_New_Minbias::execute() {
 
   // Iterate over MC particles  We are using the IsGenStable predicate from IsGenStable ifs;
   GenAll ifs;
-  MCParticleCollection particles;
+  std::vector<HepMC::ConstGenParticlePtr> particles;
   CHECK(m_tesIO->getMC(particles, &ifs, m_key));
 
   for (auto pitr: particles) {
diff --git a/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx b/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx
index fc3cbf654d472db153ef3f24384b67a201df4f7a..9fcb86b8ccf864dd71130024378b82e1e9b593da 100755
--- a/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx
+++ b/Generators/GenAnalysisTools/EventBoost/src/EventBoost.cxx
@@ -36,11 +36,11 @@ EventBoost::EventBoost( const std::string& name,
   :  AthAlgorithm(name, pSvcLocator), m_nModifiedEvent(0), m_nFailedEvent(0), m_nModifiedTotal(0), m_nFailedTotal(0),
      m_flat_rand_x(0.), m_flat_rand_y(0.), m_flat_rand_z(0.), m_gauss_rand_x(0.), m_gauss_rand_y(0.), m_gauss_rand_z(0.), m_pxsum(0.)
 {
-  declareProperty("BeamInclination", m_beam_inclination );
+  declareProperty("BeamInclination", m_beam_inclination = 0);
   declareProperty("GenEvtInputKey", m_genEvtInKey );
   declareProperty("GenEvtOutputKey", m_genEvtOutKey );
-  declareProperty("DoGaussianVertexSmearing", m_gaussian_vertex_smearing );
-  declareProperty("DoFlatVertexSmearing", m_flat_vertex_smearing );
+  declareProperty("DoGaussianVertexSmearing", m_gaussian_vertex_smearing = false );
+  declareProperty("DoFlatVertexSmearing", m_flat_vertex_smearing = false );
   declareProperty("GaussianMean", m_gaussian_mean );
   declareProperty("GaussianWidth", m_gaussian_width );
   declareProperty("FlatSmearingBoundaryMin", m_flat_smearing_boundary_min );
diff --git a/Generators/GeneratorFilters/GeneratorFilters/DstD0K3piFilter.h b/Generators/GeneratorFilters/GeneratorFilters/DstD0K3piFilter.h
index 84adc3da8d67f70a563f24e2c4101f044c2eb33c..a5076dfee0862537f58963a05fce2c8f9833e8da 100644
--- a/Generators/GeneratorFilters/GeneratorFilters/DstD0K3piFilter.h
+++ b/Generators/GeneratorFilters/GeneratorFilters/DstD0K3piFilter.h
@@ -37,8 +37,8 @@ public:
 
 private:
 
-  bool CheckChildLundId(HepMC::GenParticlePtr mcpart, unsigned int nth, int chLundId); // Check lundId of Nth(0 or 1) children from mcpart...
-  bool IsCandidate(std::vector<float>& lundIds, std::vector<HepMC::GenParticlePtr>& genParticles); // Is Candidate among 6 intermediate state??
+  bool CheckChildLundId(HepMC::ConstGenParticlePtr mcpart, unsigned int nth, int chLundId); // Check lundId of Nth(0 or 1) children from mcpart...
+  bool IsCandidate(std::vector<float>& lundIds, std::vector<HepMC::ConstGenParticlePtr>& genParticles); // Is Candidate among 6 intermediate state??
 
   double m_Ptmin;
   double m_EtaRange;
diff --git a/Generators/GeneratorFilters/doc/GeneratorFilters.tex b/Generators/GeneratorFilters/doc/GeneratorFilters.tex
index 18622cee3aa337c11a38779cfdb23124c234f705..dd1bbb6a06b558254de1165f58bdd755747b0853 100644
--- a/Generators/GeneratorFilters/doc/GeneratorFilters.tex
+++ b/Generators/GeneratorFilters/doc/GeneratorFilters.tex
@@ -139,11 +139,11 @@ PhotonFilter.Ptcut = 10000. \\4 GeV
 
 The filters are used in an Athena seqence as in the following example
 \begin{verbatim}
-theApp.DLLs  += [ "Herwig_i" ]
-theApp.DLLs  += [ "TruthExamples" ]
-theApp.DLLs += [ "HbookCnv" ]
-theApp.DLLs += [ "GeneratorFilters" ]
-theApp.DLLs += ["GaudiAlg"]
+theApp.Dlls  += [ "Herwig_i" ]
+theApp.Dlls  += [ "TruthExamples" ]
+theApp.Dlls += [ "HbookCnv" ]
+theApp.Dlls += [ "GeneratorFilters" ]
+theApp.Dlls += ["GaudiAlg"]
 theApp.HistogramPersistency = "HBOOK"
 theApp.TopAlg = ["Sequencer/Generator"]
 Generator.Members = ["Herwig", "ElectronFilter", "HistSample"]
diff --git a/Generators/GeneratorFilters/src/AsymJetFilter.cxx b/Generators/GeneratorFilters/src/AsymJetFilter.cxx
index c1558ab2a4e4624da0cd08991733d71bae8438e8..47e3078eb9045d989ccaa0ea0fe7f697af7f27cb 100644
--- a/Generators/GeneratorFilters/src/AsymJetFilter.cxx
+++ b/Generators/GeneratorFilters/src/AsymJetFilter.cxx
@@ -100,7 +100,7 @@ StatusCode AsymJetFilter::filterEvent() {
              &&(part->pdg_id() != 12 ) && (part->pdg_id() != -12 )
              &&(part->pdg_id() != 14 ) && (part->pdg_id() != -14 )
              &&(part->pdg_id() != 16 ) && (part->pdg_id() != -16 )
-             && (fabs(part->momentum().pseudoRapidity()) <= m_emaxeta)
+             && (std::abs(part->momentum().pseudoRapidity()) <= m_emaxeta)
              ){ // no neutrinos or muons and particles must be in active range
           int ip,ie;
           //      std::cout << part->momentum().phi() << "eta" << part->momentum().pseudoRapidity() << std::endl;
diff --git a/Generators/GeneratorFilters/src/DstD0K3piFilter.cxx b/Generators/GeneratorFilters/src/DstD0K3piFilter.cxx
index 4c086ac70e359e27a4ff1b55327367772db5cf7f..8a9e571ce06519bba66e1c405985df83f9d4aeb8 100644
--- a/Generators/GeneratorFilters/src/DstD0K3piFilter.cxx
+++ b/Generators/GeneratorFilters/src/DstD0K3piFilter.cxx
@@ -15,7 +15,16 @@ DstD0K3piFilter::DstD0K3piFilter(const std::string& name, ISvcLocator* pSvcLocat
 
 // If mcpart first child lundId equals chLundId, return true
 /// @todo No need for this to be a member function... useful in a HepMC utils library?
-bool DstD0K3piFilter::CheckChildLundId(HepMC::GenParticlePtr mcpart, unsigned int nth, int chLundId) {
+bool DstD0K3piFilter::CheckChildLundId(HepMC::ConstGenParticlePtr mcpart, unsigned int nth, int chLundId) {
+#ifdef HEPMC3
+  auto  DecayVtx = mcpart->end_vertex();
+  if (!DecayVtx) return false;
+  auto children=DecayVtx->particles_out();
+  if (children.size() < 2) return false;
+  if (children.size() < nth) return false;
+  if (std::abs(children.at(nth)->pdg_id()) == chLundId) return true;
+  return false;
+#else
   int nChild = 0;
   const HepMC::GenVertex* DecayVtx = mcpart->end_vertex();
   if (DecayVtx != 0) nChild = DecayVtx->particles_out_size();
@@ -33,11 +42,59 @@ bool DstD0K3piFilter::CheckChildLundId(HepMC::GenParticlePtr mcpart, unsigned in
     if (std::abs(child_mcpart->pdg_id()) == chLundId) return true;
   }
   return false;
+#endif  
 }
 
 
 /// @todo No need for this to be a member function
-bool DstD0K3piFilter::IsCandidate(std::vector<float>& lundIds, std::vector<HepMC::GenParticlePtr>& genParticles) {
+bool DstD0K3piFilter::IsCandidate(std::vector<float>& lundIds, std::vector<HepMC::ConstGenParticlePtr>& genParticles) {
+#ifdef HEPMC3
+  unsigned int nDecay = lundIds.size();
+  if (nDecay == 2) {
+    unsigned int id0 = std::abs( static_cast<int>(lundIds[0]) );
+    unsigned int id1 = std::abs( static_cast<int>(lundIds[1]) );
+    // 10323  211   k_1+ CLHEP::pi-
+    if ( id0 == 10323 && id1 == 211 ) { // // K_1+ CLHEP::pi-
+      if ( CheckChildLundId(genParticles[0], 0, 313) ) { // K*0 pi+
+        int nChild = 0;
+        auto DecayVtx = genParticles[0]->end_vertex();
+        if ( !DecayVtx) return false;
+        auto children=DecayVtx->particles_out();
+        if ( children.size() != 2 ) return false;
+        if ( CheckChildLundId(children[0], 0, 321) ) return true;
+      } else if ( CheckChildLundId(genParticles[0], 0, 321) ) {  // K+ rho0 or K+ CLHEP::pi CLHEP::pi
+        if ( CheckChildLundId(genParticles[0], 1, 113) || CheckChildLundId(genParticles[0], 1, 211) ) return true;
+      }
+    } else if (id0 == 313 && id1 == 113) { // // K^*0 rho0
+      if ( CheckChildLundId(genParticles[0], 0, 321) )  // rho0 decays to CLHEP::pi+CLHEP::pi- 100% in decay.dec
+        return true;
+    } else if (id0 == 321 && id1 == 20213) { // // K+ a_1+
+      if ( CheckChildLundId(genParticles[1], 0, 113) )  // a_1+ -> rho0 (113) CLHEP::pi+
+        return true;
+    }
+
+  } else if ( nDecay == 3 ) {
+    unsigned int id0 = std::abs( static_cast<int>(lundIds[0]) );
+    unsigned int id1 = std::abs( static_cast<int>(lundIds[1]) );
+    unsigned int id2 = std::abs( static_cast<int>(lundIds[2]) );
+    if (id0 == 321 && id1 == 211 && id2 == 113) { // K+ CLHEP::pi- rho0
+      return true;  // rho0 decays to CLHEP::pi+CLHEP::pi- 100% in decay.dec
+    }
+    if (id0 == 313 && id1 == 211 && id2 == 211 ) { // K^*+ CLHEP::pi- CLHEP::pi+
+      if ( CheckChildLundId(genParticles[0], 0, 321) ) return true;
+    }
+
+  } else if (nDecay ==4) { // K CLHEP::pi CLHEP::pi CLHEP::pi non-resonant
+    unsigned int id0 = std::abs( static_cast<int>(lundIds[0]) );
+    unsigned int id1 = std::abs( static_cast<int>(lundIds[1]) );
+    unsigned int id2 = std::abs( static_cast<int>(lundIds[2]) );
+    unsigned int id3 = std::abs( static_cast<int>(lundIds[3]) );
+    if (id0 == 321 && id1 == 211 && id2 == 211 && id3 == 211) {
+      return true;
+    }
+  }
+  return false;
+#else  
   unsigned int nDecay = lundIds.size();
   if (nDecay == 2) {
     unsigned int id0 = std::abs( static_cast<int>(lundIds[0]) );
@@ -85,6 +142,7 @@ bool DstD0K3piFilter::IsCandidate(std::vector<float>& lundIds, std::vector<HepMC
     }
   }
   return false;
+#endif  
 }
 
 
@@ -92,6 +150,36 @@ StatusCode DstD0K3piFilter::filterEvent() {
   McEventCollection::const_iterator itr;
   for (itr = events()->begin(); itr != events()->end(); ++itr) { // Loop to select D*
     const HepMC::GenEvent* genEvt = *itr;
+#ifdef HEPMC3
+    for (auto  pitr: *genEvt) {
+      if (std::abs(pitr->pdg_id()) != 413) continue; // D*+
+      if (pitr->momentum().perp() < m_Ptmin) continue;
+      if (std::abs(pitr->momentum().pseudoRapidity()) > m_EtaRange) continue;
+      auto DstDecayVtx = pitr->end_vertex();
+      if (!DstDecayVtx) continue;       // Check that we got a valid pointer and retrieve the number of daughters
+      auto DstChild = DstDecayVtx->particles_out();
+      ATH_MSG_DEBUG("D*+- meson found with Nchild = " << DstChild.size() << " and PDG ID = " << pitr->pdg_id());
+      if (DstChild.size() != 2) continue;
+      for ( auto  mcpartD0: DstChild ) {
+        if (std::abs(mcpartD0->pdg_id()) != 421) continue; // D0
+        auto D0DecayVtx = mcpartD0->end_vertex();        
+        if (!D0DecayVtx)  continue; // Check that we got a valid pointer and retrieve the number of daughters
+        auto D0Child = D0DecayVtx->particles_out();
+        if (D0Child.size() > 4) continue; //  For this analysis we are only interested in D*->D0 pi+
+        ATH_MSG_DEBUG("D0 meson found with Nchild = " << D0Child.size() << " and PDF ID = " << mcpartD0->pdg_id());
+
+        std::vector<float> lundIds;
+        std::vector<HepMC::ConstGenParticlePtr> genParticles;
+        for (auto  grandchild: *D0DecayVtx){
+            genParticles.push_back(grandchild);
+            lundIds.push_back(grandchild->pdg_id());
+        }
+        if (IsCandidate(lundIds, genParticles)) {
+          return StatusCode::SUCCESS;
+        }
+      }
+    }
+#else
     for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr) {
       // Work only with D*
       if (std::abs((*pitr)->pdg_id()) != 413) continue; // D*+
@@ -123,7 +211,7 @@ StatusCode DstD0K3piFilter::filterEvent() {
         ATH_MSG_DEBUG("D0 meson found with Nchild = " << nD0Child << " and PDF ID = " << child_mcpart->pdg_id());
 
         std::vector<float> lundIds;
-        std::vector<HepMC::GenParticle*> genParticles;
+        std::vector<const HepMC::GenParticle*> genParticles;
 
         if (D0DecayVtx) {
           HepMC::GenVertex::particles_in_const_iterator grandchild_mcpartItr  = D0DecayVtx->particles_out_const_begin();
@@ -146,6 +234,7 @@ StatusCode DstD0K3piFilter::filterEvent() {
         }
       }
     }
+#endif    
   }
   setFilterPassed(false);
   return StatusCode::SUCCESS;
diff --git a/Generators/GeneratorFilters/src/JetForwardFilter.cxx b/Generators/GeneratorFilters/src/JetForwardFilter.cxx
index 79021bb498a4d275ff725ba09323292f57262642..e140f452d946414be5410a72cae3840728ccddf1 100644
--- a/Generators/GeneratorFilters/src/JetForwardFilter.cxx
+++ b/Generators/GeneratorFilters/src/JetForwardFilter.cxx
@@ -176,8 +176,8 @@ double JetForwardFilter::evaluatePDF(double x, double y, int gausIndex) {
 
   // Split up bits of the exponential exp((-1/valA)*(valB+valC-valD))
   double valA = 2.0*(1-rho*rho);
-  double valB = pow(x-muX, 2)/pow(sigmaX, 2);
-  double valC = pow(y-muY, 2)/pow(sigmaY, 2);
+  double valB = std::pow(x-muX, 2)/std::pow(sigmaX, 2);
+  double valC = std::pow(y-muY, 2)/std::pow(sigmaY, 2);
   double valD = 2.0*rho*(x-muX)*(y-muY)/(sigmaX*sigmaY);
 
   double pdf = normFactor*exp( (-1.0/valA)*(valB+valC-valD)  );
diff --git a/Generators/GeneratorFilters/src/TTbarBoostCatFilter.cxx b/Generators/GeneratorFilters/src/TTbarBoostCatFilter.cxx
index 7f3b3c9322f4e0783ed0606b01239c1f436dc30f..50e14e42b34970112662eb0c176455417f11b15e 100644
--- a/Generators/GeneratorFilters/src/TTbarBoostCatFilter.cxx
+++ b/Generators/GeneratorFilters/src/TTbarBoostCatFilter.cxx
@@ -61,13 +61,72 @@ StatusCode TTbarBoostCatFilter::filterEvent() {
   if(m_LepPtmin*m_LepPtmax <0 && m_LepPtmin < 0 ) m_LepPtmin = 0.;
   if(m_LepPtmin*m_LepPtmax <0 && m_LepPtmax < 0 ) m_LepPtmax = 14000000.; // 14 TeV
 
-  std::vector<HepMC::GenParticlePtr> tops;
-  std::vector<HepMC::GenParticlePtr> ws;   // W from top decay (from tops)
-  std::vector<HepMC::GenParticlePtr> leps; // e, mu, tau from W decay (from ws)
-  std::vector<HepMC::GenParticlePtr> nus;  // nutrino from W decay (from ws)
+  std::vector<HepMC::ConstGenParticlePtr> tops;
+  std::vector<HepMC::ConstGenParticlePtr> ws;   // W from top decay (from tops)
+  std::vector<HepMC::ConstGenParticlePtr> leps; // e, mu, tau from W decay (from ws)
+  std::vector<HepMC::ConstGenParticlePtr> nus;  // nutrino from W decay (from ws)
 
   for (McEventCollection::const_iterator itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
+#ifdef HEPMC3
+    for (auto  pitr: *genEvt) {
+      if (std::abs(pitr->pdg_id()) != 6) continue;
+        if ( pitr->pdg_id() ==  6 ) N_quark_t_all++;
+        if ( pitr->pdg_id() == -6 ) N_quark_tbar_all++;
+        auto decayVtx = pitr->end_vertex();
+        // Verify if we got a valid pointer and retrieve the number of daughters
+        if (!decayVtx) continue;
+        // For this analysis we are not interested in t->t MC structures, only in decays
+          for (auto child_mcpart:  *decayVtx ) {
+            //  Implicitly assume that tops always decay to W X
+            if (std::abs(child_mcpart->pdg_id()) == 24) {
+              if ( pitr->pdg_id() ==  6 ){
+		N_quark_t++;
+		tops.push_back(pitr);			  
+		ws.push_back(child_mcpart);
+	      }
+              if ( pitr->pdg_id() == -6 ){
+		N_quark_tbar++;
+		tops.push_back(pitr);	
+		ws.push_back(child_mcpart);		  
+	      }
+              bool  useNextVertex = false;
+              auto  w_decayVtx = child_mcpart->end_vertex();
+
+              while (w_decayVtx) {
+                useNextVertex = false;
+                for (auto  grandchild_mcpart: *w_decayVtx) {
+			      int grandchild_pid = grandchild_mcpart->pdg_id();
+			      ATH_MSG_DEBUG("W (t/tbar) has " << w_decayVtx->particles_out().size() << " children and the pdg_id of the next is " << grandchild_pid);
+			      // Check if the W's child is W again. If yes, then move to its next decay vertex in a decay tree
+			      if (std::abs(grandchild_pid) == 24) {
+					w_decayVtx = grandchild_mcpart->end_vertex();
+
+					// If something wrong comes from truth...
+					if (!w_decayVtx) {
+                                        ATH_MSG_ERROR("A stable W is found... ");
+                                        break;
+					}
+					useNextVertex = true;
+					break;
+			      }
+			      if (std::abs(grandchild_pid) == 11 ||  std::abs(grandchild_pid) == 13 || std::abs(grandchild_pid) == 15) {
+				leps.push_back(grandchild_mcpart);
+					if (grandchild_mcpart->momentum().perp() >= m_Ptmin) N_pt_above_cut++;
+					// W decay lepton is found. Break loop over the decay product particles
+					// break;
+			      }
+			      if (abs(grandchild_pid) == 12 ||  abs(grandchild_pid) == 14 || abs(grandchild_pid) == 16) {
+				nus.push_back(grandchild_mcpart);
+			      }
+                }
+                // If investigation of W's next decay vertex is not required then finish looking for leptons
+                if (!useNextVertex) break;
+              }
+            }
+          }
+    }
+#else
     for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
       if (std::abs((*pitr)->pdg_id()) == 6) {
         if ( (*pitr)->pdg_id() ==  6 ) N_quark_t_all++;
@@ -154,6 +213,7 @@ StatusCode TTbarBoostCatFilter::filterEvent() {
         }
       }
     }
+#endif
   }
 
   if(tops.size()==2){
@@ -231,29 +291,21 @@ StatusCode TTbarBoostCatFilter::filterEvent() {
     for (McEventCollection::const_iterator itr = events()->begin(); itr!=events()->end(); ++itr) {
       event++;
       const HepMC::GenEvent* genEvt = (*itr);
-      HepMC::GenEvent::particle_const_iterator mcpartItr  = genEvt->particles_begin();
-      HepMC::GenEvent::particle_const_iterator mcpartItrE = genEvt->particles_end();
-      int part ( 0 );
-      for (; mcpartItr != mcpartItrE; ++mcpartItr) {
+      int part=0;
+      for (auto mcpart: *genEvt ) {
         part++;
-        HepMC::GenParticle * mcpart = (*mcpartItr);
         int pid = mcpart->pdg_id();
         ATH_MSG_ERROR("In event (from MC collection) " << event << " particle number " << part << " has pdg_id = " << pid);
 
         // retrieve decay vertex
-        const HepMC::GenVertex * decayVtx = mcpart->end_vertex();
-
+        auto decayVtx = mcpart->end_vertex();
         // verify if we got a valid pointer
-        if ( decayVtx != 0 ) {
-          HepMC::GenVertex::particles_in_const_iterator child_mcpartItr  = decayVtx->particles_out_const_begin();
-          HepMC::GenVertex::particles_in_const_iterator child_mcpartItrE = decayVtx->particles_out_const_end();
-          int part_child ( 0 );
-          for (; child_mcpartItr != child_mcpartItrE; ++child_mcpartItr) {
-            part_child++;
-            HepMC::GenParticle * child_mcpart = (*child_mcpartItr);
-            int child_pid = child_mcpart->pdg_id();
-            ATH_MSG_ERROR("          child " << part_child << " with pdg_id = " << child_pid);
-          }
+        if ( !decayVtx)  continue;
+        int part_child =0 ;
+        for ( auto  child_mcpart: *decayVtx) {
+        part_child++;
+        int child_pid = child_mcpart->pdg_id();
+        ATH_MSG_ERROR("          child " << part_child << " with pdg_id = " << child_pid);
         }
       }
     }
diff --git a/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx b/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx
index 5092d2403ce78c454e302ca62946097e09d472a6..11f46f22778159d6c542eec75602166fe498685b 100644
--- a/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx
+++ b/Generators/GeneratorFilters/src/TTbarPlusHeavyFlavorFilter.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "GeneratorFilters/TTbarPlusHeavyFlavorFilter.h"
-
+#include "AtlasHepMC/Relatives.h"
 #include "GaudiKernel/MsgStream.h"
 
 //--------------------------------------------------------------------------
@@ -226,6 +226,15 @@ bool TTbarPlusHeavyFlavorFilter::isInitialHadron(HepMC::ConstGenParticlePtr part
   auto prod = part->production_vertex();
   if(prod){
     int type = hadronType(part->pdg_id());
+#ifdef HEPMC3
+    for(auto firstParent: prod->particles_in()){
+      if( HepMC::barcode(part) < HepMC::barcode(firstParent) ) continue; /// protection for sherpa
+      int mothertype = hadronType( firstParent->pdg_id() );
+      if( mothertype == type ){
+	return false;
+      }
+    }
+#else
     HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::parents);
     HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::parents);
     for(;firstParent!=endParent; ++firstParent){
@@ -235,6 +244,7 @@ bool TTbarPlusHeavyFlavorFilter::isInitialHadron(HepMC::ConstGenParticlePtr part
 	return false;
       }
     }
+#endif
 
   }
 
@@ -247,6 +257,15 @@ bool TTbarPlusHeavyFlavorFilter::isFinalHadron(HepMC::ConstGenParticlePtr part)
   auto end = part->end_vertex();
   if(end){
     int type = hadronType(part->pdg_id());
+#ifdef HEPMC3
+    for(auto firstChild: end->particles_in()){
+      if( HepMC::barcode(part) > HepMC::barcode(firstChild) ) continue; /// protection for sherpa
+      int childtype = hadronType( firstChild->pdg_id() );
+      if( childtype == type ){
+	return false;
+      }
+    }
+#else
     HepMC::GenVertex::particle_iterator firstChild = end->particles_begin(HepMC::children);
     HepMC::GenVertex::particle_iterator endChild = end->particles_end(HepMC::children);
     for(;firstChild!=endChild; ++firstChild){
@@ -256,6 +275,7 @@ bool TTbarPlusHeavyFlavorFilter::isFinalHadron(HepMC::ConstGenParticlePtr part)
 	return false;
       }
     }
+#endif
 
   }
 
@@ -269,6 +289,15 @@ bool TTbarPlusHeavyFlavorFilter::isQuarkFromHadron(HepMC::ConstGenParticlePtr pa
 
   auto prod = part->production_vertex();
   if(prod){
+#ifdef HEPMC3
+    for(auto firstParent: HepMC::ancestor_particles(prod)){
+      if( HepMC::barcode(part) < HepMC::barcode(firstParent) ) continue; /// protection for sherpa
+      int mothertype = hadronType( firstParent->pdg_id() );
+      if( 4 == mothertype || 5 == mothertype ){
+	return true;
+      }
+    }
+#else	  
     HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::ancestors);
     HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::ancestors);
     for(;firstParent!=endParent; ++firstParent){
@@ -278,6 +307,7 @@ bool TTbarPlusHeavyFlavorFilter::isQuarkFromHadron(HepMC::ConstGenParticlePtr pa
 	return true;
       }
     }
+#endif
 
   }
 
@@ -291,6 +321,14 @@ bool TTbarPlusHeavyFlavorFilter::isCHadronFromB(HepMC::ConstGenParticlePtr part)
 
   auto prod = part->production_vertex();
   if(prod){
+#ifdef HEPMC3
+    for(auto firstParent:HepMC::ancestor_particles(prod)){
+      if( HepMC::barcode(part) < HepMC::barcode(firstParent) ) continue; /// protection for sherpa
+      if( isBHadron(firstParent) ){
+	return true;
+      }
+    }
+#else
     HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::ancestors);
     HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::ancestors);
     for(;firstParent!=endParent; ++firstParent){
@@ -299,6 +337,7 @@ bool TTbarPlusHeavyFlavorFilter::isCHadronFromB(HepMC::ConstGenParticlePtr part)
 	return true;
       }
     }
+#endif
 
   }
 
@@ -314,12 +353,19 @@ bool TTbarPlusHeavyFlavorFilter::isLooping(HepMC::ConstGenParticlePtr part, std:
 
   init_part.insert(part);
 
+#ifdef HEPMC3
+  for(auto firstParent: prod->particles_in()){
+    if( init_part.find(firstParent) != init_part.end() ) return true;
+    if( isLooping(firstParent, init_part) ) return true;
+  }
+#else
   HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::parents);
   HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::parents);
   for(;firstParent!=endParent; ++firstParent){
     if( init_part.find(*firstParent) != init_part.end() ) return true;
     if( isLooping(*firstParent, init_part) ) return true;
   }
+#endif
 
   return false;
 
@@ -333,6 +379,14 @@ HepMC::ConstGenParticlePtr  TTbarPlusHeavyFlavorFilter::findInitial(HepMC::Const
 
   if(!prod) return part;
 
+#ifdef HEPMC3
+  for(auto firstParent: prod->particles_in()){
+    if( HepMC::barcode(part) < HepMC::barcode(firstParent) &&  looping) continue; /// protection for sherpa
+    if( part->pdg_id() == firstParent->pdg_id() ){
+      return findInitial(firstParent, looping);
+    }
+  }
+#else
   HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::parents);
   HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::parents);
   for(;firstParent!=endParent; ++firstParent){
@@ -341,6 +395,7 @@ HepMC::ConstGenParticlePtr  TTbarPlusHeavyFlavorFilter::findInitial(HepMC::Const
       return findInitial(*firstParent, looping);
     }
   }
+#endif
    
   return part;
 
@@ -359,12 +414,19 @@ bool TTbarPlusHeavyFlavorFilter::isDirectlyFromTop(HepMC::ConstGenParticlePtr pa
 
   if(!prod) return false;
 
+#ifdef HEPMC3
+  for( auto firstParent: prod->particles_in()){
+    if( HepMC::barcode(part) < HepMC::barcode(firstParent) &&  looping ) continue; /// protection for sherpa
+    if( std::abs( firstParent->pdg_id() ) == 6 ) return true;
+  }
+#else
   HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::parents);
   HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::parents);
   for(;firstParent!=endParent; ++firstParent){
     if( part->barcode() < (*firstParent)->barcode() &&  looping ) continue; /// protection for sherpa
     if( abs( (*firstParent)->pdg_id() ) == 6 ) return true;
   }
+#endif 
    
   return false;
 }
@@ -377,6 +439,14 @@ bool TTbarPlusHeavyFlavorFilter::isDirectlyFromWTop(HepMC::ConstGenParticlePtr p
 
   if(!prod) return false;
 
+#ifdef HEPMC3
+  for(auto firstParent: prod->particles_in()){
+    if( HepMC::barcode(part) < HepMC::barcode(firstParent) && looping  ) continue; /// protection for sherpa
+    if( abs( firstParent->pdg_id() ) == 24 ){
+      if( isFromTop(firstParent, looping) ) return true;
+    }
+  }
+#else
   HepMC::GenVertex::particle_iterator firstParent = prod->particles_begin(HepMC::parents);
   HepMC::GenVertex::particle_iterator endParent = prod->particles_end(HepMC::parents);
   for(;firstParent!=endParent; ++firstParent){
@@ -385,6 +455,7 @@ bool TTbarPlusHeavyFlavorFilter::isDirectlyFromWTop(HepMC::ConstGenParticlePtr p
       if( isFromTop(*firstParent, looping) ) return true;
     }
   }
+#endif   
    
   return false;
 
diff --git a/Generators/GeneratorFilters/src/TTbarWToLeptonFilter.cxx b/Generators/GeneratorFilters/src/TTbarWToLeptonFilter.cxx
index f23134a46c15ba880d70d7efb3a1798fc3a6be93..0276a6e5a5948c314bfa81e73b46c8b31cc0a80f 100644
--- a/Generators/GeneratorFilters/src/TTbarWToLeptonFilter.cxx
+++ b/Generators/GeneratorFilters/src/TTbarWToLeptonFilter.cxx
@@ -21,6 +21,53 @@ StatusCode TTbarWToLeptonFilter::filterEvent() {
 
   for (McEventCollection::const_iterator itr = events()->begin(); itr!=events()->end(); ++itr) {
     const HepMC::GenEvent* genEvt = (*itr);
+#ifdef HEPMC3
+    for (auto  pitr: *genEvt) {
+        if (std::abs(pitr->pdg_id()) != 6) continue;
+        if ( pitr->pdg_id() ==  6 ) N_quark_t_all++;
+        if ( pitr->pdg_id() == -6 ) N_quark_tbar_all++;
+        auto decayVtx = pitr->end_vertex();
+        // Verify if we got a valid pointer and retrieve the number of daughters
+        if (!decayVtx) continue; 
+        // For this analysis we are not interested in t->t MC structures, only in decays
+        if (decayVtx->particles_out().size() < 2) continue;
+        for (auto child_mcpart:  decayVtx->particles_out()) {
+            //  Implicitly assume that tops always decay to W X
+            if (std::abs(child_mcpart->pdg_id()) != 24) continue;
+              if ( pitr->pdg_id() ==  6 ) N_quark_t++;
+              if ( pitr->pdg_id() == -6 ) N_quark_tbar++;
+
+              bool  useNextVertex = false;
+              auto w_decayVtx = child_mcpart->end_vertex();
+              while (w_decayVtx) {
+                useNextVertex = false;
+                for (auto grandchild_mcpart: *w_decayVtx) {
+			      int grandchild_pid = grandchild_mcpart->pdg_id();
+			      ATH_MSG_DEBUG("W (t/tbar) has " <<  w_decayVtx->particles_out().size() << " children and the pdg_id of the next is " << grandchild_pid);
+			      // Check if the W's child is W again. If yes, then move to its next decay vertex in a decay tree
+			      if (std::abs(grandchild_pid) == 24) {
+			         w_decayVtx = grandchild_mcpart->end_vertex();
+				 // If something wrong comes from truth...
+				 if (!w_decayVtx) {
+                                   ATH_MSG_ERROR("A stable W is found... ");
+                                   break;
+			         }
+				 useNextVertex = true;
+				break;
+			      }
+
+			      if (std::abs(grandchild_pid) == 11 ||  std::abs(grandchild_pid) == 13 || abs(grandchild_pid) == 15) {
+				 if (grandchild_mcpart->momentum().perp() >= m_Ptmin) N_pt_above_cut++;
+				 // W decay lepton is found. Break loop over the decay product particles
+				 break;
+			      }
+                }
+                // If investigation of W's next decay vertex is not required then finish looking for leptons
+                if (!useNextVertex) break;
+         }
+      }
+   }
+#else
     for (HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
       if (std::abs((*pitr)->pdg_id()) == 6) {
         if ( (*pitr)->pdg_id() ==  6 ) N_quark_t_all++;
@@ -93,6 +140,7 @@ StatusCode TTbarWToLeptonFilter::filterEvent() {
         }
       }
     }
+#endif
   }
 
   ATH_MSG_INFO("Found " << N_quark_t_all    << " t    quarks in event record");
@@ -113,30 +161,21 @@ StatusCode TTbarWToLeptonFilter::filterEvent() {
     for (McEventCollection::const_iterator itr = events()->begin(); itr!=events()->end(); ++itr) {
       event++;
       const HepMC::GenEvent* genEvt = (*itr);
-      HepMC::GenEvent::particle_const_iterator mcpartItr  = genEvt->particles_begin();
-      HepMC::GenEvent::particle_const_iterator mcpartItrE = genEvt->particles_end();
-      int part ( 0 );
-      for (; mcpartItr != mcpartItrE; ++mcpartItr) {
+      int part=0 ;
+      for (auto  mcpart: *genEvt) {
         part++;
-        HepMC::GenParticle * mcpart = (*mcpartItr);
         int pid = mcpart->pdg_id();
         ATH_MSG_ERROR("In event (from MC collection) " << event << " particle number " << part << " has pdg_id = " << pid);
-
         // retrieve decay vertex
-        const HepMC::GenVertex * decayVtx = mcpart->end_vertex();
-
+        auto  decayVtx = mcpart->end_vertex();
         // verify if we got a valid pointer
-        if ( decayVtx != 0 ) {
-          HepMC::GenVertex::particles_in_const_iterator child_mcpartItr  = decayVtx->particles_out_const_begin();
-          HepMC::GenVertex::particles_in_const_iterator child_mcpartItrE = decayVtx->particles_out_const_end();
-          int part_child ( 0 );
-          for (; child_mcpartItr != child_mcpartItrE; ++child_mcpartItr) {
+        if ( !decayVtx ) continue;
+          int part_child=0;
+          for ( auto  child_mcpart: *decayVtx) {
             part_child++;
-            HepMC::GenParticle * child_mcpart = (*child_mcpartItr);
             int child_pid = child_mcpart->pdg_id();
             ATH_MSG_ERROR("          child " << part_child << " with pdg_id = " << child_pid);
           }
-        }
       }
     }
     setFilterPassed(false);
diff --git a/Generators/GeneratorFilters/src/TopCKMFilter.cxx b/Generators/GeneratorFilters/src/TopCKMFilter.cxx
index 6363fc2b8b3849bb2cc5d55d9f877a89b142818c..deec55083eb0eec6a8d4f738337fda6164f1156e 100644
--- a/Generators/GeneratorFilters/src/TopCKMFilter.cxx
+++ b/Generators/GeneratorFilters/src/TopCKMFilter.cxx
@@ -51,7 +51,7 @@ StatusCode TopCKMFilter::filterEvent() {
       {
        Wbosons[i]=Child->pdg_id();
        if (!Child->end_vertex()) continue;
-       for (auto gChild: *(Child->end_vertex()) if (std::abs(gChild->pdg_id()) == 15) isTau[i] = true;
+       for (auto gChild: *(Child->end_vertex())) if (std::abs(gChild->pdg_id()) == 15) isTau[i] = true;
        }
        }
        }
diff --git a/Generators/GeneratorFilters/src/WZtoLeptonFilter.cxx b/Generators/GeneratorFilters/src/WZtoLeptonFilter.cxx
index c91f1f2002fd2175abe2caf3974cbf41a1df31e4..a93729e6880bd7988604cad6ee6c9ad5b517bef2 100644
--- a/Generators/GeneratorFilters/src/WZtoLeptonFilter.cxx
+++ b/Generators/GeneratorFilters/src/WZtoLeptonFilter.cxx
@@ -8,6 +8,7 @@
 #include "McParticleEvent/TruthParticleContainer.h"
 #include "CLHEP/Vector/LorentzVector.h"
 #include "GaudiKernel/ObjectList.h"
+#include "AtlasHepMC/Relatives.h"
 
 WZtoLeptonFilter::WZtoLeptonFilter(const std::string& name, ISvcLocator* pSvcLocator)
   : GenFilter( name,pSvcLocator ),
@@ -203,8 +204,6 @@ StatusCode WZtoLeptonFilter::filterFinalize() {
 
 
 StatusCode WZtoLeptonFilter::filterEvent() {
-  HepMC::GenVertexPtr LePrdVrt;
-  HepMC::GenVertexPtr TauPrdVrt;
 
   // Momentum of the products of the tau decay
   CLHEP::HepLorentzVector mom_hadrons;
@@ -244,6 +243,103 @@ StatusCode WZtoLeptonFilter::filterEvent() {
     if (wgtsC.size() > 0) wght = wgtsC[0];
     m_tot_wghts += wght;
 
+#ifdef HEPMC3
+HepMC::ConstGenVertexPtr LePrdVrt;
+HepMC::ConstGenVertexPtr TauPrdVrt;
+    for ( auto pitr: *genEvt) {
+      LePrdVrt = 0;
+      TauPrdVrt = 0;
+      lepid =  pitr->pdg_id();
+      abslepid = std::abs( lepid );
+
+      if ((abslepid != 11 && abslepid != 13) || pitr->status() != 1) continue;
+        double leppt = pitr->momentum().perp();
+        double lepeta = std::abs( pitr->momentum().pseudoRapidity() );
+
+        LePrdVrt = pitr->production_vertex();
+        int anceWZ = 0;
+        int momWZ = 0;
+        int taufromWZ = 0;
+
+        if (LePrdVrt != NULL) {
+          int ancecnt = 0;
+          for (auto lepanc: HepMC::ancestor_particles(LePrdVrt) ) {
+            int ancepid = lepanc->pdg_id();
+            int ancestatus = lepanc->status();
+            if ( m_tesit == 1 ) {
+              ATH_MSG_DEBUG("lepton=" << lepid << "  " << ancecnt <<
+                            "'th  ancestors=" << ancepid << "          status =" << ancestatus);
+            }
+            if ( std::abs(ancepid) == 24 || std::abs(ancepid) == 23 )  anceWZ ++;
+            ancecnt ++;
+          }  // end of lepton ancestors( mother, grandmother ... ) test
+
+          
+          int momcnt = 0;
+          taufromWZ = 0;
+          for (auto  lepanc: LePrdVrt->particles_in() ) {
+            int mompid =  lepanc->pdg_id();
+            int momstatus =  lepanc->status();
+            if ( m_tesit == 1 ) {
+              ATH_MSG_DEBUG(momcnt << "'th mom with pid= " << mompid << "                mom status = " << momstatus);
+            }
+            if ( std::abs(mompid) ==15 ) {
+              TauPrdVrt = lepanc->production_vertex();
+              for (auto taumom: TauPrdVrt->particles_in() ) {
+                int wzpdg = taumom->pdg_id();
+                if (abs(wzpdg) == 24 || abs(wzpdg) == 23 || (wzpdg == mompid && anceWZ > 0)) taufromWZ++;
+                if ( m_tesit == 1 ) ATH_MSG_DEBUG("tau mother =" << wzpdg);
+              }
+            }
+
+            if (abs(mompid)==24 || abs(mompid)==23 || (anceWZ > 0 && mompid==lepid) || (abs(mompid) == 15 && taufromWZ > 0)) momWZ++;
+          }  // end of lepton mother test loop
+
+          if ( momWZ > 0 && anceWZ > 0 ) iWL++;
+          else iBL++;
+
+          if ( ( abslepid == 11 && leppt >= m_Pt_e && lepeta <= m_Eta_e ) ||( abslepid == 13 && leppt >= m_Pt_mu && lepeta <= m_Eta_mu ) ) {
+            if ( m_tesit == 1 ) ATH_MSG_DEBUG("Phase space OK");
+            if ( momWZ > 0 && anceWZ > 0 ) {
+              iwl++;
+              if (m_signal != 1) iwls++;
+              if ( taufromWZ > 0 ) taulep++;
+              else {
+                if ( abslepid == 11 ) etronCT++; else muonCT++;
+              }
+            } else {
+              ibl++;
+              if ( m_signal != 1 ) {
+                if ( abslepid == 11 ) etronCT ++;
+                else muonCT ++;
+              }
+            }
+            if ( lepid > 0 ) posilep ++;
+            else negalep ++;
+          }
+
+          if (m_tesit == 1) {
+            ATH_MSG_DEBUG("iWL=" << iWL << " iwl=" << iwl << " iBL=" << iBL << " ibl=" << ibl);
+            if ( iWL == 0 && iBL == 0 ) ATH_MSG_WARNING("Check !!! Unexpected filter LEAKAGE !");
+          }
+        } else {  // I've prayed for the upstream generators to give less chaos/duplications
+          nullvertex ++;
+          if ( m_tesit == 1 ) ATH_MSG_DEBUG(" NULL production vertex is met !");
+          if ( m_signal != 1 ) {
+            if ( ( abslepid == 11 && leppt >= m_Pt_e && lepeta <= m_Eta_e ) ||( abslepid == 13 && leppt >= m_Pt_mu && lepeta <= m_Eta_mu ) ) {
+              if ( m_tesit == 1 ) ATH_MSG_DEBUG("Phase space OK, NULL prod-vertex");
+              if ( abslepid == 11 ) etronCT ++;
+              else muonCT ++;
+
+              if ( lepid > 0 ) posilep ++;
+              else negalep ++;
+            }  //  anyway  need for kinematical requirements
+          }   //  only work for conservation for backgrounds
+        }  //  End if for muon/electron mom vertex test
+    }    //  end of all mc_particles
+#else
+   HepMC::GenVertex* LePrdVrt;
+   HepMC::GenVertex* TauPrdVrt;
     for ( HepMC::GenEvent::particle_const_iterator pitr = genEvt->particles_begin(); pitr != genEvt->particles_end(); ++pitr) {
       LePrdVrt = 0;
       TauPrdVrt = 0;
@@ -346,6 +442,7 @@ StatusCode WZtoLeptonFilter::filterEvent() {
         }  //  End if for muon/electron mom vertex test
       }   //  end of leptonic pid
     }    //  end of all mc_particles
+#endif
 
     leps = (m_signal == 1) ? etronCT + muonCT : etronCT + muonCT + taulep;
 
diff --git a/Generators/HepMCAnalysis_i/CMakeLists.txt b/Generators/HepMCAnalysis_i/CMakeLists.txt
index abbed775bb511f15534b554be57e941e7bcb3cd5..b970fb62fa61f15ca3f7071dcca54d926576f9cd 100644
--- a/Generators/HepMCAnalysis_i/CMakeLists.txt
+++ b/Generators/HepMCAnalysis_i/CMakeLists.txt
@@ -24,6 +24,13 @@ find_package( HepMCAnalysis )
 find_package( ROOT COMPONENTS Core MathCore Hist RIO )
 find_package( FastJet )
 find_package( HepMC )
+if (HEPMC3_USE)
+set( HEPMC_HepMCAnalysis_INTERFACE_DIR  ${HEPMC3_INCLUDE_DIR}/../share/HepMC3/interfaces/HepMCCompatibility/include )
+else()
+set( HEPMC_HepMCAnalysis_INTERFACE_DIR  )
+endif()
+
+
 
 # Component(s) in the package:
 atlas_add_component( HepMCAnalysis_i
@@ -32,6 +39,7 @@ atlas_add_component( HepMCAnalysis_i
    ${HEPUTILS_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
    ${FASTJET_INCLUDE_DIRS}
    ${HEPMC_INCLUDE_DIRS}
+   ${HEPMC_HepMCAnalysis_INTERFACE_DIR}
    LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMCANALYSIS_LIBRARIES}
    ${HEPUTILS_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib
    ${FASTJET_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib EventInfo
diff --git a/Generators/HepMCAnalysis_i/src/PrepareHepMCAnalysisGenEvent.cxx b/Generators/HepMCAnalysis_i/src/PrepareHepMCAnalysisGenEvent.cxx
index 63f688bb1284d8e25be5f122e3bd32bc831e04ff..f1d257a78ddc8ce274fb337ec9e37947e0cc686e 100644
--- a/Generators/HepMCAnalysis_i/src/PrepareHepMCAnalysisGenEvent.cxx
+++ b/Generators/HepMCAnalysis_i/src/PrepareHepMCAnalysisGenEvent.cxx
@@ -8,6 +8,20 @@
 #include <vector>
 #include "HepMC/GenEvent.h"
 //This tricky convention is needed for usage with HepMC3.
+#ifdef HEPMC3
+#include "HepMC3/GenEvent.h"
+#include "HepMCCompatibility.h"
+HepMC::GenEvent* PrepareHepMCAnalysisGenEvent(const HepMC3::GenEvent* cevent)
+{
+HepMC::GenEvent* event = ConvertHepMCGenEvent_3to2(*cevent);
+  for (auto p = event->particles_begin(); p != event->particles_end(); ++p) {
+      auto fv=(*p)->momentum();
+      fv.set(fv.x()*0.001,fv.y()*0.001,fv.z()*0.001,fv.e()*0.001);
+      (*p)->set_momentum(fv);
+  }
+  return event;
+}
+#else
 using HepMCAnalysisGenEvent=HepMC::GenEvent;
 HepMC::GenEvent* PrepareHepMCAnalysisGenEvent(const HepMC::GenEvent* cevent)
 {
@@ -20,3 +34,4 @@ HepMC::GenEvent* event = new HepMC::GenEvent(*cevent);
   }
   return event;
 }
+#endif
diff --git a/Generators/Hijing_i/doc/Hijing.tex b/Generators/Hijing_i/doc/Hijing.tex
index 0bd550c4d52b764dac155cbd42f23fb7091e0f8f..0b53e7b1ed8176ffad0ff92747fee66464ec6569 100644
--- a/Generators/Hijing_i/doc/Hijing.tex
+++ b/Generators/Hijing_i/doc/Hijing.tex
@@ -38,7 +38,7 @@ The default jobOptions.hijing.py file will have been copied to your TestRelease
 area when you set up athena under CMT.
 The following is needed if you wish to run Hijing
 \begin{verbatim}
-theApp.DLLs  += [ "Hijing\_i"]
+theApp.Dlls  += [ "Hijing\_i"]
 theApp.TopAlg = ["Hijing"]
 \end{verbatim}
 The initialization parameters can be changed via the following line in the jobOptions.py
diff --git a/Generators/Hydjet_i/src/Hydjet_i.cxx b/Generators/Hydjet_i/src/Hydjet_i.cxx
index 7ed5ccca799517bf9ea72837a13bca1f7314fa59..e58bf0fdd883f06ff01e4e12d586621cd6144c9f 100644
--- a/Generators/Hydjet_i/src/Hydjet_i.cxx
+++ b/Generators/Hydjet_i/src/Hydjet_i.cxx
@@ -286,7 +286,7 @@ Hydjet::set_user_params	(void)
 
     // copy of HYDJET calculations
     m_hyipar.AW() = m_a;
-    m_hyipar.RA() = 1.15 * pow(m_a,0.333333);
+    m_hyipar.RA() = 1.15 * std::pow(m_a,0.333333);
 
     m_ifb      	= 1;
     m_bmin     	= 0;
diff --git a/Generators/MCTester_i/CMakeLists.txt b/Generators/MCTester_i/CMakeLists.txt
index fa681d6d06c56ac6c595ec59ef3f6a2fabdb12b8..4df0bcb72e4b37ef208a3c96a7f0ca60f7e30303 100644
--- a/Generators/MCTester_i/CMakeLists.txt
+++ b/Generators/MCTester_i/CMakeLists.txt
@@ -18,12 +18,21 @@ atlas_depends_on_subdirs( PUBLIC
 # External dependencies:
 find_package( MCTester )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+if (HEPMC3_USE)
+set( MCTester_sources src/MCTesterAlg.cxx 
+                      ${HEPMC3_INCLUDE_DIR}/../share/HepMC3/interfaces/mc-tester/src/HepMC3Particle.cxx 
+                      ${HEPMC3_INCLUDE_DIR}/../share/HepMC3/interfaces/mc-tester/src/HepMC3Event.cxx) 
+set( HEPMC_MCTester_INTERFACE_DIR ${HEPMC3_INCLUDE_DIR}/../share/HepMC3/interfaces/mc-tester/include)
+else()
+set( MCTester_sources src/MCTesterAlg.cxx)
+set( HEPMC_MCTester_INTERFACE_DIR ${MCTESTER_INCLUDE_DIRS})
+endif()
 
 # Component(s) in the package:
 atlas_add_component( MCTester_i
-                     src/*.cxx
+                     ${MCTester_sources}
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${MCTESTER_INCLUDE_DIRS} 
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${MCTESTER_INCLUDE_DIRS} ${HEPMC_MCTester_INTERFACE_DIR}
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${MCTESTER_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel StoreGateLib SGtests EventInfo GeneratorObjects )
 
 # Install files from the package:
diff --git a/Generators/MCTester_i/MCTester_i/MCTesterAlg.h b/Generators/MCTester_i/MCTester_i/MCTesterAlg.h
index 50a5ef1bdd60b7129df6063e9844032cf35b18c7..07d17074e77d06cbe7e2ffbdf8b52a3ff60bf73c 100644
--- a/Generators/MCTester_i/MCTester_i/MCTesterAlg.h
+++ b/Generators/MCTester_i/MCTester_i/MCTesterAlg.h
@@ -10,7 +10,13 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 
 //external MC-TESTER headers
+#ifdef HEPMC3
+#include "HepMC3Event.h"
+using HepMCEvent=HepMC3Event;
+using HepMCParticle=HepMC3Particle;
+#else
 #include "HepMCEvent.H"
+#endif
 #include "Generate.h"
 #include "Setup.H"
 
diff --git a/Generators/ParticleDecayer/src/ParticleDecayer.cxx b/Generators/ParticleDecayer/src/ParticleDecayer.cxx
index cc1eab0707e67c19198c36a1ba6867a88c4d0409..184c12dee9e9a9037656453cbe28240b0c257e81 100644
--- a/Generators/ParticleDecayer/src/ParticleDecayer.cxx
+++ b/Generators/ParticleDecayer/src/ParticleDecayer.cxx
@@ -107,10 +107,10 @@ StatusCode ParticleDecayer::changeMass( HepMC::GenParticlePtr genpart, double ne
       return StatusCode::FAILURE;
    }
    //At this point, we have e, theta, and phi.  Put them together to get the four-momentum.
-   double p  = sqrt(p2);
-   double px = p*sin(theta)*cos(phi);
-   double py = p*sin(theta)*sin(phi);
-   double pz = p*cos(theta);
+   double p  = std::sqrt(p2);
+   double px = p*std::sin(theta)*std::cos(phi);
+   double py = p*std::sin(theta)*std::sin(phi);
+   double pz = p*std::cos(theta);
    //Fill the four-momentum
    const CLHEP::HepLorentzVector updatedLV(px,py,pz,e);
    genpart->set_momentum(HepMC::FourVector(updatedLV.x(),updatedLV.y(),updatedLV.z(),updatedLV.e()));
@@ -546,12 +546,12 @@ StatusCode ParticleDecayer::getDecayProducts( CLHEP::HepLorentzVector parentLV,
    //Get the angles in the rest frame
    double phi_rf   = rnd_DoubleRange(-CLHEP::pi, CLHEP::pi); 
    double ct_rf    = cosgen(decayType);
-   double theta_rf = acos(ct_rf);
+   double theta_rf = std::acos(ct_rf);
 
    //construct p1 particle momentum in rest-frame (_rf)
    double p1_rf = sqrt(parentMass*parentMass/4. - decayPartMass*decayPartMass);
-   double px_rf = p1_rf*cos(phi_rf)*sin(theta_rf);
-   double py_rf = p1_rf*sin(phi_rf)*sin(theta_rf);
+   double px_rf = p1_rf*std::cos(phi_rf)*std::sin(theta_rf);
+   double py_rf = p1_rf*std::sin(phi_rf)*std::sin(theta_rf);
    double pz_rf = p1_rf*ct_rf;
    CLHEP::HepLorentzVector hlv1(  px_rf,  py_rf,  pz_rf, parentMass/2.);
    CLHEP::HepLorentzVector hlv2( -px_rf, -py_rf, -pz_rf, parentMass/2.);
diff --git a/Generators/Pythia8B_i/Pythia8B_i/BsJpsiPhiAngles.h b/Generators/Pythia8B_i/Pythia8B_i/BsJpsiPhiAngles.h
index 61004ced041d3fe5d8b9a3e45d1551ee450a43c4..302a6759d998f40fb9b4c19d2ca73491034f0f44 100644
--- a/Generators/Pythia8B_i/Pythia8B_i/BsJpsiPhiAngles.h
+++ b/Generators/Pythia8B_i/Pythia8B_i/BsJpsiPhiAngles.h
@@ -6,8 +6,6 @@
 #define BsJpsiPhiAngles_H
 
 #include "CLHEP/Vector/LorentzVector.h"
-//using namespace CLHEP;
-//double thispi = 3.14159265358979312e+00;
 class BsJpsiPhiAngles{
 
   
diff --git a/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h b/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h
index 7bc39f5ed693ab02489243a110c5c42e1b8f5518..248d7b193799dee1ba4dec4a8c15c632dcf49982 100644
--- a/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h
+++ b/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h
@@ -65,18 +65,18 @@ double BsJpsiPhi_PDF(double *params, double *x, bool useHelicity) {
   double A[10], B1[10], B2[10], C[10];
 	
   // Define A cells
-  double sinphiS = sin(phiS);
-  double cosphiS = cos(phiS);
+  double sinphiS = std::sin(phiS);
+  double cosphiS = std::cos(phiS);
 	
   A[0] = 0.5 * A0*A0;
   A[1] = 0.5 * Al*Al;
   A[2] = 0.5 * Ap*Ap;
-  A[3] = 0.5 * A0*Al * cos(delta_l);
+  A[3] = 0.5 * A0*Al * std::cos(delta_l);
   A[4] = Al*Ap;
   A[5] = A0*Ap;
   A[6] = 0.5 * As*As;
   A[7] = As*Al;
-  A[8] = 0.5 * As*Ap * sin(delta_p - delta_s);
+  A[8] = 0.5 * As*Ap * std::sin(delta_p - delta_s);
   A[9] = As*A0;
 
 
@@ -96,21 +96,21 @@ double BsJpsiPhi_PDF(double *params, double *x, bool useHelicity) {
  
 
     // Calculate convolution of exp(-gammaL * time) with a gaussian. Not convoluted if sigma == 0.
-    double ExpGL = exp(-time * gammaL);
+    double ExpGL = std::exp(-time * gammaL);
 
     // Calculate convolution of exp(-gammaH * time) with a gaussian. Not convoluted if sigma == 0.		
-    double ExpGH = exp(-time * gammaH);	
+    double ExpGH = std::exp(-time * gammaH);	
 
     B1[0] = ( (1. + cosphiS) * ExpGL + (1. - cosphiS) * ExpGH ) * norm1;
     B1[1] = B1[0];
     B1[2] = ( (1. - cosphiS) * ExpGL + (1. + cosphiS) * ExpGH ) * norm2;
     B1[3] = B1[0];
-    B1[4] = 0.5 * cos(delta_p - delta_l) * sinphiS * (ExpGL - ExpGH) * norm3;
-    B1[5] = 0.5 * cos(delta_p) * sinphiS * (ExpGL - ExpGH) * norm3;
+    B1[4] = 0.5 * std::cos(delta_p - delta_l) * sinphiS * (ExpGL - ExpGH) * norm3;
+    B1[5] = 0.5 * std::cos(delta_p) * sinphiS * (ExpGL - ExpGH) * norm3;
     B1[6] = B1[2];
-    B1[7] = 0.5 * sinphiS * sin(delta_l - delta_s) * (ExpGL - ExpGH) * norm3;
+    B1[7] = 0.5 * sinphiS * std::sin(delta_l - delta_s) * (ExpGL - ExpGH) * norm3;
     B1[8] = B1[2];
-    B1[9] = 0.5 * sinphiS * sin(delta_s) * (ExpGH - ExpGL) * norm3;
+    B1[9] = 0.5 * sinphiS * std::sin(delta_s) * (ExpGH - ExpGL) * norm3;
 
   
 
@@ -120,20 +120,20 @@ double BsJpsiPhi_PDF(double *params, double *x, bool useHelicity) {
   if( std::abs(tagprob - 0.5) > 1e-6 ){   
 
 
-    ExpGSSinMT = exp(-time * GammaS) * sin(DeltaM * time);
-    ExpGSCosMT = exp(-time * GammaS) * cos(DeltaM * time);
+    ExpGSSinMT = std::exp(-time * GammaS) * sin(DeltaM * time);
+    ExpGSCosMT = std::exp(-time * GammaS) * cos(DeltaM * time);
 
 
     B2[0] = 2. * ExpGSSinMT * sinphiS * norm1;
     B2[1] = B2[0];
     B2[2] = -2. * ExpGSSinMT * sinphiS * norm2;
     B2[3] = B2[0];
-    B2[4] = ( ExpGSCosMT * sin(delta_p - delta_l) - cosphiS * cos(delta_p - delta_l) * ExpGSSinMT ) * norm3;
-    B2[5] = ( ExpGSCosMT * sin(delta_p) - cosphiS * cos(delta_p) * ExpGSSinMT ) * norm3;
+    B2[4] = ( ExpGSCosMT * std::sin(delta_p - delta_l) - cosphiS * cos(delta_p - delta_l) * ExpGSSinMT ) * norm3;
+    B2[5] = ( ExpGSCosMT * std::sin(delta_p) - cosphiS * std::cos(delta_p) * ExpGSSinMT ) * norm3;
     B2[6] = B2[2];
-    B2[7] = ( ExpGSCosMT * cos(delta_l - delta_s) - cosphiS * sin(delta_l - delta_s) * ExpGSSinMT ) * norm3;
+    B2[7] = ( ExpGSCosMT * std::cos(delta_l - delta_s) - cosphiS * sin(delta_l - delta_s) * ExpGSSinMT ) * norm3;
     B2[8] = B2[2];
-    B2[9] = ( ExpGSCosMT * cos(delta_s) + cosphiS * sin(delta_s) * ExpGSSinMT ) * norm3;
+    B2[9] = ( ExpGSCosMT * std::cos(delta_s) + cosphiS * std::sin(delta_s) * ExpGSSinMT ) * norm3;
 
   } // End of tagged terms
   else{
@@ -153,13 +153,13 @@ double BsJpsiPhi_PDF(double *params, double *x, bool useHelicity) {
       double sinsqthetal = 1. - (costhetal * costhetal);
       double sinsqthetak = 1. - (costhetak * costhetak);
       double cossqthetak = costhetak * costhetak;
-      double coschi = cos(chi);
+      double coschi = std::cos(chi);
       double cossqchi = coschi * coschi;
-      double sinchi = sin(chi);
+      double sinchi = std::sin(chi);
       double sinsqchi = sinchi * sinchi;
-      double sin2thetak = 2. * sqrt(1. - costhetak * costhetak) * costhetak;
-      double sin2thetal = 2. * sqrt(1. - costhetal * costhetal) * costhetal;
-      double sin2chi = sin(2. * chi);
+      double sin2thetak = 2. * std::sqrt(1. - costhetak * costhetak) * costhetak;
+      double sin2thetal = 2. * std::sqrt(1. - costhetal * costhetal) * costhetal;
+      double sin2chi = std::sin(2. * chi);
       double sinthetak = sqrt(sinsqthetak);
 
       C[0] = 2. * cossqthetak * sinsqthetal; //cossqpsi * (1. - sinsqtheta * cossqphi);
@@ -184,14 +184,14 @@ double BsJpsiPhi_PDF(double *params, double *x, bool useHelicity) {
       double sinsqtheta   = 1. - (costheta * costheta);
       double sinsqpsi     = 1. - (cospsi * cospsi);
       double cossqpsi     = cospsi * cospsi;
-      double sin2theta    = 2. * sqrt(1. - costheta * costheta) * costheta;
-      double sin2psi      = 2. * sqrt(1. - cospsi * cospsi) * cospsi;
-      double cosphi       = cos(phi);
+      double sin2theta    = 2. * std::sqrt(1. - costheta * costheta) * costheta;
+      double sin2psi      = 2. * std::sqrt(1. - cospsi * cospsi) * cospsi;
+      double cosphi       = std::cos(phi);
       double cossqphi     = cosphi * cosphi;
-      double sinphi       = sin(phi);
+      double sinphi       = std::sin(phi);
       double sinsqphi     = sinphi * sinphi;
-      double sin2phi      = sin(2. * phi);
-      double sinpsi       = sqrt(1. - cospsi*cospsi);
+      double sin2phi      = std::sin(2. * phi);
+      double sinpsi       = std::sqrt(1. - cospsi*cospsi);
   		
       C[0] = 2. * cossqpsi * (1. - sinsqtheta * cossqphi);
       C[1] = sinsqpsi * (1.-sinsqtheta * sinsqphi);
diff --git a/Generators/Pythia8_i/CMakeLists.txt b/Generators/Pythia8_i/CMakeLists.txt
index f192a8c97b097e980494812c5747091d78ffb9ee..23528794ad70bfc402c6ae0a132a653ec40f9958 100644
--- a/Generators/Pythia8_i/CMakeLists.txt
+++ b/Generators/Pythia8_i/CMakeLists.txt
@@ -26,7 +26,11 @@ add_definitions(-DPY8INCLUDE_DIR=\"${PYTHIA8_INCLUDE_DIR}\")
 
 # Remove the --as-needed linker flags:
 atlas_disable_as_needed()
-
+if (HEPMC3_USE)
+set( HEPMC_PYTHIA8_INTERFACE_DIR ${HEPMC3_INCLUDE_DIR}/../share/HepMC3/interfaces/pythia8/include/Pythia8)
+else()
+set( HEPMC_PYTHIA8_INTERFACE_DIR ${PYTHIA8_INCLUDE_DIRS})
+endif()
 # Component(s) in the package:
 atlas_add_library( Pythia8_iLib
                    src/Pythia8_i.cxx
@@ -55,14 +59,14 @@ atlas_add_library( Pythia8_iLib
                    src/UserResonances/ResonanceExcitedCI.cxx
                    src/UserResonances/ResonanceLQ.cxx
                    PUBLIC_HEADERS Pythia8_i
-                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${LHAPDF_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${LHAPDF_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS} ${HEPMC_PYTHIA8_INTERFACE_DIR}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES ${Boost_LIBRARIES} ${LHAPDF_LIBRARIES} ${CLHEP_LIBRARIES} ${PYTHIA8_LIBRARIES} AthenaKernel GeneratorModulesLib
                    PRIVATE_LINK_LIBRARIES GaudiKernel GeneratorObjects PathResolver )
 
 atlas_add_component( Pythia8_i
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${LHAPDF_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS}
+                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${LHAPDF_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS} ${HEPMC_PYTHIA8_INTERFACE_DIR}
                      LINK_LIBRARIES ${Boost_LIBRARIES} ${LHAPDF_LIBRARIES} ${CLHEP_LIBRARIES} ${PYTHIA8_LIBRARIES} AthenaKernel GeneratorModulesLib GaudiKernel GeneratorObjects PathResolver Pythia8_iLib )
 
 # Install files from the package:
diff --git a/Generators/Pythia8_i/Pythia8_i/Pythia8_i.h b/Generators/Pythia8_i/Pythia8_i/Pythia8_i.h
index 742ad9c74e9d596a0cfae83186755a9c051da7e1..a5f8ac5c417bff0cd049cb896951b9f51035bf1a 100644
--- a/Generators/Pythia8_i/Pythia8_i/Pythia8_i.h
+++ b/Generators/Pythia8_i/Pythia8_i/Pythia8_i.h
@@ -10,7 +10,7 @@
 #include "Pythia8/Pythia.h"
 //#include "Pythia8/../Pythia8Plugins/HepMC2.h"
 #ifdef HEPMC3
-#include "AtlasHepMC/Pythia8ToHepMC3.h"
+#include "Pythia8ToHepMC3.h"
 namespace HepMC {
 typedef HepMC3::Pythia8ToHepMC3	Pythia8ToHepMC;	
 }
diff --git a/Generators/Pythia8_i/src/UserHooks/PowhegBB4L.cxx b/Generators/Pythia8_i/src/UserHooks/PowhegBB4L.cxx
index 29efbb86061b173160b0b7b6ca3d92d546ab73e8..9ee0d643c53144ba6d969fdd59b91943f5452af5 100644
--- a/Generators/Pythia8_i/src/UserHooks/PowhegBB4L.cxx
+++ b/Generators/Pythia8_i/src/UserHooks/PowhegBB4L.cxx
@@ -114,13 +114,13 @@ public:
 	inline double qSplittingScale(Vec4 pt, Vec4 p1, Vec4 p2){
 		p1.bstback(pt);
 		p2.bstback(pt);
-		return sqrt( 2*p1*p2*p2.e()/p1.e() );
+		return std::sqrt( 2*p1*p2*p2.e()/p1.e() );
 	}
 
 	inline double gSplittingScale(Vec4 pt, Vec4 p1, Vec4 p2){
 		p1.bstback(pt);
 		p2.bstback(pt);		
-		return sqrt( 2*p1*p2*p1.e()*p2.e()/(pow(p1.e(),2)+pow(p2.e(),2)) );
+		return std::sqrt( 2*p1*p2*p1.e()*p2.e()/(std::pow(p1.e(),2)+std::pow(p2.e(),2)) );
 	}
 
 
diff --git a/Generators/Pythia8_i/src/UserHooks/WprimeWZFlat.cxx b/Generators/Pythia8_i/src/UserHooks/WprimeWZFlat.cxx
index 1c61b8296b3beaf36d3b4a8b1598b68566f2ac84..de6b3eb6b9096797509aa4acfa2f9dae14611029 100644
--- a/Generators/Pythia8_i/src/UserHooks/WprimeWZFlat.cxx
+++ b/Generators/Pythia8_i/src/UserHooks/WprimeWZFlat.cxx
@@ -56,9 +56,9 @@ namespace Pythia8 {
       if(mFrac > 0.6) return breitWignerDenom(0.6);
       
       if(mFrac < 0.0425) return 1e-12/(-1.293+1.098e+2*mFrac-2.800e+3*mFrac*mFrac+2.345e+4*mFrac*mFrac*mFrac);
-      if(mFrac < 0.073) return 1.248e-12*(exp(1.158+18.34*mFrac));
+      if(mFrac < 0.073) return 1.248e-12*(std::exp(1.158+18.34*mFrac));
       
-      return 5.733e-10*pow(mFrac,-3.798-0.6555*log(mFrac))/pow(1.427-mFrac,30.017);
+      return 5.733e-10*std::pow(mFrac,-3.798-0.6555*std::log(mFrac))/std::pow(1.427-mFrac,30.017);
     }
     
   };  
diff --git a/HLT/HLTUtils/share/make_hlt_rep.py b/HLT/HLTUtils/share/make_hlt_rep.py
index ab74742d0fa8a067cfcc64aad7130569d1fbb224..1d4ece4677e5fc340f56f694f6025261043a1dd5 100755
--- a/HLT/HLTUtils/share/make_hlt_rep.py
+++ b/HLT/HLTUtils/share/make_hlt_rep.py
@@ -1,9 +1,13 @@
 #!/usr/bin/env python
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 import optparse
 import os
 
+# Make sure getoutput() is in the subprocess module.
+from future import standard_library
+standard_library.install_aliases()
+
 import pm.project
 import pm.common
 
diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx
index cd56cc19a0e912eec1b027e482e1e0d141400714..86286ece89803281541b1110befe5ca3134a2676 100644
--- a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx
@@ -387,6 +387,7 @@ void HltROBDataProviderSvc::getROBData(const EventContext& context,
 
   // return all the requested ROB fragments from the cache
   robFragments.clear() ;
+  robIds_missing.clear() ;
   eventCache_checkRobListToCache(cache, robIds, robFragments, robIds_missing) ;
 }
 
diff --git a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/run/MyJobOptions.py b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/run/MyJobOptions.py
index fb73d13ae8350f6c44e161eea9f079548798cdae..55489f8e831f0853206be7e4e883e970252c8464 100755
--- a/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/run/MyJobOptions.py
+++ b/InnerDetector/InDetAlignTools/InDetSurveyConstraintTool/run/MyJobOptions.py
@@ -235,7 +235,7 @@ ToolSvc.InDetSurveyDBTool.DBRoot="/Indet/SiSurvey"
 #ToolSvc.CondStream1.OutputFile="MisalignPixECModuleRand.root"
   
 # Select the appropriate shared library
-theApp.DLLs += [ "RootHistCnv" ]
+theApp.Dlls += [ "RootHistCnv" ]
 # Select HBOOK or ROOT persistency 
 theApp.HistogramPersistency = "ROOT"
 HistogramPersistencySvc = Service( "HistogramPersistencySvc" ) 
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt
index dee71b27797418209eadd2038666df48af6a0fc8..1fbcc828bdc5c528555263b90e892af53cd54a16 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt
@@ -41,7 +41,7 @@ atlas_add_component( TRT_CalibAlgs
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps StoreGateLib SGtests xAODEventInfo GaudiKernel TrkToolInterfaces CommissionEvent AthContainers Identifier xAODTracking TRT_ConditionsData TRT_ConditionsServicesLib InDetIdentifier InDetRawData InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkTrack VxVertex TrkFitterInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps StoreGateLib SGtests xAODEventInfo GaudiKernel TrkToolInterfaces CommissionEvent AthContainers Identifier xAODTracking TRT_ConditionsData TRT_ConditionsServicesLib InDetIdentifier InDetRawData InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkTrack VxVertex TrkFitterInterfaces TRT_TrackHoleSearchLib TRT_ElectronPidToolsLib TRT_CalibToolsLib )
 
 # Install files from the package:
 atlas_install_headers( TRT_CalibAlgs )
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/CMakeLists.txt b/InnerDetector/InDetCalibTools/TRT_CalibTools/CMakeLists.txt
index 51fc055dd0e61315d142bdcec142f98494c0758e..7a176f8badfe51faea5727bac84e4c7ac6093a5d 100644
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/CMakeLists.txt
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/CMakeLists.txt
@@ -41,13 +41,17 @@ atlas_depends_on_subdirs( PUBLIC
 find_package( CLHEP )
 find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
 
+atlas_add_library( TRT_CalibToolsLib
+                   TRT_CalibTools/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS TRT_CalibTools
+                   LINK_LIBRARIES GaudiKernel TRT_CalibData Identifier xAODEventInfo xAODTracking )
+
 # Component(s) in the package:
 atlas_add_component( TRT_CalibTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} Identifier GaudiKernel InDetRawData CommissionEvent AthenaBaseComps CxxUtils StoreGateLib AtlasDetDescr EventPrimitives xAODEventInfo xAODTracking TRT_ConditionsData TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData InDetRIO_OnTrack TrkEventPrimitives TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkToolInterfaces TRT_DriftFunctionToolLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TRT_CalibToolsLib InDetRawData CommissionEvent AthenaBaseComps CxxUtils StoreGateLib AtlasDetDescr EventPrimitives TRT_ConditionsData TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData InDetRIO_OnTrack TrkEventPrimitives TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkToolInterfaces TRT_DriftFunctionToolLib TRT_DriftCircleToolLib )
 
-# Install files from the package:
-atlas_install_headers( TRT_CalibTools )
 
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
index 9616e6c23a20473870d3b61d08366c6c25899c77..b28499e81e0170caf03d55d35454b3eb37a05201 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
@@ -342,11 +342,13 @@ def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs):
 
     if not hasattr(condSeq, "PixelDCSCondStateAlg"):
         from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStateAlg
-        condSeq += PixelDCSCondStateAlg(name="PixelDCSCondStateAlg")
+        condSeq += PixelDCSCondStateAlg(name="PixelDCSCondStateAlg",
+                                        ReadKeyState = '')
 
     if not hasattr(condSeq, "PixelDCSCondStatusAlg"):
         from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStatusAlg
-        condSeq += PixelDCSCondStatusAlg(name="PixelDCSCondStatusAlg")
+        condSeq += PixelDCSCondStatusAlg(name="PixelDCSCondStatusAlg",
+                                         ReadKeyStatus = '')
 
     if not conddb.folderRequested("/PIXEL/DCS/HV"):
         conddb.addFolder("DCS_OFL", "/PIXEL/DCS/HV", className="CondAttrListCollection")
@@ -395,13 +397,16 @@ def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs):
         from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelReadoutSpeedAlg
         condSeq += PixelReadoutSpeedAlg(name="PixelReadoutSpeedAlg")
 
+    pixelReadKey = ''
     if (globalflags.DataSource=='data' and conddb.dbdata == 'CONDBR2'):  # for data overlay
+        pixelReaddKey = '/PIXEL/CablingMap'
         if not conddb.folderRequested("/PIXEL/CablingMap"):
             conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/CablingMap","/PIXEL/CablingMap", className="AthenaAttributeList")
 
     if not hasattr(condSeq, 'PixelCablingCondAlg'):
         from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelCablingCondAlg
         condSeq += PixelCablingCondAlg(name="PixelCablingCondAlg",
+                                       ReadKey = pixelReadKey,
                                        MappingFile=IdMappingDat,
                                        RodIDForSingleLink40=0)
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
index 7b6025a7cbdc4c4a933d9f56208cc72db38a7ca1..584034897969d1428e564ba6038b678203d11ab7 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
@@ -1,3 +1,3 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
 #include "IOVSvc/IOVSvc.txt"
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p1_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p1_test.ref
index d10115b91fc610566aa1627744b65731d70acadc..466649f62ccfba18a0796bde376e575a12e321e3 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p1_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3d/InnerDetector/InDetEventCnv/InDetEventTPCnv/run/../share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p2_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p2_test.ref
index 34f8b645497baed227c4a7f9930ea0c9dc7c9f33..730219da83487a4fcd5a3f62bbf5112cba42a2e0 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p2_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p3_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p3_test.ref
index 55bcb330faed85b405ef95968bc86b1719e5896e..374edeeeb21e527526a251d364b460229a1410a2 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p3_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelClusterContainerCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelGangedClusterAmbiguitiesCnv_p1_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelGangedClusterAmbiguitiesCnv_p1_test.ref
index 9d41e2b4bcb5242e933490212268f7d7fa40811a..e79e437d075daecdbcf8fb7cde78533ee4dd18d5 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelGangedClusterAmbiguitiesCnv_p1_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/PixelGangedClusterAmbiguitiesCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p2_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p2_test.ref
index 8dd528eedd7f4862137b66086d1d2d876520383b..24cbc064b95a8c4caf9f0742f0fc29c277c23770 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p2_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p3_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p3_test.ref
index 8dd528eedd7f4862137b66086d1d2d876520383b..24cbc064b95a8c4caf9f0742f0fc29c277c23770 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p3_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/SCT_ClusterContainerCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/TRT_DriftCircleContainerCnv_p2_test.ref b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/TRT_DriftCircleContainerCnv_p2_test.ref
index 9ea2c8d3be1c6b7d7e007dc57360daf6ca84b27a..93ba26f5c9e0a87faafae41e9495d3b96da54db0 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/TRT_DriftCircleContainerCnv_p2_test.ref
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/share/TRT_DriftCircleContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/InDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/InDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/InDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py
index 32e30a0b5a19c4f4a237ed8d762de7d12d3d8d45..3d39236e4b83d7bafd950dde1ab7c498481f511e 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/share/Pixel_main.py
@@ -111,12 +111,6 @@ if not ('doWriteBS' in dir() and doWriteBS):
 ServiceMgr.StoreGateSvc.ActivateHistory = False
 ServiceMgr.StoreGateSvc.Dump            = False
 
-# ------------------------------------------------------------
-# get stack dump
-# ------------------------------------------------------------
-
-ServiceMgr.CoreDumpSvc.FatalHandler = 438
-
 # ------------------------------------------------------------
 # Use auditors
 # ------------------------------------------------------------
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt
index 8ef12ddaab748e04cba3f27a770c80c0800cfe19..70feff1e74eec85a69f1cf1b88377c280797596a 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt
@@ -29,12 +29,18 @@ atlas_depends_on_subdirs( PUBLIC
 # External dependencies:
 find_package( tdaq-common COMPONENTS eformat_write DataWriter )
 
+atlas_add_library( SCT_RawDataByteStreamCnvLib
+                   SCT_RawDataByteStreamCnv/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS SCT_RawDataByteStreamCnv
+                   LINK_LIBRARIES GaudiKernel InDetRawData ByteStreamCnvSvcBaseLib ByteStreamData InDetByteStreamErrors )
+
 # Component(s) in the package:
 atlas_add_component( SCT_RawDataByteStreamCnv
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_ReadoutGeometry SCT_CablingLib TrigSteeringEvent SCT_ConditionsData SCT_ConditionsToolsLib )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} SCT_RawDataByteStreamCnvLib ByteStreamData_test AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_ReadoutGeometry SCT_CablingLib TrigSteeringEvent SCT_ConditionsData SCT_ConditionsToolsLib )
 
 # Run tests:
 atlas_add_test( TestSCTDecode
@@ -50,5 +56,4 @@ atlas_add_test( TestSCTEncode
                 ENVIRONMENT THREADS=1 )
 
 # Install files from the package:
-atlas_install_headers( SCT_RawDataByteStreamCnv )
 atlas_install_joboptions( share/*.py )
diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/CMakeLists.txt b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/CMakeLists.txt
index 635ed7f146826a49f1a55aa3ed41b81259dc5881..add2b83c793da5092b35f2cda4084296b5ca90f8 100644
--- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/CMakeLists.txt
+++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/CMakeLists.txt
@@ -34,12 +34,18 @@ find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( tdaq-common COMPONENTS eformat_write DataWriter )
 
+atlas_add_library( TRT_RawDataByteStreamCnvLib
+                   TRT_RawDataByteStreamCnv/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS TRT_RawDataByteStreamCnv
+                   LINK_LIBRARIES AthenaBaseComps ByteStreamData InDetRawData Identifier InDetIdentifier TRT_CablingLib  )
+
 # Component(s) in the package:
 atlas_add_component( TRT_RawDataByteStreamCnv
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${COOL_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps Identifier ByteStreamData ByteStreamData_test InDetRawData AthenaKernel CxxUtils StoreGateLib SGtests AthenaPoolUtilities ByteStreamCnvSvcBaseLib GaudiKernel TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry PathResolver IRegionSelector TrigSteeringEvent TRT_CablingLib InDetByteStreamErrors )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${COOL_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} TRT_RawDataByteStreamCnvLib ByteStreamData_test AthenaKernel CxxUtils
+                     StoreGateLib SGtests AthenaPoolUtilities ByteStreamCnvSvcBaseLib GaudiKernel TRT_ConditionsServicesLib InDetReadoutGeometry TRT_ReadoutGeometry PathResolver IRegionSelector TrigSteeringEvent InDetByteStreamErrors )
 
 # Install files from the package:
-atlas_install_headers( TRT_RawDataByteStreamCnv )
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredSecVertexFinding.py b/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredSecVertexFinding.py
index bca989125e5f3b5766e591f8885d26fcfec87f4c..af37ac352856130bdf860c7aac87e3e2cc0bbb23 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredSecVertexFinding.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredSecVertexFinding.py
@@ -11,184 +11,199 @@ from __future__ import print_function
 
 class ConfiguredSecVertexFinding:
 
-  def __init__(self,
-               prefix            = "",
-               VertexCuts        = None,
-               TrackParticles    = None,
-               SecVertices       = None,
-               Extrapolator      = None,
-               TrackSummaryTool  = None,
-               MagFieldSvc       = None,
-               printConfig       = False):
-               
-    # get ToolSvc and topSequence
-    from AthenaCommon.AppMgr import ToolSvc
-    from AthenaCommon.AlgSequence import AlgSequence
-    topSequence = AlgSequence()
-    # get InDetFlags
-    from InDetRecExample.InDetJobProperties import InDetFlags
-    
-    #
-    # --- load vertex fitter
-    #
-    from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
-    InDetSecVxFitterTool = Trk__TrkVKalVrtFitter(name                = prefix+"Fitter",
-                                                 Extrapolator        = Extrapolator,
-                                                 IterationNumber     = VertexCuts.Fitter_IterationNumber(),
-                                                 MakeExtendedVertex  = VertexCuts.Fitter_MakeExtendedVertex(),
-                                                 FirstMeasuredPoint  = VertexCuts.Fitter_FirstMeasuredPoint(),
-                                                 Robustness          = VertexCuts.Fitter_Robustness(),
-                                                 InputParticleMasses = VertexCuts.Fitter_InputParticleMasses(),
-                                                 VertexForConstraint = VertexCuts.Fitter_VertexForConstraint(),
-                                                 CovVrtForConstraint = VertexCuts.Fitter_CovVrtForConstraint(),
-                                                 FirstMeasuredPointLimit = VertexCuts.FirstMeasuredPointLimit(),
-                                                 usePhiCnst          = VertexCuts.usePhiCnst(),
-                                                 useThetaCnst        = VertexCuts.useThetaCnst())
-    ToolSvc += InDetSecVxFitterTool 
-    if (printConfig):
-      print(InDetSecVxFitterTool)
-    #
-    # --- Distance of minimum approach utility
-    #
-    from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__SeedNewtonTrkDistanceFinder
-    InDetSecVxTrkDistanceFinder = Trk__SeedNewtonTrkDistanceFinder(name = prefix+'TrkDistanceFinder')
-    ToolSvc += InDetSecVxTrkDistanceFinder 
-    if (printConfig):
-      print(InDetSecVxTrkDistanceFinder)
-    #
-    # --- Helper Tool
-    #
-    from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionFinderUtils
-    InDetSecVxHelper = InDet__ConversionFinderUtils(name = prefix+"FinderUtils")
-    ToolSvc += InDetSecVxHelper
-    if (printConfig):
-      print(InDetSecVxHelper)
-    #
-    # --- Track selector tool
-    #
-    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetConversionTrackSelectorTool
-    InDetSecVxTrackSelector = InDet__InDetConversionTrackSelectorTool(name             = prefix+"TrackSelector",
-                                                                      TrackSummaryTool = TrackSummaryTool,
-                                                                      Extrapolator     = Extrapolator, 
-                                                                      maxSiD0          = VertexCuts.TrkSel_maxSiD0(),
-                                                                      maxTrtD0         = VertexCuts.TrkSel_maxTrtD0(),
-                                                                      maxSiZ0          = VertexCuts.TrkSel_maxSiZ0(),
-                                                                      maxTrtZ0         = VertexCuts.TrkSel_maxTrtZ0(),
-                                                                      minPt            = VertexCuts.TrkSel_minPt(),
-                                                                      RatioCut1        = VertexCuts.TrkSel_RatioCut1(),
-                                                                      RatioCut2        = VertexCuts.TrkSel_RatioCut2(),
-                                                                      RatioCut3        = VertexCuts.TrkSel_RatioCut3(),
-                                                                      RatioTRT         = VertexCuts.TrkSel_RatioTRT(),
-                                                                      IsConversion     = VertexCuts.TrkSel_IsConversion(),
-                                                                      significanceD0_Si= VertexCuts.TrkSel_significanceD0_Si(),
-                                                                      RatioV0          = VertexCuts.TrkSel_RatioV0())
-    
-    ToolSvc += InDetSecVxTrackSelector
-    if (printConfig):
-      print(InDetSecVxTrackSelector)
-    #
-    # Track pairs selector
-    #
-    from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__TrackPairsSelector
-    InDetSecVxTrackPairsSelector = InDet__TrackPairsSelector(name                       = prefix+"TrackPairsSelector",
-                                                             ConversionFinderHelperTool = InDetSecVxHelper,
-                                                             DistanceTool               = InDetSecVxTrkDistanceFinder,
-                                                             MaxFirstHitRadius          = VertexCuts.TrkPairSel_MaxFirstHitRadius(),
-                                                             MaxDistBetweenTracks       = VertexCuts.TrkPairSel_MaxDistBetweenTracks(),
-                                                             MaxEta                     = VertexCuts.TrkPairSel_MaxEta(),
-                                                             MaxInitDistance            = VertexCuts.TrkPairSel_MaxInitDistance(),
-                                                             MinTrackAngle              = VertexCuts.TrkPairSel_MinTrackAngle())
-    ToolSvc += InDetSecVxTrackPairsSelector
-    if (printConfig):
-      print(InDetSecVxTrackPairsSelector)
-    #
-    # Vertex point estimator
-    #
-    from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
-    InDetSecVtxPointEstimator = InDet__VertexPointEstimator(name      = prefix+"PointEstimator",
-                                                            MinDeltaR = VertexCuts.VtxPt_MinDeltaR(),
-                                                            MaxDeltaR = VertexCuts.VtxPt_MaxDeltaR(),
-                                                            MaxPhi    = VertexCuts.VtxPt_MaxPhi())
-    ToolSvc += InDetSecVtxPointEstimator
-    if (printConfig):
-      print(InDetSecVtxPointEstimator)
-    #
-    # Secondary Vertex post selector
-    #
-    from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionPostSelector
-    InDetSecVtxPostSelector = InDet__ConversionPostSelector(name             = prefix+"PostSelector",
-                                                            MaxChi2Vtx       = VertexCuts.SecVtxPost_MaxChi2Vtx(),
-                                                            MaxInvariantMass = VertexCuts.SecVtxPost_MaxInvariantMass(),
-                                                            MinFitMomentum   = VertexCuts.SecVtxPost_MinFitMomentum(),
-                                                            MinRadius        = VertexCuts.SecVtxPost_MinRadius(),
-                                                            MinPt            = VertexCuts.SecVtxPost_MinPt(),
-                                                            MaxdR            = VertexCuts.SecVtxPost_MaxdR(),
-                                                            MaxPhiVtxTrk     = VertexCuts.SecVtxPost_MaxPhiVtxTrk())
-    ToolSvc += InDetSecVtxPostSelector
-    if (printConfig):
-      print(InDetSecVtxPostSelector)
-    #
-    # Single track secondary vertex tool
-    #
-    from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__SingleTrackConversionTool
-    InDetSingleTrackSecVtx = InDet__SingleTrackConversionTool(name                       = prefix+"SingleTrackTool",
-                                                              ConversionFinderHelperTool = InDetSecVxHelper,
-                                                              TrackSummaryTool           = TrackSummaryTool,
-                                                              Extrapolator               = Extrapolator,
-                                                              MaxBLayerHits              = VertexCuts.SingleTrk_MaxBLayerHits(),
-                                                              MinInitialHitRadius        = VertexCuts.SingleTrk_MinInitialHitRadius(),
-                                                              MinInitialHitRadius_noBlay = VertexCuts.SingleTrk_MinInitialHitRadius_noBlay(),
-                                                              MinRatioOfHLhits           = VertexCuts.SingleTrk_MinRatioOfHLhits())
-    ToolSvc += InDetSingleTrackSecVtx
-    if (printConfig):
-      print(InDetSingleTrackSecVtx)
-    #
-    # conversion finder tool
-    #
-    from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools
-    InDetSecVtxFinderTool = InDet__InDetConversionFinderTools(name                       = prefix+"FinderTool",
-                                                              VertexFitterTool           = InDetSecVxFitterTool,
-                                                              TrackSelectorTool          = InDetSecVxTrackSelector,
-                                                              TrackPairsSelector         = InDetSecVxTrackPairsSelector,
-                                                              VertexPointEstimator       = InDetSecVtxPointEstimator,
-                                                              PostSelector               = InDetSecVtxPostSelector,
-                                                              SingleTrackConversionTool  = InDetSingleTrackSecVtx,
-                                                              Extrapolator               = Extrapolator,
-                                                              TrackParticleCollection    = TrackParticles,
-                                                              RemoveTrtTracks            = VertexCuts.Finder_RemoveTrtTracks(),
-                                                              IsConversion               = VertexCuts.Finder_IsConversion(),
-                                                              MinDistVtxHit              = VertexCuts.Finder_MinDistVtxHit(),
-                                                              MaxDistVtxHit              = VertexCuts.Finder_MaxDistVtxHit(),
-                                                              MinFlightAngle             = VertexCuts.Finder_MinFlightAngle(),
-                                                              MinInitVtxR                = VertexCuts.Finder_MinInitVtxR())
-    ToolSvc += InDetSecVtxFinderTool
-    if (printConfig):
-      print(InDetSecVtxFinderTool)
+    def __init__(self,
+                 prefix="",
+                 VertexCuts=None,
+                 TrackParticles=None,
+                 SecVertices=None,
+                 Extrapolator=None,
+                 TrackSummaryTool=None,
+                 MagFieldSvc=None,
+                 printConfig=False):
 
-    # --- remember instances
-    self.__prefix                = prefix 
-    self.__InDetSecVtxFinderTool = InDetSecVtxFinderTool
-    self.__TrackParticles        = TrackParticles
-    self.__SecVertices           = SecVertices
-    self.__printConfig           = printConfig
-    self.__topSequence           = topSequence
-    
-  def toolInstance(self):
-    #
-    # --- return tool for usage in egamma
-    #
-    return self.__InDetSecVtxFinderTool
+        # get ToolSvc and topSequence
+        from AthenaCommon.AppMgr import ToolSvc
+        from AthenaCommon.AlgSequence import AlgSequence
+        topSequence = AlgSequence()
 
-  def addAlgorithm(self):
-    #
-    # --- add driving algorithm of usage in InDet
-    #
-    from InDetConversionFinder.InDetConversionFinderConf import InDet__ConversionFinder
-    InDetSecVtxFinder = InDet__ConversionFinder(name                      = self.__prefix+"Finder",
-                                                VertexFinderTool          = self.__InDetSecVtxFinderTool,
-                                                TracksName                = self.__TrackParticles,
-                                                InDetConversionOutputName = self.__SecVertices)
-    self.__topSequence += InDetSecVtxFinder
-    if (self.__printConfig):
-      print(InDetSecVtxFinder)
+        #
+        # --- load vertex fitter
+        #
+        from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
+        InDetSecVxFitterTool = Trk__TrkVKalVrtFitter(
+            name=prefix+"Fitter",
+            Extrapolator=Extrapolator,
+            IterationNumber=VertexCuts.Fitter_IterationNumber(),
+            MakeExtendedVertex=VertexCuts.Fitter_MakeExtendedVertex(),
+            FirstMeasuredPoint=VertexCuts.Fitter_FirstMeasuredPoint(),
+            Robustness=VertexCuts.Fitter_Robustness(),
+            InputParticleMasses=VertexCuts.Fitter_InputParticleMasses(),
+            VertexForConstraint=VertexCuts.Fitter_VertexForConstraint(),
+            CovVrtForConstraint=VertexCuts.Fitter_CovVrtForConstraint(),
+            FirstMeasuredPointLimit=VertexCuts.FirstMeasuredPointLimit(),
+            usePhiCnst=VertexCuts.usePhiCnst(),
+            useThetaCnst=VertexCuts.useThetaCnst())
+        ToolSvc += InDetSecVxFitterTool
+        if (printConfig):
+            print(InDetSecVxFitterTool)
+        #
+        # --- Distance of minimum approach utility
+        #
+        from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import (
+            Trk__SeedNewtonTrkDistanceFinder)
+        InDetSecVxTrkDistanceFinder = Trk__SeedNewtonTrkDistanceFinder(
+            name=prefix+'TrkDistanceFinder')
+        ToolSvc += InDetSecVxTrkDistanceFinder
+        if (printConfig):
+            print(InDetSecVxTrkDistanceFinder)
+        #
+        # --- Helper Tool
+        #
+        from InDetConversionFinderTools.InDetConversionFinderToolsConf import (
+            InDet__ConversionFinderUtils)
+        InDetSecVxHelper = InDet__ConversionFinderUtils(
+            name=prefix+"FinderUtils")
+        ToolSvc += InDetSecVxHelper
+        if (printConfig):
+            print(InDetSecVxHelper)
+        #
+        # --- Track selector tool
+        #
+        from InDetTrackSelectorTool.InDetTrackSelectorToolConf import (
+            InDet__InDetConversionTrackSelectorTool)
+        InDetSecVxTrackSelector = InDet__InDetConversionTrackSelectorTool(
+            name=prefix+"TrackSelector",
+            TrackSummaryTool=TrackSummaryTool,
+            Extrapolator=Extrapolator,
+            maxSiD0=VertexCuts.TrkSel_maxSiD0(),
+            maxTrtD0=VertexCuts.TrkSel_maxTrtD0(),
+            maxSiZ0=VertexCuts.TrkSel_maxSiZ0(),
+            maxTrtZ0=VertexCuts.TrkSel_maxTrtZ0(),
+            minPt=VertexCuts.TrkSel_minPt(),
+            RatioCut1=VertexCuts.TrkSel_RatioCut1(),
+            RatioCut2=VertexCuts.TrkSel_RatioCut2(),
+            RatioCut3=VertexCuts.TrkSel_RatioCut3(),
+            RatioTRT=VertexCuts.TrkSel_RatioTRT(),
+            IsConversion=VertexCuts.TrkSel_IsConversion(),
+            significanceD0_Si=VertexCuts.TrkSel_significanceD0_Si(),
+            RatioV0=VertexCuts.TrkSel_RatioV0())
 
+        ToolSvc += InDetSecVxTrackSelector
+        if (printConfig):
+            print(InDetSecVxTrackSelector)
+        #
+        # Track pairs selector
+        #
+        from InDetConversionFinderTools.InDetConversionFinderToolsConf import (
+            InDet__TrackPairsSelector)
+        InDetSecVxTrackPairsSelector = InDet__TrackPairsSelector(
+            name=prefix+"TrackPairsSelector",
+            ConversionFinderHelperTool=InDetSecVxHelper,
+            DistanceTool=InDetSecVxTrkDistanceFinder,
+            MaxFirstHitRadius=VertexCuts.TrkPairSel_MaxFirstHitRadius(),
+            MaxDistBetweenTracks=VertexCuts.TrkPairSel_MaxDistBetweenTracks(),
+            MaxEta=VertexCuts.TrkPairSel_MaxEta(),
+            MaxInitDistance=VertexCuts.TrkPairSel_MaxInitDistance(),
+            MinTrackAngle=VertexCuts.TrkPairSel_MinTrackAngle())
+        ToolSvc += InDetSecVxTrackPairsSelector
+        if (printConfig):
+            print(InDetSecVxTrackPairsSelector)
+        #
+        # Vertex point estimator
+        #
+        from InDetConversionFinderTools.InDetConversionFinderToolsConf import (
+            InDet__VertexPointEstimator)
+        InDetSecVtxPointEstimator = InDet__VertexPointEstimator(
+            name=prefix+"PointEstimator",
+            MinDeltaR=VertexCuts.VtxPt_MinDeltaR(),
+            MaxDeltaR=VertexCuts.VtxPt_MaxDeltaR(),
+            MaxPhi=VertexCuts.VtxPt_MaxPhi())
+        ToolSvc += InDetSecVtxPointEstimator
+        if (printConfig):
+            print(InDetSecVtxPointEstimator)
+        #
+        # Secondary Vertex post selector
+        #
+        from InDetConversionFinderTools.InDetConversionFinderToolsConf import (
+            InDet__ConversionPostSelector)
+        InDetSecVtxPostSelector = InDet__ConversionPostSelector(
+            name=prefix+"PostSelector",
+            MaxChi2Vtx=VertexCuts.SecVtxPost_MaxChi2Vtx(),
+            MaxInvariantMass=VertexCuts.SecVtxPost_MaxInvariantMass(),
+            MinFitMomentum=VertexCuts.SecVtxPost_MinFitMomentum(),
+            MinRadius=VertexCuts.SecVtxPost_MinRadius(),
+            MinPt=VertexCuts.SecVtxPost_MinPt(),
+            MaxdR=VertexCuts.SecVtxPost_MaxdR(),
+            MaxPhiVtxTrk=VertexCuts.SecVtxPost_MaxPhiVtxTrk())
+        ToolSvc += InDetSecVtxPostSelector
+        if (printConfig):
+            print(InDetSecVtxPostSelector)
+        #
+        # Single track secondary vertex tool
+        #
+        from InDetConversionFinderTools.InDetConversionFinderToolsConf import (
+            InDet__SingleTrackConversionTool)
+        InDetSingleTrackSecVtx = InDet__SingleTrackConversionTool(
+            name=prefix+"SingleTrackTool",
+            ConversionFinderHelperTool=InDetSecVxHelper,
+            Extrapolator=Extrapolator,
+            MaxBLayerHits=VertexCuts.SingleTrk_MaxBLayerHits(),
+            MinInitialHitRadius=VertexCuts.SingleTrk_MinInitialHitRadius(),
+            MinInitialHitRadius_noBlay=VertexCuts.SingleTrk_MinInitialHitRadius_noBlay(),
+            MinRatioOfHLhits=VertexCuts.SingleTrk_MinRatioOfHLhits())
+        ToolSvc += InDetSingleTrackSecVtx
+        if (printConfig):
+            print(InDetSingleTrackSecVtx)
+        #
+        # conversion finder tool
+        #
+        from InDetConversionFinderTools.InDetConversionFinderToolsConf import (
+            InDet__InDetConversionFinderTools)
+        InDetSecVtxFinderTool = InDet__InDetConversionFinderTools(
+            name=prefix+"FinderTool",
+            VertexFitterTool=InDetSecVxFitterTool,
+            TrackSelectorTool=InDetSecVxTrackSelector,
+            TrackPairsSelector=InDetSecVxTrackPairsSelector,
+            VertexPointEstimator=InDetSecVtxPointEstimator,
+            PostSelector=InDetSecVtxPostSelector,
+            SingleTrackConversionTool=InDetSingleTrackSecVtx,
+            Extrapolator=Extrapolator,
+            TrackParticleCollection=TrackParticles,
+            RemoveTrtTracks=VertexCuts.Finder_RemoveTrtTracks(),
+            IsConversion=VertexCuts.Finder_IsConversion(),
+            MinDistVtxHit=VertexCuts.Finder_MinDistVtxHit(),
+            MaxDistVtxHit=VertexCuts.Finder_MaxDistVtxHit(),
+            MinFlightAngle=VertexCuts.Finder_MinFlightAngle(),
+            MinInitVtxR=VertexCuts.Finder_MinInitVtxR())
+        ToolSvc += InDetSecVtxFinderTool
+        if (printConfig):
+            print(InDetSecVtxFinderTool)
+
+        # --- remember instances
+        self.__prefix = prefix
+        self.__InDetSecVtxFinderTool = InDetSecVtxFinderTool
+        self.__TrackParticles = TrackParticles
+        self.__SecVertices = SecVertices
+        self.__printConfig = printConfig
+        self.__topSequence = topSequence
+
+    def toolInstance(self):
+        #
+        # --- return tool for usage in egamma
+        #
+        return self.__InDetSecVtxFinderTool
+
+    def addAlgorithm(self):
+        #
+        # --- add driving algorithm of usage in InDet
+        #
+        from InDetConversionFinder.InDetConversionFinderConf import (
+            InDet__ConversionFinder)
+        InDetSecVtxFinder = InDet__ConversionFinder(
+            name=self.__prefix+"Finder",
+            VertexFinderTool=self.__InDetSecVtxFinderTool,
+            TracksName=self.__TrackParticles,
+            InDetConversionOutputName=self.__SecVertices)
+        self.__topSequence += InDetSecVtxFinder
+        if (self.__printConfig):
+            print(InDetSecVtxFinder)
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
index 73355ae4edb3c60a87a1dd31caaa6dda2efd0623..55e1033987f25a195e30627c379d48a1e09a6441 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
@@ -654,8 +654,8 @@ def getInDetGsfMaterialUpdator(name='InDetGsfMaterialUpdator', **kwargs) :
     if 'MaximumNumberOfComponents' not in kwargs :
         kwargs=setDefaults(kwargs, MaximumNumberOfComponents = 12)
 
-    from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__GsfMaterialMixtureConvolutionLM
-    return Trk__GsfMaterialMixtureConvolutionLM (name = the_name, **kwargs)
+    from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__GsfMaterialMixtureConvolution
+    return Trk__GsfMaterialMixtureConvolution (name = the_name, **kwargs)
 
 
 @makePublicTool
@@ -1055,9 +1055,6 @@ def getInDetTrackSummaryToolSharedHits(name='InDetTrackSummaryToolSharedHits',**
     from InDetRecExample.InDetJobProperties import InDetFlags
     kwargs = setDefaults(kwargs,
                          doSharedHits           = InDetFlags.doSharedHits(),
-                         TRTdEdx_DivideByL      = True, # default is True
-                         TRTdEdx_useHThits      = True, # default is True
-                         TRTdEdx_corrected      = True, # default is True
                          minTRThitsForTRTdEdx   = 1)    # default is 1
 
     return getInDetTrackSummaryTool( name, **kwargs)
@@ -1093,7 +1090,7 @@ def getInDetTRT_ExtensionToolCosmics(name='InDetTRT_ExtensionToolCosmics',**kwar
                          TRT_ClustersContainer = InDetKeys.TRT_DriftCircles(),
                          SearchNeighbour       = False,  # needs debugging!!!
                          RoadWidth             = 10.)
-                            
+
     from TRT_TrackExtensionTool_xk.TRT_TrackExtensionTool_xkConf import InDet__TRT_TrackExtensionToolCosmics
     return InDet__TRT_TrackExtensionToolCosmics(name                  = the_name, **kwargs)
 
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
index 2ab663f27a5ee67e16cf21d2284585a80ec744ac..bf91fd9e6f8a176b45fdfb32aaeab8da7153b19e 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
@@ -138,9 +138,6 @@ class ConfiguredInDetPreProcessingTRT:
                                                                ValidityGateSuppression         = not InDetFlags.doCosmics(),
                                                                LowGate                         = LowGate,
                                                                HighGate                        = HighGate,
-                                                               MaskFirstHTBit                  = False,
-                                                               MaskMiddleHTBit                 = False,
-                                                               MaskLastHTBit                   = False,
                                                                SimpleOutOfTimePileupSupressionArgon = InDetFlags.doCosmics(),
                                                                RejectIfFirstBitArgon                = False, # fixes 50 nsec issue 
                                                                MinTrailingEdgeArgon                 = MinTrailingEdge,
@@ -148,9 +145,6 @@ class ConfiguredInDetPreProcessingTRT:
                                                                ValidityGateSuppressionArgon         = not InDetFlags.doCosmics(),
                                                                LowGateArgon                         = LowGate,
                                                                HighGateArgon                        = HighGate,
-                                                               MaskFirstHTBitArgon                  = False,
-                                                               MaskMiddleHTBitArgon                 = False,
-                                                               MaskLastHTBitArgon                   = False,
                                                                useDriftTimeHTCorrection        = True,
                                                                useDriftTimeToTCorrection       = True)
          if not usePhase:
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
index 65477cdcb2ce9ec13b6d4566813222fb1c640c35..aa6b3ca7b2ec266cce355db8b5b18ebac808dbf9 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
@@ -129,12 +129,6 @@ if InDetFlags.doMonitoring():
 ServiceMgr.StoreGateSvc.ActivateHistory = False
 ServiceMgr.StoreGateSvc.Dump            = False
 
-# ------------------------------------------------------------
-# get stack dump
-# ------------------------------------------------------------
-
-ServiceMgr.CoreDumpSvc.FatalHandler = 438
-
 #--------------------------------------------------------------
 # run JiveXML for Atlantis event display
 #--------------------------------------------------------------
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/CMakeLists.txt b/InnerDetector/InDetExample/InDetTrigRecExample/CMakeLists.txt
index 96888349ef46abad46f384203a7741f27cf6f971..b0e6f63e30b9741dddf4ca2c5ed83cde05e25d9a 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/CMakeLists.txt
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/CMakeLists.txt
@@ -1,13 +1,10 @@
-################################################################################
-# Package: InDetTrigRecExample
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( InDetTrigRecExample )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
-atlas_install_joboptions( share/**.py )
-atlas_install_runtime( test/InDetTrigRecExample_TestConfiguration.xml share/jobOptions_RTT_InDetTrigRecExample.py share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py share/plotHistos.C share/jobOptions_RTT_InDetTrigRecExample_backTracking.py share/InDetTrigRecNtupleCreation.py )
+atlas_install_joboptions( share/*.py )
 atlas_install_scripts( share/RTT_NoBField_transform.sh )
 
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py b/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py
deleted file mode 100755
index b8703204386f5b259f1772d5648dc782938facaf..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDReadBSMemAudit.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-#
-# Set Flags for Running the Trigger in readBS Mode
-# includes Trigger_topOptions.py to do the real work.
-# Reads from file RawEvent.re (file must already exist;
-# run athena with TrigWriteBS_Flags.py to produce it)
-# 
-# use:
-# athena.py -bs testAllReadBSMemAudit.py
-#==============================================================
-doDetailedAuditor = True
-# no. of times to loop over same file
-repeatFile = 20
-#
-include( "testEFIDreadBS_Flags.py" )
-#EventSelector.SkipEvents = 99
-MessageSvc.OutputLevel = INFO
-
-theApp.EvtMax = 10000
-MessageSvc.defaultLimit = 100000000  #(repeatFile+1)*theApp.EvtMax
-ChronoStatSvc.NumberOfSkippedEventsForMemStat = 50
-#
-#if doDetailedAuditor:
-#    theApp.AuditTools=True # FIXME crash on finalisation
-#
-# change the input file
-#ByteStreamEventStorageInputSvc.OutputLevel = ERROR
-ByteStreamInputSvc.OutputLevel = ERROR
-
-DetDescrVersion = "ATLAS-DC3-02"
-# 100 events per file
-BSRDOInput=["rfio:/castor/cern.ch/user/d/demelian/bs/12.0.3/004100/mc11.004100.T1_McAtNLO_top.v11000401_120003._00001.bs.data"]
-#BSRDOInput+=["rfio:/castor/cern.ch/user/d/demelian/bs/12.0.3/004100/mc11.004100.T1_McAtNLO_top.v11000401_120003._00002.bs.data"]
-#BSRDOInput+=["rfio:/castor/cern.ch/user/d/demelian/bs/12.0.3/004100/mc11.004100.T1_McAtNLO_top.v11000401_120003._00003.bs.data"]
-#BSRDOInput+=["rfio:/castor/cern.ch/user/d/demelian/bs/12.0.3/004100/mc11.004100.T1_McAtNLO_top.v11000401_120003._00004.bs.data"]
-#BSRDOInput+=["rfio:/castor/cern.ch/user/d/demelian/bs/12.0.3/004100/mc11.004100.T1_McAtNLO_top.v11000401_120003._00005.bs.data"]
-#BSRDOInput+=["rfio:/castor/cern.ch/user/d/demelian/bs/12.0.3/004100/mc11.004100.T1_McAtNLO_top.v11000401_120003._00006.bs.data"]
-#to run on pcatlas00X uncomment it:
-#BSRDOInput=["/space1/igrabows/data/top-bs/mc11.004100.T1_McAtNLO_top.v11000401_120003._00001.bs.data"]
-#BSRDOInput+=["/space1/igrabows/data/top-bs/mc11.004100.T1_McAtNLO_top.v11000401_120003._00002.bs.data"]
-#BSRDOInput+=["/space1/igrabows/data/top-bs/mc11.004100.T1_McAtNLO_top.v11000401_120003._00003.bs.data"]
-#BSRDOInput+=["/space1/igrabows/data/top-bs/mc11.004100.T1_McAtNLO_top.v11000401_120003._00004.bs.data"]
-#BSRDOInput+=["/space1/igrabows/data/top-bs/mc11.004100.T1_McAtNLO_top.v11000401_120005._00005.bs.data"]
-#BSRDOInput+=["/space1/igrabows/data/top-bs/mc11.004100.T1_McAtNLO_top.v11000401_120003._00006.bs.data"]
-#single RoI event
-#BSRDOInput=["/space/igrabows/e25i-bs/mc11.004022.Electron_Pt_25.v11000401_120003._00001.bs.data"]
-#BSRDOInput+=["/space/igrabows/e25i-bs/mc11.004022.Electron_Pt_25.v11000401_120003._00001.bs.data"]
-#BSRDOInput+=["/space/igrabows/e25i-bs/mc11.004022.Electron_Pt_25.v11000401_120003._00001.bs.data"]
-#BSRDOInput+=["/space/igrabows/e25i-bs/mc11.004022.Electron_Pt_25.v11000401_120003._00001.bs.data"]
-while repeatFile > 0:
-	BSRDOInput += [BSRDOInput[0]]
-	BSRDOInput += [BSRDOInput[1]]
-	BSRDOInput += [BSRDOInput[2]]
-	BSRDOInput += [BSRDOInput[3]]
-	BSRDOInput += [BSRDOInput[4]]
-	BSRDOInput += [BSRDOInput[5]]
-	repeatFile -= 1
-if 'theRTTisRunningMe' in dir() and theRTTisRunningMe:
-	print "input data to be set up by RTT"
-	del ByteStreamInputSvc
-else:
-	EventSelector.Input = BSRDOInput
-	print EventSelector.Input
-# algorithm to measure vmem size
-theApp.DLLs += [ "TrigTestTools" ]
-theApp.TopAlg += [ "MemAuditAlg" ]
-
-# Turn Off History Service for StoreGate
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.StoreGateSvc.ActivateHistory = False
-
-HistorySvc = Service ( "HistorySvc" )
-HistorySvc.Activate=False
-
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDreadBS_Flags.py b/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDreadBS_Flags.py
deleted file mode 100755
index fc9a5e55fa67736c0cc6a487b52f57a41b6cba0e..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/TESTS/testEFIDreadBS_Flags.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-#
-# Set Flags for Running the Trigger in readBS Mode
-# includes Trigger_topOptions.py to do the real work.
-# Reads from file RawEvent.re (file must already exits
-# run athena with TrigWriteBS_Flags.py to produce it)
-# 
-# use:
-# athena.py -bs testEFIDreadBS_Flags.py
-#==============================================================
-
-#onlyID=True
-doTrigger=True
-AllAlgs=False
-
-readBS=True
-# Set detector description
-DetDescrVersion = "ATLAS-DC3-02"
-
-doCBNT=False
-doWriteAOD=False
-doWriteESD=False
-doWriteTAG=False
-doAOD=False # make AOD objects
-doESD=False # make ESD objects
-doTAG=False
-
-#useROOTNtuple=True # False : hbook ntuple
-
-# Set Truth flags
-doTruth=False    # needs to be true if creating Fake RoI 
-
-include ("TriggerJobOpts/TriggerFlags.py")
-TriggerFlags.readHLTconfigFromXML=False
-TriggerFlags.readLVL1configFromXML=False
-
-TriggerFlags.JetSlice.unsetAll()
-TriggerFlags.BjetSlice.unsetAll()
-TriggerFlags.BphysicsSlice.unsetAll()
-TriggerFlags.TauSlice.unsetAll()
-TriggerFlags.MuonSlice.unsetAll()
-#TriggerFlags.EgammaSlice.setL2()
-TriggerFlags.EgammaSlice.setEF()
-
-#TriggerFlags.doHLTpersistency=False
-#TriggerFlags.fakeLVL1=False
-#TriggerFlags.doLVL1=False
-#TriggerFlags.readLVL1Calo=True
-#TriggerFlags.doNtuple=True
-#TriggerFlags.useOfflineSpacePoints=False
-#TriggerFlags.readLVL1configFromXML=True
-#TriggerFlags.doHypo=False
-#TriggerFlags.doID=True
-#TriggerFlags.doCalo=True
-#TriggerFlags.doEF=True
-#TriggerFlags.doMuon=False
-
-#TriggerFlags.EgammaSlice.doL2Calo=True
-#TriggerFlags.EgammaSlice=TriggerSliceFlags(False,True,False,True,False,False) #L2TRK,L2Calo,L2mu,EFtrk,EFCalo,EFmuon
-
-TriggerFlags.doMuon=False
-TriggerFlags.doHypo=False
-
-triggerMenu.disableAll()
-triggerMenu.enableSignature("e10")
-TriggerFlags.EgammaSlice.setFlag("doIDSCAN",False)
-TriggerFlags.EgammaSlice.setFlag("doSiTrack",False)
-TriggerFlags.EgammaSlice.setFlag("doTRTxK", False)
-
-#-------------------------------------------------------------
-# End of setting flags
-#-------------------------------------------------------------
-
-include( "TriggerJobOpts/TrigReadBS_topOptions.py" )
-
-MessageSvc.OutputLevel = DEBUG
-#NovaCnvSvc.OutputLevel = INFO
-MessageSvc.debugLimit = 10000000
-
-# For BS files produced with DetDescrVersion "ATLAS-DC3-01" or "ATLAS-DC3-02"
-# uncomment the following line (but don't do that if using a file produced
-# by re-running LVL1 with an offline release 12 or higher).
-# Algorithm("Lvl1Conversion_L2").useOldRoIWordFormat=True # fix to read data with old RoiWord format
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h b/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h
index 97b87bce29ec1cf8257062837f9c504d7f8fb5d0..b91c908866e5bd560dc533e5e83b4df4640cec8b 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.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
 */
 
 /**
@@ -96,57 +96,4 @@ InDetTrigConfigRecBackTracking.py - are algorithms specific to backtracking or T
 </ul>
 
 
-@section InDetTrigRecExample_InDetTrigRecExamplejo End user job options
-
-The package contains jobOptions which can be run by users for testing purposes
-
-   - testEFID_basic.py
-   - jobOptionsNewSteering.py     
-
-The second uses CSC datasets and runs the complete EF InDet reconstruction in the trigger.
-jobOptionsNewSteering.py is copied from /share to the run/
-directory and it is suggested that you modify it there. In general you
-should only need to alter the doBlah flags (i.e. set
-doTruth=FALSE/TRUE) and the InDetTrigFlags. You may also need to modify
-the dataset used. The jobOptions can be steered by general RecExCommon flags.
-
-
-
-@section InDetTrigRecExample_InDetTrigRecExampleRTT RTT tests
-
-The global RTT configuration is found in test/InDetTrigRecExample_TestConfiguration.xml. The current configuration runs 
-<ul>
-<li>
-a full chain-test based on official transformations rerunning trigger on the 2008 cosmics data BS followed by Tier0 reconstruction of the output BS file
-<li>
-tracking in top events with testEFID_RTT_InDetTrigRecExample.py
-</ul>
-
-jobOptions of earlier RTT tests are still kept in 
-
-   - jobOptions_RTT_InDetTrigRecExample.py - performs the EF InDet inside-out reconstruction from RDO for 450 top events.
-     Three LVL1 RoI sorts are taken into account: electron-, muon- and tau-like. As output monitoring histograms 
-qy     (expert-monitoring.root) and CBNTAA ntuple (ntuple.root) are stored.
-   - jobOptions_RTT_InDetTrigRecExample_doReadBS.py  - performs the EF InDet reconstruction from byte stream for 50 top events.
-     In this case one runs with doTruth=False as no MC truth info is available in byte-stream files. The EF InDet inside-out reconstruction
-     is performed in a full-scan mode.
-     As output the monitoring histograms (expert-monitoring.root) are stored. They also contain timing measurements (doTimer=True).
-
-   - jobOptions_RTT_InDetTrigRecExample.py - RTT test of the EF InDet reconstruction for 
-       450 top events from RDO,
-   - jobOptions_RTT_InDetTrigRecExample_doReadBS.py - RTT test of the EF InDet reconstruction for 50 top events from byte stream.
-   
-
-
-@section InDetTrigRecExample_InDetTrigRecExampleLeaks Memory-leak test
-
-There are two jobOptions files to run a memory-leak test. They are put in /TESTS:
-
-	- testEFIDReadBSMemAudit.py - main jobOptions file to read 10k events from byte-stream input and give MemAudit statistics,
-	- testEFIDreadBS_Flags.py - auxiliary file to run the EF InDet inside-out reconstruction for the egamma slice.
-
-A recipe how to run the memory-leak test is given in the README file in /TESTS.
-
-
-
 */
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py
index 9951574a453416f46c27950ac63929d60a9f51ce..fec9295de25df6771e132d5f3d0d7af894ff0fa3 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py
@@ -105,9 +105,6 @@ InDetTrigTRT_DriftCircleTool = InDet__TRT_DriftCircleTool( name = "InDetTrigTRT_
                                                            ValidityGateSuppression         = False,
                                                            LowGate = LowGate,
                                                            HighGate = HighGate,
-                                                           MaskFirstHTBit                  = False,
-                                                           MaskMiddleHTBit                 = False,
-                                                           MaskLastHTBit                   = False,
                                                            SimpleOutOfTimePileupSupressionArgon = False,# no OOT rejection for argon
                                                            RejectIfFirstBitArgon                = False, # no OOT rejection for argon
                                                            MinTrailingEdgeArgon                 = 0, # no OOT rejection for argon
@@ -115,9 +112,6 @@ InDetTrigTRT_DriftCircleTool = InDet__TRT_DriftCircleTool( name = "InDetTrigTRT_
                                                            ValidityGateSuppressionArgon         = False,# no OOT rejection for argon
                                                            LowGateArgon                         = 0,# no OOT rejection for argon
                                                            HighGateArgon                        = 75*Units.ns,# no OOT rejection for argon
-                                                           MaskFirstHTBitArgon                  = False,
-                                                           MaskMiddleHTBitArgon                 = False,
-                                                           MaskLastHTBitArgon                   = False,
                                                            useDriftTimeHTCorrection        = True,
                                                            
                                                            useDriftTimeToTCorrection       = True, # reenable ToT
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRecNtupleCreation.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRecNtupleCreation.py
deleted file mode 100644
index b2c53e935e0d7349ddc7490c5ba45f64958bb94a..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRecNtupleCreation.py
+++ /dev/null
@@ -1,119 +0,0 @@
-#this file is included by RecExCommon - 
-
-#TrkParticleAlgsOutputLevel= WARNING
-
-from TrkValTools.TrkValToolsConf import Trk__BasicValTrkParticleNtupleTool
-BasicValTrkParticleNtupleTool = Trk__BasicValTrkParticleNtupleTool("BasicValTrkParticleNtupleTool")
-#BasicValTrkParticleNtupleTool.OutputLevel=VERBOSE
-print BasicValTrkParticleNtupleTool
-ToolSvc+=BasicValTrkParticleNtupleTool
-
-from TrigTrkValTools.TrigTrkValToolsConf import TrigL2ValidationNtupleTool
-L2ValidationNtupleTool= TrigL2ValidationNtupleTool("TrigL2ValidationNtupleTool")
-print L2ValidationNtupleTool
-ToolSvc+=L2ValidationNtupleTool
-#L2ValidationNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-
-
-from TrigTrkValAlgs.TrigTrkValAlgsConf import Trk__TrigTrkValidationNtupleWriter
-
-
-TrigTrkValNtupleWriter = Trk__TrigTrkValidationNtupleWriter(name               = 'InDetTrigValNtupleWriter',
-                                                            ValTrkParticleNtupleTool = BasicValTrkParticleNtupleTool,
-                                                            TrigL2ValidationNtupleTool = L2ValidationNtupleTool,
-                                                            NtupleFileName       = 'TRKVAL',
-                                                            NtupleDirName        = 'Validation',
-                                                            ChainName            = ".*",
-                                                            RoiDescrName         = ".*",
-                                                            #InDetTrackTrigCollection = ["InDetTrack"],
-                                                            #InDetTrackTrigCollection = ["TrigIDSCAN_Cosmics"],
-                                                            EFTrackParticleCollection = ["InDetTrigParticleCreation_Tau_EFID"],
-                                                            #EFTrackParticleCollection = ["HLT_InDetTrigParticleCreation_CosmicsN_EFID"],
-                                                            #TrackParticleCollection = ["TrackParticleCandidate"],
-                                                            doRoI = True
-                                                            )
-
-#TrigTrkValNtupleWriter.OutputLevel = VERBOSE
-print TrigTrkValNtupleWriter
-topSequence += TrigTrkValNtupleWriter
-
-#----------------------------------------------------------
-# Tools which writes event property information
-#----------------------------------------------------------
-
-from TrkValTools.TrkValToolsConf import Trk__EventPropertyNtupleTool
-EventPropertyNtupleTool = Trk__EventPropertyNtupleTool(name='EventPropertyNtupleTool')
-#EventPropertyNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-ToolSvc += EventPropertyNtupleTool
-print EventPropertyNtupleTool
-
-from TrkValTools.TrkValToolsConf import Trk__EventToTrackLinkNtupleTool
-EventToTrackParticleLinkNtupleTool = Trk__EventToTrackLinkNtupleTool(name='EventToTrackParticleLinkNtupleTool', CollectionType = "Rec::TrackParticle")
-#EventToTrackParticleLinkNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-ToolSvc += EventToTrackParticleLinkNtupleTool
-print EventToTrackParticleLinkNtupleTool
-
-EventToTrackParticleEFLinkNtupleTool = Trk__EventToTrackLinkNtupleTool(name='EventToTrackParticleEFLinkNtupleTool', CollectionType = "Rec::TrackParticle_Trig")
-#EventToTrackParticleEFLinkNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-ToolSvc += EventToTrackParticleEFLinkNtupleTool
-print EventToTrackParticleEFLinkNtupleTool
-
-EventToTrigInDetTrackLinkNtupleTool = Trk__EventToTrackLinkNtupleTool(name='EventToTrigInDetTrackLinkNtupleTool', CollectionType = "InDetTrack_Trig")
-#EventToTrigInDetTrackLinkNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-ToolSvc += EventToTrigInDetTrackLinkNtupleTool
-print EventToTrigInDetTrackLinkNtupleTool
-
-TrigTrkValNtupleWriter.EventPropertyNtupleTools =[EventPropertyNtupleTool, EventToTrackParticleLinkNtupleTool, EventToTrackParticleEFLinkNtupleTool, EventToTrigInDetTrackLinkNtupleTool]
-
-
-
-#------------------------------------------------------------------------------------
-# Tools which writes RoI information
-#------------------------------------------------------------------------------------
-
-from TrigTrkValTools.TrigTrkValToolsConf import Trk__RoIToTrackLinkNtupleTool
-RoIToTrackParticleLinkNtupleTool = Trk__RoIToTrackLinkNtupleTool(name='RoIToTrackParticleLinkNtupleTool')
-#RoIToTrackParticleLinkNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-ToolSvc += RoIToTrackParticleLinkNtupleTool
-print RoIToTrackParticleLinkNtupleTool
-
-RoIToTrigInDetTrackLinkNtupleTool = Trk__RoIToTrackLinkNtupleTool(name='RoIToTrigInDetTrackLinkNtupleTool', trackToolType='TrigInDetTrack')
-#RoIToTrigInDetTrackLinkNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-ToolSvc += RoIToTrigInDetTrackLinkNtupleTool
-print RoIToTrigInDetTrackLinkNtupleTool
-    
-from TrigTrkValTools.TrigTrkValToolsConf import Trk__RoIPropertyNtupleTool
-RoIPropertyNtupleTool = Trk__RoIPropertyNtupleTool(name='RoIPropertyNtupleTool')
-#RoIPropertyNtupleTool.OutputLevel = TrkParticleAlgsOutputLevel
-
-ToolSvc += RoIPropertyNtupleTool
-print RoIPropertyNtupleTool
-
-TrigTrkValNtupleWriter.RoIPropertyNtupleTools = [ RoIPropertyNtupleTool, RoIToTrackParticleLinkNtupleTool, RoIToTrigInDetTrackLinkNtupleTool ]
-print TrigTrkValNtupleWriter.RoIPropertyNtupleTools
-
-#-------------------------------------------------------------------------------------
-# Trigger Decision Tool
-#-------------------------------------------------------------------------------------
-
-from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-tdt = Trig__TrigDecisionTool("TrigDecisionTool")
-ToolSvc += tdt
-
-
-# # To read files with trigger config stored as in-file meta-data,
-# # i.e. 13.0.40 and above: ds
-# # To read AOD produced with 13.0.30 you need to change ds to aod:
-# from TriggerJobOpts.TriggerFlags import TriggerFlags
-# TriggerFlags.configurationSourceList = ['ds']
-
-# # set up trigger config service
-# from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
-# cfg =  TriggerConfigGetter()
-
-#origWriter = topSequence.InDetValNtupleWriter
-#TrigTrkValNtupleWriter = Trk__TrigTrkValidationNtupleWriter(name               = 'InDetTrigValNtupleWriter')
-#for i in origWriter.properties():
-#    prop = origWriter.__slots__[i]
-#    TrigTrkValNtupleWriter.__slots__[i] = prop
-    
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/Setup.sh b/InnerDetector/InDetExample/InDetTrigRecExample/share/Setup.sh
deleted file mode 100755
index 00a54f49a3785fda7d5b745fb789d6f7fc4d6cfa..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/Setup.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# should eventually not be necessary
-#get_files -symlink -jo AthenaCommon/athena.py
-#get_files -symlink -data Materials.dtd 
-#get_files -symlink -data AGDD.dtd
-
-#create symbolic links to get DB:
-#ln -s /afs/cern.ch/user/a/atlcond/coolrep/sqlite130 sqlite130
-#ln -s /afs/cern.ch/atlas/project/database/DBREL/packaging/DBRelease/current/geomDB geomDB
-#for rel 13
-setupLocalDBReplica_CERN.sh
-
-# get particle data table and magnetic field data
-get_files -symlink -data PDGTABLE.MeV
-
-# copy example jobOptions 
-#cp ../share/HLT*xml ../run
-#cp ../share/LVL1*xml ../run
-#cp ../share/jobOptions.py ../run/
-cp ../share/jobOptionsNewSteering.py ../run/
-#cp ../share/PoolFileCatalog.xml ../run/
-cp ../TESTS/test*py ../run/
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
deleted file mode 100755
index fc65bd7d3fe8b34cce4d10985906563f6703ac74..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptionsNewSteering.py
+++ /dev/null
@@ -1,531 +0,0 @@
-# migrated to new steering
-#--------------------------------------------------------------
-# Control
-#--------------------------------------------------------------
-
-# control running truth ?
-doTruth         = True #if TRUE running FakeRoIfromKine, if FALSE running FakeLvl1RoIatFixedEtaPhi
-
-# produce an atlantis data file
-doJiveXML       = False
-
-# controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-
-# --- read BS
-doReadBS        = False
-if doReadBS:
-  doTruth = False
-
-# Monitoring flags
-doMonitoring = True
-
-# do auditors ?
-doAuditors   = False
-
-#timing measurements
-doTimer = False
-
-#CBNT
-doCBNT = False
-CBNTAthenaAware = True #must be True, otherwise you don't get an ntuple
-
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = INFO
-
-DetDescrVersion = "ATLAS-DC3-07" #it has to be defined early enough
-#DetDescrVersion = "ATLAS-CSC-02-00-00"
-
-import os
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EventDataModel monitor (debug mode only) ?
-  doEdmMonitor    = True
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-  
-#--------------------------------------------------------------
-# --- setup class with default values
-#--------------------------------------------------------------
-from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-InDetTrigFlags.doTruth = doTruth
-InDetTrigFlags.doNewTracking = True
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import GlobalFlags
-#default is atlas geometry
-GlobalFlags.DetGeo.set_atlas()
-#set defaults
-GlobalFlags.DataSource.set_geant4()
-if 'doReadBS' in dir() and doReadBS:
-  GlobalFlags.InputFormat.set_bytestream()
-else:
-  GlobalFlags.InputFormat.set_pool()    
-#default is zero luminosity
-#GlobalFlags.Luminosity.set_zero()
-# --- printout
-GlobalFlags.Print()
-
-# --- set geometry version (kudge for new jobproperties)
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion = DetDescrVersion
-print globalflags.DetDescrVersion()
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-# --- switch on InnerDetector
-from AthenaCommon.DetFlags import DetFlags 
-DetFlags.ID_setOn()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-if doCBNT:
-	DetFlags.Tile_setOn() #needed for doExtrap in CBNT
-	DetFlags.LAr_setOn() #needed for doExtrap in CBNT
-	include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
-# ---- switch parts of ID off/on as follows
-#DetFlags.makeRIO.pixel_setOff()
-#DetFlags.makeRIO.TRT_setOff()
-#DetFlags.makeRIO.SCT_setOff()
-# --- printout
-DetFlags.Print()
-
-#--------------------------------------------------------------
-# load ServiceMgr, ToolSvc, topSequence
-#--------------------------------------------------------------
-from AthenaCommon.AppMgr import theApp
-from AthenaCommon.AppMgr import ServiceMgr
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-#
-from AthenaCommon.AppMgr import ToolSvc
-
-#--------------------------------------------------------------
-# change MessageSvc
-#--------------------------------------------------------------
-  	 
-# output level
-ServiceMgr.MessageSvc.OutputLevel  = OutputLevel
-# increase the number of letter reserved to the alg/tool name from 18 to 30
-ServiceMgr.MessageSvc.Format       = "% F%50W%S%7W%R%T %0W%M"
-# to change the default limit on number of message
-ServiceMgr.MessageSvc.defaultLimit = 9999999  # all messages
-
-#--------------------------------------------------------------
-# Load POOL support, setup for reconstruction
-#--------------------------------------------------------------
-
-# setup POOL access in ATHENA
-if 'doReadBS' in dir() and doReadBS:
-  include("InDetTrigRecExample/InDetTrigReadBS_jobOptions.py")
-else:
-  import AthenaPoolCnvSvc.ReadAthenaPool
-
-# --- GeoModel
-include("AtlasGeoModel/SetGeometryVersion.py" )
-include("AtlasGeoModel/GeoModelInit.py" )
-# ---- Beam Spot service
-if InDetTrigFlags.useBeamConstraint():
-  include("InDetBeamSpotService/BeamCondSvc.py" )
-
-# particle property service
-include( "PartPropSvc/PartPropSvc.py" )
-
-if InDetTrigFlags.doTruth():
-  include ( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-
-#------------------------------------------------------------
-# Event Data Model Monitor works only in dbg build
-#------------------------------------------------------------
-
-if doEdmMonitor:
-  from TrkValAlgs.TrkValAlgsConf import Trk__EventDataModelMonitor
-  InDetTrigEdmMonitor = Trk__EventDataModelMonitor (name = 'InDetTrigEdmMonitor')
-
-  topSequence += InDetTrigEdmMonitor
-  print          InDetTrigEdmMonitor
-  
-#--------------------------------------------------------------
-# Load Inner Detector reconstruction
-#--------------------------------------------------------------
-
-# ID reconstruction
-from InDetTrigRecExample.EFInDetConfig import *
-
-if not doReadBS:
-  electronAlgs = TrigEFIDInsideOut_Electron()
-else:
-  electronAlgs = TrigEFIDInsideOut_FullScan()
-  
-muonAlgs = TrigEFIDInsideOut_Muon() #ok
-tauAlgs = TrigEFIDInsideOut_Tau() #ok
-#electronAlgs = TrigEFIDInsideOut_Bjet() #ok
-#electronAlgs = TrigEFIDInsideOut_Bphysics() #ok
-#electronAlgs = TrigEFIDInsideOut_FullScan()
-#electronAlgs = TrigEFIDInsideOut_MinBias()
-#electronAlgs = TrigEFIDOutsideIn_Photon() #ok
-
-# EF Track hypothesis algorithm for electrons
-from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e10, EFTrackHypo_e15i, EFTrackHypo_e25i, EFTrackHypo_e60
-theEFTrackHypo_e10 =  EFTrackHypo_e10()
-theEFTrackHypo_e15i =  EFTrackHypo_e15i()
-theEFTrackHypo_e25i =  EFTrackHypo_e25i()
-theEFTrackHypo_e60 =  EFTrackHypo_e60()
-
-#--------------------------------------------------------------
-# Region Selector and Trigger 
-#--------------------------------------------------------------
-
-include( "TriggerJobOpts/TriggerFlags.py" )
-include( "RegionSelector/RegionSelector_jobOptions.py" )
-include( "InDetRegionSelector/InDetRegionSelectorTable_jobOptions.py" ) #include it temporarily!
-
-theApp.Dlls += [ "TrigSteeringTest" ]
-theApp.Dlls += [ "TrigTimeAlgs" ]
-
-########################
-# ConfigSvc:
-########################
-
-#######################################################
-# define/generate menu files for HLT
-#######################################################
-
-from TriggerMenuPython.TriggerPythonConfig import *
-menu = TriggerPythonConfig("newMenu.xml", "lvl1Menu.xml")
-############################################################# Electrons
-# fake L1
-item = LVL1MenuItem('L1_EM10', ctpid='1')
-item.addCondition(name='EM10', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='EM10', value='7', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'EM10', ['PESA::dummyAlgo/Egamma'], 'LVL2Out_Electron' )
-menu.addSequence( 'LVL2Out_Electron', electronAlgs.getSequence() + [theEFTrackHypo_e10, theEFTrackHypo_e15i, theEFTrackHypo_e25i, theEFTrackHypo_e60], 
-'EFInDet_Electron' )
-
-#chains
-chain = HLTChain('DummyL2_Electron', '1', 'L1_EM10', 'L2')
-chain.addHLTSignature( 'LVL2Out_Electron' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Electron', '4', 'DummyL2_Electron', 'EF')
-chain.addHLTSignature( 'EFInDet_Electron' )
-chain.addTriggerTypeBit(4)
-chain.addStreamTag('electrons')
-menu.addHLTChain(chain)
-
-############################################################# Muons
-# fake L1
-item = LVL1MenuItem('L1_MU06', ctpid='2')
-item.addCondition(name='MU06', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='MU06', value='6', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'MU06', ['PESA::dummyAlgo/Muon'], 'LVL2Out_Muon' )
-menu.addSequence( 'LVL2Out_Muon', muonAlgs.getSequence(),
-                  'EFInDet_Muon' )
-
-#chains
-chain = HLTChain('DummyL2_Muon', '2', 'L1_MU06', 'L2')
-chain.addHLTSignature( 'LVL2Out_Muon' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Muon', '5', 'DummyL2_Muon', 'EF')
-chain.addHLTSignature( 'EFInDet_Muon' )
-chain.addTriggerTypeBit(5)
-chain.addStreamTag('muons')
-menu.addHLTChain(chain)
-
-############################################################# Jets
-# fake L1
-item = LVL1MenuItem('L1_JET20', ctpid='2')
-item.addCondition(name='JET20', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='JET20', value='20', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'JET20', ['PESA::dummyAlgo/Jet'], 'LVL2Out_Jet' )
-menu.addSequence( 'LVL2Out_Jet', tauAlgs.getSequence(),
-                  'EFInDet_Jet' )
-
-#chains
-chain = HLTChain('DummyL2_Jet', '3', 'L1_JET20', 'L2')
-chain.addHLTSignature( 'LVL2Out_Jet' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Jet', '6', 'DummyL2_Jet', 'EF')
-chain.addHLTSignature( 'EFInDet_Jet' )
-chain.addTriggerTypeBit(34)
-chain.addStreamTag('jets')
-menu.addHLTChain(chain)
-
-menu.writeConfigFiles()
-
-
-
-###    Setup  TrigConfigSvc      ###
-####################################
-from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc
-log.info("setting up TrigConfigSvc:")
-svc = SetupTrigConfigSvc()
-svc.hltXmlFile = 'newMenu.xml'
-svc.l1XmlFile  = 'lvl1Menu.xml'
-
-try:
-  svc.SetStates( 'xml' )
-except:
-  log.warning( 'failed to set state of TrigConfigSvc ...')
-try:
-  svc.InitialiseSvc()
-except:
-  log.warning( 'failed to activate TrigConfigSvc ...')
-    
-ServiceMgr.TrigConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.HLTConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.LVL1ConfigSvc.OutputLevel=VERBOSE
-    
-
-
-#######################################################
-from TrigSteering.TrigSteeringConfig import TrigSteer_L2,TrigSteer_EF
-
-steeringL2 = TrigSteer_L2("TrigSteer_L2", hltFile="newMenu.xml")
-
-if doTruth:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIfromKine
-  steeringL2.LvlConverterTool = FakeLvl1RoIfromKine("FakeLvl1RoIfromKine")
-  steeringL2.LvlConverterTool.FakeEmTauRoiParticleIDs=[11,-11]
-  steeringL2.LvlConverterTool.FakeMuonRoiParticleIDs=[13,-13]
-  steeringL2.LvlConverterTool.FakeJetRoiParticleIDs=[15,-15]
-  steeringL2.LvlConverterTool.FakeEmTauRoiPtMin=5*GeV
-  steeringL2.LvlConverterTool.McEventCollectionName = "TruthEvent"
-  steeringL2.LvlConverterTool.OutputLevel = DEBUG
-  steeringL2.OutputLevel = VERBOSE
-  topSequence += steeringL2
-else:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIatFixedEtaPhi
-  steeringL2.LvlConverterTool = FakeLvl1RoIatFixedEtaPhi("FakeLvl1RoIatFixedEtaPhi")
-  steeringL2.LvlConverterTool.FakeEmRoiPhi=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiEta=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiLabel="EM10"
-  if not doTimer:
-    steeringL2.LvlConverterTool.OutputLevel = DEBUG
-    steeringL2.OutputLevel = VERBOSE
-  else:
-    steeringL2.LvlConverterTool.OutputLevel = ERROR
-    steeringL2.OutputLevel = ERROR	
-  topSequence += steeringL2
-  
-steeringEF = TrigSteer_EF("TrigSteer_EF", hltFile="newMenu.xml")
-if doTimer:
-  steeringEF.OutputLevel = ERROR
-else:
-  steeringEF.OutputLevel = VERBOSE
-topSequence += steeringEF
-
-#fix to get rid of EF exceptions
-excSvc=Service("ExceptionSvc")
-excSvc.Catch="LIST"
-excSvc.Algorithms=[ "TrigSteer_EF=SUCCESS"]
-
-# -------------------------------------------------------------
-theApp.EvtMax  = 100
-if not doReadBS:
-  ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d38/ID_ValidationData/testIdeal_07.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000201_tid002760._00002.pool.root.1"]
-  #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
-else:
-  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
-# ------------------------------------------------------------
-
-# switch off history service
-ServiceMgr.StoreGateSvc.ActivateHistory = False
-ServiceMgr.StoreGateSvc.Dump            = False
-
-# ------------------------------------------------------------
-# get stack dump
-# ------------------------------------------------------------
-
-ServiceMgr.CoreDumpSvc.FatalHandler = 438
-
-if doAuditors:
- # load AuditorSvc
- theAuditorSvc = AuditorSvc()
- 
- # write out summary of the memory usage
- #   number of events to be skip to detect memory leak
- #   20 is default. May need to be made larger for complete jobs.
- theAuditorSvc.Auditors += [ "ChronoAuditor"]
- ServiceMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 5
- # memory auditors
- theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
- MemStatAuditor = theAuditorSvc.auditor( "MemStatAuditor" )
- MemStatAuditor.OutputLevel = WARNING
- 
-# write out a short message upon entering or leaving each algorithm
-if doNameAuditor:
-  theAuditorSvc.Auditors     += [ "NameAuditor" ]
-  theApp.AuditAlgorithms = True
-  theApp.AuditServices   = True
-  #
-  # Display detailed size and timing statistics for writing and reading
-  #
-if doWriteESD or doWriteAOD:
-  AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" )
-  AthenaPoolCnvSvc.UseDetailChronoStat = True
-     
-#--------------------------------------------------------------
-# run JiveXML
-#--------------------------------------------------------------
-if doJiveXML:
-  include ("JiveXML/JiveXML_jobOptionBase.py")
-  include ("JiveXML/DataTypes_InDet.py")
-
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiClusterRetriever
-  theSiClusterRetriever = JiveXML__SiClusterRetriever (name = "SiClusterRetriever")
-  theSiClusterRetriever.SCTClusters = "SCT_TrigClusters"
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiSpacePointRetriever
-  theSiSpacePointRetriever = JiveXML__SiSpacePointRetriever (name = "SiSpacePointRetriever")
-  theSiSpacePointRetriever.PixelSpacePoints = "PixelTrigSpacePoints"
-  theSiSpacePointRetriever.SCTSpacePoints = "SCT_TrigSpacePoints"
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__TRTRetriever
-  theTRTRetriever = JiveXML__TRTRetriever (name = "TRTRetriever")
-  theTRTRetriever.TRTClusters = "TRT_TrigDriftCircles"
-
-  from TrkJiveXML.TrkJiveXMLConf import JiveXML__TrackRetriever
-  theTrackRetriever = JiveXML__TrackRetriever (name = "TrackRetriever")
-  theTrackRetriever.DoWriteHLT = True
-
-  if doTruth:
-    readG3 = False
-    include ("JiveXML/DataTypes_Truth.py")
-    
-# ------------------------------------------------------------
-# persistency
-# ------------------------------------------------------------
-
-if doWriteAOD: 
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamAOD" ]
-   StreamAOD = Algorithm( "StreamAOD" )
-   StreamAOD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamAOD.OutputFile    = "InDetTrigRecAOD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamAOD.ItemList=[]
-   StreamAOD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetAOD.py" )
-
-if doWriteESD:
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamESD" ]
-   StreamESD = Algorithm( "StreamESD" )
-   StreamESD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamESD.OutputFile    = "InDetTrigRecESD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamESD.ItemList=[]
-   StreamESD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetESD.py" )
-
-from GaudiSvc.GaudiSvcConf import THistSvc
-ServiceMgr += THistSvc()
-if doMonitoring or doTimer:
-    ServiceMgr.THistSvc.Output = [ "EXPERT DATAFILE='expert-monitoring.root'  OPT='RECREATE'" ]
-
-if doTimer:
-    for algo in steeringEF.getChildren():
-      print "HERE", algo.getFullName()
-      algo.doTiming = True
- 
-#######################################################33
-#
-# Testing options
-#######################################################33
-if not doTruth:
-  PixelClustering_EF.EtaHalfWidth = 3.0
-  PixelClustering_EF.PhiHalfWidth = 3.14159
-  #
-  SCTClustering_EF.EtaHalfWidth = 3.0
-  SCTClustering_EF.PhiHalfWidth = 3.14159
-  #
-  TRTDriftCircleMaker_EF.EtaHalfWidth = 3.0
-  TRTDriftCircleMaker_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigSpacePointFinder_EF.EtaHalfWidth = 3.0
-  SiTrigSpacePointFinder_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigTrackFinder_EF.EtaHalfWidth = 3.0
-  SiTrigTrackFinder_EF.PhiHalfWidth = 3.14159
-
-# ------------------------------------------------------------
-# useful debugging/info tools
-# ------------------------------------------------------------
-for algo in steeringEF.getChildren():
-  if not doTimer:
-    algo.OutputLevel = DEBUG
-  else:
-    algo.OutputLevel = ERROR
-
-Algorithm("AANTupleStream").OutputLevel=DEBUG
-ServiceMgr.THistSvc.OutputLevel=DEBUG
-
-if doCBNT:
-  THistSvc = Service ( "THistSvc" )
-  theApp.Dlls   += [ "AnalysisTools" ]
-  AANTupleStream = Algorithm( "AANTupleStream" )
-  #AANTupleStream.ExtraRefNames = [ "StreamESD","StreamRDO" ]
-  AANTupleStream.ExistDataHeader = False
-  AANTupleStream.TreeName = "CollectionTree"
-  AANTupleStream.WriteInputDataHeader = True
-  RootNtupleOutput = "ntuple.root"
-  #RootNtupleOutput = "timing-histograms.root"
-  exec 'AANTupleStream.OutputName= \'%s\' ' % RootNtupleOutput
-  AANTupleStream.OutputName = RootNtupleOutput
-  
-  exec 'THistSvc.Output += ["AANT DATAFILE=\'%s\' OPT=\'RECREATE\'"] ' % RootNtupleOutput
- 
-  include( "CBNT_Athena/CBNT_AthenaAware_jobOptions.py" )
-#  Algorithm("CBNT_AthenaAware").OutputLevel=DEBUG
-  CBNT_AthenaAware.OutputLevel=DEBUG
-  
-  #theApp.TopAlg += ["CBNT_AthenaAware"]
-  theApp.TopAlg += [ "AANTupleStream" ]
-  #include( "RecExCommon/CBNT_Truth_jobOptions.py" )
-  include("TrigNtInDet/jobOfragment_TrigNtInDet.py")
-
-  if (TriggerFlags.doID):
-    theCBNTAA_TrigEFTrackParticle.doDetailedTruth = True
-    theCBNTAA_TrigEFTrackParticle.doTruthCBNT = True
-    theCBNTAA_TrigEFTrackParticle.OutputLevel=DEBUG
-    theCBNTAA_TrigEFVxPrimary.OutputLevel=DEBUG
-    theCBNTAA_TrigEFTrackParticle.doExtrap = True
-
-print topSequence
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
deleted file mode 100755
index 18c51da92ee13dfc809c29f1d2d455ddc1c65ca5..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample.py
+++ /dev/null
@@ -1,526 +0,0 @@
-# migrated to new steering
-#--------------------------------------------------------------
-# Control
-#--------------------------------------------------------------
-
-# control running truth ?
-doTruth         = True #if TRUE running FakeRoIfromKine, if FALSE running FakeLvl1RoIatFixedEtaPhi
-
-# produce an atlantis data file
-doJiveXML       = False
-
-# controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-
-# --- read BS
-doReadBS        = False
-if doReadBS:
-  doTruth = False
-
-# Monitoring flags
-doMonitoring = True
-
-# do auditors ?
-doAuditors   = False
-
-#timing measurements
-doTimer = False
-
-#CBNT
-doCBNT = False
-CBNTAthenaAware = True #must be True, otherwise you don't get an ntuple
-
-
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = INFO
-DetDescrVersion = "ATLAS-CSC-01-02-00" #it has to be defined early enough
-
-import os
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EventDataModel monitor (debug mode only) ?
-  doEdmMonitor    = True
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-  
-#--------------------------------------------------------------
-# --- setup class with default values
-#--------------------------------------------------------------
-from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-InDetTrigFlags.doTruth = doTruth
-InDetTrigFlags.doNewTracking = True
-
-
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import GlobalFlags
-#default is atlas geometry
-GlobalFlags.DetGeo.set_atlas()
-#set defaults
-GlobalFlags.DataSource.set_geant4()
-if 'doReadBS' in dir() and doReadBS:
-  GlobalFlags.InputFormat.set_bytestream()
-else:
-  GlobalFlags.InputFormat.set_pool()    
-#default is zero luminosity
-#GlobalFlags.Luminosity.set_zero()
-# --- printout
-GlobalFlags.Print()
-
-# --- set geometry version (kudge for new jobproperties)
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion = DetDescrVersion
-print globalflags.DetDescrVersion()
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-# --- switch on InnerDetector
-from AthenaCommon.DetFlags import DetFlags 
-DetFlags.ID_setOn()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-if doCBNT:
-	DetFlags.Tile_setOn() #needed for doExtrap in CBNT
-	DetFlags.LAr_setOn() #needed for doExtrap in CBNT
-	include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
-# ---- switch parts of ID off/on as follows
-#DetFlags.makeRIO.pixel_setOff()
-#DetFlags.makeRIO.TRT_setOff()
-#DetFlags.makeRIO.SCT_setOff()
-# --- printout
-DetFlags.Print()
-
-#--------------------------------------------------------------
-# load ServiceMgr, ToolSvc, topSequence
-#--------------------------------------------------------------
-from AthenaCommon.AppMgr import theApp
-from AthenaCommon.AppMgr import ServiceMgr
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-#
-from AthenaCommon.AppMgr import ToolSvc
-
-#--------------------------------------------------------------
-# change MessageSvc
-#--------------------------------------------------------------
-  	 
-# output level
-ServiceMgr.MessageSvc.OutputLevel  = OutputLevel
-# increase the number of letter reserved to the alg/tool name from 18 to 30
-ServiceMgr.MessageSvc.Format       = "% F%50W%S%7W%R%T %0W%M"
-# to change the default limit on number of message
-ServiceMgr.MessageSvc.defaultLimit = 9999999  # all messages
-
-#--------------------------------------------------------------
-# Load POOL support, setup for reconstruction
-#--------------------------------------------------------------
-
-# setup POOL access in ATHENA
-if 'doReadBS' in dir() and doReadBS:
-  include("InDetTrigRecExample/InDetTrigReadBS_jobOptions.py")
-else:
-  import AthenaPoolCnvSvc.ReadAthenaPool
-
-# --- GeoModel
-include("AtlasGeoModel/SetGeometryVersion.py" )
-include("AtlasGeoModel/GeoModelInit.py" )
-# ---- Beam Spot service
-if InDetTrigFlags.useBeamConstraint():
-  include("InDetBeamSpotService/BeamCondSvc.py" )
-
-
-# particle property service
-include( "PartPropSvc/PartPropSvc.py" )
-
-if InDetTrigFlags.doTruth():
-  include ( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-
-#------------------------------------------------------------
-# Event Data Model Monitor works only in dbg build
-#------------------------------------------------------------
-
-if doEdmMonitor:
-  from TrkValAlgs.TrkValAlgsConf import Trk__EventDataModelMonitor
-  InDetTrigEdmMonitor = Trk__EventDataModelMonitor (name = 'InDetTrigEdmMonitor')
-
-  topSequence += InDetTrigEdmMonitor
-  print          InDetTrigEdmMonitor
-  
-#--------------------------------------------------------------
-# Load Inner Detector reconstruction
-#--------------------------------------------------------------
-
-# ID reconstruction
-from InDetTrigRecExample.EFInDetConfig import *
-
-if not doReadBS:
-  electronAlgs = TrigEFIDInsideOut_Electron()
-else:
-  electronAlgs = TrigEFIDInsideOut_FullScan()
-  
-muonAlgs = TrigEFIDInsideOut_Muon() #ok
-tauAlgs = TrigEFIDInsideOut_Tau() #ok
-#electronAlgs = TrigEFIDInsideOut_Bjet() #ok
-#electronAlgs = TrigEFIDInsideOut_Bphysics() #ok
-#electronAlgs = TrigEFIDInsideOut_FullScan()
-#electronAlgs = TrigEFIDInsideOut_MinBias()
-#electronAlgs = TrigEFIDOutsideIn_Photon() #ok
-
-# EF Track hypothesis algorithm for electrons
-from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e10, EFTrackHypo_e15i, EFTrackHypo_e25i, EFTrackHypo_e60
-theEFTrackHypo_e10 =  EFTrackHypo_e10()
-theEFTrackHypo_e15i =  EFTrackHypo_e15i()
-theEFTrackHypo_e25i =  EFTrackHypo_e25i()
-theEFTrackHypo_e60 =  EFTrackHypo_e60()
-
-#--------------------------------------------------------------
-# Region Selector and Trigger 
-#--------------------------------------------------------------
-
-include( "TriggerJobOpts/TriggerFlags.py" )
-include( "RegionSelector/RegionSelector_jobOptions.py" )
-include( "InDetRegionSelector/InDetRegionSelectorTable_jobOptions.py" ) #include it temporarily!
-
-theApp.Dlls += [ "TrigSteeringTest" ]
-theApp.Dlls += [ "TrigTimeAlgs" ]
-
-########################
-# ConfigSvc:
-########################
-
-#######################################################
-# define/generate menu files for HLT
-#######################################################
-
-from TriggerMenuPython.TriggerPythonConfig import *
-menu = TriggerPythonConfig("newMenu.xml", "lvl1Menu.xml")
-############################################################# Electrons
-# fake L1
-item = LVL1MenuItem('L1_EM10', ctpid='1')
-item.addCondition(name='EM10', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='EM10', value='7', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'EM10', ['PESA::dummyAlgo/Egamma'], 'LVL2Out_Electron' )
-menu.addSequence( 'LVL2Out_Electron', electronAlgs.getSequence() + [theEFTrackHypo_e10, theEFTrackHypo_e15i, theEFTrackHypo_e25i, theEFTrackHypo_e60], 
-'EFInDet_Electron' )
-
-#chains
-chain = HLTChain('DummyL2_Electron', '1', 'L1_EM10', 'L2')
-chain.addHLTSignature( 'LVL2Out_Electron' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Electron', '4', 'DummyL2_Electron', 'EF')
-chain.addHLTSignature( 'EFInDet_Electron' )
-chain.addTriggerTypeBit(4)
-chain.addStreamTag('electrons')
-menu.addHLTChain(chain)
-
-############################################################# Muons
-# fake L1
-item = LVL1MenuItem('L1_MU06', ctpid='2')
-item.addCondition(name='MU06', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='MU06', value='6', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'MU06', ['PESA::dummyAlgo/Muon'], 'LVL2Out_Muon' )
-menu.addSequence( 'LVL2Out_Muon', muonAlgs.getSequence(),
-                  'EFInDet_Muon' )
-
-#chains
-chain = HLTChain('DummyL2_Muon', '2', 'L1_MU06', 'L2')
-chain.addHLTSignature( 'LVL2Out_Muon' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Muon', '5', 'DummyL2_Muon', 'EF')
-chain.addHLTSignature( 'EFInDet_Muon' )
-chain.addTriggerTypeBit(5)
-chain.addStreamTag('muons')
-menu.addHLTChain(chain)
-
-############################################################# Jets
-# fake L1
-item = LVL1MenuItem('L1_JET20', ctpid='2')
-item.addCondition(name='JET20', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='JET20', value='20', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'JET20', ['PESA::dummyAlgo/Jet'], 'LVL2Out_Jet' )
-menu.addSequence( 'LVL2Out_Jet', tauAlgs.getSequence(),
-                  'EFInDet_Jet' )
-
-#chains
-chain = HLTChain('DummyL2_Jet', '3', 'L1_JET20', 'L2')
-chain.addHLTSignature( 'LVL2Out_Jet' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Jet', '6', 'DummyL2_Jet', 'EF')
-chain.addHLTSignature( 'EFInDet_Jet' )
-chain.addTriggerTypeBit(34)
-chain.addStreamTag('jets')
-menu.addHLTChain(chain)
-
-menu.writeConfigFiles()
-
-###    Setup  TrigConfigSvc      ###
-####################################
-from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc
-log.info("setting up TrigConfigSvc:")
-svc = SetupTrigConfigSvc()
-svc.hltXmlFile = 'newMenu.xml'
-svc.l1XmlFile  = 'lvl1Menu.xml'
-
-try:
-  svc.SetStates( 'xml' )
-except:
-  log.warning( 'failed to set state of TrigConfigSvc ...')
-try:
-  svc.InitialiseSvc()
-except:
-  log.warning( 'failed to activate TrigConfigSvc ...')
-
-ServiceMgr.TrigConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.HLTConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.LVL1ConfigSvc.OutputLevel=VERBOSE
-
-#######################################################
-from TrigSteering.TrigSteeringConfig import TrigSteer_L2,TrigSteer_EF
-
-steeringL2 = TrigSteer_L2("TrigSteer_L2", hltFile="newMenu.xml")
-
-if doTruth:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIfromKine
-  steeringL2.LvlConverterTool = FakeLvl1RoIfromKine("FakeLvl1RoIfromKine")
-  steeringL2.LvlConverterTool.FakeEmTauRoiParticleIDs=[11,-11]
-  steeringL2.LvlConverterTool.FakeMuonRoiParticleIDs=[13,-13]
-  steeringL2.LvlConverterTool.FakeJetRoiParticleIDs=[15,-15]
-  steeringL2.LvlConverterTool.FakeEmTauRoiPtMin=5*GeV
-  steeringL2.LvlConverterTool.McEventCollectionName = "TruthEvent"
-  steeringL2.LvlConverterTool.OutputLevel = DEBUG
-  steeringL2.OutputLevel = VERBOSE
-  topSequence += steeringL2
-else:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIatFixedEtaPhi
-  steeringL2.LvlConverterTool = FakeLvl1RoIatFixedEtaPhi("FakeLvl1RoIatFixedEtaPhi")
-  steeringL2.LvlConverterTool.FakeEmRoiPhi=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiEta=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiLabel="EM10"
-  if not doTimer:
-    steeringL2.LvlConverterTool.OutputLevel = DEBUG
-    steeringL2.OutputLevel = VERBOSE
-  else:
-    steeringL2.LvlConverterTool.OutputLevel = ERROR
-    steeringL2.OutputLevel = ERROR	
-  topSequence += steeringL2
-  
-steeringEF = TrigSteer_EF("TrigSteer_EF", hltFile="newMenu.xml")
-if doTimer:
-  steeringEF.OutputLevel = ERROR
-else:
-  steeringEF.OutputLevel = INFO
-topSequence += steeringEF
-
-#fix to get rid of EF exceptions
-excSvc=Service("ExceptionSvc")
-excSvc.Catch="LIST"
-excSvc.Algorithms=[ "TrigSteer_EF=SUCCESS"]
-
-# -------------------------------------------------------------
-theApp.EvtMax  = 1000
-if not doReadBS:
-  ServiceMgr.PoolSvc.AttemptCatalogPatch=True
-  ServiceMgr.EventSelector.InputCollections = ["rfio:/castor/cern.ch/user/e/enzuobon/RTT/RTTdata/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00001.pool.root.4"]
-  #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
-else:
-  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
-# ------------------------------------------------------------
-
-# switch off history service
-ServiceMgr.StoreGateSvc.ActivateHistory = False
-ServiceMgr.StoreGateSvc.Dump            = False
-
-# ------------------------------------------------------------
-# get stack dump
-# ------------------------------------------------------------
-
-ServiceMgr.CoreDumpSvc.FatalHandler = 438
-         
-if doAuditors:
- # load AuditorSvc
- theAuditorSvc = AuditorSvc()
- 
- # write out summary of the memory usage
- #   number of events to be skip to detect memory leak
- #   20 is default. May need to be made larger for complete jobs.
- theAuditorSvc.Auditors += [ "ChronoAuditor"]
- ServiceMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 5
- # memory auditors
- theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
- MemStatAuditor = theAuditorSvc.auditor( "MemStatAuditor" )
- MemStatAuditor.OutputLevel = WARNING
- 
-# write out a short message upon entering or leaving each algorithm
-if doNameAuditor:
-  theAuditorSvc.Auditors     += [ "NameAuditor" ]
-  theApp.AuditAlgorithms = True
-  theApp.AuditServices   = True
-  #
-  # Display detailed size and timing statistics for writing and reading
-  #
-if doWriteESD or doWriteAOD:
-  AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" )
-  AthenaPoolCnvSvc.UseDetailChronoStat = True
-     
-#--------------------------------------------------------------
-# run JiveXML
-#--------------------------------------------------------------
-if doJiveXML:
-  include ("JiveXML/JiveXML_jobOptionBase.py")
-  include ("JiveXML/DataTypes_InDet.py")
-
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiClusterRetriever
-  theSiClusterRetriever = JiveXML__SiClusterRetriever (name = "SiClusterRetriever")
-  theSiClusterRetriever.SCTClusters = "SCT_TrigClusters"
-  print theSiClusterRetriever
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiSpacePointRetriever
-  theSiSpacePointRetriever = JiveXML__SiSpacePointRetriever (name = "SiSpacePointRetriever")
-  theSiSpacePointRetriever.PixelSpacePoints = "PixelTrigSpacePoints"
-  theSiSpacePointRetriever.SCTSpacePoints = "SCT_TrigSpacePoints"
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__TRTRetriever
-  theTRTRetriever = JiveXML__TRTRetriever (name = "TRTRetriever")
-  theTRTRetriever.TRTClusters = "TRT_TrigDriftCircles"
-
-  from TrkJiveXML.TrkJiveXMLConf import JiveXML__TrackRetriever
-  theTrackRetriever = JiveXML__TrackRetriever (name = "TrackRetriever")
-  theTrackRetriever.DoWriteHLT = True
-
-  if doTruth:
-    readG3 = False
-    include ("JiveXML/DataTypes_Truth.py")
-    
-# ------------------------------------------------------------
-# persistency
-# ------------------------------------------------------------
-
-if doWriteAOD: 
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamAOD" ]
-   StreamAOD = Algorithm( "StreamAOD" )
-   StreamAOD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamAOD.OutputFile    = "InDetTrigRecAOD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamAOD.ItemList=[]
-   StreamAOD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetAOD.py" )
-
-if doWriteESD:
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamESD" ]
-   StreamESD = Algorithm( "StreamESD" )
-   StreamESD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamESD.OutputFile    = "InDetTrigRecESD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamESD.ItemList=[]
-   StreamESD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetESD.py" )
-
-if doMonitoring or doTimer:
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  ServiceMgr += THistSvc()
-  ServiceMgr.THistSvc.Output = [ "EXPERT DATAFILE='expert-monitoring.root'  OPT='RECREATE'" ]
-
-if doTimer:
-  for algo in steeringEF.getChildren():
-    print "HERE", algo.getFullName()
-    algo.doTiming = True
-    
-#######################################################33
-#
-# Testing options
-#######################################################33
-if not doTruth:
-  PixelClustering_EF.EtaHalfWidth = 3.0
-  PixelClustering_EF.PhiHalfWidth = 3.14159
-  #
-  SCTClustering_EF.EtaHalfWidth = 3.0
-  SCTClustering_EF.PhiHalfWidth = 3.14159
-  #
-  TRTDriftCircleMaker_EF.EtaHalfWidth = 3.0
-  TRTDriftCircleMaker_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigSpacePointFinder_EF.EtaHalfWidth = 3.0
-  SiTrigSpacePointFinder_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigTrackFinder_EF.EtaHalfWidth = 3.0
-  SiTrigTrackFinder_EF.PhiHalfWidth = 3.14159
-
-# ------------------------------------------------------------
-# useful debugging/info tools
-# ------------------------------------------------------------
-for algo in steeringEF.getChildren():
-  if not doTimer:
-    algo.OutputLevel = INFO
-  else:
-    algo.OutputLevel = ERROR
-
-Algorithm("AANTupleStream").OutputLevel=INFO
-
-if doCBNT:
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  ServiceMgr += THistSvc()
-  theApp.Dlls   += [ "AnalysisTools" ]
-  AANTupleStream = Algorithm( "AANTupleStream" )
-  #AANTupleStream.ExtraRefNames = [ "StreamESD","StreamRDO" ]
-  AANTupleStream.ExistDataHeader = False
-  AANTupleStream.TreeName = "CollectionTree"
-  AANTupleStream.WriteInputDataHeader = True
-  RootNtupleOutput = "ntuple.root"
-  #RootNtupleOutput = "timing-histograms.root"
-  exec 'AANTupleStream.OutputName= \'%s\' ' % RootNtupleOutput
-  AANTupleStream.OutputName = RootNtupleOutput
-  
-  exec 'ServiceMgr.THistSvc.Output += ["AANT DATAFILE=\'%s\' OPT=\'RECREATE\'"] ' % RootNtupleOutput
- 
-  include( "CBNT_Athena/CBNT_AthenaAware_jobOptions.py" )
-  
-
-  theApp.TopAlg += [ "AANTupleStream" ]
-  include("TrigNtInDet/jobOfragment_TrigNtInDet.py")
-  CBNT_TrigEFTrackParticle.doDetailedTruth = True
-  CBNT_TrigEFTrackParticle.doTruthCBNT = True
-  CBNT_TrigEFTrackParticle.doExtrap = True
-  CBNT_TrigEFTrackParticle.OutputLevel=DEBUG
-
-
-print topSequence
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
deleted file mode 100755
index 61515232d5082d0ba6bf0b7fe7b40699f3a1737b..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_backTracking.py
+++ /dev/null
@@ -1,484 +0,0 @@
-# migrated to new steering
-#--------------------------------------------------------------
-# Control
-#--------------------------------------------------------------
-
-# control running truth ?
-doTruth         = True #if TRUE running FakeRoIfromKine, if FALSE running FakeLvl1RoIatFixedEtaPhi
-
-# produce an atlantis data file
-doJiveXML       = False
-
-# controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-
-# --- read BS
-doReadBS        = False
-if doReadBS:
-  doTruth = False
-
-# Monitoring flags
-doMonitoring = True
-
-# do auditors ?
-doAuditors   = False
-
-#timing measurements
-doTimer = False
-
-#CBNT
-doCBNT = False
-CBNTAthenaAware = True #must be True, otherwise you don't get an ntuple
-
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = INFO
-DetDescrVersion = "ATLAS-CSC-01-02-00"
-
-import os
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EventDataModel monitor (debug mode only) ?
-  doEdmMonitor    = True
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-  
-#--------------------------------------------------------------
-# --- setup class with default values
-#--------------------------------------------------------------
-from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-InDetTrigFlags.doTruth = doTruth
-InDetTrigFlags.doNewTracking = True
-
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import GlobalFlags
-#default is atlas geometry
-GlobalFlags.DetGeo.set_atlas()
-#set defaults
-GlobalFlags.DataSource.set_geant4()
-if 'doReadBS' in dir() and doReadBS:
-  GlobalFlags.InputFormat.set_bytestream()
-else:
-  GlobalFlags.InputFormat.set_pool()    
-#default is zero luminosity
-#GlobalFlags.Luminosity.set_zero()
-# --- printout
-GlobalFlags.Print()
-
-# --- set geometry version (kudge for new jobproperties)
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion = DetDescrVersion
-print globalflags.DetDescrVersion()
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-# --- switch on InnerDetector
-from AthenaCommon.DetFlags import DetFlags 
-DetFlags.ID_setOn()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-if doCBNT:
-	DetFlags.Tile_setOn() #needed for doExtrap in CBNT
-	DetFlags.LAr_setOn() #needed for doExtrap in CBNT
-	include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
-# ---- switch parts of ID off/on as follows
-#DetFlags.makeRIO.pixel_setOff()
-#DetFlags.makeRIO.TRT_setOff()
-#DetFlags.makeRIO.SCT_setOff()
-# --- printout
-DetFlags.Print()
-
-#--------------------------------------------------------------
-# load ServiceMgr, ToolSvc, topSequence
-#--------------------------------------------------------------
-from AthenaCommon.AppMgr import theApp
-from AthenaCommon.AppMgr import ServiceMgr
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-#
-from AthenaCommon.AppMgr import ToolSvc
-
-#--------------------------------------------------------------
-# change MessageSvc
-#--------------------------------------------------------------
-  	 
-# output level
-ServiceMgr.MessageSvc.OutputLevel  = OutputLevel
-# increase the number of letter reserved to the alg/tool name from 18 to 30
-ServiceMgr.MessageSvc.Format       = "% F%50W%S%7W%R%T %0W%M"
-# to change the default limit on number of message
-ServiceMgr.MessageSvc.defaultLimit = 9999999  # all messages
-
-#--------------------------------------------------------------
-# Load POOL support, setup for reconstruction
-#--------------------------------------------------------------
-
-# setup POOL access in ATHENA
-if 'doReadBS' in dir() and doReadBS:
-  include("InDetTrigRecExample/InDetTrigReadBS_jobOptions.py")
-else:
-  import AthenaPoolCnvSvc.ReadAthenaPool
-
-# --- GeoModel
-include("AtlasGeoModel/SetGeometryVersion.py" )
-include("AtlasGeoModel/GeoModelInit.py" )
-# ---- Beam Spot service
-if InDetTrigFlags.useBeamConstraint():
-  include("InDetBeamSpotService/BeamCondSvc.py" )
-
-
-
-# particle property service
-include( "PartPropSvc/PartPropSvc.py" )
-
-if InDetTrigFlags.doTruth():
-  include ( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-
-#------------------------------------------------------------
-# Event Data Model Monitor works only in dbg build
-#------------------------------------------------------------
-
-if doEdmMonitor:
-  from TrkValAlgs.TrkValAlgsConf import Trk__EventDataModelMonitor
-  InDetTrigEdmMonitor = Trk__EventDataModelMonitor (name = 'InDetTrigEdmMonitor')
-
-  topSequence += InDetTrigEdmMonitor
-  print          InDetTrigEdmMonitor
-  
-#--------------------------------------------------------------
-# Load Inner Detector reconstruction
-#--------------------------------------------------------------
-
-# ID reconstruction
-from InDetTrigRecExample.EFInDetConfig import *
-
-if not doReadBS:
-  electronAlgs = TrigEFIDOutsideIn_Photon()
-else:
-  electronAlgs = TrigEFIDOutsideIn_Photon()
-  
-#muonAlgs = TrigEFIDInsideOut_Muon() #ok
-#tauAlgs = TrigEFIDInsideOut_Tau() #ok
-#electronAlgs = TrigEFIDInsideOut_Bjet() #ok
-#electronAlgs = TrigEFIDInsideOut_Bphysics() #ok
-#electronAlgs = TrigEFIDInsideOut_FullScan()
-#electronAlgs = TrigEFIDInsideOut_MinBias()
-#electronAlgs = TrigEFIDOutsideIn_Photon() #ok
-
-# EF Track hypothesis algorithm for electrons
-#from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e10, EFTrackHypo_e15i, EFTrackHypo_e25i, EFTrackHypo_e60
-#theEFTrackHypo_e10 =  EFTrackHypo_e10()
-#theEFTrackHypo_e15i =  EFTrackHypo_e15i()
-#theEFTrackHypo_e25i =  EFTrackHypo_e25i()
-#theEFTrackHypo_e60 =  EFTrackHypo_e60()
-
-#--------------------------------------------------------------
-# Region Selector and Trigger 
-#--------------------------------------------------------------
-
-include( "TriggerJobOpts/TriggerFlags.py" )
-include( "RegionSelector/RegionSelector_jobOptions.py" )
-include( "InDetRegionSelector/InDetRegionSelectorTable_jobOptions.py" ) #include it temporarily!
-
-theApp.Dlls += [ "TrigSteeringTest" ]
-theApp.Dlls += [ "TrigTimeAlgs" ]
-
-########################
-# ConfigSvc:
-########################
-
-#######################################################
-# define/generate menu files for HLT
-#######################################################
-
-from TriggerMenuPython.TriggerPythonConfig import *
-menu = TriggerPythonConfig("newMenu.xml", "lvl1Menu.xml")
-############################################################# Electrons/Photons
-# fake L1
-item = LVL1MenuItem('L1_EM10', ctpid='1')
-item.addCondition(name='EM10', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='EM10', value='7', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'EM10', ['PESA::dummyAlgo/Egamma'], 'LVL2Out_Electron' )
-menu.addSequence( 'LVL2Out_Electron', electronAlgs.getSequence(), 
-'EFInDet_Electron' )
-
-#chains
-chain = HLTChain('DummyL2_Electron', '1', 'L1_EM10', 'L2')
-chain.addHLTSignature( 'LVL2Out_Electron' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Electron', '4', 'DummyL2_Electron', 'EF')
-chain.addHLTSignature( 'EFInDet_Electron' )
-chain.addTriggerTypeBit(4)
-chain.addStreamTag('electrons')
-menu.addHLTChain(chain)
-
-menu.writeConfigFiles()
-
-
-
-###    Setup  TrigConfigSvc      ###
-####################################
-from TrigConfigSvc.TrigConfigSvcConfig import SetupTrigConfigSvc
-log.info("setting up TrigConfigSvc:")
-svc = SetupTrigConfigSvc()
-svc.hltXmlFile = 'newMenu.xml'
-svc.l1XmlFile  = 'lvl1Menu.xml'
-
-try:
-  svc.SetStates( 'xml' )
-except:
-  log.warning( 'failed to set state of TrigConfigSvc ...')
-try:
-  svc.InitialiseSvc()
-except:
-  log.warning( 'failed to activate TrigConfigSvc ...')
-    
-ServiceMgr.TrigConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.HLTConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.LVL1ConfigSvc.OutputLevel=VERBOSE
-    
-
-
-#######################################################
-from TrigSteering.TrigSteeringConfig import TrigSteer_L2,TrigSteer_EF
-
-steeringL2 = TrigSteer_L2("TrigSteer_L2", hltFile="newMenu.xml")
-
-if doTruth:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIfromKine
-  steeringL2.LvlConverterTool = FakeLvl1RoIfromKine("FakeLvl1RoIfromKine")
-  steeringL2.LvlConverterTool.FakeEmTauRoiParticleIDs=[11,-11]
-  #steeringL2.LvlConverterTool.FakeMuonRoiParticleIDs=[13,-13]
-  #steeringL2.LvlConverterTool.FakeJetRoiParticleIDs=[15,-15]
-  steeringL2.LvlConverterTool.FakeEmTauRoiPtMin=5*GeV
-  steeringL2.LvlConverterTool.McEventCollectionName = "TruthEvent"
-  steeringL2.LvlConverterTool.OutputLevel = DEBUG
-  steeringL2.OutputLevel = VERBOSE
-  topSequence += steeringL2
-else:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIatFixedEtaPhi
-  steeringL2.LvlConverterTool = FakeLvl1RoIatFixedEtaPhi("FakeLvl1RoIatFixedEtaPhi")
-  steeringL2.LvlConverterTool.FakeEmRoiPhi=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiEta=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiLabel="EM10"
-  if not doTimer:
-    steeringL2.LvlConverterTool.OutputLevel = DEBUG
-    steeringL2.OutputLevel = VERBOSE
-  else:
-    steeringL2.LvlConverterTool.OutputLevel = ERROR
-    steeringL2.OutputLevel = ERROR	
-  topSequence += steeringL2
-  
-steeringEF = TrigSteer_EF("TrigSteer_EF", hltFile="newMenu.xml")
-if doTimer:
-  steeringEF.OutputLevel = ERROR
-else:
-  steeringEF.OutputLevel = VERBOSE
-topSequence += steeringEF
-
-#fix to get rid of EF exceptions
-excSvc=Service("ExceptionSvc")
-excSvc.Catch="LIST"
-excSvc.Algorithms=[ "TrigSteer_EF=SUCCESS"]
-
-# -------------------------------------------------------------
-theApp.EvtMax  = 1000
-if not doReadBS:
-  ServiceMgr.PoolSvc.AttemptCatalogPatch=True
-  ServiceMgr.EventSelector.InputCollections = ["rfio:/castor/cern.ch/user/e/enzuobon/RTT/RTTdata/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00001.pool.root.4"]
-  #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
-else:
-  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/data/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.bs-lvl1sim.v12000301_tid003138._00001.pool.root"]
-# ------------------------------------------------------------
-
-# switch off history service
-ServiceMgr.StoreGateSvc.ActivateHistory = False
-ServiceMgr.StoreGateSvc.Dump            = False
-
-# ------------------------------------------------------------
-# get stack dump
-# ------------------------------------------------------------
-
-ServiceMgr.CoreDumpSvc.FatalHandler = 438
-
-if doAuditors:
- # load AuditorSvc
- theAuditorSvc = AuditorSvc()
- 
- # write out summary of the memory usage
- #   number of events to be skip to detect memory leak
- #   20 is default. May need to be made larger for complete jobs.
- theAuditorSvc.Auditors += [ "ChronoAuditor"]
- ServiceMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 5
- # memory auditors
- theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
- MemStatAuditor = theAuditorSvc.auditor( "MemStatAuditor" )
- MemStatAuditor.OutputLevel = WARNING
- 
-# write out a short message upon entering or leaving each algorithm
-if doNameAuditor:
-  theAuditorSvc.Auditors     += [ "NameAuditor" ]
-  theApp.AuditAlgorithms = True
-  theApp.AuditServices   = True
-  #
-  # Display detailed size and timing statistics for writing and reading
-  #
-if doWriteESD or doWriteAOD:
-  AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" )
-  AthenaPoolCnvSvc.UseDetailChronoStat = True
-     
-#--------------------------------------------------------------
-# run JiveXML
-#--------------------------------------------------------------
-if doJiveXML:
-  include ("JiveXML/JiveXML_jobOptionBase.py")
-  include ("JiveXML/DataTypes_InDet.py")
-
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiClusterRetriever
-  theSiClusterRetriever = JiveXML__SiClusterRetriever (name = "SiClusterRetriever")
-  theSiClusterRetriever.SCTClusters = "SCT_TrigClusters"
-  print theSiClusterRetriever
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiSpacePointRetriever
-  theSiSpacePointRetriever = JiveXML__SiSpacePointRetriever (name = "SiSpacePointRetriever")
-  theSiSpacePointRetriever.PixelSpacePoints = "PixelTrigSpacePoints"
-  theSiSpacePointRetriever.SCTSpacePoints = "SCT_TrigSpacePoints"
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__TRTRetriever
-  theTRTRetriever = JiveXML__TRTRetriever (name = "TRTRetriever")
-  theTRTRetriever.TRTClusters = "TRT_TrigDriftCircles"
-
-  from TrkJiveXML.TrkJiveXMLConf import JiveXML__TrackRetriever
-  theTrackRetriever = JiveXML__TrackRetriever (name = "TrackRetriever")
-  theTrackRetriever.DoWriteHLT = True
-
-  if doTruth:
-    readG3 = False
-    include ("JiveXML/DataTypes_Truth.py")
-    
-# ------------------------------------------------------------
-# persistency
-# ------------------------------------------------------------
-
-if doWriteAOD: 
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamAOD" ]
-   StreamAOD = Algorithm( "StreamAOD" )
-   StreamAOD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamAOD.OutputFile    = "InDetTrigRecAOD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamAOD.ItemList=[]
-   StreamAOD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetAOD.py" )
-
-if doWriteESD:
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamESD" ]
-   StreamESD = Algorithm( "StreamESD" )
-   StreamESD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamESD.OutputFile    = "InDetTrigRecESD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamESD.ItemList=[]
-   StreamESD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetESD.py" )
-
-from GaudiSvc.GaudiSvcConf import THistSvc
-ServiceMgr += THistSvc()
-if doMonitoring or doTimer:
-    ServiceMgr.THistSvc.Output = [ "EXPERT DATAFILE='expert-monitoring.root'  OPT='RECREATE'" ]
-
-if doTimer:
-    for algo in steeringEF.getChildren():
-      print "HERE", algo.getFullName()
-      algo.doTiming = True
- 
-#######################################################33
-#
-# Testing options
-#######################################################33
-if not doTruth:
-  PixelClustering_EF.EtaHalfWidth = 3.0
-  PixelClustering_EF.PhiHalfWidth = 3.14159
-  #
-  SCTClustering_EF.EtaHalfWidth = 3.0
-  SCTClustering_EF.PhiHalfWidth = 3.14159
-  #
-  TRTDriftCircleMaker_EF.EtaHalfWidth = 3.0
-  TRTDriftCircleMaker_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigSpacePointFinder_EF.EtaHalfWidth = 3.0
-  SiTrigSpacePointFinder_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigTrackFinder_EF.EtaHalfWidth = 3.0
-  SiTrigTrackFinder_EF.PhiHalfWidth = 3.14159
-
-# ------------------------------------------------------------
-# useful debugging/info tools
-# ------------------------------------------------------------
-for algo in steeringEF.getChildren():
-  if not doTimer:
-    algo.OutputLevel = DEBUG
-  else:
-    algo.OutputLevel = ERROR
-
-Algorithm("AANTupleStream").OutputLevel=DEBUG
-ServiceMgr.THistSvc.OutputLevel=DEBUG
-
-if doCBNT:
-  THistSvc = Service ( "THistSvc" )
-  theApp.Dlls   += [ "AnalysisTools" ]
-  AANTupleStream = Algorithm( "AANTupleStream" )
-  #AANTupleStream.ExtraRefNames = [ "StreamESD","StreamRDO" ]
-  AANTupleStream.ExistDataHeader = False
-  AANTupleStream.TreeName = "CollectionTree"
-  AANTupleStream.WriteInputDataHeader = True
-  RootNtupleOutput = "ntuple.root"
-  #RootNtupleOutput = "timing-histograms.root"
-  exec 'AANTupleStream.OutputName= \'%s\' ' % RootNtupleOutput
-  AANTupleStream.OutputName = RootNtupleOutput
-  
-  exec 'THistSvc.Output += ["AANT DATAFILE=\'%s\' OPT=\'RECREATE\'"] ' % RootNtupleOutput
- 
-  include( "CBNT_Athena/CBNT_AthenaAware_jobOptions.py" )
-#  Algorithm("CBNT_AthenaAware").OutputLevel=DEBUG
-  CBNT_AthenaAware.OutputLevel=DEBUG
-  
-  #theApp.TopAlg += ["CBNT_AthenaAware"]
-  theApp.TopAlg += [ "AANTupleStream" ]
-  #include( "RecExCommon/CBNT_Truth_jobOptions.py" )
-  include("TrigNtInDet/jobOfragment_TrigNtInDet.py")
-
-  if (TriggerFlags.doID):
-    theCBNTAA_TrigEFTrackParticle.doDetailedTruth = True
-    theCBNTAA_TrigEFTrackParticle.doTruthCBNT = True
-    theCBNTAA_TrigEFTrackParticle.OutputLevel=DEBUG
-    theCBNTAA_TrigEFVxPrimary.OutputLevel=DEBUG
-    theCBNTAA_TrigEFTrackParticle.doExtrap = True
-
-print topSequence
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
deleted file mode 100755
index a4b72d0cd66d9f21fa9ba8d4ec2d2aa2995f0c7c..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/jobOptions_RTT_InDetTrigRecExample_doReadBS.py
+++ /dev/null
@@ -1,536 +0,0 @@
-# migrated to new steering
-#--------------------------------------------------------------
-# Control
-#--------------------------------------------------------------
-
-# control running truth ?
-doTruth         = True #if TRUE running FakeRoIfromKine, if FALSE running FakeLvl1RoIatFixedEtaPhi
-
-# produce an atlantis data file
-doJiveXML       = False
-
-# controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-
-# --- read BS
-doReadBS        = True
-if doReadBS:
-  doTruth = False
-
-# Monitoring flags
-doMonitoring = False
-
-# do auditors ?
-doAuditors   = False
-
-#timing measurements
-doTimer = True
-
-#CBNT
-doCBNT = False
-CBNTAthenaAware = True #must be True, otherwise you don't get an ntuple
-
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = INFO
-#DetDescrVersion = "ATLAS-DC3-07" #it has to be defined early enough
-DetDescrVersion = "ATLAS-CSC-01-02-00"
-
-from IOVDbSvc.CondDB import conddb
-conddb.setGlobalTag('OFLCOND-CSC-00-00-00')
-
-
-import os
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EventDataModel monitor (debug mode only) ?
-  doEdmMonitor    = True
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-  
-#--------------------------------------------------------------
-# --- setup class with default values
-#--------------------------------------------------------------
-from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-InDetTrigFlags.doTruth = doTruth
-InDetTrigFlags.doNewTracking = True
-
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import GlobalFlags
-#default is atlas geometry
-GlobalFlags.DetGeo.set_atlas()
-#set defaults
-GlobalFlags.DataSource.set_geant4()
-if 'doReadBS' in dir() and doReadBS:
-  GlobalFlags.InputFormat.set_bytestream()
-else:
-  GlobalFlags.InputFormat.set_pool()    
-#default is zero luminosity
-#GlobalFlags.Luminosity.set_zero()
-# --- printout
-GlobalFlags.Print()
-
-# --- set geometry version (kudge for new jobproperties)
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetDescrVersion = DetDescrVersion
-print globalflags.DetDescrVersion()
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-# --- switch on InnerDetector
-from AthenaCommon.DetFlags import DetFlags 
-DetFlags.ID_setOn()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-if doCBNT:
-	DetFlags.Tile_setOn() #needed for doExtrap in CBNT
-	DetFlags.LAr_setOn() #needed for doExtrap in CBNT
-	include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
-# ---- switch parts of ID off/on as follows
-#DetFlags.makeRIO.pixel_setOff()
-#DetFlags.makeRIO.TRT_setOff()
-#DetFlags.makeRIO.SCT_setOff()
-# --- printout
-DetFlags.Print()
-
-#--------------------------------------------------------------
-# load ServiceMgr, ToolSvc, topSequence
-#--------------------------------------------------------------
-from AthenaCommon.AppMgr import theApp
-from AthenaCommon.AppMgr import ServiceMgr
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-#
-from AthenaCommon.AppMgr import ToolSvc
-
-#--------------------------------------------------------------
-# change MessageSvc
-#--------------------------------------------------------------
-  	 
-# output level
-ServiceMgr.MessageSvc.OutputLevel  = OutputLevel
-# increase the number of letter reserved to the alg/tool name from 18 to 30
-ServiceMgr.MessageSvc.Format       = "% F%50W%S%7W%R%T %0W%M"
-# to change the default limit on number of message
-ServiceMgr.MessageSvc.defaultLimit = 9999999  # all messages
-
-#--------------------------------------------------------------
-# Load POOL support, setup for reconstruction
-#--------------------------------------------------------------
-
-# setup POOL access in ATHENA
-if 'doReadBS' in dir() and doReadBS:
-  include("InDetTrigRecExample/InDetTrigReadBS_jobOptions.py")
-else:
-  import AthenaPoolCnvSvc.ReadAthenaPool
-
-# --- GeoModel
-include("AtlasGeoModel/SetGeometryVersion.py" )
-include("AtlasGeoModel/GeoModelInit.py" )
-# ---- Beam Spot service
-if InDetTrigFlags.useBeamConstraint():
-  include("InDetBeamSpotService/BeamCondSvc.py" )
-
-
-# particle property service
-include( "PartPropSvc/PartPropSvc.py" )
-
-if InDetTrigFlags.doTruth():
-  include ( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-
-#------------------------------------------------------------
-# Event Data Model Monitor works only in dbg build
-#------------------------------------------------------------
-
-if doEdmMonitor:
-  from TrkValAlgs.TrkValAlgsConf import Trk__EventDataModelMonitor
-  InDetTrigEdmMonitor = Trk__EventDataModelMonitor (name = 'InDetTrigEdmMonitor')
-
-  topSequence += InDetTrigEdmMonitor
-  print          InDetTrigEdmMonitor
-  
-#--------------------------------------------------------------
-# Load Inner Detector reconstruction
-#--------------------------------------------------------------
-
-# ID reconstruction
-from InDetTrigRecExample.EFInDetConfig import *
-
-if not doReadBS:
-  electronAlgs = TrigEFIDInsideOut_Electron()
-else:
-  electronAlgs = TrigEFIDInsideOut_FullScan()
-  
-muonAlgs = TrigEFIDInsideOut_Muon() #ok
-tauAlgs = TrigEFIDInsideOut_Tau() #ok
-#electronAlgs = TrigEFIDInsideOut_Bjet() #ok
-#electronAlgs = TrigEFIDInsideOut_Bphysics() #ok
-#electronAlgs = TrigEFIDInsideOut_FullScan()
-#electronAlgs = TrigEFIDInsideOut_MinBias()
-#electronAlgs = TrigEFIDOutsideIn_Photon() #ok
-
-# EF Track hypothesis algorithm for electrons
-from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e10, EFTrackHypo_e15i, EFTrackHypo_e25i, EFTrackHypo_e60
-theEFTrackHypo_e10 =  EFTrackHypo_e10()
-theEFTrackHypo_e15i =  EFTrackHypo_e15i()
-theEFTrackHypo_e25i =  EFTrackHypo_e25i()
-theEFTrackHypo_e60 =  EFTrackHypo_e60()
-
-#--------------------------------------------------------------
-# Region Selector and Trigger 
-#--------------------------------------------------------------
-
-include( "TriggerJobOpts/TriggerFlags.py" )
-include( "RegionSelector/RegionSelector_jobOptions.py" )
-include( "InDetRegionSelector/InDetRegionSelectorTable_jobOptions.py" ) #include it temporarily!
-
-theApp.Dlls += [ "TrigSteeringTest" ]
-theApp.Dlls += [ "TrigTimeAlgs" ]
-
-########################
-# ConfigSvc:
-########################
-
-#######################################################
-# define/generate menu files for HLT
-#######################################################
-
-from TrigConfigSvc.TriggerPythonConfig import *
-menu = TriggerPythonConfig("newMenu.xml", "lvl1Menu.xml")
-############################################################# Electrons
-# fake L1
-item = LVL1MenuItem('L1_EM10', ctpid='1')
-item.addCondition(name='EM10', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='EM10', value='7', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'EM10', ['PESA::dummyAlgo/Egamma'], 'LVL2Out_Electron' )
-menu.addSequence( 'LVL2Out_Electron', electronAlgs.getSequence() + [theEFTrackHypo_e10, theEFTrackHypo_e15i, theEFTrackHypo_e25i, theEFTrackHypo_e60], 
-'EFInDet_Electron' )
-
-#chains
-chain = HLTChain('DummyL2_Electron', '1', 'L1_EM10', 'L2')
-chain.addHLTSignature( 'LVL2Out_Electron' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Electron', '4', 'DummyL2_Electron', 'EF')
-chain.addHLTSignature( 'EFInDet_Electron' )
-chain.addTriggerTypeBit(4)
-chain.addStreamTag('electrons')
-menu.addHLTChain(chain)
-
-############################################################# Muons
-# fake L1
-item = LVL1MenuItem('L1_MU06', ctpid='2')
-item.addCondition(name='MU06', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='MU06', value='6', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'MU06', ['PESA::dummyAlgo/Muon'], 'LVL2Out_Muon' )
-menu.addSequence( 'LVL2Out_Muon', muonAlgs.getSequence(),
-                  'EFInDet_Muon' )
-
-#chains
-chain = HLTChain('DummyL2_Muon', '2', 'L1_MU06', 'L2')
-chain.addHLTSignature( 'LVL2Out_Muon' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Muon', '5', 'DummyL2_Muon', 'EF')
-chain.addHLTSignature( 'EFInDet_Muon' )
-chain.addTriggerTypeBit(5)
-chain.addStreamTag('muons')
-menu.addHLTChain(chain)
-
-############################################################# Jets
-# fake L1
-item = LVL1MenuItem('L1_JET20', ctpid='2')
-item.addCondition(name='JET20', multi='1')
-menu.addLVL1Item( item )
-menu.addEMThreshold(name='JET20', value='20', range_begin='1', range_end='2' )
-
-# sequence
-menu.addSequence( 'JET20', ['PESA::dummyAlgo/Jet'], 'LVL2Out_Jet' )
-menu.addSequence( 'LVL2Out_Jet', tauAlgs.getSequence(),
-                  'EFInDet_Jet' )
-
-#chains
-chain = HLTChain('DummyL2_Jet', '3', 'L1_JET20', 'L2')
-chain.addHLTSignature( 'LVL2Out_Jet' )
-chain.addTriggerTypeBit(0)
-chain.addStreamTag('fake')
-menu.addHLTChain(chain)
-
-chain = HLTChain('SingleMC_Jet', '6', 'DummyL2_Jet', 'EF')
-chain.addHLTSignature( 'EFInDet_Jet' )
-chain.addTriggerTypeBit(34)
-chain.addStreamTag('jets')
-menu.addHLTChain(chain)
-
-menu.writeConfigFiles()
-
-###    Setup  TrigConfigSvc      ###
-####################################
-from TriggerMenuPython.TriggerPythonConfig import SetupTrigConfigSvc
-log.info("setting up TrigConfigSvc:")
-svc = SetupTrigConfigSvc()
-svc.hltXmlFile = 'newMenu.xml'
-svc.l1XmlFile  = 'lvl1Menu.xml'
-
-try:
-  svc.SetStates( 'xml' )
-except:
-  log.warning( 'failed to set state of TrigConfigSvc ...')
-try:
-  svc.InitialiseSvc()
-except:
-  log.warning( 'failed to activate TrigConfigSvc ...')
-
-ServiceMgr.TrigConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.HLTConfigSvc.OutputLevel=VERBOSE
-ServiceMgr.LVL1ConfigSvc.OutputLevel=VERBOSE
-
-#######################################################
-from TrigSteering.TrigSteeringConfig import TrigSteer_L2,TrigSteer_EF
-
-steeringL2 = TrigSteer_L2("TrigSteer_L2", hltFile="newMenu.xml")
-
-if doTruth:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIfromKine
-  steeringL2.LvlConverterTool = FakeLvl1RoIfromKine("FakeLvl1RoIfromKine")
-  steeringL2.LvlConverterTool.FakeEmTauRoiParticleIDs=[11,-11]
-  steeringL2.LvlConverterTool.FakeMuonRoiParticleIDs=[13,-13]
-  steeringL2.LvlConverterTool.FakeJetRoiParticleIDs=[15,-15]
-  steeringL2.LvlConverterTool.FakeEmTauRoiPtMin=5*GeV
-  steeringL2.LvlConverterTool.McEventCollectionName = "TruthEvent"
-  steeringL2.LvlConverterTool.OutputLevel = DEBUG
-  steeringL2.OutputLevel = VERBOSE
-  topSequence += steeringL2
-else:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIatFixedEtaPhi
-  steeringL2.LvlConverterTool = FakeLvl1RoIatFixedEtaPhi("FakeLvl1RoIatFixedEtaPhi")
-  steeringL2.LvlConverterTool.FakeEmRoiPhi=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiEta=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiLabel="EM10"
-  if not doTimer:
-    steeringL2.LvlConverterTool.OutputLevel = DEBUG
-    steeringL2.OutputLevel = VERBOSE
-  else:
-    steeringL2.LvlConverterTool.OutputLevel = ERROR
-    steeringL2.OutputLevel = ERROR	
-  topSequence += steeringL2
-  
-steeringEF = TrigSteer_EF("TrigSteer_EF", hltFile="newMenu.xml")
-if doTimer:
-  steeringEF.OutputLevel = ERROR
-else:
-  steeringEF.OutputLevel = INFO
-topSequence += steeringEF
-
-#fix to get rid of EF exceptions
-excSvc=Service("ExceptionSvc")
-excSvc.Catch="LIST"
-excSvc.Algorithms=[ "TrigSteer_EF=SUCCESS"]
-
-# -------------------------------------------------------------
-theApp.EvtMax  = 1000
-if not doReadBS:
-  ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d38/ID_ValidationData/testIdeal_07.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000201_tid002760._00002.pool.root.1"]
-  #ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/maxidisk/d89/InDetRecRDO.root"]
-else:
-  EventSelector.Input = ["/afs/cern.ch/atlas/project/trigger/pesa-sw/releases/data/daq.csc13.0000000.Single.Stream.LB0000.Athena._0001.data"]
-
-# ------------------------------------------------------------
-
-# switch off history service
-ServiceMgr.StoreGateSvc.ActivateHistory = False
-ServiceMgr.StoreGateSvc.Dump            = False
-
-# ------------------------------------------------------------
-# get stack dump
-# ------------------------------------------------------------
-
-ServiceMgr.CoreDumpSvc.FatalHandler = 438
-
-if doAuditors:
- # load AuditorSvc
- theAuditorSvc = AuditorSvc()
- 
- # write out summary of the memory usage
- #   number of events to be skip to detect memory leak
- #   20 is default. May need to be made larger for complete jobs.
- theAuditorSvc.Auditors += [ "ChronoAuditor"]
- ServiceMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 5
- # memory auditors
- theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
- MemStatAuditor = theAuditorSvc.auditor( "MemStatAuditor" )
- MemStatAuditor.OutputLevel = WARNING
- 
-# write out a short message upon entering or leaving each algorithm
-if doNameAuditor:
-  theAuditorSvc.Auditors     += [ "NameAuditor" ]
-  theApp.AuditAlgorithms = True
-  theApp.AuditServices   = True
-  #
-  # Display detailed size and timing statistics for writing and reading
-  #
-if doWriteESD or doWriteAOD:
-  AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" )
-  AthenaPoolCnvSvc.UseDetailChronoStat = True
-     
-#--------------------------------------------------------------
-# run JiveXML
-#--------------------------------------------------------------
-if doJiveXML:
-  include ("JiveXML/JiveXML_jobOptionBase.py")
-  include ("JiveXML/DataTypes_InDet.py")
-
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiClusterRetriever
-  theSiClusterRetriever = JiveXML__SiClusterRetriever (name = "SiClusterRetriever")
-  theSiClusterRetriever.SCTClusters = "SCT_TrigClusters"
-  print theSiClusterRetriever
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__SiSpacePointRetriever
-  theSiSpacePointRetriever = JiveXML__SiSpacePointRetriever (name = "SiSpacePointRetriever")
-  theSiSpacePointRetriever.PixelSpacePoints = "PixelTrigSpacePoints"
-  theSiSpacePointRetriever.SCTSpacePoints = "SCT_TrigSpacePoints"
-  
-  from InDetJiveXML.InDetJiveXMLConf import JiveXML__TRTRetriever
-  theTRTRetriever = JiveXML__TRTRetriever (name = "TRTRetriever")
-  theTRTRetriever.TRTClusters = "TRT_TrigDriftCircles"
-
-  from TrkJiveXML.TrkJiveXMLConf import JiveXML__TrackRetriever
-  theTrackRetriever = JiveXML__TrackRetriever (name = "TrackRetriever")
-  theTrackRetriever.DoWriteHLT = True
-
-  if doTruth:
-    readG3 = False
-    include ("JiveXML/DataTypes_Truth.py")
-    
-# ------------------------------------------------------------
-# persistency
-# ------------------------------------------------------------
-
-if doWriteAOD: 
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamAOD" ]
-   StreamAOD = Algorithm( "StreamAOD" )
-   StreamAOD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamAOD.OutputFile    = "InDetTrigRecAOD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamAOD.ItemList=[]
-   StreamAOD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetAOD.py" )
-
-if doWriteESD:
-   # create stream
-   theApp.TopAlg += [ "AthenaOutputStream/StreamESD" ]
-   StreamESD = Algorithm( "StreamESD" )
-   StreamESD.EvtConversionSvc = "AthenaPoolCnvSvc"
-
-   # Define the output file name
-   StreamESD.OutputFile    = "InDetTrigRecESD.root"
-   
-   #force read of input data to write in output data
-
-   #  EventInfo - needs to be always saved.
-   StreamESD.ItemList=[]
-   StreamESD.ItemList+=["EventInfo#*"]
-   include ( "InDetTrigRecExample/WriteTrigInDetESD.py" )
-
-if doMonitoring or doTimer:
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  ServiceMgr += THistSvc()
-  ServiceMgr.THistSvc.Output = [ "EXPERT DATAFILE='expert-monitoring.root'  OPT='RECREATE'" ]
-
-if doTimer:
-  for algo in steeringEF.getChildren():
-    print "HERE", algo.getFullName()
-    algo.doTiming = True
-    
-#######################################################33
-#
-# Testing options
-#######################################################33
-if not doTruth:
-  PixelClustering_EF.EtaHalfWidth = 3.0
-  PixelClustering_EF.PhiHalfWidth = 3.14159
-  #
-  SCTClustering_EF.EtaHalfWidth = 3.0
-  SCTClustering_EF.PhiHalfWidth = 3.14159
-  #
-  TRTDriftCircleMaker_EF.EtaHalfWidth = 3.0
-  TRTDriftCircleMaker_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigSpacePointFinder_EF.EtaHalfWidth = 3.0
-  SiTrigSpacePointFinder_EF.PhiHalfWidth = 3.14159
-  #
-  SiTrigTrackFinder_EF.EtaHalfWidth = 3.0
-  SiTrigTrackFinder_EF.PhiHalfWidth = 3.14159
-
-# ------------------------------------------------------------
-# useful debugging/info tools
-# ------------------------------------------------------------
-for algo in steeringEF.getChildren():
-  if not doTimer:
-    algo.OutputLevel = INFO
-  else:
-    algo.OutputLevel = ERROR
-
-Algorithm("AANTupleStream").OutputLevel=DEBUG
-
-if doCBNT:
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  ServiceMgr += THistSvc()
-  theApp.Dlls   += [ "AnalysisTools" ]
-  AANTupleStream = Algorithm( "AANTupleStream" )
-  #AANTupleStream.ExtraRefNames = [ "StreamESD","StreamRDO" ]
-  AANTupleStream.ExistDataHeader = False
-  AANTupleStream.TreeName = "CollectionTree"
-  AANTupleStream.WriteInputDataHeader = True
-  RootNtupleOutput = "ntuple.root"
-  #RootNtupleOutput = "timing-histograms.root"
-  exec 'AANTupleStream.OutputName= \'%s\' ' % RootNtupleOutput
-  AANTupleStream.OutputName = RootNtupleOutput
-  
-  exec 'ServiceMgr.THistSvc.Output += ["AANT DATAFILE=\'%s\' OPT=\'RECREATE\'"] ' % RootNtupleOutput
- 
- 
-  include( "CBNT_Athena/CBNT_AthenaAware_jobOptions.py" )
-
-  theApp.TopAlg += [ "AANTupleStream" ]
-  #include( "RecExCommon/CBNT_Truth_jobOptions.py" )
-  include("TrigNtInDet/jobOfragment_TrigNtInDet.py")
-
-  CBNT_TrigEFTrackParticle = Rec__CBNTAA_TrigEFTrackParticle()
-  print CBNT_TrigEFTrackParticle
-  
-  CBNT_TrigEFTrackParticle.doDetailedTruth = True
-  CBNT_TrigEFTrackParticle.doTruthCBNT = True
-  CBNT_TrigEFTrackParticle.OutputLevel=DEBUG
-  CBNT_TrigEFTrackParticle.doExtrap = True
-
-  CBNT_TrigEFVxPrimary = InDet__CBNTAA_TrigEFVxPrimary()
-  CBNT_TrigEFVxPrimary.OutputLevel=DEBUG
-
-print topSequence
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/plotHistos.C b/InnerDetector/InDetExample/InDetTrigRecExample/share/plotHistos.C
deleted file mode 100644
index 3f553b6c6e7e1536ed2fe4a115c60b74dbb59add..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/plotHistos.C
+++ /dev/null
@@ -1,88 +0,0 @@
-void plotHistos()
-{
- const Color_t padColor = 0; 
- const Color_t canColor = 920;
- const Color_t histoColor = 600;
-
- TFile f("EFID_RTT_Histos.root");
-
- //------------------------------- Efficiency plots ----------------------------------------------------------
-
- TCanvas *c1 = new TCanvas("c1","Histogram Drawing Options",200,10,700,900);
- c1->SetFillColor(canColor);
-
- TPad *pad1 = new TPad("pad1","The pad with the function",0.03,0.51,0.97,0.92,21);
- pad1->SetFillColor(padColor);
-
- TPad *pad2 = new TPad("pad2","The pad with the histogram",0.03,0.02,0.97,0.49,21);
- pad2->SetFillColor(padColor);
-
- pad1->Draw();
- pad2->Draw();
-
- pad2->cd();
- TH1F* effvsd0 = (TH1F*)f.Get("Efficiency vs. d0");
- effvsd0->GetXaxis()->SetTitle("d0 [mm]");
- effvsd0->GetYaxis()->SetTitle("Efficiency");
- effvsd0->SetLineColor(histoColor);
- effvsd0->SetLineWidth(2);
- effvsd0->Draw();
- 
- pad1->cd();
- TH1F* effvsz0 = (TH1F*)f.Get("Efficiency vs. z0");
- effvsz0->GetXaxis()->SetTitle("z0 [mm]");
- effvsz0->GetYaxis()->SetTitle("Efficiency");
- effvsz0->SetLineColor(histoColor);
- effvsz0->SetLineWidth(2);
- effvsz0->GetYaxis()->SetRangeUser(0.4,1.1);
- effvsz0->Draw();
- 
- c1->Update();
- c1->Print("Efficiency.eps");
- 
- //------------------------------- Fake rate plots ----------------------------------------------------------
- pad2->cd();
- TH1F* fakeRatevsd0 = (TH1F*)f.Get("Fake_Rate vs. d0");
- fakeRatevsd0->GetXaxis()->SetTitle("d0 [mm]");
- fakeRatevsd0->GetYaxis()->SetTitle("Fake rate");
- fakeRatevsd0->SetLineColor(histoColor);
- fakeRatevsd0->SetLineWidth(2);
- fakeRatevsd0->GetYaxis()->SetRangeUser(0.,1.1);
- fakeRatevsd0->Draw();
- pad2->Update(); 
-
- pad1->cd();
- TH1F* fakeRatevsz0 = (TH1F*)f.Get("Fake_Rate vs. z0");
- fakeRatevsz0->GetXaxis()->SetTitle("z0 [mm]");
- fakeRatevsz0->GetYaxis()->SetTitle("Fake rate");
- fakeRatevsz0->SetLineColor(histoColor);
- fakeRatevsz0->SetLineWidth(2);
- fakeRatevsz0->GetYaxis()->SetRangeUser(0.,0.4);
- fakeRatevsz0->Draw();
- pad1->Update();
-
- c1->Update();
- c1->Print("FakeRate.eps");
- 
- //------------------------------------- Resolution ----------------------------------------------------------
- TH1F* resEta = (TH1F*)f.Get("dEta_of_Matched_Tracks");
- resEta->GetXaxis()->SetTitle("#eta_{EF} - #eta_{Off}");
- resEta->GetYaxis()->SetTitle("Number of tracks");
-
- pad1->cd();
- resEta->SetFillColor(histoColor);
- resEta->Draw();
- pad1->Update(); 
-
- TH1F* resPhi = (TH1F*)f.Get("dPhi_of_Matched_Tracks");
- resPhi->GetXaxis()->SetTitle("#phi_{EF} - #phi_{Off}");
- resPhi->GetYaxis()->SetTitle("Number of tracks");
-
- pad2->cd();
- resPhi->SetFillColor(histoColor);
- resPhi->Draw();
- pad2->Update();
-
- c1->Update();
- c1->Print("Resolution.eps");
-}
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_RTT_InDetTrigRecExample.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_RTT_InDetTrigRecExample.py
deleted file mode 100644
index d98ba30036f09385b9fb02fad44ccf459ef3cec8..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_RTT_InDetTrigRecExample.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#RTT wrapper around testEFID_basic.py
-#     - the name follows a convention for RTT tests
-#
-#  26/03/2008   Jiri Masik
-
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-
-if athenaCommonFlags.FilesInput()==[]:
-  athenaCommonFlags.FilesInput=[
-    "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000016.pool.root.1",
-    ]
-
-def resetSigs():
-  print 'keep full menu'                                
-
-chainNames = [
-#  "Offline",
-  "Truth",
-#  "Muons",
-#  "Electrons",
-#  "Taus",
-  #egamma
-  "L2_e22vh_medium_IDTrkNoCut:TrigL2SiTrackFinder_eGamma:0",
-  "L2_e22vh_medium_IDTrkNoCut:TrigL2SiTrackFinder_eGamma:1",
-  "L2_e22vh_medium_IDTrkNoCut:TrigL2SiTrackFinder_eGamma:2",
-  "L2_e22vh_medium_IDTrkNoCut:TrigL2SiTrackFinder_eGamma:3",
-  "EF_e22vh_medium_IDTrkNoCut:InDetTrigParticleCreation_Electron_EFID",
-  #  #mu
-  "L2_mu22_IDTrkNoCut_tight:TrigL2SiTrackFinder_Muon:0",
-  "L2_mu22_IDTrkNoCut_tight:TrigL2SiTrackFinder_Muon:1",
-  "L2_mu22_IDTrkNoCut_tight:TrigL2SiTrackFinder_Muon:2",
-  "L2_mu22_IDTrkNoCut_tight:TrigL2SiTrackFinder_Muon:3",
-  "EF_mu22_IDTrkNoCut_tight:InDetTrigParticleCreation_Muon_EFID",
-  # #tau
-  "L2_tau29_IDTrkNoCut:TrigL2SiTrackFinder_Tau:0",
-  "L2_tau29_IDTrkNoCut:TrigL2SiTrackFinder_Tau:1",
-  "L2_tau29_IDTrkNoCut:TrigL2SiTrackFinder_Tau:2",
-  "L2_tau29_IDTrkNoCut:TrigL2SiTrackFinder_Tau:3",
-  "EF_tau29_IDTrkNoCut:InDetTrigParticleCreation_Tau_EFID",
-  # #bjet
-  "L2_b50_NoCut_j50_c4cchad:TrigL2SiTrackFinder_Jet:0",
-  "L2_b50_NoCut_j50_c4cchad:TrigL2SiTrackFinder_Jet:1",
-  "L2_b50_NoCut_j50_c4cchad:TrigL2SiTrackFinder_Jet:2",
-  "L2_b50_NoCut_j50_c4cchad:TrigL2SiTrackFinder_Jet:3",
-  "EF_b55_NoCut_j55_a4tchad:InDetTrigParticleCreation_Bjet_EFID"
-]
-
-include("TrigInDetValidation/TrigInDetValidation_RTT_Common.py")
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py
deleted file mode 100644
index c066ca1f1d4907368cdab89d5006b0c2b99150ee..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/share/testEFID_basic.py
+++ /dev/null
@@ -1,225 +0,0 @@
-################################################################################
-#
-#  minimal jO to run EFID with a little overhead from other subsystems
-#         (in terms of reconstruction and detectors involved)
-#  based on RecExCommon like jO to run the trigger and functionality of
-#         the former InDetTrigRecExample/jobOptionsNewSteering.py 
-#
-#  by default only EF ID is executed on FakeLVL1 RoIs (LVL2 is dummy)
-#
-#  25/01/2008     Jiri Masik
-#  
-################################################################################
-
-#these are the defaults, can be modified by RTT
-if not ('EvtMax' in dir()):
-    EvtMax=10
-if not ('OutputLevel' in dir()):
-    OutputLevel=INFO
-if not ('doReadBS' in dir()):
-    doReadBS=False
-if not ('minimalSetup' in dir ()):
-    minimalSetup=True
-
-#the performance package may modify
-# if not ('useROOTNtuple' in dir()): 
-#     useROOTNtuple=True  
-# if not ('RootNtupleOutput' in dir()): 
-#     RootNtupleOutput="ntupleEFIDAA.root"
-# if not ('doWriteESD' in dir()): 
-#     doWriteESD=False
-# if not ('doESD' in dir()): 
-#     doESD=False
-
-
-#PoolRDOInput=["/afs/cern.ch/atlas/offline/data/testfile/calib1_csc11.005200.T1_McAtNlo_Jimmy.digit.RDO.v12000301_tid003138._00016_extract_10evt.pool.root"] 
-#BSRDOInput=["/afs/cern.ch/atlas/project/trigger/pesa-sw/releases/data/daq.csc13.lumi1E31.May7.Rel14.1.0.LB0000.Athena._0001.data"] 
-
-
-
-
-###############################
-doTruth = True
-if doReadBS:
-  ReadBS=True
-  doTruth = False
-  #BSRDOInput=["/afs/cern.ch/atlas/project/trigger/pesa-sw/releases/data/daq.csc13.lumi1E31.May7.Rel14.1.0.LB0000.Athena._0001.data"]
-  #BSRDOInput=["/afs/cern.ch/atlas/project/trigger/pesa-sw/releases/data/daq.csc13.lumi1E31.May7.Rel14.1.0.LB0000.Athena._0001.data"]
-
-
-doTrigger=True
-
-
-doWriteAOD=False
-doWriteTAG=False
-doAOD=False 
-doTAG=False
-
-
-#modify standard menu
-def clearsigs():
-    print 'jmasik clearsigs'
-    TriggerFlags.EgammaSlice.signatures = ['e10_passL2']
-
-def resetLowerChain(triggerPythonConfig):
-    print 'jmasik - resetLowerChain'
-    for chain in triggerPythonConfig.theEFHLTChains:
-        print 'chain: ', chain.chain_name
-        if chain.chain_name == 'EF_e10':
-            chain.lower_chain_name=''
-
-
-from AthenaCommon.GlobalFlags import globalflags
-# --- default is atlas geometry
-globalflags.DetGeo = 'atlas'
-# --- set defaults
-if 'doReadBS' in dir() and doReadBS:
-    globalflags.InputFormat = 'bytestream'
-else:
-    globalflags.InputFormat = 'pool'
-            
-
-#-----------------------------------------------------------
-include("RecExCommon/RecExCommon_flags.py")
-#-----------------------------------------------------------
-TriggerFlags.readHLTconfigFromXML=False
-TriggerFlags.readLVL1configFromXML=False
-
-TriggerFlags.enableMonitoring = [ 'Validation', 'Time', 'Log' ]
-
-#override menu
-def ElectronOnly():
-  TriggerFlags.Slices_all_setOff()
-
-  # Enable electron slice TriggerFlags.EgammaSlice.setAll()
-  TriggerFlags.EgammaSlice.unsetCalo()
-  TriggerFlags.EgammaSlice.signatures =  ["e5_NoCut","e20_medium_IDTrkNoCut"]
-    
-    
-from TriggerMenuPython.GenerateMenu import GenerateMenu
-GenerateMenu.overwriteSignaturesWith(ElectronOnly)
-
-
-#
-from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-#InDetTrigFlags.doTruth = TriggerFlags.doTruth()
-from RecExConfig.RecFlags import rec 
-InDetTrigFlags.doTruth = rec.doTruth()
-InDetTrigFlags.doNewTracking = True
-InDetTrigFlags.doBackTracking = False
-InDetTrigFlags.trackFitterType = 'GlobalChi2Fitter'
-#InDetTrigFlags.trackFitterType = 'GaussianSumFilter'
-#InDetTrigFlags.trackFitterType = 'KalmanFitter'
-print InDetTrigFlags
-#
-
-
-
-
-#TriggerFlags.readHLTconfigFromXML=True
-#TriggerFlags.readLVL1configFromXML=True
-#TriggerFlags.inputHLTconfigFile = 'newMenu.xml'
-#TriggerFlags.inputLVL1configFile = 'lvl1Menu.xml'
-
-TriggerFlags.enableMonitoring = [ 'Validation', 'Time', 'Log' ]
-
-
-# #menu
-
-
-##########
-
-from AthenaCommon.GlobalFlags import globalflags
-# --- default is atlas geometry
-globalflags.DetGeo = 'atlas'
-# --- set defaults
-if 'doReadBS' in dir() and doReadBS:
-    globalflags.InputFormat = 'bytestream'
-else:
-    globalflags.InputFormat = 'pool'
-             
-
-from AthenaCommon.DetFlags import DetFlags 
-DetFlags.ID_setOn()
-if minimalSetup:
-    TriggerFlags.doMuon=False
-    DetFlags.Calo_setOff()
-    DetFlags.Muon_setOff()
-
-DetFlags.digitize.all_setOff() #to avoid TrigEgammaRec_NoIDEF_eGamma:ERROR could not 
-                               #                  get handle to CaloNoiseToolDefault
-
-#------------ This is for ATN/RTT tests only ---------
-#TriggerFlags.triggerMenuSetup = 'default'
-
-#-------------end of flag for tests-------------------
-
-#------------ This is a temporary fix ---------------
-TriggerFlags.abortOnConfigurationError=True
-#-------------end of temporary fix-------------------
-
-#from TriggerJobOpts.TriggerGetter import TriggerGetter
-
-
-
-#-----------------------------------------------------------
-include("RecExCommon/RecExCommon_topOptions.py")
-#-----------------------------------------------------------
-
-from InDetTrigRecExample.EFInDetConfig import *
-
-
-#no truth ->no fakeRoIs in BS
-if not doReadBS:
-  electronAlgs = TrigEFIDInsideOut_Electron()
-else:
-  electronAlgs = TrigEFIDInsideOut_FullScan()
-
-##########
-
-##########
-
-jobproperties.PerfMonFlags.doMonitoring = True
-
-MessageSvc.debugLimit = 10000000
-MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M"
-
-#get rid of messages and increase speed
-Service ("StoreGateSvc" ).ActivateHistory=False
-
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-print job
-
-steeringL2 = job.TrigSteer_L2
-
-if rec.doTruth():
-  from TrigFake.TrigFakeConf import FakeLvl1RoIfromKine
-  steeringL2.LvlConverterTool = FakeLvl1RoIfromKine("FakeLvl1RoIfromKine")
-  steeringL2.LvlConverterTool.FakeEmTauRoiParticleIDs=[11,-11]
-  steeringL2.LvlConverterTool.FakeEmTauRoiPtMin=25*GeV
-  steeringL2.LvlConverterTool.FakeEmRoiLabel="EM7"
-  steeringL2.LvlConverterTool.McEventCollectionName = "TruthEvent"
-  steeringL2.LvlConverterTool.OutputLevel = DEBUG
-  #steeringL2.OutputLevel = VERBOSE
-else:
-  from TrigFake.TrigFakeConf import FakeLvl1RoIatFixedEtaPhi
-  steeringL2.LvlConverterTool = FakeLvl1RoIatFixedEtaPhi("FakeLvl1RoIatFixedEtaPhi")
-  steeringL2.LvlConverterTool.FakeEmRoiPhi=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiEta=0.0
-  steeringL2.LvlConverterTool.FakeEmRoiLabel="EM7"
-  if not True:
-    steeringL2.LvlConverterTool.OutputLevel = DEBUG
-    #steeringL2.OutputLevel = VERBOSE
-  else:
-    steeringL2.LvlConverterTool.OutputLevel = ERROR
-    #steeringL2.OutputLevel = ERROR	
-
-  
-steeringEF = job.TrigSteer_EF
-
-
-#
-if 0 and doReadBS:
-    ServiceMgr.ByteStreamCnvSvc.IsSimulation = True
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/test/InDetTrigRecExample_TestConfiguration.xml b/InnerDetector/InDetExample/InDetTrigRecExample/test/InDetTrigRecExample_TestConfiguration.xml
deleted file mode 100755
index 6b5ec202fbd7e1ec5fd9c535111d255a5cb7de6d..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetTrigRecExample/test/InDetTrigRecExample_TestConfiguration.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd">
-<unifiedTestConfiguration>
-  
-  <atn />
-  <kv />
-  
-  <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt">
-    <rttContactPerson>Jiri.Masik@cern.ch</rttContactPerson>
-    <mailto>Jiri.Masik@cern.ch</mailto>
-    <refRelease>14.5.0</refRelease>
-    
-    <jobList>
-      <classification>
- 	<displayClass>OfflineValidation</displayClass>
- 	<displayProcess>Reco</displayProcess>
- 	<displayComponent>Trig-Common</displayComponent>
-      </classification>
-      <athena userJobId="IDTRE_testEFID_basic_top">
-        <doc>testEFID_basic RecExCommon on 450 top events from RDO</doc>
-	<commandLineString></commandLineString>
-        <options>testEFID_RTT_InDetTrigRecExample.py</options>
-        <package>InnerDetector/InDetExample/InDetTrigRecExample</package>
-        <group>InDetTrigRecExample</group>
-        <queue>medium</queue>
-            <dataset>/eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000016.pool.root.1 </dataset>
-            <dataset>/eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000019.pool.root.1 </dataset>
-            <dataset>/eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000028.pool.root.1 </dataset>
-            <dataset>/eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000031.pool.root.1 </dataset>
-            <dataset>/eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000035.pool.root.1 </dataset>
-            <dataset>/eos/atlas/atlascerngroupdisk/proj-sit/vchavda/TrigInDetValidation_bjet5200/mc10_14TeV.105568.ttbar_Pythia.digit.RDO.e662_s1107_d459_tid254598_00/RDO.254598._000046.pool.root.1 </dataset>
-      </athena>
-
-<!--  
-      <chain>
-      <chainName>TrfTransformValidationChain</chainName>
-      <sequential>
-        <chainElement>
-    	    <jobTransform userJobId="IDTRE_cosm_trf">
-    		<doc>Cosmics no field RawToRaw,RawToESD</doc>
-    		<jobTransformJobName>NoBFieldData</jobTransformJobName>
-    		<jobTransformCmd>
-            	    RTT_NoBField_transform.sh
-    		</jobTransformCmd>
-    		<group>TrfInDetTrigRecExample</group>
-    		<queue>medium</queue>
-    		</jobTransform>
-    		<chainfileout>data09_cosmag.00121513.ESD.pool.root</chainfileout>
-        </chainElement>
-      
-        <chainElement>
-	    <athena userJobId="IDTRE_cosm_post">
-    	        <doc>Proccess ESD files produced in trf_transformation</doc>
-	        <commandLineString></commandLineString>
-    	        <options>testEFID_RTT_ESDAnalysis.py</options>
-    	        <package>InnerDetector/InDetExample/InDetTrigRecExample</package>
-    	        <group>InDetTrigESDVal</group>
-    	        <queue>medium</queue>
-	        <chaindataset_info>
-	        <dc2 />    
-	        <chaindatasetName>data09_cosmag.00121513.ESD.pool.root</chaindatasetName>
-	        <dataset_info>
-	        <dc2 />
-	        <datasetName>/castor/cern.ch/grid/atlas/tzero/prod1/perm/data09_cos/physics_IDCosmic/0121513/data09_cos.00121513.physics_IDCosmic.recon.ESD.f118/data09_cos.00121513.physics_IDCosmic.recon.ESD.f118._lb0000._SFO-1._0001.1</datasetName>
-	        </dataset_info>
-	        </chaindataset_info>                                                                    
-      	    </athena>
-        </chainElement>
-      </sequential>
-      </chain>
--->
-    </jobList>
-
-    
-    <jobGroups>
-      <jobGroup name="AthenaInDetTrigRecExample" parent="Athena">
-	<keepFilePattern>ntuple*.root</keepFilePattern>
-      </jobGroup>
-      
-      <jobGroup name="TrfInDetTrigRecExample" parent="Transform">
-	<keepFilePattern>*.checkFile</keepFilePattern>        
-         <action>
-           <modulename>RttLibraryTools</modulename>
-           <testname>CheckFileRunner</testname>
-         </action>
-      </jobGroup>    
-      
-      <jobGroup name="AthenaInDetTrigESDVal" parent="Athena">
-        <keepFilePattern>EFID_RTT_Histos.root</keepFilePattern>
-        <keepFilePattern>*.eps</keepFilePattern>
-	<auxFilePattern>plotHistos.C</auxFilePattern>
-	<action>
-    	    <modulename>RttLibraryTools</modulename>
-    	    <testname>ROOTMacroRunner</testname>
-    	    <arg>
-    		<argname>macro</argname>
-    		<argvalue>plotHistos.C</argvalue>
-    	    </arg>
-        </action>
-      </jobGroup>
-    </jobGroups>
-
-  </rtt>
-  
-</unifiedTestConfiguration>
-
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/run/CosmicMonitorOpts.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/run/CosmicMonitorOpts.py
index f13fbb0d0e2a8ef1b8b71de974ae522ae21d5397..04a0129e53701da5b760c652bb42dd3970534e19 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/run/CosmicMonitorOpts.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/run/CosmicMonitorOpts.py
@@ -182,7 +182,7 @@ if CosmicMonitorFlags.doMonitoring:
 theApp.Dlls += [ "CBNT_Utils","CBNT_Athena" ]
 
 if CosmicMonitorFlags.makeAlignNtp:
-    theApp.DLLs += ["HbookCnv"]
+    theApp.Dlls += ["HbookCnv"]
     theApp.HistogramPersistency = "HBOOK"
 else:    
     theApp.Dlls += [ "RootHistCnv" ]
diff --git a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_LoLumRawData.h b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_LoLumRawData.h
index 66ff7ab38b57b3f53c8231d0435c77bc88f8745c..7ff57fd5cc2e1f6861f010d44fb7dcb6704f500b 100755
--- a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_LoLumRawData.h
+++ b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/TRT_LoLumRawData.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,17 +36,23 @@ public:
   // Destructor:
   virtual ~TRT_LoLumRawData();
 
-    // High level threshold:
+  // High level threshold:
   virtual bool highLevel() const;
   virtual bool highLevel(int /* BX */) const;
 
-    // Time over threshold in ns for valid digits; zero otherwise:
-  virtual double timeOverThreshold() const;
+  // Time over threshold in ns for valid digits; zero otherwise:
+  virtual double timeOverThreshold() const {
+    return timeOverThreshold(m_word);
+  };
 
-    // drift time in bin
-  virtual int driftTimeBin() const;   // Position of first leading edge
+  // drift time in bin
+  virtual int driftTimeBin() const {
+    return driftTimeBin(m_word);
+  };
 
-  virtual int trailingEdge() const;   // Position of last trailing edge
+  virtual int trailingEdge() const {
+    return trailingEdge(m_word);
+  };
 
   virtual bool firstBinHigh() const;  // True if first time bin is high
   virtual bool lastBinHigh() const;   // True if last time bin is high
@@ -61,8 +67,38 @@ public:
   // Static methods:
   ///////////////////////////////////////////////////////////////////
 
-  // Create a new TRT_LoLumRawData and return a pointer to it:
-  //  static TRT_LoLumRawData *newObject(const Identifier rdoId, const unsigned int word);
+protected:
+  // width of the drift time bins
+  static const double m_driftTimeBinWidth;
+
+  // bit masks used in interpretation of bit pattern
+  static const unsigned int m_maskFourLastBits;
+  static const unsigned int m_maskThreeLastBits;
+
+public:
+  // width of the drift time bins
+  static double getDriftTimeBinWidth() {
+    return m_driftTimeBinWidth;
+  };
+
+  // Find the relevant island of bits from the bit pattern, defined as the largest island with the latest leading edge
+  static bool findLargestIsland(unsigned int word, unsigned int& leadingEdge, unsigned int& trailingEdge);
+
+  // Determine the drift time bin, i.e. the leading edge of the relevant island, from the bit pattern
+  static unsigned int driftTimeBin(unsigned int word);
+
+  // Determine the trailing edge of the relevant island from the bit pattern
+  static unsigned int trailingEdge(unsigned int word);
+
+  // Determine the time over threshold, i.e. width of the relevant island, in ns from the bit pattern
+  static double timeOverThreshold(unsigned int word);
+
+  // Check if the middle HT bit is set
+  inline
+  static bool highLevel(unsigned int word) {
+    // return (m_word & 0x04020100); // check any of the three HT bits
+    return (word & 0x00020000); // check only middle HT bit
+  }
 
 public:
   // public default constructor needed for I/O, but should not be
@@ -80,17 +116,15 @@ private:
 // Inline methods:
 ///////////////////////////////////////////////////////////////////
 
-
-
 /*
  * highLevel() -
- * Returns true if there is a high threshold hit in any bunch crossing, false
+ * Returns true if there is a high threshold hit in the middle bunch crossing, false
  * otherwise
  */
 inline 
 bool TRT_LoLumRawData::highLevel() const
 {
-  return (m_word & 0x04020100);
+  return highLevel(m_word);
 }
 
 /*
diff --git a/InnerDetector/InDetRawEvent/InDetRawData/src/TRT_LoLumRawData.cxx b/InnerDetector/InDetRawEvent/InDetRawData/src/TRT_LoLumRawData.cxx
index a13ba447f2f9faf1ad884d86f8461d118d7c283a..fc0201ccea4a4c29ce9825e6de86aca1485905f6 100755
--- a/InnerDetector/InDetRawEvent/InDetRawData/src/TRT_LoLumRawData.cxx
+++ b/InnerDetector/InDetRawEvent/InDetRawData/src/TRT_LoLumRawData.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
 */
 
 
@@ -14,10 +14,14 @@
 // Implementation provided by A. Zalite, February 2003
 ///////////////////////////////////////////////////////////////////
 
-#include <new>
 #include "InDetRawData/TRT_LoLumRawData.h"
 #include "InDetRawData/TRT_RDORawData.h"
 
+// static member variables
+const double TRT_LoLumRawData::m_driftTimeBinWidth = 3.125;
+const unsigned int TRT_LoLumRawData::m_maskFourLastBits=0xFFFFFF0;  // 1 1 11111111 1 11111111 1 11110000
+const unsigned int TRT_LoLumRawData::m_maskThreeLastBits=0xFFFFFF8;  // 1 1 11111111 1 11111111 1 11111000
+
 // default constructor
 TRT_LoLumRawData::TRT_LoLumRawData() :
   TRT_RDORawData(Identifier(), 0) //call base-class constructor
@@ -34,126 +38,65 @@ TRT_LoLumRawData::TRT_LoLumRawData(const Identifier rdoId,
 TRT_LoLumRawData::~TRT_LoLumRawData()
 {}
 
-
-  // Time over threshold in ns:
-double TRT_LoLumRawData::timeOverThreshold() const
-{
-  double binWidth = 3.125;
-
-  int LE = driftTimeBin( );
-  int TE = trailingEdge( );
-
-  if ( (0 == LE) || (24 == LE) || (24 == TE) || (0 == TE) || (23 == LE) )
-    {
-      return 0;
-    }
-
-  double time = (double) (TE - LE + 1) * binWidth;
-  
-  return time;
-
+unsigned int TRT_LoLumRawData::driftTimeBin(unsigned int word) {
+  unsigned int leadingEdge=0, trailingEdge=0;
+  findLargestIsland(word, leadingEdge, trailingEdge);
+  return leadingEdge;
 }
 
-// Position of first low-to-high bit transition
-int TRT_LoLumRawData::driftTimeBin() const
-{
-  unsigned  mask = 0x02000000;
-  unsigned  word_LE = m_word>>6;
-  word_LE = word_LE<<6;
- 
-  mask >>=1;
-  bool SawZero = false;
-  int i;
-  for(i=1;i<18;++i)
-  { 
-    if      (  (word_LE & mask) && SawZero) break;
-    else if ( !(word_LE & mask) ) SawZero = true; 
-    mask>>=1;
-    if(i==7 || i==15) mask>>=1;
-  }
-  if(i==18) i=0;
-  return i;
+unsigned int TRT_LoLumRawData::trailingEdge(unsigned int word) {
+  unsigned int leadingEdge=0, trailingEdge=0;
+  findLargestIsland(word, leadingEdge, trailingEdge);
+  return trailingEdge;
 }
 
-// Position of first low-to-high bit transition moving from the right
-// or 24 if no transition is found
-int TRT_LoLumRawData::trailingEdge() const
-{
-  unsigned mask = 0x00000001;
-  unsigned mask_word = 0x0001fff0; // 11111111 1 11110000   
-  unsigned mask_last_bit =0x10; //10000
-  
-  unsigned word_TE = m_word & mask_word;
-  
-  bool SawZero=true;
-  bool SawZero1=false;
-  bool SawZero2=false;
-  bool SawUnit1=false;
-  int i=0;
-  int j=0;
-  int k=0;
-  
-  if(word_TE & mask_last_bit) 
-  {
-  
-	for (j = 0; j < 11; ++j)
-	{
-		mask_last_bit=mask_last_bit<<1;
-		
-		if(j==3) mask_last_bit=mask_last_bit<<1;
-		
-		if ( !(word_TE & mask_last_bit) )
-		{
-			SawZero2 = true;
-			break;			
-		}
-	}
-	
-	if(SawZero2 == false) return 19;
+double TRT_LoLumRawData::timeOverThreshold(unsigned int word) {
+  unsigned int leadingEdge=0, trailingEdge=0;
+  if (findLargestIsland(word, leadingEdge, trailingEdge)) {
+    return (trailingEdge - leadingEdge + 1) * m_driftTimeBinWidth;
+  };
+  return 0.;
+}
 
-	if(SawZero2 == true){
-		for (k = j+1; k < 11; ++k)
-		{
-			mask_last_bit=mask_last_bit<<1;
+bool TRT_LoLumRawData::findLargestIsland(unsigned int word, unsigned int& leadingEdge, unsigned int& trailingEdge) {
+  unsigned long mask = 0x02000000;  // 0 0 10000000 0 00000000 0 00000000
+  unsigned int bestLength = 0;
+  unsigned int currentLength = 0;
 
-			if(k==3) mask_last_bit=mask_last_bit<<1;
+  // set 4 last bits to zero (to match data and MC bitmasks)
+  unsigned int wordLE = word & m_maskFourLastBits;
 
-			if ( word_TE & mask_last_bit )
-			{
-				SawUnit1 = true;
-				break;					
-			}
-		} 
-	}
-	
-	if(SawUnit1 == false && SawZero2 == true) return 19;
-	
-  }
-  
-  //+++++++++++++++++++++++++++++++++++++
-  
-  for (i = 0; i < 24; ++i)
-  {
-  
-	if(!(word_TE & mask) && i>3)
-	{
-	  SawZero1 = true;
-	}
-    if(SawZero1){  
-		if ( (word_TE & mask) && SawZero )
-			break;
-		else if ( !(word_TE & mask) )
-			SawZero = true;
+  mask >>=1;  // 0 0 01000000 0 00000000 0 00000000
+  bool SawZero = false;
+  unsigned int k = 1;
+  leadingEdge=0, trailingEdge=0;
+  unsigned int currentLeadingEdge=0, currentTrailingEdge=0;
+
+  // shift bitmask to the right until end
+  while (true) {
+    if (!(wordLE & mask) && !SawZero) SawZero = true; // search for the first 0 to 1 transition
+    if (SawZero) {
+      if (wordLE & mask){
+        if (currentLength==0) currentLeadingEdge=k;
+        currentTrailingEdge=k;
+        ++currentLength;
+      } else { // remember longest island, ignore islands of length 1 which are very likely noise
+        if (currentLength >= bestLength && currentLeadingEdge<18 && currentLength > 1) {
+          bestLength = currentLength;
+          leadingEdge = currentLeadingEdge;
+          trailingEdge = currentTrailingEdge;
+        }
+        currentLength = 0;
+      }
     }
-    mask <<= 1;
-    if (i == 7 || i == 15)
-      mask <<= 1;
+    mask >>= 1;
+    if (!(mask & m_maskThreeLastBits)) break; // stop after checking 20 LT bits
+    if (k == 7 || k == 15) mask >>= 1; // ignore HT bits
+    assert(k < 20);
+    ++k;
   }
- 
-  if ( 24 == i )
-    return i;
-
-  return (23 - i);
-
+  assert(k == 20);
+  // avoid very early TE, most likely from previous BX. Hit will still be used for tracking if it has a valid LE
+  if (trailingEdge < 8) trailingEdge = 0;
+  return leadingEdge && trailingEdge;
 }
-
diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx
index bf4f0d3c9a262b811fea7d36d3ba70b050df91d6..dbd320ee0fc761e14d15c82b4c2b1fdd41a62004 100644
--- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.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
 */
 
 ////////////////////////////////////////////////////////////////////
@@ -639,7 +639,7 @@ namespace InDet
 	if (tegap>0.&& hont>1.0) tegap = tegap/(hont-1.0); // average TE gap for a track
 	
 
-	if ( !m_TRTdEdxTool.name().empty() ) dEdx =  m_TRTdEdxTool->dEdx((&track), !m_mcswitch, true, true);
+	if ( !m_TRTdEdxTool.name().empty() ) dEdx =  m_TRTdEdxTool->dEdx((&track));
 	else 	dEdx =  -999.0;
       }
       else{
diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx
index 341cb3b00c46d01b2da3cab656920da014a38f7c..a92be98d31d51b8b933e36d1c62f6fed998bddf8 100644
--- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/TrtToolsBetaLiklihood.cxx
@@ -319,7 +319,7 @@ void TRT_FEbeta_fcn ATLAS_NOT_THREAD_SAFE // Global variables are used without p
      //std::cout << "FEbeta_fcn 2" << std::endl;
      
      // beta so small we've shifted off the map
-     if (bit-binShift-1 < 0) {
+     if (bit-binShift-1 < 0 || bit-binShift >= 24) {
        prob = 1.E-15; // give some very low prob to get away from here
        //std::cout << prob << std::endl;
      } else {
diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h b/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h
index eca1a31d74d8faedf1bb975aa64c86ef85663840..02a342a7844cc3373135326f9ddf704b77092c0e 100755
--- a/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h
+++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h
@@ -17,9 +17,8 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "InDetConversionFinderTools/InDetConversionFinderTools.h" //why needed?
 #include "AthContainers/DataVector.h"
-#include "xAODTracking/VertexContainerFwd.h"
+#include "xAODTracking/VertexContainer.h"
 #include "xAODTracking/VertexAuxContainer.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "StoreGate/WriteDecorHandleKey.h"
@@ -45,17 +44,17 @@
    uksmin < m(pipi) < uksmax or ulamin < m(ppi) < ulamax or ulamin < m(pip) < ulamax
 
    V0s are kept if the cumulative chi2 probability of the unconstrained fit is > minVertProb (= 0.0001)
-  
+
    If doSimpleV0 = True all vertices that pass these cuts are stored in V0UnconstrVertices.
 
    If doSimpleV0 = False (default) mass constrained fits are attempted if
      - the invariant mass of the unconstrained V0 is in the allowed range:
        ksmin < m(pipi) < ksmax, lamin < m(ppi), m(pip) < lamax
        and the error on the invariant mass is < errmass (= 100 MeV)
-     - if an input vertex (collection) is provided the unconstrained V0 is required to 
+     - if an input vertex (collection) is provided the unconstrained V0 is required to
        have an impact parameter w.r.t the vertex < vert_a0xy_cut (= 3 mm) in xy and
        < vert_a0z_cut (= 15 mm) in z, the cosine of the angle between the V0 momentum and
-       the direction from the input vertex to the V0 vertex is > 0, 
+       the direction from the input vertex to the V0 vertex is > 0,
        Lxy w.r.t the vertex is < vert_lxy_cut (= 500 mm) and Lxy/sigma(Lxy) > vert_lxy_sig (= 2)
 
    Mass constrainedV0s are kept if the cumulative chi2 probability of the fit is > minVertProb (= 0.0001)
@@ -108,14 +107,14 @@ namespace InDet
                              xAOD::VertexContainer*& ksContainer, xAOD::VertexAuxContainer*& ksAuxContainer,
                              xAOD::VertexContainer*& laContainer, xAOD::VertexAuxContainer*& laAuxContainer,
                              xAOD::VertexContainer*& lbContainer, xAOD::VertexAuxContainer*& lbAuxContainer,
-                             const xAOD::Vertex* vertex, 
+                             const xAOD::Vertex* vertex,
 			     // AthenaMT migration: passing the vertex collection name at run-time is not supported
 			     SG::ReadHandle<xAOD::VertexContainer> vertColl
 			     );
 
   //protected:
   private:
-    SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleKey { this, "TrackParticleCollection", "InDetTrackParticles", 
+    SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleKey { this, "TrackParticleCollection", "InDetTrackParticles",
                                                                          "key for retrieval of TrackParticles" };
 
     ToolHandle < Trk::IVertexFitter > m_iVertexFitter;
@@ -165,7 +164,7 @@ namespace InDet
     double        m_vert_lxy_cut;             //!< V0 lxy V0 lxy  (<500.)
     double        m_vert_a0xy_cut;            //!< V0 |a0xy| wrt a vertex (<3.)
     double        m_vert_a0z_cut;             //!< V0 |a0z| wrt a vertex (<15.)
-    
+
     unsigned int  m_events_processed;
     unsigned int  m_V0s_stored;
     unsigned int  m_Kshort_stored;
@@ -191,7 +190,7 @@ namespace InDet
 
     xAOD::Vertex* massFit(int pdgID, std::vector<const xAOD::TrackParticle*> pairV0, Amg::Vector3D vertex, Trk::TrkV0VertexFitter* concreteVertexFitter);
 
-    SG::ReadHandleKey<xAOD::VertexContainer> m_vertexKey { this, "VertexContainer", "PrimaryVertices", 
+    SG::ReadHandleKey<xAOD::VertexContainer> m_vertexKey { this, "VertexContainer", "PrimaryVertices",
 	                                                   "primary vertex container" };
     SG::WriteDecorHandleKey<xAOD::VertexContainer> m_v0LinksDecorkey;
     SG::WriteDecorHandleKey<xAOD::VertexContainer> m_v0_ksLinksDecorkey;
@@ -202,7 +201,7 @@ namespace InDet
     SG::WriteDecorHandleKey<xAOD::VertexContainer> m_mDecor_gmass;
     SG::WriteDecorHandleKey<xAOD::VertexContainer> m_mDecor_gmasserr;
     SG::WriteDecorHandleKey<xAOD::VertexContainer> m_mDecor_gprob;
-    
+
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
 
 
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt
index a4c2b1badf90c35901967670594645cef9321bd8..a7fbdb5a02a74219b028ec4782b14c664da146df 100644
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt
@@ -15,7 +15,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/EventPrimitives
                           GaudiKernel
                           InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
+			              InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
+                          InnerDetector/InDetRawEvent/InDetRawData
                           Tracking/TrkDetDescr/TrkSurfaces
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkEvent/TrkPrepRawData )
@@ -30,12 +31,12 @@ atlas_add_library( InDetPrepRawData
                    PUBLIC_HEADERS InDetPrepRawData
                    INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthLinks CxxUtils AthenaKernel GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthLinks CxxUtils AthenaKernel GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetRawData
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( InDetPrepRawDataDict
                       InDetPrepRawData/InDetPrepRawDataDict.h
                       InDetPrepRawData/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthLinks CxxUtils AthenaKernel GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetPrepRawData EventContainers )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthLinks CxxUtils AthenaKernel GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetPrepRawData EventContainers InDetRawData )
 
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h
index 7cc82d31343c4385d5392a2bc7d15717a727d5a6..314efe47c2c396928f2aa836d7bdfd0fc0783423 100755
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h
@@ -19,6 +19,7 @@
 // Base class
 #include "TrkPrepRawData/PrepRawData.h"
 #include "TRT_ReadoutGeometry/TRT_BaseElement.h"
+#include "InDetRawData/TRT_LoLumRawData.h"
 
 class TRT_DriftCircleContainerCnv;
 class TRT_DriftCircleContainerCnv_p0;
@@ -41,13 +42,13 @@ class TRT_DriftCircle :   public Trk::PrepRawData
 	TRT_DriftCircle(const TRT_DriftCircle &) =default;
 	TRT_DriftCircle &operator=(const TRT_DriftCircle &)=default;
 	TRT_DriftCircle &operator=(TRT_DriftCircle &&)=default;
-        /** Constructor with parameters:
-	compact id of the DriftCircle,
-	the driftRadius and its error
-	the RDO dataword with additional validity bit
-	this class owns the pointers passed (except the TRT_BaseElement),
-        */
-	TRT_DriftCircle(
+  /** Constructor with parameters:
+	 *  compact id of the DriftCircle, 
+	 *  the driftRadius and its error
+	 *  the RDO dataword with additional validity bit 
+	 *  this class owns the pointers passed (except the TRT_BaseElement),
+   */
+	TRT_DriftCircle( 
 		const Identifier &clusId,
 		const Amg::Vector2D& driftRadius,
 		const std::vector<Identifier>& rdoList,
@@ -91,39 +92,39 @@ class TRT_DriftCircle :   public Trk::PrepRawData
 	virtual bool highLevel() const ;
 
 	/** returns true if the first bin is high */
-        virtual bool firstBinHigh() const;
+  virtual bool firstBinHigh() const; 
 
 	/** returns true if the last bin is high */
-        virtual bool lastBinHigh() const;
-
+  virtual bool lastBinHigh() const; 
+	
 	/** returns  Time over threshold in ns  */
 	virtual double timeOverThreshold() const ;
 
-        /** returns number of high bins between LE and TE (these included) */
-	virtual int numberOfHighsBetweenEdges() const;
-        /** returns number of low bins between LE and TE (these included) */
-	virtual int numberOfLowsBetweenEdges() const;
+  /** returns number of high bins between LE and TE (these included) */
+	virtual int numberOfHighsBetweenEdges() const;                                             
+  
+  /** returns number of low bins between LE and TE (these included) */
+	virtual int numberOfLowsBetweenEdges() const;                                             
   /** returns the raw driftTime */
   virtual double rawDriftTime() const;
-
+	
   /** returns the raw driftTime,
-   * the passed boolean indicates if the drift time is valid or not.
+	 * the passed boolean indicates if the drift time is valid or not.
    * depreciated for 13.0.20 and later */
   virtual double driftTime(bool& valid) const;
 
-  /** return true if the corrected drift time is OK */
-  virtual bool driftTimeValid() const;
-
-  /** return the detector element corresponding to this PRD */
-  virtual const InDetDD::TRT_BaseElement* detectorElement() const override final;
+	/** return true if the corrected drift time is OK */
+  virtual bool driftTimeValid() const; 
+        
+	/** return the detector element corresponding to this PRD */
+	virtual const InDetDD::TRT_BaseElement* detectorElement() const override final;
 
   /** Interface method checking the type*/
   virtual bool type(Trk::PrepRawDataType::Type type) const override final;
 
-
   // modifiers
 
-  /** set driftTimeValid flag */
+	/** set driftTimeValid flag */
   virtual void setDriftTimeValid(bool valid);
 
   //analysers
@@ -134,6 +135,7 @@ class TRT_DriftCircle :   public Trk::PrepRawData
     speeds etc */
   virtual bool isNoise() const;
 
+
   //debug printers
 
   /** dump information about the PRD object. */
@@ -147,12 +149,10 @@ class TRT_DriftCircle :   public Trk::PrepRawData
 	// not const because of DataPool
 	const InDetDD::TRT_BaseElement* m_detEl;
   unsigned int m_word;
-
 };
 
  MsgStream&    operator << (MsgStream& stream,    const TRT_DriftCircle& prd);
  std::ostream& operator << (std::ostream& stream, const TRT_DriftCircle& prd);
-
 }
 
 #include "InDetPrepRawData/TRT_DriftCircle.icc"
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.icc b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.icc
index 90696e45840b7860151c2d9347b7f8eb81efbaef..c9dd69a96d4c79e7477f02831a971639488c4616 100644
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.icc
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.icc
@@ -13,107 +13,19 @@ TRT_DriftCircle::getWord() const
 inline int
 TRT_DriftCircle::driftTimeBin() const
 {
-  unsigned mask = 0x02000000;
-  unsigned word_LE = m_word >> 6;
-  word_LE = word_LE << 6;
-
-  mask >>= 1;
-  bool SawZero = false;
-  int i;
-  for (i = 1; i < 18; ++i) {
-    if ((word_LE & mask) && SawZero)
-      break;
-    else if (!(word_LE & mask))
-      SawZero = true;
-    mask >>= 1;
-    if (i == 7 || i == 15)
-      mask >>= 1;
-  }
-  if (i == 18)
-    i = 0;
-  return i;
+  return TRT_LoLumRawData::driftTimeBin(m_word);
 }
 
 inline int
 TRT_DriftCircle::trailingEdge() const
 {
-  unsigned mask = 0x00000001;
-  unsigned mask_word = 0x0001fff0; // 11111111 1 11110000
-  unsigned mask_last_bit = 0x10;   // 10000
-
-  unsigned word_TE = m_word & mask_word;
-
-  bool SawZero = true;
-  bool SawZero1 = false;
-  bool SawZero2 = false;
-  bool SawUnit1 = false;
-  int i = 0;
-  int j = 0;
-  int k = 0;
-
-  if (word_TE & mask_last_bit) {
-
-    for (j = 0; j < 11; ++j) {
-      mask_last_bit = mask_last_bit << 1;
-
-      if (j == 3)
-        mask_last_bit = mask_last_bit << 1;
-
-      if (!(word_TE & mask_last_bit)) {
-        SawZero2 = true;
-        break;
-      }
-    }
-
-    if (SawZero2 == false)
-      return 19;
-
-    if (SawZero2 == true) {
-      for (k = j + 1; k < 11; ++k) {
-        mask_last_bit = mask_last_bit << 1;
-
-        if (k == 3)
-          mask_last_bit = mask_last_bit << 1;
-
-        if (word_TE & mask_last_bit) {
-          SawUnit1 = true;
-          break;
-        }
-      }
-    }
-
-    if (SawUnit1 == false && SawZero2 == true)
-      return 19;
-  }
-
-  //+++++++++++++++++++++++++++++++++++++
-
-  for (i = 0; i < 24; ++i) {
-
-    if (!(word_TE & mask) && i > 3) {
-      SawZero1 = true;
-    }
-    if (SawZero1) {
-      if ((word_TE & mask) && SawZero)
-        break;
-      else if (!(word_TE & mask))
-        SawZero = true;
-    }
-    mask <<= 1;
-    if (i == 7 || i == 15)
-      mask <<= 1;
-  }
-
-  if (24 == i)
-    return i;
-
-  return (23 - i);
+  return TRT_LoLumRawData::trailingEdge(m_word);
 }
 
 inline bool
 TRT_DriftCircle::highLevel() const
 {
-  return (m_word & 0x04020100);
+  return TRT_LoLumRawData::highLevel(m_word);
 }
 
 inline bool
@@ -131,24 +43,13 @@ TRT_DriftCircle::lastBinHigh() const
 inline double
 TRT_DriftCircle::timeOverThreshold() const
 {
-  double binWidth = 3.125;
-
-  int LE = driftTimeBin();
-  int TE = trailingEdge();
-
-  if ((0 == LE) || (24 == LE) || (24 == TE) || (0 == TE) || (23 == LE)) {
-    return 0;
-  }
-
-  double time = (double)(TE - LE + 1) * binWidth;
-
-  return time;
+  return TRT_LoLumRawData::timeOverThreshold(m_word);
 }
 
 inline double
 TRT_DriftCircle::rawDriftTime() const
 {
-  return (driftTimeBin() + 0.5) * 3.125;
+    return (TRT_LoLumRawData::driftTimeBin(m_word)+0.5) * TRT_LoLumRawData::getDriftTimeBinWidth();
 }
 
 inline bool
@@ -172,6 +73,7 @@ TRT_DriftCircle::setDriftTimeValid(bool valid)
 inline int
 TRT_DriftCircle::numberOfHighsBetweenEdges() const
 {
+  // should return always 0 with the largest island algorithm
   int LE = driftTimeBin();
   int TE = trailingEdge();
   unsigned mask = 0x02000000;
@@ -190,6 +92,7 @@ TRT_DriftCircle::numberOfHighsBetweenEdges() const
 inline int
 TRT_DriftCircle::numberOfLowsBetweenEdges() const
 {
+  // should return always 0 with the largest island algorithm
   int LE = driftTimeBin();
   int TE = trailingEdge();
   return (TE - LE + 1 - numberOfHighsBetweenEdges());
@@ -204,6 +107,7 @@ TRT_DriftCircle::isNoise() const
     return true;
   return false;
 }
+
 inline bool
 TRT_DriftCircle::type(Trk::PrepRawDataType::Type type) const
 {
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetConversionFinderTools/CMakeLists.txt
index ddab67665eaa12b80d99632f3d1a99b2d4f95339..23bf33cd1185ec8f11a69d3c0acd4258fb6a18cd 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/CMakeLists.txt
@@ -39,12 +39,15 @@ atlas_add_library( InDetConversionFinderToolsLib
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces Particle TrkEventPrimitives TrkParameters TrkParticleBase TrkTrack
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthLinks InDetPrepRawData TrkSurfaces TrkMeasurementBase TrkRIO_OnTrack VxVertex TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces TrkVertexSeedFinderUtilsLib )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthLinks InDetPrepRawData TrkSurfaces TrkMeasurementBase TrkRIO_OnTrack VxVertex
+                   TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces TrkVertexSeedFinderUtilsLib )
 
 atlas_add_component( InDetConversionFinderTools
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces Particle TrkEventPrimitives TrkParameters TrkParticleBase TrkTrack AthLinks InDetPrepRawData TrkSurfaces TrkMeasurementBase TrkRIO_OnTrack VxVertex TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces InDetConversionFinderToolsLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces Particle TrkEventPrimitives
+                     TrkParameters TrkParticleBase TrkTrack AthLinks InDetPrepRawData TrkSurfaces TrkMeasurementBase TrkRIO_OnTrack VxVertex TrkExInterfaces
+                     TrkToolInterfaces TrkVertexFitterInterfaces InDetConversionFinderToolsLib )
 
 
 atlas_add_test( VertexPointEstimator_test
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h
index c6fb26564841290e420d4a5b4ab0c48dc9295905..bb4e38c4de8650872b69b8ca07d8b0b7de3cdabe 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/ConversionPostSelector.h
@@ -19,19 +19,19 @@ namespace CLHEP{
 }
 
 namespace InDet {
-  
+
   /**
      @class ConversionPostSelector
      This class selects tracks for conversion finder
      @author Tatjana Lenz , Thomas Koffas
   */
-  
+
   class ConversionPostSelector : public AthAlgTool {
-    
+
   public:
     ConversionPostSelector (const std::string& type,const std::string& name, const IInterface* parent);
     virtual ~ConversionPostSelector();
-    
+
     static const InterfaceID& interfaceID();
     virtual StatusCode initialize() override;
     virtual StatusCode finalize() override;
@@ -55,7 +55,7 @@ namespace InDet {
                         float deltaPhiVtxTrk) const;
 
   private:
-    /** Properties for track selection: 
+    /** Properties for track selection:
 	all cuts are ANDed */
     std::vector<double> m_maxChi2;     /** Chi2 cut.  */
     std::vector<double> m_invMassCut;  /** Invariant mass cut.  */
@@ -66,21 +66,21 @@ namespace InDet {
     double              m_maxPhiVtxTrk;/** Maximum difference in phi between reconstructed vertex and track at vertex. */
     bool                m_decorateVertices;/** Decorate vertices with values used for vertex selection */
 
-    
+
     /** Masses and mass ranges for different V0 hypotheses */
     double m_massK0      ;
     double m_sigmaK0     ;
     double m_massLambda  ;
     double m_sigmaLambda ;
     int    m_nsig        ;
-    
+
     /** struct of Particle Masses */
     static const Trk::ParticleMasses s_particleMasses;
-    
+
     /** Compute the four-momentum of a particle according to a mass hypothesis.  */
     CLHEP::HepLorentzVector fourP(const Trk::TrackParameters&, const Trk::TrackParameters&, double, bool) const;
   };
-  
+
 }
-#endif // INDETCONVERSIONFINDERTOOLS_CONVERSIONPOSTSELECTOR_H 
- 
+#endif // INDETCONVERSIONFINDERTOOLS_CONVERSIONPOSTSELECTOR_H
+
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h
index 89adfbb309fc333dd13ff8e77ed301e1727a814d..31a7e6465dfa6e6d41bb7235557aa661cf5f065f 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/SingleTrackConversionTool.h
@@ -11,56 +11,70 @@
 #include "xAODTracking/TrackParticleFwd.h"
 #include "xAODTracking/VertexContainerFwd.h"
 
-namespace Trk
-{
-  class Track;
-  class TrackParticleBase;
-  class ITrackSummaryTool;
-  class IExtrapolator;
+namespace Trk {
+class Track;
+class TrackParticleBase;
+class ITrackSummaryTool;
+class IExtrapolator;
 }
 
 namespace InDet {
-  class ConversionFinderUtils;
-  
-  /**
-     @class SingleTrackConversionTool
-     Helper tools to reconstruct single track conversions 
-     @author Tatjana Lenz , Thomas Koffas
-  */
-  
-  class SingleTrackConversionTool : public AthAlgTool {
-    
-  public:
-    SingleTrackConversionTool (const std::string& type,const std::string& name, const IInterface* parent);
-    virtual ~SingleTrackConversionTool();
-    
-    static const InterfaceID& interfaceID();
-    virtual StatusCode initialize() override;
-    virtual StatusCode finalize() override;
-    
-    /** Build single track conversion candidate. Trk::Track interface.  */
-    xAOD::Vertex* buildSingleTrackConversion(const Trk::Track* track) const;
-    /** Select single track conversion candidates.  Trk::Track interface. */
-    bool selectSingleTrackConversion(const Trk::Track* track) const;
-    /** Build single track conversion candidate. xAOD::TrackParticle interface.  */
-    xAOD::Vertex* buildSingleTrackParticleConversion(
-      const xAOD::TrackParticle*,
-      xAOD::VertexContainer* container) const;
-    /** Select single track conversion candidates.  xAOD::TrackParticle. */
-    bool selectSingleTrackParticleConversion(const xAOD::TrackParticle*) const;
-    
-  protected:
-    ToolHandle <InDet::ConversionFinderUtils> m_helpertool; /** Conversion helper tool. */
-    ToolHandle <Trk::ITrackSummaryTool>       m_trkSumTool; /** Track summary tool.  */
-    ToolHandle<Trk::IExtrapolator>            m_extrapolator;  //!< Track extrapolator tool.
-    double m_minInitR;        /** Minimum initial hit radius in order to consider track as coming from photon conversion */
-    double m_minInitR_noBLay; /** Minimum initial hit radius in order to consider track as coming from photon conversion */
-    double m_singleThreshold; /** Minimum ratio of HL hits for a track to be labeled as electron */
-    int    m_maxBLhits;       /** Maximum number of blayer hits */       
-    //double m_maxPhiVtxTrk;    /** maximum difference in pointing */
-    bool   m_PIDonlyForXe; /** Only check TRT PID if all hits are Xe hits */    
+class ConversionFinderUtils;
+
+/**
+   @class SingleTrackConversionTool
+   Helper tools to reconstruct single track conversions
+   @author Tatjana Lenz , Thomas Koffas
+*/
+
+class SingleTrackConversionTool : public AthAlgTool
+{
+
+public:
+  SingleTrackConversionTool(const std::string& type,
+                            const std::string& name,
+                            const IInterface* parent);
+  virtual ~SingleTrackConversionTool();
+
+  static const InterfaceID& interfaceID();
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize() override;
+
+  /** Build single track conversion candidate. Trk::Track interface.  */
+  xAOD::Vertex* buildSingleTrackConversion(const Trk::Track* track) const;
+  /** Select single track conversion candidates.  Trk::Track interface. */
+  bool selectSingleTrackConversion(const Trk::Track* track) const;
+  /** Build single track conversion candidate. xAOD::TrackParticle interface. */
+  xAOD::Vertex* buildSingleTrackParticleConversion(
+    const xAOD::TrackParticle*,
+    xAOD::VertexContainer* container) const;
+  /** Select single track conversion candidates.  xAOD::TrackParticle. */
+  bool selectSingleTrackParticleConversion(const xAOD::TrackParticle*) const;
+
+protected:
+  /** Conversion helper tool. */
+  ToolHandle<InDet::ConversionFinderUtils> m_helpertool{
+    this,
+    "ConversionFinderHelperTool",
+    "InDet::ConversionFinderUtils",
+    "Helper for conversion finding"
   };
-  
+  //!< Track extrapolator tool.
+  ToolHandle<Trk::IExtrapolator> m_extrapolator{ this,
+                                                 "Extrapolator",
+                                                 "",
+                                                 "Track Extrapolator Tool" };
+  double m_minInitR; /** Minimum initial hit radius in order to consider track
+                        as coming from photon conversion */
+  double m_minInitR_noBLay; /** Minimum initial hit radius in order to consider
+                               track as coming from photon conversion */
+  double m_singleThreshold; /** Minimum ratio of HL hits for a track to be
+                               labeled as electron */
+  int m_maxBLhits;          /** Maximum number of blayer hits */
+  // double m_maxPhiVtxTrk;    /** maximum difference in pointing */
+  bool m_PIDonlyForXe; /** Only check TRT PID if all hits are Xe hits */
+};
+
 }
-#endif // INDETCONVERSIONFINDERTOOLS_SINGLETRACKCONVERSION_H 
- 
+#endif // INDETCONVERSIONFINDERTOOLS_SINGLETRACKCONVERSION_H
+
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h
index 4be35614b2021db92530cf7315aae0d75ed2cf3d..5d105a226b2cbed87386ca0f9316043971d28108 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/TrackPairsSelector.h
@@ -7,75 +7,89 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "InDetConversionFinderTools/ConversionFinderUtils.h"
 #include "Particle/TrackParticle.h"
-
+#include "TrkVertexSeedFinderUtils/ITrkDistanceFinder.h"
 #include "xAODTracking/TrackParticleFwd.h"
 
+namespace Trk {
+class Track;
+}
 
-namespace Trk
+namespace InDet {
+/**
+   @class TrackPairsSelector
+   This class selects track pairs for conversion finder
+   @author Tatjana Lenz, Thomas Koffas
+*/
+
+class TrackPairsSelector : public AthAlgTool
 {
-  class Track;
-  class ITrkDistanceFinder;
-}
 
+public:
+  struct Cache
+  {
+    /** Distance of closest approach between the tracks **/
+    float m_distance = 9999.;
+    /** Delta cot theta between the tracks **/
+    float m_deltaCotTheta = 9999.;
+    /** Distance difference between initial hits of tracks */
+    float m_deltaInit = 9999.;
+  };
 
+  TrackPairsSelector(const std::string& type,
+                     const std::string& name,
+                     const IInterface* parent);
 
-namespace InDet {
-  class ConversionFinderUtils;
-
-  /**
-     @class TrackPairsSelector
-     This class selects track pairs for conversion finder
-     @author Tatjana Lenz, Thomas Koffas
-  */
-  
-  class TrackPairsSelector : public AthAlgTool {
-    
-  public:
-
-    struct Cache{
-      float m_distance = 9999. ; /** Distance of closest approach between the tracks **/
-      float m_deltaCotTheta= 9999.; /** Delta cot theta between the tracks **/
-      float m_deltaInit = 9999.; /** Distance difference between initial hits of tracks */
-    };
-
-    TrackPairsSelector(const std::string& type,
-                       const std::string& name,
-                       const IInterface* parent);
-   
-    virtual ~TrackPairsSelector();
-    
-    static const InterfaceID& interfaceID();
- 
-    virtual StatusCode initialize() override;
-    virtual StatusCode finalize() override;
-    
-    /** Track pair selectors.Return true if the argument track fulfills the selection */
-    bool selectTrackParticlePair(const xAOD::TrackParticle* trkPpos,
-                                 const xAOD::TrackParticle* trkPneg,
-                                 Cache& cache) const;
-
-    bool selectTrackPair(const Trk::Track* trkpos,
-                         const Trk::Track* trkneg) const;
-
-    /** Return a map with the values calculated for the last pair
-      * to decorate the vertex once it is created **/
-    std::map<std::string, float> getLastValues(const Cache& cache) const;
-    
-  private:
-
-    ToolHandle <InDet::ConversionFinderUtils> m_helpertool; /**Conversion helper tool.  */
-    ToolHandle<Trk::ITrkDistanceFinder> m_distanceTool;  /** Distance of minimum approach tool   */
-    /** Properties for track selection: all cuts are ANDed */
-    double m_maxR;                 /** Maximum initial hit radius in order to apply the impact point cut*/
-    double m_MinTrkAngle;          /** Minimum allowed angle between decay tracks. Used only in V0 reconstruction. */
-    std::vector<double> m_maxDist; /** Maximum allowed distance of minimum approach */
-    std::vector<double> m_etaCut;  /** Maximum eta difference between tracks in pair. */
-    std::vector<double> m_initCut; /** Maximum distance difference between initial hits of tracks in pair. */
+  virtual ~TrackPairsSelector();
+
+  static const InterfaceID& interfaceID();
+
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize() override;
 
+  /** Track pair selectors.Return true if the argument track fulfills the
+   * selection */
+  bool selectTrackParticlePair(const xAOD::TrackParticle* trkPpos,
+                               const xAOD::TrackParticle* trkPneg,
+                               Cache& cache) const;
 
+  bool selectTrackPair(const Trk::Track* trkpos,
+                       const Trk::Track* trkneg) const;
+
+  /** Return a map with the values calculated for the last pair
+   * to decorate the vertex once it is created **/
+  std::map<std::string, float> getLastValues(const Cache& cache) const;
+
+private:
+  /**Conversion helper tool.  */
+  ToolHandle<InDet::ConversionFinderUtils> m_helpertool{
+    this,
+    "ConversionFinderHelperTool",
+    "InDet::ConversionFinderUtils",
+    "Conversion helper tool"
+  };
+  /** Distance of minimum approach tool   */
+  ToolHandle<Trk::ITrkDistanceFinder> m_distanceTool{
+    this,
+    "DistanceTool",
+    "Trk::SeedNewtonDistanceFinder",
+    "Distance of minimum approach tool"
   };
-  
+  /** Properties for track selection: all cuts are ANDed */
+
+  /** Maximum initial hit radius in order to apply the impact point cut*/
+  double m_maxR;
+  /** Minimum allowed angle between decay tracks. Used only in V0
+   * reconstruction. */
+  double m_MinTrkAngle;
+  /** Maximum allowed distance of minimum approach */
+  std::vector<double> m_maxDist;
+  /** Maximum eta difference between tracks in pair. */
+  std::vector<double> m_etaCut;
+  /** Maximum distance difference between initial  hits of tracks in pair. */
+  std::vector<double> m_initCut;
+};
 }
-#endif // INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H 
+#endif // INDETCONVERSIONFINDERTOOLS_TRACKPAIRSSELECTOR_H
 
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
index dc869c936c89cd90046fabb05e7c80f0f436b08a..b6c9dcd959080d20b164c66f6335eb8ab55b29ab 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
@@ -40,7 +40,7 @@ namespace InDet {
   // athena interface definition
   // -------------------------------------------------------
   static const InterfaceID IID_ISingleTrackConversionTool("InDet::SingleTrackConversionTool", 1, 0);
-  
+
   // -------------------------------------------------------
   // constructor
   // -------------------------------------------------------
@@ -48,9 +48,6 @@ namespace InDet {
                                                        const std::string& name,
                                                        const IInterface* parent)
     : AthAlgTool(type, name, parent)
-    , m_helpertool("InDet::ConversionFinderUtils")
-    , m_trkSumTool("Trk::TrackSummaryTool")
-    , m_extrapolator("Trk::Extrapolator/InDetExtrapolator")
     , m_minInitR(70.)
     , m_minInitR_noBLay(120.)
     , m_singleThreshold(0.1)
@@ -58,9 +55,6 @@ namespace InDet {
   // m_maxPhiVtxTrk(0.2)
   {
     declareInterface<SingleTrackConversionTool>(this);
-    declareProperty("ConversionFinderHelperTool" , m_helpertool);
-    declareProperty("TrackSummaryTool"           , m_trkSumTool);
-    declareProperty("Extrapolator"               , m_extrapolator      ); //Extrapolator tool
     declareProperty("MinInitialHitRadius"        , m_minInitR);
     declareProperty("MinInitialHitRadius_noBlay" , m_minInitR_noBLay);
     declareProperty("MinRatioOfHLhits"           , m_singleThreshold);
@@ -69,7 +63,7 @@ namespace InDet {
     declareProperty("PIDonlyForXe"               , m_PIDonlyForXe = false,
       "Only check TRT PID if all hits are Xe hits");
   }
-  
+
   // -------------------------------------------------------
   // destructor
   // -------------------------------------------------------
@@ -91,17 +85,9 @@ namespace InDet {
     if ( m_helpertool.retrieve().isFailure() ) {
       ATH_MSG_FATAL("Failed to retrieve tool " << m_helpertool);
       return StatusCode::FAILURE;
-    } 
+    }
       ATH_MSG_INFO("Retrieved tool " << m_helpertool);
-    
-    
-    /* Get the track summary tool from ToolSvc */
-    if ( m_trkSumTool.retrieve().isFailure() ) {
-      ATH_MSG_FATAL("Failed to retrieve tool " << m_trkSumTool);
-      return StatusCode::FAILURE;
-    } 
-      ATH_MSG_INFO("Retrieved tool " << m_trkSumTool);
-    
+
 
     /* Get the extrapolator */
     if (m_extrapolator.retrieve().isFailure()) {
@@ -109,11 +95,11 @@ namespace InDet {
       return StatusCode::FAILURE;
     }
       ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
-    
-    
+
+
     return StatusCode::SUCCESS;
   }
-  
+
   // -------------------------------------------------------
   // finalize method
   // -------------------------------------------------------
@@ -128,33 +114,33 @@ namespace InDet {
   SingleTrackConversionTool::buildSingleTrackConversion(
     const Trk::Track* track) const
   {
-    
+
     // some local variables
     const Trk::TrackParameters* tp = nullptr;
     AmgSymMatrix(5)  em ;
     em.setZero();
-    Amg::Vector3D  gp ; 
-    gp.setZero(); 
+    Amg::Vector3D  gp ;
+    gp.setZero();
     // double chi2 = 0.; int Ndf = 0;
-    
+
     // get track states on surface
     const DataVector<const Trk::TrackStateOnSurface>* tsos = track->trackStateOnSurfaces();
     if(!tsos) return nullptr;
-    
+
     // iterate over them
     DataVector<const Trk::TrackStateOnSurface>::const_iterator its,itse = tsos->end();
     for(its=tsos->begin();its!=itse;++its) {
-      
+
       // check if this is the first measurement
       if((*its)->type(Trk::TrackStateOnSurface::Measurement)) {
-	
+
         // get the parameters at this surface
         tp = (*its)->trackParameters();
         if(!tp) {
           ATH_MSG_WARNING ("Require parameters at first measurement, conversion finder logic broken");
           return nullptr;
         }
-    
+
         em = *(tp->covariance());
         gp = (tp->position());
         break;
@@ -164,65 +150,65 @@ namespace InDet {
     if(!tp) {
       return nullptr;
     }
-    
+
     //
     // --- Need to compute a global position covariance matrix as J.C.JT
     //
 
     // get transform
     const Amg::Transform3D  T( tp->associatedSurface().transform());
-    
+
     // this will be the new transform
     AmgSymMatrix(3) nCovVtx;
-    
+
     // ME: use the surface to find out what we do, do not hardcode the geoemtry
-      
+
     if ( Trk::Surface::Plane == tp->associatedSurface().type() ){
-      
+
       ///The local position parameters covariance matrix C (2x2)
       double p11 = em(Trk::locX, Trk::locX);
       double p12 = em(Trk::locX, Trk::locY);
       double p21 = em(Trk::locY, Trk::locX);
       double p22 = em(Trk::locY, Trk::locY);
-      
+
       ///The Jacobian matrix J (3x2)
       double Ax[3] = {T(0,0),T(1,0),T(2,0)};
       double Ay[3] = {T(0,1),T(1,1),T(2,1)};
       double a11 = Ax[0]; double a12 = Ay[0];
       double a21 = Ax[1]; double a22 = Ay[1];
       double a31 = Ax[2]; double a32 = Ay[2];
-      
+
       ///The A = J.C (3x2)
       double A11 = a11*p11 + a12*p21; double A12 = a11*p12 + a12*p22;
       double A21 = a21*p11 + a22*p21; double A22 = a21*p12 + a22*p22;
       double A31 = a31*p11 + a32*p21; double A32 = a31*p12 + a32*p22;
-      
+
       ///The A.JT = J.C.JT (3x3)
       double P11 = a11*A11 + A12*a12; double P12 = A11*a21 + A12*a22; double P13 = A11*a31 + A12*a32;
       double P21 = A21*a11 + A22*a12; double P22 = A21*a21 + A22*a22; double P23 = A21*a31 + A22*a32;
       double P31 = A31*a11 + A32*a12; double P32 = A31*a21 + A32*a22; double P33 = A31*a31 + A32*a32;
-      
+
       ///Construct the new covariance matrix (3x3)
       nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
       nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
-      nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;  
-    } 
+      nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;
+    }
     else if (  Trk::Surface::Line == tp->associatedSurface().type()  ) {
-      
+
       //The local position parameters covariance matrix C (2x2)
       double p11 = em(Trk::locR, Trk::locR);
       double p12 = em(Trk::locR, Trk::locZ);
       double p21 = em(Trk::locZ, Trk::locR);
       double p22 = em(Trk::locZ, Trk::locZ);
-      
+
       ///The straight line surface (wire) global directions
       double A[3] = {T(0,2),T(1,2),T(2,2)};
-	
+
       ///The particle global direction
       double Px = tp->momentum().x();
       double Py = tp->momentum().y();
       double Pz = tp->momentum().z();
-      
+
       ///The Jacobian matrix J (3x2)
       double Bx = A[1]*Pz-A[2]*Py;
       double By = A[2]*Px-A[0]*Pz;
@@ -231,25 +217,25 @@ namespace InDet {
       double a11 = Bx; double a12 = A[0];
       double a21 = By; double a22 = A[1];
       double a31 = Bz; double a32 = A[2];
-      
+
       ///The A = J.C (3x2)
       double A11 = a11*p11 + a12*p21; double A12 = a11*p12 + a12*p22;
       double A21 = a21*p11 + a22*p21; double A22 = a21*p12 + a22*p22;
       double A31 = a31*p11 + a32*p21; double A32 = a31*p12 + a32*p22;
-      
+
       ///The A.JT = J.C.JT (3x3)
       double P11 = a11*A11 + A12*a12; double P12 = A11*a21 + A12*a22; double P13 = A11*a31 + A12*a32;
       double P21 = A21*a11 + A22*a12; double P22 = A21*a21 + A22*a22; double P23 = A21*a31 + A22*a32;
       double P31 = A31*a11 + A32*a12; double P32 = A31*a21 + A32*a22; double P33 = A31*a31 + A32*a32;
-      
+
       ///Construct the new covariance matrix (3x3)
       nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
       nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
       nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;
-    } 
+    }
     else {
       ATH_MSG_ERROR ("Wrong type of surface, not supported !");
-      return nullptr; 
+      return nullptr;
     }
 
     // Create the corresponding vector of tracks at that RecVertex. Contains one
@@ -269,13 +255,13 @@ namespace InDet {
     Trk::TrackParameters* pp = perpar->clone();
     delete perpar;
     Trk::VxTrackAtVertex trkV(1., pp);
-    
+
     Trk::LinkToTrack * linkTT = new Trk::LinkToTrack();
 
     linkTT->setElement(track);
     trkV.setOrigTrack(linkTT);
     tmpVTAV.push_back(trkV);
-    
+
     xAOD::Vertex* vertex = new xAOD::Vertex();
     vertex->makePrivateStore();
     vertex->setPosition(gp);
@@ -287,7 +273,7 @@ namespace InDet {
       vertex->vxTrackAtVertex().push_back(vtxTrack);
     }
 
-    return vertex;    
+    return vertex;
   }
 
   // -------------------------------------------------------
@@ -441,12 +427,12 @@ namespace InDet {
 
       ///The straight line surface (wire) global directions
       double A[3] = {T(0,2),T(1,2),T(2,2)};
-      
+
       ///The particle global direction
       double Px = trkPar.momentum().x();
       double Py = trkPar.momentum().y();
       double Pz = trkPar.momentum().z();
-      
+
       ///The Jacobian matrix J (3x2)
       double Bx = A[1]*Pz-A[2]*Py;
       double By = A[2]*Px-A[0]*Pz;
@@ -455,17 +441,17 @@ namespace InDet {
       double a11 = Bx; double a12 = A[0];
       double a21 = By; double a22 = A[1];
       double a31 = Bz; double a32 = A[2];
-      
+
       ///The A = J.C (3x2)
       double A11 = a11*p11 + a12*p21; double A12 = a11*p12 + a12*p22;
       double A21 = a21*p11 + a22*p21; double A22 = a21*p12 + a22*p22;
       double A31 = a31*p11 + a32*p21; double A32 = a31*p12 + a32*p22;
-      
+
       ///The A.JT = J.C.JT (3x3)
       double P11 = a11*A11 + A12*a12; double P12 = A11*a21 + A12*a22; double P13 = A11*a31 + A12*a32;
       double P21 = A21*a11 + A22*a12; double P22 = A21*a21 + A22*a22; double P23 = A21*a31 + A22*a32;
       double P31 = A31*a11 + A32*a12; double P32 = A31*a21 + A32*a22; double P33 = A31*a31 + A32*a32;
-      
+
       ///Construct the new covariance matrix (3x3)
       nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
       nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
@@ -473,8 +459,8 @@ namespace InDet {
     }
 
     // now construct the vertex from the global position, cov. put NdF and chi2 to zero (Markus)
-    
-    
+
+
     xAOD::Vertex* vertex = new xAOD::Vertex();
     container->push_back( vertex );
 
@@ -482,7 +468,7 @@ namespace InDet {
     vertex->setCovariancePosition(nCovVtx);
     vertex->setVertexType(xAOD::VxType::ConvVtx);
     vertex->setFitQuality( 0, 0);
-    
+
     return vertex;
   }
 
@@ -490,9 +476,9 @@ namespace InDet {
   // preselection cuts on track particles
   // -------------------------------------------------------
   bool SingleTrackConversionTool::selectSingleTrackParticleConversion(const xAOD::TrackParticle* track) const{
-   
+
      //Position of first hit in track particle
-    
+
     int index(-1);
     for(unsigned int i(0); i< track->numberOfParameters() ; ++i ){
       if( xAOD::FirstMeasurement == track->parameterPosition(i) ){
@@ -504,55 +490,55 @@ namespace InDet {
       ATH_MSG_WARNING("Track Particle does not contain first Measurement track parameters");
       return false;
     }
-  
+
     const Trk::CurvilinearParameters trk_meas = track->curvilinearParameters(index);
-    
+
     uint8_t dummy;
 
-    uint8_t expectedHitInBLayer(0); 
+    uint8_t expectedHitInBLayer(0);
     if( track->summaryValue(dummy,xAOD::expectInnermostPixelLayerHit) )
        expectedHitInBLayer = dummy;
 
-    float Rfirst = trk_meas.position().perp();    
-    if (expectedHitInBLayer) 
+    float Rfirst = trk_meas.position().perp();
+    if (expectedHitInBLayer)
     {
       // ME: cut on minInitR if blayer is ok
-      if (Rfirst < m_minInitR) 
+      if (Rfirst < m_minInitR)
       {
-        ATH_MSG_DEBUG("BLayer hit expected. Radius of first hit (" << 
+        ATH_MSG_DEBUG("BLayer hit expected. Radius of first hit (" <<
                       Rfirst << ") below minimum: " << m_minInitR);
         return false;
       }
-    } 
-    else 
+    }
+    else
     {
       // ME: cut on minInitR_NBLay if blayer is off
       if(Rfirst < m_minInitR_noBLay)
       {
-        ATH_MSG_DEBUG("No BLayer hit expected. Radius of first hit (" << 
+        ATH_MSG_DEBUG("No BLayer hit expected. Radius of first hit (" <<
                       Rfirst << ") below minimum: " << m_minInitR_noBLay);
         return false;
       }
     }
 
 
-    uint8_t nTrtHits(0);       
+    uint8_t nTrtHits(0);
     if( track->summaryValue(dummy, xAOD::numberOfTRTHits))
       nTrtHits = dummy;
-      
-    uint8_t nTrtOutliers(0);   
+
+    uint8_t nTrtOutliers(0);
     if(track->summaryValue(dummy, xAOD::numberOfTRTOutliers))
       nTrtOutliers = dummy;
-      
+
     uint8_t ntrt = nTrtHits + nTrtOutliers;
-    
+
     uint8_t nTrtXenonHits(0);
     if( track->summaryValue(dummy, xAOD::numberOfTRTXenonHits) )
        nTrtXenonHits = dummy;
-    
-    
 
-    if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) { 
+
+
+    if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) {
       // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits
       float prob = 1.0;
       if( !track->summaryValue(prob,xAOD::eProbabilityHT) )
@@ -562,7 +548,7 @@ namespace InDet {
       }
       if (prob < m_singleThreshold)
       {
-        ATH_MSG_DEBUG("Probability (" << prob << ") below threshold: " 
+        ATH_MSG_DEBUG("Probability (" << prob << ") below threshold: "
                       << m_singleThreshold);
         return false;
       }
@@ -573,7 +559,7 @@ namespace InDet {
       nBLHits += dummy;
     if( track->summaryValue(dummy, xAOD::numberOfInnermostPixelLayerOutliers))
       nBLHits += dummy;
-    if(nBLHits > m_maxBLhits) 
+    if(nBLHits > m_maxBLhits)
     {
       ATH_MSG_DEBUG("BLayer hits (" << nBLHits << ") above maximum: " << m_maxBLhits);
       return false;
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx
index cfe1dfde49c171d0dd63b2271f203d2c17647f5a..4a2811624bfcb6d1d943ca515d173f2e00acdbb1 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/TrackPairsSelector.cxx
@@ -11,8 +11,6 @@
 		changes : M.Elsing
 ***************************************************************************/
 #include "InDetConversionFinderTools/TrackPairsSelector.h"
-#include "InDetConversionFinderTools/ConversionFinderUtils.h"
-#include "TrkVertexSeedFinderUtils/ITrkDistanceFinder.h"
 #include "TrkMeasurementBase/MeasurementBase.h"
 #include "GeoPrimitives/GeoPrimitivesHelpers.h"
 
@@ -43,27 +41,22 @@ namespace InDet {
                                          const std::string& name,
                                          const IInterface* parent)
     : AthAlgTool(type, name, parent)
-    , m_helpertool("InDet::ConversionFinderUtils")
-    , m_distanceTool(
-        "Trk::SeedNewtonDistanceFinder/InDetConversionTrkDistanceFinder")
     , m_maxR(500.)
     , m_MinTrkAngle(0.)
   {
     m_etaCut.push_back(0.8);
     m_etaCut.push_back(1.2);
     m_etaCut.push_back(1.2);
-    
+
     m_initCut.push_back(10000.);
     m_initCut.push_back(10000.);
     m_initCut.push_back(10000.);
-    
+
     m_maxDist.push_back(8.);
     m_maxDist.push_back(80.);
     m_maxDist.push_back(45.);
 
     declareInterface<TrackPairsSelector>(this);
-    declareProperty("ConversionFinderHelperTool", m_helpertool);
-    declareProperty("DistanceTool"              , m_distanceTool);
     declareProperty("MaxFirstHitRadius"         , m_maxR);
     declareProperty("MaxDistBetweenTracks"      , m_maxDist);
     declareProperty("MaxEta"                    , m_etaCut   );
@@ -86,20 +79,20 @@ namespace InDet {
     if ( m_helpertool.retrieve().isFailure() ) {
       msg(MSG::ERROR) << "Failed to retrieve tool " << m_helpertool << endmsg;
       return StatusCode::FAILURE;
-    } 
+    }
       msg(MSG::INFO) << "Retrieved tool " << m_helpertool << endmsg;
-    
+
 
     /* Get the distance tool from ToolsSvc */
     if(m_distanceTool.retrieve().isFailure()) {
       msg(MSG::ERROR) << "Could not get " << m_distanceTool << endmsg; return StatusCode::FAILURE;
     }
       msg(MSG::INFO) << "Got the distance tool " << m_distanceTool << endmsg;
-    
+
     msg(MSG::INFO) << "Initialization successful" << endmsg;
     return StatusCode::SUCCESS;
   }
-  
+
   // -------------------------------------------------------------
   StatusCode TrackPairsSelector::finalize() {
     return StatusCode::SUCCESS;
@@ -118,36 +111,36 @@ namespace InDet {
     const Trk::TrackParameters* perPos = &(trkPpos->perigeeParameters());
     const Trk::TrackParameters* perNeg = &(trkPneg->perigeeParameters());
     if (!(m_helpertool->momFraction(perPos, perNeg))) pass = false;
-    
+
     //Track summary information
-    
-    
+
+
     uint8_t nclusPos(0);
     uint8_t dummy(0);
     if(trkPpos->summaryValue(dummy,xAOD::numberOfSCTHits)){
       nclusPos += dummy;
-    } 
+    }
     if(trkPpos->summaryValue(dummy,xAOD::numberOfPixelHits)){
       nclusPos += dummy;
-    } 
-  
+    }
+
     uint8_t nclusNeg(0);
     if(trkPneg->summaryValue(dummy,xAOD::numberOfSCTHits)){
       nclusNeg += dummy;
-    } 
+    }
     if(trkPneg->summaryValue(dummy,xAOD::numberOfPixelHits)){
       nclusNeg += dummy;
-    } 
-  
-    
+    }
+
+
     int sCase = 100;
     if(nclusNeg>0 && nclusPos>0)                                   sCase = 0;
     if((nclusNeg>0 && nclusPos==0) || (nclusNeg==0 && nclusPos>0)) sCase = 1;
     if(nclusNeg==0 && nclusPos==0)                                 sCase = 2;
-    
+
     //Position of first hit in track particle
-    Trk::CurvilinearParameters parPos; 
-    Trk::CurvilinearParameters parNeg; 
+    Trk::CurvilinearParameters parPos;
+    Trk::CurvilinearParameters parNeg;
 
     int index(-1);
     for(unsigned int i(0); i< trkPpos->numberOfParameters() ; ++i ){
@@ -162,7 +155,7 @@ namespace InDet {
       ATH_MSG_WARNING("Track Particle does not contain first Measurement track parameters");
       return false;
     }
-    
+
     index = -1;
     for(unsigned int i(0); i< trkPneg->numberOfParameters() ; ++i ){
       if( xAOD::FirstMeasurement == trkPneg->parameterPosition(i) ){
@@ -205,10 +198,10 @@ namespace InDet {
     } else if(sCase == 2) {
       dinit = m_initCut[2];
     }
-    
+
     cache.m_deltaInit = fabs(firstRpos - firstRneg);
     if (cache.m_deltaInit > dinit) return false;
-    
+
     //Cut on distance of minimum approach between the two tracks.
     double maxDist = 1000.;
     if(sCase == 0) {
@@ -226,12 +219,12 @@ namespace InDet {
     if (!result) return false;
     cache.m_distance = dist (result.value());
     if (cache.m_distance>maxDist) return false;
-    
+
     //3D angle cut in the case of V0s, not used in the case of conversions
     double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
                     (perPos->momentum().mag() * perNeg->momentum().mag());
     if(d_beta <m_MinTrkAngle) pass = false;
-    
+
     return pass;
   }
 
@@ -246,7 +239,7 @@ namespace InDet {
     const Trk::Perigee* perPos = trkpos->perigeeParameters();
     const Trk::Perigee* perNeg = trkneg->perigeeParameters();
     if (!(m_helpertool->momFraction(perPos, perNeg))) pass = false;
-    
+
     ///Position of initial hit of the two tracks
     double init_pos = 0.; double init_neg = 0.;
     const DataVector<const Trk::MeasurementBase>* mb_pos = trkpos->measurementsOnTrack();
@@ -260,7 +253,7 @@ namespace InDet {
     if (init_neg<=m_maxR && init_pos<=m_maxR)  sCase = 0;
     if ((init_neg<=m_maxR && init_pos>m_maxR) || (init_neg>m_maxR && init_pos<=m_maxR))	sCase = 1;
     if (init_neg>m_maxR && init_pos>m_maxR)	sCase = 2;
-    
+
     //Cut on Deta
     double detaCut = 0.0;
     if(sCase == 0) {
@@ -306,12 +299,12 @@ namespace InDet {
       newDistance = dist (result.value());
       if (newDistance>maxDist) pass = false;
     }
-    
+
     //3D angle cut in the case of V0s, not used in the case of conversions
     double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
                     (perPos->momentum().mag() * perNeg->momentum().mag());
     if(d_beta <m_MinTrkAngle) pass = false;
-    
+
     return pass;
   }
 
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleTool.h b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleTool.h
index 4d6c27297bd686de124e581fd836a93a0b2a2f97..bdd2894372d9cd133bff8ce5e4cc40e859c20fc7 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleTool.h
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleTool.h
@@ -100,13 +100,6 @@ public:
   float                                m_low_gate_argon; //! Low value for gate 
   float                                m_high_gate; //! High value for gate
   float                                m_high_gate_argon; //! High value for gate
-  bool                                 m_mask_first_HT_bit; // mask off ht bit in first (earliest) 25ns time bin
-  bool                                 m_mask_first_HT_bit_argon; // mask off ht bit in first (earliest) 25ns time bin
-  bool                                 m_mask_middle_HT_bit; // mask off ht bit in middle 25 ns time bin
-  bool                                 m_mask_middle_HT_bit_argon; // mask off ht bit in middle 25 ns time bin
-  bool                                 m_mask_last_HT_bit; // mask off ht bit in last (latest) 25 ns time bin
-  bool                                 m_mask_last_HT_bit_argon; // mask off ht bit in last (latest) 25 ns time bin
-
 };
 
 } // end of namespace
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleToolCosmics.h b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleToolCosmics.h
index dd5e1cb1746033e99fb2858c5e07a779d7944de8..a1cc954cc67d64d57afcb2afa066389e2c5df688 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleToolCosmics.h
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/TRT_DriftCircleTool/TRT_DriftCircleToolCosmics.h
@@ -97,12 +97,6 @@ public:
   float                                m_low_gate_argon; //! Low value for gate 
   float                                m_high_gate; //! High value for gate
   float                                m_high_gate_argon; //! High value for gate
-  bool                                 m_mask_first_HT_bit; // mask off ht bit in first (earliest) 25ns time bin
-  bool                                 m_mask_first_HT_bit_argon; // mask off ht bit in first (earliest) 25ns time bin
-  bool                                 m_mask_middle_HT_bit; // mask off ht bit in middle 25 ns time bin
-  bool                                 m_mask_middle_HT_bit_argon; // mask off ht bit in middle 25 ns time bin
-  bool                                 m_mask_last_HT_bit; // mask off ht bit in last (latest) 25 ns time bin
-  bool                                 m_mask_last_HT_bit_argon; // mask off ht bit in last (latest) 25 ns time bin
 };
 
 } // end of namespace
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
index d1c1d754782cbcad588478aa9448809eabb45345..cf6ef9e7955c1b8784ed5993dddeef78f30acc70 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleTool.cxx
@@ -57,13 +57,7 @@ InDet::TRT_DriftCircleTool::TRT_DriftCircleTool(const std::string& t,
   m_low_gate(18.0*CLHEP::ns),
   m_low_gate_argon(18.0*CLHEP::ns),
   m_high_gate(38.0*CLHEP::ns),
-  m_high_gate_argon(38.0*CLHEP::ns),
-  m_mask_first_HT_bit(false),
-  m_mask_first_HT_bit_argon(false),
-  m_mask_middle_HT_bit(false),
-  m_mask_middle_HT_bit_argon(false),
-  m_mask_last_HT_bit(false),
-  m_mask_last_HT_bit_argon(false)
+  m_high_gate_argon(38.0*CLHEP::ns)
 {
   declareInterface<ITRT_DriftCircleTool>(this);
   declareProperty("TRTDriftFunctionTool", m_driftFunctionTool);
@@ -86,12 +80,6 @@ InDet::TRT_DriftCircleTool::TRT_DriftCircleTool(const std::string& t,
   declareProperty("LowGateArgon",m_low_gate_argon);
   declareProperty("HighGate",m_high_gate);
   declareProperty("HighGateArgon",m_high_gate_argon);
-  declareProperty("MaskFirstHTBit",m_mask_first_HT_bit);
-  declareProperty("MaskFirstHTBitArgon",m_mask_first_HT_bit_argon);
-  declareProperty("MaskMiddleHTBit",m_mask_middle_HT_bit);
-  declareProperty("MaskMiddleHTBitArgon",m_mask_middle_HT_bit_argon);
-  declareProperty("MaskLastHTBit",m_mask_last_HT_bit);
-  declareProperty("MaskLastHTBitArgon",m_mask_last_HT_bit_argon);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -245,10 +233,7 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleTool::convert(int Mode,c
       if (m_useToTCorrection) {
         rawTime -= m_driftFunctionTool->driftTimeToTCorrection((*r)->timeOverThreshold(), id, isArgonStraw);     
       }  
-      if (m_useHTCorrection &&
-          ((!m_mask_first_HT_bit &&  (word & 0x04000000)) ||
-           (!m_mask_middle_HT_bit && (word & 0x00020000)) ||
-           (!m_mask_last_HT_bit &&   (word & 0x00000100)))) {
+      if (m_useHTCorrection && (*r)->highLevel()) {
          rawTime += m_driftFunctionTool->driftTimeHTCorrection(id, isArgonStraw);           
       }
 
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
index 1e4c8619f386e00b4208da4c7cde5a018d48d3d8..5dfd012a6a7b5402068ca9b3750dc5edf276de49 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
@@ -63,13 +63,7 @@ InDet::TRT_DriftCircleToolCosmics::TRT_DriftCircleToolCosmics(const std::string&
   m_low_gate(18.0*CLHEP::ns),
   m_low_gate_argon(18.0*CLHEP::ns),
   m_high_gate(38.0*CLHEP::ns),
-  m_high_gate_argon(38.0*CLHEP::ns),
-  m_mask_first_HT_bit(false),
-  m_mask_first_HT_bit_argon(false),
-  m_mask_middle_HT_bit(false),
-  m_mask_middle_HT_bit_argon(false),
-  m_mask_last_HT_bit(false),
-  m_mask_last_HT_bit_argon(false)
+  m_high_gate_argon(38.0*CLHEP::ns)
 
 {
   declareInterface<ITRT_DriftCircleTool>(this);
@@ -94,12 +88,6 @@ InDet::TRT_DriftCircleToolCosmics::TRT_DriftCircleToolCosmics(const std::string&
   declareProperty("LowGateArgon",m_low_gate_argon);
   declareProperty("HighGate",m_high_gate);
   declareProperty("HighGateArgon",m_high_gate_argon);
-  declareProperty("MaskFirstHTBit",m_mask_first_HT_bit);
-  declareProperty("MaskFirstHTBitArgon",m_mask_first_HT_bit_argon);
-  declareProperty("MaskMiddleHTBit",m_mask_middle_HT_bit);
-  declareProperty("MaskMiddleHTBitArgon",m_mask_middle_HT_bit_argon);
-  declareProperty("MaskLastHTBit",m_mask_last_HT_bit);
-  declareProperty("MaskLastHTBitArgon",m_mask_last_HT_bit_argon);
   declareProperty("GlobalPhaseOffset",m_global_offset);
 }
 
@@ -262,7 +250,7 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleToolCosmics::convert(int
 
       bool isArgonStraw=true;
       if (m_useToTCorrection) rawTime -= m_driftFunctionTool->driftTimeToTCorrection((*r)->timeOverThreshold(), id, isArgonStraw);
-      if (m_useHTCorrection)  rawTime += m_driftFunctionTool->driftTimeHTCorrection(id, isArgonStraw);           
+      if (m_useHTCorrection && (*r)->highLevel())  rawTime += m_driftFunctionTool->driftTimeHTCorrection(id, isArgonStraw);           
 
       //make tube hit if first bin is high and no later LE appears
       if( LTbin==0 || LTbin==24 ) {
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_ToT_dEdx.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_ToT_dEdx.h
index ab842207ae8b4860839dece3352291a008a2fd72..403eabcb4fd17c0b029fd7b5548d434ed9d97185 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_ToT_dEdx.h
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_ToT_dEdx.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
 */
 
 
@@ -12,12 +12,7 @@
 
 namespace Trk { class Track ; } 
 namespace Trk { class TrackStateOnSurface ; } 
-//namespace Trk { class ParticleHypothesis ; } 
-
-//namespace Trk { class TrackParameters ; } 
-
-namespace InDet { class TRT_DriftCircleOnTrack ; } 
-//#include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h"
+namespace InDet { class TRT_DriftCircleOnTrack ; }
 
 static const InterfaceID IID_ITRT_ToT_dEdx("ITRT_ToT_dEdx", 1, 0);
   
@@ -25,9 +20,6 @@ class ITRT_ToT_dEdx : virtual public IAlgTool {
 
   
 public:
-
-  enum EGasType {kXenon,kArgon,kKrypton,kUnset};
-  enum EOccupancyCorrection{kRSOnly, kHitBased, kTrackBased, kGlobal};
   
   /** Virtual destructor */
   virtual ~ITRT_ToT_dEdx(){};
@@ -37,52 +29,19 @@ public:
 
   /**
    * @brief function to calculate sum ToT normalised to number of used hits
-   * @param track pointer
-   * @param bool variable to decide wheter ToT or ToT/L should be used
-   * @param bool variable whether HT hits shoule be used 
-   * @return ToT
+   * @param track pointer to track
+   * @param useHitsHT decide if HT hits should be used in the estimate
+   * @return dEdx value
    */
-  virtual double dEdx(const Trk::Track*, bool DivideByL, bool useHThits, bool corrected, EOccupancyCorrection correction_type=EOccupancyCorrection::kTrackBased ) const = 0;
-  virtual double dEdx(const Trk::Track*, EOccupancyCorrection correction_type=EOccupancyCorrection::kTrackBased) const = 0;
+  virtual double dEdx(const Trk::Track* track, bool useHitsHT=true) const = 0;
 
   /**
    * @brief function to calculate number of used hits
    * @param track pointer
-   * @param bool variable to decide wheter ToT or ToT/L should be used
-   * @param bool variable whether HT hits shoule be used
+   * @param useHitsHT decide if HT hits should be used in the estimate
    * @return nHits
    */
-  virtual double usedHits(const Trk::Track* track, bool DivideByL, bool useHThits) const = 0;
-  virtual double usedHits(const Trk::Track* track) const = 0;
-
-  /** 
-   * @brief function to define what is a good hit to be used for dEdx calculation
-   * cuts on track level can be made later by the user
-   * @param driftcircle object
-   * @param track parameter object
-   * @return decision
-   */
-  virtual bool isGood_Hit(const Trk::TrackStateOnSurface *itr) const = 0;
-
-  /**
-   * @brief correct overall dEdx normalization on track level
-   * @param dEdx definition (ToT or ToT/L)
-   * @param scale value (needed for data)
-   * @param number of primary vertices per event
-   * @return scaling variable
-   */
-  virtual double correctNormalization(bool divideLength, bool scaledata, double nVtx=-1) const = 0;
-
-  /**
-   * @brief function to calculate likelihood from prediction and resolution
-   * @param observed dEdx
-   * @param track parameter
-   * @param particle hypothesis
-   * @param number of used hits
-   * @return brobability  value between 0 and 1
-   */
-  virtual double getProb(const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits, bool dividebyL) const = 0;
-  virtual double getProb(const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const = 0;
+  virtual double usedHits(const Trk::Track* track, bool useHitsHT=true) const = 0;
 
   /**
    * @brief function to calculate likelihood ratio test
@@ -93,136 +52,7 @@ public:
    * @param number of used hits
    * @return test value between 0 and 1
    */
-  virtual double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool dividebyL) const = 0;
   virtual double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const = 0;
-
-
-  /**
-   * @brief function to calculate expectation value for dEdx using BB fit
-   * @param track momentum
-   * @param hypothesis
-   * @return dEdx_pred
-   */
-  virtual double predictdEdx(const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis, bool dividebyL) const = 0;
-  virtual double predictdEdx(const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis) const = 0;
-
-  /**
-   * @brief function to extract most likely mass in bg [0,3]
-   * @param track momentum
-   * @param measured dEdx
-   * @return mass
-   */
-  virtual double mass(const Trk::TrackStateOnSurface *itr, const double pTrk, double dEdx ) const = 0;
-
-
-
-  /**
-   * @brief function to correct ToT/L used by the PIDTool parameters obtimized to be consistend with existing functions
-   * @param track parameter object
-   * @param trift circle object
-   * @param number to decide whether it is barrel or endcap
-   * @param number to identify layer ID
-   * @param number to identify strawlayer id
-   * @param bool to set data or MC
-   * @return corrected ToT/L (returns 0 if hit criteria are not fulfilled)
-   */
-  virtual double correctToT_corrRZL(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer,bool isData) const = 0;
- 
-  virtual double correctToT_corrRZ(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer,bool isData) const = 0;
- 
-  /**
-   * @brief main function to correct ToT values on hit level as a function of track radius and z-position
-   * @param track on surface object
-   * @param bool variable to specify whether ToT or ToT/L correction
-   * @param bool variable to specify whether data or MC correction
-   * @param bool variable whether correction should actually be applied
-   * @param bool variable whether mimic ToT to other gas hits shoule be used 
-   * @return corrected value for ToT
-   */
-  virtual double correctToT_corrRZ(const Trk::TrackStateOnSurface *itr) const = 0;
-
-
-  /**
-   * @brief compute ToT time for largest island
-   * @param bitpattern
-   * @return ToT
-   */
-  virtual double getToTlargerIsland(unsigned int BitPattern) const = 0;
-  virtual double getToTonly1bits(unsigned int BitPattern) const = 0;
-  virtual double getToTHighOccupancy(unsigned int BitPattern) const = 0;
-  virtual double getToTHighOccupancySmart(unsigned int BitPattern) const = 0;
-
-  /**
-   * @brief return gas type for that hit
-   * @param track on surface object
-   * @return gasType
-   */
-  virtual EGasType gasTypeInStraw(const Trk::TrackStateOnSurface *itr) const = 0; 
-  virtual EGasType gasTypeInStraw(const InDet::TRT_DriftCircleOnTrack *driftcircle) const = 0; 
-
-  /**
-   * @brief Calibration functions for occupancy corrections
-   * @param track on surface object
-   * @return correction
-   */
-  virtual double hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr) const = 0;
-  virtual double trackOccupancyCorrection(const Trk::Track* track,  bool useHThits) const = 0;
-  
-  /**
-   * @brief setters and getters
-   */
-  virtual void  SetDefaultConfiguration() = 0;
-
-  // virtual void  SwitchOnRSCorrection() = 0;
-  // virtual void  SwitchOffRSCorrection() = 0;
-  virtual bool  GetStatusRSCorrection() const = 0;
-
-  // virtual void  SwitchOnDivideByL() = 0;
-  // virtual void  SwitchOffDivideByL() = 0;
-  virtual bool  GetStatusDivideByL() const = 0;
-
-  // virtual void  SwitchOnUseHThits() = 0;
-  // virtual void  SwitchOffUseHThits() = 0;
-  virtual bool  GetStatusUseHThits() const = 0;
-
-  virtual void  SetLargerIslandToTEstimatorAlgo() = 0;
-  virtual void  SetHighOccupancyToTEstimatorAlgo() = 0;
-  virtual void  SetHighOccupancySmartToTEstimatorAlgo() = 0;
-  virtual bool  GetStatusToTEstimatorAlgo() const = 0;
-
-
-  virtual void  SetMinRtrack(float minRtrack) = 0;
-  virtual float GetMinRtrack() const = 0;
-
-  virtual void  SetMaxRtrack(float maxRtrack) = 0;
-  virtual float GetMaxRtrack() const = 0;
-
-  virtual void  SwitchOnUseZeroRHitCut() = 0;
-  virtual void  SwitchOffUseZeroRHitCut() = 0;
-  virtual bool  GetStatusUseZeroRHitCut() const = 0;
-
-  virtual void  SetXenonFordEdXCalculation() = 0;
-  virtual void  SetArgonFordEdXCalculation() = 0;
-  virtual void  SetKryptonFordEdXCalculation() = 0;
-  virtual void  UnsetGasTypeFordEdXCalculation() = 0;
-  virtual int   GetGasTypeFordEdXCalculation() const = 0;
-
-  // virtual void  SetXenonGasTypeInStraw() = 0;
-  // virtual void  SetArgonGasTypeInStraw() = 0;
-  // virtual void  SetKryptonGasTypeInStraw() = 0;
-  // virtual void  UnsetGasTypeInStraw() = 0;
-  // virtual int   GetStatusGasTypeInStraw() const = 0;
-
-  virtual void  UseStandardAlgorithm() = 0;
-  virtual void  UseScalingAlgorithm() = 0;
-  virtual void  UseReweightingAlgorithm() = 0;
-  virtual void  UseReweightingAlgorithmTrunkOne() = 0;
-  virtual int   GetStatusAlgorithm() const = 0;
-
-  virtual void  SwitchOnMimicToXeCorrection() = 0;
-  virtual void  SwitchOffMimicToXeCorrection() = 0;
-  virtual bool  GetStatusMimicToXeCorrection() const = 0;
-
 };
 
 #endif // ITRT_TOT_DEDX_H
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
index 9c991115063c652deea10e9c80d370d37b0e1e9d..85e533993268e85f40b413902e084ce52e7e4cf0 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
@@ -401,9 +401,9 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con
   ATH_MSG_DEBUG ("");
     
   // Jared - ToT Implementation
-  dEdx = m_TRTdEdxTool->dEdx( &track, true, false, true); // Divide by L, exclude HT hits
-  double usedHits = m_TRTdEdxTool->usedHits( &track, true, false);
-  prob_El_ToT = m_TRTdEdxTool->getTest( dEdx, pTrk, Trk::electron, Trk::pion, usedHits, true ); 
+  dEdx = m_TRTdEdxTool->dEdx(&track, false); // Divide by L, exclude HT hits
+  double usedHits = m_TRTdEdxTool->usedHits(&track, false);
+  prob_El_ToT = m_TRTdEdxTool->getTest(dEdx, pTrk, Trk::electron, Trk::pion, usedHits); 
   
   // Limit the probability values the upper and lower limits that are given/trusted for each part:
   double limProbHT = HTcalc->Limit(prob_El_HT); 
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
index a002bcfba4ca2a0df5e440a0337d538eac57261d..e20ffbd9f2403fbcc4a6d3e86e95c1288e0a0a35 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
@@ -8,7 +8,6 @@
 #include "TRT_ToT_dEdx.h"
 #include "TRT_ElectronPidTools/TRT_ToT_Corrections.h"
 
-
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/IToolSvc.h"
 
@@ -49,7 +48,7 @@ TRT_ToT_dEdx::TRT_ToT_dEdx(const std::string& t, const std::string& n, const IIn
   declareProperty("AssociationTool", m_assoTool);
   declareProperty("TRT_LocalOccupancyTool", m_localOccTool);
   
-  SetDefaultConfiguration();
+  setDefaultConfiguration();
 
   m_timingProfile         = nullptr;
   m_trtId                                         = nullptr;
@@ -57,15 +56,13 @@ TRT_ToT_dEdx::TRT_ToT_dEdx(const std::string& t, const std::string& n, const IIn
 
 
 
-void TRT_ToT_dEdx::SetDefaultConfiguration()
+void TRT_ToT_dEdx::setDefaultConfiguration()
 {
   declareProperty("TRT_dEdx_divideByL",m_divideByL=true);
-  declareProperty("TRT_dEdx_useHThits",m_useHThits=true);
   declareProperty("TRT_dEdx_corrected",m_corrected=true);
-  declareProperty("TRT_dEdx_whichToTEstimatorAlgo",m_whichToTEstimatorAlgo=kToTLargerIsland);
+  declareProperty("TRT_dEdx_correctionType",m_correctionType=kTrackBased);
   declareProperty("TRT_dEdx_useTrackPartWithGasType",m_useTrackPartWithGasType=kUnset);
   declareProperty("TRT_dEdx_toolScenario",m_toolScenario=kAlgReweightTrunkOne);
-  declareProperty("TRT_dEdx_applyMimicToXeCorrection",m_applyMimicToXeCorrection=false);
   declareProperty("TRT_dEdx_trackConfig_maxRtrack",m_trackConfig_maxRtrack=1.85);
   declareProperty("TRT_dEdx_trackConfig_minRtrack",m_trackConfig_minRtrack=0.15);
   declareProperty("TRT_dEdx_useZeroRHitCut",m_useZeroRHitCut=true);
@@ -74,25 +71,23 @@ void TRT_ToT_dEdx::SetDefaultConfiguration()
 
 
 
-void TRT_ToT_dEdx::ShowDEDXSetup() const
+void TRT_ToT_dEdx::showDEDXSetup() const
 {
-  ATH_MSG_DEBUG("//////////////////////////////////////////////////////////////////");
-  ATH_MSG_DEBUG("///              TRT_ToT_Tool setup configuration              ///");
-  ATH_MSG_DEBUG(" ");
-  ATH_MSG_DEBUG("m_divideByL                     ="<<m_divideByL<<"");
-  ATH_MSG_DEBUG("m_useHThits                     ="<<m_useHThits<<"");
-  ATH_MSG_DEBUG("m_corrected                     ="<<m_corrected<<"");
-  ATH_MSG_DEBUG("m_whichToTEstimatorAlgo         ="<<m_whichToTEstimatorAlgo<<"");
-  ATH_MSG_DEBUG("m_useTrackPartWithGasType       ="<<m_useTrackPartWithGasType<<"");
-  ATH_MSG_DEBUG("m_toolScenario                  ="<<m_toolScenario<<"");
-  ATH_MSG_DEBUG("m_applyMimicToXeCorrection      ="<<m_applyMimicToXeCorrection<<"");
-  ATH_MSG_DEBUG(" ");
-  ATH_MSG_DEBUG("m_trackConfig_minRtrack         ="<<m_trackConfig_minRtrack<<"");
-  ATH_MSG_DEBUG("m_trackConfig_maxRtrack         ="<<m_trackConfig_maxRtrack<<"");
-  ATH_MSG_DEBUG("m_useZeroRHitCut                ="<<m_useZeroRHitCut<<"");
-  ATH_MSG_DEBUG("m_isData                        ="<<m_isData<<"");
-  ATH_MSG_DEBUG(" ");
-  ATH_MSG_DEBUG("//////////////////////////////////////////////////////////////////");
+  ATH_MSG_INFO("//////////////////////////////////////////////////////////////////");
+  ATH_MSG_INFO("///              TRT_ToT_Tool setup configuration              ///");
+  ATH_MSG_INFO(" ");
+  ATH_MSG_INFO("m_divideByL                     ="<<m_divideByL<<"");
+  ATH_MSG_INFO("m_corrected                     ="<<m_corrected<<"");
+  ATH_MSG_INFO("m_correctionType                ="<<m_correctionType<<"");
+  ATH_MSG_INFO("m_useTrackPartWithGasType       ="<<m_useTrackPartWithGasType<<"");
+  ATH_MSG_INFO("m_toolScenario                  ="<<m_toolScenario<<"");
+  ATH_MSG_INFO(" ");
+  ATH_MSG_INFO("m_trackConfig_minRtrack         ="<<m_trackConfig_minRtrack<<"");
+  ATH_MSG_INFO("m_trackConfig_maxRtrack         ="<<m_trackConfig_maxRtrack<<"");
+  ATH_MSG_INFO("m_useZeroRHitCut                ="<<m_useZeroRHitCut<<"");
+  ATH_MSG_INFO("m_isData                        ="<<m_isData<<"");
+  ATH_MSG_INFO(" ");
+  ATH_MSG_INFO("//////////////////////////////////////////////////////////////////");
 }
 
 
@@ -148,25 +143,7 @@ StatusCode TRT_ToT_dEdx::initialize()
     return StatusCode::FAILURE;
   }
       
-  //  ShowDEDXSetup();  
-
-  ATH_MSG_INFO("//////////////////////////////////////////////////////////////////");
-  ATH_MSG_INFO("///              TRT_ToT_Tool setup configuration              ///");
-  ATH_MSG_INFO(" ");
-  ATH_MSG_INFO("m_divideByL                     ="<<m_divideByL<<"");
-  ATH_MSG_INFO("m_useHThits                     ="<<m_useHThits<<"");
-  ATH_MSG_INFO("m_corrected                     ="<<m_corrected<<"");
-  ATH_MSG_INFO("m_whichToTEstimatorAlgo         ="<<m_whichToTEstimatorAlgo<<"");
-  ATH_MSG_INFO("m_useTrackPartWithGasType       ="<<m_useTrackPartWithGasType<<"");
-  ATH_MSG_INFO("m_toolScenario                  ="<<m_toolScenario<<"");
-  ATH_MSG_INFO("m_applyMimicToXeCorrection      ="<<m_applyMimicToXeCorrection<<"");
-  ATH_MSG_INFO(" ");
-  ATH_MSG_INFO("m_trackConfig_minRtrack         ="<<m_trackConfig_minRtrack<<"");
-  ATH_MSG_INFO("m_trackConfig_maxRtrack         ="<<m_trackConfig_maxRtrack<<"");
-  ATH_MSG_INFO("m_useZeroRHitCut                ="<<m_useZeroRHitCut<<"");
-  ATH_MSG_INFO("m_isData                        ="<<m_isData<<"");
-  ATH_MSG_INFO(" ");
-  ATH_MSG_INFO("//////////////////////////////////////////////////////////////////");
+  showDEDXSetup();
 
   ATH_MSG_INFO ( name() << " initialize() successful" );    
   return StatusCode::SUCCESS;
@@ -182,53 +159,15 @@ StatusCode TRT_ToT_dEdx::finalize()
   return StatusCode::SUCCESS;
 }
 
-double TRT_ToT_dEdx::strawLength(const Trk::TrackParameters *trkP) const
-{
-  double length=0;
-  if(!trkP) return length; 
-  const Trk::Surface* trkS = &trkP->associatedSurface();
-  if(!trkS)  return length;   
-  const Identifier DCId = trkS->associatedDetectorElementIdentifier(); 
-  double Trt_Rtrack = fabs(trkP->parameters()[Trk::locR]);
-  double Trt_HitTheta = trkP->parameters()[Trk::theta];
-  double Trt_HitPhi = trkP->parameters()[Trk::phi];
-  int HitPart =  m_trtId->barrel_ec(DCId);
-  double strawphi = trkS->center().phi();
-
-
-  if (std::abs(HitPart)==1) { //Barrel
-    length = 2*sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./fabs(sin(Trt_HitTheta));
-  }
-  else
-    if (std::abs(HitPart)==2) { //EndCap
-      length = 2*sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./sqrt(1-sin(Trt_HitTheta)*sin(Trt_HitTheta)*cos(Trt_HitPhi-strawphi)*cos(Trt_HitPhi-strawphi));
-    }
-    else {
-      ATH_MSG_FATAL ("std::abs(HitPart)= " << std::abs(HitPart) << ". Must be 1(Barrel) or 2(Endcap)");
-      throw std::exception();
-    }
-
-  return length;
-}
-
-
-
-bool TRT_ToT_dEdx::isGood_Hit(const Trk::TrackStateOnSurface *itr) const
+bool TRT_ToT_dEdx::isGoodHit(const Trk::TrackStateOnSurface* trackState, bool useHitsHT, double& length) const
 {
-  double l;
-  return isGood_Hit(itr, m_divideByL, m_useHThits, l);
-}
-
-bool TRT_ToT_dEdx::isGood_Hit(const Trk::TrackStateOnSurface *itr, bool divideByL, 
-                              bool useHThits, double& length) const
-{
-  const Trk::MeasurementBase* trkM = itr->measurementOnTrack();
+  const Trk::MeasurementBase* trkM = trackState->measurementOnTrack();
   if (!trkM)  {
     return false;
   }
 
   // Check if this is RIO on track
-  // annd if yes check if is TRT Drift Circle
+  // and if yes check if is TRT Drift Circle
   // then set the ptr
   const InDet::TRT_DriftCircleOnTrack* driftcircle = nullptr;
   if (trkM->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
@@ -242,7 +181,7 @@ bool TRT_ToT_dEdx::isGood_Hit(const Trk::TrackStateOnSurface *itr, bool divideBy
     return false;
   }
 
-  const Trk::TrackParameters* trkP = itr->trackParameters();
+  const Trk::TrackParameters* trkP = trackState->trackParameters();
   if(trkP==nullptr)return false; 
 
   SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDetEleHandle(m_trtDetEleContKey);
@@ -265,63 +204,38 @@ bool TRT_ToT_dEdx::isGood_Hit(const Trk::TrackStateOnSurface *itr, bool divideBy
   const InDetDD::TRT_BaseElement* element = elements->getDetectorElement(hashId);
   double strawphi = element->center(DCId).phi();
 
-  if ( itr->type(Trk::TrackStateOnSurface::Outlier)  ) return false; //Outliers
-  if ( m_useZeroRHitCut && Trt_RHit==0 && error>1.) return false;    //Select precision hits only
-  if ( (Trt_Rtrack >= m_trackConfig_maxRtrack) || (Trt_Rtrack <= m_trackConfig_minRtrack) )return false;    // drift radius close to wire or wall
+  if (trackState->type(Trk::TrackStateOnSurface::Outlier)) return false; //Outliers
+  if (m_useZeroRHitCut && Trt_RHit==0 && error>1.) return false;    //Select precision hits only
+  if ((Trt_Rtrack >= m_trackConfig_maxRtrack) || (Trt_Rtrack <= m_trackConfig_minRtrack)) return false; // drift radius close to wire or wall
 
   length=0;
   if (std::abs(HitPart)==1) { //Barrel
     length = 2*sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./fabs(sin(Trt_HitTheta));
+  } else if (std::abs(HitPart)==2) { //EndCap
+    length = 2*sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./sqrt(1-sin(Trt_HitTheta)*sin(Trt_HitTheta)*cos(Trt_HitPhi-strawphi)*cos(Trt_HitPhi-strawphi));
+  } else {
+    ATH_MSG_FATAL ("std::abs(HitPart)= " << std::abs(HitPart) << ". Must be 1(Barrel) or 2(Endcap)");
+    throw std::exception();
   }
-  else
-    if (std::abs(HitPart)==2) { //EndCap
-      length = 2*sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./sqrt(1-sin(Trt_HitTheta)*sin(Trt_HitTheta)*cos(Trt_HitPhi-strawphi)*cos(Trt_HitPhi-strawphi));
-    }
-    else {
-      ATH_MSG_FATAL ("std::abs(HitPart)= " << std::abs(HitPart) << ". Must be 1(Barrel) or 2(Endcap)");
-      throw std::exception();
-    }
 
-  if(divideByL)
-    if ( length < 1.7 ) return false; // Length in the straw
-  if(!useHThits){
+  if (m_divideByL and length < 1.7) return false; // Length in the straw
+
+  if (!useHitsHT) {
     int TrtHl = driftcircle->highLevel();
     if (TrtHl==1) return false; 
   }
 
-  if(m_useTrackPartWithGasType!=kUnset) // don't preselect hits
-    {
-      if(m_useTrackPartWithGasType!=gasTypeInStraw(itr))
-        return false;
-    }
-
-  unsigned int BitPattern = driftcircle->prepRawData()->getWord();
-  double ToT = getToT(BitPattern);
+  if (m_useTrackPartWithGasType != kUnset) { // don't preselect hits
+    if(m_useTrackPartWithGasType != gasTypeInStraw(trackState)) return false;
+  }
 
-  if(ToT==0) return false; // If ToT for this hit equal 0, skip it.
+  if (driftcircle->prepRawData()->timeOverThreshold()==0.) return false; // If ToT for this hit equal 0, skip it.
   
   return true;
 }
 
-
-
-double TRT_ToT_dEdx::dEdx(const Trk::Track* track, EOccupancyCorrection correction_type) const
-{
-  return dEdx(track, m_divideByL, m_useHThits, m_corrected, correction_type);
-}
-
-
-
-double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThits, bool corrected, EOccupancyCorrection correction_type) const
-{
-  ////////////////////////////////////////////////////
-  // Different cases for correction_type            //
-  // kRSOnly: only r-S calibration                  //
-  // kHitBased: Hit-based occupancy calibration     //
-  // kTrackBased: Track-based occupancy calibration //
-  // kGlobal: Global occupancy calibration          //
-  ////////////////////////////////////////////////////
-  
+double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool useHitsHT) const
+{ 
   ATH_MSG_DEBUG("dEdx()");
 
   double nVtx=-1.;
@@ -333,6 +247,7 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
   }
 
   //    Average interactions per crossing for the current BCID
+  // TODO: we should really not hard-code a mu to nVtx conversion
   double mu = eventInfoDecor(0);
   if(m_isData) {
     nVtx = 1.3129 + 0.716194*mu + (-0.00475074)*mu*mu;
@@ -355,154 +270,147 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
 
   double correctionFactor = 1.;
   
-  if(m_toolScenario==kAlgStandard || m_toolScenario==kAlgScalingToXe)
-    {
-      std::vector<double> vecToT;
-      double ToTsum = 0;
-
-      for ( ; itr!=itre ; ++itr) {
-        double l=0;
-        if ( isGood_Hit((*itr),divideByL,useHThits,l)) {
-	  double ToT_correct = correctToT_corrRZ(*itr,divideByL,corrected,l);
-	  if (correction_type == ITRT_ToT_dEdx::EOccupancyCorrection::kHitBased){
-	    correctionFactor = hitOccupancyCorrection(*itr);
-	    ToT_correct*=correctionFactor;
-	  }
-          vecToT.push_back(ToT_correct);
-        }
-      } 
+  if (m_toolScenario==kAlgStandard) {
+    std::vector<double> vecToT;
+    double ToTsum = 0;
+
+    for ( ; itr!=itre ; ++itr) {
+      double length = 0;
+      if ( isGoodHit((*itr), useHitsHT, length)) {
+	      double ToT_correct = correctToT_corrRZ(*itr, length);
+	      if (m_correctionType == kHitBased){
+	        correctionFactor = hitOccupancyCorrection(*itr);
+	        ToT_correct*=correctionFactor;
+	      }
+        vecToT.push_back(ToT_correct);
+      }
+    } 
           
-      sort(vecToT.begin(), vecToT.end());
-      int nhits = (int)vecToT.size();
-
-      int ntrunk = 1;
-      if(divideByL) nhits-=ntrunk;
+    sort(vecToT.begin(), vecToT.end());
+    size_t nhits = vecToT.size();
 
-      // Boost speed
-      if(nhits<1)return 0.0;
+    if (m_divideByL) {
+      nhits-=m_nTrunkateHits;
+    }
 
-      ToTsum = std::accumulate(vecToT.begin(), vecToT.end(), 0);
-      if (correction_type == ITRT_ToT_dEdx::EOccupancyCorrection::kTrackBased){correctionFactor=trackOccupancyCorrection(track, useHThits);}
-      else {correctionFactor=correctNormalization(divideByL, m_isData, nVtx);}
-      ToTsum*=correctionFactor;
+    // Boost speed
+    if (nhits<1) return 0.0;
 
-      return ToTsum/nhits;
+    ToTsum = std::accumulate(vecToT.begin(), vecToT.end(), 0);
+    if (m_correctionType == kTrackBased) {
+      correctionFactor=trackOccupancyCorrection(track, useHitsHT);
+    } else {
+      correctionFactor=correctNormalization(nVtx);
     }
+    ToTsum*=correctionFactor;
+    return ToTsum/nhits;
+  }
   
-    if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne)
-      {
-        std::vector<double> vecToT_Xe;
-        std::vector<double> vecToT_Ar;
-        std::vector<double> vecToT_Kr;
-
-        if(m_useTrackPartWithGasType!=kUnset)
-          {
-            ATH_MSG_WARNING("dEdX_Estimator():: Using m_toolScenario="<<m_toolScenario<<" scenario m_useTrackPartWithGasType is set to"<<m_useTrackPartWithGasType<<", but kUnset is requiered. Check you tool configuration.");
-          }
-
-        for ( ; itr!=itre ; ++itr) {
-          double l=0;
-          if ( isGood_Hit((*itr),divideByL,useHThits,l)) {
-            gasType=gasTypeInStraw(*itr);
-	    double ToT_correct = correctToT_corrRZ(*itr, divideByL, corrected,l);
-	    if (correction_type == ITRT_ToT_dEdx::EOccupancyCorrection::kHitBased){correctionFactor = hitOccupancyCorrection(*itr);}
-	    ToT_correct*=correctionFactor;
-            if(gasType==kXenon)
-              vecToT_Xe.push_back(ToT_correct);
-            else if(gasType==kArgon)
-	      vecToT_Ar.push_back(ToT_correct);
-	    else if(gasType==kKrypton)
-	      vecToT_Kr.push_back(ToT_correct);
-	    else
+  if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne) {
+    std::vector<double> vecToT_Xe;
+    std::vector<double> vecToT_Ar;
+    std::vector<double> vecToT_Kr;
+
+    if(m_useTrackPartWithGasType!=kUnset) {
+      ATH_MSG_WARNING("dEdX_Estimator():: Using m_toolScenario="<<m_toolScenario<<" scenario m_useTrackPartWithGasType is set to"<<m_useTrackPartWithGasType<<", but kUnset is requiered. Check you tool configuration.");
+    }
+
+    for ( ; itr!=itre ; ++itr) {
+      double length=0;
+      if (isGoodHit((*itr), useHitsHT, length)) {
+        gasType=gasTypeInStraw(*itr);
+	      double ToT_correct = correctToT_corrRZ(*itr, length);
+	      if (m_correctionType == kHitBased) {
+          correctionFactor = hitOccupancyCorrection(*itr);
+        }
+	      ToT_correct*=correctionFactor;
+        if(gasType==kXenon) {
+          vecToT_Xe.push_back(ToT_correct);
+        } else if (gasType==kArgon) {
+	        vecToT_Ar.push_back(ToT_correct);
+        } else if (gasType==kKrypton) {
+	        vecToT_Kr.push_back(ToT_correct);
+        } else {
 	      ATH_MSG_ERROR("dEdX_Estimator():: During scenario kAlgReweight variable gasTypeInStraw got value kUnset.");
-          }
-        } 
-
-        sort(vecToT_Xe.begin(), vecToT_Xe.end());
-        sort(vecToT_Ar.begin(), vecToT_Ar.end());
-        sort(vecToT_Kr.begin(), vecToT_Kr.end());
-
-        int nhitsXe = (int)vecToT_Xe.size();
-        int nhitsAr = (int)vecToT_Ar.size();
-        int nhitsKr = (int)vecToT_Kr.size();
-
-
-        int ntrunk = 1;
-        if(divideByL)
-          {
-            if(m_toolScenario==kAlgReweight){
-              if(nhitsXe>0) nhitsXe-=ntrunk;
-              if(nhitsAr>0) nhitsAr-=ntrunk;
-              if(nhitsKr>0) nhitsKr-=ntrunk;
-            }
-            else // kAlgReweightTrunkOne
-              {
-                int trunkGas = kUnset;
-                double maxToT = 0.;
-		if(nhitsXe>0 && vecToT_Xe.at(nhitsXe-1)>maxToT){
-		  trunkGas = kXenon;
-		  maxToT = vecToT_Xe.at(nhitsXe-1);
-		}
-		if(nhitsAr>0 && vecToT_Ar.at(nhitsAr-1)>maxToT){
-		  trunkGas = kArgon;
-		  maxToT = vecToT_Ar.at(nhitsAr-1);
-		}
-                if(nhitsKr>0 && vecToT_Kr.at(nhitsKr-1)>maxToT) trunkGas = kKrypton;
-
-                if(trunkGas==kXenon)   nhitsXe-=ntrunk;
-                else
-                  if(trunkGas==kArgon)   nhitsAr-=ntrunk;
-                  else
-                    if(trunkGas==kKrypton) nhitsKr-=ntrunk;
-              }
-          }
-
-
-        // Boost speed.
-        int nhits  = nhitsXe + nhitsAr + nhitsKr;
-        if(nhits<1) return 0.0;
-
-        double ToTsumXe = 0;
-        double ToTsumAr = 0;
-        double ToTsumKr = 0;
-        for (int i = 0; i < nhitsXe;i++){
-          ToTsumXe+=vecToT_Xe.at(i);
-        } 
-        for (int i = 0; i < nhitsAr;i++){
-          ToTsumAr+=vecToT_Ar.at(i);
-        } 
-        for (int i = 0; i < nhitsKr;i++){
-          ToTsumKr+=vecToT_Kr.at(i);
-        } 
-
-        if(nhitsXe>0) ToTsumXe/=nhitsXe;
-        else ToTsumXe = 0;
-        if(nhitsAr>0) ToTsumAr/=nhitsAr;
-        else ToTsumAr = 0;
-        if(nhitsKr>0) ToTsumKr/=nhitsKr;
-        else ToTsumKr = 0;
-
-
-        double ToTsum = ToTsumXe*nhitsXe + ToTsumAr*nhitsAr + ToTsumKr*nhitsKr;
-
-	if (correction_type == ITRT_ToT_dEdx::EOccupancyCorrection::kTrackBased){correctionFactor=trackOccupancyCorrection(track, useHThits);}
-	else {correctionFactor=correctNormalization(divideByL, m_isData, nVtx);}
-        ToTsum*=correctionFactor;
-
-        return ToTsum/nhits;
+        }
       }
-  
+    } 
+
+    sort(vecToT_Xe.begin(), vecToT_Xe.end());
+    sort(vecToT_Ar.begin(), vecToT_Ar.end());
+    sort(vecToT_Kr.begin(), vecToT_Kr.end());
+
+    size_t nhitsXe = vecToT_Xe.size();
+    size_t nhitsAr = vecToT_Ar.size();
+    size_t nhitsKr = vecToT_Kr.size();
+
+    if (m_divideByL) {
+      if(m_toolScenario==kAlgReweight){
+        if (nhitsXe>=m_nTrunkateHits) nhitsXe-=m_nTrunkateHits;
+        if (nhitsAr>=m_nTrunkateHits) nhitsAr-=m_nTrunkateHits;
+        if (nhitsKr>=m_nTrunkateHits) nhitsKr-=m_nTrunkateHits;
+      } else {// kAlgReweightTrunkOne
+        int trunkGas = kUnset;
+        double maxToT = 0.;
+		    if (nhitsXe>0 && vecToT_Xe.at(nhitsXe-1)>maxToT) {
+		      trunkGas = kXenon;
+		      maxToT = vecToT_Xe.at(nhitsXe-1);
+		    }
+		    if(nhitsAr>0 && vecToT_Ar.at(nhitsAr-1)>maxToT){
+		      trunkGas = kArgon;
+		      maxToT = vecToT_Ar.at(nhitsAr-1);
+		    }
+        if (nhitsKr>0 && vecToT_Kr.at(nhitsKr-1)>maxToT) {
+          trunkGas = kKrypton;
+        }
+
+        if (trunkGas==kXenon) {
+          nhitsXe-=m_nTrunkateHits;
+        } else if (trunkGas==kArgon) {
+          nhitsAr-=m_nTrunkateHits;
+        } else if (trunkGas==kKrypton) {
+          nhitsKr-=m_nTrunkateHits;
+        }
+      }
+    }
+    
+    // Boost speed.
+    size_t nhits  = nhitsXe + nhitsAr + nhitsKr;
+    if(nhits<1) return 0.0;
+
+    double ToTsumXe = 0;
+    double ToTsumAr = 0;
+    double ToTsumKr = 0;
+    for (size_t i = 0; i < nhitsXe;i++) {
+      ToTsumXe+=vecToT_Xe.at(i);
+    }
+    for (size_t i = 0; i < nhitsAr;i++) {
+      ToTsumAr+=vecToT_Ar.at(i);
+    } 
+    for (size_t i = 0; i < nhitsKr;i++) {
+      ToTsumKr+=vecToT_Kr.at(i);
+    } 
+
+    ToTsumXe = (nhitsXe>0) ? ToTsumXe/nhitsXe : 0;
+    ToTsumAr = (nhitsAr>0) ? ToTsumAr/nhitsAr : 0;
+    ToTsumKr = (nhitsKr>0) ? ToTsumKr/nhitsKr : 0;
+    double ToTsum = ToTsumXe*nhitsXe + ToTsumAr*nhitsAr + ToTsumKr*nhitsKr;
+
+	  if (m_correctionType == kTrackBased) {
+      correctionFactor = trackOccupancyCorrection(track, useHitsHT);
+    } else {
+      correctionFactor = correctNormalization(nVtx);
+    }
+    ToTsum *= correctionFactor;
+
+    return ToTsum/nhits;
+  }
 
   ATH_MSG_ERROR("dEdX_Estimator():: m_toolScenario has wrong value "<<m_toolScenario<<"");
   return 0.;
 }
 
-double TRT_ToT_dEdx::usedHits(const Trk::Track* track) const
-{
-  return usedHits(track, m_divideByL, m_useHThits);
-}
-
-double TRT_ToT_dEdx::usedHits(const Trk::Track* track, bool divideByL, bool useHThits) const
+double TRT_ToT_dEdx::usedHits(const Trk::Track* track, bool useHitsHT) const
 {
   ATH_MSG_DEBUG("usedHits()");
   EGasType gasType = kUnset;
@@ -518,116 +426,88 @@ double TRT_ToT_dEdx::usedHits(const Trk::Track* track, bool divideByL, bool useH
   DataVector<const Trk::TrackStateOnSurface>::const_iterator itr  = vtsos->begin();
   DataVector<const Trk::TrackStateOnSurface>::const_iterator itre = vtsos->end();  
   
+  if (m_toolScenario==kAlgStandard) {
+    int nhits =0;
 
-  if(m_toolScenario==kAlgStandard || m_toolScenario==kAlgScalingToXe)
-    {
-      int nhits =0;
+    for ( ; itr!=itre ; ++itr) {
+      double length=0;
+      if (isGoodHit((*itr), useHitsHT, length)) {
+        nhits++;
+      }
+    } 
+    if (m_divideByL) nhits -= m_nTrunkateHits;
+    return nhits;
+  } else if (m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne) {
+    int nhits = 0;
+    int nhitsXe = 0;
+    int nhitsAr = 0;
+    int nhitsKr = 0;
+
+    if(m_useTrackPartWithGasType!=kUnset) {
+      ATH_MSG_WARNING("usedHits_Estimator():: Using m_toolScenario="<<m_toolScenario<<" scenario m_useTrackPartWithGasType is set to "<<m_useTrackPartWithGasType<<", but kUnset is required. Check you tool configuration.");
+    }
 
-      for ( ; itr!=itre ; ++itr) {
-        double l=0;
-        if ( isGood_Hit((*itr),divideByL,useHThits,l)) {
-          nhits++;
+    for ( ; itr!=itre ; ++itr) {
+      double length=0;
+      if ( isGoodHit((*itr), useHitsHT, length)) {
+        gasType=gasTypeInStraw(*itr);
+        if (gasType==kXenon) {
+          nhitsXe++;
+        } else if (gasType==kArgon) {
+          nhitsAr++;
+        } else if (gasType==kKrypton) {
+          nhitsKr++;
+        } else {
+          ATH_MSG_ERROR("usedHits_Estimator():: During scenario kAlgReweight variable gasTypeInStraw got value kUnset.");
         }
-      } 
-
-      int ntrunk = 1;
-      if(divideByL) nhits-=ntrunk;
-
-      return nhits;
+      }
     }
-  
-    if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne)
-      {
-        int nhits = 0;
-        int nhitsXe = 0;
-        int nhitsAr = 0;
-        int nhitsKr = 0;
-
-        if(m_useTrackPartWithGasType!=kUnset)
-          {
-            ATH_MSG_WARNING("usedHits_Estimator():: Using m_toolScenario="<<m_toolScenario<<" scenario m_useTrackPartWithGasType is set to "<<m_useTrackPartWithGasType<<", but kUnset is required. Check you tool configuration.");
-          }
-
-        for ( ; itr!=itre ; ++itr) {
-          double l=0;
-          if ( isGood_Hit((*itr),divideByL,useHThits,l)) {
-            gasType=gasTypeInStraw(*itr);
-            if(gasType==kXenon)
-              nhitsXe++;
-            else
-              if(gasType==kArgon)
-                nhitsAr++;
-              else
-                if(gasType==kKrypton)
-                  nhitsKr++;
-                else
-                  ATH_MSG_ERROR("usedHits_Estimator():: During scenario kAlgReweight variable gasTypeInStraw got value kUnset.");
-          }
-        } 
-
-
-        int ntrunk = 1;
-        if(divideByL) {
-          if(m_toolScenario==kAlgReweight){
-            if(nhitsXe>0) nhitsXe-=ntrunk;
-            if(nhitsAr>0) nhitsAr-=ntrunk;
-            if(nhitsKr>0) nhitsKr-=ntrunk;
-          }
-          else { // kAlgReweightTrunkOne
-            if(nhitsXe>0 || nhitsAr>0 || nhitsKr>0)
-              nhitsXe -= ntrunk;
-          }
-        }
-
-        nhits  = nhitsXe + nhitsAr + nhitsKr;
 
-        return nhits;
+    if (m_divideByL) {
+      if(m_toolScenario==kAlgReweight){
+        if(nhitsXe>0) nhitsXe -= m_nTrunkateHits;
+        if(nhitsAr>0) nhitsAr -= m_nTrunkateHits;
+        if(nhitsKr>0) nhitsKr -= m_nTrunkateHits;
+      } else { // kAlgReweightTrunkOne
+        if(nhitsXe>0 || nhitsAr>0 || nhitsKr>0)
+          nhitsXe -= m_nTrunkateHits;
       }
+    }
+
+    nhits  = nhitsXe + nhitsAr + nhitsKr;
+    return nhits;
+  }
 
   ATH_MSG_ERROR("usedHits_Estimator():: m_toolScenario has wrong value "<<m_toolScenario<<"");
   return 0;
 }
 
-
-
 double TRT_ToT_dEdx::getProb(const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const
-{
-  return getProb(itr, dEdx_obs, pTrk, hypothesis, nUsedHits, m_divideByL);
-}
-
-
-
-double TRT_ToT_dEdx::getProb(const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits, bool divideByL) const
 {
   EGasType gasType = gasTypeInStraw(itr);
-  return getProb(gasType, dEdx_obs, pTrk, hypothesis, nUsedHits, divideByL);
+  return getProb(gasType, dEdx_obs, pTrk, hypothesis, nUsedHits);
 }
-        
 
-double TRT_ToT_dEdx::getProb(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits, bool divideByL) const
-{
-        
+double TRT_ToT_dEdx::getProb(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const
+{        
   ATH_MSG_DEBUG("getProb():: gasTypeInStraw = "<<gasType<<"");
 
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
-  if(dEdxCorrection==nullptr)
-    {
-      ATH_MSG_ERROR(" getProb: Could not find any dEdxCorrection in CondStore. Return zero.");
-      return 0;
-    }
-
+  if (dEdxCorrection==nullptr) {
+    ATH_MSG_ERROR(" getProb: Could not find any dEdxCorrection in CondStore. Return zero.");
+    return 0;
+  }
 
-  if(gasType==kUnset)
-    {
-      ATH_MSG_DEBUG("getProb():: gasTypeInStraw set kUnset that is not allowed! Use gasTypeInStraw(*itr) to get gas type info for that hit first!");
-      ATH_MSG_DEBUG("getProb():: Now gasTypeInStraw sets to kXenon.");
-      gasType = kXenon;
-    }
+  if(gasType==kUnset) {
+    ATH_MSG_DEBUG("getProb():: gasTypeInStraw set kUnset that is not allowed! Use gasTypeInStraw(*itr) to get gas type info for that hit first!");
+    ATH_MSG_DEBUG("getProb():: Now gasTypeInStraw sets to kXenon.");
+    gasType = kXenon;
+  }
 
-  double dEdx_pred = predictdEdx(gasType, pTrk, hypothesis, divideByL); 
-  if(dEdx_pred==0)return 0.0;
-  if(hypothesis==Trk::electron){
+  double dEdx_pred = predictdEdx(gasType, pTrk, hypothesis); 
+  if (dEdx_pred==0) return 0.0;
+  if (hypothesis==Trk::electron) {
     // correction for pTrk in [MeV]
     double factor = 1;
     double correct = 1+factor*(0.045*log10(pTrk)+0.885-1);
@@ -647,47 +527,31 @@ double TRT_ToT_dEdx::getProb(EGasType gasType, const double dEdx_obs, const doub
 }
 
 
-double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const {
-
-  return getTest(dEdx_obs, pTrk, hypothesis, antihypothesis, nUsedHits, m_divideByL);
-
-}
-
-double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool divideByL) const
+double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const
 {
   ATH_MSG_DEBUG("getTest()");
 
   EGasType gasType = kUnset;
-        
   if ( dEdx_obs<=0. || pTrk<=0. || nUsedHits<=0 ) return 0.5;
   
-  double Pone = getProb(gasType, dEdx_obs,pTrk,hypothesis,nUsedHits, divideByL);
-  double Ptwo = getProb(gasType, dEdx_obs,pTrk,antihypothesis,nUsedHits, divideByL);
-  if( (Pone+Ptwo) != 0){
+  double Pone = getProb(gasType, dEdx_obs,pTrk,hypothesis,nUsedHits);
+  double Ptwo = getProb(gasType, dEdx_obs,pTrk,antihypothesis,nUsedHits);
+  if ((Pone+Ptwo) != 0) {
     ATH_MSG_DEBUG("getTest():: return "<<Pone/(Pone+Ptwo)<<"");
     return Pone/(Pone+Ptwo);
-  }
+  } else {
     return 0.5;
+  }
 }
 
-
-
 double TRT_ToT_dEdx::predictdEdx(const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis) const
-{
-  return predictdEdx(itr, pTrk, hypothesis, m_divideByL);
-}
-
-
-
-double TRT_ToT_dEdx::predictdEdx(const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis, bool divideByL) const
 {
   EGasType gasType = gasTypeInStraw(itr);
-  return predictdEdx(gasType, pTrk, hypothesis, divideByL);
+  return predictdEdx(gasType, pTrk, hypothesis);
 }
 
-double TRT_ToT_dEdx::predictdEdx(EGasType gasType, const double pTrk, Trk::ParticleHypothesis hypothesis, bool divideByL) const
+double TRT_ToT_dEdx::predictdEdx(EGasType gasType, const double pTrk, Trk::ParticleHypothesis hypothesis) const
 {
-
   ATH_MSG_DEBUG("predictdEdx(): gasTypeInStraw = "<<gasType<<"");
 
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
@@ -713,7 +577,7 @@ double TRT_ToT_dEdx::predictdEdx(EGasType gasType, const double pTrk, Trk::Parti
   // do we need the check in the log parameter in addition? will create CPU increase
   // do we want to throw an assertion here?
   if(pTrk<100)return 0; 
-  if(divideByL){    
+  if(m_divideByL){    
     if(dEdxCorrection->paraDivideByLengthDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDivideByLengthDedxP5[gasType]))<=0) return 0;
     return dEdxCorrection->paraDivideByLengthDedxP1[gasType]/std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDivideByLengthDedxP4[gasType])  * 
       (dEdxCorrection->paraDivideByLengthDedxP2[gasType] - std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDivideByLengthDedxP4[gasType] ) 
@@ -727,8 +591,6 @@ double TRT_ToT_dEdx::predictdEdx(EGasType gasType, const double pTrk, Trk::Parti
   //return 0;  
 }
 
-
-
 double TRT_ToT_dEdx::mass(const Trk::TrackStateOnSurface *itr, const double pTrk, double dEdx ) const
 {
   EGasType gasType = gasTypeInStraw(itr);
@@ -774,10 +636,9 @@ double TRT_ToT_dEdx::mass(const Trk::TrackStateOnSurface *itr, const double pTrk
   return pTrk/betaGamma;
 }
 
-
-
 /* returns gas type for given straw */
-ITRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const Trk::TrackStateOnSurface *itr) const
+// TODO: move this functionality to TRT_StrawStatusSummaryTool.
+TRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const Trk::TrackStateOnSurface *itr) const
 {
   const Trk::MeasurementBase* trkM = itr->measurementOnTrack();
   if (!trkM)  {
@@ -802,9 +663,7 @@ ITRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const Trk::TrackStateOnSurf
   return gasTypeInStraw(driftcircle);
 }
 
-
-
-ITRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const InDet::TRT_DriftCircleOnTrack *driftcircle) const
+TRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const InDet::TRT_DriftCircleOnTrack *driftcircle) const
 {
   Identifier DCid = driftcircle->identify();  
   
@@ -826,73 +685,34 @@ ITRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const InDet::TRT_DriftCircl
   return GasType;
 }
 
-
-
-double TRT_ToT_dEdx::getToT(unsigned int BitPattern) const
-{
-  if (m_whichToTEstimatorAlgo == kToTLargerIsland) {
-    return getToTlargerIsland(BitPattern);
-  }
-
-  if (m_whichToTEstimatorAlgo == kToTHighOccupancy) {
-    return getToTHighOccupancy(BitPattern);
-  }
-
-  if (m_whichToTEstimatorAlgo == kToTHighOccupancySmart) {
-    return getToTHighOccupancySmart(BitPattern);
-  }
-
-  ATH_MSG_FATAL("getToT():: No ToT estimator case for m_whichToTEstimatorAlgo"<<m_whichToTEstimatorAlgo<<"");
-  throw std::exception();
-}
-
-
 /////////////////////////////////
 // Corrections
 /////////////////////////////////
 
-double TRT_ToT_dEdx::correctNormalization(bool divideLength,bool scaledata, double nVtx) const
+double TRT_ToT_dEdx::correctNormalization(double nVtx) const
 {
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
-  if(dEdxCorrection==nullptr)
-    {
-      ATH_MSG_ERROR(" correctNormalization: Could not find any dEdxCorrection in CondStore. Return zero.");
-      return 0;
-    }
-
+  if(dEdxCorrection==nullptr) {
+    ATH_MSG_ERROR(" correctNormalization: Could not find any dEdxCorrection in CondStore. Return zero.");
+    return 0;
+  }
 
   EGasType gasType = static_cast<EGasType> (m_useTrackPartWithGasType);
-  if(m_useTrackPartWithGasType==kUnset)
-    gasType=kXenon;
-  if(nVtx<=0)nVtx=dEdxCorrection->normNzero[gasType];
+  if (m_useTrackPartWithGasType==kUnset) gasType=kXenon;
+  if (nVtx<=0) nVtx=dEdxCorrection->normNzero[gasType];
   double slope = dEdxCorrection->normSlopeTot[gasType];
   double offset = dEdxCorrection->normOffsetTot[gasType];
-  if(divideLength){
+  if (m_divideByL){
     slope = dEdxCorrection->normSlopeTotDivideByLength[gasType];
     offset = dEdxCorrection->normOffsetTotDivideByLength[gasType];
-  } 
+  }
   double shift = dEdxCorrection->normOffsetData[gasType];
-  if(!scaledata)shift = 0;
+  if(!m_isData)shift = 0;
   return (slope*dEdxCorrection->normNzero[gasType]+offset)/(slope*nVtx+offset+shift);
 }
 
-
-
-double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface *itr) const
-{
-  double l=0;
-  if(isGood_Hit(itr,m_divideByL,m_useHThits,l)) {
-    return correctToT_corrRZ(itr, m_divideByL, m_corrected,l);
-  }
-  return 0;
-}
-
-double
-TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr,
-                                bool divideByL,
-                                bool corrected,
-                                double length) const
+double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr, double length) const
 {
   const Trk::MeasurementBase* trkM = itr->measurementOnTrack();
   const Trk::TrackParameters* trkP = itr->trackParameters();
@@ -916,233 +736,50 @@ TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr,
   }
 
   Identifier DCId = driftcircle->identify();
-  unsigned int BitPattern = driftcircle->prepRawData()->getWord();
-  double ToT = getToT(BitPattern);
-  if(ToT==0) {
-    ATH_MSG_WARNING("correctToT_corrRZ(const Trk::TrackStateOnSurface *itr):: ToT="<<ToT<<". We must cut that hit in isGood_Hit() !");
+  double timeOverThreshold = driftcircle->prepRawData()->timeOverThreshold();
+  if(timeOverThreshold==0) {
+    ATH_MSG_WARNING("correctToT_corrRZ(const Trk::TrackStateOnSurface *itr):: ToT="<<timeOverThreshold<<". We must cut that hit in isGoodHit() !");
     return 0;
   }
-  int HitPart =  m_trtId->barrel_ec(DCId);
+  int hitPart =  m_trtId->barrel_ec(DCId);
   int StrawLayer = m_trtId->straw_layer(DCId);
   int Layer = m_trtId->layer_or_wheel(DCId);
-  double HitRtrack = fabs(trkP->parameters()[Trk::locR]);
+  double hitRtrack = fabs(trkP->parameters()[Trk::locR]);
   EGasType gasType = gasTypeInStraw(itr);  
   if(gasType==kUnset) {
     ATH_MSG_ERROR("correctToT_corrRZ(const Trk::TrackStateOnSurface *itr):: Gas type in straw is kUnset! Return ToT = 0");
     return 0;
-  }  
-  
-  if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe)
-    {
-      if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits
-        {     
-          double mimicCorr = 0.;
-          if (abs(HitPart)==1) // Barrel
-            mimicCorr=mimicToXeHit_Barrel(gasType, HitRtrack, Layer, StrawLayer);
-          else // End-cap
-            mimicCorr=mimicToXeHit_Endcap(gasType, HitRtrack, Layer, HitPart); 
-
-          if(mimicCorr==0.)
-            {
-              ATH_MSG_FATAL("correctToT_corrRZ():: mimicCorr = "<<mimicCorr<<"");
-              throw std::exception();
-            }
-          ToT/=mimicCorr;
-
-          if(m_whichToTEstimatorAlgo==kToTLargerIsland){
-            if(ToT<3.125) ToT = 3.125;
-            if(ToT>75)    ToT = 75;
-          }else{
-            if(ToT<3.125) ToT = 3.125;
-            if(ToT>62.5)  ToT = 62.5;
-          }
-
-          gasType=kXenon; // After mimic correction we work with that hit as Xenon hit.
-        }  
-    }
+  }
  
-  if(divideByL && length>0) ToT = ToT/length;
-  if(!corrected) return ToT;
+  if(m_divideByL && length>0) timeOverThreshold = timeOverThreshold/length;
+  if(!m_corrected) return timeOverThreshold;
   /* else correct */
            
-  double HitZ = driftcircle->globalPosition().z();
+  double hitZ = driftcircle->globalPosition().z();
   double trackx =  driftcircle->globalPosition().x();
   double tracky =  driftcircle->globalPosition().y();
-  double HitRpos = sqrt(trackx*trackx+tracky*tracky);
+  double hitPosR = sqrt(trackx*trackx+tracky*tracky);
   
   /** @todo implement possiblity to set the scaling factor run-by-run from database, 
       should probably be done later on track- level */
   double ToTmip = 1;
   double valToT = 0;
-  if(divideByL){
-    if (abs(HitPart)==1) // Barrel
-      valToT = fitFuncBarrel_corrRZL(gasType, HitRtrack,HitZ, Layer, StrawLayer);
+  if(m_divideByL){
+    if (abs(hitPart)==1) // Barrel
+      valToT = fitFuncBarrel_corrRZL(gasType, hitRtrack, hitZ, Layer, StrawLayer);
     else // End-cap
-      valToT = fitFuncEndcap_corrRZL(gasType, HitRtrack,HitRpos,Layer, HitZ>0?1:(HitZ<0?-1:0));   
+      valToT = fitFuncEndcap_corrRZL(gasType, hitRtrack, hitPosR, Layer, hitZ>0?1:(hitZ<0?-1:0));
   }else{
-    if (abs(HitPart)==1) // Barrel
-      valToT = fitFuncBarrel_corrRZ(gasType, HitRtrack,HitZ, Layer, StrawLayer);
+    if (abs(hitPart)==1) // Barrel
+      valToT = fitFuncBarrel_corrRZ(gasType, hitRtrack, hitZ, Layer, StrawLayer);
     else // End-cap
-      valToT = fitFuncEndcap_corrRZ(gasType, HitRtrack,HitRpos,Layer, HitZ>0?1:(HitZ<0?-1:0));
+      valToT = fitFuncEndcap_corrRZ(gasType, hitRtrack, hitPosR, Layer, hitZ>0?1:(hitZ<0?-1:0));
   } 
   if (std::isinf(valToT)) return 0.;
-  if (valToT!=0) return ToTmip*ToT/valToT;
+  if (valToT!=0) return ToTmip*timeOverThreshold/valToT;
   return 0.;
 }
 
-
-
-double TRT_ToT_dEdx::correctToT_corrRZL(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer, bool isdata) const {
-
-  double l=strawLength(trkP) ;
-
-  return correctToT_corrRZL(trkP, driftcircle, HitPart, Layer, StrawLayer, isdata,
-                            m_useHThits, l);
-}
-
-double TRT_ToT_dEdx::correctToT_corrRZL(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer, bool isdata, bool useHThits, double length) const
-{
-  if (isdata != m_isData) {
-    ATH_MSG_ERROR("TRT_ToT_dEdx::correctToT_corrRZL called with isData = " << isdata
-                  << " but data type is " << m_isData << ". Ignoring!");
-  }
-
-        
-  if(trkP==nullptr)return false; 
-  if (!driftcircle) return false;
-  if (driftcircle->prepRawData()==nullptr) return 0;
-  double HitRtrack = fabs(trkP->parameters()[Trk::locR]);
-  double Trt_RHit = fabs(driftcircle->localParameters()[Trk::driftRadius]);
-  if ( m_useZeroRHitCut && Trt_RHit==0) return false;                                     // tube hit
-  if ( (HitRtrack >= m_trackConfig_maxRtrack) || (HitRtrack <= m_trackConfig_minRtrack) )return false;    // drift radius close to wire or wall
-  if(!useHThits){
-    int TrtHl = driftcircle->highLevel();
-    if (TrtHl==1) return false; 
-  }
-
-  EGasType gasType = gasTypeInStraw(driftcircle);  
-  if(m_useTrackPartWithGasType!=kUnset) // don't preselect hits
-    {
-      if(m_useTrackPartWithGasType!=gasType)
-        return false;
-    }
-
-  unsigned int BitPattern = driftcircle->prepRawData()->getWord();
-  double ToT = getToT(BitPattern);
-  if(ToT==0) return false; // If ToT for this hit equal 0, skip it.
-
-  if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe)
-    {
-      if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits
-        {     
-          if (abs(HitPart)==1) // Barrel
-            ToT/=mimicToXeHit_Barrel(gasType, HitRtrack, Layer, StrawLayer);
-          else // End-cap
-            ToT/=mimicToXeHit_Endcap(gasType, HitRtrack, Layer, HitPart); 
-
-          if(m_whichToTEstimatorAlgo==kToTLargerIsland){
-            if(ToT<3.125) ToT = 3.125;
-            if(ToT>75)    ToT = 75;
-          }else{
-            if(ToT<3.125) ToT = 3.125;
-            if(ToT>62.5)  ToT = 62.5;
-          }
-
-          gasType=kXenon; // After mimic correction we work with that hit as Xenon hit.
-        }  
-    }
-
-  if(length>0) ToT = ToT/length;
-
-  const Amg::Vector3D& gp = driftcircle->globalPosition();
-  double HitR = sqrt( gp.x() * gp.x() + gp.y() * gp.y() );
-  double HitZ = gp.z();
-  double ToTmip = 1;
-  double valToT = 1;
-
-  if (abs(HitPart)==1) // Barrel
-    valToT = fitFuncBarrel_corrRZL(gasType, HitRtrack,HitZ, Layer, StrawLayer);
-  else // End-cap
-    valToT = fitFuncEndcap_corrRZL(gasType, HitRtrack ,HitR,Layer, HitZ>0?1:(HitZ<0?-1:0));
-  if (std::isinf(valToT)) return 0.;
-  return (valToT!=0.) ? (ToTmip*ToT/valToT) : 0.;
-}
-
-
-
-double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer, bool isdata) const
-{
-  return correctToT_corrRZ(trkP, driftcircle, HitPart, Layer, StrawLayer,  isdata, 
-                           m_useHThits);
-}
-
-double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer, bool isdata, bool useHThits) const
-{
-
-  if (isdata != m_isData) {
-    ATH_MSG_ERROR("TRT_ToT_dEdx::correctToT_corrRZ called with isData = " << isdata
-                  << " but data type is " << m_isData << ". Ignoring!");
-  }
-
-  if(trkP==nullptr)return false; 
-  if (!driftcircle) return false;
-  if (driftcircle->prepRawData()==nullptr) return 0;
-  double HitRtrack = fabs(trkP->parameters()[Trk::locR]);
-  double Trt_RHit = fabs(driftcircle->localParameters()[Trk::driftRadius]);
-  if ( m_useZeroRHitCut && Trt_RHit==0) return false;                                     // tube hit
-  if ( (HitRtrack >= m_trackConfig_maxRtrack) || (HitRtrack <= m_trackConfig_minRtrack) )return false;    // drift radius close to wire or wall
-  if(!useHThits){
-    int TrtHl = driftcircle->highLevel();
-    if (TrtHl==1) return false; 
-  }            
-
-  EGasType gasType = gasTypeInStraw(driftcircle);  
-  if(m_useTrackPartWithGasType!=kUnset) // don't preselect hits
-    {
-      if(m_useTrackPartWithGasType!=gasType)
-        return false;
-    }
-
-  unsigned int BitPattern = driftcircle->prepRawData()->getWord();
-  double ToT = getToT(BitPattern);
-  if(ToT==0) return false; // If ToT for this hit equal 0, skip it.
-  
-  if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe)
-    {
-      if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits
-        {     
-          if (abs(HitPart)==1) // Barrel
-            ToT/=mimicToXeHit_Barrel(gasType, HitRtrack, Layer, StrawLayer);
-          else // End-cap
-            ToT/=mimicToXeHit_Endcap(gasType, HitRtrack, Layer, HitPart); 
-
-          if(m_whichToTEstimatorAlgo==kToTLargerIsland){
-            if(ToT<3.125) ToT = 3.125;
-            if(ToT>75)    ToT = 75;
-          }else{
-            if(ToT<3.125) ToT = 3.125;
-            if(ToT>62.5)  ToT = 62.5;
-          }
-
-          gasType=kXenon; // After mimic correction we work with that hit as Xenon hit.
-        }  
-    }
-
-  const Amg::Vector3D& gp = driftcircle->globalPosition();
-  double HitR = sqrt( gp.x() * gp.x() + gp.y() * gp.y() );
-  double HitZ = gp.z();
-  double ToTmip = 1;
-  double valToT = 1;
-
-  if (abs(HitPart)==1) // Barrel
-    valToT = fitFuncBarrel_corrRZ(gasType, HitRtrack,HitZ, Layer, StrawLayer);
-  else // End-cap
-    valToT = fitFuncEndcap_corrRZ(gasType, HitRtrack ,HitR,Layer, HitZ>0?1:(HitZ<0?-1:0));
-  return ToTmip*ToT/valToT;
-}
-
-
-
 double TRT_ToT_dEdx::fitFuncBarrel_corrRZ(EGasType gasType, double driftRadius,double zPosition, int Layer, int StrawLayer) const
 {
   if (Layer == 0 && StrawLayer < 9) {
@@ -1151,8 +788,6 @@ double TRT_ToT_dEdx::fitFuncBarrel_corrRZ(EGasType gasType, double driftRadius,d
   return fitFuncBarrelLong_corrRZ(gasType, driftRadius, zPosition, Layer, StrawLayer);
 }
 
-
-
 double TRT_ToT_dEdx::fitFuncEndcap_corrRZ(EGasType gasType, double driftRadius,double radialPosition, int Layer, int sign) const 
 {
   /**
@@ -1163,8 +798,6 @@ double TRT_ToT_dEdx::fitFuncEndcap_corrRZ(EGasType gasType, double driftRadius,d
   return T0+a*radialPosition;
 }
 
-
-
 double TRT_ToT_dEdx::fitFuncBarrelLong_corrRZ(EGasType gasType, double driftRadius,double zPosition, int Layer, int StrawLayer) const
 {
   /**
@@ -1189,8 +822,6 @@ double TRT_ToT_dEdx::fitFuncBarrelLong_corrRZ(EGasType gasType, double driftRadi
   return T0+(z/v)*exp(expArg);
 }
 
-
-
 double TRT_ToT_dEdx::fitFuncBarrelShort_corrRZ(EGasType gasType, double driftRadius,double zPosition, int StrawLayer) const
 {
   /**
@@ -1207,7 +838,6 @@ double TRT_ToT_dEdx::fitFuncBarrelShort_corrRZ(EGasType gasType, double driftRad
 
 double TRT_ToT_dEdx::fitFuncPol_corrRZ(EGasType gasType, int parameter, double driftRadius, int Layer, int Strawlayer, int sign, int set) const
 {
-
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
   if(dEdxCorrection==nullptr)
@@ -1226,10 +856,6 @@ double TRT_ToT_dEdx::fitFuncPol_corrRZ(EGasType gasType, int parameter, double d
   int offset = 0;
   if(m_isData){
     if(set==0){ // long straws in barrel
-      //int layerindex = Layer*30+Strawlayer;
-      //int parId=0;
-      //parId=0;
-      //if(sign>0)parId=1620;  // FIXME: parId is not used
       a = dEdxCorrection->paraLongCorrRZ[gasType][(6*parameter+0)*30*3+Layer*30+Strawlayer+offset];
       b = dEdxCorrection->paraLongCorrRZ[gasType][(6*parameter+1)*30*3+Layer*30+Strawlayer+offset];
       c = dEdxCorrection->paraLongCorrRZ[gasType][(6*parameter+2)*30*3+Layer*30+Strawlayer+offset];
@@ -1284,7 +910,6 @@ double TRT_ToT_dEdx::fitFuncPol_corrRZ(EGasType gasType, int parameter, double d
   return a+b*r+c*r*r+d*r*r*r+e*r*r*r*r+f*r*r*r*r*r;
 }
 
-
 double TRT_ToT_dEdx::fitFuncEndcap_corrRZL(EGasType gasType, double driftRadius,double radialPosition, int Layer, int sign) const 
 {
   /*
@@ -1293,11 +918,10 @@ double TRT_ToT_dEdx::fitFuncEndcap_corrRZL(EGasType gasType, double driftRadius,
 
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
-  if(dEdxCorrection==nullptr)
-    {
-      ATH_MSG_ERROR(" fitFuncEndcap_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
-      return 0;
-    }
+  if(dEdxCorrection==nullptr) {
+    ATH_MSG_ERROR(" fitFuncEndcap_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
+    return 0;
+  }
 
   double r = fabs(driftRadius);
   double a,b,c,d,e,f,g,h,i;  
@@ -1331,7 +955,6 @@ double TRT_ToT_dEdx::fitFuncEndcap_corrRZL(EGasType gasType, double driftRadius,
   return T0+T1+slope*radialPosition;
 }
 
-
 double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,double zPosition, int Layer, int Strawlayer) const 
 {
   /*
@@ -1339,16 +962,14 @@ double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,
    */
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
-  if(dEdxCorrection==nullptr)
-    {
-      ATH_MSG_ERROR(" fitFuncBarrel_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
-      return 0;
-    }
+  if(dEdxCorrection==nullptr) {
+    ATH_MSG_ERROR(" fitFuncBarrel_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
+    return 0;
+  }
 
   double a,b,c,d,e,f,g;  
-
-  if(Layer==0 && Strawlayer<9){ // short straws
-    if(m_isData){
+  if (Layer==0 && Strawlayer<9) { // short straws
+    if (m_isData){
       a = dEdxCorrection->paraShortCorrRZDivideByLengthDATA[gasType][(0)*9+Strawlayer];
       b = dEdxCorrection->paraShortCorrRZDivideByLengthDATA[gasType][(1)*9+Strawlayer];
       c = dEdxCorrection->paraShortCorrRZDivideByLengthDATA[gasType][(2)*9+Strawlayer];
@@ -1356,7 +977,7 @@ double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,
       e = dEdxCorrection->paraShortCorrRZDivideByLengthDATA[gasType][(4)*9+Strawlayer];
       f = dEdxCorrection->paraShortCorrRZDivideByLengthDATA[gasType][(5)*9+Strawlayer];
       g = dEdxCorrection->paraShortCorrRZDivideByLengthDATA[gasType][(6)*9+Strawlayer];
-    }else{
+    } else {
       a = dEdxCorrection->paraShortCorrRZDivideByLengthMC[gasType][(0)*9+Strawlayer];
       b = dEdxCorrection->paraShortCorrRZDivideByLengthMC[gasType][(1)*9+Strawlayer];
       c = dEdxCorrection->paraShortCorrRZDivideByLengthMC[gasType][(2)*9+Strawlayer];
@@ -1365,9 +986,8 @@ double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,
       f = dEdxCorrection->paraShortCorrRZDivideByLengthMC[gasType][(5)*9+Strawlayer];
       g = dEdxCorrection->paraShortCorrRZDivideByLengthMC[gasType][(6)*9+Strawlayer];
     }
-    
-  }else{
-    if(m_isData){
+  } else {
+    if (m_isData) {
       a = dEdxCorrection->paraLongCorrRZDivideByLengthDATA[gasType][(0)*30*3+Layer*30+Strawlayer];
       b = dEdxCorrection->paraLongCorrRZDivideByLengthDATA[gasType][(1)*30*3+Layer*30+Strawlayer];
       c = dEdxCorrection->paraLongCorrRZDivideByLengthDATA[gasType][(2)*30*3+Layer*30+Strawlayer];
@@ -1375,7 +995,7 @@ double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,
       e = dEdxCorrection->paraLongCorrRZDivideByLengthDATA[gasType][(4)*30*3+Layer*30+Strawlayer];
       f = dEdxCorrection->paraLongCorrRZDivideByLengthDATA[gasType][(5)*30*3+Layer*30+Strawlayer];
       g = dEdxCorrection->paraLongCorrRZDivideByLengthDATA[gasType][(6)*30*3+Layer*30+Strawlayer];
-    }else{
+    } else {
       a = dEdxCorrection->paraLongCorrRZDivideByLengthMC[gasType][(0)*30*3+Layer*30+Strawlayer];
       b = dEdxCorrection->paraLongCorrRZDivideByLengthMC[gasType][(1)*30*3+Layer*30+Strawlayer];
       c = dEdxCorrection->paraLongCorrRZDivideByLengthMC[gasType][(2)*30*3+Layer*30+Strawlayer];
@@ -1393,328 +1013,11 @@ double TRT_ToT_dEdx::fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,
   double slope = e*r+f*r*r+g*r*r*r;  
   double result;
   result = T0neg+T1+slope*z;
-  if(zPosition>0)result = T0pos+T1+slope*z;
+  if (zPosition>0) result = T0pos+T1+slope*z;
 
   return result;
 }
 
-
-
-double TRT_ToT_dEdx::getToTlargerIsland(unsigned int BitPattern) const 
-{
-  unsigned long mask = 0x02000000;
-  unsigned int best_length = 0;
-  unsigned int current_length = 0;
-  unsigned int k = 0;
-
-  //Set 4 last bits to zero (to match data and MC bitmasks)
-  unsigned int mask_last_bits=0xFFFFFF0;  // 1 1 11111111 1 11111111 1 11110000
-  unsigned int BitPattern0 =BitPattern & mask_last_bits;
-
-  //shift bitmask to the right until end;
-  while (true) {
-    if (BitPattern0 & mask) {
-      ++current_length;
-    }
-    else {
-      // remember longest island
-      if (current_length > best_length)
-        best_length = current_length;
-      current_length = 0;
-    }
-    if (!mask)
-      break;
-    assert(k < 24);
-    mask >>= 1;
-    if (k == 7 || k == 15)
-      mask >>= 1;
-    ++k;
-  }
-  assert(k == 24);
-  return best_length*3.125; 
-}
-
-
-
-double TRT_ToT_dEdx::getToTonly1bits(unsigned int BitPattern) const 
-{
-  /********  Islands ********/
-  unsigned  mask2 = 0x02000000;
-  int k2;
-  int i_island = 0;
-  std::vector<int> StartIsland;
-  std::vector<int> EndIsland;
-  std::vector<int> LengthIsland;
-  bool StartedIsland = false;
-  bool EndedIsland = true;
-  for(k2=0;k2<24;++k2) {
-    if ( !(BitPattern & mask2) ) {
-      if (StartedIsland) {
-        EndIsland.push_back(k2-1);
-        LengthIsland.push_back(EndIsland[i_island]-StartIsland[i_island]+1);
-        i_island = i_island+1;
-        EndedIsland = true;
-        StartedIsland = false;
-      }
-      mask2>>=1;
-      if (k2==7 || k2==15) mask2>>=1;
-    } else {
-      if (EndedIsland) {
-        StartIsland.push_back(k2);
-        StartedIsland = true;
-        EndedIsland = false;
-      }
-      if (k2==23) {
-        EndIsland.push_back(k2);
-        LengthIsland.push_back(EndIsland[i_island]-StartIsland[i_island]+1);
-      }
-      mask2>>=1;
-      if (k2==7 || k2==15) mask2>>=1;
-    }
-  }
-  
-  // ToT using only bits set to 1 (remove all 0)
-  double ToT_only1bits = 0;
-  for (unsigned int m=0 ; m<StartIsland.size() ; m++) {
-    ToT_only1bits = ToT_only1bits + LengthIsland[m]*3.125;
-  }
-  
-  return ToT_only1bits;
-}
-
-
-double TRT_ToT_dEdx::getToTHighOccupancy(unsigned int BitPattern) const 
-{
-  int LE = DriftTimeBin_v2(BitPattern);
-  int TE = TrailingEdge_v2(BitPattern);
-  if ( (0 == LE) || (24 == LE) || (24 == TE) || (0 == TE) || (23 == LE) )
-    return 0;
-
-  return (double) (TE-LE+1)*3.125; 
-}
-
-
-
-int TRT_ToT_dEdx::DriftTimeBin_v2(unsigned int BitPattern) const
-{
-  unsigned  mask = 0x02000000;
-  unsigned  word_LE = BitPattern>>6;
-  word_LE = word_LE<<6;
- 
-  mask >>=1;
-  bool SawZero = false;
-  int i;
-  for(i=1;i<18;++i)
-    { 
-      if      (  (word_LE & mask) && SawZero) break;
-      if ( !(word_LE & mask) ) SawZero = true; 
-      mask>>=1;
-      if(i==7 || i==15) mask>>=1;
-    }
-  if(i==18) i=0;
-  return i;
-}  
-
-
-
-int TRT_ToT_dEdx::TrailingEdge_v2(unsigned int BitPattern) const
-{
-  unsigned mask = 0x00000001;
-  unsigned mask_word = 0x0001fff0;
-  unsigned word_TE = BitPattern & mask_word;
-  //bool SawZero=false;
-  bool SawZero=true;
-  int i;
-  for (i = 0; i < 24; ++i)
-    {
-      if ( (word_TE & mask) && SawZero )
-        break;
-      if ( !(word_TE & mask) )
-        SawZero = true;
-
-      mask <<= 1;
-      if (i == 7 || i == 15)
-        mask <<= 1;
-    }
- 
-  if ( 24 == i )
-    return i;
-
-  return (23 - i);
-}
-
-
-
-double TRT_ToT_dEdx::getToTHighOccupancySmart(unsigned int BitPattern) const 
-{
-  int LE = DriftTimeBin_v2(BitPattern);
-  int TE = TrailingEdge_v3(BitPattern);
-  if ( (0 == LE) || (24 == LE) || (24 == TE) || (0 == TE) || (23 == LE) )
-    return 0;
-
-  return (double) (TE-LE+1)*3.125; 
-}
-
-
-
-int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const
-{
-  unsigned mask = 0x00000001;
-  unsigned mask_word = 0x0001fff0; // 11111111 1 11110000   
-  unsigned mask_last_bit =0x10; //10000
-  
-  unsigned word_TE = BitPattern & mask_word;
-  
-  bool SawZero=true;
-  bool SawZero1=false;
-  bool SawZero2=false;
-  bool SawUnit1=false;
-  int i=0;
-  int j=0;
-  int k=0;
-  
-  if(word_TE & mask_last_bit) 
-    {
-  
-      for (j = 0; j < 11; ++j)
-        {
-          mask_last_bit=mask_last_bit<<1;
-                
-          if(j==3) mask_last_bit=mask_last_bit<<1;
-                
-          if ( !(word_TE & mask_last_bit) )
-            {
-              SawZero2 = true;
-              break;                  
-            }
-        }
-        
-      if(!SawZero2) return 19;
-
-      if(SawZero2){
-        for (k = j+1; k < 11; ++k)
-          {
-            mask_last_bit=mask_last_bit<<1;
-
-            if(k==3) mask_last_bit=mask_last_bit<<1;
-
-            if ( word_TE & mask_last_bit )
-              {
-                SawUnit1 = true;
-                break;                                  
-              }
-          } 
-      }
-        
-      if(!SawUnit1 && SawZero2) return 19;
-        
-    }
-  
-  //+++++++++++++++++++++++++++++++++++++
-  
-  for (i = 0; i < 24; ++i)
-    {
-      if(!(word_TE & mask) && i>3)
-        {
-          SawZero1 = true;
-        }
-            
-      if(SawZero1)
-        {  
-          if ( (word_TE & mask) && SawZero )
-            break;
-          if ( !(word_TE & mask) )
-            SawZero = true;
-        }
-      mask <<= 1;
-      if (i == 7 || i == 15)
-        mask <<= 1;
-    }
- 
-  if ( 24 == i )
-    return i;
-
-  return (23 - i);
-}
-
- 
-double TRT_ToT_dEdx::mimicToXeHit_Endcap(EGasType gasType, double driftRadius, int Layer, int sign) const
-{
-  SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
-  const TRTDedxcorrection* dEdxCorrection{*readHandle};
-  if(dEdxCorrection==nullptr)
-    {
-      ATH_MSG_ERROR(" mimicToXeHit_Endcap: Could not find any dEdxCorrection in CondStore. Return zero.");
-      return 0;
-    }
-
-
-  double r = fabs(driftRadius); 
-  double a; 
-
-  float rCopy = r;
-  rCopy*=10;
-  int rBin = int(rCopy);
-  if(rBin<0 || rBin>19)
-    {
-      ATH_MSG_FATAL("mimicToXeHit_Endcap():: rBin = "<<rBin<<" and out of range [0,19].");
-      throw std::exception();
-    }
-
-  int side = 0; // A side
-  if(sign <0) side =1; // C side
-  if(m_isData)
-    a = dEdxCorrection->paraEndMimicToXeDATA[gasType][(side*14+Layer)*20+(rBin)];
-  else
-    a = dEdxCorrection->paraEndMimicToXeMC[gasType][(side*14+Layer)*20+(rBin)];
-
-  ATH_MSG_DEBUG("mimicToXeHit_Endcap():: isData = " << m_isData << " gasTypeInStraw = " << gasType
-                << " side = " << side << " Layer = " << Layer << " rBin = " << rBin <<" BINPOS = " << (side*14+Layer)*20+(rBin) 
-                << " a = " << a << "" );
-
-  return a;
-}
-
-double TRT_ToT_dEdx::mimicToXeHit_Barrel(EGasType gasType, double driftRadius, int Layer, int Strawlayer) const 
-{
-
-  SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
-  const TRTDedxcorrection* dEdxCorrection{*readHandle};
-  if(dEdxCorrection==nullptr)
-    {
-      ATH_MSG_ERROR(" mimicToXeHit_Barrel: Could not find any dEdxCorrection in CondStore. Return zero.");
-      return 0;
-    }
-
-  double r = fabs(driftRadius); 
-  double a;  
-
-  float rCopy = r;
-  rCopy*=10;
-  int rBin = int(rCopy);
-  if(rBin<0 || rBin>19)
-    {
-      ATH_MSG_FATAL("mimicToXeHit_Barrel():: rBin = "<<rBin<<" and out of range [0,19].");
-      throw std::exception();
-    }
-
-  if(Layer==0 && Strawlayer<9){ // short straws
-    if(m_isData)
-      a = dEdxCorrection->paraShortMimicToXeDATA[gasType][Strawlayer*20+(rBin)];
-    else
-      a = dEdxCorrection->paraShortMimicToXeMC[gasType][Strawlayer*20+(rBin)];
-  }else{
-    if(m_isData)
-      a = dEdxCorrection->paraLongMimicToXeDATA[gasType][Layer*30*20+Strawlayer*20+(rBin)];
-    else
-      a = dEdxCorrection->paraLongMimicToXeMC[gasType][Layer*30*20+Strawlayer*20+(rBin)];
-  }
-
-  ATH_MSG_DEBUG("mimicToXeHit_Barrel():: isData = " << m_isData << " Layer = " << Layer << " Strawlayer = " << Strawlayer << " rBin = " << rBin << " a = " << a << "" );
-
-  return a;
-}
-
 double TRT_ToT_dEdx::hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr) const
 {
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
@@ -1723,7 +1026,7 @@ double TRT_ToT_dEdx::hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr)
   const Trk::MeasurementBase* trkM = itr->measurementOnTrack();
 
   // Check if this is RIO on track
-  // annd if yes check if is TRT Drift Circle
+  // and if yes check if is TRT Drift Circle
   // then set the ptr
   const InDet::TRT_DriftCircleOnTrack* driftcircle = nullptr;
   if (trkM && trkM->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
@@ -1799,7 +1102,7 @@ double TRT_ToT_dEdx::hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr)
   return ToTmip*valToT;
 }
 
-double TRT_ToT_dEdx::trackOccupancyCorrection(const Trk::Track* track,  bool useHThits) const
+double TRT_ToT_dEdx::trackOccupancyCorrection(const Trk::Track* track,  bool useHitsHT) const
 {
   SG::ReadCondHandle<TRTDedxcorrection> readHandle{m_ReadKey};
   const TRTDedxcorrection* dEdxCorrection{*readHandle};
@@ -1817,8 +1120,11 @@ double TRT_ToT_dEdx::trackOccupancyCorrection(const Trk::Track* track,  bool use
   else if (index > 99) index = 99;   // upper bound corresponding to eta = +2
 
   //Function of the from f(x)=a+b*x+c*x^2 was used as a fitting function, separately for tracks with and without excluding HT hits
-  if (!useHThits) corr=dEdxCorrection->trackOccPar0[index]+dEdxCorrection->trackOccPar1[index]*trackOcc+dEdxCorrection->trackOccPar2[index]*pow(trackOcc,2);
-  else corr=dEdxCorrection->trackOccPar0NoHt[index]+dEdxCorrection->trackOccPar1NoHt[index]*trackOcc+dEdxCorrection->trackOccPar2NoHt[index]*pow(trackOcc,2);
+  if (useHitsHT) {
+    corr=dEdxCorrection->trackOccPar0[index]+dEdxCorrection->trackOccPar1[index]*trackOcc+dEdxCorrection->trackOccPar2[index]*pow(trackOcc,2);
+  } else {
+    corr=dEdxCorrection->trackOccPar0NoHt[index]+dEdxCorrection->trackOccPar1NoHt[index]*trackOcc+dEdxCorrection->trackOccPar2NoHt[index]*pow(trackOcc,2);
+  }
 
   return corr;
 }
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
index 0943dc20d1ff9adc0dd04d963a7b5016f4669fff..bf945babf1ea50aacd9b5740d164e1d1071cdf4c 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
@@ -61,8 +61,9 @@ public:
   // enums
   //////////////////////////////////////////////////////////////////////////
   enum EDataBaseType {kOldDB,kNewDB};
-  enum EstCalc  {kAlgStandard,kAlgScalingToXe,kAlgReweight,kAlgReweightTrunkOne};
-  enum EToTEstimatorType {kToTLargerIsland,kToTHighOccupancy,kToTHighOccupancySmart};
+  enum EstCalc  {kAlgStandard,kAlgReweight,kAlgReweightTrunkOne};
+  enum EOccupancyCorrection{kRSOnly, kHitBased, kTrackBased, kGlobal};
+  enum EGasType {kXenon,kArgon,kKrypton,kUnset};
 
 private:
   SG::ReadDecorHandleKey<xAOD::EventInfo> m_rdhkEvtInfo {this
@@ -77,18 +78,20 @@ private:
   ToolHandle< InDet::ITRT_LocalOccupancy > m_localOccTool;     //!< the track selector tool
 
   // Algorithm switchers
+
   bool m_corrected;                 // If true - make correction using rs-distributions
   bool m_divideByL;                 // If true - divide ToT to the L of track in straw.
-  bool m_useHThits;                 // If true - use HT hit for dEdX estimator calculation
 
-  int  m_whichToTEstimatorAlgo;     // If true - use getToTNewApproach(), else - use getToTlargerIsland()
   int  m_useTrackPartWithGasType;   // If kUnset - use any gas for dEdX calculation;
-  int  m_toolScenario;              // Algorithm type for dEdX estimator calculation:
-  // kAlgStandard               - old dEdX estimator calculation algorithm;
-  // kAlgScalingToXe            - mimicToXe other gastype hits and apply Xenon calibrations;
-  // kAlgReweight               - calculate dEdX estimator using reweighting of separate gas types estimator using numbers of hits; truncate 1 max hit for each gas;
-  // kAlgReweightTrunkOne       - same as previous, but truncate only one max hit on track;
-  bool m_applyMimicToXeCorrection;  // Possibility to apply mimicToXenon function for any algorithm. For kAlgScalingToXe that always true.
+  int  m_toolScenario;              // Algorithm type for dEdX estimator calculation;
+  int  m_correctionType;            // Type of dEdx correction
+  ////////////////////////////////////////////////////
+  // Different cases for correctionType            //
+  // kRSOnly: only r-S calibration                  //
+  // kHitBased: Hit-based occupancy calibration     //
+  // kTrackBased: Track-based occupancy calibration //
+  // kGlobal: Global occupancy calibration          //
+  ////////////////////////////////////////////////////
 
 
   // Event info
@@ -100,13 +103,12 @@ private:
 
   bool m_useZeroRHitCut;  // skip tracks with where RHit=0
 
+  unsigned int m_nTrunkateHits = 1;
+
 
 public:
   /** AlgTool like constructor */
   TRT_ToT_dEdx(const std::string&,const std::string&,const IInterface*);
-  TRT_ToT_dEdx(const std::string& t, const std::string& n, const IInterface* p, 
-               bool DivideByL, bool useHThits, bool corrected, bool useHighOccToTAlgo, 
-               float minRtrack, float maxRtrack, bool useZeroRHitCut);
   
   /** Virtual destructor*/
   virtual ~TRT_ToT_dEdx();
@@ -117,55 +119,39 @@ public:
 
   /**
    * @brief function to calculate sum ToT normalised to number of used hits
-   * @param track pointer
-   * @param bool variable to decide wheter ToT or ToT/L should be used
-   * @param bool variable whether HT hits shoule be used 
-   * @return ToT
+   * @param track pointer to track
+   * @param useHitsHT decide if HT hits should be used in the estimate
+   * @return dEdx value
    */
-  double dEdx(const Trk::Track*, bool DivideByL, bool useHThits, bool corrected, EOccupancyCorrection correction_type=EOccupancyCorrection::kTrackBased) const;
-
-  /**
-   * @brief function to calculate sum ToT normalised to number of used hits
-   * @param track pointer
-   * @return ToT
-   */
-  double dEdx(const Trk::Track*, EOccupancyCorrection correction_type=EOccupancyCorrection::kTrackBased) const;
+  double dEdx(const Trk::Track* track, bool useHThits=true) const;
 
   /**
    * @brief function to calculate number of used hits
    * @param track pointer
-   * @param bool variable to decide wheter ToT or ToT/L should be used
-   * @param bool variable whether HT hits shoule be used
+   * @param useHitsHT decide if HT hits should be used in the estimate
    * @return nHits
    */
-  double usedHits(const Trk::Track* track, bool DivideByL, bool useHThits) const;
-
-  /**
-   * @brief function to calculate number of used hits
-   * @param track pointer
-   * @return nHits
-   */
-  double usedHits(const Trk::Track* track) const;
+  double usedHits(const Trk::Track* track, bool useHThits=true) const;
 
+protected:
   /** 
    * @brief function to define what is a good hit to be used for dEdx calculation
-   * cuts on track level can be made later by the user
-   * @param driftcircle object
-   * @param track parameter object
+   * cuts on track level can be made latekAlgStandardr by the user. Also returns the length in the straw.
+   * @param trackState measurement on track
+   * @param useHitsHT decide if HT hits should be used in the estimate
+   * @param length length in straw
    * @return decision
    */
-  bool isGood_Hit(const Trk::TrackStateOnSurface *itr) const;
-  bool isGood_Hit(const Trk::TrackStateOnSurface *itr, bool divideByL, bool useHThits, double& length) const;
+  bool isGoodHit(const Trk::TrackStateOnSurface* trackState, bool useHitsHT, double& length) const;
 
   /**
    * @brief correct overall dEdx normalization on track level
-   * @param dEdx definition (ToT or ToT/L)
-   * @param scaling correction (needed for data)
    * @param number of primary vertices per event
    * @return scaling variable
    */
-  double correctNormalization(bool divideLength, bool scaledata, double nVtx=-1) const;
+  double correctNormalization(double nVtx=-1) const;
 
+public:
   /**
    * @brief function to calculate likelihood from prediction and resolution
    * @param observed dEdx
@@ -175,8 +161,7 @@ public:
    * @return brobability  value between 0 and 1
    */
   double getProb(const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const;
-  double getProb(const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits, bool dividebyL) const;
-  double getProb(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits, bool dividebyL) const;
+  double getProb(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const;
 
   /**
    * @brief function to calculate likelihood ratio test
@@ -188,18 +173,15 @@ public:
    * @return test value between 0 and 1
    */
   double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const;
-  double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool dividebyL) const;
-
   /**
    * @brief function to calculate expectation value for dEdx using BB fit
    * @param track momentum
    * @param hypothesis
    * @return dEdx_pred
    */
-  double predictdEdx(const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis, bool dividebyL) const;
   double predictdEdx(const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis) const;
 
-  double predictdEdx(EGasType gasType, const double pTrk, Trk::ParticleHypothesis hypothesis, bool dividebyL) const;
+  double predictdEdx(EGasType gasType, const double pTrk, Trk::ParticleHypothesis hypothesis) const;
 
 
 
@@ -211,25 +193,7 @@ public:
    */
   double mass(const Trk::TrackStateOnSurface *itr, const double pTrk, double dEdx ) const;
 
-  /**
-   * @brief function to correct ToT/L used by the PIDTool parameters obtimized to be consistend with existing functions
-   * @param track parameter object
-   * @param trift circle object
-   * @param number to decide whether it is barrel or endcap
-   * @param number to identify layer ID
-   * @param number to identify strawlayer id
-   * @param bool to set data or MC
-   * @return corrected ToT/L (returns 0 if hit criteria are not fulfilled)
-   */
-  double strawLength(const Trk::TrackParameters* trkP) const;
-  double correctToT_corrRZL(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer,bool isData) const;
-
-  double correctToT_corrRZL(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer,bool isData, bool useHThits, double length) const;
-
-
-  double correctToT_corrRZ(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer,bool isData) const;
-  double correctToT_corrRZ(const Trk::TrackParameters* trkP,const InDet::TRT_DriftCircleOnTrack *driftcircle, int HitPart,int Layer,int StrawLayer,bool isData, bool useHThits) const;
-
+protected:
   /**
    * @brief main function to correct ToT values on hit level as a function of track radius and z-position
    * @param track on surface object
@@ -239,79 +203,7 @@ public:
    * @param bool variable whether mimic ToT to other gas hits shoule be used 
    * @return corrected value for ToT
    */
-  double correctToT_corrRZ(const Trk::TrackStateOnSurface *itr) const;
-  double correctToT_corrRZ(const Trk::TrackStateOnSurface *itr, bool divideByL, bool corrected, double length) const;
-
-  /**
-   * @brief compute ToT time for largest island
-   * @param bitpattern
-   * @return ToT
-   */
-  double getToTlargerIsland(unsigned int BitPattern) const;
-
-  /**
-   * @brief compute ToT time counting only 1 bits
-   * @param bitpattern
-   * @return ToT
-   */
-  double getToTonly1bits(unsigned int BitPattern) const;
-
-  /**
-   * @brief compute ToT time using special validity gate. Also take in account new LE and TE selection 
-   * @param bitpattern
-   * @return ToT
-   */
-  double getToTHighOccupancy(unsigned int BitPattern) const;
-
-  /**
-   * @brief LE for getToTHighOccupancy()
-   * @param bitpattern
-   * @return ToT
-   */
-  int DriftTimeBin_v2(unsigned int BitPattern) const;
-
-  /**
-   * @brief TE for getToTHighOccupancy()
-   * @param bitpattern
-   * @return ToT
-   */
-  int TrailingEdge_v2(unsigned int BitPattern) const;
-
-  /**
-   * @brief same as getToTHighOccupancy(), but use TrailingEdge_v3() with search of second TE
-   * @param bitpattern
-   * @return ToT
-   */
-  double getToTHighOccupancySmart(unsigned int BitPattern) const;
-
-  /**
-   * @brief TE for getToTHighOccupancy() with search second TE
-   * @param bitpattern
-   * @return ToT
-   */
-  int TrailingEdge_v3(unsigned int BitPattern) const;
-
-  /**
-   * @brief function to compute correction factor to mimic ToT Ar to the Xe
-   * @param driftradius
-   * @param straw layer index
-   * @param sign for positive or negative side
-   * @param gas type variable (0-Xe,1-Ar,2-Kr)
-   * @param bool variable to specify whether data or MC correction
-   * @return correction
-   */
-  double mimicToXeHit_Endcap(EGasType gasType, double driftRadius, int Layer, int sign) const;
-
-  /**
-   * @brief function to compute correction factor to mimic ToT Ar to the Xe
-   * @param driftradius
-   * @param layer index
-   * @param straw layer index
-   * @param gas type variable (0-Xe,1-Ar,2-Kr)
-   * @param bool variable to specify whether data or MC correction
-   * @return correction
-   */
-  double mimicToXeHit_Barrel(EGasType gasType, double driftRadius, int Layer, int Strawlayer) const;
+  double correctToT_corrRZ(const Trk::TrackStateOnSurface *itr, double length) const;
     
   /**
    * @brief return gas type for that hit
@@ -384,13 +276,6 @@ private:
    */
   double fitFuncBarrel_corrRZL(EGasType gasType, double driftRadius,double zPosition, int Layer, int StrawLayer) const;
 
-  /**
-   * @brief choose estimator algo using m_whichToTEstimatorAlgo and return ToT from bitpattern.
-   * @param bitpattern
-   * @return ToT
-   */
-  double getToT(unsigned int BitPattern) const;
-
   /* Calibration functions for occupancy corrections */
   double hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr) const;
   double trackOccupancyCorrection(const Trk::Track* track,  bool useHThits) const;
@@ -399,60 +284,30 @@ private:
 public:
   // Setters and getters
 
-  void SetDefaultConfiguration();
-
-  // void  SwitchOnRSCorrection()                { m_corrected=true;           }
-  // void  SwitchOffRSCorrection()               { m_corrected=false;          }
-  bool  GetStatusRSCorrection() const         { return m_corrected;         }
-
-  // void  SwitchOnDivideByL()                   { m_divideByL=true;           }
-  // void  SwitchOffDivideByL()                  { m_divideByL=false;          }
-  bool  GetStatusDivideByL() const            { return m_divideByL;         }
-
-  // void  SwitchOnUseHThits()                   { m_useHThits=true;           }
-  // void  SwitchOffUseHThits()                  { m_useHThits=false;          }
-  bool  GetStatusUseHThits() const            { return m_useHThits;         }
-
-  void  SetLargerIslandToTEstimatorAlgo()           { m_whichToTEstimatorAlgo=kToTLargerIsland;        }
-  void  SetHighOccupancyToTEstimatorAlgo()          { m_whichToTEstimatorAlgo=kToTHighOccupancy;       }
-  void  SetHighOccupancySmartToTEstimatorAlgo()     { m_whichToTEstimatorAlgo=kToTHighOccupancySmart;  }
-  bool  GetStatusToTEstimatorAlgo() const           { return m_whichToTEstimatorAlgo;                  }
-
-
-  void  SetMinRtrack(float minRtrack)         { m_trackConfig_minRtrack=minRtrack;}
-  float GetMinRtrack() const                  { return m_trackConfig_minRtrack;   }
+  void  setDefaultConfiguration();
 
-  void  SetMaxRtrack(float maxRtrack)         { m_trackConfig_maxRtrack=maxRtrack;}
-  float GetMaxRtrack() const                  { return m_trackConfig_maxRtrack;   }
+  void  setStatusCorrection(bool value)       { m_corrected = value;        }
+  bool  getStatusCorrection() const           { return m_corrected;         }
 
-  void  SwitchOnUseZeroRHitCut()              { m_useZeroRHitCut=true;   }
-  void  SwitchOffUseZeroRHitCut()             { m_useZeroRHitCut=false;  }
-  bool  GetStatusUseZeroRHitCut() const       { return m_useZeroRHitCut; }
+  void  setCorrectionType(EOccupancyCorrection value)  { m_correctionType = value;        }
+  bool  getCorrectionType() const                      { return m_correctionType;         }
 
-  void  SetXenonFordEdXCalculation()          { m_useTrackPartWithGasType=kXenon;   }
-  void  SetArgonFordEdXCalculation()          { m_useTrackPartWithGasType=kArgon;   }
-  void  SetKryptonFordEdXCalculation()        { m_useTrackPartWithGasType=kKrypton; }
-  void  UnsetGasTypeFordEdXCalculation()      { m_useTrackPartWithGasType=kUnset;   }
-  int   GetGasTypeFordEdXCalculation() const  { return m_useTrackPartWithGasType;   }
+  void  setMinRtrack(float minRtrack)         { m_trackConfig_minRtrack=minRtrack;}
+  float getMinRtrack() const                  { return m_trackConfig_minRtrack;   }
 
-  // void  SetXenonGasTypeInStraw()              { m_gasTypeInStraw=kXenon;   }
-  // void  SetArgonGasTypeInStraw()              { m_gasTypeInStraw=kArgon;   }
-  // void  SetKryptonGasTypeInStraw()            { m_gasTypeInStraw=kKrypton; }
-  // void  UnsetGasTypeInStraw()                 { m_gasTypeInStraw=kUnset;   }
-  // int   GetStatusGasTypeInStraw() const       { return m_gasTypeInStraw;   }
+  void  setMaxRtrack(float maxRtrack)         { m_trackConfig_maxRtrack=maxRtrack;}
+  float getMaxRtrack() const                  { return m_trackConfig_maxRtrack;   }
 
-  void  UseStandardAlgorithm()                { m_toolScenario=kAlgStandard;         }
-  void  UseScalingAlgorithm()                 { m_toolScenario=kAlgScalingToXe; SwitchOnMimicToXeCorrection(); }
-  void  UseReweightingAlgorithm()             { m_toolScenario=kAlgReweight;         }
-  void  UseReweightingAlgorithmTrunkOne()     { m_toolScenario=kAlgReweightTrunkOne; }
-  int   GetStatusAlgorithm() const            { return m_toolScenario;               }
+  void  setStatusUseZeroRHitCut(bool value)   { m_useZeroRHitCut = value; }
+  bool  getStatusUseZeroRHitCut() const       { return m_useZeroRHitCut; }
 
-  void  SwitchOnMimicToXeCorrection()         { m_applyMimicToXeCorrection=true;   }
-  void  SwitchOffMimicToXeCorrection()        { m_applyMimicToXeCorrection=false;  }
-  bool  GetStatusMimicToXeCorrection() const  { return m_applyMimicToXeCorrection; }
+  void  setGasTypeFordEdXCalculation(EGasType gasType) { m_useTrackPartWithGasType = gasType; }
+  int   getGasTypeFordEdXCalculation() const           { return m_useTrackPartWithGasType;    }
 
+  void  setAlgorithm(EstCalc alg)             { m_toolScenario=alg;    }
+  int   getAlgorithm() const                  { return m_toolScenario; }
 
-  void  ShowDEDXSetup() const;
+  void  showDEDXSetup() const;
 
   
 };
diff --git a/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx b/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx
index 5add7978d975784aa443f0069615253d449afd0c..f36e3fe6344d95b21eed0841fe4071da525f2d74 100755
--- a/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx
+++ b/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx
@@ -6,8 +6,8 @@
 
 #include "InDetSimEvent/SiHitIdHelper.h"
 #include "StoreGate/StoreGateSvc.h"
-#include "StoreGate/StoreGate.h"
 #include "InDetIdentifier/PixelID.h"
+#include "GaudiKernel/ServiceHandle.h"
 
 #include "G4Types.hh"
 #ifdef G4MULTITHREADED
@@ -38,12 +38,9 @@ void SiHitIdHelper::Initialize() {
 
   // determine whether hits were created with an SLHC dictionary
   // in which case eta module field is expanded.
-  // Need to lock this thread-unsafe retrieval
-  const PixelID* pix;
-  StoreGateSvc* detStore(nullptr);
-  {
-    std::lock_guard<std::mutex> lock(sgMutex);
-    detStore = StoreGate::pointer("DetectorStore");
+  const PixelID* pix = nullptr;
+  ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "SiHitIdHelper");
+  if (detStore.retrieve().isSuccess()) {
     if (detStore->retrieve(pix, "PixelID").isFailure()) { pix = 0; }
   }
   bool isSLHC = (pix != 0 && pix->dictionaryVersion() == "SLHC");
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt
index 61e6485b73d4f0cb3ce0e26391a128fe8a28001e..3913c930f85dbfec9070b4651913c5e8af48931f 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt
@@ -39,7 +39,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_component( InDetTrigPrepRawDataFormat
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES Identifier GaudiKernel InDetPrepRawData TrigInterfacesLib AthenaKernel StoreGateLib SGtests AtlasDetDescr IRegionSelector InDetByteStreamErrors ByteStreamCnvSvcBaseLib TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetRawData SiClusterizationToolLib TrkTrack TrigSteeringEvent TrigTimeAlgsLib )
+                     LINK_LIBRARIES Identifier GaudiKernel InDetPrepRawData TrigInterfacesLib AthenaKernel StoreGateLib SGtests AtlasDetDescr IRegionSelector InDetByteStreamErrors ByteStreamCnvSvcBaseLib TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetRawData SiClusterizationToolLib TrkTrack TrigSteeringEvent TrigTimeAlgsLib PixelConditionsToolsLib TRT_DriftCircleToolLib InDetTrigToolInterfacesLib SCT_ConditionsData )
 
 # Install files from the package:
 atlas_install_headers( InDetTrigPrepRawDataFormat )
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/CMakeLists.txt
index 13a9c4bcd4e93b3e4350d04179e42bdda8a4d1a8..6d9444aab641a9ed1aad4209df86b6a6190c5fff 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/CMakeLists.txt
@@ -27,7 +27,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_component( InDetTrigPriVxFinder
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES GaudiKernel TrigInterfacesLib StoreGateLib SGtests EventPrimitives InDetRecToolInterfaces MagFieldInterfaces TrkEventPrimitives TrkParameters TrkParticleBase TrkTrack VxVertex TrigParticle xAODTracking )
+                     LINK_LIBRARIES GaudiKernel TrigInterfacesLib StoreGateLib SGtests EventPrimitives InDetRecToolInterfaces MagFieldInterfaces TrkEventPrimitives TrkParameters TrkParticleBase TrkTrack VxVertex TrigParticle xAODTracking InDetBeamSpotServiceLib )
 
 # Install files from the package:
 atlas_install_headers( InDetTrigPriVxFinder )
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/CMakeLists.txt
index 0f556b1f9aa111bd4852119fe187fff8e3ca117b..5ee1a07c24dca00e9ab72b2fad4469d7afa114aa 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/CMakeLists.txt
@@ -31,7 +31,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_component( InDetTrigRawDataProvider
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel InDetRawData AthenaKernel StoreGateLib SGtests IRegionSelector ByteStreamCnvSvcBaseLib InDetByteStreamErrors InDetIdentifier SCT_CablingLib TrigSteeringEvent PixelCablingLib )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel InDetRawData AthenaKernel StoreGateLib SGtests IRegionSelector ByteStreamCnvSvcBaseLib InDetByteStreamErrors InDetIdentifier SCT_CablingLib TrigSteeringEvent PixelCablingLib InDetTrigToolInterfacesLib SCT_RawDataByteStreamCnvLib PixelRawDataByteStreamCnvLib TRT_ConditionsServicesLib TRT_CablingLib TRT_RawDataByteStreamCnvLib )
 
 # Install files from the package:
 atlas_install_headers( InDetTrigRawDataProvider )
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/CMakeLists.txt
index 33f93154b6b185318b22c11cf5e2c7f93678a7bc..b68ab0673a2516fd87faebb1bc7f325858464f07 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/CMakeLists.txt
@@ -46,7 +46,7 @@ atlas_add_component( InDetTrigTrackResidualMonitor
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthContainers AtlasDetDescr Identifier GaudiKernel InDetReadoutGeometry InDetPrepRawData TrkEventPrimitives TrkParameters TrkTrack TrkValEvent TrigSteeringEvent TrigInterfacesLib IdDictDetDescr InDetIdentifier MagFieldInterfaces TrkGeometry TrkSurfaces TrkMaterialOnTrack TrkMeasurementBase TrkRIO_OnTrack TrkTrackSummary TrkExInterfaces TrkToolInterfaces TrigParticle )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthContainers AtlasDetDescr Identifier GaudiKernel InDetReadoutGeometry InDetPrepRawData TrkEventPrimitives TrkParameters TrkTrack TrkValEvent TrigSteeringEvent TrigInterfacesLib IdDictDetDescr InDetIdentifier MagFieldInterfaces TrkGeometry TrkSurfaces TrkMaterialOnTrack TrkMeasurementBase TrkRIO_OnTrack TrkTrackSummary TrkExInterfaces TrkToolInterfaces TrigParticle TrkValToolsLib InDetAlignGenToolsLib )
 
 # Install files from the package:
 atlas_install_headers( InDetTrigTrackResidualMonitor )
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/CMakeLists.txt
index 8c77cb3565ce014811d66ee2fc17e2667d2fc88f..2afd6e6a43c04a8be86d986ed24d521d1a7b7d27 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/CMakeLists.txt
@@ -26,7 +26,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_component( InDetTrigTruthAlgs
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES GaudiKernel InDetSimData TrkTruthData TrigInterfacesLib AthLinks StoreGateLib SGtests InDetPrepRawData Particle ParticleTruth TrkTrack TrkToolInterfaces TrigParticle )
+                     LINK_LIBRARIES GaudiKernel InDetSimData TrkTruthData TrigInterfacesLib AthLinks StoreGateLib SGtests InDetPrepRawData Particle ParticleTruth TrkTrack TrkToolInterfaces TrigParticle InDetTruthInterfaces )
 
 # Install files from the package:
 atlas_install_headers( InDetTrigTruthAlgs )
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/CMakeLists.txt
index 98aa09161fbfd0ff196fbd4b6a8f157d7fa915be..d02f52e4cc0186f70c4c7a9b23b8d0f494a23e07 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/CMakeLists.txt
@@ -35,7 +35,7 @@ atlas_add_component( InDetTrigVxSecondary
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} xAODTracking GaudiKernel VxSecVertex TrigInterfacesLib AthContainers GeoPrimitives IRegionSelector xAODBase InDetRecToolInterfaces TrkParameters TrkTrack VxVertex TrigInDetEvent TrigSteeringEvent )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} xAODTracking GaudiKernel VxSecVertex TrigInterfacesLib AthContainers GeoPrimitives IRegionSelector xAODBase InDetRecToolInterfaces TrkParameters TrkTrack VxVertex TrigInDetEvent TrigSteeringEvent InDetBeamSpotServiceLib )
 
 # Install files from the package:
 atlas_install_headers( InDetTrigVxSecondary )
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt
index 0bdaa5352c9bebe381d38e00940bf9616e093856..264ac0f79ea32d291009e4b192a95f4a02d7d047 100644
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/CMakeLists.txt
@@ -31,7 +31,7 @@ include_directories(src)
 atlas_add_component( SiTrigSpacePointFormation
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES Identifier GaudiKernel InDetPrepRawData TrigInterfacesLib AthenaBaseComps IRegionSelector EventPrimitives InDetIdentifier InDetReadoutGeometry SiSpacePointFormationLib SiSpacePointToolLib TrkSpacePoint TrigSteeringEvent TrigTimeAlgsLib )
+                     LINK_LIBRARIES Identifier GaudiKernel InDetPrepRawData TrigInterfacesLib AthenaBaseComps IRegionSelector EventPrimitives InDetIdentifier InDetReadoutGeometry SiSpacePointFormationLib SiSpacePointToolLib TrkSpacePoint TrigSteeringEvent TrigTimeAlgsLib InDetTrigToolInterfacesLib )
 
 # Install files from the package:
 atlas_install_headers( SiTrigSpacePointFormation )
diff --git a/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/CMakeLists.txt b/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/CMakeLists.txt
index 1e1f1a8e468dc04459c767cfd7a621c4c0a123d9..a6222582b30031e55f64ecb49876a2ddb4cec1c2 100644
--- a/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/CMakeLists.txt
+++ b/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/CMakeLists.txt
@@ -1,16 +1,11 @@
-################################################################################
-# Package: InDetTrigToolInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( InDetTrigToolInterfaces )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          InnerDetector/InDetRecEvent/InDetPrepRawData )
-
-# Install files from the package:
-atlas_install_headers( InDetTrigToolInterfaces )
-
+# Component(s) in the package:
+atlas_add_library( InDetTrigToolInterfacesLib
+                   InDetTrigToolInterfaces/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS InDetTrigToolInterfaces
+                   LINK_LIBRARIES GaudiKernel Identifier InDetPrepRawData )
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/IDPVM_Test.txt b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/IDPVM_Test.txt
index f5103f439bb6f83c4739d72a8f37b51b0418debf..3abc771c6044abb487e93958f134c4dffc0c2579 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/IDPVM_Test.txt
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/IDPVM_Test.txt
@@ -1,5 +1,5 @@
 ApplicationMgr.OutputLevel = 5;
-ApplicationMgr.DLLs += { "InDetPhysValMonitoring" };
+ApplicationMgr.Dlls += { "InDetPhysValMonitoring" };
 ApplicationMgr.CreateSvc += { "HistogramDefinitionSvc/HistogramDefinitionSvc" };
 HistogramDefinitionSvc.DefinitionFormat = "text/xml";
 HistogramDefinitionSvc.DefinitionSource = "testHDef.xml";
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/XmlEntityInclusionOptions.txt b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/XmlEntityInclusionOptions.txt
index 4a5e2818152e2f7411382426517eded312f04968..ade4a1f065ef7e978404fdd649e2486cc749b816 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/XmlEntityInclusionOptions.txt
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/XmlEntityInclusionOptions.txt
@@ -1,5 +1,5 @@
 ApplicationMgr.OutputLevel = 5;
-ApplicationMgr.DLLs += { "InDetPhysValMonitoring" };
+ApplicationMgr.Dlls += { "InDetPhysValMonitoring" };
 ApplicationMgr.CreateSvc += { "HistogramDefinitionSvc/HistogramDefinitionSvc" };
 HistogramDefinitionSvc.DefinitionFormat = "text/xml";
 HistogramDefinitionSvc.DefinitionSource = "entityMaster.xml";
diff --git a/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref b/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref
index 75485a1b4654c0a3870aa3c9bcb7169a6e01ac65..8b17a777d88bf5ca9aa0c53a977f7f33fa5df7d8 100644
--- a/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref
+++ b/LArCalorimeter/LArCellRec/share/LArBadFebMaskingTool_test.ref
@@ -38,7 +38,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3219 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
diff --git a/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
index 81c9b1e4f9ce758fe9f59dce2d4f314334473dfc..dbe55ea5b6c01fade83b275a0de3012ca95e850a 100644
--- a/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
+++ b/LArCalorimeter/LArCellRec/share/LArCellDeadOTXCorr_test.ref
@@ -36,7 +36,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 4026 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
diff --git a/LArCalorimeter/LArCellRec/share/LArCellTest_jobOptions.py b/LArCalorimeter/LArCellRec/share/LArCellTest_jobOptions.py
index 3d8f6dc8b8bc6ce49160365021d4c132e168f04c..7c99f2a0789035df888a7cd31f1145ecee8d9cfe 100755
--- a/LArCalorimeter/LArCellRec/share/LArCellTest_jobOptions.py
+++ b/LArCalorimeter/LArCellRec/share/LArCellTest_jobOptions.py
@@ -1,5 +1,5 @@
 # jobOptions file for testing LArCell
-# ApplicationMgr.DLLs += {  "LArCellRec" };
+# ApplicationMgr.Dlls += {  "LArCellRec" };
 theApp.TopAlg += [
 "LArCellTest/LArCellTestEM",
 "LArCellTest/LArCellTestHEC",
diff --git a/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_ReadTest_jobOptions.py b/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_ReadTest_jobOptions.py
index 4ce6fcdb61353e4c25246a3545f9ee7443b90823..bede78eae1eab2c2f45ffcd295035e8593745e16 100755
--- a/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_ReadTest_jobOptions.py
+++ b/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_ReadTest_jobOptions.py
@@ -52,11 +52,11 @@ theApp.EvtMax = 200
 #--------------------------------------------------------------
 MessageSvc = Service( "MessageSvc" )
 MessageSvc.OutputLevel = 2
-#ApplicationMgr.DLLs   += { "LArClusterRec" };
-#ApplicationMgr.DLLs   += { "LArCellRec" };
+#ApplicationMgr.Dlls   += { "LArClusterRec" };
+#ApplicationMgr.Dlls   += { "LArCellRec" };
 
-theApp.DLLs += [ "CaloTools" ]
-theApp.DLLs += [ "CaloRec" ]
+theApp.Dlls += [ "CaloTools" ]
+theApp.Dlls += [ "CaloRec" ]
 
 from CaloIdentifier import SUBCALO
 
diff --git a/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_WriteTest_jobOptions.py b/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_WriteTest_jobOptions.py
index cf8b098ee167a8d7f93cb30af92fe30b4d9d9976..faca6bdcb1f7c1f054a28c18be0e370bcccc1893 100755
--- a/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_WriteTest_jobOptions.py
+++ b/LArCalorimeter/LArCnv/LArAthenaPool/share/LArRecAthenaPool_WriteTest_jobOptions.py
@@ -72,7 +72,7 @@ include( "CaloRec/CaloCluster_jobOptions.py" )
 
 from CaloIdentifier import SUBCALO
 
-theApp.DLLs += [ "CaloTools" ]
+theApp.Dlls += [ "CaloTools" ]
 
 include( "CBNT_Athena/CBNT_Athena_jobOptions.py" )
 theApp.TopAlg += [ "CBNT_Athena/CBNT_Calo" ]
diff --git a/LArCalorimeter/LArCnv/LArByteStream/doc/README.txt b/LArCalorimeter/LArCnv/LArByteStream/doc/README.txt
index 243d25d96057849eaa2c6807dcbff35b9e26d1e8..45b66bec012577a5cb6d777c242521eba9d9596a 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/doc/README.txt
+++ b/LArCalorimeter/LArCnv/LArByteStream/doc/README.txt
@@ -277,7 +277,7 @@ ReadLArRaw.HistogramID = 128 ;
 ReadLArRaw.NtupleLocID = "/FILE1/LARG" ;
 
 // specify the LAr Converter and LArROD type and key for output. 
-ApplicationMgr.DLLs   += { "LArByteStream" };
+ApplicationMgr.Dlls   += { "LArByteStream" };
 StreamBS.ItemList +={"2721#*"};
 
 The first part should be replaced by jobOptions that can make your RDOs.
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_AutoCorr_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_AutoCorr_jobOptions.py
index e1c31851b6ce438a79b95f77a8aabe02c72ffc3b..07fa340675a802f640b4aa330a0f3e39be3c7790 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_AutoCorr_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_CTB04_AutoCorr_jobOptions.py
@@ -41,7 +41,7 @@ theApp.HistogramPersistency="HBOOK"
 NTupleSvc = Service( "NTupleSvc" )
 NTupleSvc.Output  = [ "FILE1 DATAFILE='autocorr.ntp' OPT='NEW'"]
 # To output ROOT file
-#ApplicationMgr.DLLs += { "RootHistCnv" };
+#ApplicationMgr.Dlls += { "RootHistCnv" };
 #HistogramPersistencySvc.OutputFile  = "";
 #ApplicationMgr.HistogramPersistency="ROOT";
 #NTupleSvc.Output  = { "FILE1 DATAFILE='autocorr.root' OPT='NEW'"};
diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt
index b377202b33f3260ebc5c7a8f2e2878099767fc04..2fb0bc94a89b068a8495cd4d1b73e4b3cc90e2f5 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt
@@ -1,20 +1,17 @@
-################################################################################
-# Package: LArGeoAlgsNV
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoAlgsNV )
 
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_component( LArGeoAlgsNV
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} ${EIGEN_LIBRARIES} GeoModelUtilities LArReadoutGeometry SGTools StoreGateLib SGtests DetDescrConditions GaudiKernel LArGeoBarrel LArGeoCode LArGeoEndcap LArGeoRAL LArGeoTBBarrel LArHV RDBAccessSvcLib )
+                     INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoModelUtilities LArReadoutGeometry SGTools StoreGateLib SGtests DetDescrConditions GaudiKernel LArGeoBarrel LArGeoCode LArGeoEndcap LArGeoRAL LArGeoTBBarrel LArHV RDBAccessSvcLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt
index 605a22567505769caa9c7712d842a245c302c0d5..428c469718b123ce4f218facf4dc9399b46d3871 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt
@@ -1,19 +1,16 @@
-################################################################################
-# Package: LArGeoBarrel
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoBarrel )
 
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( LArGeoBarrel
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoBarrel
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} LArGeoCode StoreGateLib SGtests
+                   INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} LArGeoCode StoreGateLib SGtests
                    PRIVATE_LINK_LIBRARIES GeoModelUtilities GaudiKernel LArReadoutGeometry RDBAccessSvcLib )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt
index 9c90099e7495b30fa22cd96754cf7ad5947e1bf6..2d15b97aa584c913811fb9f6fa0e5cc3c978b217 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: LArGeoCode
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoCode )
diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt
index bd34b62ceef547769063c91133965ced5646f7ae..990847ecdbbe6e28d5690f955e56e401507fff8d 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt
@@ -1,19 +1,16 @@
-################################################################################
-# Package: LArGeoEndcap
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoEndcap )
 
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( LArGeoEndcap
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoEndcap
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} LArGeoFcal LArGeoHec StoreGateLib SGtests CaloDetDescrLib
+                   INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} LArGeoFcal LArGeoHec StoreGateLib SGtests CaloDetDescrLib
                    PRIVATE_LINK_LIBRARIES CaloIdentifier GeoModelUtilities GeoSpecialShapes GaudiKernel LArGeoCode LArGeoMiniFcal RDBAccessSvcLib )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt
index c201654de36acc019add99b9e3133e535d1d564c..65c2869089569a99107a4f2693ec0d0b469f6602 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt
@@ -1,12 +1,9 @@
-################################################################################
-# Package: LArGeoFcal
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoFcal )
 
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake
@@ -16,7 +13,6 @@ atlas_add_library( LArGeoFcal
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoFcal
                    INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                    LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoModelUtilities GaudiKernel LArReadoutGeometry RDBAccessSvcLib  )
+                   PRIVATE_LINK_LIBRARIES GeoModelUtilities GaudiKernel LArReadoutGeometry RDBAccessSvcLib  )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt
index b03d70eb2a8142ceb13f66b896adbe1f384f5553..9d95a52b2f34574008d9ce79146136e84993332b 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt
@@ -1,33 +1,14 @@
-################################################################################
-# Package: LArGeoH62002Algs
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoH62002Algs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          PRIVATE
-                          Control/StoreGate
-                          Database/RDBAccessSvc
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          GaudiKernel
-                          LArCalorimeter/LArG4/LArG4RunControl
-                          LArCalorimeter/LArGeoModel/LArGeoCode
-                          LArCalorimeter/LArGeoModel/LArGeoEndcap
-                          LArCalorimeter/LArGeoModel/LArGeoH6Cryostats )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_component( LArGeoH62002Algs
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats RDBAccessSvcLib )
+                     PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                     PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats RDBAccessSvcLib )
diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt
index 2b6c64ca13cbe3b8bbf359028ad4182e92a95ce8..d8185218197e6d032fcb208bb29938cc9a1fc5bb 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt
@@ -1,32 +1,14 @@
-################################################################################
-# Package: LArGeoH62003Algs
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoH62003Algs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          PRIVATE
-                          Control/StoreGate
-                          Database/RDBAccessSvc
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          GaudiKernel
-                          LArCalorimeter/LArG4/LArG4RunControl
-                          LArCalorimeter/LArGeoModel/LArGeoFcal
-                          LArCalorimeter/LArGeoModel/LArGeoH6Cryostats )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_component( LArGeoH62003Algs
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoFcal LArGeoH6Cryostats RDBAccessSvcLib )
+                     PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                     PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoFcal LArGeoH6Cryostats RDBAccessSvcLib )
diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt
index 2455af7cbcf276c49f5a94ef2777321049143a54..bef244ad12b4a48ba7e2f51a13f6bbd8655d9911 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt
@@ -1,39 +1,17 @@
-################################################################################
-# Package: LArGeoH62004Algs
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoH62004Algs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Control/AthContainers
-                          Database/RDBAccessSvc
-                          GaudiKernel
-                          LArCalorimeter/LArG4/LArG4RunControl
-                          LArCalorimeter/LArGeoModel/LArGeoCode
-                          LArCalorimeter/LArGeoModel/LArGeoEndcap
-                          LArCalorimeter/LArGeoModel/LArGeoH6Cryostats
-                          LArCalorimeter/LArGeoModel/LArGeoTBEC )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_component( LArGeoH62004Algs
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests GeoModelUtilities LArReadoutGeometry CaloDetDescrLib AthContainers GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats LArGeoTBECLib RDBAccessSvcLib )
+		     PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                     PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests GeoModelUtilities LArReadoutGeometry CaloDetDescrLib AthContainers GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats LArGeoTBECLib RDBAccessSvcLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt
index 7c2b9517bb811920cc4d08db3bf46969e0c4fecf..2003ba0a87a49c99432038fe7bf5cba96089f1ab 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt
@@ -1,20 +1,9 @@
-################################################################################
-# Package: LArGeoH6Cryostats
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoH6Cryostats )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/StoreGate
-                          Database/RDBAccessSvc
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          GaudiKernel )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( Eigen )
 find_package( GeoModelCore )
 
@@ -22,7 +11,7 @@ find_package( GeoModelCore )
 atlas_add_library( LArGeoH6Cryostats
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoH6Cryostats
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel GeoModelInterfaces RDBAccessSvcLib )
+                   PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests
+                   PRIVATE_LINK_LIBRARIES GaudiKernel GeoModelInterfaces RDBAccessSvcLib )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt
index 998da7a407b6c7c2d6af913d5af6f685b30f0456..a00736eb75618b3d7ce2f9c3b8ee0093dd884359 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt
@@ -1,19 +1,16 @@
-################################################################################
-# Package: LArGeoHec
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoHec )
 
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( LArGeoHec
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoHec
-                   PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
                    LINK_LIBRARIES StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel RDBAccessSvcLib )
+                   PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel RDBAccessSvcLib )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoRAL/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoRAL/CMakeLists.txt
index d0be64f66917a982fa67b4bc352a07c82f9ad17e..c31ec831a811dd3265767fa3cd43ad81bb5dd30d 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoRAL/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoRAL/CMakeLists.txt
@@ -1,30 +1,18 @@
-################################################################################
-# Package: LArGeoRAL
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoRAL )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          LArCalorimeter/LArGeoModel/LArGeoCode
-                          PRIVATE
-                          Control/StoreGate
-                          Database/RDBAccessSvc
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          GaudiKernel )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost COMPONENTS system )
 find_package( CLHEP )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 
 # Component(s) in the package:
 atlas_add_library( LArGeoRAL
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoRAL
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES LArGeoCode StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel RDBAccessSvcLib GeoModelInterfaces )
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel RDBAccessSvcLib GeoModelInterfaces )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt
index ba856353119d54e428eafcb728f69825e9d61974..28833dfb5ff13cfb5370dea49d2f3d3ffeda3972 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt
@@ -1,27 +1,16 @@
-################################################################################
-# Package: LArGeoTBBarrel
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoTBBarrel )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          GaudiKernel
-                          LArCalorimeter/LArGeoModel/LArGeoBarrel )
-
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( LArGeoTBBarrel
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoTBBarrel
-                   PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
                    LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoModelUtilities GaudiKernel LArGeoBarrel )
+                   PRIVATE_LINK_LIBRARIES GeoModelUtilities GaudiKernel LArGeoBarrel )
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt
index a9b59c86669fa5e8430d919d951387a73e982e58..f581a4b4f94d8c92bbc72f6594d3c4c8312ada0c 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt
@@ -1,41 +1,20 @@
-################################################################################
-# Package: LArGeoTBEC
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArGeoTBEC )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          PRIVATE
-                          Control/StoreGate
-                          Database/RDBAccessSvc
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          DetectorDescription/GeoModel/GeoSpecialShapes
-                          GaudiKernel
-                          LArCalorimeter/LArG4/LArG4RunControl
-                          LArCalorimeter/LArGeoModel/LArGeoCode
-                          LArCalorimeter/LArGeoModel/LArGeoEndcap
-                          LArCalorimeter/LArGeoModel/LArGeoRAL )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( LArGeoTBECLib
                    src/*.cxx
                    PUBLIC_HEADERS LArGeoTBEC
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
                    LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoSpecialShapes GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoRAL RDBAccessSvcLib )
+                   PRIVATE_LINK_LIBRARIES GeoSpecialShapes GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoRAL RDBAccessSvcLib )
 
 atlas_add_component( LArGeoTBEC
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                      LINK_LIBRARIES LArGeoTBECLib )
 
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt
index 65e1a56fc48f225ae3c3bcedc114cc584e0db74b..cf7e9856a6fc2db628bd78c85d2699da2bf2a9bf 100644
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt
@@ -1,23 +1,19 @@
-################################################################################
-# Package: LArReadoutGeometry
-################################################################################
+#Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArReadoutGeometry )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost COMPONENTS system )
 find_package( CLHEP )
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( LArReadoutGeometry
                    src/*.cxx
                    PUBLIC_HEADERS LArReadoutGeometry
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoPrimitives Identifier LArHV StoreGateLib SGtests
+                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoPrimitives Identifier LArHV StoreGateLib SGtests
                    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel RDBAccessSvcLib GeoModelInterfaces )
 
diff --git a/LArCalorimeter/LArMonitoring/python/LArCosmicsMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArCosmicsMonAlg.py
new file mode 100644
index 0000000000000000000000000000000000000000..5e52b031bf4c85a35b85b0aeb54b5615c7f0bd30
--- /dev/null
+++ b/LArCalorimeter/LArMonitoring/python/LArCosmicsMonAlg.py
@@ -0,0 +1,141 @@
+
+#
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+
+
+def LArCosmicsMonConfigOld(inputFlags):
+    from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelperOld
+    from LArMonitoring.LArMonitoringConf import LArCosmicsMonAlg
+
+    helper = AthMonitorCfgHelperOld(inputFlags, 'LArCosmicsMonAlgOldCfg')
+    LArCosmicsMonConfigCore(helper, LArCosmicsMonAlg,inputFlags)
+    return helper.result()
+
+def LArCosmicsMonConfig(inputFlags):
+    '''Function to configures some algorithms in the monitoring system.'''
+
+    # The following class will make a sequence, configure algorithms, and link                                                                   
+    # them to GenericMonitoringTools                                                                                                                                 
+    
+    from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelper
+    helper = AthMonitorCfgHelper(inputFlags,'LArCosmicsMonAlgCfg')
+
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    LArCosmicsMonConfigCore(helper, CompFactory.LArCosmicsMonAlg,inputFlags)
+
+    return helper.result()
+
+
+def LArCosmicsMonConfigCore(helper, algoinstance,inputFlags):
+
+
+    from LArMonitoring.GlobalVariables import lArDQGlobals
+
+    larCosmicsMonAlg = helper.addAlgorithm(algoinstance,'larCosmicsMonAlg')
+
+    larCosmicsMonAlg.CosmicsMonGroupName = 'LarCosmicsMonGroup'
+    larCosmicsMonAlg.MuonADCthreshold_EM_barrel = 30
+    larCosmicsMonAlg.MuonADCthreshold_EM_endcap = 40
+    larCosmicsMonAlg.MuonADCthreshold_HEC = 40
+    larCosmicsMonAlg.MuonADCthreshold_FCAL = 40
+
+    # adding BadChan masker private tool
+    from AthenaCommon.Configurable import Configurable
+    if Configurable.configurableRun3Behavior :
+        from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+        cfg=ComponentAccumulator()
+
+        from LArBadChannelTool.LArBadChannelConfig import LArBadChannelMaskerCfg
+        acc= LArBadChannelMaskerCfg(inputFlags,problemsToMask=["highNoiseHG","highNoiseMG","highNoiseLG","deadReadout","deadPhys"],ToolName="BadLArRawChannelMask")
+        larCosmicsMonAlg.LArBadChannelMask=acc.popPrivateTools()
+        cfg.merge(acc)
+    else :
+        from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker
+        theLArBadChannelsMasker=LArBadChannelMasker("BadLArRawChannelMask")
+        theLArBadChannelsMasker.DoMasking=True
+        theLArBadChannelsMasker.ProblemsToMask=["deadReadout","deadPhys","short","almostDead","highNoiseHG","highNoiseMG","highNoiseLG","sporadicBurstNoise"]
+        larCosmicsMonAlg.LArBadChannelMask=theLArBadChannelsMasker
+        pass
+
+    #mon group 
+    cosmicMonGroup = helper.addGroup(
+        larCosmicsMonAlg,
+        larCosmicsMonAlg.CosmicsMonGroupName,
+        '/LAr/',
+        'run'
+    )
+
+    cosmic_path="CosmicsNewAlg/"
+
+    EM_bins=lArDQGlobals.Cell_Variables["etaRange"]["EMEC"]["C"]["2"]+lArDQGlobals.Cell_Variables["etaRange"]["EMB"]["C"]["2"]+lArDQGlobals.Cell_Variables["etaRange"]["EMB"]["A"]["2"]+lArDQGlobals.Cell_Variables["etaRange"]["EMEC"]["A"]["2"]
+    cosmicMonGroup.defineHistogram('mon_eta_EM,mon_phi;Muon2DHitsECAL',
+                                   type='TH2F', 
+                                   path=cosmic_path,
+                                   title='Cosmics Seeds - Digit Max > '+str(int(larCosmicsMonAlg.MuonADCthreshold_EM_barrel))+'/'+str(int(larCosmicsMonAlg.MuonADCthreshold_EM_endcap))+' [ADC] in S2 Barrel/Endcap - EM;#eta cell;#phi cell;Number of Hits',
+                                   xbins=EM_bins,
+                                   ybins=lArDQGlobals.Cell_Variables["phiRange"]["EMB"]["A"]["2"])
+
+    HEC_bins=lArDQGlobals.Cell_Variables["etaRange"]["HEC"]["C"]["1"]+lArDQGlobals.Cell_Variables["etaRange"]["HEC"]["A"]["1"]
+    cosmicMonGroup.defineHistogram('mon_eta_HEC,mon_phi;Muon2DHitsHCAL',
+                                   type='TH2F', 
+                                   path=cosmic_path,
+                                   title='Cosmics Seeds - Digit Max > '+str(int(larCosmicsMonAlg.MuonADCthreshold_HEC))+' [ADC] in S1 HEC;#eta cell;#phi cell;Number of Hits',
+                                   xbins=HEC_bins,
+                                   ybins=lArDQGlobals.Cell_Variables["phiRange"]["HEC"]["A"]["1"])
+
+    FCal_bins=lArDQGlobals.Cell_Variables["etaRange"]["FCal"]["C"]["2"]+lArDQGlobals.Cell_Variables["etaRange"]["FCal"]["A"]["2"]
+    cosmicMonGroup.defineHistogram('mon_eta_FCal,mon_phi;Muon2DHitsFCAL',
+                                   type='TH2F', 
+                                   path=cosmic_path,
+                                   title='Cosmics Seeds - Digit Max > '+str(int(larCosmicsMonAlg.MuonADCthreshold_FCAL))+' [ADC] in S2 FCal;#eta cell;#phi cell;Number of Hits',
+                                   xbins=FCal_bins,
+                                   ybins=lArDQGlobals.Cell_Variables["phiRange"]["FCal"]["A"]["2"])
+
+
+
+
+if __name__=='__main__':
+
+   from AthenaConfiguration.AllConfigFlags import ConfigFlags
+   from AthenaCommon.Logging import log
+   from AthenaCommon.Constants import WARNING
+   from AthenaCommon.Configurable import Configurable
+   Configurable.configurableRun3Behavior=1
+   log.setLevel(WARNING)
+
+
+   from LArMonitoring.LArMonConfigFlags import createLArMonConfigFlags
+   createLArMonConfigFlags()
+
+   from AthenaConfiguration.TestDefaults import defaultTestFiles
+   ConfigFlags.Input.Files = defaultTestFiles.RAW
+
+   ConfigFlags.Output.HISTFileName = 'LArCosmicsMonOutput.root'
+   ConfigFlags.DQ.enableLumiAccess = False
+   ConfigFlags.DQ.useTrigger = False
+   ConfigFlags.Beam.Type = 'collisions'
+   ConfigFlags.lock()
+
+   from CaloRec.CaloRecoConfig import CaloRecoCfg
+   cfg=CaloRecoCfg(ConfigFlags)
+
+   from LArCellRec.LArNoisyROSummaryConfig import LArNoisyROSummaryCfg
+   cfg.merge(LArNoisyROSummaryCfg(ConfigFlags))
+
+   cosm_acc = LArCosmicsMonConfig(ConfigFlags)
+   cfg.merge(cosm_acc)
+
+   ConfigFlags.dump()
+   f=open("LArCosmicsMon.pkl","wb")
+   cfg.store(f)
+   f.close()
+
+#   cfg.run(10,OutputLevel=WARNING)
+
+
+
+
+
+
+
diff --git a/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py b/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py
index bea4e71c7c53bba75b86aa68d6ba26ea0f743867..0daa56fa714c3cded466e9fa684f9aeab9b82ed6 100644
--- a/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py
+++ b/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py
@@ -37,3 +37,6 @@ if 'ESD' not in DQMonFlags.monManEnvironment() and globalflags.DataSource == 'da
     from LArMonitoring.LArCoverageAlg import LArCoverageConfigOld
     topSequence +=LArCoverageConfigOld(DQMonFlags)
 
+    from LArMonitoring.LArCosmicsMonAlg import LArCosmicsMonConfigOld
+    topSequence +=LArCosmicsMonConfigOld(DQMonFlags)
+
diff --git a/LArCalorimeter/LArMonitoring/src/LArCosmicsMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArCosmicsMonAlg.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..8b7d4057f69eff0fccf5f2245240041f971c356f
--- /dev/null
+++ b/LArCalorimeter/LArMonitoring/src/LArCosmicsMonAlg.cxx
@@ -0,0 +1,253 @@
+/*
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     LArCosmicsMonAlg.cxx
+// PACKAGE:  LArMonitoring
+//
+// AUTHOR:   Margherita Spalla (Migrated from original tool by Jessica Leveque)
+//
+// Class for monitoring : Detector Timing
+//                        Cosmics Signal Reconstruction       
+//                        Development towards LAr Data Quality Flags
+//
+// ********************************************************************
+
+#include "LArCosmicsMonAlg.h"
+
+#include "Identifier/IdentifierHash.h"
+
+#include <algorithm>
+
+
+
+/*---------------------------------------------------------*/
+LArCosmicsMonAlg::LArCosmicsMonAlg(const std::string& name, ISvcLocator* pSvcLocator )
+  : AthMonitorAlgorithm(name, pSvcLocator),
+    m_LArOnlineIDHelper(0),
+    m_LArEM_IDHelper(0),
+    m_LArHEC_IDHelper(0),
+    m_LArFCAL_IDHelper(0),
+    m_badChannelMask("BadLArRawChannelMask",this)
+{
+  declareProperty("LArBadChannelMask",m_badChannelMask); 
+}
+
+/*---------------------------------------------------------*/
+LArCosmicsMonAlg::~LArCosmicsMonAlg()
+{
+}
+
+/*---------------------------------------------------------*/
+StatusCode 
+LArCosmicsMonAlg::initialize()
+{
+  ATH_MSG_INFO( "Initialize LArCosmicsMonAlg" );
+
+  
+    /** Get LAr Online Id Helper*/
+  if ( detStore()->retrieve( m_LArOnlineIDHelper, "LArOnlineID" ).isSuccess() ) { 
+    ATH_MSG_DEBUG("connected non-tool: LArOnlineID" );
+  } else {    
+    ATH_MSG_FATAL( "unable to connect non-tool: LArOnlineID" );
+    return StatusCode::FAILURE;    
+  }
+  
+  
+  // Retrieve ID helpers
+  if ( detStore()->retrieve( m_LArEM_IDHelper, "LArEM_ID" ).isSuccess() ) ATH_MSG_DEBUG("connected non-tool: LArEM_ID" );
+  else {  
+    ATH_MSG_FATAL( "unable to connect non-tool: LArEM_ID" );
+    return StatusCode::FAILURE;
+  }
+
+  if ( detStore()->retrieve( m_LArHEC_IDHelper, "LArHEC_ID" ).isSuccess() ) ATH_MSG_DEBUG("connected non-tool: LArHEC_ID" );
+  else {  
+    ATH_MSG_FATAL( "unable to connect non-tool: LArHEC_ID" );
+    return StatusCode::FAILURE;
+  }
+
+  if ( detStore()->retrieve( m_LArFCAL_IDHelper, "LArFCAL_ID" ).isSuccess() ) ATH_MSG_DEBUG("connected non-tool: LArFCAL_ID" );
+  else {  
+    ATH_MSG_FATAL( "unable to connect non-tool: LArFCAL_ID" );
+    return StatusCode::FAILURE;
+  }
+ 
+  ATH_CHECK(m_cablingKey.initialize());
+  ATH_CHECK(m_larPedestalKey.initialize());
+  ATH_CHECK(m_LArDigitContainerKey.initialize());
+
+  /** Get bad-channel mask */
+  StatusCode sc=m_badChannelMask.retrieve();
+  if (sc.isFailure()) {
+    ATH_MSG_ERROR( "Could not retrieve BadChannelMask" << m_badChannelMask);
+    return StatusCode::FAILURE;
+  }
+
+ return AthMonitorAlgorithm::initialize();  
+}
+
+/*---------------------------------------------------------*/
+StatusCode 
+LArCosmicsMonAlg::fillHistograms(const EventContext& ctx)  const {
+  ATH_MSG_DEBUG( "in fillHists()" );
+  
+
+  //monitored variables
+  auto mon_eta_EM = Monitored::Scalar<float>("mon_eta_EM",0);
+  auto mon_eta_HEC = Monitored::Scalar<float>("mon_eta_HEC",0);
+  auto mon_eta_FCal = Monitored::Scalar<float>("mon_eta_FCal",0);
+  auto mon_phi = Monitored::Scalar<float>("mon_phi",0);
+
+
+
+  /////////////////////////////////
+  // Work with the LArDigits  //
+  /////////////////////////////////
+
+  //retrieve pedestal
+  SG::ReadCondHandle<ILArPedestal> pedestalHdl{m_larPedestalKey,ctx};
+  const ILArPedestal* pedestals=*pedestalHdl;
+
+  //retrieve cabling
+  SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey,ctx};
+  const LArOnOffIdMapping* cabling=*cablingHdl;
+
+  /** retrieve det. description manager */
+  const CaloDetDescrManager* ddman = nullptr;
+  ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
+
+  //get digit container
+  SG::ReadHandle<LArDigitContainer> pLArDigitContainer{m_LArDigitContainerKey,ctx};
+  
+  /** Define iterators to loop over Digits containers*/
+  LArDigitContainer::const_iterator itDig = pLArDigitContainer->begin(); 
+  LArDigitContainer::const_iterator itDig_e= pLArDigitContainer->end(); 
+  const LArDigit* pLArDigit;
+
+
+  for ( ; itDig!=itDig_e;++itDig) {
+    pLArDigit = *itDig;
+    HWIdentifier id = pLArDigit->hardwareID();
+    Identifier offlineID = cabling->cnvToIdentifier(id);
+    
+    // Skip disconnected channels
+    if(!cabling->isOnlineConnected(id)) continue;
+    
+    // Get Physical Coordinates     
+    float eta=0;
+    float phi=0;
+    const CaloDetDescrElement* caloDetElement = ddman->get_element(offlineID);
+    if(caloDetElement == 0 ){
+      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates" );
+      continue; 
+    }else{
+      eta = caloDetElement->eta_raw();
+      phi = caloDetElement->phi_raw();
+    }
+
+    // Fix phi range in HEC
+    if (m_LArOnlineIDHelper->isHECchannel(id)) phi = CaloPhiRange::fix(phi);
+    
+    // Retrieve pedestals 
+    CaloGain::CaloGain gain = pLArDigit->gain();
+    float pedestal = pedestals->pedestal(id,gain);
+    
+    // Skip channel with no pedestal ref in db
+    if(pedestal <= (1.0+LArElecCalib::ERRORCODE)) continue;      
+    
+    // Remove problematic channels
+    if (m_badChannelMask->cellShouldBeMasked(id)) continue;
+    
+    //
+    // HEC 
+    //
+    
+    if(m_LArOnlineIDHelper->isHECchannel(id)){
+      
+      int sampling = m_LArHEC_IDHelper->sampling(offlineID);
+      const std::vector < short >& samples = pLArDigit->samples();
+      
+      // Look for Muons Candidates in sampling 1
+      if(sampling != 1) continue;
+      
+      // Get highest energy sample
+      float sample_max = * std::max_element(samples.begin(), samples.end());
+      sample_max = sample_max-pedestal;
+      
+      // If energy above threshold, we found a muon in the HEC
+      if((sample_max) > m_muonADCthreshold_HEC){ 
+	mon_eta_HEC=eta;
+	mon_phi=phi;
+	fill(m_CosmicsMonGroupName,mon_eta_HEC,mon_phi);
+      }
+      
+    } // End HEC
+    
+    
+    //
+    // FCAL - Fill coverage / conditions / pedestal maps
+    //
+    
+    if(m_LArOnlineIDHelper->isFCALchannel(id)){
+      
+      int sampling = m_LArFCAL_IDHelper->module(offlineID);;
+      const std::vector < short > samples = pLArDigit->samples();
+      
+      // Look for Muons Candidates in sampling 2
+      if(sampling != 2) continue;
+      
+      // Get highest energy sample 
+      float sample_max = * std::max_element(samples.begin(), samples.end());
+      sample_max = sample_max-pedestal;
+      
+      // If energy above threshold, we found a muon in the FCAL
+      if( (sample_max) > m_muonADCthreshold_FCAL){
+	mon_eta_FCal=eta;
+	mon_phi=phi;
+	fill(m_CosmicsMonGroupName,mon_eta_FCal,mon_phi);	
+      }
+      
+    }//end FCAL 
+    
+    //
+    // ECAL
+    //
+    if(m_LArOnlineIDHelper->isEMECchannel(id) || m_LArOnlineIDHelper->isEMBchannel(id) ){
+      
+      int sampling = m_LArEM_IDHelper->sampling(offlineID);
+      const std::vector < short > samples = pLArDigit->samples();
+      
+      // Look for Muons Candidates in second sampling
+      if(sampling != 2) continue;
+      
+      // Get highest energy sample
+      float sample_max = * std::max_element(samples.begin(), samples.end());
+      sample_max = sample_max-pedestal;
+      
+      // If energy above threshold, we found a muon in the barrel
+      if( m_LArEM_IDHelper->is_em_barrel(offlineID) && (sample_max) > m_muonADCthreshold_EM_barrel ){
+	mon_eta_EM=eta;
+	mon_phi=phi;
+	fill(m_CosmicsMonGroupName,mon_eta_EM,mon_phi);
+      }
+      
+      // If energy above threshold, we found a muon in the endcap
+      if(m_LArEM_IDHelper->is_em_endcap(offlineID) && (sample_max) > m_muonADCthreshold_EM_endcap ){
+	mon_eta_EM=eta;
+	mon_phi=phi;
+	fill(m_CosmicsMonGroupName,mon_eta_EM,mon_phi);
+      }
+      
+    } // end EM
+    
+  }// end of LArDigits loop  
+  
+  return StatusCode::SUCCESS;
+}
+
+
+
+
diff --git a/LArCalorimeter/LArMonitoring/src/LArCosmicsMonAlg.h b/LArCalorimeter/LArMonitoring/src/LArCosmicsMonAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe7a1adcf35d1537ae1897bbac613db8dbe20bcf
--- /dev/null
+++ b/LArCalorimeter/LArMonitoring/src/LArCosmicsMonAlg.h
@@ -0,0 +1,89 @@
+/*
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @class LArCosmicsMonAlg
+ * @author Margherita Spalla <margherita.spalla@cern.ch> (migrated from LArMonTools by Jessica Leveque <jleveque@in2p3.fr>)
+ *
+ */
+
+#ifndef LARMONITORING_LARCOSMICSMONALG_H
+#define LARMONITORING_LARCOSMICSMONALG_H
+
+#include "AthenaMonitoring/AthMonitorAlgorithm.h"
+#include "AthenaMonitoringKernel/Monitored.h"
+
+#include "Identifier/HWIdentifier.h"
+#include "CaloDetDescr/CaloDetDescrManager.h"
+#include "CaloDetDescr/CaloDetDescriptor.h"
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "CaloGeoHelpers/CaloPhiRange.h"
+#include "CaloIdentifier/CaloGain.h"
+#include "CaloIdentifier/CaloCell_ID.h"
+#include "CaloIdentifier/CaloIdManager.h"
+#include "LArElecCalib/ILArPedestal.h"
+#include "LArRawEvent/LArDigit.h"
+#include "LArRawEvent/LArDigitContainer.h"
+#include "LArRawEvent/LArRawChannel.h"
+#include "LArRawEvent/LArRawChannelContainer.h"
+#include "LArCabling/LArCablingLegacyService.h"
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArRecConditions/ILArBadChannelMasker.h"
+#include "LArCabling/LArOnOffIdMapping.h"
+
+class LArEM_ID;
+class LArOnlineID;
+
+
+
+
+class LArCosmicsMonAlg: public AthMonitorAlgorithm
+{
+ public:
+  LArCosmicsMonAlg( const std::string& name, ISvcLocator* pSvcLocator );
+  
+  /** @brief Default destructor */
+  virtual ~LArCosmicsMonAlg();
+
+  /** @brief Overwrite dummy method from AlgTool */
+  StatusCode initialize() override;
+
+
+  /** Called each event */
+  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
+
+
+ private:
+
+  // services
+  const LArOnlineID* m_LArOnlineIDHelper;
+  const LArEM_ID*    m_LArEM_IDHelper;
+  const LArHEC_ID*   m_LArHEC_IDHelper;
+  const LArFCAL_ID*  m_LArFCAL_IDHelper;
+
+
+  /** Handle to digits */
+  SG::ReadHandleKey<LArDigitContainer> m_LArDigitContainerKey{this,"LArDigitContainerKey","FREE","SG key of LArDigitContainer read from Bytestream"};
+
+  /** Handle to pedestal */
+  SG::ReadCondHandleKey<ILArPedestal> m_larPedestalKey{this,"LArPedestalKey","LArPedestal","SG key of LArPedestal CDO"};
+
+  //** Handle to cabling */
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingKey", "LArOnOffIdMap","Cabling key"};
+
+  /** Handle to bad-channel mask */
+  ToolHandle<ILArBadChannelMasker> m_badChannelMask;
+
+  //properties
+  Gaudi::Property<float>         m_muonADCthreshold_EM_barrel  {this, "MuonADCthreshold_EM_barrel", 30};
+  Gaudi::Property<float>         m_muonADCthreshold_EM_endcap  {this, "MuonADCthreshold_EM_endcap", 40};
+  Gaudi::Property<float>         m_muonADCthreshold_HEC  {this, "MuonADCthreshold_HEC", 40};
+  Gaudi::Property<float>         m_muonADCthreshold_FCAL  {this, "MuonADCthreshold_FCAL", 40};
+
+  Gaudi::Property<std::string> m_CosmicsMonGroupName {this,"CosmicsMonGroupName","CosmicsMon"};
+  Gaudi::Property< std::vector<std::string> > m_SubDet {this, "SubDet", {"EM","HEC","FCal"}};
+
+};
+
+#endif
diff --git a/LArCalorimeter/LArMonitoring/src/components/LArMonitoring_entries.cxx b/LArCalorimeter/LArMonitoring/src/components/LArMonitoring_entries.cxx
index b1bdf425cfb40043d908fd67b22f250ef6a8f2f4..e4c3c673647f45df3ad1d998dfb71b383c11d358 100755
--- a/LArCalorimeter/LArMonitoring/src/components/LArMonitoring_entries.cxx
+++ b/LArCalorimeter/LArMonitoring/src/components/LArMonitoring_entries.cxx
@@ -6,6 +6,8 @@
 #include "../LArCoverageAlg.h"
 #include "../LArNoisyROMonAlg.h"
 #include "../LArHVCorrectionMonAlg.h"
+#include "../LArCosmicsMonAlg.h"
+
 
 DECLARE_COMPONENT(LArCollisionTimeMonAlg)
 DECLARE_COMPONENT(LArAffectedRegionsAlg)
@@ -15,4 +17,4 @@ DECLARE_COMPONENT(LArDigitMonAlg)
 DECLARE_COMPONENT(LArCoverageAlg)
 DECLARE_COMPONENT(LArNoisyROMonAlg)
 DECLARE_COMPONENT(LArHVCorrectionMonAlg)
-
+DECLARE_COMPONENT(LArCosmicsMonAlg)
diff --git a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
index 30a21e1ce13fa463d010797b4abbc22c95c221cb..21955d2c176f78cd4efd179292c5a354995bb8e2 100644
--- a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
+++ b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
@@ -31,7 +31,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3542 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
diff --git a/LArCalorimeter/LArSim/LArSim/LArHitMaker.h b/LArCalorimeter/LArSim/LArSim/LArHitMaker.h
index 8ab973a468d16edb6c5216ec4e606bf3ebee73f7..0f7e6b6fed1bd4d34780a17540c78fa180104672 100755
--- a/LArCalorimeter/LArSim/LArSim/LArHitMaker.h
+++ b/LArCalorimeter/LArSim/LArSim/LArHitMaker.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
 */
 
 /* Generated by Together */
@@ -17,7 +17,7 @@
 
 #include <string>
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthLegacySequence.h"
 
 /**
  * Specialized ATHENA algorithm which can be used to store <br>
@@ -33,7 +33,7 @@
  * @version 00-00-05
  *
  */
-class LArHitMaker : public AthAlgorithm {
+class LArHitMaker : public AthLegacySequence {
 
 public:
 
diff --git a/LArCalorimeter/LArSim/LArSim/LArHitReader.h b/LArCalorimeter/LArSim/LArSim/LArHitReader.h
index 3a3c6cfeafda2a3534b5b8dade44f8dc2196ef7f..6f45a924ff2b2ce57ac74455d4d027583675ae29 100755
--- a/LArCalorimeter/LArSim/LArSim/LArHitReader.h
+++ b/LArCalorimeter/LArSim/LArSim/LArHitReader.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
 */
 
 /* Generated by Together */
@@ -17,31 +17,24 @@
 
 #include <string>
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "LArSimEvent/LArHitContainer.h"
+#include "StoreGate/ReadHandleKey.h"
 
-class LArHitReader : public AthAlgorithm {
+class LArHitReader : public AthReentrantAlgorithm {
 
 public:
-
-    /** usual ATHENA constructor of an algorithm*/
-    LArHitReader(const std::string & name, ISvcLocator * pSvcLocator);
-
-    /** Destructor */
-    virtual ~LArHitReader() { }
-
+    using AthReentrantAlgorithm::AthReentrantAlgorithm;
     /** Initialize method , executed once at the beginning <br> of the job execution by the control framework */
-    virtual StatusCode initialize();
+    virtual StatusCode initialize() override;
 
     /** execute() method executed for each event <br> by the LArHitMaker instance which owns <br> this producer */
-    virtual StatusCode execute();
-
-    /** finalize() method executed at the end <br> of the job execution by the control framework */
-    virtual StatusCode finalize();
+    virtual StatusCode execute (const EventContext& ctx)  const override;
 
 private:
-
-
+    SG::ReadHandleKey<LArHitContainer> m_hitKey
+    { this, "HitKey", "LArHitFake", "" };
+    
 };
 #endif    //LARHITPRODUCER_H
 
diff --git a/LArCalorimeter/LArSim/share/LArSim_Fake_jobOptions.txt b/LArCalorimeter/LArSim/share/LArSim_Fake_jobOptions.txt
index c6feed0ab3fabe2ed26693d0fc881d07fa5b8d0b..a479eaa66b95b9889ef05b407ecb5fbffdd437c2 100755
--- a/LArCalorimeter/LArSim/share/LArSim_Fake_jobOptions.txt
+++ b/LArCalorimeter/LArSim/share/LArSim_Fake_jobOptions.txt
@@ -13,7 +13,7 @@
 // Private Application Configuration options
 //--------------------------------------------------------------
 
-ApplicationMgr.DLLs += {"LArSim"} ;
+ApplicationMgr.Dlls += {"LArSim"} ;
 
 
 ApplicationMgr.TopAlg += {"LArHitMaker/hitmaker1"} ;
diff --git a/LArCalorimeter/LArSim/src/LArFakeHitProducer.cxx b/LArCalorimeter/LArSim/src/LArFakeHitProducer.cxx
index 1bfe59dbea931e4e4000cf0f985c6eafd0f1d83d..7ec4b8eec737231121dbb9189c5b1a9f0f715eed 100755
--- a/LArCalorimeter/LArSim/src/LArFakeHitProducer.cxx
+++ b/LArCalorimeter/LArSim/src/LArFakeHitProducer.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 "LArSim/LArFakeHitProducer.h"
@@ -12,8 +12,6 @@
 #include "LArSimEvent/LArHit.h"
 #include "LArSimEvent/LArHitContainer.h"
 
-#include "StoreGate/StoreGate.h" 
-
 
 // Constructor
 LArFakeHitProducer::LArFakeHitProducer(const std::string& name, ISvcLocator* pSvcLocator ) :
@@ -39,7 +37,7 @@ StatusCode LArFakeHitProducer::hitConstruction(){
     ATH_MSG_DEBUG(" Filled the container, size = "<< cont->size() );
 
 
-    ATH_CHECK( StoreGate::instance().record(cont,"LArHitFake") );
+    ATH_CHECK( evtStore()->record(cont,"LArHitFake") );
     return StatusCode::SUCCESS;
 }
 
diff --git a/LArCalorimeter/LArSim/src/LArHitMaker.cxx b/LArCalorimeter/LArSim/src/LArHitMaker.cxx
index 6a1f599bc64a5d5e6b4d99b17ce3cb07c961fbe6..5a49c6f4b346e840607989197ba749dc48afebf4 100755
--- a/LArCalorimeter/LArSim/src/LArHitMaker.cxx
+++ b/LArCalorimeter/LArSim/src/LArHitMaker.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 "LArSim/LArHitMaker.h"
@@ -15,7 +15,7 @@
 
 // Constructor
 LArHitMaker::LArHitMaker(const std::string& name, ISvcLocator* pSvcLocator ) :
- AthAlgorithm(name , pSvcLocator),
+ AthLegacySequence(name , pSvcLocator),
  m_HitRetrieverNameAndType("LArHitProducerTest/producer1"),
  m_HitContainerLocation("LArHits"),
  m_HitRetrieverAlgorithm(0) ,
@@ -70,7 +70,7 @@ StatusCode LArHitMaker::initialize(){
 StatusCode LArHitMaker::execute(){
   ATH_MSG_DEBUG(" Start executing execute() method of "<< m_HitRetrieverNameAndType );
     
-    ATH_CHECK( m_HitRetrieverAlgorithm -> execute() );
+    ATH_CHECK( m_HitRetrieverAlgorithm -> execute(Gaudi::Hive::currentContext()) );
     
     LArHitProducer * producer = dynamic_cast<LArHitProducer*> ( m_HitRetrieverAlgorithm ) ;
     if(producer == NULL ) {
diff --git a/LArCalorimeter/LArSim/src/LArHitReader.cxx b/LArCalorimeter/LArSim/src/LArHitReader.cxx
index 8bf7c97538ea747429ca493204e91d435f135303..2de954abf1027335205e9d919d2fef2a457832f6 100755
--- a/LArCalorimeter/LArSim/src/LArHitReader.cxx
+++ b/LArCalorimeter/LArSim/src/LArHitReader.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 "LArSim/LArHitReader.h"
@@ -8,27 +8,19 @@
 #include "GaudiKernel/IDataProviderSvc.h"
 
 #include "LArSimEvent/LArHit.h"
-#include "StoreGate/StoreGate.h"
-
-// Constructor
-LArHitReader::LArHitReader(const std::string& name, ISvcLocator* pSvcLocator ) :
- AthAlgorithm(name , pSvcLocator)
-{
-  
-}
-
+#include "StoreGate/ReadHandle.h"
 
 //Initialize method
 StatusCode LArHitReader::initialize(){
-  ATH_MSG_DEBUG("LArHitReader "<< this->name()<<" initialized");
+  ATH_CHECK( m_hitKey.initialize() );
   return StatusCode::SUCCESS ;   
 }
 
 
 //Execute method
-StatusCode LArHitReader::execute(){
-  const LArHitContainer* cont = nullptr;
-  ATH_CHECK( StoreGate::instance().retrieve(cont,"LArHitFake") );
+StatusCode LArHitReader::execute (const EventContext& ctx) const
+{
+  SG::ReadHandle<LArHitContainer> cont (m_hitKey, ctx);
 
   ATH_MSG_DEBUG(" LArHitContainer Dump ----------- " );
   ATH_MSG_DEBUG( (std::string)(*cont)   );
@@ -36,10 +28,3 @@ StatusCode LArHitReader::execute(){
   return StatusCode::SUCCESS ;   
 }
 
-//Finalize method
-StatusCode LArHitReader::finalize(){
-  ATH_MSG_DEBUG("finalize() completed correctly");
-  return StatusCode::SUCCESS ;   
-}
-
-
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref
index c714288cb9d04203e8095edf3e0e726eb021f211..6cf04029d418293ea66fe7448f7f537284cd231c 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref
+++ b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTest.ref
@@ -42,7 +42,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3634 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref
index 85d5b729542f19f9e76c636420d22b7dbf515e9c..5fdc0c5dc44b2b22668794ad4a645a55a1790b46 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref
+++ b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestReadNoReg.ref
@@ -44,7 +44,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3634 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref
index ba1c29c7550ff3f9ecef405523208c97b1618a5f..a039b90935464802efc0dd897bd726cf9ff7aa4c 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref
+++ b/LArCalorimeter/LArTest/LArConditionsTest/share/LArConditionsTestWriteNoReg.ref
@@ -43,7 +43,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 3634 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
diff --git a/LumiBlock/LumiCalc/README.aiatlas b/LumiBlock/LumiCalc/README.aiatlas
index ec9be2d100dc769bbb4e2cae2b0af7eea33cd1b6..34c049548cff5da03b13e9b30d8bb881367a94d4 100644
--- a/LumiBlock/LumiCalc/README.aiatlas
+++ b/LumiBlock/LumiCalc/README.aiatlas
@@ -1,28 +1,72 @@
-This file gives instructions for setting up the lumicalc web service.  There are three servers:
-aiatlas110.cern.ch -> https://atlas-lumicalc-devel.cern.ch
+This file gives instructions for setting up the lumicalc web service.  
+Instructions have been updated on July 29, 2020 for the new centos7 server
+For more details: https://its.cern.ch/jira/browse/CSOPS-1700
 
-First, make sure you have a working directory:
-asetup 19.2.0,here
-cmt co LumiBlock/LumiCalc
+There is one server now with prod and dev areas:
+aiatlas031.cern.ch 
+-> https://atlas-lumicalc.cern.ch in /var/www/lumicalc
+-> https://atlas-lumicalc-dev.cern.ch in /var/www/lumicalc_dev
 
-Make any changes, test, and compile before installing with git
-We will re-build this on the server.
-(cd LumiBlock/LumiCalc/cmt; gmake clean)
+So log into aiatlas031
 
-Edit the ChangeLog
-Change the html/version.html file
+Change to a directory where you have write permission:
+cd /var/www/lumicalc_dev
 
-Then commit:
-svn ci -m <comment>
-svn cp . $SVNROOT/LumiBlock/LumiCalc/tags/LumiCalc-<version>
+# Setup git environment
+export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
+lsetup git
 
-Now, install using git.  From the release directory:
+# Sparse checkout (actually checks out my fork)
+git atlas init-workdir https://:@gitlab.cern.ch:8443/atlas/athena.git -p LumiCalc
 
-git init
-git add LumiBlock
-git add InstallArea
-git commit -m 'first commit'
-unset SSH_ASKPASS
-git config --global http.sslVerify false
-git push https://torrence@atlas-lumicalc-devel.cern.ch/git/lumicalc/ master
+# See what you really did with
+cd athena
+git remote -v
+cd ..
 
+# For the dev area, lets use a dev branch
+git checkout -b lumicalcDev
+git push --set-upstream origin lumicalcDev
+
+# So for me, origin is my fork, while upstream is the atlas master
+
+# Setup build environment
+mkdir build; cd build
+asetup master,latest,Athena  # Or a fixed release
+cmake ../athena/Projects/WorkDir
+make -j
+
+# And everything should now be ready to go
+# Be sure to test atlas-lumicalc-dev before updating the prod area from master
+
+# For updates, log into aiatlas031 and go to the correct area:
+cd /var/www/lumicalc_dev
+
+# Ensure we are on the correct branch (if needed)
+# <branch> = master (prod)
+# <branch> = lumicalcDev (dev)
+git checkout <branch>
+
+# Pull any changes
+git fetch origin
+git pull origin <branch>
+
+# Rebuild if any code changes
+
+# Once tested, push changes back to master (or make merge request)
+
+Go to the correct area:
+cd /
+# This can be used to check the environment
+https://atlas-lumicalc-dev.cern.ch/cgi-bin/TestEnviron.py
+
+# Config files can be found at
+sudo emacs /etc/httpd/conf.d/25-atlas-lumicalc-dev.cern.ch_vhost.conf
+
+# Restart apache if changes are made
+sudo systemctl restart httpd
+
+# To turn off puppet (for both userid and root):
+puppet agent --disable "Eric: testing config files"
+sudo /opt/puppetlabs/bin/puppet agent --disable "Eric: testing config files"
\ No newline at end of file
diff --git a/LumiBlock/LumiCalc/README.change b/LumiBlock/LumiCalc/README.change
index eee3ef0abaa2364c661dc7e4afd69f5facec6224..33967ebc69565c957596ff4392a9bf2e6717a4ce 100644
--- a/LumiBlock/LumiCalc/README.change
+++ b/LumiBlock/LumiCalc/README.change
@@ -1,3 +1,7 @@
+2020-07-30 Eric Torrence <torrence@cern.ch>
+	* Many changes to deploy lumicalc on new centos7 servers
+	* Call this LumiCalc-00-06-03
+
 2019-10-20 Eric Torrence <torrence@cern.ch>
 	* Properly moved everything to git
 	* Made changes to bring code into ATLAS code guidelines
diff --git a/LumiBlock/LumiCalc/config/11-atlas-lumicalc-dev.cern.ch_vhost.conf b/LumiBlock/LumiCalc/config/11-atlas-lumicalc-dev.cern.ch_vhost.conf
new file mode 100644
index 0000000000000000000000000000000000000000..9cab20a50c8f941e19ddfc7f7811b6e799143d96
--- /dev/null
+++ b/LumiBlock/LumiCalc/config/11-atlas-lumicalc-dev.cern.ch_vhost.conf
@@ -0,0 +1,81 @@
+# ************************************
+# Vhost template in module puppetlabs-apache
+# Managed by Puppet
+# ************************************
+# 
+<VirtualHost *:443>
+  ServerName atlas-lumicalc-dev.cern.ch
+
+  ## Vhost docroot
+  DocumentRoot "/var/www/lumicalc_dev/athena/LumiBlock/LumiCalc/html"
+  ## Alias declarations for resources outside the DocumentRoot
+  Alias /results "/var/www/lumifiles"
+  Alias /cgi-bin "/var/www/lumicalc_dev/athena/LumiBlock/LumiCalc/python/"
+  Alias / "/var/www/lumicalc_dev/athena/LumiBlock/LumiCalc/html/"
+
+  ## Directories, there should at least be a declaration for /var/www/lumicalc_dev/athena/LumiBlock/LumiCalc/html
+
+  <Location "/cgi-bin">
+    Options +ExecCGI
+    Require all granted
+    SetHandler cgi-script
+  </Location>
+
+  <Directory "/var/www/lumicalc_dev/athena/LumiBlock/LumiCalc/html">
+    Options +Indexes +Includes
+    AllowOverride None
+    Require claim cern_roles:users
+    <FilesMatch ".+(\.html)$">
+        SetHandler server-parsed
+    </FilesMatch>
+    AuthType openid-connect
+    AddType text/html .html
+  </Directory>
+
+  <Directory "/var/www/lumifiles">
+    Options +Indexes
+    IndexOptions +FancyIndexing
+    AllowOverride None
+    Require claim cern_roles:users
+    AuthType openid-connect
+  </Directory>
+
+  <Directory "/var/www/lumifiles/*">
+    Options +ExecCGI
+    AllowOverride None
+    Require claim cern_roles:users
+    <FilesMatch ".+(\.py)$">
+        SetHandler cgi-script
+    </FilesMatch>
+    AuthType openid-connect
+  </Directory>
+
+  ## Logging
+  ErrorLog "/var/log/httpd/atlas-lumicalc-dev.cern.ch_vhost_error_ssl.log"
+  ServerSignature Off
+  CustomLog "/var/log/httpd/atlas-lumicalc-dev.cern.ch_vhost_access_ssl.log" combined 
+
+  ## Server aliases
+  ServerAlias aiatlas031.cern.ch
+
+  ## SSL directives
+  SSLEngine on
+  SSLCertificateFile      "/etc/grid-security/hostcert.pem"
+  SSLCertificateKeyFile   "/etc/grid-security/hostkey.pem"
+
+  # SSL Proxy directives
+  SSLProxyEngine On
+
+  ## Custom fragment
+  
+      LimitRequestFieldSize 262144
+      Include "/etc/httpd/conf/oidc_secrets.conf"
+
+  OIDCProviderMetadataURL https://auth.cern.ch/auth/realms/cern/.well-known/openid-configuration
+  OIDCClientID atlas-lumicalc
+  OIDCRedirectURI https://atlas-lumicalc-dev.cern.ch/redirect_uri
+  OIDCProviderTokenEndpointAuth client_secret_basic
+  OIDCRemoteUserClaim sub
+  OIDCRefreshAccessTokenBeforeExpiry 30
+  OIDCSessionInactivityTimeout 7200
+</VirtualHost>
diff --git a/LumiBlock/LumiCalc/config/11-atlas-lumicalc.cern.ch_vhost.conf b/LumiBlock/LumiCalc/config/11-atlas-lumicalc.cern.ch_vhost.conf
new file mode 100644
index 0000000000000000000000000000000000000000..170b726fe06a3e0cbb7da5f42ac56f95c6e7c8ea
--- /dev/null
+++ b/LumiBlock/LumiCalc/config/11-atlas-lumicalc.cern.ch_vhost.conf
@@ -0,0 +1,81 @@
+# ************************************
+# Vhost template in module puppetlabs-apache
+# Managed by Puppet
+# ************************************
+# 
+<VirtualHost *:443>
+  ServerName atlas-lumicalc.cern.ch
+
+  ## Vhost docroot
+  DocumentRoot "/var/www/lumicalc/athena/LumiBlock/LumiCalc/html"
+  ## Alias declarations for resources outside the DocumentRoot
+  Alias /results "/var/www/lumifiles"
+  Alias /cgi-bin "/var/www/lumicalc/athena/LumiBlock/LumiCalc/python/"
+  Alias / "/var/www/lumicalc/athena/LumiBlock/LumiCalc/html/"
+
+  ## Directories, there should at least be a declaration for /var/www/lumicalc/athena/LumiBlock/LumiCalc/html
+
+  <Location "/cgi-bin">
+    Options +ExecCGI
+    Require all granted
+    SetHandler cgi-script
+  </Location>
+
+  <Directory "/var/www/lumicalc/athena/LumiBlock/LumiCalc/html">
+    Options +Indexes +Includes
+    AllowOverride None
+    Require claim cern_roles:users
+    <FilesMatch ".+(\.html)$">
+        SetHandler server-parsed
+    </FilesMatch>
+    AuthType openid-connect
+    AddType text/html .html
+  </Directory>
+
+  <Directory "/var/www/lumifiles">
+    Options +Indexes
+    IndexOptions +FancyIndexing
+    AllowOverride None
+    Require claim cern_roles:users
+    AuthType openid-connect
+  </Directory>
+
+  <Directory "/var/www/lumifiles/*">
+    Options +ExecCGI
+    AllowOverride None
+    Require claim cern_roles:users
+    <FilesMatch ".+(\.py)$">
+        SetHandler cgi-script
+    </FilesMatch>
+    AuthType openid-connect
+  </Directory>
+
+  ## Logging
+  ErrorLog "/var/log/httpd/atlas-lumicalc.cern.ch_vhost_error_ssl.log"
+  ServerSignature Off
+  CustomLog "/var/log/httpd/atlas-lumicalc.cern.ch_vhost_access_ssl.log" combined 
+
+  ## Server aliases
+  ServerAlias aiatlas031.cern.ch
+
+  ## SSL directives
+  SSLEngine on
+  SSLCertificateFile      "/etc/grid-security/hostcert.pem"
+  SSLCertificateKeyFile   "/etc/grid-security/hostkey.pem"
+
+  # SSL Proxy directives
+  SSLProxyEngine On
+
+  ## Custom fragment
+  
+      LimitRequestFieldSize 262144
+      Include "/etc/httpd/conf/oidc_secrets.conf"
+
+  OIDCProviderMetadataURL https://auth.cern.ch/auth/realms/cern/.well-known/openid-configuration
+  OIDCClientID atlas-lumicalc
+  OIDCRedirectURI https://atlas-lumicalc.cern.ch/redirect_uri
+  OIDCProviderTokenEndpointAuth client_secret_basic
+  OIDCRemoteUserClaim sub
+  OIDCRefreshAccessTokenBeforeExpiry 30
+  OIDCSessionInactivityTimeout 7200
+</VirtualHost>
diff --git a/LumiBlock/LumiCalc/config/25-lumicalc-vhost.conf b/LumiBlock/LumiCalc/config/25-lumicalc-vhost.conf
deleted file mode 100644
index d98996b8196acf317465b5f46cbc80457ef05bd4..0000000000000000000000000000000000000000
--- a/LumiBlock/LumiCalc/config/25-lumicalc-vhost.conf
+++ /dev/null
@@ -1,77 +0,0 @@
-# ************************************
-# Vhost template in module puppetlabs-apache
-# Managed by Puppet
-# ************************************
-
-<VirtualHost *:443>
-  ServerName default
-
-  ## Vhost docroot
-  DocumentRoot "/var/www/lumicalc"
-  ## Alias declarations for resources outside the DocumentRoot
-  Alias /results/ "/tmp/lumifiles/"
-  Alias /cgi-bin/ "/var/www/lumicalc/LumiBlock/LumiCalc/python/"
-  Alias / "/var/www/lumicalc/LumiBlock/LumiCalc/html/"
-
-
-
-  ## Directories, there should at least be a declaration for /var/www/lumicalc
-
-
-  <Location "/cgi-bin">
-    Options +ExecCGI
-    Order allow,deny
-    Allow from all
-    SetHandler cgi-script
-  </Location>
-
-
-  <Directory "/var/www/lumicalc/LumiBlock/LumiCalc/html">
-    Options +Indexes +Includes
-    AllowOverride None
-    Order Allow,Deny
-    Allow from all
-    AddHandler server-parsed .html
-    AddType text/html .html
-  </Directory>
-
-
-  <Directory "/tmp/lumifiles">
-    Options +Indexes
-    IndexOptions +FancyIndexing
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-  </Directory>
-
-  <Directory "/tmp/lumifiles/*">
-    Options +ExecCGI
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-    AddHandler cgi-script .py
-  </Directory>
-
-  ## Load additional static includes
-
-
-  ## Logging
-  ErrorLog "/var/log/httpd/lumicalc-vhost_error_ssl.log"
-  ServerSignature Off
-  CustomLog "/var/log/httpd/lumicalc-vhost_access_ssl.log" combined
-
-
-
-
-  ## SSL directives
-  SSLEngine on
-  SSLCertificateFile      "/etc/pki/tls/certs/localhost.crt"
-  SSLCertificateKeyFile   "/etc/pki/tls/private/localhost.key"
-  SSLCACertificatePath    "/etc/pki/tls/certs"
-
-  ## More time for scripts to run
-  TimeOut 900
-
-  ## Custom fragment
-LimitRequestFieldSize 262144
-</VirtualHost>
diff --git a/LumiBlock/LumiCalc/config/README b/LumiBlock/LumiCalc/config/README
index 7aa76f6870eebce5f69cf26b73c799cfc485c1ac..ad9dcb59af68141405b898769dd58f657179a818 100644
--- a/LumiBlock/LumiCalc/config/README
+++ b/LumiBlock/LumiCalc/config/README
@@ -1,3 +1,4 @@
 For the record, this contains config files used on the lumicalc web server.  Changes here are not pushed to the server, this is just a record.
 
-/etc/httpd/conf.d/25-lumicalc-vhost.conf
\ No newline at end of file
+The config files are in:
+/etc/httpd/conf.d/
\ No newline at end of file
diff --git a/LumiBlock/LumiCalc/html/index.html b/LumiBlock/LumiCalc/html/index.html
index d78c28cac5805052dfae81c680e6aa2781d2609a..adf01c3b5f25942c570216595d5e98f8232d62c9 100755
--- a/LumiBlock/LumiCalc/html/index.html
+++ b/LumiBlock/LumiCalc/html/index.html
@@ -29,6 +29,7 @@
 <h3>LumiCalc News</h3>
 <p>If your request seems to hang and you eventually see a <font color="red"><b>Proxy Error</b></font> after clicking <b>Calculate Luminosity</b>, this is annoying but not fatal.  Just reload the page and your job should be running fine.</p>
 <ul>
+<li><font color="red">30 Jul, 2020</font> - Migration to centos7 server complete</li>
 <li><font color="red">22 Jun, 2020</font> - Fix bug in handling SFO misconfiguration in run 281385</li>
 <li><font color="red">16 Apr, 2020</font> - Preliminary 13 TeV 2017/18 low-mu lumi available in tag OflLumi-13TeV-010-lowmu</li>
 <li><font color="red">6 Feb, 2020</font> - Final 2015 PbPb lumi available in tag OflLumi-HI-009</li>
diff --git a/LumiBlock/LumiCalc/html/version.html b/LumiBlock/LumiCalc/html/version.html
index e8b49dace70c2cce40be859184ae5d4262e2efc6..8b5dd3e5083aa5ba8b13d99dd811cb0fd0a9b4d5 100644
--- a/LumiBlock/LumiCalc/html/version.html
+++ b/LumiBlock/LumiCalc/html/version.html
@@ -1 +1 @@
-LumiCalc-00-05-01
+LumiCalc-00-06-03
diff --git a/LumiBlock/LumiCalc/python/LumiCalcHtml.py b/LumiBlock/LumiCalc/python/LumiCalcHtml.py
index c54e3be9fcad2a119ddac8d69eeb0e680abb7d69..d8404cd08df43aae3d83c2dfe135e8684ae224f7 100755
--- a/LumiBlock/LumiCalc/python/LumiCalcHtml.py
+++ b/LumiBlock/LumiCalc/python/LumiCalcHtml.py
@@ -20,9 +20,20 @@ class LumiCalc:
         # Python file to make updates in working directory
         self.updateScript = 'LumiCalcWorking.py'
         self.recoverScript = 'LumiCalcRecover.py'
+
+        # Prod area
         self.homeDir = '/var/www/lumicalc/'
-        self.htmlDir = self.homeDir + 'LumiBlock/LumiCalc/html/'
-        self.scriptDir = self.homeDir + 'LumiBlock/LumiCalc/share/'
+        self.dev = False
+
+        # Check if we are running as dev
+        if os.environ.get('SERVER_NAME', '') == 'atlas-lumicalc-dev.cern.ch':
+            self.homeDir = '/var/www/lumicalc_dev/'
+            self.dev = True
+
+        self.resultsDir = '/var/www/lumifiles/'
+
+        self.htmlDir = self.homeDir + 'athena/LumiBlock/LumiCalc/html/'
+        self.scriptDir = self.homeDir + 'athena/LumiBlock/LumiCalc/share/'
         self.workdir = os.getcwd()
 
         self.uselar = True
@@ -32,8 +43,7 @@ class LumiCalc:
         
         # Create a new subdirectory for this
         self.subdir = hex(random.randint(0,0xFFFFFF))[2:]
-        #self.workdir = self.homeDir + 'results/' + self.subdir
-        self.workdir = '/tmp/lumifiles/' + self.subdir
+        self.workdir = self.resultsDir + self.subdir
         os.mkdir(self.workdir)
 
         # Open the output file
@@ -215,7 +225,10 @@ class LumiCalc:
         self.f.write( '<p>iLumiCalc '+self.command+'</p>\n' )
 
         #self.cmdstr = os.getcwd()+'/runLumiCalc.sh '+self.command
-        self.cmdstr = self.scriptDir+'runLumiCalc.sh '+self.command
+        if self.dev:
+            self.cmdstr = self.scriptDir+'runLumiCalcDev.sh '+self.command
+        else:
+            self.cmdstr = self.scriptDir+'runLumiCalc.sh '+self.command
 
     def runCommand(self):
         p = subprocess.Popen(self.cmdstr+' > output.txt 2>&1', executable='/bin/bash', cwd=self.workdir, shell=True) 
@@ -545,7 +558,17 @@ class LumiCalc:
         print ('<html><head>')
         print ('<meta http-equiv="Refresh" content="0; url=/results/'+self.subdir+'/'+outfile+'">')
         print ('</head></html>')
-        
+
+    # For debugging, dump all os.environ variables
+    def dumpEnviron(self):
+
+        print ('Content-Type: text/html')
+        print () # Blank line, end of headers
+        print ('<html>')
+        for key in os.environ:
+            print('<p><b>',key,':</b>',os.environ[key],'<p>')
+        print ('</html>')
+
 # Run from command line    
 if __name__ == "__main__":
 
diff --git a/LumiBlock/LumiCalc/python/LumiCalcRecover.py b/LumiBlock/LumiCalc/python/LumiCalcRecover.py
index 1b2e7048e24b8ef3b73ce2a1b9b0b3fe92d32778..8e79ea36268f08ad8774bae352455045dd895a72 100755
--- a/LumiBlock/LumiCalc/python/LumiCalcRecover.py
+++ b/LumiBlock/LumiCalc/python/LumiCalcRecover.py
@@ -7,12 +7,17 @@ from __future__ import print_function
 import os
 import glob
 import cgitb
+
 # Enable debugging output for CGI  
 cgitb.enable()
 
 # Use imp to import directly from path in cgi-bin?
 import imp
-lcmod = imp.load_source('LumiCalc', '/var/www/lumicalc/LumiBlock/LumiCalc/python/LumiCalcHtml.py')
+
+if os.environ.get('SERVER_NAME', '') == 'atlas-lumicalc-dev.cern.ch':
+    lcmod = imp.load_source('LumiCalc', '/var/www/lumicalc_dev/athena/LumiBlock/LumiCalc/python/LumiCalcHtml.py')
+else:
+    lcmod = imp.load_source('LumiCalc', '/var/www/lumicalc/athena/LumiBlock/LumiCalc/python/LumiCalcHtml.py')
 
 lc = lcmod.LumiCalc()
 
diff --git a/LumiBlock/LumiCalc/python/TestEnviron.py b/LumiBlock/LumiCalc/python/TestEnviron.py
new file mode 100755
index 0000000000000000000000000000000000000000..d8e73b32894651d92ce76bf89a2e338c09bffd4a
--- /dev/null
+++ b/LumiBlock/LumiCalc/python/TestEnviron.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
+
+import os
+
+print ('Content-Type: text/html')
+print () # Blank line, end of headers
+print ('<html>')
+for key in os.environ:
+    print('<p><b>',key,':</b>',os.environ[key],'<p>')
+print ('</html>')
diff --git a/LumiBlock/LumiCalc/share/runLumiCalc.sh b/LumiBlock/LumiCalc/share/runLumiCalc.sh
old mode 100644
new mode 100755
index a53a99c1ecc5573f28e2a2c290e2ef6a9beadb06..7a8d19ea98c3b91ee108557c1cbfabf83a3cf983
--- a/LumiBlock/LumiCalc/share/runLumiCalc.sh
+++ b/LumiBlock/LumiCalc/share/runLumiCalc.sh
@@ -1,22 +1,23 @@
 #!/bin/bash
-export release=20.7.8.6
+export release=latest
+export MyTestArea=/var/www/lumicalc
 
 echo `date`
 echo Working directory is `pwd`
 echo Setting up release $release
 
-export MyTestArea=/var/www/lumicalc
-export AtlasSetup=/afs/cern.ch/atlas/software/dist/AtlasSetup
-#echo   $AtlasSetup/scripts/asetup.sh --help
-#source $AtlasSetup/scripts/asetup.sh --help
+export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh ""
+
+echo asetup --release=$release --testarea=$MyTestArea --branch=master Athena
+asetup --release=$release --testarea=$MyTestArea --branch=master Athena
 
-echo   $AtlasSetup/scripts/asetup.sh --release=$release --testarea=$MyTestArea
-source $AtlasSetup/scripts/asetup.sh --release=$release --testarea=$MyTestArea
+echo   source $MyTestArea/build/*/setup.sh
+source $MyTestArea/build/*/setup.sh
 
-chmod +x /var/www/lumicalc/LumiBlock/LumiCalc/x86_64-slc6-gcc49-opt/iLumiCalc
 echo which iLumiCalc: `which iLumiCalc`
-echo Executing /var/www/lumicalc/LumiBlock/LumiCalc/x86_64-slc6-gcc49-opt/iLumiCalc $*
-/var/www/lumicalc/LumiBlock/LumiCalc/x86_64-slc6-gcc49-opt/iLumiCalc $*
+echo Executing `which iLumiCalc` $*
+`which iLumiCalc` $*
 
 echo Done
 echo `date`
diff --git a/LumiBlock/LumiCalc/share/runLumiCalcDev.sh b/LumiBlock/LumiCalc/share/runLumiCalcDev.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c535e8ce16fcdd179af3c2cefc944a2fdd3f44f5
--- /dev/null
+++ b/LumiBlock/LumiCalc/share/runLumiCalcDev.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+export release=latest
+export MyTestArea=/var/www/lumicalc_dev
+
+echo `date`
+echo Working directory is `pwd`
+echo Setting up release $release
+
+export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh ""
+
+echo asetup --release=$release --testarea=$MyTestArea --branch=master Athena
+asetup --release=$release --testarea=$MyTestArea --branch=master Athena
+
+echo   source $MyTestArea/build/*/setup.sh
+source $MyTestArea/build/*/setup.sh
+
+echo which iLumiCalc: `which iLumiCalc`
+echo Executing `which iLumiCalc` $*
+`which iLumiCalc` $*
+
+echo Done
+echo `date`
diff --git a/MagneticField/BFieldData/ATLAS_CHECK_THREAD_SAFETY b/MagneticField/BFieldData/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..46a095a19e32d62095016f976c664c7cfc04d288
--- /dev/null
+++ b/MagneticField/BFieldData/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MagneticField/BFieldData
diff --git a/MagneticField/BFieldData/CMakeLists.txt b/MagneticField/BFieldData/CMakeLists.txt
index 33e8e469b0e3897eb495dd68d5e98e58945011d4..1fefcbbd7516cb44211b55255c131c2cd6ba6eab 100644
--- a/MagneticField/BFieldData/CMakeLists.txt
+++ b/MagneticField/BFieldData/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: BFieldData
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( BFieldData )
diff --git a/MagneticField/MagFieldConditions/CMakeLists.txt b/MagneticField/MagFieldConditions/CMakeLists.txt
index 70586fd0b15e883e703c7c5e61aceb94c44b2176..bbfb586351af3155d0ba1797552b4875bb216c02 100644
--- a/MagneticField/MagFieldConditions/CMakeLists.txt
+++ b/MagneticField/MagFieldConditions/CMakeLists.txt
@@ -1,27 +1,10 @@
-################################################################################
-# Package: MagFieldConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MagFieldConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-			  GaudiKernel
-                          PRIVATE
-                          MagneticField/MagFieldElements
-                          )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( MagFieldConditions
                    src/*.cxx
                    PUBLIC_HEADERS MagFieldConditions
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES SGTools GaudiKernel StoreGateLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} MagFieldElements)
-
-
+                   LINK_LIBRARIES AthenaKernel GaudiKernel MagFieldElements )
diff --git a/MagneticField/MagFieldConditions/MagFieldConditions/AtlasFieldCacheCondObj.h b/MagneticField/MagFieldConditions/MagFieldConditions/AtlasFieldCacheCondObj.h
index 74bb2636e4f066175c9fa8cefa2f00cb895524d6..f0a75517d5ff6a306631e65d2059a343da05773a 100644
--- a/MagneticField/MagFieldConditions/MagFieldConditions/AtlasFieldCacheCondObj.h
+++ b/MagneticField/MagFieldConditions/MagFieldConditions/AtlasFieldCacheCondObj.h
@@ -28,11 +28,14 @@ public:
     inline void getInitializedCache (MagField::AtlasFieldCache& cache) const;
 
     /** access to solenoid field scale factor */
-    double solenoidFieldScaleFactor() const { return m_solFieldScale; } ;
+    double solenoidFieldScaleFactor() const { return m_solFieldScale; } 
 
     /** access to toroid field scale factor */
-    double toriodFieldScaleFactor() const { return m_torFieldScale; } ;
+    double toriodFieldScaleFactor() const { return m_torFieldScale; } 
 
+    /** access to non-owning AtlasFieldMap*/
+    const MagField::AtlasFieldMap* fieldMap() const { return m_fieldMap; }
+    
     /** set values for field scale and service to be able to build the cache **/
     bool initialize(double solFieldScale, double torFieldScale, 
                     const MagField::AtlasFieldMap* fieldMap);
diff --git a/MagneticField/MagFieldConfig/ATLAS_CHECK_THREAD_SAFETY b/MagneticField/MagFieldConfig/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..b6727d76842207eec35441090a8e7d69d06b671d
--- /dev/null
+++ b/MagneticField/MagFieldConfig/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MagneticField/MagFieldConfig
diff --git a/MagneticField/MagFieldConfig/CMakeLists.txt b/MagneticField/MagFieldConfig/CMakeLists.txt
index cdf011f905af22fa8a4d90ee910937e76921b904..1545952dabeb324225cd0e731962ab9fa9f5a208 100644
--- a/MagneticField/MagFieldConfig/CMakeLists.txt
+++ b/MagneticField/MagFieldConfig/CMakeLists.txt
@@ -1,11 +1,7 @@
-################################################################################
-# Package: MagFieldConfig
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MagFieldConfig )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
-
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/MagneticField/MagFieldElements/CMakeLists.txt b/MagneticField/MagFieldElements/CMakeLists.txt
index c572626f9ebd6d65b46ed1b7004aac8ace079f5b..d24244fcfb5aba4d9e7d09679e0fc93b42d3acaf 100644
--- a/MagneticField/MagFieldElements/CMakeLists.txt
+++ b/MagneticField/MagFieldElements/CMakeLists.txt
@@ -1,30 +1,15 @@
-################################################################################
-# Package: MagFieldElements
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MagFieldElements )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-			  Control/CxxUtils
-			  Event/EventPrimitives
-                          PRIVATE
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core Tree RIO  )
 
 # Component(s) in the package:
 atlas_add_library( MagFieldElements
                    src/*.cxx
                    PUBLIC_HEADERS MagFieldElements
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel CxxUtils EventPrimitives
-                   PRIVATE_LINK_LIBRARIES PathResolver )
-
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   LINK_LIBRARIES CxxUtils EventPrimitives GaudiKernel
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PathResolver )
diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h
index 2871b66ea6abd587aa7134c48cd468befeec4b56..169a0140221b22e18b58d4134718cc274b5ebfc8 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h
@@ -15,14 +15,14 @@
 // MagField includes
 #include "CxxUtils/restrict.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/SystemOfUnits.h"
 #include "MagFieldElements/AtlasFieldMap.h"
 #include "MagFieldElements/BFieldCache.h"
 #include "MagFieldElements/BFieldCacheZR.h"
 #include "MagFieldElements/BFieldCond.h"
 #include "MagFieldElements/BFieldMeshZR.h"
 #include "MagFieldElements/BFieldZone.h"
-// CLHEP
-#include "CLHEP/Units/SystemOfUnits.h"
+
 #include <iostream>
 #include <memory>
 namespace MagField {
diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
index ed6d347de9db80fce9b6edb3347ac8db9f2f9951..7b99399a3f43c2f733db8fac87d0428fbec341a3 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc
@@ -75,7 +75,7 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,
     if (!fillFieldCache(z, r, phi)) {
       // caching failed -> outside the valid map volume
       // return default field (0.1 gauss)
-      const double defaultB(0.1 * CLHEP::gauss);
+      const double defaultB(0.1 * Gaudi::Units::gauss);
       bxyz[0] = bxyz[1] = bxyz[2] = defaultB;
       // return zero gradient if requested
       if (deriv) {
diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldMap.h b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldMap.h
index 582b5ddda8a4ba32ea269dabfabaf2cc0b2dbfb3..4984ba38cf84d9496d8a2e39c71d475ee504850f 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldMap.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldMap.h
@@ -20,8 +20,7 @@
 #include "MagFieldElements/BFieldCond.h"
 #include "MagFieldElements/BFieldMeshZR.h"
 #include "MagFieldElements/BFieldZone.h"
-// CLHEP
-#include "CLHEP/Units/SystemOfUnits.h"
+
 #include <iostream>
 #include <memory>
 
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h
index 5fc675f08b3b73e671c41db38afd5a941ab7e973..e42b999ef3bebe16e2df4f9564f8d7de6a9fe526 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h
@@ -30,7 +30,6 @@ public:
     , m_phimin(0.0)
     , m_phimax(-1.0)
   {
-    ;
   }
   // make this cache invalid, so that inside() will fail
   void invalidate()
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc
index a239bd5f5e20ead09d3408a6acc9583ea9096771..810c9739fdc2588d80b5cf1a200d2b29049ca1a2 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc
@@ -53,21 +53,21 @@ BFieldMesh<T>::getCache(double z,
   int iz = int((z - zmin()) * m_invUnit[0]); // index to LUT
   iz = m_LUT[0][iz];                         // tentative mesh index from LUT
   if (z > mz[iz + 1]) {
-    iz++;
+    ++iz;
   }
   // r
   const std::vector<double>& mr(m_mesh[1]);
   int ir = int((r - rmin()) * m_invUnit[1]); // index to LUT
   ir = m_LUT[1][ir];                         // tentative mesh index from LUT
   if (r > mr[ir + 1]) {
-    ir++;
+    ++ir;
   }
   // phi
   const std::vector<double>& mphi(m_mesh[2]);
   int iphi = int((phi - phimin()) * m_invUnit[2]); // index to LUT
   iphi = m_LUT[2][iphi]; // tentative mesh index from LUT
   if (phi > mphi[iphi + 1]) {
-    iphi++;
+    ++iphi;
   }
   // store the bin edges
   cache.setRange(
@@ -111,7 +111,7 @@ BFieldMesh<T>::getB(const double* ATH_RESTRICT xyz,
   if (!inside(z, r, phi)) { // no
     B[0] = B[1] = B[2] = 0.0;
     if (deriv) {
-      for (int i = 0; i < 9; i++) {
+      for (int i = 0; i < 9; ++i) {
         deriv[i] = 0.0;
       }
     }
@@ -123,21 +123,21 @@ BFieldMesh<T>::getB(const double* ATH_RESTRICT xyz,
   int iz = int((z - zmin()) * m_invUnit[0]); // index to LUT
   iz = m_LUT[0][iz];                         // tentative mesh index from LUT
   if (z > mz[iz + 1]) {
-    iz++;
+    ++iz;
   }
   // r
   const std::vector<double>& mr(m_mesh[1]);
   int ir = int((r - rmin()) * m_invUnit[1]); // index to LUT
   ir = m_LUT[1][ir];                         // tentative mesh index from LUT
   if (r > mr[ir + 1]) {
-    ir++;
+    ++ir;
   }
   // phi
   const std::vector<double>& mphi(m_mesh[2]);
   int iphi = int((phi - phimin()) * m_invUnit[2]); // index to LUT
   iphi = m_LUT[2][iphi]; // tentative mesh index from LUT
   if (phi > mphi[iphi + 1]) {
-    iphi++;
+    ++iphi;
   }
   // get the B field at the 8 corners
   int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner
@@ -159,7 +159,7 @@ BFieldMesh<T>::getB(const double* ATH_RESTRICT xyz,
   const double scale = m_scale;
   // interpolate field values in z, r, phi
   double Bzrphi[3];
-  for (int i = 0; i < 3; i++) { // z, r, phi
+  for (int i = 0; i < 3; ++i) { // z, r, phi
     Bzrphi[i] = scale * (gz * (gr * (gphi * field[0][i] + fphi * field[1][i]) +
                                fr * (gphi * field[2][i] + fphi * field[3][i])) +
                          fz * (gr * (gphi * field[4][i] + fphi * field[5][i]) +
@@ -177,7 +177,7 @@ BFieldMesh<T>::getB(const double* ATH_RESTRICT xyz,
     const double sz = m_scale / (mz[iz + 1] - mz[iz]);
     const double sr = m_scale / (mr[ir + 1] - mr[ir]);
     const double sphi = m_scale / (mphi[iphi + 1] - mphi[iphi]);
-    
+
     std::array<double,3> dBdz;
     std::array<double,3> dBdr;
     std::array<double,3> dBdphi;
@@ -236,7 +236,7 @@ BFieldMesh<T>::buildLUT()
     int n = int(width / q) + 1;
     q = width / (n + 0.5);
     m_invUnit[j] = 1.0 / q; // new unit size
-    n++;
+    ++n;
     int m = 0;                    // mesh number
     for (int i = 0; i < n; ++i) { // LUT index
       if (i * q + m_mesh[j].front() > m_mesh[j][m + 1]) {
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMeshZR.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldMeshZR.icc
index 92807b4df87cab14cefcaabcab0a04055436e220..781dbf7dc885eef916b3f8c87d55c4da9b8d454e 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMeshZR.icc
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMeshZR.icc
@@ -17,14 +17,14 @@ BFieldMeshZR::getCache(double z,
   int iz = int((z - zmin()) * m_invUnit[0]); // index to LUT
   iz = m_LUT[0][iz];                         // tentative mesh index from LUT
   if (z > mz[iz + 1]) {
-    iz++;
+    ++iz;
   }
   // r
   const std::vector<double>& mr(m_mesh[1]);
   int ir = int((r - rmin()) * m_invUnit[1]); // index to LUT
   ir = m_LUT[1][ir];                         // tentative mesh index from LUT
   if (r > mr[ir + 1]) {
-    ir++;
+    ++ir;
   }
   // store the bin edges
   cache.setRange(mz[iz], mz[iz + 1], mr[ir], mr[ir + 1]);
diff --git a/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx b/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx
index 43192dd4523adb52a12c5b6f06d4fea2496b8d19..1956e5f35d9b4311074d600f804fad890b729498 100644
--- a/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx
+++ b/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx
@@ -12,9 +12,6 @@
 // PathResolver
 #include "PathResolver/PathResolver.h"
 
-// CLHEP
-#include "CLHEP/Units/SystemOfUnits.h"
-
 // ROOT
 #include "TFile.h"
 #include "TTree.h"
diff --git a/MagneticField/MagFieldInterfaces/CMakeLists.txt b/MagneticField/MagFieldInterfaces/CMakeLists.txt
index 3749fb89bee6a51578c33e94139f50c1d8956541..d8268ae59cd3676a19314d1990ea985242471a7d 100644
--- a/MagneticField/MagFieldInterfaces/CMakeLists.txt
+++ b/MagneticField/MagFieldInterfaces/CMakeLists.txt
@@ -1,21 +1,9 @@
-################################################################################
-# Package: MagFieldInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MagFieldInterfaces )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel )
-
-# External dependencies:
-find_package( Eigen )
-
 # Component(s) in the package:
 atlas_add_library( MagFieldInterfaces
                    PUBLIC_HEADERS MagFieldInterfaces
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives GaudiKernel )
-
+                   LINK_LIBRARIES GeoPrimitives GaudiKernel )
diff --git a/MagneticField/MagFieldInterfaces/MagFieldInterfaces/ATLAS_CHECK_THREAD_SAFETY b/MagneticField/MagFieldInterfaces/MagFieldInterfaces/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..5e0164aed2561ae92e361e27c1f4768048e67fc4
--- /dev/null
+++ b/MagneticField/MagFieldInterfaces/MagFieldInterfaces/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MagneticField/MagFieldInterfaces
diff --git a/MagneticField/MagFieldServices/CMakeLists.txt b/MagneticField/MagFieldServices/CMakeLists.txt
index 150469e9ac3411d89c1bcece54f825d6d1e24b0e..4d89f8435c5b9a1d0342ea036ef7cac935db4aeb 100644
--- a/MagneticField/MagFieldServices/CMakeLists.txt
+++ b/MagneticField/MagFieldServices/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: MagFieldServices
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MagFieldServices )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          MagneticField/MagFieldInterfaces
-                          MagneticField/MagFieldConditions
-			  Control/CxxUtils
-                          PRIVATE
-                          MagneticField/MagFieldElements
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          Tools/PathResolver
-			  Event/EventInfo
-			  )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -29,13 +12,11 @@ atlas_add_component( MagFieldServices
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-		     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} MagFieldElements MagFieldConditions CxxUtils 
-		     AthenaBaseComps MagFieldInterfaces StoreGateLib SGtests AthenaPoolUtilities GaudiKernel PathResolver
-		     EventInfo )
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaPoolUtilities CxxUtils EventInfo GaudiKernel MagFieldConditions MagFieldElements MagFieldInterfaces PathResolver StoreGateLib )
 
 # Install files from the package:
 atlas_install_headers( MagFieldServices )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
 if( NOT SIMULATIONBASE )
   atlas_add_test( MagFieldServicesConfig    SCRIPT python -m MagFieldServices.MagFieldServicesConfig
diff --git a/MagneticField/MagFieldUtils/CMakeLists.txt b/MagneticField/MagFieldUtils/CMakeLists.txt
index 9fbae83a8e9f5e6631e872ca4e7d9e967d8c1931..433f9eda16812493b5ea234f89b685b2edff005a 100644
--- a/MagneticField/MagFieldUtils/CMakeLists.txt
+++ b/MagneticField/MagFieldUtils/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: MagFieldUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MagFieldUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          MagneticField/MagFieldInterfaces )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Geant4 )
diff --git a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/CMakeLists.txt b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/CMakeLists.txt
index 287b8d36756b86ff49d2c35417d625e599116b3d..7bce580933b2062ac6e08388050c220fbceb24d3 100644
--- a/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCablings/MuonRPC_Cabling/CMakeLists.txt
@@ -25,7 +25,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( MuonRPC_CablingLib
 		   MuonRPC_Cabling/*.h src/*.cxx
 		   PUBLIC_HEADERS MuonRPC_Cabling
-		   LINK_LIBRARIES AthenaBaseComps AthenaKernel Identifier GaudiKernel MuonCablingTools CablingTools RPCcablingInterfaceLib MuonIdHelpersLib
+		   LINK_LIBRARIES AthenaBaseComps AthenaKernel Identifier GaudiKernel MuonCablingTools RPCcablingInterfaceLib MuonIdHelpersLib
 		   PRIVATE_LINK_LIBRARIES StoreGateLib AthenaPoolUtilities MuonCondInterface PathResolver RPC_CondCablingLib)
 atlas_add_component( MuonRPC_Cabling
 		     src/components/*.cxx
diff --git a/MuonSpectrometer/MuonCablings/RPCcablingInterface/CMakeLists.txt b/MuonSpectrometer/MuonCablings/RPCcablingInterface/CMakeLists.txt
index 91a09a6c576a858155aaf32e1740bf3c4da56f11..e95851e9d259353a66036471d3b07ad7081e6154 100644
--- a/MuonSpectrometer/MuonCablings/RPCcablingInterface/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCablings/RPCcablingInterface/CMakeLists.txt
@@ -20,5 +20,5 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( RPCcablingInterfaceLib
                    src/*.cxx
                    PUBLIC_HEADERS RPCcablingInterface
-                   LINK_LIBRARIES AthenaKernel Identifier GaudiKernel MuonCablingTools CablingTools MuonIdHelpersLib StoreGateLib SGtests RPC_CondCablingLib)
+                   LINK_LIBRARIES AthenaKernel Identifier GaudiKernel MuonCablingTools MuonIdHelpersLib StoreGateLib SGtests RPC_CondCablingLib)
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..f5e24b7270736055bc20973f36d80f2f67ea372b
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MuonSpectrometer/MuonCnv/MuonByteStream
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..4880df7d0fa7e60dbde6c8b0b047ebe94a0600b4
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MuonSpectrometer/MuonCnv/MuonCSC_CnvTools
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.h
index a9be02ed374f66ef7c32e1f9af787f6e63d18edb..fc78a22b30a7a1b41770f4535d0134e39694f629 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.h
@@ -8,6 +8,8 @@
 
 #ifndef MUONCSC_CNVTOOLS_CSC_RAWDATAPROVIDERTOOL_H
 #define MUONCSC_CNVTOOLS_CSC_RAWDATAPROVIDERTOOL_H
+    
+#include "CxxUtils/checker_macros.h"
 
 #include "CSC_RawDataProviderToolCore.h"
 #include "GaudiKernel/ToolHandle.h"
@@ -18,7 +20,8 @@
 namespace Muon
 {
 
-class CSC_RawDataProviderTool : virtual public IMuonRawDataProviderTool, public CSC_RawDataProviderToolCore
+/// This class is only used in a single-thread mode
+class ATLAS_NOT_THREAD_SAFE CSC_RawDataProviderTool : virtual public IMuonRawDataProviderTool, public CSC_RawDataProviderToolCore
 {
 public:
     CSC_RawDataProviderTool(const std::string& t, const std::string& n, const IInterface* p);
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.h
index 1b17a57de7b53f26200cdde5d237fb4b2ad69cfa..f56e7b8ce6382021f391631d9f24263d95fdfdf4 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.h
@@ -5,6 +5,8 @@
 #ifndef MUONCSC_CNVTOOLS_CSCRDOTOCSCPREPDATATOOL_H
 #define MUONCSC_CNVTOOLS_CSCRDOTOCSCPREPDATATOOL_H 
 
+#include "CxxUtils/checker_macros.h"
+
 #include "CscRdoToCscPrepDataToolCore.h"
 
 #include <string>
@@ -22,7 +24,7 @@
 ////////////////////////////////////////////////////////////////////////////////////////
 
 namespace Muon {
-  class CscRdoToCscPrepDataTool : public CscRdoToCscPrepDataToolCore {
+  class ATLAS_NOT_THREAD_SAFE CscRdoToCscPrepDataTool : public CscRdoToCscPrepDataToolCore {
 
   public:
     
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.cxx
index c608cd46542158bc4ebef9b3a1a986c9e7f3fa11..3515405299728cb441f895f46db931c40a8f26cc 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.cxx
@@ -7,6 +7,7 @@
 
 /// algorithm to decode RDO into PrepRawData
 
+#include "MuonIdHelpers/CscIdHelper.h"
 #include "MuonReadoutGeometry/CscReadoutElement.h"
 #include "MuonRDO/CscRawData.h"
 #include "MuonRDO/CscRawDataCollection.h"
@@ -69,7 +70,8 @@ StatusCode CscRdoToCscPrepDataToolCore::decode(std::vector<IdentifierHash>&, std
 
 //*****************************************
 //************** Process for the givenId EF Filter case...
-StatusCode CscRdoToCscPrepDataToolCore::decode(const CscRawDataContainer* rdoContainer, IdentifierHash givenHashId, std::vector<IdentifierHash>& decodedIdhs) {  
+/// This decode function is for single-thread running only
+StatusCode CscRdoToCscPrepDataToolCore::decode ATLAS_NOT_THREAD_SAFE (const CscRawDataContainer* rdoContainer, IdentifierHash givenHashId, std::vector<IdentifierHash>& decodedIdhs) {  
   IdContext cscContext = m_idHelperSvc->cscIdHelper().module_context();
 
   SG::ReadCondHandle<MuonGM::MuonDetectorManager> muDetMgrHandle{m_muDetMgrKey};
@@ -257,7 +259,8 @@ StatusCode CscRdoToCscPrepDataToolCore::decode(const CscRawDataContainer* rdoCon
 
 
 //************** Process for all in case of Offline
-StatusCode CscRdoToCscPrepDataToolCore::decode(const CscRawDataContainer* rdoContainer, std::vector<IdentifierHash>& decodedIdhs)
+/// This decode function is for single-thread running only
+StatusCode CscRdoToCscPrepDataToolCore::decode ATLAS_NOT_THREAD_SAFE (const CscRawDataContainer* rdoContainer, std::vector<IdentifierHash>& decodedIdhs)
 {
   
   typedef CscRawDataContainer::const_iterator collection_iterator;
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h
index ded73c64b1dfd485927c732c5e103041c4688dbe..0fd634f50bf2e40ba2b115442f0d7edbc9a4fe33 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h
@@ -36,6 +36,9 @@ class CscRawDataContainer;
 ////////////////////////////////////////////////////////////////////////////////////////
 
 namespace Muon {
+
+  /// This class is only used in a single-thread mode as CscRdoToCscPrepDataToolMT has the 
+  /// equivalent functions defined for a thread-safe setup
   class CscRdoToCscPrepDataToolCore : public AthAlgTool, virtual public IMuonRdoToPrepDataTool {
 
   public:
diff --git a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonReadBSConfig.py b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonReadBSConfig.py
index d141a9df08879bd12ab95376fb2ac0c7680750eb..30a246695cbd5660b6b82e789ac5b6f017434c8c 100644
--- a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonReadBSConfig.py
+++ b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonReadBSConfig.py
@@ -27,7 +27,10 @@ def MdtROD_Decoder(name="MdtROD_Decoder",**kwargs):
 def MdtRawDataProviderTool(name="MdtRawDataProviderTool",**kwargs):
     kwargs.setdefault("Decoder", "MdtROD_Decoder")
     if DetFlags.overlay.MDT_on() and overlayFlags.isDataOverlay():
-      kwargs.setdefault("RdoLocation",overlayFlags.dataStore()+"+MDTCSM")
+        if overlayFlags.isOverlayMT():
+            kwargs.setdefault("RdoLocation",overlayFlags.bkgPrefix()+"MDTCSM")
+        else:
+            kwargs.setdefault("RdoLocation",overlayFlags.dataStore()+"+MDTCSM")
     return CfgMgr.Muon__MDT_RawDataProviderToolMT(name,**kwargs)
 
 
@@ -44,7 +47,10 @@ def RpcROD_Decoder(name="RpcROD_Decoder",**kwargs):
 def RpcRawDataProviderTool(name = "RpcRawDataProviderTool",**kwargs):
     kwargs.setdefault("Decoder", "RpcROD_Decoder")
     if DetFlags.overlay.RPC_on() and overlayFlags.isDataOverlay():
-      kwargs.setdefault("RdoLocation", overlayFlags.dataStore()+"+RPCPAD")
+        if overlayFlags.isOverlayMT():
+            kwargs.setdefault("RdoLocation", overlayFlags.bkgPrefix()+"RPCPAD")
+        else:
+            kwargs.setdefault("RdoLocation", overlayFlags.dataStore()+"+RPCPAD")
     return CfgMgr.Muon__RPC_RawDataProviderToolMT(name,**kwargs)
 
 
@@ -61,7 +67,10 @@ def TgcROD_Decoder(name = "TgcROD_Decoder",**kwargs):
 def TgcRawDataProviderTool(name = "TgcRawDataProviderTool",**kwargs):
     kwargs.setdefault("Decoder", "TgcROD_Decoder")
     if DetFlags.overlay.TGC_on() and overlayFlags.isDataOverlay():
-      kwargs.setdefault("RdoLocation", overlayFlags.dataStore()+"+TGCRDO")
+        if overlayFlags.isOverlayMT():
+            kwargs.setdefault("RdoLocation", overlayFlags.bkgPrefix()+"TGCRDO")
+        else:
+            kwargs.setdefault("RdoLocation", overlayFlags.dataStore()+"+TGCRDO")
     return CfgMgr.Muon__TGC_RawDataProviderToolMT(name,**kwargs)
 
 
@@ -77,7 +86,10 @@ def CscROD_Decoder(name = "CscROD_Decoder",**kwargs):
 def CscRawDataProviderTool(name = "CscRawDataProviderTool",**kwargs):
     kwargs.setdefault("Decoder", "CscROD_Decoder")
     if DetFlags.overlay.CSC_on() and overlayFlags.isDataOverlay():
-      kwargs.setdefault("RdoLocation", overlayFlags.dataStore()+"+CSCRDO")
+        if overlayFlags.isOverlayMT():
+            kwargs.setdefault("RdoLocation", overlayFlags.bkgPrefix()+"CSCRDO")
+        else:
+            kwargs.setdefault("RdoLocation", overlayFlags.dataStore()+"+CSCRDO")
     return CfgMgr.Muon__CSC_RawDataProviderToolMT(name,**kwargs)
     
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/MuonEventAthenaPool_test.txt b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/MuonEventAthenaPool_test.txt
index ece7c5043ba3bb73ae416e934755101eb8f8614b..19791156cd4e560725e099eb2423b94700d848af 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/MuonEventAthenaPool_test.txt
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/MuonEventAthenaPool_test.txt
@@ -1,4 +1,4 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
 TGCcablingServerSvc.forcedUse = true;
 #include "IOVSvc/IOVSvc.txt"
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p1_test.ref
index 3cc8a04ce49fbd5506e6e5dd1839523dec25e99d..4a294b1ab94c2abc84db380982653e6158dcc16f 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/MuonEventAthenaPool_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/../share/MuonEventAthenaPool_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO # (3,1): TGCcablingServerSvc.forcedUse = 1
 JobOptionsSvc        INFO Job options successfully read in from ../share/MuonEventAthenaPool_test.txt
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref
index bfa4b2ddaafd1dc7fd1ace86d48f051ff578e78f..7b7f6c23c624511708b9042832633aa24a2d7919 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/MuonEventAthenaPool_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/../share/MuonEventAthenaPool_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO # (3,1): TGCcablingServerSvc.forcedUse = 1
 JobOptionsSvc        INFO Job options successfully read in from ../share/MuonEventAthenaPool_test.txt
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p1_test.ref
index 28eace07793b66b63a7af313eb8205404d609d26..ba1e5f3511c3314bb7f38fe35de1d900eaa1f0f2 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/MuonEventAthenaPool_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/MuonEventAthenaPool_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO # (3,1): TGCcablingServerSvc.forcedUse = 1
 JobOptionsSvc        INFO Job options successfully read in from ../share/MuonEventAthenaPool_test.txt
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p2_test.ref
index 967d3b76e385249998ce65f1046460e615ddc4fd..77400977a10dddcde60cc0cf68f98157b1f24d81 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/MuonEventAthenaPool_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/MuonEventAthenaPool_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO # (3,1): TGCcablingServerSvc.forcedUse = 1
 JobOptionsSvc        INFO Job options successfully read in from ../share/MuonEventAthenaPool_test.txt
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p3_test.ref
index 94f40ab95502a380f0c25ebe2a428b669c9462b9..a7cc616457b78f77b6842b7c255780d225f08d6c 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p3_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/TgcRdoCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/MuonEventAthenaPool_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/MuonEventAthenaPool_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO # (3,1): TGCcablingServerSvc.forcedUse = 1
 JobOptionsSvc        INFO Job options successfully read in from ../share/MuonEventAthenaPool_test.txt
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CompetingMuonClustersOnTrackCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CompetingMuonClustersOnTrackCnv_p2_test.ref
index 8b95877006b9d9372314b02097e88ff1c5f54719..3c50c1642a444a9b155e398bc90631a7ec9f8ac4 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CompetingMuonClustersOnTrackCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CompetingMuonClustersOnTrackCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscClusterOnTrackCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscClusterOnTrackCnv_p2_test.ref
index eb7e46d2ac9f20d19b39592c79e840bfa51123f0..80f2a7c8a758f6e81459b471d52d091eef43094f 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscClusterOnTrackCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscClusterOnTrackCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p1_test.ref
index e4e220ef8a62a3cfe73b75bdf269d8a4704c5cc8..a463acacecb056c45c29ee01141bcaa525926453 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p2_test.ref
index 3baef6e3f4e865ab2623a6e4444232fe4705298c..cea147a8d8eac2fbf3bbcaf3a9bd2746ee2db16e 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscPrepDataContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscStripPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscStripPrepDataContainerCnv_p1_test.ref
index 2370d71c91755e5e005e6ddbf1bcc38da1a237df..926b5347c3ad146a199427412130198f674fbb1a 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscStripPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscStripPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MMPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MMPrepDataContainerCnv_p1_test.ref
index 96b75544dbf6e64cd776eb60b5de668cc96a912d..93fd0cd6a5227e32171ebecb97e3cafee9fda221 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MMPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MMPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_ClusterOnTrackCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_ClusterOnTrackCnv_p1_test.ref
index 38e08957f3a966f6c9d7e11c7b4f68d4b48278c2..e55934786df9e6ed4635fea8551f6872a8621ce5 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_ClusterOnTrackCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_ClusterOnTrackCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p1_test.ref
index d22980deb84877856f6ea726d431df72db72476f..1f43aa615789d4c51545f3fabfaaae7611588677 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p2_test.ref
index 4c32314c13f30a0aca3eb31b9c34a8b20d6bea78..944ac6415254d31fb4aa2ba7107a0c78ce7646f6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MM_DigitContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtDriftCircleOnTrackCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtDriftCircleOnTrackCnv_p2_test.ref
index 987ce23fb6fbdbd91f357bf5d83339874973e052..f9cee4c88157c2a92437c793cc9902aad10460c3 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtDriftCircleOnTrackCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtDriftCircleOnTrackCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p1_test.ref
index 981337c2b92dd683c462aea2156e57735a2a85a3..1584f712d129f7b79dd198d27c2ee89a29a1f87d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p2_test.ref
index 981337c2b92dd683c462aea2156e57735a2a85a3..1584f712d129f7b79dd198d27c2ee89a29a1f87d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MdtPrepDataContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonEventTPCnv_test.txt b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonEventTPCnv_test.txt
index 8104e46f1dd933f98942a4b86c208bce91a80285..204aecf3452f8be96c105b346ffc2a60c035af33 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonEventTPCnv_test.txt
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonEventTPCnv_test.txt
@@ -1,3 +1,3 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc" };
 #include "IOVSvc/IOVSvc.txt"
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcClusterOnTrackCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcClusterOnTrackCnv_p3_test.ref
index 2e973c04a6c1b6ede5694335bdaaca8d759bbe42..6793b6c6c481338faf8a83c85f0b191c50a6e50b 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcClusterOnTrackCnv_p3_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcClusterOnTrackCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcCoinDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcCoinDataContainerCnv_p1_test.ref
index 4528d183142fc32e9223dff01bfbaebbed2aeda3..fbb360bf46942210cd4cb488c9bd391d819d5557 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcCoinDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcCoinDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p1_test.ref
index 981337c2b92dd683c462aea2156e57735a2a85a3..1584f712d129f7b79dd198d27c2ee89a29a1f87d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p2_test.ref
index 6619bca36ffc9728a8919f534f049854a9e38b39..42c3c15a2ba237665b5f72b09a3469a8faa2dc7d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p3_test.ref
index 6619bca36ffc9728a8919f534f049854a9e38b39..42c3c15a2ba237665b5f72b09a3469a8faa2dc7d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p3_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/RpcPrepDataContainerCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_ClusterOnTrackCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_ClusterOnTrackCnv_p1_test.ref
index 3c57dbdb485d696c272e7ae6d420cac314b88598..f3f1295795bd68d57d356996c3d3834ff004d0ec 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_ClusterOnTrackCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_ClusterOnTrackCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_DigitContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_DigitContainerCnv_p1_test.ref
index 35e2bd565aa4188a88c2af3c41ab61ae8efe1883..15caa6ea8b8584258de8d70ae032ea7c3fd61a37 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_DigitContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_DigitContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_RawDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_RawDataContainerCnv_p1_test.ref
index b1241a74ca9cde51c40ff25983aca152e5e8566c..f33987f72618cb35b7110c42b796c8d41936dcc7 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_RawDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/STGC_RawDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcClusterOnTrackCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcClusterOnTrackCnv_p2_test.ref
index 7a619941921fe10b2054f8e90044a25fec5b9901..afb0082ce2f5810854fa2710ae4136bf9e013fd6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcClusterOnTrackCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcClusterOnTrackCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p1_test.ref
index 4f7c5a0c2e26e414c6d1bca13cf6ec3fb235daf2..1154f6d092517e4b8f48f442dbced038456c5d44 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p2_test.ref
index 67e8a017e9c2dc91847155ed2d38c4f1a73e551c..c3171a22bf8f7cd7afd63e2b10bd77335320ad7a 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p3_test.ref
index bbad59bb010d086ddc66174dd6166521fc95b130..e3a93452533b3c8f342692961f9ee50167f3338b 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p3_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcCoinDataContainerCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p1_test.ref
index 1fc5a8a2ba448ae333e18bb198619e240a9f5ba2..4917471e954852e1d00b91d6f84ae1c02a3c0ca2 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p2_test.ref
index 812cc81fec09163e557309ca9dc7f4650144fda3..bd3c418438615fe102cf5d749d27beab70af0dd0 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p3_test.ref
index 812cc81fec09163e557309ca9dc7f4650144fda3..bd3c418438615fe102cf5d749d27beab70af0dd0 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p3_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/TgcPrepDataContainerCnv_p3_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/sTgcPrepDataContainerCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/sTgcPrepDataContainerCnv_p1_test.ref
index 807907fa4bc9f22babeb3674d671632fabf39cdc..8878998c78af6485a700a6f4327bef16d17d4bac 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/sTgcPrepDataContainerCnv_p1_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/sTgcPrepDataContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-dbg/x86_64-centos7-gcc8-dbg/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-dbg/x86_64-centos7-gcc8-dbg/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore", "Athena::RCUSvc"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-dbg/x86_64-centos7-gcc8-dbg/jobOptions/MuonEventTPCnv/MuonEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrackCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrackCnv_p2.cxx
index 1eaa56155c646587fe1c3342b68277a5ea974861..1eca696113fdf35a130bd0582bdfa10a5be88c00 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrackCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrackCnv_p2.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------------
@@ -51,7 +51,7 @@ CompetingMuonClustersOnTrackCnv_p2::transToPers( const Muon::CompetingMuonCluste
     persObj->m_containedChildRots.push_back( toPersistent(&rotCnv, p, log) );
   }
     
-  persObj->m_associatedSurface     = toPersistent(&m_surfCnv, &transObj->associatedSurfaceRaw(), log);
+  persObj->m_associatedSurface     = toPersistent(&m_surfCnv, transObj->associatedSurfaceRaw(), log);
 }
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..fdac45c0a17dd56b5b0f317cc019fa02825235fd
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MuonSpectrometer/MuonCnv/MuonMDT_CnvTools
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx
index 573f5ee6c987fc03cf410b02763f46ba5d76c549..5d9859afe9bd85a44b0a764bf106f9234595ed18 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx
@@ -2,6 +2,8 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "CxxUtils/checker_macros.h"
+
 #include "MDT_RawDataProviderTool.h"
 #include "MuonRDO/MdtCsmContainer.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
@@ -72,7 +74,8 @@ StatusCode Muon::MDT_RawDataProviderTool::convert( const std::vector<const OFFLI
   return convert(vecRobs);
 }
 
-StatusCode Muon::MDT_RawDataProviderTool::convert( const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs)
+/// This decode function is for single-thread running only
+StatusCode Muon::MDT_RawDataProviderTool::convert ATLAS_NOT_THREAD_SAFE ( const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs)
 {
   ATH_MSG_VERBOSE("convert(): " << vecRobs.size()<<" ROBFragments.");
     
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h
index 6a692cbbf7cfff34aa3970b076e42d4f0ce502ec..ee6302337ed2a36e4ed501164237ea1c6c6ae19f 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h
@@ -4,6 +4,8 @@
 
 #ifndef MUONMDTCNVTOOLS_MUONMDTRAWDATAPROVIDERTOOL_H
 #define MUONMDTCNVTOOLS_MUONMDTRAWDATAPROVIDERTOOL_H
+   
+#include "CxxUtils/checker_macros.h"
 
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
@@ -21,8 +23,8 @@ namespace Muon
     @author  Edward Moyse <Edward.Moyse@cern.ch>
     @author  Mark Owen <markowen@cern.ch>
 */  
-
-class MDT_RawDataProviderTool : virtual public IMuonRawDataProviderTool, public MDT_RawDataProviderToolCore
+/// This class is only used in a single-thread mode
+class ATLAS_NOT_THREAD_SAFE MDT_RawDataProviderTool : virtual public IMuonRawDataProviderTool, public MDT_RawDataProviderToolCore
 {
   public:    
   MDT_RawDataProviderTool(const std::string&,const std::string&,const IInterface*);
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
index b60e60d219447ff62fa896ff8f535d0f40ad17f8..32010ab07ac20f40ca91240fd3a3824c52d79cbf 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
@@ -8,6 +8,7 @@
 #include "MuonRDO/MdtCsm.h"
 #include "MuonRDO/MdtCsmContainer.h"
 #include "ByteStreamData/RawEvent.h" 
+#include "MuonReadoutGeometry/MuonDetectorManager.h"
 
 // default constructor
 Muon::MdtCsmContByteStreamTool::MdtCsmContByteStreamTool
@@ -49,29 +50,27 @@ StatusCode Muon::MdtCsmContByteStreamTool::convert(CONTAINER* cont, RawEventWrit
   
   FullEventAssembler<MDT_Hid2RESrcID>::RODDATA*  theROD ;
   
-  MdtCsmContainer::const_iterator it_coll = cont->begin(); 
-  MdtCsmContainer::const_iterator it_coll_end = cont->end(); 
-  
   std::map<uint32_t, MdtROD_Encoder> mapEncoder; 
+
+  const MuonGM::MuonDetectorManager* mdm = nullptr;
+  ATH_CHECK( detStore()->retrieve (mdm,"Muon") );
+  const MdtIdHelper& mdtIdHelper = *mdm->mdtIdHelper();
   
   ATH_MSG_DEBUG(" number of collections "<< cont->size());
-  for( ; it_coll!=it_coll_end;++it_coll) {
-    Identifier coll_id = (*it_coll)->identify(); 
+  for (const MdtCsm* csm : *cont) {
+    Identifier coll_id = csm->identify(); 
     uint32_t rodId = m_hid2re->getRodID(coll_id); 
-    mapEncoder[rodId].add(*it_coll);
+    mapEncoder.try_emplace (rodId, mdtIdHelper).first->second.add(csm);
   } 
   
-  std::map<uint32_t,MdtROD_Encoder>::iterator it     = mapEncoder.begin(); 
-  std::map<uint32_t,MdtROD_Encoder>::iterator it_end = mapEncoder.end();
-  
   // MdtCsm_Encoder has collected all the csm, now can fill the
   // ROD block data. 
   
   ATH_MSG_DEBUG(" start to fill Rod ");
-  
-  for (; it!=it_end;++it) { 
-    theROD  = m_fea.getRodData( (*it).first ); 
-    ((*it).second).fillROD( *theROD ) ; 
+
+  for (auto& p : mapEncoder) {
+    theROD  = m_fea.getRodData( p.first ); 
+    p.second.fillROD( *theROD ) ; 
   } 
   
   ATH_MSG_DEBUG(" filling the Raw Event ... ");
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx
index 90ce38fed44d890ed675227c581d1f55e1a8e81b..805bfa915b1672619c46a9fede299853227f3fa9 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.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
 */
 
 // Implementation of MdtROD_Encoder class 
@@ -11,8 +11,6 @@
 #include "MdtROD_Encoder.h" 
 
 #include "StoreGate/StoreGateSvc.h"
-#include "StoreGate/StoreGate.h"
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonIdHelpers/MdtIdHelper.h"
 
 #include "MDT_Hid2RESrcID.h"
@@ -24,12 +22,10 @@
 /** constructor 
 */ 
 
-MdtROD_Encoder::MdtROD_Encoder() : m_mdm(0), m_BMGid(-1)
+MdtROD_Encoder::MdtROD_Encoder (const MdtIdHelper& mdtIdHelper)
+  : m_mdtIdHelper (mdtIdHelper),
+    m_BMGid (mdtIdHelper.stationNameIndex("BMG"))
 {
-  StoreGateSvc *detStore = StoreGate::pointer("DetectorStore");
-  if(detStore->retrieve(m_mdm,"Muon").isSuccess())
-  m_mdtIdHelper = m_mdm->mdtIdHelper();
-  m_BMGid = m_mdtIdHelper->stationNameIndex("BMG");
 }
 
 /** destructor 
@@ -111,7 +107,7 @@ void MdtROD_Encoder::fillROD(std::vector<uint32_t>& v)
   for ( ; it != it_end ; ++it) {
     const MdtCsm * csm = (*it);
     
-    bool isBMG = m_mdtIdHelper->stationName(csm->identify()) == m_BMGid;
+    bool isBMG = m_mdtIdHelper.stationName(csm->identify()) == m_BMGid;
 
     uint16_t ctwc = 0;     // Trailer word count initialized
     
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.h
index 8272085448b9eeb1a59c9e428369b82e3759910c..48d12b64858734631305f005f883ca75c7ea35bd 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.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 MUONBYTESTREAM_MDTROD_ENCODER_H
@@ -41,7 +41,7 @@ public:
 
 	/** constructor 
 	*/
-	MdtROD_Encoder(); 
+	MdtROD_Encoder (const MdtIdHelper& mdtIdHelper); 
 
 
 	/** destructor 
@@ -70,8 +70,7 @@ private:
 
 	//	RPC_Hid2RESrcID* m_hid2re; 
 	std::vector<const MdtCsm*> m_vMdtCsm;
-	const MdtIdHelper* m_mdtIdHelper;
-	const MuonGM::MuonDetectorManager* m_mdm;
+	const MdtIdHelper& m_mdtIdHelper;
 	int m_BMGid;
 } ; 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
index b72b1fc24e0b8a4d5995493ff293207ebacde85d..1c11ae58838e5bd6ec8088a563610350ad2a6800 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
@@ -1,6 +1,8 @@
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
+           
+#include "CxxUtils/checker_macros.h"
 
 #include "MdtRdoToPrepDataTool.h"
 
@@ -19,7 +21,7 @@ StatusCode Muon::MdtRdoToPrepDataTool::initialize()
   return StatusCode::SUCCESS;
 }
 
-Muon::MdtRdoToPrepDataTool::SetupMdtPrepDataContainerStatus Muon::MdtRdoToPrepDataTool::setupMdtPrepDataContainer()
+Muon::MdtRdoToPrepDataTool::SetupMdtPrepDataContainerStatus Muon::MdtRdoToPrepDataTool::setupMdtPrepDataContainer ATLAS_NOT_THREAD_SAFE()
 {
   if(!evtStore()->contains<Muon::MdtPrepDataContainer>(m_mdtPrepDataContainerKey.key())){	 
     m_fullEventDone=false;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
index 5c648e499bcf4c8289601f1f2894d5dd4b26b267..1ea69192d30d15b768039d8daf7a2c2822630e1c 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
@@ -4,7 +4,7 @@
 
 #ifndef MUONMdtRdoToPrepDataTool_H
 #define MUONMdtRdoToPrepDataTool_H
-
+     
 #include "MdtRdoToPrepDataToolCore.h"
 
 namespace Muon 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..bc2954bf38979ba5c8323fb02296fc9733594453
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MuonSpectrometer/MuonCnv/MuonRPC_CnvTools
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_Hid2RESrcID.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_Hid2RESrcID.h
index 608e5dd415065981d12aabcda790c00e8f6de269..6cc3af7fde1567e70bb657e5a512b3e2b21ff684 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_Hid2RESrcID.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_Hid2RESrcID.h
@@ -14,6 +14,8 @@
 #include <stdint.h> 
 #include <map>
 
+#include "CxxUtils/checker_macros.h"
+
 class RPC_Hid2RESrcID {
 
 public:
@@ -44,7 +46,7 @@ private:
 
   int m_specialROBNumber;
 
-  mutable Athena::MsgStreamMember m_msg;
+  mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE;
   
 };
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.h
index 1970d3489fbc1e8e649bbd70a79a3418df5d7537..e4029a4431dce8785c959bf2a3fce4d0f54b2847 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.h
@@ -5,6 +5,8 @@
 #ifndef MUONRPCRAWDATAPROVIDERTOOL_H
 #define MUONRPCRAWDATAPROVIDERTOOL_H
 
+#include "CxxUtils/checker_macros.h"
+
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
@@ -19,8 +21,8 @@ namespace Muon
 {
     class IRpcROD_Decoder;
 
-
-class RPC_RawDataProviderTool : virtual public IMuonRawDataProviderTool, 
+/// This class is only used in a single-thread mode
+class ATLAS_NOT_THREAD_SAFE RPC_RawDataProviderTool : virtual public IMuonRawDataProviderTool, 
                                         public RPC_RawDataProviderToolCore
 {
     public:
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h
index 26a1f593214ae2df132a6cbb502c9effe4f635ce..b5a1d27b5826924caa3b65824fd8c2321e48b51d 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h
@@ -30,6 +30,8 @@
 #include "RPC_CondCabling/RpcCablingCondData.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
+#include "CxxUtils/checker_macros.h"
+
 #include <atomic>
 #include <cassert>
 #include <stdint.h>
@@ -113,7 +115,7 @@ namespace Muon
     
     //====LBTAG==== Added 02112008 for buffer format check
     int m_printerror;
-    mutable std::atomic_int m_RPCcheckfail[13];
+    mutable std::atomic_int m_RPCcheckfail[13] ATLAS_THREAD_SAFE;
     IntegerProperty m_maxprinterror;
     
     //====LBTAG==== Added 02112008 for buffer format check
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Encoder.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Encoder.h
index 47c72b4aaaf950d104472a9a11732a4941087273..bd47017adfbf49a7a887546ff9c8e2001cdd703e 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Encoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Encoder.h
@@ -20,6 +20,8 @@
 
 #include "RPC_Hid2RESrcID.h"
 
+#include "CxxUtils/checker_macros.h"
+
 /** This class provides conversion from BS to ROD format. 
    * @author H. Ma
    * @version  0-0-1 , Oct 7, 2002
@@ -82,7 +84,7 @@ private:
 	std::vector<const RpcPad*> m_vRpcPad;  
 
 
-	mutable Athena::MsgStreamMember m_msg;
+	mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE;
 } ; 
 
 #endif
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx
index 863cf9d74ad8a1ad987039cb9a204d4db0cd70d5..20db990da7f3884167f21c33cff64b630785380b 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx
@@ -2,6 +2,10 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+/// This code is used in both MT and single-thread
+/// However the MT code uses the const cast in a single-thread
+/// mode by transfering the contents to a thread-safe container
+/// in order to prevent complex adjustments in the core decode functions
 
 #include "RpcRdoToPrepDataTool.h"
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h
index d871817d7876042f68ca8e615aa08e0f1829bbf2..9929175b29fe2dd1e5f72fcc56b10ce9247d870e 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h
@@ -5,11 +5,18 @@
 #ifndef MUONRDOTOPREPDATA_RPCRDOTOPREPDATATOOL_H
 #define MUONRDOTOPREPDATA_RPCRDOTOPREPDATATOOL_H
 
+/// This code is used in both MT and single-thread                      
+/// However the MT code uses the const cast in a single-thread          
+/// mode by transfering the contents to a thread-safe container         
+/// in order to prevent complex adjustments in the core decode functions
+/// As such, it should not be flagged at this stage as unsafe           
+#include "CxxUtils/checker_macros.h"
+
 #include "RpcRdoToPrepDataToolCore.h"
 
 namespace Muon {
-
-class RpcRdoToPrepDataTool : virtual public RpcRdoToPrepDataToolCore {
+/// This class is only used in a single-thread mode
+class ATLAS_NOT_THREAD_SAFE RpcRdoToPrepDataTool : virtual public RpcRdoToPrepDataToolCore {
 public:
   RpcRdoToPrepDataTool( const std::string&, const std::string&, const IInterface* );
   virtual ~RpcRdoToPrepDataTool()=default;
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
index 56c363ab1da9a0502ab85f79bda09b042a1f7625..549fa75b01fa0d1dfb96bbd4923ebb493be85162 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
@@ -54,7 +54,7 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::finalize()
   return RpcRdoToPrepDataToolCore::finalize();
 }
 
-StatusCode Muon::RpcRdoToPrepDataToolMT::manageOutputContainers(bool& firstTimeInTheEvent)
+StatusCode Muon::RpcRdoToPrepDataToolMT::manageOutputContainers (bool& firstTimeInTheEvent)
 {
   // We will need to retrieve from cache even in different threads
   SG::WriteHandle< Muon::RpcPrepDataContainer >rpcPRDHandle(m_rpcPrepDataContainerKey);
@@ -142,7 +142,8 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::manageOutputContainers(bool& firstTimeI
   return StatusCode::SUCCESS;
 }
 
-StatusCode Muon::RpcRdoToPrepDataToolMT::decode( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect ){
+/// This code is thread-safe as we will propagate local thread collection contents to a thread-safe one
+StatusCode Muon::RpcRdoToPrepDataToolMT::decode ( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect ){
   ATH_MSG_DEBUG("Calling Core decode function from MT decode function (hash vector)");
   StatusCode status = Muon::RpcRdoToPrepDataToolCore::decode( idVect, selectedIdVect );
   if (status.isFailure()){
@@ -158,7 +159,8 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::decode( std::vector<IdentifierHash>& id
   return StatusCode::SUCCESS;
 }
 
-StatusCode Muon::RpcRdoToPrepDataToolMT::decode( const std::vector<uint32_t>& robIds ){
+/// This code is thread-safe as we will propagate local thread collection contents to a thread-safe one
+StatusCode Muon::RpcRdoToPrepDataToolMT::decode ( const std::vector<uint32_t>& robIds ){
   ATH_MSG_DEBUG("Calling Core decode function from MT decode function (ROB vector)");
   StatusCode status = Muon::RpcRdoToPrepDataToolCore::decode( robIds );
   if (status.isFailure()){
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h
index d0468b4be10c5dc6c6db26fb4426421133aa1680..9943feee707fc79df44223b1fa39b45c8df08f27 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h
@@ -9,7 +9,6 @@
 #include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 #include "MuonTrigCoinData/MuonTrigCoinData_Cache.h"
 
-
 namespace Muon {
 
 class RpcRdoToPrepDataToolMT : virtual public RpcRdoToPrepDataToolCore {
@@ -18,11 +17,11 @@ public:
   virtual ~RpcRdoToPrepDataToolMT();
   virtual StatusCode initialize() override;
   virtual StatusCode finalize() override;
-  virtual StatusCode decode( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect ) override;
-  virtual StatusCode decode( const std::vector<uint32_t>& robIds ) override;
+  virtual StatusCode decode ( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect ) override;
+  virtual StatusCode decode ( const std::vector<uint32_t>& robIds ) override;
   
 protected:
-  virtual StatusCode manageOutputContainers(bool& firstTimeInTheEvent) override;
+  StatusCode manageOutputContainers(bool& firstTimeInTheEvent) override;
   StatusCode transferOutputToCache();
   void printMT();
 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/MuonTGC_CnvTools/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/MuonTGC_CnvTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..cdb8107fb97fbf3fab3a986347c1ce3549621939
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/MuonTGC_CnvTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+MuonSpectrometer/MuonCnv/MuonTGC_CnvTools
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h
index 945aad7ef50ffcd2fe7c24519b5a61a55b171983..6e047c09dc90af52e94e6b77636f94271bb1cbc6 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h
@@ -5,6 +5,8 @@
 #ifndef MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOL_H
 #define MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOL_H
 
+#include "CxxUtils/checker_macros.h"
+
 #include "TGC_RawDataProviderToolCore.h"
 #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
 
@@ -21,7 +23,7 @@ namespace Muon
    *  @author Mark Owen <markowen@cern.ch>
    */
   
-  class TGC_RawDataProviderTool : virtual public IMuonRawDataProviderTool, public TGC_RawDataProviderToolCore
+  class ATLAS_NOT_THREAD_SAFE TGC_RawDataProviderTool : virtual public IMuonRawDataProviderTool, public TGC_RawDataProviderToolCore
     {
     public:
       /** Default constructor */
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx
index 748e08c9535163328b8a9fe3a68391942fa361a8..11b263d8d47d489683af54ff286900afb8d0cf14 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx
@@ -61,7 +61,8 @@ StatusCode Muon::TGC_RawDataProviderToolCore::initialize()
 StatusCode Muon::TGC_RawDataProviderToolCore::convertIntoContainer(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs, TgcRdoContainer& tgcRdoContainer) 
 {    
 
-  static int DecodeErrCount = 0;
+  /// Static variables are not thread safe
+  static thread_local int DecodeErrCount = 0;
 
   // Update to range based loop
   for(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment* fragment : vecRobs){
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx
index bed052265000c9e27137303f174cc3d4ffaa04aa..20f2d990abe3fa880c9d1d148c7fe1d149afc1b6 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx
@@ -45,7 +45,11 @@ void Muon::TgcRDO_Decoder::applyPatch(bool patch)
 
 TgcDigit* Muon::TgcRDO_Decoder::getDigit(const TgcRawData * rawData, bool orFlag) const 
 {
-  if(!m_cabling && getCabling().isFailure()) return 0;
+  // ITGCcablingSvc should be configured at initialise
+  if(!m_cabling){
+    ATH_MSG_ERROR("ITGCcablingSvc is not available in TgcRDO_Decoder::getDigit()");
+    return 0;
+  }
 
   int offset=0, offsetORed=0;
 
@@ -95,7 +99,12 @@ Identifier Muon::TgcRDO_Decoder::getOfflineData(const TgcRawData * rawData, bool
 {
   Identifier chanId(0);
 
-  if(!m_cabling && getCabling().isFailure()) return chanId;
+  // ITGCcablingSvc should be configured at initialise                              
+  if(!m_cabling){
+    ATH_MSG_ERROR("ITGCcablingSvc is not available in TgcRDO_Decoder::getOfflineData()");
+    return chanId;
+  }
+
 
   bctag=TgcDigit::BC_UNDEFINED;
 
@@ -142,7 +151,7 @@ Identifier Muon::TgcRDO_Decoder::getOfflineData(const TgcRawData * rawData, bool
   return chanId;
 }
 
-StatusCode Muon::TgcRDO_Decoder::getCabling() const {
+StatusCode Muon::TgcRDO_Decoder::getCabling() {
   // get TGC cablingSvc
 
   const ITGCcablingServerSvc* TgcCabGet = 0;
@@ -155,7 +164,6 @@ StatusCode Muon::TgcRDO_Decoder::getCabling() const {
   sc = TgcCabGet->giveCabling(m_cabling);
   if(!sc.isSuccess()) {
     msg(sc.isFailure() ? MSG::FATAL : MSG::ERROR) << "Could not get ITGCcablingSvc from Server!" << endmsg;
-    m_cabling = 0;
     return sc;
   } else {
     ATH_MSG_DEBUG("Found the ITGCcablingSvc.");
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.h
index 199a9f619f8446d13c69417ddab2d731c0d23b7c..43881a9a5dcd9dac0646dd617a9beff99858261e 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.h
@@ -9,6 +9,8 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 
+#include "CxxUtils/checker_macros.h"
+
 class TgcDigit;
 class TgcRawData;
 class Identifier;
@@ -51,9 +53,9 @@ namespace Muon
       Identifier getOfflineData(const TgcRawData * rawData, bool orFlag, uint16_t& bctag) const;
 
     private:
-      StatusCode getCabling() const;
+      StatusCode getCabling();
 
-      mutable const ITGCcablingSvc *m_cabling;
+      const ITGCcablingSvc *m_cabling;
       bool m_applyPatch;
 
     };
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx
index 28c9e57122d238d3ab8d40f5a472da27397bcf29..6adda91c19e1e120d8699adcd1260797efd6daca 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx
@@ -71,7 +71,7 @@ Muon::TgcRODReadOut::~TgcRODReadOut()
   delete m_tgcSlbDataHelper; m_tgcSlbDataHelper=0;
 }
 
-TgcRdo* Muon::TgcRODReadOut::getRdo(void) const 
+const TgcRdo* Muon::TgcRODReadOut::getRdo(void) const 
 {
   return m_tgcRdo;
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.h
index 85b8cee2540a34f7bc799fd4dbe8f9723cfe7539..d6d47f6440adff6a412cd97ac2dca342d9e58554 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.h
@@ -44,7 +44,7 @@ namespace Muon
       virtual ~TgcRODReadOut();
 
       /** Get TgcRdo member */ 
-      TgcRdo * getRdo(void) const;
+      const TgcRdo * getRdo(void) const;
       /** Set TgcRdo member */ 
       StatusCode setRdo(TgcRdo * v_tgcRdo);
 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h
index 8526cce9fb816e9eb2ef2af75ac508507c935c4c..25351ae165a0e4f243eb7bb902af95a7a7e3daa4 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h
@@ -4,6 +4,8 @@
 
 #ifndef MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOL_H
 #define MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOL_H
+      
+#include "CxxUtils/checker_macros.h"
 
 #include "TgcRdoToPrepDataToolCore.h"
 
@@ -17,8 +19,8 @@ namespace Muon
    * 
    * This class was developed by Takashi Kubota. 
    */  
-
-  class TgcRdoToPrepDataTool : virtual public TgcRdoToPrepDataToolCore
+  /// This class is only used in a single-thread mode
+  class ATLAS_NOT_THREAD_SAFE TgcRdoToPrepDataTool : virtual public TgcRdoToPrepDataToolCore
   {
     public:
       /** Constructor */
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.cxx
index 13fbf3e919afac6e6709837204452bf359bd743f..993f22a7bd4f00336dd63793025277e0502e8737 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.cxx
@@ -70,6 +70,31 @@ const bool* Muon::TgcSlbData::getBitArray(const uint16_t bcTag) const
     }
   return bitArray;
 } 
+
+// This function avoids using const cast internally
+bool* Muon::TgcSlbData::getBitArray(const uint16_t bcTag)
+{
+  bool* bitArray = 0;
+  switch (bcTag)
+    {
+    case BC_CENTRAL:
+      bitArray = m_bitArray_C;
+      break;
+    case BC_PREVIOUS:
+      bitArray = m_bitArray_P;
+      break;
+    case BC_NEXT:
+      bitArray = m_bitArray_N;
+      break;
+    case BC_UNDEFINED:
+      bitArray = m_bitArray_C; // for backward compatibility           
+      break;
+    default:
+      bitArray = 0;
+      break;
+    }
+  return bitArray;
+}
   
 // store bitmap
 void Muon::TgcSlbData::setBitmap(const uint16_t bcTag,
@@ -79,7 +104,7 @@ void Muon::TgcSlbData::setBitmap(const uint16_t bcTag,
   if(cellAddr == PADDING_WORD) return;
 
   // get bit array
-  bool *bitArray = const_cast<bool*>(getBitArray(bcTag));
+  bool *bitArray = getBitArray(bcTag);
 
   // assign
   int indexMap = BITMAP_SIZE - CELL_SIZE*(cellAddr+1);
@@ -104,7 +129,7 @@ void Muon::TgcSlbData::setBit(const uint16_t bcTag,
   if(iBit >= BITMAP_SIZE) return;
 
   // get bit array
-  bool *bitArray =  const_cast<bool*>(getBitArray(bcTag));
+  bool *bitArray =  getBitArray(bcTag);
   *(bitArray+iBit)=true;
 }
 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.h
index 13b2d8dd7e8b31d03ea73d35615289907059136d..d22a9c5306b18802004b4a40a3eaedaed6ea730e 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcSlbData.h
@@ -124,6 +124,10 @@ namespace Muon
       /** Costructor */
       TgcSlbData(void); 
 
+      /** Get bitArray for a BC tag. */
+      // Non-const version which is used in this class only
+      bool * getBitArray(const uint16_t bcTag);
+
       uint16_t m_bcId;
       uint32_t m_l1Id;
       uint16_t m_sswId;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/ReadCoolStrFiles.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/ReadCoolStrFiles.py
index 193f1de6433f1e1832ad0becd12c507c32ffdeaf..2c87a1c0649d5c3c12fa9497ad9d07e182e34903 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/ReadCoolStrFiles.py
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/ReadCoolStrFiles.py
@@ -7,7 +7,7 @@
 #
 # define two instances of the ReadWriteCoolStrFile algorithm to read the data
 
-theApp.DLLs+=["DetDescrCondTools","DetDescrCondExample"]
+theApp.Dlls+=["DetDescrCondTools","DetDescrCondExample"]
 theApp.TopAlg+=["ReadWriteCoolStrFile/RWInstA","ReadWriteCoolStrFile/RWInstB"]
 
 # parameters for first instance - reads from channel 1 in folder /TEST/COOLSTR
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/allign.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/allign.py
index 6803ac223f8963a7458d2d7e5d32d338df3f17fb..fbf311dec8acfade9b7cf5c9fbd38f9de171d867 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/allign.py
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/allign.py
@@ -16,8 +16,8 @@ theApp.EvtMax = 3
 # define two instances of the ReadWriteCoolStrFile algorithm to manipulate
 # the data files
 #
-theApp.DLLs+=["MuonCondCool"]
-#theApp.DLLs+=["DetDescrCondTools","DetDescrCondExample"]
+theApp.Dlls+=["MuonCondCool"]
+#theApp.Dlls+=["DetDescrCondTools","DetDescrCondExample"]
 theApp.TopAlg+=["MuonCalib::MdtReadWriteCoolStr/RWInstA"]
 #"MuonCalib::MdtReadWriteCoolStr/RWInstA2","MuonCalib::MdtReadWriteCoolStr/RWInstA3","MuonCalib::MdtReadWriteCoolStr/RWInstA4","MuonCalib::MdtReadWriteCoolStr/RWInstA5","MuonCalib::MdtReadWriteCoolStr/RWInstA6"]
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/deadtube.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/deadtube.py
index 7ff383f2e0ab581f0a679d03f2deb8d8c448ee82..2cb256a16ca3a8f502dc43f47552e657ac2709af 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/deadtube.py
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/deadtube.py
@@ -15,7 +15,7 @@ theApp.EvtMax = 10
 # define two instances of the ReadWriteCoolStrFile algorithm to manipulate
 # the data files
 #
-theApp.DLLs+=["MuonCondCool"]
+theApp.Dlls+=["MuonCondCool"]
 
 theApp.TopAlg+=["MuonCalib::MdtTubeCondCool/RWInstA"]
                 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/t0.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/t0.py
index 95017d2574bea1f354e42b4df5779bdd69d148bd..c452ec8cc3fc2303530231abce7a7077836d5043 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/t0.py
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/share/t0.py
@@ -15,7 +15,7 @@ theApp.EvtMax = 5
 # define two instances of the ReadWriteCoolStrFile algorithm to manipulate
 # the data files
 #
-theApp.DLLs+=["MuonCondCool"]
+theApp.Dlls+=["MuonCondCool"]
 
 theApp.TopAlg+=["MuonCalib::MdtReadWriteCoolStr/RWInstA","MuonCalib::MdtReadWriteCoolStr/RWInstA2","MuonCalib::MdtReadWriteCoolStr/RWInstA3","MuonCalib::MdtReadWriteCoolStr/RWInstA4","MuonCalib::MdtReadWriteCoolStr/RWInstA5","MuonCalib::MdtReadWriteCoolStr/RWInstA6"]
 
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h
index 8143bce4ca69290fe5464582c6b232f19f14f402..a64d221ae21739e5c3b96d5200198870ac90bd57 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonChannelDesign.h
@@ -140,7 +140,7 @@ namespace MuonGM {
     //to introduce the correction for the stereo angle in the distance
     //Patrick Scholer March 18 2020
     Amg::Vector2D chLoc( (pos.x()-pos.y()*tan(sAngle))-chPos.x() , pos.y()-chPos.y());
-    if ( validMode && fabs(chLoc.x()) > 0.5*channelWidth( pos) ) {
+    if ( validMode && std::abs(chLoc.x()) > 0.5*channelWidth( pos) ) {
       MsgStream log(Athena::getMessageSvc(),"MuonChannelDesign");
       if (log.level()<=MSG::INFO) log << MSG::INFO << "Problem in identification of the channel: distance to nearest channel, channel width: "
                                       << chLoc.x()<< ", " << channelWidth(pos) << " for channel number " << chNum << endmsg;
@@ -270,9 +270,9 @@ namespace MuonGM {
 
       double locX = 0.;
 
-      if (fabs(locY)>0.5*(minYSize-deadS)) {
+      if (std::abs(locY)>0.5*(minYSize-deadS)) {
          
-        locX = 0.5*(xSize-deadO-deadI)*( 1. - (0.5*(maxYSize-deadS) -fabs(locY))/dY )+0.5*(deadI-deadO) ;
+        locX = 0.5*(xSize-deadO-deadI)*( 1. - (0.5*(maxYSize-deadS) -std::abs(locY))/dY )+0.5*(deadI-deadO) ;
 
       }
 
@@ -379,9 +379,9 @@ namespace MuonGM {
 
       double gangLength = xSize-deadO-deadI ;
 
-      if (fabs(locY)>0.5*minYSize-deadS) {
+      if (std::abs(locY)>0.5*minYSize-deadS) {
          
-        gangLength = (0.5*maxYSize-deadS - fabs(locY))/dY * (xSize-deadI-deadO);
+        gangLength = (0.5*maxYSize-deadS - std::abs(locY))/dY * (xSize-deadI-deadO);
 
       }
  
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h
index c9f42c62e5ce804ee21981b3bad643524dd41526..12e869bd182564926bc47e9ef66f2d66689fb106 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h
@@ -231,7 +231,7 @@ namespace MuonGM {
 
   inline int sTgcReadoutElement::boundaryHash( const Identifier& id ) const {
     int iphi = manager()->stgcIdHelper()->channelType(id)!=1 ? 1:0 ;      // wires and pads have locX oriented along phi
-    if (abs(getStationEta())<3) iphi += 2*(manager()->stgcIdHelper()->gasGap(id)-1);
+    if (std::abs(getStationEta())<3) iphi += 2*(manager()->stgcIdHelper()->gasGap(id)-1);
     return iphi; 
   }
 
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx
index df1436262cd9404d69c1807cc9d2ab552769f83b..1d59c4e37153dead431d1ac8fb9e7d5f91511a9d 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx
@@ -359,7 +359,7 @@ double CscReadoutElement::stripLength(int chamberLayer, int measuresPhi,
 
   double pos = stripWidth * (stripNumber-0.5-numberOfStrips/2.0);
   epsilon = lengthCorrection(measuresPhi,pos);
-  double stripPos = fabs(pos);
+  double stripPos = std::abs(pos);
 
   if (measuresPhi==0) {
     double effectiveLength = stripWidth * numberOfStrips;
@@ -399,8 +399,8 @@ double CscReadoutElement::lengthCorrection(int measuresPhi, double stripPos) con
   double shortLength  = bigLength - (bigWidth-gslWidth)*tan(alpha)/2.;
 
   if (measuresPhi == 1) {
-     if ( fabs(stripPos) > (gslWidth/2.) ) 
-        epsilon = ( fabs(stripPos)-gslWidth/2. ) * tan(alpha);
+     if ( std::abs(stripPos) > (gslWidth/2.) ) 
+        epsilon = ( std::abs(stripPos)-gslWidth/2. ) * tan(alpha);
   }
   else {
      double z0 =  shortLength-bigLength/2;
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx
index 1bc81f06831dd03244132ae3d9e99a35d9b7cce9..24f3f61ebb0e5502edcc8987381b931b198c7c0d 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/GlobalUtilities.cxx
@@ -51,7 +51,7 @@ int stationPhiTGC(std::string stName, int fi, int zi_input, std::string geometry
     std::string stName3 = stName.substr(0,3);
     int stphi = 0;
 
-    int zi = abs(zi_input);
+    int zi = std::abs(zi_input);
     fi -= 1; // start from 0 
     
 
@@ -98,7 +98,7 @@ int stationPhiTGC(std::string stName, int fi, int zi_input, std::string geometry
     {
         int nch = 3;
         if ( (stName).substr(2,1) == "E" ) nch=6;
-        int fioff = abs(zi);
+        int fioff = std::abs(zi);
         if (fioff>3 && (stName).substr(2,1) == "F")  fioff = fioff-3;
         // minumum stPhi at phi 0
         if ((stName).substr(2,1) == "F") fioff = fioff -1;
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx
index 49671680b31a8854e49699fa3daec80a85db1f28..d618bc5b582c4d18b0cd2fb1c78243f1ecd6ee28 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx
@@ -233,7 +233,7 @@ double MdtReadoutElement::distanceFromRO(Amg::Vector3D x, Identifier id) const
   double scalprod = c_ro.x()*x_ro.x()+c_ro.y()*x_ro.y()+c_ro.z()*x_ro.z();
   double wlen = getWireLength(tubelayer, tube);
   if (wlen > 10.*CLHEP::mm) 
-    scalprod = fabs(2.*scalprod/getWireLength(tubelayer, tube));
+    scalprod = std::abs(2.*scalprod/getWireLength(tubelayer, tube));
   else {
     double xx = x.x();
     double xy = x.y();
@@ -1105,11 +1105,11 @@ MdtReadoutElement::posOnDefChamWire( const Amg::Vector3D& locAMDBPos,
 #endif
 
   double s0mdt = s0; // always I think ! 
-  if (fabs(fixedPoint.x())>0.01) s0mdt = s0-fixedPoint.x();
+  if (std::abs(fixedPoint.x())>0.01) s0mdt = s0-fixedPoint.x();
   double z0mdt = z0; // unless in the D section of this station there's a dy diff. from 0 for the innermost MDT multilayer (sometimes in the barrel)
-  if (fabs(fixedPoint.y())>0.01) z0mdt = z0-fixedPoint.y();
+  if (std::abs(fixedPoint.y())>0.01) z0mdt = z0-fixedPoint.y();
   double t0mdt = t0; // unless in the D section of this station there's a dz diff. from 0 for the innermost MDT multilayer (often in barrel) 
-  if (fabs(fixedPoint.z())>0.01) t0mdt = t0-fixedPoint.z();
+  if (std::abs(fixedPoint.z())>0.01) t0mdt = t0-fixedPoint.z();
   if (z0mdt<0 || t0mdt<0) {
 #ifndef TESTBLINES
     MsgStream log(Athena::getMessageSvc(),"MdtReadoutElement");
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx
index ece408a00bdc8a1bf839aac3fc748710d28b647a..3a0d5ddde3b0f7ef68cbb8fb8e9df98b73a3238f 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx
@@ -369,11 +369,11 @@ MuonDetectorManager::muonStationKey(std::string stName, int statEtaIndex, int st
     std::string key;
     if (statEtaIndex<0)
         key = stName.substr(0,3)
-              +"_C_zi"+MuonGM::buildString(abs(statEtaIndex),2)
+              +"_C_zi"+MuonGM::buildString(std::abs(statEtaIndex),2)
               +"fi"+MuonGM::buildString(statPhiIndex,2);
     else
         key = stName.substr(0,3)
-              +"_A_zi"+MuonGM::buildString(abs(statEtaIndex),2)
+              +"_A_zi"+MuonGM::buildString(std::abs(statEtaIndex),2)
               +"fi"+MuonGM::buildString(statPhiIndex,2);
     return key;
 }
@@ -443,18 +443,18 @@ void MuonDetectorManager::addRpcReadoutElement (RpcReadoutElement* x, Identifier
   // to be addressed with a dbz_index=dbZ+1
   if (m_rpcIdHelper->stationNameString(m_rpcIdHelper->stationName(id)) == "BMS")
   {
-      if (abs(m_rpcIdHelper->stationEta(id)) == 2 &&
+      if (std::abs(m_rpcIdHelper->stationEta(id)) == 2 &&
           m_rpcIdHelper->doubletZ(id) == 3)
       {
           if (doubletPhi == 2) dbz_index++;
       }
-      else if (abs(m_rpcIdHelper->stationEta(id)) == 4 &&
+      else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 &&
                m_rpcIdHelper->doubletR(id) == 2 &&
                m_rpcIdHelper->doubletZ(id) == 3)
       {
           if (doubletPhi == 2) dbz_index++;
       }
-      else if (abs(m_rpcIdHelper->stationEta(id)) == 4 &&
+      else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 &&
                m_rpcIdHelper->doubletR(id) == 1 &&
                m_rpcIdHelper->doubletZ(id) == 2)
       {
@@ -526,18 +526,18 @@ const RpcReadoutElement* MuonDetectorManager::getRpcReadoutElement (const Identi
   // to be addressed with a dbz_index=dbZ+1
   if (m_rpcIdHelper->stationNameString(m_rpcIdHelper->stationName(id)) == "BMS")
   {
-      if (abs(m_rpcIdHelper->stationEta(id)) == 2 &&
+      if (std::abs(m_rpcIdHelper->stationEta(id)) == 2 &&
           m_rpcIdHelper->doubletZ(id) == 3)
       {
           if (doubletPhi == 2) dbz_index++;
       }
-      else if (abs(m_rpcIdHelper->stationEta(id)) == 4 &&
+      else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 &&
                m_rpcIdHelper->doubletR(id) == 2 &&
                m_rpcIdHelper->doubletZ(id) == 3)
       {
           if (doubletPhi == 2) dbz_index++;
       }
-      else if (abs(m_rpcIdHelper->stationEta(id)) == 4 &&
+      else if (std::abs(m_rpcIdHelper->stationEta(id)) == 4 &&
                m_rpcIdHelper->doubletR(id) == 1 &&
                m_rpcIdHelper->doubletZ(id) == 2)
       {
@@ -1026,7 +1026,7 @@ const RpcReadoutElement* MuonDetectorManager::getRpcRElement_fromIdFields(int i1
 
       int dbr = i4;
       int dbz = i5;
-      int absEta = abs(i2);
+      int absEta = std::abs(i2);
 
 
       // BMS 5/ |stEta|= 2 / dbR = 1 and 2 / dbZ = 3
@@ -1184,7 +1184,7 @@ MuonDetectorManager::initABlineContainers()
             id = m_cscIdHelper->elementID(stType, jzz, jff);
             if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG<<"Filling A-line container with entry for key = "<<m_cscIdHelper->show_to_string(id)<<endmsg;
         }
-        else if (m_rpcIdHelper && stType.substr(0,3)=="BML" && abs(jzz)==7) 
+        else if (m_rpcIdHelper && stType.substr(0,3)=="BML" && std::abs(jzz)==7) 
         {
             // RPC case
             id = m_rpcIdHelper->elementID(stType, jzz, jff, 1);
@@ -1464,7 +1464,7 @@ MuonDetectorManager::updateDeformations(const BLineMapContainer& blineData)
 					    <<BLine.en()<<")"<<endmsg;
 	  }
         BLine.getAmdbId(stType, jff, jzz, job);
-	if (stType.substr(0,1)=="T" || stType.substr(0,1)=="C" || (stType.substr(0,3)=="BML" && abs(jzz)==7) ) {
+	if (stType.substr(0,1)=="T" || stType.substr(0,1)=="C" || (stType.substr(0,3)=="BML" && std::abs(jzz)==7) ) {
 	  if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG
                <<"BLinePar with AmdbId "
                <<stType<<" "<<jzz<<" "<<jff<<" "<<job
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx
index 3f2674987c5a2272e606464290b404aa5737d3a8..dbd0527b041dbfd53fdfd91119ab7e32bdd0c71c 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonPadDesign.cxx
@@ -14,7 +14,7 @@ bool MuonPadDesign::withinSensitiveArea(const Amg::Vector2D& pos) const
     double bot_H2 = minSensitiveY();
     double max_x = maxAbsSensitiveX(pos.y());
     bool y_in_range = (pos.y() <= top_H1 and pos.y() >= bot_H2);
-    bool x_in_range = fabs(pos.x()) <= max_x+0.01;
+    bool x_in_range = std::abs(pos.x()) <= max_x+0.01;
     return y_in_range and x_in_range;
 }
 //----------------------------------------------------------
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx
index 58d1431c8e008b1cd1fba9efa6e6a882a38676f8..c35a4cfe3a77d246b6d403ceb165596c1dcd2a50 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx
@@ -76,7 +76,7 @@ void MuonStation::setNominalAmdbLRSToGlobal(HepGeom::Transform3D xf)
 void MuonStation::setBlineFixedPointInAmdbLRS(double s0, double z0, double t0)
 {
   #ifndef NDEBUG
-  if ((std::fabs(s0)+std::fabs(z0)+std::fabs(t0))>0.01) {
+  if ((std::abs(s0)+std::abs(z0)+std::abs(t0))>0.01) {
     MsgStream log(Athena::getMessageSvc(),"MuonStation");
     if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "Station "<<getStationType()
 	      <<" at zi/fi "<<getEtaIndex()<<"/"<<getPhiIndex()
@@ -125,7 +125,7 @@ void  MuonStation::updateBlineFixedPointInAmdbLRS()
 	  // Correct for tube staggering on barrel side C
 	  double shiftInZ = -0.5 * mdtRE->tubePitch();
 
-	  // in addition, correct for 35µm glue width incorrectly applied
+	  // in addition, correct for 35microm glue width incorrectly applied
 	  double multilayerRealSize = 0;
 	  for (int ilayer=1; ilayer<=2; ++ilayer) {
 	    double val;
@@ -225,7 +225,7 @@ MuonStation::setDelta_fromAline(double tras, double traz, double trat,
   m_rott = rott;
   
   HepGeom::Transform3D delta_amdb = HepGeom::Transform3D::Identity;
-  if (std::fabs(tras)+std::fabs(traz)+std::fabs(trat)+(std::fabs(rots)+std::fabs(rotz)+std::fabs(rott))*1000. > 0.01)
+  if (std::abs(tras)+std::abs(traz)+std::abs(trat)+(std::abs(rots)+std::abs(rotz)+std::abs(rott))*1000. > 0.01)
   {
       // compute the delta transform in the local AMDB frame 
       delta_amdb = HepGeom::TranslateX3D(tras)*HepGeom::TranslateY3D(traz)*
@@ -337,7 +337,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex,
 	       <<getStationName()<<" at zi/fi = "<<getEtaIndex()<<"/"<<getPhiIndex()<<endmsg;
       return;
   }
-  if (std::fabs(tras)+std::fabs(traz)+std::fabs(trat)+(std::fabs(rots)+std::fabs(rotz)+std::fabs(rott))*1000. < 0.01)
+  if (std::abs(tras)+std::abs(traz)+std::abs(trat)+(std::abs(rots)+std::abs(rotz)+std::abs(rott))*1000. < 0.01)
   {
     if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG <<"setDelta_fromAline_forComp: A-line ignored --- too small (translations < 10microns & rotations <10microrad)"<<endmsg;
     return;
@@ -353,7 +353,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex,
   //HepGeom::Point3D<double> thisREcenter = getMuonReadoutElement(jobindex)->center();
   HepGeom::Point3D<double> thisREnominalCenter=(HepGeom::Transform3D(Amg::EigenTransformToCLHEP(getMuonReadoutElement(jobindex)->defTransform())))*HepGeom::Point3D<double>(0.,0.,0.); 
   double  Rcomp =  thisREnominalCenter.perp()-(getMuonReadoutElement(jobindex)->getRsize())/2.;
-  double  DZcomp = std::fabs(thisREnominalCenter.z())-std::fabs(((*m_amdbl_to_global)*HepGeom::Point3D<double>(0.,0.,0)).z())-std::fabs((getMuonReadoutElement(jobindex)->getZsize())/2.);
+  double  DZcomp = std::abs(thisREnominalCenter.z())-std::abs(((*m_amdbl_to_global)*HepGeom::Point3D<double>(0.,0.,0)).z())-std::abs((getMuonReadoutElement(jobindex)->getZsize())/2.);
 
   HepGeom::Transform3D  childToLocAmdbComponent;
   HepGeom::Transform3D  childToLocAmdbStation = HepGeom::Transform3D(*m_native_to_amdbl)*parentToChildT;
@@ -567,8 +567,8 @@ double MuonStation::RsizeMdtStation() const
 	    }
 	  else 
 	    {
-	      if (barrel()) Rsize += std::fabs(Rpos.x()-RposFirst.x());
-	      else  Rsize += std::fabs(Rpos.y()-RposFirst.y());
+	      if (barrel()) Rsize += std::abs(Rpos.x()-RposFirst.x());
+	      else  Rsize += std::abs(Rpos.y()-RposFirst.y());
 	    }
 	}
     }
@@ -609,8 +609,8 @@ double MuonStation::ZsizeMdtStation() const
 	    }
 	  else 
 	    {
-	      if (barrel()) Zsize += std::fabs(Zpos.z()-ZposFirst.z());
-	      else  Zsize += std::fabs(Zpos.x()-ZposFirst.x());
+	      if (barrel()) Zsize += std::abs(Zpos.z()-ZposFirst.z());
+	      else  Zsize += std::abs(Zpos.x()-ZposFirst.x());
 	    }
 	}
     }
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/share/MDT_DigitizationStandalone_jobOptions.py b/MuonSpectrometer/MuonDigitization/MDT_Digitization/share/MDT_DigitizationStandalone_jobOptions.py
index 36daaf11736bffc771e67a79fb787c33c7572d4a..921efd03079e256298db45fab32416c614636830 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/share/MDT_DigitizationStandalone_jobOptions.py
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/share/MDT_DigitizationStandalone_jobOptions.py
@@ -13,8 +13,8 @@ EventSelector = Service( "EventSelector" )
 EventSelector.InputCollection = "NewPoolTry"
 theApp.Dlls += [ "MDT_Digitization"]
 theApp.Dlls += [ "GaudiAlg" ,"GaudiAud"]
-#ApplicationMgr.DLLs += { "EventHdrAthenaRoot", "MuonSimHitAthenaRoot"};
-#ApplicationMgr.DLLs   += { "RootSvcModules" , "AthenaRootCnvSvc"  };
+#ApplicationMgr.Dlls += { "EventHdrAthenaRoot", "MuonSimHitAthenaRoot"};
+#ApplicationMgr.Dlls   += { "RootSvcModules" , "AthenaRootCnvSvc"  };
 #ApplicationMgr.ExtSvc += { "RootSvc" };
 include( "MuonDetMgrDetDescrCnv/MuonDetMgrDetDescrCnv_joboptions.py" )
 
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h
index 2163d38de5da6b96d52a064fdf64ae9dc1300aa5..b879888dabe75e8682b830cdee757ff36533ab43 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_StripsResponseSimulation.h
@@ -112,7 +112,7 @@ private:
   float m_qThreshold;
 
 
-  /** // 0.350/10 diffusSigma=transverse diffusion (350 μm per 1cm ) for 93:7 @ 600 V/cm, according to garfield  */
+  /** // 0.350/10 diffusSigma=transverse diffusion (350 microm per 1cm ) for 93:7 @ 600 V/cm, according to garfield  */
   float m_transverseDiffusionSigma;
   float m_longitudinalDiffusionSigma;
   float m_pitch;
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx
index c3ba21bcae304bf8c13586f70aca5842d3facb29..72509ec96b449ea2a0febcefaf37f95933fec54a 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_ElectronicsResponseSimulation.cxx
@@ -20,7 +20,7 @@ std::vector<float> shaperInputCharge;
 double shaperResponseFunction(double *x, double *par){
   double response=0;
   for(size_t i=0; i<shaperInputTime.size(); i++){
-    double amp = (x[0]>shaperInputTime[i])? shaperInputCharge[i]*pow((x[0]-shaperInputTime[i])/par[1],par[0])*exp(-(x[0]-shaperInputTime[i])/par[1]) :0;
+    double amp = (x[0]>shaperInputTime[i])? shaperInputCharge[i]*std::pow((x[0]-shaperInputTime[i])/par[1],par[0])*std::exp(-(x[0]-shaperInputTime[i])/par[1]) :0;
     response += amp;
   }
   return response;
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/share/RPC_Digitization_jobOptions.txt b/MuonSpectrometer/MuonDigitization/RPC_Digitization/share/RPC_Digitization_jobOptions.txt
index a29bff7460031eabe83abc924a85c69d6f8a0a7b..fc8ebaf02aef74c6ae0b0de52439bec037589246 100644
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/share/RPC_Digitization_jobOptions.txt
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/share/RPC_Digitization_jobOptions.txt
@@ -1,7 +1,7 @@
 
 // RPC Digitization.
 
-ApplicationMgr.DLLs += { "RPC_Digitization"};
+ApplicationMgr.Dlls += { "RPC_Digitization"};
 ApplicationMgr.TopAlg += {"RPC_Digitizer"};
 
 RPC_Digitizer.Parameters="G4RPC_Digitizer.txt";
diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DetectorElement.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DetectorElement.h
index dfd677390fc1071260ede0e94e298bdf2babad9a..0b0ad8ad9cb8ad059f6991f47b0558831e59d8f1 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DetectorElement.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DetectorElement.h
@@ -17,7 +17,7 @@
 
 namespace MuonGM {
 
-  class ATLAS_NOT_THREAD_SAFE DetectorElement {
+  class DetectorElement {
   public:
     std::string name;
     std::string logVolName;
@@ -37,7 +37,7 @@ namespace MuonGM {
       log << MSG::INFO << "generic detector element" << endmsg;
     }
 
-    virtual ~DetectorElement() {}
+    virtual ~DetectorElement()=default;
 
     // Static
 
@@ -49,7 +49,7 @@ namespace MuonGM {
       s_matManager = &matMan;
     }
 
-    static const AbsMaterialManager * getMaterialManager() {
+    const AbsMaterialManager * getMaterialManager() const {
       return s_matManager;
     }
 
diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h
index 42c9d5169443a7fc4fd5b776240e19de42ddedb7..cbe058fd86000a982f957626148801e6c2f32de2 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorFactory001.h
@@ -34,7 +34,10 @@ public:
   // Creates the raw geometry tree: required,
   virtual void create (GeoPhysVol* world);
 
-  // Get the manager.
+  // this function is inherited from GeoVDetectorFactory where it is declared const.
+  // However, the MuonDetectorManager cannot be const since it holds the pointers to the readout elements,
+  // and those can change with alignment. Thus, this const method will create a thread-safety warning since 
+  // the returned object is *not* const
   virtual MuonDetectorManager* getDetectorManager() const;
 
   inline void setDBAtlasVersion(std::string v);
diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx
index 12b0f35fea8810373e486026ab8e88c2dbbf3fb7..779ee8afbe08980b7b5edba4ef2865f1646b3d34 100755
--- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx
@@ -199,49 +199,43 @@ namespace MuonGM {
 
     StatusCode sc = StatusCode::SUCCESS;
 
-    const DataHandle<MdtIdHelper> mdtidh;
+    const MdtIdHelper* mdtidh=nullptr;
     sc = m_pDetStore->retrieve(mdtidh,"MDTIDHELPER");
     if ( sc.isFailure()) log << MSG::ERROR << " not found MDT " << endmsg;
     else log << MSG::INFO << "MDTIDHELPER retrieved from DetStore" << endmsg;
-
     m_manager->set_mdtIdHelper(mdtidh);
-    const DataHandle<RpcIdHelper> rpcidh;
+
+    const RpcIdHelper* rpcidh=nullptr;
     sc = m_pDetStore->retrieve(rpcidh,"RPCIDHELPER");
     if ( sc.isFailure() ) log << MSG::ERROR << " not found RPC " << endmsg;
     else log << MSG::INFO << "RPCIDHELPER retrieved from DetStore" << endmsg;
-
     m_manager->set_rpcIdHelper(rpcidh);
-    const DataHandle<TgcIdHelper> tgcidh;
+
+    const TgcIdHelper* tgcidh=nullptr;
     sc = m_pDetStore->retrieve(tgcidh,"TGCIDHELPER");
     if ( sc.isFailure() ) log << MSG::ERROR << " not found TGC " << endmsg;
     else log << MSG::INFO << "TGCIDHELPER retrieved from DetStore" << endmsg;
-
     m_manager->set_tgcIdHelper(tgcidh);
+
     if (m_hasCSC) {
-        const DataHandle<CscIdHelper> cscidh;
+        const CscIdHelper* cscidh=nullptr;
         sc = m_pDetStore->retrieve(cscidh,"CSCIDHELPER");
-
         if ( sc.isFailure() ) log << MSG::ERROR << " not found CSC " << endmsg;
         else log << MSG::INFO << "CSCIDHELPER retrieved from DetStore" << endmsg;
-
         m_manager->set_cscIdHelper(cscidh);
     }
     if (m_hasSTgc) {
-        const DataHandle<sTgcIdHelper> stgcidh;
+        const sTgcIdHelper* stgcidh=nullptr;
         sc = m_pDetStore->retrieve(stgcidh,"STGCIDHELPER");
-
         if ( sc.isFailure() ) log << MSG::ERROR << " not found sTGC " << endmsg;
         else log << MSG::INFO << "STGCIDHELPER retrieved from DetStore" << endmsg;
-
         m_manager->set_stgcIdHelper(stgcidh);
     }
     if (m_hasMM) {
-        const DataHandle<MmIdHelper> mmidh;
+        const MmIdHelper* mmidh=nullptr;
         sc = m_pDetStore->retrieve(mmidh,"MMIDHELPER");
-
         if ( sc.isFailure() ) log << MSG::ERROR << " not found MicroMegas " << endmsg;
         else log << MSG::INFO << "MMIDHELPER retrieved from DetStore" << endmsg;
-
         m_manager->set_mmIdHelper(mmidh);
     }
 
diff --git a/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py b/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py
index eefaa27f36dd0167f9e69d45b9f27f65dccf2a47..617a991d96285023766a85606e24bf92af2bff64 100644
--- a/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py
+++ b/MuonSpectrometer/MuonGeoModelTest/test/MuonGeoModelTestMaps.py
@@ -15,7 +15,7 @@ include( "AtlasGeoModel/MuonGeoModel.py" )
 theApp.EvtSel = "EventSelector";
 theApp.EvtMax = 0;
 
-theApp.DLLs += [ "MuonGeoModelTest"]
+theApp.Dlls += [ "MuonGeoModelTest"]
 
 #---- display top algorithm 
 theApp.TopAlg         =        [ "MuonGMCheck" ]
diff --git a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/IMuonIdHelperSvc.h b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/IMuonIdHelperSvc.h
index c531fd182a88a587ef03860b5cc6d692c52f2871..a91e286db8b2d82c0ffea4766a14459b5b899acf 100644
--- a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/IMuonIdHelperSvc.h
+++ b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/IMuonIdHelperSvc.h
@@ -75,6 +75,9 @@ namespace Muon {
     /** @brief returns whether this is a sTGC Identifier or not */
     virtual bool issTgc( const Identifier& id ) const = 0;
 
+    /** @brief returns whether this Identifier belongs to an MDT with HPTDC or not */
+    virtual bool hasHPTDC( const Identifier& id ) const = 0;
+
     /** @brief returns whether channel measures phi or not */
     virtual bool measuresPhi( const Identifier& id ) const = 0;
     
diff --git a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h
index b399d108ece997a8b1a1fb65b09126e466a9fa1f..55630f0a2133a217ce78835df086b1ad19d69d27 100644
--- a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h
+++ b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h
@@ -77,6 +77,9 @@ namespace Muon {
     /** @brief returns whether this is a sTGC Identifier or not */
     virtual bool issTgc( const Identifier& id ) const override;
 
+    /** @brief returns whether this Identifier belongs to an MDT with HPTDC or not */
+    virtual bool hasHPTDC( const Identifier& id ) const override;
+
     /** @brief returns whether channel measures phi or not */
     virtual bool measuresPhi( const Identifier& id ) const override;
     
diff --git a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx
index 4eb6527c9d1fb434e74104b6fd4aa72db76be7df..946e5b55a5f3f19e346b69d0bb295f43c2f6d398 100644
--- a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx
+++ b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx
@@ -199,6 +199,18 @@ namespace Muon {
     return m_stgcIdHelper->is_stgc(id);
   }
 
+  bool MuonIdHelperSvc::hasHPTDC( const Identifier& id ) const {
+    if (!isMdt(id)) return false;
+    else if (!m_rpcIdHelper) return false; // there must be RPCs in the layout
+    else if (m_mdtIdHelper->isBMG(id)) return true; // all BMG sMDTs have an HPTDC
+    else if (m_mdtIdHelper->isEndcap(id)) return false; // there are no HPTDCs in the endcaps
+    else if (m_mdtIdHelper->stationNameString(stationName(id)).find("BI")!=0) return false; // outside the inner barrel layer there are no HPTDCs
+    // now try to retrieve RPC identifier with the same station name/eta/phi and check if it is valid
+    bool isValid = false;
+    m_rpcIdHelper->elementID(stationName(id), stationEta(id), stationPhi(id), 1, true, &isValid); // last 3 arguments are: doubletR, check, isValid
+    if (isValid) return true; // there is a BI RPC in the same station, thus, this station was already upgraded and the sMDT must have an HPTDC
+    return false;
+  }
 
   bool MuonIdHelperSvc::measuresPhi( const Identifier& id ) const {
     if( isRpc(id) ) {
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h
index 822a224ae90c68cb235b3d2331761e63663c8a21..ed02414f281ee0dd2a7a2c28d89d927eed60f75d 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -107,7 +107,7 @@ namespace Muon {
     /** returns the surface for the local to global transformation .
         - interface from MeasurementBase */
     const Trk::Surface& associatedSurface() const;
-    const Trk::Surface& associatedSurfaceRaw() const;
+    const Trk::Surface* associatedSurfaceRaw() const;
 
     /**Interface method to get the global Position.
        - interface from MeasurementBase */
@@ -159,9 +159,9 @@ namespace Muon {
     return ((*(m_containedChildRots->begin()))->associatedSurface());
   }
   
-  inline const Trk::Surface& CompetingMuonClustersOnTrack::associatedSurfaceRaw() const
+  inline const Trk::Surface* CompetingMuonClustersOnTrack::associatedSurfaceRaw() const
   {
-    return *m_associatedSurface;
+    return m_associatedSurface;
   }
   
   inline unsigned int CompetingMuonClustersOnTrack::numberOfContainedROTs() const {
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx
index 5fe1fe550e5ba955363358de40c43eb8561789e3..270031fe0f6a87b51126b4b88e40f8c5a4d0b5be 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.cxx
@@ -8,9 +8,6 @@
 #include "MuonTrackMakerUtils/SortMeasurementsByPosition.h"
 #include "MuonTrackMakerUtils/MuonTSOSHelper.h"
 
-#include "MuonStationIntersectSvc/MuonStationIntersectSvc.h"
-#include "MuonStationIntersectSvc/MuonStationIntersect.h"
-
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 
@@ -18,7 +15,6 @@
 #include "MuonRIO_OnTrack/CscClusterOnTrack.h"
 #include "MuonRIO_OnTrack/RpcClusterOnTrack.h"
 #include "MuonRIO_OnTrack/TgcClusterOnTrack.h"
-// New Small Wheel
 #include "MuonRIO_OnTrack/sTgcClusterOnTrack.h"
 #include "MuonRIO_OnTrack/MMClusterOnTrack.h"
 
@@ -36,44 +32,17 @@
 #include "EventPrimitives/EventPrimitivesHelpers.h"
 #include "GeoPrimitives/GeoPrimitivesToStringConverter.h"
 
-#include "StoreGate/StoreGateSvc.h"
-
 #include <map>
 
 namespace Muon {
 
   MuonChamberHoleRecoveryTool::MuonChamberHoleRecoveryTool(const std::string& ty,const std::string& na,const IInterface* pa)
-    : AthAlgTool(ty,na,pa),
-      m_intersectSvc("MuonStationIntersectSvc",name()),
-      m_extrapolator("Trk::Extrapolator/MuonExtrapolator"),
-      m_mdtRotCreator("Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"),
-      m_cscRotCreator("Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator", this),
-      m_clusRotCreator("Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"),
-      m_pullCalculator("Trk::ResidualPullCalculator/ResidualPullCalculator"),
-      m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool")
+    : AthAlgTool(ty,na,pa)
   {
     declareInterface<IMuonHoleRecoveryTool>(this);
     declareInterface<MuonChamberHoleRecoveryTool>(this);
-
-    declareProperty("MuonStationIntersectSvc", m_intersectSvc);
-    declareProperty("Extrapolator",            m_extrapolator);
-    declareProperty("MdtRotCreator",           m_mdtRotCreator);
-    declareProperty("CscRotCreator",           m_cscRotCreator);
-    declareProperty("ClusterRotCreator",       m_clusRotCreator);
-    declareProperty("PullCalculator",          m_pullCalculator);
-    declareProperty("EDMPrinter",              m_printer);
-
-    declareProperty("AddMeasurements",       m_addMeasurements = true);
-    declareProperty("AssociationPullCutEta", m_associationPullCutEta = 3.  );
-    declareProperty("AssociationPullCutPhi", m_associationPullCutPhi = 10. );
-    declareProperty("DetectBadSorting", m_detectBadSort = false );
-    declareProperty("AdcCut", m_adcCut = 50 );
   }
 
-
-  MuonChamberHoleRecoveryTool::~MuonChamberHoleRecoveryTool() {}
-
-
   StatusCode MuonChamberHoleRecoveryTool::initialize()
   {
 
@@ -105,11 +74,7 @@ namespace Muon {
     
     return StatusCode::SUCCESS;
   }
-  StatusCode MuonChamberHoleRecoveryTool::finalize()
-  {
-    return StatusCode::SUCCESS;
-  }
-  
+
   Trk::Track* MuonChamberHoleRecoveryTool::recover( const Trk::Track& track ) const {
         
     // call actual recovery routine
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.h
index 9c87104514eb8b15c52b2a1a50be885df2cbfe0c..6bc3e84a13d68c1451badf017eeb6e953f4bfcb4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonChamberHoleRecoveryTool.h
@@ -5,26 +5,25 @@
 #ifndef MUON_MUONCHAMBERHOLERECOVERYTOOL_H
 #define MUON_MUONCHAMBERHOLERECOVERYTOOL_H
 
+#include "MuonRecToolInterfaces/IMuonHoleRecoveryTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
+
 #include "TrkParameters/TrackParameters.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
 #include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
-
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
-#include "MuonRecToolInterfaces/IMuonHoleRecoveryTool.h"
 #include "TrkToolInterfaces/IResidualPullCalculator.h"
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h"
 #include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h"
 #include "MuonRecHelperTools/MuonEDMPrinterTool.h"
-
 #include "MuonCondData/MdtCondDbData.h"
 #include "TrkTrack/Track.h"
-
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
+#include "MuonStationIntersectSvc/MuonStationIntersectSvc.h"
 
 #include <string>
 #include <set>
@@ -32,15 +31,8 @@
 
 static const InterfaceID IID_MuonChamberHoleRecoveryTool("Muon::MuonChamberHoleRecoveryTool",1,0);
 
-class MsgStream;
-class StoreGateSvc;
-
-class MdtCondDbData;
-class MuonStationIntersectSvc;
-
 namespace Trk {
   class Track;
-  class MagneticFieldProperties;
 }
 
 namespace Muon {
@@ -56,17 +48,10 @@ namespace Muon {
    typedef std::vector< std::pair<int,int> > LayerHoleVec;
 
   public:
-    /** @brief constructor */
     MuonChamberHoleRecoveryTool(const std::string&,const std::string&,const IInterface*);
-
-    /** @brief destructor */
-    virtual ~MuonChamberHoleRecoveryTool ();
+    virtual ~MuonChamberHoleRecoveryTool()=default;
     
-    /** @brief AlgTool initialize */
     StatusCode initialize();
-    
-    /** @brief AlgTool finalize */
-    StatusCode finalize();
 
     /** @brief access to tool interface */
     static const InterfaceID& interfaceID() { return IID_MuonChamberHoleRecoveryTool; }
@@ -161,23 +146,20 @@ namespace Muon {
     const CscPrepDataCollection* findCscPrdCollection( const Identifier& detElId ) const;
     const TgcPrepDataCollection* findTgcPrdCollection( const Identifier& detElId ) const;
     const RpcPrepDataCollection* findRpcPrdCollection( const Identifier& detElId ) const;
-    // New Small Wheel
     const sTgcPrepDataCollection* findStgcPrdCollection( const Identifier& detElId ) const;
     const MMPrepDataCollection* findMmPrdCollection( const Identifier& detElId ) const;
 
 
-    ServiceHandle<MuonStationIntersectSvc>           m_intersectSvc;      //<! pointer to hole search service
-    ToolHandle<Trk::IExtrapolator>                   m_extrapolator;      //!< extrapolator
-    ToolHandle<Muon::IMdtDriftCircleOnTrackCreator>  m_mdtRotCreator;     //!< IMdtDriftCircleOnTrackCreator full calibration
-    ToolHandle<Muon::IMuonClusterOnTrackCreator>     m_cscRotCreator;     //!< IMuonClusterOnTrackCreator for cscs 
-    ToolHandle<Muon::IMuonClusterOnTrackCreator>     m_clusRotCreator;    //!< IMuonClusterOnTrackCreator for trigger hits
-
-    ToolHandle<Trk::IResidualPullCalculator>         m_pullCalculator;     //!< residual pull calculator
+    ServiceHandle<MuonStationIntersectSvc> m_intersectSvc {this, "MuonStationIntersectSvc", "MuonStationIntersectSvc", "pointer to hole search service"};
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    ServiceHandle<Muon::IMuonEDMHelperSvc>           m_edmHelperSvc {this, "edmHelper", 
-      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
-      "Handle to the service providing the IMuonEDMHelperSvc interface" };         //!< EDM Helper tool
-    ToolHandle<Muon::MuonEDMPrinterTool>             m_printer;            //!< EDM printer tool
+    ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", "Handle to the service providing the IMuonEDMHelperSvc interface" };
+    
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<Trk::IExtrapolator> m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/MuonExtrapolator"};
+    ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> m_mdtRotCreator {this, "MdtRotCreator", "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator", "IMdtDriftCircleOnTrackCreator full calibration"};
+    ToolHandle<Muon::IMuonClusterOnTrackCreator> m_cscRotCreator {this, "CscRotCreator", "Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator", "IMuonClusterOnTrackCreator for cscs"};
+    ToolHandle<Muon::IMuonClusterOnTrackCreator> m_clusRotCreator {this, "ClusterRotCreator", "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator", "IMuonClusterOnTrackCreator for trigger hits"};
+    ToolHandle<Trk::IResidualPullCalculator> m_pullCalculator {this, "PullCalculator", "Trk::ResidualPullCalculator/ResidualPullCalculator"};
 
     SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_DetectorManagerKey {this, "DetectorManagerKey", 
 	"MuonDetectorManager", 
@@ -191,12 +173,12 @@ namespace Muon {
     SG::ReadHandleKey<Muon::MMPrepDataContainer> m_key_mm{this,"MMPrepDataContainer","MM_Measurements","MM PRDs"};
     SG::ReadCondHandleKey<MdtCondDbData> m_condKey{this, "MdtCondKey", "MdtCondDbData", "Key of MdtCondDbData"};
 
-    bool m_addMeasurements;
-    double m_associationPullCutEta;
-    double m_associationPullCutPhi;
-    bool m_detectBadSort;
+    Gaudi::Property<bool> m_addMeasurements {this, "AddMeasurements", true};
+    Gaudi::Property<bool> m_detectBadSort {this, "DetectBadSorting", false};
 
-    double m_adcCut;
+    Gaudi::Property<double> m_associationPullCutEta {this, "AssociationPullCutEta", 3};
+    Gaudi::Property<double> m_associationPullCutPhi {this, "AssociationPullCutPhi", 10};
+    Gaudi::Property<double> m_adcCut {this, "AdcCut", 50};
   };
 
 }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx
index 76c9d27b78e3e961e12c25f45dfcb9d4ed732b8c..100e3a5bb4386d12bde3fda75a8001a68d068600 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx
@@ -15,15 +15,8 @@
 namespace Muon {
 
   MuonErrorOptimisationTool::MuonErrorOptimisationTool( const std::string& ty,const std::string& na,const IInterface* pa) : 
-    AthAlgTool(ty,na,pa),
-    m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-    m_trackSummaryTool("Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"),
-    m_refitTool("Muon::MuonRefitTool/MuonRefitTool")
+    AthAlgTool(ty,na,pa)
   {
-    declareProperty("Printer", m_printer );
-    declareProperty("TrackSummaryTool", m_trackSummaryTool );
-    declareProperty("RefitTool",m_refitTool ); 
-
     declareProperty("PrepareForFit",		         m_refitSettings.prepareForFit = true );
     declareProperty("RecreateStartingParameters",m_refitSettings.recreateStartingParameters = true );
     declareProperty("UpdateErrors",		           m_refitSettings.updateErrors = true );
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.h
index 134a2aa1956ba8e4da298eb285bf56f00b01c145..e144fa27f1242588efeadfcd5649f9f48a59f4c4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.h
@@ -5,10 +5,11 @@
 #ifndef MUONERROROPTIMISATIONTOOL_H
 #define MUONERROROPTIMISATIONTOOL_H
 
+#include "MuonRecToolInterfaces/IMuonErrorOptimisationTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "MuonRecToolInterfaces/IMuonErrorOptimisationTool.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonRecHelperTools/MuonEDMPrinterTool.h"
 #include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
 #include "MuonRecToolInterfaces/IMuonRefitTool.h"
@@ -31,15 +32,12 @@ namespace Muon {
     /** optimise the error strategy used for the track */
     virtual Trk::Track* optimiseErrors( Trk::Track& track ) const override;
 
-  protected:
-
+  private:
+    ServiceHandle<IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", "Handle to the service providing the IMuonEDMHelperSvc interface" };
 
-    ToolHandle<MuonEDMPrinterTool>  m_printer; //<! helper to nicely print out tracks
-    ServiceHandle<IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", 
-      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
-      "Handle to the service providing the IMuonEDMHelperSvc interface" }; //<! muon EDM helper
-    ToolHandle<Trk::ITrackSummaryHelperTool>    m_trackSummaryTool; //<! muon id helper
-    ToolHandle<IMuonRefitTool>      m_refitTool;
+    ToolHandle<MuonEDMPrinterTool> m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool", "helper to nicely print out tracks"};
+    ToolHandle<Trk::ITrackSummaryHelperTool> m_trackSummaryTool {this, "TrackSummaryTool", "Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"};
+    ToolHandle<IMuonRefitTool> m_refitTool {this, "RefitTool", "Muon::MuonRefitTool/MuonRefitTool"};
 
     Gaudi::Property<double>                      m_chi2NdofCutRefit {this, "Chi2NDofCutRefit", 5.};
     Gaudi::Property<double>                      m_lowPtThreshold   {this, "LowPtThreshold", 5000.};
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx
index 2dfde4fe0f998f58fb4bc99e330b242b0824f3e9..b8a0c7e8d8bdb1ca8f0d80922c950965b0323327 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx
@@ -2,14 +2,8 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// STL includes
-#include <algorithm>
-#include <iostream>
-
-// FrameWork includes
-#include "AthenaKernel/errorcheck.h"
+#include "MuonRefitTool.h"
 
-//Collections 
 #include "TrkMeasurementBase/MeasurementBase.h"
 #include "TrkEventPrimitives/LocalDirection.h"
 #include "TrkParameters/TrackParameters.h"
@@ -19,47 +13,21 @@
 #include "TrkSurfaces/PlaneSurface.h"
 #include "TrkSurfaces/Surface.h"
 #include "TrkTrack/AlignmentEffectsOnTrack.h"
-//Actual Class 
-#include "MuonRefitTool.h"
-
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
-#include "MuonSegmentMakerInterfaces/IDCSLFitProvider.h"
-
-
-#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
-#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h"
-#include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h"
-#include "MuonRecToolInterfaces/IMuonCompetingClustersOnTrackCreator.h"
-#include "TrkFitterInterfaces/ITrackFitter.h"
-#include "TrkExInterfaces/IExtrapolator.h"
 #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
 #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h"
-
 #include "MuonSegmentMakerUtils/MuonSegmentKey.h"
 #include "MuonSegmentMakerUtils/CompareMuonSegmentKeys.h"
 #include "MuonTrackMakerUtils/MuonTSOSHelper.h"
-
 #include "EventPrimitives/EventPrimitives.h"
 #include "EventPrimitives/EventPrimitivesHelpers.h"
-
 #include "MuonAlignErrorBase/AlignmentTranslationDeviation.h"
 #include "MuonAlignErrorBase/AlignmentRotationDeviation.h"
-#include "TrkToolInterfaces/ITrkAlignmentDeviationTool.h"
-
 
 namespace Muon {
 
-  MuonRefitTool::MuonRefitTool( const std::string& ty,const std::string& na,const IInterface* pa) : 
+  MuonRefitTool::MuonRefitTool(const std::string& ty, const std::string& na, const IInterface* pa) : 
     AthAlgTool(ty,na,pa),
-    m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-    m_alignErrorTool("MuonAlign::AlignmentErrorTool"),
-    m_trackFitter("Trk::GlobalChi2Fitter/MCTBFitterMaterialFromTrack"),
-    m_extrapolator("Trk::Extrapolator/AtlasExtrapolator"),
-    m_muonExtrapolator("Trk::Extrapolator/MuonExtrapolator"),
-    m_mdtRotCreator("Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"),
-    m_compClusterCreator("Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator"),
-    m_t0Fitter(""),
-    m_muonEntryTrackExtrapolator("Muon::MuonTrackExtrapolationTool/MuonTrackExtrapolationTool"),
     m_errorStrategyBEE(MuonDriftCircleErrorStrategyInput()),
     m_errorStrategyEE(MuonDriftCircleErrorStrategyInput()),
     m_errorStrategyBIS78(MuonDriftCircleErrorStrategyInput()),
@@ -70,67 +38,14 @@ namespace Muon {
     m_errorStrategyTwoStations(MuonDriftCircleErrorStrategyInput()),
     m_errorStrategy(MuonDriftCircleErrorStrategyInput()),
     m_muonErrorStrategy(MuonDriftCircleErrorStrategyInput()),
-    m_finder(5.,3.,false),
-    m_finderCleaning(5.,3.,false),
     m_nrefits(0),
     m_ngoodRefits(0),
-    m_failedErrorUpdateOutlierRemoval(0),
     m_failedOutlierRemoval(0),
     m_failedErrorUpdate(0),
     m_failedRefit(0),
-    m_failedExtrapolationMuonEntry(0),
-    m_nbackExtrapolations(0),
-    m_ngoodBackExtrapolations(0),
-    m_failedExtrapolationIP(0),
-    m_nupdates(0),
-    m_ngoodUpdates(0),
-    m_failedUpdates(0),
-    m_alignmentDelta(0.),
-    m_alignmentAngle(0.),
-    m_alignmentDeltaError(0.1),
-    m_alignmentAngleError(0.001),
-    m_alignmentErrors(false),
-    m_simpleAEOTs(false),
-    m_addAll(false),
-    m_addInner(false),
-    m_addMiddle(true),
-    m_addTwo(false)
+    m_failedExtrapolationMuonEntry(0)
   {
     declareInterface<IMuonRefitTool>(this);
-    declareProperty("FinderDebugLevel",m_finderDebugLevel = -1 );
-    declareProperty("Fitter",m_trackFitter);
-    declareProperty("T0Fitter",m_t0Fitter);
-    declareProperty("MinMuonMom",m_minMuonMomentum = 4000.);
-    declareProperty("UsedFixedError",m_fixedError = 1. );
-    declareProperty("FlagT0FitRange",m_flagT0FitRange = 0.00005 );
-    declareProperty("Printer", m_printer );
-    declareProperty("AlignmentErrorTool", m_alignErrorTool);
-    declareProperty("Extrapolator", m_extrapolator );
-    declareProperty("MuonExtrapolator", m_muonExtrapolator );
-    declareProperty("MuonEntryExtrapolationTool", m_muonEntryTrackExtrapolator );
-    declareProperty("MdtRotCreator",m_mdtRotCreator);
-    declareProperty("DeweightBEE", m_deweightBEE = false );
-    declareProperty("DeweightEE",  m_deweightEE = false );
-    declareProperty("DeweightBIS78", m_deweightBIS78 = true );
-    declareProperty("DeweightBME", m_deweightBME = true );
-    declareProperty("DeweightBOE", m_deweightBOE = true );
-    declareProperty("DeweightEEL1C05", m_deweightEEL1C05 = false );
-    declareProperty("DeweightTwoStationTracks",  m_deweightTwoStationTracks = false );
-    declareProperty("AlignmentDelta", m_alignmentDelta = 0.);
-    declareProperty("AlignmentAngle", m_alignmentAngle = 0.);
-    declareProperty("AlignmentDeltaError", m_alignmentDeltaError = 0.1);
-    declareProperty("AlignmentAngleError", m_alignmentAngleError = 0.001);
-    declareProperty("AlignmentErrors", m_alignmentErrors = false);
-    declareProperty("SimpleAEOTs", m_simpleAEOTs = false);
-    declareProperty("AddAll", m_addAll = false);
-    declareProperty("AddInner", m_addInner = false);
-    declareProperty("AddMiddle", m_addMiddle = false);
-    declareProperty("AddTwo", m_addTwo = false);
-  }
-
-  MuonRefitTool::~MuonRefitTool()
-  {
-
   }
 
   StatusCode MuonRefitTool::initialize()
@@ -154,13 +69,8 @@ namespace Muon {
     if( !m_t0Fitter.empty() ){
       ATH_CHECK( m_t0Fitter.retrieve() );
       ATH_MSG_INFO("Retrieved " << m_t0Fitter );
-      m_finder.setFitter(m_t0Fitter->getFitter());
     }
 
-    m_finder.debugLevel(m_finderDebugLevel);
-    m_finder.setRecoverMDT(false);
-    m_finderCleaning.debugLevel(m_finderDebugLevel);
-
     ATH_CHECK( m_muonEntryTrackExtrapolator.retrieve() );
 
     MuonDriftCircleErrorStrategyInput bits;
@@ -216,47 +126,30 @@ namespace Muon {
     m_muonErrorStrategy.setParameter(MuonDriftCircleErrorStrategy::ScaledError,true);
     m_muonErrorStrategy.setParameter(MuonDriftCircleErrorStrategy::BroadError,false);
 
-
-    msg(MSG::INFO) << MSG::INFO << " Options: ";
-    if( m_deweightBEE )                  msg(MSG::INFO) << MSG::INFO << " Deweight BEE";
-    if( m_deweightEE )                   msg(MSG::INFO) << MSG::INFO << " Deweight EE";
-    if( m_deweightBIS78 )                msg(MSG::INFO) << MSG::INFO << " Deweight BIS78";
-    if( m_deweightBME )                  msg(MSG::INFO) << MSG::INFO << " Deweight BME";
-    if( m_deweightBOE )                  msg(MSG::INFO) << MSG::INFO << " Deweight BOE";
-    if( m_deweightEEL1C05 )              msg(MSG::INFO) << MSG::INFO << " Deweight EEL1C05";
-    if( m_deweightTwoStationTracks )     msg(MSG::INFO) << MSG::INFO << " Deweight Two stations";
-    msg(MSG::INFO) << endmsg;
-
+    ATH_MSG_INFO("Options:");
+    if( m_deweightBEE )                  ATH_MSG_INFO(" Deweight BEE");
+    if( m_deweightEE )                   ATH_MSG_INFO(" Deweight EE");
+    if( m_deweightBIS78 )                ATH_MSG_INFO(" Deweight BIS78");
+    if( m_deweightBME )                  ATH_MSG_INFO(" Deweight BME");
+    if( m_deweightBOE )                  ATH_MSG_INFO(" Deweight BOE");
+    if( m_deweightEEL1C05 )              ATH_MSG_INFO(" Deweight EEL1C05");
+    if( m_deweightTwoStationTracks )     ATH_MSG_INFO(" Deweight Two stations");
     return StatusCode::SUCCESS;
   }
 
-
   StatusCode MuonRefitTool::finalize()
   {
     double scaleRefit = m_nrefits != 0 ? 1./(double)m_nrefits : 1.;
-    double scaleExtr = m_nbackExtrapolations != 0 ? 1./(double)m_nbackExtrapolations : 1.;
-    double scaleUp = m_nupdates != 0 ? 1./(double)m_nupdates : 1.;
-    ATH_MSG_INFO(   "Number of refits                        " << m_nrefits << endmsg 
-		    << "Good                                    " << scaleRefit*m_ngoodRefits << endmsg
-		    << "Failed Error update in outlier removal  " << scaleRefit*m_failedErrorUpdateOutlierRemoval << endmsg
-		    << "Failed Outlier removal                  " << scaleRefit*m_failedOutlierRemoval << endmsg
-		    << "Failed Error Update                     " << scaleRefit*m_failedErrorUpdate << endmsg
-		    << "Failed Refit                            " << scaleRefit*m_failedRefit << endmsg
+    ATH_MSG_INFO(
+           "Number of refits                        " << m_nrefits << std::endl
+		    << "Good                                    " << scaleRefit*m_ngoodRefits << std::endl
+		    << "Failed Outlier removal                  " << scaleRefit*m_failedOutlierRemoval << std::endl
+		    << "Failed Error Update                     " << scaleRefit*m_failedErrorUpdate << std::endl
+		    << "Failed Refit                            " << scaleRefit*m_failedRefit << std::endl
 		    << "Failed Extrapolation to Muon Entry      " << scaleRefit*m_failedExtrapolationMuonEntry);
-    ATH_MSG_INFO(   "Number of extrapolations to IP   " << m_nbackExtrapolations << endmsg 
-		    << "Good                             " << scaleExtr*m_ngoodBackExtrapolations << endmsg
-		    << "Failed Extrapolation to IP       "  << scaleExtr*m_failedExtrapolationIP);
-
-    ATH_MSG_INFO(   "Number of updated tracks   " << m_nupdates << endmsg 
-		    << "Good                       " << scaleUp*m_ngoodUpdates << endmsg
-		    << "Failed updates             "  << scaleUp*m_failedUpdates);
-  
     return StatusCode::SUCCESS;
   }
 
-
-
-
   const Trk::Track* MuonRefitTool::refit( const Trk::Track& track, const IMuonRefitTool::Settings* set ) const {
 
     const IMuonRefitTool::Settings& settings = set ? *set : m_defaultSettings;
@@ -393,7 +286,7 @@ namespace Muon {
          isBarrel = false;
 
          if( dynamic_cast<MuonAlign::AlignmentTranslationDeviation*>(it) ) {
-           translationError = sqrt(it->getCovariance(0,0));
+           translationError = std::sqrt(it->getCovariance(0,0));
            // vector to store hit id
            std::vector<Identifier> hitids;
            std::vector<const Trk::RIO_OnTrack*> vec_riowithdev;
@@ -425,7 +318,7 @@ namespace Muon {
                if( dynamic_cast<MuonAlign::AlignmentRotationDeviation*>(itRot) ) {
                  if( itRot->hasValidHashOfHits() && it->hasValidHashOfHits() ) {
                    if( itRot->getHashOfHits() == it->getHashOfHits() ){
-                     angleError = sqrt(itRot->getCovariance(0,0));
+                     angleError = std::sqrt(itRot->getCovariance(0,0));
                      matchFound = true;
                      usedRotations.push_back(iRot);
                    }
@@ -489,7 +382,7 @@ namespace Muon {
            }
 
            double translationError = 0.;
-           double angleError = sqrt(itRot->getCovariance(0,0));
+           double angleError = std::sqrt(itRot->getCovariance(0,0));
 
            iok++;  
            alignerrmap.insert( std::pair < std::vector<Identifier>, std::pair < double, double > > ( hitids, std::pair < double, double > (translationError,angleError) ) );
@@ -573,8 +466,6 @@ namespace Muon {
           trackStateOnSurfaces->push_back(tsosAEOTs[i]);
         }
       }
-// skip outliers
-//      if( (*tsit)->type(Trk::TrackStateOnSurface::Outlier) ) continue;
 
       // Skip AEOTs that are already present, as they will be added above already
       if((*tsit)->alignmentEffectsOnTrack()){
@@ -588,14 +479,6 @@ namespace Muon {
 
     Trk::Track* newTrack =  new Trk::Track( track.info(), trackStateOnSurfaces, track.fitQuality() ? track.fitQuality()->clone():0 );
 
-// dump it
-//    const DataVector<const Trk::TrackStateOnSurface>* trackStateOnSurfacesNew = newTrack->trackStateOnSurfaces();
-//    tsit     = trackStateOnSurfacesNew->begin();
-//    tsit_end = trackStateOnSurfacesNew->end();
-//    for( ; tsit!=tsit_end ; ++tsit ){
-//        if((*tsit)->alignmentEffectsOnTrack()) std::cout << " Peter alignmentEffectsOnTrack found with track pars " << (*tsit)->trackParameters() << std::endl;
-//    }
-
     ATH_MSG_DEBUG(m_printer->print(*newTrack));
     ATH_MSG_DEBUG(m_printer->printMeasurements(*newTrack));
 
@@ -834,10 +717,10 @@ namespace Muon {
     std::map<int,std::set<MuonStationIndex::StIndex> >::iterator stit_end = stationsPerSector.end();
     for( ;stit!=stit_end;++stit ){
       if( msgLvl(MSG::VERBOSE) ){
-	msg(MSG::VERBOSE) << " sector " << stit->first;
+	ATH_MSG_VERBOSE(" sector " << stit->first);
 	for( std::set<MuonStationIndex::StIndex>::iterator ssit = stit->second.begin();
 	     ssit != stit->second.end(); ++ssit ){
-	  msg(MSG::VERBOSE) << " " << MuonStationIndex::stName(*ssit);
+	  ATH_MSG_VERBOSE(" " << MuonStationIndex::stName(*ssit));
 	}
       }
       if( stit->second.size() > nmaxStations ) {
@@ -883,14 +766,13 @@ namespace Muon {
       barrelEndcap = true; 
     } 
     if( msgLvl(MSG::DEBUG) ){ 
-      msg() << MSG::DEBUG << " Selected sector " << selectedSector << " nstations " << nmaxStations 
-	    << " barrel " << nbarrel << " endcap " << nendcap; 
+      ATH_MSG_DEBUG(" Selected sector " << selectedSector << " nstations " << nmaxStations 
+	    << " barrel " << nbarrel << " endcap " << nendcap); 
       if( barrelEndcap ) {
-	msg() << " barrel/endcap overlap "  << endmsg; 
-	if(deweightEndcap) msg() << " deweight endcap "  << endmsg; 
-	if(deweightBarrel) msg() << " deweight barrel "  << endmsg; 
+	ATH_MSG_DEBUG(" barrel/endcap overlap "); 
+	if(deweightEndcap) ATH_MSG_DEBUG(" deweight endcap "); 
+	if(deweightBarrel) ATH_MSG_DEBUG(" deweight barrel "); 
       }
-      msg() << MSG::DEBUG << endmsg; 
     } 
 
     unsigned int deweightHits = 0;
@@ -977,12 +859,7 @@ namespace Muon {
 	  }
 
 	  bool hasT0Fit = false;
-	  MdtDriftCircleOnTrack* cmdt =  const_cast<MdtDriftCircleOnTrack*>(mdt);
-	  if( !cmdt ){
-	    ATH_MSG_WARNING(" Failed to const_cast MdtDriftCircleOnTrack ");
-	  }else{
-	    if( cmdt->errorStrategy().creationParameter(Muon::MuonDriftCircleErrorStrategy::T0Refit))  hasT0Fit = true; 
-	  }
+    if( mdt->errorStrategy().creationParameter(Muon::MuonDriftCircleErrorStrategy::T0Refit))  hasT0Fit = true; 
       
 	  const Trk::RIO_OnTrack* rot = 0;
 	  int sector = m_idHelperSvc->sector(id);
@@ -1066,14 +943,13 @@ namespace Muon {
 	    
 
 	  if( msgLvl(MSG::DEBUG) ){
-	    msg() << m_idHelperSvc->toString(newMdt->identify()) << " radius " << newMdt->driftRadius() 
+	    ATH_MSG_DEBUG(m_idHelperSvc->toString(newMdt->identify()) << " radius " << newMdt->driftRadius() 
 		  << " new err " << Amg::error(newMdt->localCovariance(),Trk::locR) 
-		  << " old err " << Amg::error(mdt->localCovariance(),Trk::locR);
-	    if( hasT0Fit ) msg() << " HasT0";
-	    else           msg() << " No T0";
-	    if( type == Trk::TrackStateOnSurface::Outlier ) msg() << " Outlier";
-	    if( fabs(newMdt->driftRadius() - mdt->driftRadius() ) > 0.1 ) msg() << " Bad recalibration: old r " << mdt->driftRadius();
-	    msg() << endmsg;
+		  << " old err " << Amg::error(mdt->localCovariance(),Trk::locR));
+	    if( hasT0Fit ) ATH_MSG_DEBUG(" HasT0");
+	    else           ATH_MSG_DEBUG(" No T0");
+	    if( type == Trk::TrackStateOnSurface::Outlier ) ATH_MSG_DEBUG(" Outlier");
+	    if( std::abs(newMdt->driftRadius() - mdt->driftRadius() ) > 0.1 ) ATH_MSG_DEBUG(" Bad recalibration: old r " << mdt->driftRadius());
 	  }
 
 	  Trk::TrackStateOnSurface* tsos = MuonTSOSHelper::createMeasTSOSWithUpdate( **tsit, newMdt, pars->clone(), type );
@@ -1294,12 +1170,7 @@ namespace Muon {
 	  }
 
 	  bool hasT0Fit = false;
-	  MdtDriftCircleOnTrack* cmdt =  const_cast<MdtDriftCircleOnTrack*>(mdt);
-	  if( !cmdt ){
-	    ATH_MSG_WARNING(" Failed to const_cast MdtDriftCircleOnTrack ");
-	  }else{
-	    if( cmdt->errorStrategy().creationParameter(Muon::MuonDriftCircleErrorStrategy::T0Refit))  hasT0Fit = true; 
-	  }
+    if( mdt->errorStrategy().creationParameter(Muon::MuonDriftCircleErrorStrategy::T0Refit))  hasT0Fit = true; 
       
 	  const Trk::RIO_OnTrack* rot = 0;
 	  Trk::TrackStateOnSurface::TrackStateOnSurfaceType type = (*tsit)->type(Trk::TrackStateOnSurface::Outlier) ? 
@@ -1324,14 +1195,13 @@ namespace Muon {
 	    
 
 	  if( msgLvl(MSG::DEBUG) ){
-	    msg() << " updateMdtErrors " << m_idHelperSvc->toString(newMdt->identify()) << " radius " << newMdt->driftRadius() 
+	    ATH_MSG_DEBUG(" updateMdtErrors " << m_idHelperSvc->toString(newMdt->identify()) << " radius " << newMdt->driftRadius() 
 		  << " new err " << Amg::error(newMdt->localCovariance(),Trk::locR) 
-		  << " old err " << Amg::error(mdt->localCovariance(),Trk::locR);
-	    if( hasT0Fit ) msg() << " HasT0";
-	    else           msg() << " No T0";
-	    if( type == Trk::TrackStateOnSurface::Outlier ) msg() << " Outlier";
-	    if( fabs(newMdt->driftRadius() - mdt->driftRadius() ) > 0.1 ) msg() << " Bad recalibration: old r " << mdt->driftRadius();
-	    msg() << endmsg;
+		  << " old err " << Amg::error(mdt->localCovariance(),Trk::locR));
+	    if( hasT0Fit ) ATH_MSG_DEBUG(" HasT0");
+	    else           ATH_MSG_DEBUG(" No T0");
+	    if( type == Trk::TrackStateOnSurface::Outlier ) ATH_MSG_DEBUG(" Outlier");
+	    if( std::abs(newMdt->driftRadius() - mdt->driftRadius() ) > 0.1 ) ATH_MSG_DEBUG(" Bad recalibration: old r " << mdt->driftRadius());
 	  }
 
 	  Trk::TrackStateOnSurface* tsos = MuonTSOSHelper::createMeasTSOSWithUpdate( **tsit, newMdt, pars->clone(), type );
@@ -1545,9 +1415,14 @@ namespace Muon {
     // set to get Identifiers of chambers with hits
     std::vector< std::pair<Identifier,bool> > indexIdMap;
     indexIdMap.reserve( hits.size() );
-
   
-
+    TrkDriftCircleMath::DCSLFitter dcslFitter;
+    TrkDriftCircleMath::SegmentFinder segFinder(5.,3.,false);
+    if( !m_t0Fitter.empty() ){
+      segFinder.setFitter(m_t0Fitter->getFitter());
+    }
+    segFinder.debugLevel(m_finderDebugLevel);
+    segFinder.setRecoverMDT(false);
 
     unsigned index = 0;
     std::vector<const MdtDriftCircleOnTrack*>::const_iterator it = hits.begin();
@@ -1573,7 +1448,7 @@ namespace Muon {
       Amg::Vector3D locPos = gToStation*mdt->prepRawData()->globalPosition();
       TrkDriftCircleMath::LocPos lpos(locPos.y(),locPos.z());
 
-      double r  = fabs(mdt->localParameters()[Trk::locR]);
+      double r  = std::abs(mdt->localParameters()[Trk::locR]);
       double dr = Amg::error(mdt->localCovariance(),Trk::locR);
       ATH_MSG_VERBOSE("New MDT " << m_idHelperSvc->toString(id) << "  r " << mdt->localParameters()[Trk::locR] 
 		      << " dr  " << dr << "  (original) " << Amg::error(mdt->localCovariance(),Trk::locR) );
@@ -1626,11 +1501,11 @@ namespace Muon {
 
 
     ATH_MSG_DEBUG("Seeding angles " << track_angleYZ << " from surf " << angleYZ << " ch angle " << chamber_angleYZ << " pos " << segPos);
-    m_finder.setPhiRoad(track_angleYZ,chamber_angleYZ,0.14);
+    segFinder.setPhiRoad(track_angleYZ,chamber_angleYZ,0.14);
 
     if( msgLvl(MSG::VERBOSE) ){
       TrkDriftCircleMath::Segment segment(TrkDriftCircleMath::Line(0.,0.,0.), TrkDriftCircleMath::DCOnTrackVec());
-      if(m_fitter.fit(segment, segPars, dcsOnTrack)){
+      if(dcslFitter.fit(segment, segPars, dcsOnTrack)){
 	segment.hitsOnTrack(dcsOnTrack.size());
 	ATH_MSG_DEBUG(" segment after fit " << segment.chi2() << " ndof " << segment.ndof() << " local parameters "
 		      << segment.line().x0() << " " << segment.line().y0() << "  phi " << segment.line().phi() );
@@ -1639,7 +1514,7 @@ namespace Muon {
       }
     }
 
-    TrkDriftCircleMath::SegVec segments = m_finder.findSegments(dcs);
+    TrkDriftCircleMath::SegVec segments = segFinder.findSegments(dcs);
     if( !segments.empty() ){
       ATH_MSG_DEBUG("Found segments " << segments.size() );
     }
@@ -1654,7 +1529,7 @@ namespace Muon {
       TrkDriftCircleMath::SegIt sit_end = segments.end();
       for( ;sit!=sit_end;++sit,++index ) {
       
-	double dtheta = fabs(sit->line().phi() - track_angleYZ);
+	double dtheta = std::abs(sit->line().phi() - track_angleYZ);
 	if( dtheta < dthetaBest ){
 	  dthetaBest = dtheta;
 	  indexBest = index;
@@ -1679,24 +1554,6 @@ namespace Muon {
     if( settings.discardNotCleanedTracks && !segment.hasT0Shift() ) return false;
 
     if( segment.hasT0Shift() || segment.hitsOnTrack() > 5 ) {
-      //     it = hits.begin();
-      //     it_end = hits.end();
-      //     for(  ;it!=it_end;++it){
-      
-      //       const Trk::ErrorMatrix& localErrorMatrix = (*it)->localErrorMatrix();
-      //       double error = 1.99;
-      
-      //       double scaledError2 = error*error;
-      //       Trk::CovarianceMatrix* covPtr = const_cast<Trk::CovarianceMatrix*>(localErrorMatrix.covariancePointer());
-      //       Trk::WeightMatrix* weightPtr = const_cast<Trk::WeightMatrix*>(localErrorMatrix.weightPointer());      
-      //       if( covPtr ) {
-      // 	(*covPtr)[Trk::locR][Trk::locR] = scaledError2;
-      //       }
-      //       if( weightPtr ) {
-      // 	(*weightPtr)[Trk::locR][Trk::locR] = 1./scaledError2;
-      //       }
-      //     }
-    
       ATH_MSG_DEBUG("Segment with t0 shift " << segment.t0Shift() ); 
     }
 
@@ -1718,7 +1575,7 @@ namespace Muon {
     for( TrkDriftCircleMath::DCOnTrackCit dcit = matchedDCs.begin();dcit!=matchedDCs.end();++dcit ){
     
       if( dcit->state() == TrkDriftCircleMath::DCOnTrack::OnTrack ) {
-	if( fabs(dcit->r()) - fabs(dcit->rot()->driftRadius()) > 0.1 ){
+	if( std::abs(dcit->r()) - std::abs(dcit->rot()->driftRadius()) > 0.1 ){
 	  ATH_MSG_DEBUG("Large change in drift radius: r_old " 
 		       << dcit->rot()->driftRadius() << "  r_new " 
 		       << dcit->r() );
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.h
index 792507a087f37c264a070c54dcae9cf2f2fc8ed6..bc6c2a819d1947b18d57787250731e3587ff64e5 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.h
@@ -1,66 +1,50 @@
 /*
-  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 MUONREFITTOOL_H
 #define MUONREFITTOOL_H
 
-// STL includes
-#include <string>
-#include <vector>
-#include <set>
-
-// FrameWork includes
+#include "MuonRecToolInterfaces/IMuonRefitTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
-#include "MuonRecToolInterfaces/IMuonRefitTool.h"
+#include "GaudiKernel/ToolHandle.h"
 
+#include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
+#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
 #include "TrkDriftCircleMath/DCSLFitter.h"
 #include "TrkDriftCircleMath/SegmentFinder.h"
 #include "TrkParameters/TrackParameters.h"
 #include "MuonRIO_OnTrack/MuonDriftCircleErrorStrategy.h"
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h"
+#include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h"
+#include "MuonRecToolInterfaces/IMuonCompetingClustersOnTrackCreator.h"
+#include "TrkFitterInterfaces/ITrackFitter.h"
+#include "TrkExInterfaces/IExtrapolator.h"
+#include "MuonSegmentMakerInterfaces/IDCSLFitProvider.h"
+#include "TrkToolInterfaces/ITrkAlignmentDeviationTool.h"
 
-namespace Muon {
-  class MuonEDMPrinterTool;
-  class IMdtDriftCircleOnTrackCreator;
-  class IMuonCompetingClustersOnTrackCreator;
-  class IMuonTrackExtrapolationTool;
-  class MdtDriftCircleOnTrack;
-  class IDCSLFitProvider;
-}
-class MuonESDAnalysisHelperTool;
-
-namespace Trk {
-  class Track;
-  class ITrackFitter;
-  class IExtrapolator;
-  class MeasurementBase;
-  class ITrkAlignmentDeviationTool;
-}
+#include <string>
+#include <vector>
+#include <set>
+#include <atomic>
 
 namespace Muon {
 
   class MuonRefitTool : virtual public IMuonRefitTool, public AthAlgTool { 
   public:
 
-    /** Constructor with parameters: */
-    MuonRefitTool( const std::string& ty,const std::string& na,const IInterface* pa);
-
-    /** Destructor: */
-    virtual ~MuonRefitTool(); 
-
-    virtual StatusCode  initialize();
-    virtual StatusCode  finalize();
-
+    MuonRefitTool(const std::string& ty, const std::string& na, const IInterface* pa);
+    virtual ~MuonRefitTool()=default; 
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize() override;
 
     /** refit a track */
-    const Trk::Track* refit( const Trk::Track& track, const Settings* settings = 0 ) const;
+    const Trk::Track* refit( const Trk::Track& track, const Settings* settings = 0 ) const override;
 
     /** refit and back extrapolate a vector of track pairs */
-    std::vector<const Trk::Track*> refit( const std::vector<const Trk::Track*>& tracks, const Settings* settings = 0 ) const;
+    std::vector<const Trk::Track*> refit( const std::vector<const Trk::Track*>& tracks, const Settings* settings = 0 ) const override;
 
   protected:
 
@@ -80,13 +64,6 @@ namespace Muon {
     bool removeMdtOutliers( const Trk::TrackParameters& pars, const std::vector<const MdtDriftCircleOnTrack*>& hits,   
 			    std::set<Identifier>& removedIdentifiers, const Settings& settings ) const;
 
-    ToolHandle<MuonEDMPrinterTool>  m_printer; //<! helper to nicely print out tracks
-    ServiceHandle<IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", 
-      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
-      "Handle to the service providing the IMuonEDMHelperSvc interface" }; //<! muon EDM helper
-    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    ToolHandle<Trk::ITrkAlignmentDeviationTool>  m_alignErrorTool; //<! alignment error tool
-
     struct State {
       State() : originalState(0), newState(0), copyOriginal(true) {}
       const Trk::TrackStateOnSurface* originalState;
@@ -94,13 +71,44 @@ namespace Muon {
       bool copyOriginal;
     };
 
-    ToolHandle<Trk::ITrackFitter>                    m_trackFitter;
-    ToolHandle<Trk::IExtrapolator>                   m_extrapolator;
-    ToolHandle<Trk::IExtrapolator>                   m_muonExtrapolator;
-    ToolHandle<IMdtDriftCircleOnTrackCreator>        m_mdtRotCreator;
-    ToolHandle<IMuonCompetingClustersOnTrackCreator> m_compClusterCreator;
-    ToolHandle<IDCSLFitProvider>                     m_t0Fitter;
-    ToolHandle<Muon::IMuonTrackExtrapolationTool>    m_muonEntryTrackExtrapolator;
+  private:
+    ServiceHandle<IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", "Handle to the service providing the IMuonEDMHelperSvc interface" };
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+    
+    ToolHandle<Trk::ITrkAlignmentDeviationTool> m_alignErrorTool {this, "AlignmentErrorTool", "MuonAlign::AlignmentErrorTool"};
+    ToolHandle<MuonEDMPrinterTool> m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<Trk::ITrackFitter> m_trackFitter {this, "Fitter", "Trk::GlobalChi2Fitter/MCTBFitterMaterialFromTrack"};
+    ToolHandle<Trk::IExtrapolator> m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
+    ToolHandle<Trk::IExtrapolator> m_muonExtrapolator {this, "MuonExtrapolator", "Trk::Extrapolator/MuonExtrapolator"};
+    ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtRotCreator {this, "MdtRotCreator", "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"};
+    ToolHandle<IMuonCompetingClustersOnTrackCreator> m_compClusterCreator {this, "CompClusterCreator", "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator"};
+    ToolHandle<IDCSLFitProvider> m_t0Fitter {this, "T0Fitter", ""};
+    ToolHandle<Muon::IMuonTrackExtrapolationTool> m_muonEntryTrackExtrapolator {this, "MuonEntryExtrapolationTool", "Muon::MuonTrackExtrapolationTool/MuonTrackExtrapolationTool"};
+
+    Gaudi::Property<int> m_finderDebugLevel {this, "FinderDebugLevel", -1};
+
+    Gaudi::Property<double> m_minMuonMomentum {this, "MinMuonMom", 4000};
+    Gaudi::Property<double> m_fixedError {this, "UsedFixedError", 1};
+    Gaudi::Property<double> m_flagT0FitRange {this, "FlagT0FitRange", 0.00005};
+
+    Gaudi::Property<float> m_alignmentDelta {this, "AlignmentDelta", 0};
+    Gaudi::Property<float> m_alignmentAngle {this, "AlignmentAngle", 0};
+    Gaudi::Property<float> m_alignmentDeltaError {this, "AlignmentDeltaError", 0.1};
+    Gaudi::Property<float> m_alignmentAngleError {this, "AlignmentAngleError", 0.001};
+
+    Gaudi::Property<bool> m_alignmentErrors {this, "AlignmentErrors", false};
+    Gaudi::Property<bool> m_simpleAEOTs {this, "SimpleAEOTs", false};
+    Gaudi::Property<bool> m_addAll {this, "AddAll", false};
+    Gaudi::Property<bool> m_addInner {this, "AddInner", false};
+    Gaudi::Property<bool> m_addMiddle {this, "AddMiddle", false};
+    Gaudi::Property<bool> m_addTwo {this, "AddTwo", false};
+    Gaudi::Property<bool> m_deweightBEE {this, "DeweightBEE", false};
+    Gaudi::Property<bool> m_deweightEE {this, "DeweightEE", false};
+    Gaudi::Property<bool> m_deweightBIS78 {this, "DeweightBIS78", true};
+    Gaudi::Property<bool> m_deweightBME {this, "DeweightBME", true};
+    Gaudi::Property<bool> m_deweightBOE {this, "DeweightBOE", true};
+    Gaudi::Property<bool> m_deweightEEL1C05 {this, "DeweightEEL1C05", false};
+    Gaudi::Property<bool> m_deweightTwoStationTracks {this, "DeweightTwoStationTracks", false};
 
     MuonDriftCircleErrorStrategy m_errorStrategyBEE;
     MuonDriftCircleErrorStrategy m_errorStrategyEE;
@@ -113,53 +121,15 @@ namespace Muon {
     MuonDriftCircleErrorStrategy m_errorStrategy;
     MuonDriftCircleErrorStrategy m_muonErrorStrategy;
 
-    mutable TrkDriftCircleMath::DCSLFitter    m_fitter;
-    mutable TrkDriftCircleMath::SegmentFinder m_finder;
-    mutable TrkDriftCircleMath::SegmentFinder m_finderCleaning;
-
-    int m_finderDebugLevel;
-
     Settings m_defaultSettings;
 
-    mutable unsigned int m_nrefits;
-    mutable unsigned int m_ngoodRefits;
-    mutable unsigned int m_failedErrorUpdateOutlierRemoval;
-    mutable unsigned int m_failedOutlierRemoval;
-    mutable unsigned int m_failedErrorUpdate;
-    mutable unsigned int m_failedRefit;
-    mutable unsigned int m_failedExtrapolationMuonEntry;
-
-    mutable unsigned int m_nbackExtrapolations;
-    mutable unsigned int m_ngoodBackExtrapolations;
-    mutable unsigned int m_failedExtrapolationIP;
-
-    mutable unsigned int m_nupdates;
-    mutable unsigned int m_ngoodUpdates;
-    mutable unsigned int m_failedUpdates;
-
-    float m_alignmentDelta;
-    float m_alignmentAngle;
-    float m_alignmentDeltaError;
-    float m_alignmentAngleError;
-    bool  m_alignmentErrors;
-    bool  m_simpleAEOTs;
-    bool  m_addAll;
-    bool  m_addInner;
-    bool  m_addMiddle;
-    bool  m_addTwo;
-
-    double m_minMuonMomentum;
-    double m_fixedError;
-    double m_flagT0FitRange;
-    bool   m_deweightBEE;
-    bool   m_deweightEE;
-    bool   m_deweightBIS78;
-    bool   m_deweightBME;
-    bool   m_deweightBOE;
-    bool   m_deweightEEL1C05;
-    bool   m_deweightTwoStationTracks;
+    mutable std::atomic<unsigned int> m_nrefits;
+    mutable std::atomic<unsigned int> m_ngoodRefits;
+    mutable std::atomic<unsigned int> m_failedOutlierRemoval;
+    mutable std::atomic<unsigned int> m_failedErrorUpdate;
+    mutable std::atomic<unsigned int> m_failedRefit;
+    mutable std::atomic<unsigned int> m_failedExtrapolationMuonEntry;
 
-  private:
     std::unique_ptr<const Trk::Perigee> createPerigee( const Trk::TrackParameters& pars ) const;
   }; 
 }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.cxx
index 057ca04b3b90b8ff09a81cb997dc252ff9a059de..2198a0e2e3363f13f7d219c4517d262e53f5eb3a 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.cxx
@@ -29,9 +29,6 @@ namespace Muon {
       m_magFieldProperties(Trk::NoField)
   {
     declareInterface<IMuonSeededSegmentFinder>(this);
-
-    declareProperty("AdcCut", m_adcCut = 50 );
-    declareProperty("MdtSigmaFromTrack",m_maxSigma = 3);
   }
 
   StatusCode MuonSeededSegmentFinder::initialize()
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.h
index 6e73d0fe70ead0d1c4d1cb55bd90edd637ce784b..83e1e6630cda18d9f0e2d09d1108ce896d393592 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSeededSegmentFinder.h
@@ -116,8 +116,8 @@ private:
   SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_key_stgc{this,"sTgcPrepDataContainer","STGC_Measurements","sTGC PRDs"};
   SG::ReadHandleKey<Muon::MMPrepDataContainer> m_key_mm{this,"MMPrepDataContainer","MM_Measurements","MM PRDs"};
 
-  double m_adcCut;
-  double m_maxSigma;
+  Gaudi::Property<double> m_adcCut {this, "AdcCut", 50};
+  Gaudi::Property<double> m_maxSigma {this, "MdtSigmaFromTrack", 3};
 };
 
 }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx
index 25e9f71b172813714f55066d6882d3479ce533b4..be24f750b19f9a10fef1529034412895ddc75ba4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx
@@ -17,7 +17,6 @@
 #include "MuonPrepRawData/RpcPrepDataCollection.h"
 #include "MuonPrepRawData/TgcPrepDataCollection.h"
 #include "MuonPrepRawData/CscPrepDataCollection.h"
-// New Small Wheel
 #include "MuonPrepRawData/sTgcPrepDataCollection.h"
 #include "MuonPrepRawData/MMPrepDataCollection.h"
 
@@ -25,7 +24,6 @@
 #include "MuonRIO_OnTrack/RpcClusterOnTrack.h"
 #include "MuonRIO_OnTrack/TgcClusterOnTrack.h"
 #include "MuonRIO_OnTrack/CscClusterOnTrack.h"
-// New Small Wheel
 #include "MuonRIO_OnTrack/sTgcClusterOnTrack.h"
 #include "MuonRIO_OnTrack/MMClusterOnTrack.h"
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.cxx
index 573b70df37c68fa0b4d28300d5469e4d549d9b32..37f5ba4f9d193830a8ffbd9a73dc55527101cc3f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.cxx
@@ -28,21 +28,9 @@
 namespace Muon {
 
   MuonTrackExtrapolationTool::MuonTrackExtrapolationTool(const std::string& ty,const std::string& na,const IInterface* pa)
-    : AthAlgTool(ty,na,pa), 
-      m_atlasExtrapolator("Trk::Extrapolator/AtlasExtrapolator"),
-      m_muonExtrapolator("Trk::Extrapolator/MuonExtrapolator"),
-      m_muonExtrapolator2("Trk::Extrapolator/MuonExtrapolator"),
-      m_trackingGeometrySvc("TrackingGeometrySvc/AtlasTrackingGeometrySvc",na),
-      m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool")
+    : AthAlgTool(ty,na,pa)
   {
     declareInterface<IMuonTrackExtrapolationTool>(this);
-    declareProperty( "TrackingGeometrySvc", m_trackingGeometrySvc);
-    declareProperty( "MuonExtrapolator",    m_muonExtrapolator);
-    declareProperty( "MuonExtrapolator2",   m_muonExtrapolator2);
-    declareProperty( "AtlasExtrapolator",   m_atlasExtrapolator);
-    declareProperty( "Cosmics",             m_cosmics = false);
-    declareProperty( "KeepInitialPerigee",  m_keepOldPerigee = true);
-    declareProperty( "MuonSystemEntranceName", m_msEntranceName = "MuonSpectrometerEntrance" );
   }
 
   StatusCode MuonTrackExtrapolationTool::initialize()
@@ -70,7 +58,7 @@ namespace Muon {
       ATH_MSG_WARNING("  " << m_trackingGeometrySvc << " has no valid trackingGeometry pointer" );
       return nullptr;
     }
-    const Trk::TrackingVolume* msEntrance = m_trackingGeometrySvc->trackingGeometry()->trackingVolume(m_msEntranceName.c_str());
+    const Trk::TrackingVolume* msEntrance = m_trackingGeometrySvc->trackingGeometry()->trackingVolume(m_msEntranceName);
     if( !msEntrance ) {
       ATH_MSG_WARNING("  MS entrance not found" );
       return nullptr;
@@ -113,7 +101,6 @@ namespace Muon {
 	    << " pos " << pars.position() << " dir " << pars.momentum().unit();
       if( propDir == Trk::alongMomentum ) msg() << " going along momentum" << endmsg;
       else if( propDir == Trk::oppositeMomentum ) msg() << " going opposite momentum" << endmsg;
-//      else msg() << " unknown direction" << endmsg;
     }
 
     // for cosmics try both directions
@@ -134,7 +121,7 @@ namespace Muon {
 
   const Trk::TrackParameters* MuonTrackExtrapolationTool::findClosestParametersToMuonEntry( const Trk::Track& track ) const {
 
-    const Trk::TrackingVolume* msEntrance = m_trackingGeometrySvc->trackingGeometry()->trackingVolume(m_msEntranceName.c_str());
+    const Trk::TrackingVolume* msEntrance = m_trackingGeometrySvc->trackingGeometry()->trackingVolume(m_msEntranceName);
     if( !msEntrance ) {
       ATH_MSG_WARNING("Failed to obtain muon entry volume");
       return nullptr;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.h
index 2c67bd9fddc6ced7346ceeeb41b8af9469acac0b..abf94b68ea152fb86d450c5592e7521e21244c46 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackExtrapolationTool.h
@@ -75,25 +75,22 @@ namespace Muon {
 
     const Trk::Perigee* createPerigee( const Trk::TrackParameters& pars ) const;
     
-    ToolHandle<Trk::IExtrapolator>      m_atlasExtrapolator;
-    ToolHandle<Trk::IExtrapolator>      m_muonExtrapolator;
-    ToolHandle<Trk::IExtrapolator>      m_muonExtrapolator2; // Moved from MuonEDMHelperSvc, not sure if it should be private/separate from m_muonExtrapolator
-
     // Read handle for conditions object to get the field cache
     SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
                                                                                "Name of the Magnetic Field conditions object key"};
-    ServiceHandle<Trk::ITrackingGeometrySvc> m_trackingGeometrySvc;
 
-    ServiceHandle<Muon::IMuonEDMHelperSvc>           m_edmHelperSvc {this, "edmHelper", 
-      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
-      "Handle to the service providing the IMuonEDMHelperSvc interface" };
-    ToolHandle<Muon::MuonEDMPrinterTool>             m_printer;
+    ServiceHandle<Trk::ITrackingGeometrySvc> m_trackingGeometrySvc {this, "TrackingGeometrySvc", "TrackingGeometrySvc/AtlasTrackingGeometrySvc"};
+    ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", "Handle to the service providing the IMuonEDMHelperSvc interface"};
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
-    bool m_cosmics;
-    bool m_keepOldPerigee;
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool", "helper to nicely print out tracks"};
+    ToolHandle<Trk::IExtrapolator> m_atlasExtrapolator {this, "AtlasExtrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
+    ToolHandle<Trk::IExtrapolator> m_muonExtrapolator {this, "MuonExtrapolator", "Trk::Extrapolator/MuonExtrapolator"};
+    ToolHandle<Trk::IExtrapolator> m_muonExtrapolator2 {this, "MuonExtrapolator2", "Trk::Extrapolator/MuonExtrapolator"};
 
-    std::string m_msEntranceName;
+    Gaudi::Property<bool> m_cosmics {this, "Cosmics", false};
+    Gaudi::Property<bool> m_keepOldPerigee {this, "KeepInitialPerigee", true};
+    Gaudi::Property<std::string> m_msEntranceName {this, "MuonSystemEntranceName", "MuonSpectrometerEntrance"};
   };
 
 }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx
index 94fa65cf2246f67d1f16f710cfef85f03d59b985..93f4cfc40f63a51df23112a4d131c698cbf0ff11 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx
@@ -1,36 +1,24 @@
 /*
-  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 "MuonTrackScoringTool.h"
 
-#include "TrkToolInterfaces/ITrackSummaryTool.h"
 #include "TrkTrackSummary/TrackSummary.h"
-#include "MuonTrackScoringTool.h"
 #include "TrkDetElementBase/TrkDetElementBase.h"
 #include "TrkTrack/Track.h"
 #include "TrkEventPrimitives/FitQuality.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
-
-#include "GaudiKernel/MsgStream.h"
 
-//#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh"
 #include <cassert>
-#include <vector>
 
 namespace Muon {
 
-  MuonTrackScoringTool::MuonTrackScoringTool(const std::string& t,
-					     const std::string& n,
-					     const IInterface*  p )
-    :
+  MuonTrackScoringTool::MuonTrackScoringTool(const std::string& t, const std::string& n, const IInterface* p) :
     AthAlgTool(t,n,p),
-    m_trkSummaryTool("Trk::TrackSummaryTool"),
-    m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
     m_summaryTypeScore(Trk::numberOfTrackSummaryTypes)
   {
     declareInterface<Trk::ITrackScoringTool>(this);
-    declareProperty("SumHelpTool",          m_trkSummaryTool);
 	
     //set some test values
     m_summaryTypeScore[Trk::numberOfPixelHits]	      =  20;
@@ -64,10 +52,6 @@ namespace Muon {
     m_summaryTypeScore[Trk::numberOfMmHits] = 5;
   }
 
-  MuonTrackScoringTool::~MuonTrackScoringTool()
-  {
-  }
-
   StatusCode MuonTrackScoringTool::initialize()
   {
     
@@ -77,11 +61,6 @@ namespace Muon {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode MuonTrackScoringTool::finalize()
-  {
-    return StatusCode::SUCCESS;
-  }
-
   Trk::TrackScore MuonTrackScoringTool::score( const Trk::Track& track, const bool /*suppressHoleSearch*/ ) const
   {
     Trk::TrackScore score;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.h
index cb7c09b83044434c117c0e093298c58355bd356b..cebc5256dfbdcf2e5d52cbb3f7926893dc5fc47e 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.h
@@ -1,39 +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 MUONTRACKSCORINGTOOL_H
 #define MUONTRACKSCORINGTOOL_H
 
+#include "TrkToolInterfaces/ITrackScoringTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+
 #include "TrkEventPrimitives/TrackScore.h"
-#include "TrkToolInterfaces/ITrackScoringTool.h"
+#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
+#include "TrkToolInterfaces/ITrackSummaryTool.h"
+
+#include <string>
 #include <vector>
 
 namespace Trk {
   class Track;
-  class ITrackSummaryTool;
   class TrackSummary;
 }
 
-class MsgStream;
-
 namespace Muon {
 
-  class MuonEDMPrinterTool;
-
-
   /**Concrete implementation of the ITrackScoringTool pABC*/
   class MuonTrackScoringTool : virtual public Trk::ITrackScoringTool, public AthAlgTool
   {
     
   public:
     MuonTrackScoringTool(const std::string&,const std::string&,const IInterface*);
-    virtual ~MuonTrackScoringTool ();
+    virtual ~MuonTrackScoringTool()=default;
     virtual StatusCode initialize() override;
-    virtual StatusCode finalize  () override;
+
     /** create a score based on how good the passed track is*/
     virtual
     Trk::TrackScore score( const Trk::Track& track, const bool suppressHoleSearch ) const override;
@@ -45,8 +43,8 @@ namespace Muon {
   private:
     
     /**\todo make this const, once createSummary method is const*/
-    ToolHandle<Trk::ITrackSummaryTool> m_trkSummaryTool;
-    ToolHandle<MuonEDMPrinterTool>     m_printer;
+    ToolHandle<Trk::ITrackSummaryTool> m_trkSummaryTool {this, "SumHelpTool", "Trk::TrackSummaryTool"};
+    ToolHandle<MuonEDMPrinterTool> m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool", "helper to nicely print out tracks"};
     
     /**holds the scores assigned to each Trk::SummaryType from the track's Trk::TrackSummary*/
     std::vector<Trk::TrackScore> m_summaryTypeScore;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.cxx
index 8c8f2b36447a8b58b7cddbe8d41199e360f6bbfa..cf0ee994ecc0c5897f0be59ad37e5bbc5087417a 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.cxx
@@ -4,27 +4,21 @@
 
 #include "MuonTrackSelectorTool.h"
 
-#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
-
 #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
 #include "MuonRIO_OnTrack/RpcClusterOnTrack.h"
 #include "MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h"
-
 #include "TrkMeasurementBase/MeasurementBase.h"
-
 #include "TrkTrack/Track.h"
 #include "TrkParameters/TrackParameters.h"
-
 #include "TrkTrackSummary/TrackSummary.h"
 #include "TrkTrackSummary/MuonTrackSummary.h"
+
 #include <map>
 
 namespace Muon {
 
   MuonTrackSelectorTool::MuonTrackSelectorTool(const std::string& ty,const std::string& na,const IInterface* pa)
     : AthAlgTool(ty,na,pa),
-      m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-      m_trackSummaryTool("Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"),
       m_ntotalTracks(0),
       m_failedChi2NDofCut(0),
       m_failedSingleStationCut(0),
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.h
index a411a2f333f5fc7eee66a91ed86a09f3098a7540..3bae5316b8de977448ccacd29676d256159a0e24 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackSelectorTool.h
@@ -12,7 +12,7 @@
 #include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
 #include "MuonRecHelperTools/MuonEDMPrinterTool.h"
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
-
+#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
 #include "TrkParameters/TrackParameters.h"
 
 #include <atomic>
@@ -24,7 +24,6 @@ static const InterfaceID IID_MuonTrackSelectorTool("Muon::MuonTrackSelectorTool"
 
 namespace Trk {
   class Track;
-  class ITrackSummaryHelperTool;
 }
 
 namespace Muon {
@@ -69,11 +68,11 @@ namespace Muon {
 
   private:
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    ServiceHandle<Muon::IMuonEDMHelperSvc>           m_edmHelperSvc {this, "edmHelper", 
+    ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", 
       "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
       "Handle to the service providing the IMuonEDMHelperSvc interface" };       //!< EDM Helper tool
-    ToolHandle<Muon::MuonEDMPrinterTool>             m_printer;          //!< EDM printer tool
-    ToolHandle<Trk::ITrackSummaryHelperTool>         m_trackSummaryTool; //<! muon id helper
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool", "helper to nicely print out tracks"};
+    ToolHandle<Trk::ITrackSummaryHelperTool> m_trackSummaryTool {this, "TrackSummaryHelperTool", "Muon::MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool"};
 
     double m_holeHitRatioCutPerStation;
     double m_chi2NDofCut;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.cxx
index cc63d201d681ca180f14bf9617f8f0908b88c496..78cb83fc01b081f8057fb625d9ae9eca8051af7a 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.cxx
@@ -5,40 +5,24 @@
 #include "MuonTrackToSegmentTool.h"
 
 #include "MuonSegment/MuonSegment.h"
-
 #include "MuonSegment/MuonSegmentQuality.h"
 #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
 #include "MuonRIO_OnTrack/CscClusterOnTrack.h"
 #include "MuonRIO_OnTrack/MMClusterOnTrack.h"
-
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
-
 #include "TrkTrack/Track.h"
 #include "TrkEventPrimitives/LocalDirection.h"
 #include "TrkEventPrimitives/JacobianPhiThetaLocalAngles.h"
-
 #include "TrkGeometry/MagneticFieldProperties.h"
-
 #include "EventPrimitives/EventPrimitivesHelpers.h"
 
 #include <set>
 
 namespace Muon {
-
-  
   MuonTrackToSegmentTool::MuonTrackToSegmentTool(const std::string& t,const std::string& n,const IInterface* p)  :  
-    AthAlgTool(t,n,p),
-    m_intersectSvc("MuonStationIntersectSvc", name()),
-    m_propagator("Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"),
-    m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool")
+    AthAlgTool(t,n,p)
   {
-
     declareInterface<IMuonTrackToSegmentTool>(this);
-
-    declareProperty("MuonStationIntersectSvc", m_intersectSvc);
-    declareProperty("Propagator",              m_propagator);
-    declareProperty("EDMPrinter",              m_printer);
-
   }
 
   StatusCode MuonTrackToSegmentTool::initialize() {
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.h
index 704357d567ba419c6c6d77fa23f67a9d00da41f5..0747cbcdc8fe1f9b8e83746731a67223c8d2b58f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackToSegmentTool.h
@@ -70,13 +70,14 @@ namespace Muon {
 	"MuonDetectorManager", 
 	"Key of input MuonDetectorManager condition data"};    
 
-    ServiceHandle<MuonStationIntersectSvc> m_intersectSvc;  //<! pointer to hole search service
-    ToolHandle<Trk::IPropagator>        m_propagator;       //<! propagator
+    ServiceHandle<MuonStationIntersectSvc> m_intersectSvc {this, "MuonStationIntersectSvc", "MuonStationIntersectSvc", "pointer to hole search service"};
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     ServiceHandle<IMuonEDMHelperSvc>    m_edmHelperSvc {this, "edmHelper", 
       "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
       "Handle to the service providing the IMuonEDMHelperSvc interface" };       //<! multipurpose helper tool
-    ToolHandle<MuonEDMPrinterTool>      m_printer;          //<! tool to print out EDM objects
+    
+    ToolHandle<MuonEDMPrinterTool> m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool", "helper to nicely print out tracks"};
+    ToolHandle<Trk::IPropagator> m_propagator {this, "Propagator", "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"};
 
     SG::ReadCondHandleKey<MdtCondDbData> m_condKey{this, "MdtCondKey", "MdtCondDbData", "Key of MdtCondDbData"};
 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx
index e6f380d37f930f6cb4d19e5dbf4fed7efd9b1f9e..d46df0c7ba32d6157277eac9352b66ff28b421f2 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg.cxx
@@ -408,9 +408,9 @@ TgcLv1RawDataValAlg::procHistograms(){
           // Get Fractions and Errors
           fp=fc=fn=efp=efc=efn=0;
           if( tot != 0 ){
-            fp= p/tot; efp = sqrt( fp*(1.-fp)/tot );
-            fc= c/tot; efc = sqrt( fc*(1.-fc)/tot );
-            fn= n/tot; efn = sqrt( fn*(1.-fn)/tot );
+            fp= p/tot; efp = std::sqrt( fp*(1.-fp)/tot );
+            fc= c/tot; efc = std::sqrt( fc*(1.-fc)/tot );
+            fn= n/tot; efn = std::sqrt( fn*(1.-fn)/tot );
           }
           // Fill Fractions into map
           m_tgclv1slcurrentfractionmap[ac]->SetBinContent(etabinp +1,  phi48, fp);
@@ -431,9 +431,9 @@ TgcLv1RawDataValAlg::procHistograms(){
           // Get Fractions and Errors
           fp=fc=fn=efp=efc=efn=0;
           if( tot != 0 ){
-            fp= p/tot; efp = sqrt( fp*(1.-fp)/tot );
-            fc= c/tot; efc = sqrt( fc*(1.-fc)/tot );
-            fn= n/tot; efn = sqrt( fn*(1.-fn)/tot );
+            fp= p/tot; efp = std::sqrt( fp*(1.-fp)/tot );
+            fc= c/tot; efc = std::sqrt( fc*(1.-fc)/tot );
+            fn= n/tot; efn = std::sqrt( fn*(1.-fn)/tot );
           }
           // Fill Fractions into map
           m_tgclv1lptcurrentfractionmap[ac]->SetBinContent(etabinp +1,  phi48, fp);
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx
index 2338f61f3ada8aa1ed41c05f9a72caf5252d0b97..2a37e9f7d7413a78c0d9e8ba66f0bf242f5a100e 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_Functions.cxx
@@ -134,7 +134,7 @@ TgcLv1RawDataValAlg::deltaR(float eta1, float phi1, float eta2, float phi2){
   float deta = eta1 - eta2;
   float dphi = acos(cos(phi1-phi2));
 
-  return sqrt( deta*deta + dphi*dphi );
+  return std::sqrt( deta*deta + dphi*dphi );
 }
 
 ///////////////////////////////////////////////////////////////////////////
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx
index 2fac5209b645dee34e6a9d6519157c5a9dfa451c..ab55ab72adf7e20f6bead5620488b41d05191c9a 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_NumberOfTrigger.cxx
@@ -684,7 +684,6 @@ TgcLv1RawDataValAlg::fillNumberOfTrigger(){
 	if(pcn==CURR){
 	  if(t_isInner){
 	    if(ws==0){
-	      //std::cout<<"bEIFI "<<b_EI0<<"/"<<b_FI0<<"/"<<b_EI1<<"/"<<b_FI1<<"/"<<b_EI2<<"/"<<b_FI2<<std::endl;
 	      if (b_EI0 == 1)m_tgclv1hptstripinlbvssecteifilumi[ac]->Fill(m_lumiblock,0);
 	      if (b_FI0 == 1)m_tgclv1hptstripinlbvssecteifilumi[ac]->Fill(m_lumiblock,1);
 	      if (b_EI1 == 1)m_tgclv1hptstripinlbvssecteifilumi[ac]->Fill(m_lumiblock,2);
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx
index df96df67e299efbc90fe05183eeac972582c8336..bfa97d2651d1f78839d32fc0d1fc6f1514252d72 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcLv1RawDataValAlg_ReadContainer.cxx
@@ -329,7 +329,7 @@ TgcLv1RawDataValAlg::readOfflineMuonContainer(std::vector<float>* mu_pt, std::ve
       float deta = std::abs(mu_eta->at(itr) - eta);
       float dphi = std::abs(mu_phi->at(itr) - phi);
       if(dphi > M_PI) dphi = 2*M_PI - dphi;
-      if(sqrt(deta*deta + dphi*dphi) < 0.1){
+      if(std::sqrt(deta*deta + dphi*dphi) < 0.1){
 	if(pt > mu_pt->at(itr)){
 	  std::vector<float>::iterator ipt;
 	  ipt = mu_pt->begin();
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
index 3627fdd0649176bc9dc15e2f5404e9ec92a45e31..2d0e7fbbfc142ed0c56e0940d695be21071ec1fc 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
@@ -559,9 +559,9 @@ TgcRawDataMonitorAlgorithm::getError(const std::vector<double>& inputVec) const
   }
   const double mean = sum/nSize;
   for(int jj = 0; jj < nSize; jj++){
-    sum2 = sum2 + pow((inputVec.at(jj)-mean),2);
+    sum2 = sum2 + std::pow((inputVec.at(jj)-mean),2);
   }
-  const double stdDev = sqrt(sum2/nSize);
+  const double stdDev = std::sqrt(sum2/nSize);
   return stdDev;
 }
 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx
index 13fe8a63402a1578292e1ce8424ffbfad0273f94..1b75ab839567b550fdbb6c597162bd28e56d23bf 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_Efficiency.cxx
@@ -444,7 +444,7 @@ TgcRawDataValAlg::fillEfficiency(){
         // channel number +offset for wires and strips in each layer
         int chIds[2][9] = {{-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,},
                            {-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,}};//[ws][layer]
-        // Eta and Phi positions of channels (layer2 has no strips)
+        // Eta and Phi positions of channels (layer2 has no strips)
         double chEtas[2][9] = {{-99,-99,-99,-99,-99,-99,-99,-99,-99,},
                                {-99, -1,-99,-99,-99,-99,-99,-99,-99,}};//[ws][layer]
         double chPhis[2][9] = {{-99,-99,-99,-99,-99,-99,-99,-99,-99,},
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonTrackMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonTrackMonitorAlgorithm.cxx
index d18591933e2b7f128bb49c177b0376ea35f58e1c..732e53a50c501a28ab3682ca828eb570a7b49f66 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonTrackMonitorAlgorithm.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonTrackMonitorAlgorithm.cxx
@@ -413,8 +413,10 @@ StatusCode MuonTrackMonitorAlgorithm::fillHistograms(const EventContext& ctx) co
 
 	ATH_CHECK( analyseLowLevelMuonFeatures(*Muons, lumiBlockID) );
 	ATH_CHECK( analyseCombinedTracks(*Muons, lumiBlockID) );
-	ATH_CHECK( analyseZBosonCandidates(*Muons, lumiBlockID) );
-	ATH_CHECK( analyseJPsiCandidates(*Muons, lumiBlockID) );
+	if (dataType() != DataType_t::cosmics) {
+		ATH_CHECK( analyseZBosonCandidates(*Muons, lumiBlockID) );
+		ATH_CHECK( analyseJPsiCandidates(*Muons, lumiBlockID) );
+	}
 
 	return StatusCode::SUCCESS;
 }
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithmsDict.h b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithmsDict.h
index 4a4318995cb2168c360ec4e132266ac6f86326d3..5cc55b7b67b469e1b5726de57809b8ffd09d739b 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithmsDict.h
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithmsDict.h
@@ -10,6 +10,7 @@
 
 #include <AsgAnalysisAlgorithms/AsgFlagSelectionTool.h>
 #include <AsgAnalysisAlgorithms/AsgPtEtaSelectionTool.h>
+#include <AsgAnalysisAlgorithms/AsgClassificationDecorationAlg.h>
 #include <AsgAnalysisAlgorithms/AsgCutBookkeeperAlg.h>
 #include <AsgAnalysisAlgorithms/AsgEventScaleFactorAlg.h>
 #include <AsgAnalysisAlgorithms/AsgLeptonTrackSelectionAlg.h>
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgClassificationDecorationAlg.h b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgClassificationDecorationAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..069d942c101a39e5aab166c94d03991b5b32b0ad
--- /dev/null
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/AsgClassificationDecorationAlg.h
@@ -0,0 +1,63 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Tadej Novak <tadej@cern.ch>
+
+#ifndef ASG_ANALYSIS_ALGORITHMS__ASG_CLASSIFICATION_DECORATION_ALG_H
+#define ASG_ANALYSIS_ALGORITHMS__ASG_CLASSIFICATION_DECORATION_ALG_H
+
+#include <AnaAlgorithm/AnaAlgorithm.h>
+#include <SystematicsHandles/SysCopyHandle.h>
+#include <SystematicsHandles/SysListHandle.h>
+#include <xAODBase/IParticle.h>
+#include <xAODBase/IParticleContainer.h>
+
+#include <AsgAnalysisInterfaces/IClassificationTool.h>
+
+
+namespace CP
+{
+
+/// \brief an algorithm for decorating classification using a tool based
+/// on the \ref CP::IClassificationTool
+class AsgClassificationDecorationAlg final : public EL::AnaAlgorithm
+{
+  /// \brief the standard constructor
+public:
+  AsgClassificationDecorationAlg(const std::string& name, 
+                                 ISvcLocator* pSvcLocator);
+
+
+public:
+  virtual StatusCode initialize() override;
+
+public:
+  virtual StatusCode execute() override;
+
+
+  /// \brief truth classifier tool handle
+private:
+    ToolHandle<IClassificationTool> m_tool;
+
+  /// \brief the systematics list we run
+private:
+  CP::SysListHandle m_systematicsList {this};
+
+  /// \brief particles container handle
+private:
+  CP::SysCopyHandle<xAOD::IParticleContainer> m_particlesHandle {
+    this, "particles", "", "the container to use"};
+
+  /// \brief the decoration for the truth classification
+private:
+  std::string m_classificationDecoration {};
+
+  /// \brief the accessor for \ref m_truthClassificationDecoration
+private:
+  std::unique_ptr<const SG::AuxElement::Accessor<unsigned int> > m_classificationAccessor {};
+};
+
+} // namespace CP
+
+#endif
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/selection.xml b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/selection.xml
index bd28958853419777730a150fa06ad7a694ca698d..879b8badc84b6e161f4b5f00ca3cffa5f83dd4b8 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/selection.xml
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/selection.xml
@@ -3,6 +3,7 @@
    <class name="CP::AsgFlagSelectionTool" />
    <class name="CP::AsgPtEtaSelectionTool" />
 
+   <class name="CP::AsgClassificationDecorationAlg" />
    <class name="CP::AsgCutBookkeeperAlg" />
    <class name="CP::AsgEventScaleFactorAlg" />
    <class name="CP::AsgLeptonTrackSelectionAlg" />
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/AsgClassificationDecorationAlg.cxx b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/AsgClassificationDecorationAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..15cbf9f1dff0c4108899ea7a2fbc4c8e1254ae5e
--- /dev/null
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/AsgClassificationDecorationAlg.cxx
@@ -0,0 +1,61 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Tadej Novak <tadej@cern.ch>
+
+
+#include <AsgAnalysisAlgorithms/AsgClassificationDecorationAlg.h>
+
+
+namespace CP
+{
+
+AsgClassificationDecorationAlg::AsgClassificationDecorationAlg(const std::string &name,
+                                               ISvcLocator *pSvcLocator)
+    : AnaAlgorithm(name, pSvcLocator)
+{
+  declareProperty ("decoration", m_classificationDecoration, "the decoration for classification");
+  declareProperty ("tool", m_tool, "classification tool");
+}
+
+
+
+StatusCode AsgClassificationDecorationAlg::initialize()
+{
+  if (m_classificationDecoration.empty())
+  {
+    ANA_MSG_ERROR ("Classification decoration name should not be empty.");
+    return StatusCode::FAILURE;
+  }
+
+  m_classificationAccessor = std::make_unique<SG::AuxElement::Accessor<unsigned int> > (m_classificationDecoration);
+
+  m_systematicsList.addHandle(m_particlesHandle);
+  ANA_CHECK(m_systematicsList.initialize());
+
+  ANA_CHECK(m_tool->initialize());
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+StatusCode AsgClassificationDecorationAlg::execute()
+{
+  return m_systematicsList.foreach ([&](const CP::SystematicSet &sys) -> StatusCode
+  {
+    xAOD::IParticleContainer *particles{};
+    ANA_CHECK(m_particlesHandle.getCopy(particles, sys));
+
+    for (xAOD::IParticle *particle : *particles) {
+      unsigned int classification{};
+      ANA_CHECK(m_tool->classify(*particle, classification));
+      (*m_classificationAccessor)(*particle) = classification;
+    }
+
+    return StatusCode::SUCCESS;
+  });
+}
+
+} // namespace CP
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/src/components/AsgAnalysisAlgorithms_entries.cxx b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/src/components/AsgAnalysisAlgorithms_entries.cxx
index 14e40a32afaa936d47565f72dcec16591008ebaf..687cf050077626fc068ce9ae7628705e0b9471be 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/src/components/AsgAnalysisAlgorithms_entries.cxx
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/src/components/AsgAnalysisAlgorithms_entries.cxx
@@ -10,6 +10,7 @@
 #include <AsgAnalysisAlgorithms/AsgFlagSelectionTool.h>
 #include <AsgAnalysisAlgorithms/AsgPtEtaSelectionTool.h>
 #include <AsgAnalysisAlgorithms/AsgCutBookkeeperAlg.h>
+#include <AsgAnalysisAlgorithms/AsgCutBookkeeperAlg.h>
 #include <AsgAnalysisAlgorithms/AsgEventScaleFactorAlg.h>
 #include <AsgAnalysisAlgorithms/AsgLeptonTrackSelectionAlg.h>
 #include <AsgAnalysisAlgorithms/AsgOriginalObjectLinkAlg.h>
@@ -32,6 +33,7 @@
 DECLARE_NAMESPACE_TOOL_FACTORY (CP, AsgFlagSelectionTool)
 DECLARE_NAMESPACE_TOOL_FACTORY (CP, AsgPtEtaSelectionTool)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY (CP, AsgCutBookkeeperAlg)
+DECLARE_NAMESPACE_ALGORITHM_FACTORY (CP, AsgCutBookkeeperAlg)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY (CP, AsgEventScaleFactorAlg)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY (CP, AsgLeptonTrackSelectionAlg)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY (CP, AsgOriginalObjectLinkAlg)
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py b/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py
index 666a812b5958c726f50b22d4e652a382c9b49db4..7f4071058ee03af77e9d0192cbd60fd8bcba2ea1 100755
--- a/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py
@@ -3,7 +3,7 @@
 #=======================================================================
 # File:   ParticleBuilderOptions/python/AODFlags.py
 #=======================================================================
-""" AOD Building specific flags and job properties.  
+""" AOD Building specific flags and job properties.
 
 """
 
@@ -41,7 +41,7 @@ class Electron(JobProperty):
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class egammaTrackSlimmer(JobProperty):
     """ If True, add egammaTrackSlimmer
     """
@@ -55,7 +55,7 @@ class AddEgammaMuonTracksInAOD(JobProperty):
     """
     statusOn=True
     allowedTypes=['bool']
-    StoredValue=True
+    StoredValue=False
 
 
 class AddEgammaTracksInMCAOD(JobProperty):
@@ -86,7 +86,7 @@ class ThinNegativeEnergyNeutralPFOs(JobProperty):
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-   
+
 class ThinInDetForwardTrackParticles(JobProperty):
     """ If True, add ThinInDetForwardTrackParticles
     """
@@ -94,21 +94,21 @@ class ThinInDetForwardTrackParticles(JobProperty):
     allowedTypes=['bool']
     StoredValue=True
 
- 
+
 class Muon(JobProperty):
     """ If True, add Muon
     """
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class Tau(JobProperty):
     """ If True, add Tau
     """
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class TrackParticleSlimmer(JobProperty):
     """ If True, add TrackParticleSlimmer which slims last hit
     """
@@ -129,7 +129,7 @@ class ParticleJet(JobProperty):
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class JetTag(JobProperty):
     """ If True, add JetTag
     """
@@ -137,28 +137,28 @@ class JetTag(JobProperty):
     allowedTypes=['bool']
     # disable jet tagging since done at rdo->esd
     StoredValue=False
-    
+
 class SpclMC(JobProperty):
     """ If True, add SpclMC
     """
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class TruthParticleJet(JobProperty):
     """ If True, add TruthParticleJet
     """
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class Trigger(JobProperty):
     """ If True, add Trigger
     """
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class Streaming(JobProperty):
     """ If True, add Streaming
     """
@@ -174,7 +174,7 @@ class TauRec(JobProperty):
     statusOn=True
     allowedTypes=['bool']
     StoredValue=True
-    
+
 class Tau1p3p(JobProperty):
     """ If True, add Tau1p3p
     """
@@ -182,14 +182,14 @@ class Tau1p3p(JobProperty):
     allowedTypes=['bool']
     StoredValue=True
 
-# Fast Simulation AOD Builder    
+# Fast Simulation AOD Builder
 class FastSimulation(JobProperty):
     """ If True, add FastSimulation
     """
     statusOn=True
     allowedTypes=['bool']
     StoredValue=False
-    
+
 class MissingEtTruth(JobProperty):
     """ If True, add Streaming
     """
@@ -198,7 +198,7 @@ class MissingEtTruth(JobProperty):
     # disable MissingEtTruth.
     # should be ON only if fasst AOD produced in standalone mode
     StoredValue=False
-    
+
 class FastTrackParticle(JobProperty):
     """ If True, add Streaming
     """
@@ -221,12 +221,12 @@ class McEventKeyStr(JobProperty):
 class AODFlagsContainer(JobPropertyContainer):
     """ The AOD building flag/job propertycontainer.
     """
-    
+
     JobProperty._log.info("AODFlags:: now uses JobProperty mechanisms")
 
     # Key member for McEventCollection, but overloaded by McEventKeyStr
     # via __getattribute__ and __setattr__ methods : see bellow
-    
+
     McEventKey="DummyStringValue"
 
     def __getattribute__(self, name):
@@ -282,13 +282,13 @@ class AODFlagsContainer(JobPropertyContainer):
     def fastSetOn(self):
         self._log.info("AODFlags:: using fastSetOn method. Is it usefull ?")
         self.FastSimulation.set_Value(True)
-        self.MissingEtTruth.set_Value(True)        
+        self.MissingEtTruth.set_Value(True)
         self.FastTrackParticle.set_Value(True)
-            
-# add the aod flags container to the top container 
+
+# add the aod flags container to the top container
 jobproperties.add_Container(AODFlagsContainer)
 
-# I want always the following flags in the AOD container  
+# I want always the following flags in the AOD container
 _list_AOD=[ \
     Photon,Electron,egammaTrackSlimmer, \
     AddEgammaMuonTracksInAOD, \
@@ -307,7 +307,7 @@ _list_AOD=[ \
     FastSimulation,MissingEtTruth,FastTrackParticle, \
     McEventKeyStr ]
 
-for j in _list_AOD: 
+for j in _list_AOD:
     jobproperties.AODFlagsContainer.add_JobProperty(j)
 del _list_AOD
 
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetDeltaRLabelTool.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetDeltaRLabelTool.h
index 638796283e1f96f1d60a04a11c706d9ca1227a3f..3238fdf12461ab056044bc9f43835e9968619b78 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetDeltaRLabelTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetDeltaRLabelTool.h
@@ -10,6 +10,7 @@
 #include "xAODTruth/TruthParticle.h"
 #include "xAODTruth/TruthParticleContainer.h"
 
+#include "ParticleJetTools/ParticleJetLabelCommon.h"
 
 class ParticleJetDeltaRLabelTool : public asg::AsgTool, public IJetModifier {
 ASG_TOOL_CLASS(ParticleJetDeltaRLabelTool, IJetModifier)
@@ -30,8 +31,7 @@ public:
 protected:
 
   /// Name of jet label attributes
-  std::string m_labelname;
-  std::string m_doublelabelname;
+  ParticleJetTools::LabelNames m_labelnames;
   std::string m_taulabelname;
   std::string m_bottomlabelname;
   std::string m_charmlabelname;
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetGhostLabelTool.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetGhostLabelTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b0d8749b152755cbedfccd905f381c95804d75ab
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetGhostLabelTool.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PARTICLEJETGHOSTLABELTOOL_H
+#define PARTICLEJETGHOSTLABELTOOL_H
+
+#include "AsgTools/AsgTool.h"
+#include "JetInterface/IJetModifier.h"
+#include "xAODTruth/TruthParticle.h"
+#include "xAODTruth/TruthParticleContainer.h"
+
+#include "ParticleJetTools/ParticleJetLabelCommon.h"
+
+class ParticleJetGhostLabelTool : public asg::AsgTool, public IJetModifier {
+ASG_TOOL_CLASS(ParticleJetGhostLabelTool, IJetModifier)
+public:
+
+  /// Constructor
+  ParticleJetGhostLabelTool(const std::string& name);
+
+  StatusCode modify(xAOD::JetContainer& jets) const;
+
+protected:
+
+  std::vector<const xAOD::TruthParticle*> match(
+    const xAOD::Jet&, const std::string& ghostname
+    ) const;
+
+  /// Name of jet label attributes
+  ParticleJetTools::LabelNames m_labelnames;
+  std::string m_ghosttauname;
+  std::string m_ghostcname;
+  std::string m_ghostbname;
+
+  /// Minimum pT for particle selection (in MeV)
+  double m_partptmin;
+};
+
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetLabelCommon.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetLabelCommon.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba019c4c76a8edf44db11243d7b34275e287e474
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetLabelCommon.h
@@ -0,0 +1,37 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef PARTICLE_JET_LABEL_COMMON_H
+#define PARTICLE_JET_LABEL_COMMON_H
+
+#include "xAODTruth/TruthParticle.h"
+#include "xAODJet/Jet.h"
+
+#include <vector>
+
+namespace ParticleJetTools {
+
+  struct LabelNames {
+    std::string singleint;
+    std::string doubleint;
+  };
+
+  struct PartonCounts {
+    size_t b;
+    size_t c;
+    size_t tau;
+  };
+
+  void setJetLabels(xAOD::Jet& jet,
+                    const PartonCounts& counts,
+                    const LabelNames& names);
+
+  void childrenRemoved
+  ( const std::vector<const xAOD::TruthParticle*>& parents
+    , std::vector<const xAOD::TruthParticle*>& children
+    );
+}
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h
index 13acc2a9894cc6d84804ea34e3608175239d5328..8d8f0084c94eb8b7d82639d14391d52f61f86b95 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/ParticleJetTools/ParticleJetToolsDict.h
@@ -11,6 +11,7 @@
 #include "ParticleJetTools/CopyFlavorLabelTruthParticles.h"
 #include "ParticleJetTools/CopyTruthJetParticles.h"
 #include "ParticleJetTools/ParticleJetDeltaRLabelTool.h"
+#include "ParticleJetTools/ParticleJetGhostLabelTool.h"
 #include "ParticleJetTools/JetParticleAssociation.h"
 #include "ParticleJetTools/JetParticleCenterOfMassAssociation.h"
 #include "ParticleJetTools/JetParticleShrinkingConeAssociation.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx
index 3ed484a63c6a21c8859c0fac081db70879f67c8c..4c5f4598a1ff03d4745849755920f31ce173692a 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetDeltaRLabelTool.cxx
@@ -3,6 +3,7 @@
 */
 
 #include "ParticleJetTools/ParticleJetDeltaRLabelTool.h"
+#include "ParticleJetTools/ParticleJetLabelCommon.h"
 #include "xAODJet/JetContainer.h"
 #include "AsgTools/Check.h"
 
@@ -11,8 +12,8 @@ using namespace xAOD;
 
 ParticleJetDeltaRLabelTool::ParticleJetDeltaRLabelTool(const std::string& name)
         : AsgTool(name) {
-    declareProperty("LabelName", m_labelname="", "Name of the jet label attribute to be added.");
-    declareProperty("DoubleLabelName", m_doublelabelname="", "Name of the jet label attribute to be added (with the possibility of up to 2 matched hadrons).");
+    declareProperty("LabelName", m_labelnames.singleint="", "Name of the jet label attribute to be added.");
+    declareProperty("DoubleLabelName", m_labelnames.doubleint="", "Name of the jet label attribute to be added (with the possibility of up to 2 matched hadrons).");
     declareProperty("BLabelName", m_bottomlabelname="", "Name of the attribute to be added for matched B hadrons.");
     declareProperty("CLabelName", m_charmlabelname="", "Name of the attribute to be added for matched C hadrons.");
     declareProperty("TauLabelName", m_taulabelname="", "Name of the attribute to be added for matched taus.");
@@ -25,83 +26,6 @@ ParticleJetDeltaRLabelTool::ParticleJetDeltaRLabelTool(const std::string& name)
 
 namespace {
 
-    // TODO
-    // can we do better by only looking at hadrons?
-    inline bool isChild
-        ( const TruthParticle* p
-        , const TruthParticle* c
-        ) {
-
-        if (p->barcode() == c->barcode())
-            return false;
-
-
-        for (size_t iC = 0; iC < p->nChildren(); iC++) {
-            const TruthParticle* cc = p->child(iC);
-	    if(!cc) continue;
-
-            if (cc->barcode() == c->barcode()) {
-                return true;
-            }
-
-            if (isChild(cc, c)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-
-    inline void childrenRemoved
-        ( const vector<const TruthParticle*>& parents
-        , vector<const TruthParticle*>& children
-        ) {
-
-        // TODO
-        // this is probably very inefficient,
-        // but it's simple.
-
-        // for instance: if we remove a child from info on one parent,
-        // we still loop over the child again for the next parent.
-
-        // also, we're passing around vectors rather than their
-        // references.
-
-        // for each of the parents
-        for ( size_t ip = 0
-            ; ip != parents.size()
-            ; ip++ ) {
-
-            const TruthParticle* p = parents[ip];
-	    if(!p) continue;
-
-            // the current child index
-            size_t ic = 0;
-
-            // (x) each of the potential children
-            while (ic != children.size()) {
-
-                const TruthParticle* c = children[ic];
-		if (!c) continue;
-
-                // if citer is (recursively) a child of piter
-                // remove it.
-                if (isChild(p, c)) {
-                    children.erase(children.begin() + ic);
-                    // do not increment ic: we just removed a child.
-                    continue;
-
-                } else {
-                    // increment ic: we did *not* remove a child.
-                    ic++;
-                    continue;
-                }
-            }
-        }
-
-        return;
-    }
 
 }
 
@@ -146,6 +70,7 @@ StatusCode ParticleJetDeltaRLabelTool::modify(JetContainer& jets) const {
         // don't care about double tau jets
         // so leave them for now.
 
+        using ParticleJetTools::childrenRemoved;
         childrenRemoved(jetlabelpartsb[iJet], jetlabelpartsb[iJet]);
         childrenRemoved(jetlabelpartsb[iJet], jetlabelpartsc[iJet]);
         childrenRemoved(jetlabelpartsc[iJet], jetlabelpartsc[iJet]);
@@ -158,44 +83,18 @@ StatusCode ParticleJetDeltaRLabelTool::modify(JetContainer& jets) const {
 
         // set truth label to -99 for jets below pt threshold
         if (jet.pt() < m_jetptmin) {
-            jet.setAttribute<int>(m_labelname, -99);
-            jet.setAttribute<int>(m_doublelabelname, -99);
+            jet.setAttribute<int>(m_labelnames.singleint, -99);
+            jet.setAttribute<int>(m_labelnames.doubleint, -99);
             continue;
         }
 
         // set truth label for jets above pt threshold
         // hierarchy: b > c > tau > light
-        if (jetlabelpartsb.at(iJet).size())
-            jet.setAttribute<int>(m_labelname, 5);
-        else if (jetlabelpartsc.at(iJet).size())
-            jet.setAttribute<int>(m_labelname, 4);
-        else if (jetlabelpartstau.at(iJet).size())
-            jet.setAttribute<int>(m_labelname, 15);
-        else 
-            jet.setAttribute<int>(m_labelname, 0);
-
-        if (jetlabelpartsb.at(iJet).size()) {
-            if (jetlabelpartsb.at(iJet).size() >= 2)
-                jet.setAttribute<int>(m_doublelabelname, 55);
-
-            else if (jetlabelpartsc.at(iJet).size())
-                jet.setAttribute<int>(m_doublelabelname, 54);
-
-            else
-                jet.setAttribute<int>(m_doublelabelname, 5);
-
-        } else if (jetlabelpartsc.at(iJet).size()) {
-            if (jetlabelpartsc.at(iJet).size() >= 2)
-                jet.setAttribute<int>(m_doublelabelname, 44);
-
-            else
-                jet.setAttribute<int>(m_doublelabelname, 4);
-
-        } else if (jetlabelpartstau.at(iJet).size())
-            jet.setAttribute<int>(m_doublelabelname, 15);
-
-        else 
-            jet.setAttribute<int>(m_doublelabelname, 0);
+        ParticleJetTools::PartonCounts counts;
+        counts.b = jetlabelpartsb.at(iJet).size();
+        counts.c = jetlabelpartsc.at(iJet).size();
+        counts.tau = jetlabelpartstau.at(iJet).size();
+        ParticleJetTools::setJetLabels(jet, counts, m_labelnames);
     }
 
     return StatusCode::SUCCESS;
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2a022fd3f80f683fa026a7b6382a77cbfa4e100b
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetGhostLabelTool.cxx
@@ -0,0 +1,77 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "ParticleJetTools/ParticleJetGhostLabelTool.h"
+#include "ParticleJetTools/ParticleJetLabelCommon.h"
+#include "xAODJet/JetContainer.h"
+#include "AsgTools/Check.h"
+
+using namespace std;
+using namespace xAOD;
+
+ParticleJetGhostLabelTool::ParticleJetGhostLabelTool(const std::string& name)
+        : AsgTool(name) {
+    declareProperty("LabelName", m_labelnames.singleint="HadronGhostTruthLabelID", "Name of the jet label attribute to be added.");
+    declareProperty("DoubleLabelName", m_labelnames.doubleint="HadronGhostExtendedTruthLabelID", "Name of the jet label attribute to be added (with the possibility of up to 2 matched hadrons).");
+    declareProperty("GhostBName", m_ghostbname="GhostBHadronsFinal", "Name of attribute for matched B hadrons.");
+    declareProperty("GhostCName", m_ghostcname="GhostCHadronsFinal", "Name of attribute for matched C hadrons.");
+    declareProperty("GhostTauName", m_ghosttauname="GhostTausFinal", "Name of attribute for matched Taus.");
+    declareProperty("PartPtMin", m_partptmin=5000, "Minimum pT of particles for labeling (MeV)");
+}
+
+
+StatusCode ParticleJetGhostLabelTool::modify(JetContainer& jets) const {
+
+  using namespace std;
+  using namespace xAOD;
+
+  ATH_MSG_VERBOSE("In " << name() << "::modify()");
+
+  for (xAOD::Jet* jetptr: jets) {
+
+    Jet& jet = *jetptr;
+    vector<const TruthParticle*> jetlabelpartsb = match(jet, m_ghostbname);
+    vector<const TruthParticle*> jetlabelpartsc = match(jet, m_ghostcname);
+    vector<const TruthParticle*> jetlabelpartstau = match(jet, m_ghosttauname);
+
+    // remove children whose parent hadrons are also in the jet.
+    // don't care about double tau jets
+    // so leave them for now.
+
+    using ParticleJetTools::childrenRemoved;
+    childrenRemoved(jetlabelpartsb, jetlabelpartsb);
+    childrenRemoved(jetlabelpartsb, jetlabelpartsc);
+    childrenRemoved(jetlabelpartsc, jetlabelpartsc);
+
+    // set truth label for jets above pt threshold
+    // hierarchy: b > c > tau > light
+    ParticleJetTools::PartonCounts counts;
+    counts.b = jetlabelpartsb.size();
+    counts.c = jetlabelpartsc.size();
+    counts.tau = jetlabelpartstau.size();
+    ParticleJetTools::setJetLabels(jet, counts, m_labelnames);
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+std::vector<const TruthParticle*>
+ParticleJetGhostLabelTool::match(
+  const xAOD::Jet& jet, const std::string& ghostname) const {
+
+  ATH_MSG_VERBOSE("In " << name() << "::match()");
+
+  std::vector<const xAOD::TruthParticle*> parton_links
+    = jet.getAssociatedObjects<const xAOD::TruthParticle>(ghostname);
+
+  std::vector<const xAOD::TruthParticle*> selected_partons;
+  for (const xAOD::TruthParticle* part: parton_links) {
+    if (part->pt() > m_partptmin) {
+      selected_partons.push_back(part);
+    }
+  }
+  return selected_partons;
+}
+
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetLabelCommon.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetLabelCommon.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e523fe4d3c4ec2c60d0ea067c95625b665c8be0b
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/ParticleJetLabelCommon.cxx
@@ -0,0 +1,134 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "ParticleJetTools/ParticleJetLabelCommon.h"
+
+namespace ParticleJetTools {
+
+  // the code below is taken from ParticleJetDeltaRLabelTool with
+  // minimal modification
+  // --------------------------------------------------------------
+
+    // TODO
+    // can we do better by only looking at hadrons?
+    inline bool isChild
+        ( const xAOD::TruthParticle* p
+        , const xAOD::TruthParticle* c
+        ) {
+
+        if (p->barcode() == c->barcode())
+            return false;
+
+
+        for (size_t iC = 0; iC < p->nChildren(); iC++) {
+            const xAOD::TruthParticle* cc = p->child(iC);
+	    if(!cc) continue;
+
+            if (cc->barcode() == c->barcode()) {
+                return true;
+            }
+
+            if (isChild(cc, c)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+
+    void childrenRemoved
+        ( const std::vector<const xAOD::TruthParticle*>& parents
+        , std::vector<const xAOD::TruthParticle*>& children
+        ) {
+
+        // TODO
+        // this is probably very inefficient,
+        // but it's simple.
+
+        // for instance: if we remove a child from info on one parent,
+        // we still loop over the child again for the next parent.
+
+        // also, we're passing around vectors rather than their
+        // references.
+
+        // for each of the parents
+        for ( size_t ip = 0
+            ; ip != parents.size()
+            ; ip++ ) {
+
+            const xAOD::TruthParticle* p = parents[ip];
+	    if(!p) continue;
+
+            // the current child index
+            size_t ic = 0;
+
+            // (x) each of the potential children
+            while (ic != children.size()) {
+
+                const xAOD::TruthParticle* c = children[ic];
+		if (!c) continue;
+
+                // if citer is (recursively) a child of piter
+                // remove it.
+                if (isChild(p, c)) {
+                    children.erase(children.begin() + ic);
+                    // do not increment ic: we just removed a child.
+                    continue;
+
+                } else {
+                    // increment ic: we did *not* remove a child.
+                    ic++;
+                    continue;
+                }
+            }
+        }
+
+        return;
+    }
+
+
+  // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // End of code copied from ParticleJetDeltaRLabelTool
+
+  void setJetLabels(xAOD::Jet& jet,
+                    const PartonCounts& counts,
+                    const LabelNames& names) {
+    // set truth label for jets above pt threshold
+    // hierarchy: b > c > tau > light
+    if (counts.b)
+      jet.setAttribute<int>(names.singleint, 5);
+    else if (counts.c)
+      jet.setAttribute<int>(names.singleint, 4);
+    else if (counts.tau)
+      jet.setAttribute<int>(names.singleint, 15);
+    else
+      jet.setAttribute<int>(names.singleint, 0);
+
+    if (counts.b) {
+      if (counts.b >= 2)
+        jet.setAttribute<int>(names.doubleint, 55);
+
+      else if (counts.c)
+        jet.setAttribute<int>(names.doubleint, 54);
+
+      else
+        jet.setAttribute<int>(names.doubleint, 5);
+
+    } else if (counts.c) {
+      if (counts.c >= 2)
+        jet.setAttribute<int>(names.doubleint, 44);
+
+      else
+        jet.setAttribute<int>(names.doubleint, 4);
+
+    } else if (counts.tau)
+      jet.setAttribute<int>(names.doubleint, 15);
+
+    else
+      jet.setAttribute<int>(names.doubleint, 0);
+
+  }
+
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx
index bcbf4b7bae135748e5122da6e5d4cfe3daf5e4ed..c5a837f609fd6db1d72106abe5cd2c56d0290dd2 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/src/components/ParticleJetTools_entries.cxx
@@ -11,6 +11,7 @@
 #include "ParticleJetTools/CopyTruthJetParticles.h"
 #include "ParticleJetTools/ParticleJetDeltaRLabelTool.h"
 #include "ParticleJetTools/JetParticleAssociationAlg.h"
+#include "ParticleJetTools/ParticleJetGhostLabelTool.h"
 #include "ParticleJetTools/JetParticleShrinkingConeAssociation.h"
 #include "ParticleJetTools/JetParticleCenterOfMassAssociation.h"
 #include "ParticleJetTools/JetTruthLabelingTool.h"
@@ -30,6 +31,7 @@ DECLARE_COMPONENT( CopyBosonTopLabelTruthParticles )
 DECLARE_COMPONENT( CopyTruthPartons )
 DECLARE_COMPONENT( CopyTruthJetParticles )
 DECLARE_COMPONENT( ParticleJetDeltaRLabelTool )
+DECLARE_COMPONENT( ParticleJetGhostLabelTool )
 DECLARE_COMPONENT( JetParticleShrinkingConeAssociation )
 DECLARE_COMPONENT( JetParticleCenterOfMassAssociation )
 DECLARE_COMPONENT( JetTruthLabelingTool )
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt
index bf57ddffe52ac93525b2eab7c5f0577613700324..6c63c612d25876c06e60256a0fca71d93960ef06 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/CMakeLists.txt
@@ -35,8 +35,8 @@ atlas_add_component( AnalysisTriggerAlgs
    LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib
    EventInfo xAODTrigL1Calo xAODTrigger GaudiKernel AnalysisTriggerEvent
    TrigConfL1Data TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Interfaces
-   TrigT1Result )
+   TrigT1Result TrigConfInterfaces )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..44761dd60720c99280fa105d604bba4716130129
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsCAConfig.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+def RoIBResultToxAODCfg(flags, seqName=''):
+    if flags.Trigger.enableL1Phase1 and not flags.Trigger.enableL1CaloLegacy:
+        # No Run-2 L1 RoIs -> nothing to covert to xAOD -> don't add RoIBResultToxAOD
+        return ComponentAccumulator()
+
+    acc = ComponentAccumulator(sequenceName=seqName)
+    alg = CompFactory.RoIBResultToxAOD('RoIBResultToxAOD')
+    alg.DoMuon = not flags.Trigger.enableL1Phase1
+    alg.DoCalo = flags.Trigger.enableL1CaloLegacy
+    acc.addEventAlgo(alg, sequenceName=seqName)
+
+    if flags.Input.Format == 'BS':
+        from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
+        typeNames = [
+            'xAOD::JetElementContainer/JetElements', 'xAOD::JetElementAuxContainer/JetElementsAux.',
+            'xAOD::CPMTowerContainer/CPMTowers', 'xAOD::CPMTowerAuxContainer/CPMTowersAux.']
+        acc.merge(ByteStreamReadCfg(flags, typeNames))
+
+    # Create output list to return for use by the caller
+    outputList = []
+    if alg.DoMuon:
+        outputList += [
+            ("xAOD::MuonRoIContainer",  alg.xAODKeyMuon)
+        ]
+    if alg.DoCalo:
+        outputList += [
+            ("xAOD::EmTauRoIContainer", alg.xAODKeyEmTau),
+            ("xAOD::EnergySumRoI",      alg.xAODKeyEsum),
+            ("xAOD::JetEtRoI",          alg.xAODKeyJetEt),
+            ("xAOD::JetRoIContainer",   alg.xAODKeyJet)
+        ]
+
+    return acc, outputList
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py
index 12f29133b071b0d3210014c41bbf0404e5eb6fed..796119d919533cbc0a6fa82877110f3f726f7c99 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/python/AnalysisTriggerAlgsConfig.py
@@ -38,8 +38,6 @@ class DefaultRoIBResultToAOD( genConfRoIBResultToAOD ):
         #
         # Set up the L1Calo tools:
         #
-        from AthenaCommon.AppMgr import ToolSvc
-
         log.info( "will add L1CPMTools instance to the algorithm" )
         self.L1CPMTools = CfgMgr.LVL1__L1CPMTools( 'L1CPMTools' )
         self.L1CPMTools.LVL1ConfigSvc = lvl1ConfigSvc
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx
index 1af24987797e9456e5e944933d8e195f0c6e9b25..a9918802cf0a1228ef393474d26e1a001012cc97 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.cxx
@@ -44,12 +44,6 @@ namespace {
 
 } // private namespace
 
-/// Helper macro for initialising SG keys that are allowed to be missing
-#define INIT_SG_KEY(VAR)                                    \
-   do {                                                     \
-      ATH_CHECK( VAR.initialize( ! VAR.key().empty() ) );   \
-   } while( false )
-
 RoIBResultToxAOD::RoIBResultToxAOD( const std::string& name,
                                     ISvcLocator* svcLoc )
    : AthAlgorithm( name, svcLoc ) {
@@ -60,10 +54,10 @@ StatusCode RoIBResultToxAOD::initialize() {
 
    // Print system info.
    if( m_doCalo == false ) {
-      ATH_MSG_WARNING( "Inputs from LVL1 Calo systems switched off" );
+      ATH_MSG_INFO( "Inputs from LVL1 Calo systems switched off" );
    }
    if( m_doMuon == false ) {
-      ATH_MSG_WARNING( "Inputs from LVL1 Muon systems switched off" );
+      ATH_MSG_INFO( "Inputs from LVL1 Muon systems switched off" );
    }
 
    // Connect to the LVL1ConfigSvc for the trigger configuration.
@@ -91,17 +85,13 @@ StatusCode RoIBResultToxAOD::initialize() {
 
    // Initialise the keys.
    ATH_CHECK( m_roibResultKey.initialize() );
-   INIT_SG_KEY( m_cpmTowerKey );
-   INIT_SG_KEY( m_jetElementKey );
-   if( m_doMuon ) {
-      ATH_CHECK( m_muonRoIKey.initialize() );
-   }
-   if( m_doCalo ) {
-      ATH_CHECK( m_emtauRoIKey.initialize() );
-      ATH_CHECK( m_energysumRoIKey.initialize() );
-      ATH_CHECK( m_jetetRoIKey.initialize() );
-      ATH_CHECK( m_jetRoIKey.initialize() );
-   }
+   ATH_CHECK( m_cpmTowerKey.initialize(SG::AllowEmpty) );
+   ATH_CHECK( m_jetElementKey.initialize(SG::AllowEmpty) );
+   ATH_CHECK( m_muonRoIKey.initialize(m_doMuon) );
+   ATH_CHECK( m_emtauRoIKey.initialize(m_doCalo) );
+   ATH_CHECK( m_energysumRoIKey.initialize(m_doCalo) );
+   ATH_CHECK( m_jetetRoIKey.initialize(m_doCalo) );
+   ATH_CHECK( m_jetRoIKey.initialize(m_doCalo) );
 
    // Return gracefully.
    return StatusCode::SUCCESS;
@@ -114,6 +104,10 @@ StatusCode RoIBResultToxAOD::execute() {
 
    // Access the input object.
    auto roibResult = SG::makeHandle( m_roibResultKey, getContext() );
+   if (!roibResult.isValid()) {
+      ATH_MSG_ERROR("Failed to retrieve " << m_roibResultKey.key());
+      return StatusCode::FAILURE;
+   }
 
    // Create the muon RoIs:
    if( m_doMuon ) {
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/SGDataVectorGetterTool.cxx b/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/SGDataVectorGetterTool.cxx
index 4c139236a1ee6654bcecf73cd3c3e4e5f3966ffd..a46243e5e976e42ed2691a40bedb0cd14361aaa5 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/SGDataVectorGetterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/SGDataVectorGetterTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: SGDataVectorGetterTool.cxx 790090 2016-12-16 05:31:29Z ssnyder $
@@ -79,6 +79,13 @@ StatusCode SGDataVectorGetterTool::initialize()
       meth.Execute();
     m_info = getInfo (typeinfo());
   }
+  if (!m_info) {
+    TClass* cls = gROOT->GetClass (m_typename.c_str());
+    TMethodCall meth (cls, "dvlinfo", "");
+    if (meth.IsValid())
+      meth.Execute();
+    m_info = getInfo (typeinfo());
+  }
 
   if (!m_info) {
     REPORT_MESSAGE (MSG::ERROR)
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py
index 5545fd250946f4eb13620d2168850b3bde37f5d7..d5846675be352b8bc17b4f5a300d12d814708a13 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 
 import MuonD3PDMaker
@@ -50,12 +50,12 @@ MuonD3PDObject.defineBlock (1, 'NumberOfSegments',
 MuonD3PDObject.defineBlock (
     1, 'Isolation',
     D3PDMakerCoreComps.AuxDataFillerTool,
-    Vars = ['etcone20',
-            'etcone30',
-            'etcone40',
-            'ptcone20',
-            'ptcone30',
-            'ptcone40',
+    Vars = ['etcone20 < float: 0',
+            'etcone30 < float: 0',
+            'etcone40 < float: 0',
+            'ptcone20 < float: 0',
+            'ptcone30 < float: 0',
+            'ptcone40 < float: 0',
             'scatteringCurvatureSignificance < float: 0',
             'scatteringNeighbourSignificance < float: 0',
             'momentumBalanceSignificance < float: 0'])
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/CMakeLists.txt
index 2e95b9950ad04f0a83cb998e7c563fb821d516f7..91222d839a215eeee3015a38366e5006b2561535 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/CMakeLists.txt
@@ -1,13 +1,7 @@
-################################################################################
-# Package: DerivationFrameworkART
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkART  )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          TestPolicy )
-
 # Install files from the package:
 atlas_install_scripts( */test/*.sh */test/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt
index da1e9c0cd465f3d040a2e46d715a456af00e40bb..e8b2857f8bb11fecb6cca5421cdc75294f2cc4ca 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt
@@ -1,46 +1,12 @@
-################################################################################
-# Package: DerivationFrameworkCalo
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkCalo )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODJet
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PRIVATE
-                          Calorimeter/CaloClusterCorrection
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloUtils
-                          Event/xAOD/xAODTau
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODBase
-                          Event/FourMomUtils
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
-
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkCaloLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkCalo
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps xAODBase xAODCaloEvent xAODEgamma xAODJet xAODMuon xAODTau CaloClusterCorrectionLib CaloUtilsLib LArCablingLib ExpressionEvaluationLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloGeoHelpers FourMomUtils GaudiKernel )
-
 atlas_add_component( DerivationFrameworkCalo
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps xAODBase xAODCaloEvent xAODEgamma xAODJet xAODMuon xAODTau CaloClusterCorrectionLib CaloEvent CaloGeoHelpers CaloUtilsLib FourMomUtils GaudiKernel LArCablingLib ExpressionEvaluationLib DerivationFrameworkCaloLib )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES LINK_LIBRARIES AthenaBaseComps CaloClusterCorrectionLib CaloEvent CaloGeoHelpers CaloIdentifier CaloUtilsLib DerivationFrameworkInterfaces ExpressionEvaluationLib FourMomUtils GaudiKernel LArCablingLib StoreGateLib xAODBase xAODCaloEvent xAODEgamma xAODJet xAODMuon xAODTau )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt
index 3de12f69c5b3fdafdf0c8e38949511ce24055c3f..cd274a1e3c6524b2412345249a879dd59c8936f4 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt
@@ -1,37 +1,12 @@
-################################################################################
-# Package: DerivationFrameworkCore
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkCore )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          Control/AthLinks
-			  Event/xAOD/xAODBase
-                          Event/xAOD/xAODEgamma
-			  Event/xAOD/xAODMuon
-			  Trigger/TrigAnalysis/TriggerMatchingTool
-                          Control/AthenaKernel
-                          Control/SGTools
-                          Control/StoreGate )
-
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkCoreLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkCore
-                   LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES AthContainers AthLinks SGTools  xAODEgamma xAODBase xAODMuon TriggerMatchingToolLib AthenaKernel SGTools AsgAnalysisInterfaces AthAnalysisBaseCompsLib GoodRunsListsLib PathResolver )
-
 atlas_add_component( DerivationFrameworkCore
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps AthContainers AthLinks xAODBase xAODEgamma xAODMuon TriggerMatchingToolLib AthenaBaseComps GaudiKernel AthenaKernel SGTools StoreGateLib SGtests DerivationFrameworkCoreLib AsgAnalysisInterfaces )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AsgAnalysisInterfaces AthAnalysisBaseCompsLib AthContainers AthLinks AthenaKernel DerivationFrameworkInterfaces GoodRunsListsLib PathResolver SGTools TrigDecisionToolLib TriggerMatchingToolLib xAODBase xAODEgamma xAODEventInfo xAODMuon )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt
index a3ba64909251df27b18573b6d637911f12b20b85..ed2f1499363a833facfa5bb5c950ab3c00e8c685 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt
@@ -1,46 +1,16 @@
-################################################################################
-# Package: DerivationFrameworkEGamma
-################################################################################
- 
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # Declare the package name:
 atlas_subdir( DerivationFrameworkEGamma )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthToolSupport/AsgTools
-                          Control/AthenaBaseComps
-                          PhysicsAnalysis/AnalysisCommon/PATCore
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
-                          PRIVATE
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODMissingET
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation
-                          PhysicsAnalysis/MCTruthClassifier 
-			  PhysicsAnalysis/ElectronPhotonID/EgammaAnalysisHelpers
-			  Calorimeter/CaloCalibHitRec )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
+find_package( ROOT COMPONENTS Core MathCore )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkEGammaLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkEGamma
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AsgTools AthenaBaseComps PATCoreLib EgammaAnalysisInterfacesLib ExpressionEvaluationLib MCTruthClassifierLib CaloCalibHitRecLib EgammaAnalysisHelpersLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODBase xAODCaloEvent xAODEgamma xAODMissingET xAODMuon xAODTruth )
-
 atlas_add_component( DerivationFrameworkEGamma
-                     src/components/*.cxx
+                     src/*.cxx src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES}  AsgTools AthenaBaseComps PATCoreLib  EgammaAnalysisInterfacesLib xAODBase 
-		     xAODCaloEvent xAODEgamma xAODMissingET xAODMuon xAODTruth GaudiKernel ExpressionEvaluationLib MCTruthClassifierLib CaloCalibHitRecLib DerivationFrameworkEGammaLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthContainers AthenaBaseComps CaloCalibHitRecLib DerivationFrameworkInterfaces EgammaAnalysisHelpersLib EgammaAnalysisInterfacesLib ExpressionEvaluationLib GaudiKernel MCTruthClassifierLib PATCoreLib xAODBase xAODCaloEvent xAODEgamma xAODMissingET xAODMuon xAODTracking xAODTruth )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/CMakeLists.txt
index a04d15570bf17eda7307bbfaf53bd7f291199882..74bc68cdde292fe12ba3a64771b73210023dc927 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/CMakeLists.txt
@@ -1,30 +1,12 @@
-################################################################################
-# Package: DerivationFrameworkExamples
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkExamples )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODMuon
-                          GaudiKernel
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PRIVATE
-                          Control/AthenaKernel
-                          Event/xAOD/xAODTracking )
-
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkExamplesLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkExamples
-                   LINK_LIBRARIES AthenaBaseComps xAODMuon GaudiKernel
-                   PRIVATE_LINK_LIBRARIES AthenaKernel xAODTracking )
-
 atlas_add_component( DerivationFrameworkExamples
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps xAODMuon GaudiKernel AthenaKernel xAODTracking DerivationFrameworkExamplesLib )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps DerivationFrameworkInterfaces GaudiKernel StoreGateLib xAODMuon xAODTracking )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/CMakeLists.txt
index 963699679cf9486ed8f2417ed119ba4f50efb21c..00697d1dc926b39503672428f2c0219052b42065 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/CMakeLists.txt
@@ -1,39 +1,17 @@
-################################################################################
-# Package: DerivationFrameworkExotics
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkExotics )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODJet
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Reconstruction/Jet/JetCalibTools
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-			  PhysicsAnalysis/AnalysisCommon/PATInterfaces
-                          Event/xAOD/xAODCore
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkExoticsLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkExotics
-                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthenaBaseComps xAODJet TrigDecisionToolLib
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} xAODCore xAODEventInfo GaudiKernel PATInterfaces )
-
 atlas_add_component( DerivationFrameworkExotics
-                     src/components/*.cxx
+                     src/*.cxx src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps xAODJet TrigDecisionToolLib xAODCore xAODEventInfo GaudiKernel DerivationFrameworkExoticsLib PATInterfaces )
+                     DEFINITIONS ${CLHEP_DEFINITIONS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps DerivationFrameworkInterfaces GaudiKernel JetCalibToolsLib TrigDecisionToolLib xAODCore xAODEventInfo xAODJet )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt
index 72ae124b92368db0d0384de810eef456b5ff090f..99162375f2b8b8d08180ee2ab9c3e0a9733e2ecf 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt
@@ -1,49 +1,28 @@
-################################################################################
-# Package: DerivationFrameworkFlavourTag
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkFlavourTag )
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/xAOD/xAODCore
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODPFlow
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTrigger
-                          Event/xAOD/xAODTruth
-                          Event/xAOD/xAODCaloEvent
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency
-                          PhysicsAnalysis/JetTagging/FlavorTagDiscriminants
-                          Reconstruction/Jet/JetInterface
-                          Reconstruction/Jet/JetCalibTools
-                          Tracking/TrkVertexFitter/TrkVertexFitterInterfaces
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          )
+# External dependencies:
+find_package( ROOT COMPONENTS Core RIO )
 
 # Component(s) in the package:
 atlas_add_component( DerivationFrameworkFlavourTag
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES GaudiKernel AthenaBaseComps xAODCore xAODJet xAODPFlow
-                     xAODTracking xAODTrigger xAODTruth JetInterface TrkExInterfaces FlavorTagDiscriminants
-                     JetCalibToolsLib)
-
+                     LINK_LIBRARIES AthenaBaseComps FlavorTagDiscriminants GaudiKernel xAODJet xAODTracking )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
 # add the test utility
-atlas_add_executable( test_btagging util/test-btagging.cxx )
-atlas_add_executable( test_jet_links util/test-jet-links.cxx )
-target_link_libraries(test_btagging xAODCore xAODJet xAODRootAccess)
-target_link_libraries(test_jet_links xAODCore xAODJet xAODRootAccess)
-
+atlas_add_executable( test_btagging
+                      util/test-btagging.cxx
+                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODRootAccess )
+
+atlas_add_executable( test_jet_links
+                      util/test-jet-links.cxx
+                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODRootAccess )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackGhostTagJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackGhostTagJetsCPContent.py
index c78a63b8935fae73f45dce72ddc2a1c26c17092c..fa8a28188ef6eb66951b397fb11ecee1c5816e05 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackGhostTagJetsCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackGhostTagJetsCPContent.py
@@ -4,5 +4,5 @@ from JetFlavorGhostLabels import getJetFlavorGhostLabels
 
 AntiKtVR30Rmax4Rmin02TrackGhostTagJetsCPContent = [
 "AntiKtVR30Rmax4Rmin02TrackGhostTagJets",
-"AntiKtVR30Rmax4Rmin02TrackGhostTagJetsAux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID." + getJetFlavorGhostLabels(),
+"AntiKtVR30Rmax4Rmin02TrackGhostTagJetsAux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.HadronGhostTruthLabelID.HadronGhostExtendedTruthLabelID." + getJetFlavorGhostLabels(),
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py
index 0dc0a6129aa1294224d25d622e50837481694870..5358ebd53c9dd9b698120d68229fa781769e659c 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py
@@ -4,5 +4,5 @@ from JetFlavorGhostLabels import getJetFlavorGhostLabels
 
 AntiKtVR30Rmax4Rmin02TrackJetsCPContent = [
 "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810",
-"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810Aux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.",
+"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810Aux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.has_ATLASRECTS_5027_bug.relativeDeltaRToVRJet.HadronGhostTruthLabelID.HadronGhostExtendedTruthLabelID.",
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810CPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810CPContent.py
index fb91da66a56b7c400ec1b608246aea1fd45a28a9..3a1d0e6c1ab047ec56b5d0e9094c3b6002fbc6ca 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810CPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810CPContent.py
@@ -2,5 +2,5 @@
 
 AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810CPContent = [
 "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810",
-"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810Aux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.",
+"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810Aux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.has_ATLASRECTS_5027_bug.relativeDeltaRToVRJet.HadronGhostTruthLabelID.HadronGhostExtendedTruthLabelID.",
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagCPContent.py
index 8b8e1aea2e16130906eab00b4f6a5c24b328f936..3d90da501f54e1d5ee675b90833d89995f20ff2e 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagCPContent.py
@@ -2,5 +2,5 @@
 
 AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagCPContent = [
 "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTag",
-"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagAux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.",
+"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810GhostTagAux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.has_ATLASRECTS_5027_bug.relativeDeltaRToVRJet.HadronGhostTruthLabelID.HadronGhostExtendedTruthLabelID.",
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py
index be8d1a03f44b81b394b14a7df3d4a5c080e20c4f..b5c8827888089e59e67dd99a2eabb932cb8f2fff 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py
@@ -4,5 +4,5 @@ from JetFlavorGhostLabels import getJetFlavorGhostLabels
 
 AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent = [
 "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903",
-"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903Aux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.",
+"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903Aux.pt.eta.phi.m.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.has_ATLASRECTS_5027_bug.relativeDeltaRToVRJet.HadronGhostTruthLabelID.HadronGhostExtendedTruthLabelID.",
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FtagRun3DerivationConfig.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FtagRun3DerivationConfig.py
index f8c51c522035244500e4e45497f0586abb2ffaf2..de597894057e45d2c11aaabe87788ce5a72a5338 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FtagRun3DerivationConfig.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FtagRun3DerivationConfig.py
@@ -3,11 +3,12 @@
 from AthenaCommon.CFElements import findAllAlgorithms
 from AthenaCommon.AthenaCommonFlags import jobproperties as jps
 
+from GaudiKernel.Configurable import WARNING
 
 
 
 
-def FtagJetCollection(jetcol, seq):
+def FtagJetCollection(jetcol, seq, OutputLevel=WARNING):
     
 
     jetcol_name_without_Jets = jetcol.replace('Jets','')
@@ -99,6 +100,7 @@ def FtagJetCollection(jetcol, seq):
     options['JetLinkName'] = options['BTaggingCollectionName'] + '.jetLink'
     options['BTagTrackToJetAssociatorName'] = 'BTagTrackToJetAssociator'
     options['name'] = ( 'BTagging_'+jetcol_name_without_Jets+ '_Augment').lower()
+    options['OutputLevel'] = OutputLevel
 
     acc.addEventAlgo(Analysis__BTagHighLevelAugmenterAlg(**options))
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py
index be17685dfa8f13cacdfbaf1c59726b0b2b560584..d00ab7adeea213569360ea9fc468f028d8c6b086 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py
@@ -6,11 +6,14 @@ from __future__ import print_function
 # import Common Algs
 from DerivationFrameworkJetEtMiss.JetCommon import DFJetAlgs
 
+from DerivationFrameworkCore.DerivationFrameworkMaster import (
+    DerivationFrameworkIsMonteCarlo as isMC)
+
 # I wish we didn't need this
 from BTagging.BTaggingConfiguration import getConfiguration
 ConfInst=getConfiguration()
 
-from GaudiKernel.Configurable import WARNING
+from GaudiKernel.Configurable import WARNING, VERBOSE
 
 # Import star stuff (it was like that when I got here)
 from DerivationFrameworkJetEtMiss.JetCommon import *
@@ -48,7 +51,7 @@ def buildExclusiveSubjets(ToolSvc, JetCollectionName, subjet_mode, nsubjet, doGh
     subjetlabel = "Ex%s%i%sSubJets" % (subjet_mode, nsubjet, talabel)
 
     # removing truth labels if runining on data
-    if globalflags.DataSource()=='data': ExGhostLabels = ["GhostTrack"]
+    if not isMC: ExGhostLabels = ["GhostTrack"]
 
     SubjetContainerName = "%sEx%s%i%sSubJets" % (JetCollectionName.replace("Jets", ""), subjet_mode, nsubjet, talabel)
     ExKtbbTagToolName = str( "Ex%s%sbbTagTool%i_%s" % (subjet_mode, talabel, nsubjet, JetCollectionName) )
@@ -169,7 +172,7 @@ def addExKtCoM(sequence, ToolSvc, JetCollectionExCoM, nSubjets, doTrackSubJet, d
             from BTagging.BTaggingConfiguration import comTrackAssoc, comMuonAssoc, defaultTrackAssoc, defaultMuonAssoc
             mods = [defaultTrackAssoc, defaultMuonAssoc, btag_excom]
             if(subjetAlgName=="CoM"): mods = [comTrackAssoc, comMuonAssoc, btag_excom]
-            if globalflags.DataSource()!='data':
+            if isMC:
                 mods.append(jtm.jetdrlabeler)
 
             jetrec_btagging = JetRecTool( name = excomJetRecBTagToolName,
@@ -307,6 +310,13 @@ def buildVRJets(sequence, do_ghost, logger = None, doFlipTagger=False, training=
         TrackAssociatorName="GhostTrack" if do_ghost else "MatchedTracks",
     )
 
+    # add Ghost label id
+    from ParticleJetTools.ParticleJetToolsConf import (
+        ParticleJetGhostLabelTool as GhostLabelTool)
+    gl_tool = GhostLabelTool(
+        name=VRJetRecToolName + "_GhostLabeling")
+    ToolSvc += gl_tool
+
     from BTagging.BTaggingConfiguration import defaultTrackAssoc, defaultMuonAssoc
 
     # Slice the array - this forces a copy so that if we modify it we don't also
@@ -337,8 +347,8 @@ def buildVRJets(sequence, do_ghost, logger = None, doFlipTagger=False, training=
 
             mods = [defaultTrackAssoc, defaultMuonAssoc, btag_vrjets]
 
-            if globalflags.DataSource()!='data':
-                mods.append(jtm.trackjetdrlabeler)
+            if isMC:
+                mods += [jtm.trackjetdrlabeler, gl_tool]
 
             jtm.addJetFinder(
                 VRJetRecToolName,
@@ -384,7 +394,7 @@ def buildVRJets(sequence, do_ghost, logger = None, doFlipTagger=False, training=
 # Build variable-R calorimeter jets
 ##################################################################
 def addVRCaloJets(sequence,outputlist,dotruth=True,writeUngroomed=False):
-    if DerivationFrameworkIsMonteCarlo and dotruth:
+    if isMC and dotruth:
         addTrimmedJets('AntiKt', 1.0, 'Truth', rclus=0.2, ptfrac=0.05, variableRMassScale=600000, variableRMinRadius=0.2, mods="truth_groomed",
                        algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed)
     addTrimmedJets('AntiKt', 1.0, 'PV0Track', rclus=0.2, ptfrac=0.05, variableRMassScale=600000, variableRMinRadius=0.2, mods="groomed",
@@ -554,7 +564,7 @@ def addHbbTagger(
         logger = Logging.logging.getLogger('HbbTaggerLog')
 
     fat_calibrator_name = get_unique_name(["HbbCalibrator", jet_collection])
-    is_data = not DerivationFrameworkIsMonteCarlo
+    is_data = not isMC
     if not hasattr(ToolSvc, fat_calibrator_name):
         fatCalib = CfgMgr.JetCalibrationTool(
             fat_calibrator_name,
@@ -622,8 +632,7 @@ xbbTaggerExtraVariables = [
 #====================================================================
 # Large-R RC jets w/ ExKt 2 & 3 subjets
 #===================================================================
-def addExKtDoubleTaggerRCJets(sequence, ToolSvc):#, ExKtJetCollection__FatJetConfigs, ExKtJetCollection__FatJet, ExKtJetCollection__SubJet):#, jetToolName, algoName):
-   DFisMC = (globalflags.DataSource()=='geant4')
+def addExKtDoubleTaggerRCJets(sequence, ToolSvc):
    jetToolName = "DFReclustertingTool"
    algoName = "DFJetReclusteringAlgo"
 
@@ -639,7 +648,7 @@ def addExKtDoubleTaggerRCJets(sequence, ToolSvc):#, ExKtJetCollection__FatJetCon
      getattr(ToolSvc,jetToolName).DoArea = False
      getattr(ToolSvc,jetToolName).GhostTracksInputContainer = "InDetTrackParticles"
      getattr(ToolSvc,jetToolName).GhostTracksVertexAssociationName  = "JetTrackVtxAssoc"
-     if(DFisMC):
+     if isMC:
        getattr(ToolSvc,jetToolName).GhostTruthBHadronsInputContainer = "BHadronsFinal"
        getattr(ToolSvc,jetToolName).GhostTruthCHadronsInputContainer = "CHadronsFinal"
 
@@ -648,7 +657,7 @@ def addExKtDoubleTaggerRCJets(sequence, ToolSvc):#, ExKtJetCollection__FatJetCon
 
    # build subjets
    GhostLabels = ["GhostTrack"]
-   if(DFisMC):
+   if isMC:
      GhostLabels += ["GhostBHadronsFinal"]
      GhostLabels += ["GhostCHadronsFinal"]
    # N=2 subjets
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt
index 1da37e881cb49effc6fd6f16c6739e04653c86dc..150d015311fe703bad405729fc0796aaf9fd462e 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt
@@ -1,39 +1,17 @@
-################################################################################
-# Package: DerivationFrameworkHiggs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkHiggs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODMuon
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODTracking
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkHiggsLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkHiggs
-                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthenaBaseComps xAODEgamma xAODJet xAODMuon TrigDecisionToolLib
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} xAODEventInfo xAODTracking GaudiKernel )
-
 atlas_add_component( DerivationFrameworkHiggs
-                     src/components/*.cxx
+                     src/*.cxx src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps xAODEgamma xAODJet xAODMuon TrigDecisionToolLib xAODEventInfo xAODTracking GaudiKernel DerivationFrameworkHiggsLib )
+                     DEFINITIONS ${CLHEP_DEFINITIONS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps DerivationFrameworkInterfaces TrigDecisionToolLib xAODEgamma xAODEventInfo xAODJet xAODMuon xAODTracking )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt
index 4818b8e0a7c3400ec22f0bf43879d17e708a40a5..4f2b36a26847a20df976817f2c7ad3aadd4c2e47 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt
@@ -1,76 +1,16 @@
-################################################################################
-# Package: DerivationFrameworkInDet
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkInDet )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthLinks
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/IRegionSelector
-                          DetectorDescription/Identifier
-                          DetectorDescription/RoiDescriptor
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODTracking
-                          InnerDetector/InDetConditions/SCT_ConditionsTools
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-                          InnerDetector/InDetDetDescr/SCT_Cabling
-                          InnerDetector/InDetRecEvent/InDetPrepRawData
-			  InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-                          InnerDetector/InDetRecTools/TRT_ElectronPidTools
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkEvent/VxVertex
-                          PRIVATE
-                          Commission/CommissionEvent
-                          DetectorDescription/AtlasDetDescr
-                          Event/FourMomUtils
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODTau
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          InnerDetector/InDetConditions/TRT_ConditionsServices
-			  InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-			  InnerDetector/InDetRecTools/InDetAssociationTools
-                          InnerDetector/InDetValidation/InDetPhysValMonitoring
-                          LArCalorimeter/LArRecEvent
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation
-                          Tracking/TrkEvent/TrkCompetingRIOsOnTrack
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkEventUtils
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkPrepRawData
-                          Tracking/TrkEvent/TrkRIO_OnTrack
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          Tracking/TrkTools/TrkToolInterfaces
-                          Tracking/TrkVertexFitter/TrkVertexFitterInterfaces )
-
 # External dependencies:
-find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkInDetLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkInDet
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                   DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthLinks AthenaBaseComps AthenaKernel IRegionSelector Identifier RoiDescriptor xAODBase xAODEgamma xAODEventInfo xAODTracking InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry InDetPrepRawData TrkTrack VxVertex StoreGateLib SGtests SCT_CablingLib TRT_ConditionsServicesLib ExpressionEvaluationLib
-                   PRIVATE_LINK_LIBRARIES CommissionEvent AtlasDetDescr FourMomUtils xAODJet xAODMuon xAODTau xAODTruth GaudiKernel LArRecEvent TrkCompetingRIOsOnTrack TrkEventPrimitives TrkEventUtils TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces InDetRIO_OnTrack )
-
 atlas_add_component( DerivationFrameworkInDet
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthLinks AthenaBaseComps AthenaKernel StoreGateLib SGtests IRegionSelector Identifier RoiDescriptor xAODBase xAODEgamma xAODEventInfo xAODTracking InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry SCT_CablingLib InDetPrepRawData TrkTrack VxVertex CommissionEvent AtlasDetDescr FourMomUtils xAODJet xAODMuon xAODTau xAODTruth GaudiKernel TRT_ConditionsServicesLib LArRecEvent ExpressionEvaluationLib TrkCompetingRIOsOnTrack TrkEventPrimitives TrkEventUtils TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces DerivationFrameworkInDetLib InDetRIO_OnTrack )
+                     src/*.cxx src/components/*.cxx
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthenaBaseComps AthenaKernel AtlasDetDescr CommissionEvent DerivationFrameworkInterfaces ExpressionEvaluationLib FourMomUtils GaudiKernel InDetIdentifier InDetPrepRawData InDetRIO_OnTrack InDetReadoutGeometry InDetTrackSelectionToolLib LArRecEvent SCT_CablingLib SCT_ConditionsToolsLib StoreGateLib TRT_ConditionsServicesLib TRT_ElectronPidToolsLib TRT_ReadoutGeometry TrigDecisionToolLib TrkCompetingRIOsOnTrack TrkEventPrimitives TrkEventUtils TrkExInterfaces TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkToolInterfaces TrkTrack TrkVertexFitterInterfaces xAODBase xAODCore xAODEgamma xAODEventInfo xAODJet xAODMuon xAODTau xAODTracking )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx
index cbf597d5bd95a2a1337495fa424cce1b0f92229a..d30f31ef54a0cd091fc1b531526bf0ee448495f2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx
@@ -340,10 +340,10 @@ namespace DerivationFramework {
 
       if ( m_storeTRT && m_TRTdEdxTool.isEnabled() ) {
 	// for dEdx studies
-        trackTRTFloatDecorators[kTRTdEdxDecor] (*track)                 = m_TRTdEdxTool->dEdx( trkTrack, true, true, true);
-        trackTRTFloatDecorators[kTRTusedHitsDecor] (*track)             = m_TRTdEdxTool->usedHits( trkTrack, true, true);
-        trackTRTFloatDecorators[kTRTdEdx_noHT_divByLDecor] (*track)     = m_TRTdEdxTool->dEdx( trkTrack, true, false, true);
-        trackTRTFloatDecorators[kTRTusedHits_noHT_divByLDecor] (*track) = m_TRTdEdxTool->usedHits( trkTrack, true, false);
+        trackTRTFloatDecorators[kTRTdEdxDecor] (*track)                 = m_TRTdEdxTool->dEdx(trkTrack);
+        trackTRTFloatDecorators[kTRTusedHitsDecor] (*track)             = m_TRTdEdxTool->usedHits(trkTrack);
+        trackTRTFloatDecorators[kTRTdEdx_noHT_divByLDecor] (*track)     = m_TRTdEdxTool->dEdx(trkTrack, false);
+        trackTRTFloatDecorators[kTRTusedHits_noHT_divByLDecor] (*track) = m_TRTdEdxTool->usedHits(trkTrack, false);
       }
 
       // Track extrapolation
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces/CMakeLists.txt
index fb63bb353bdc060e587eb250ffd04b20ba28706d..88bbcd8dcf918c37d214e8a91e451a63c9bcbb83 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: DerivationFrameworkInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkInterfaces )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   Control/StoreGate
-   PhysicsAnalysis/CommonTools/ExpressionEvaluation )
-
 # Component(s) in the package:
 atlas_add_library( DerivationFrameworkInterfaces
    DerivationFrameworkInterfaces/*.h
@@ -19,7 +10,6 @@ atlas_add_library( DerivationFrameworkInterfaces
    PUBLIC_HEADERS DerivationFrameworkInterfaces
    LINK_LIBRARIES GaudiKernel )
 
-
 atlas_add_dictionary( DerivationFrameworkInterfacesDict
    DerivationFrameworkInterfaces/DerivationFrameworkInterfacesDict.h
    DerivationFrameworkInterfaces/selection.xml
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt
index 39850db7e11a7869b5d0887c987333b39a31dc12..a1044f0500ec8de4f91bf7bdcfd4b900d0b16330 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt
@@ -1,51 +1,16 @@
-################################################################################
-# Package: DerivationFrameworkJetEtMiss
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkJetEtMiss )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/xAOD/xAODCore
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODPFlow
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTrigger
-                          Event/xAOD/xAODTruth
-                          Event/xAOD/xAODCaloEvent
-			  InnerDetector/InDetRecTools/InDetTrackSelectionTool
-			  InnerDetector/InDetRecTools/TrackVertexAssociationTool
-			  PhysicsAnalysis/AnalysisCommon/ParticleJetTools
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-			  PhysicsAnalysis/Interfaces/JetAnalysisInterfaces
-			  PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces
-                          Reconstruction/Jet/JetInterface
-			  Reconstruction/Jet/JetMomentTools
-			  Reconstruction/Jet/JetJvtEfficiency
-			  Reconstruction/PFlow/PFlowUtils
-                          Tools/PathResolver 
-			  Trigger/TrigAnalysis/TrigAnalysisInterfaces )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkJetEtMissLib
-                   src/*.cxx
-                   NO_PUBLIC_HEADERS
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel
-                   PRIVATE_LINK_LIBRARIES AthenaBaseComps xAODCore xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth JetInterface PathResolver PFlowUtilsLib ParticleJetToolsLib FTagAnalysisInterfacesLib JetAnalysisInterfacesLib JetMomentToolsLib InDetTrackSelectionToolLib TrackVertexAssociationToolLib JetJvtEfficiencyLib)
-
 atlas_add_component( DerivationFrameworkJetEtMiss
-                     src/components/*.cxx
+                     src/*.cxx src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps xAODCore xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth JetInterface PathResolver PFlowUtilsLib DerivationFrameworkJetEtMissLib JetJvtEfficiencyLib)
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthLinks AthenaBaseComps DerivationFrameworkInterfaces FTagAnalysisInterfacesLib GaudiKernel InDetTrackSelectionToolLib JetAnalysisInterfacesLib JetInterface PFlowUtilsLib ParticleJetToolsLib PathResolver StoreGateLib TrackVertexAssociationToolLib TrigAnalysisInterfaces xAODCaloEvent xAODCore xAODEventInfo xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py
index c6ec6b1a99dce19e309cb2bf1ecefcd09795c212..90fd39d0e95472342afa49bcb93903d01c9bfab2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py
@@ -288,7 +288,7 @@ def applyJetCalibration(jetalg,algname,sequence,largeRjetconfig = 'comb', suffix
 
         if (not isMC) and jetalg_basename in ['AntiKt4EMTopo','AntiKt4LCTopo','AntiKt4EMPFlow']:
             isdata=True
-            if not jetalg_basename=='AntiKt4LCTopo': calibseq = calibseq[:-6]+'_Insitu'
+            if not jetalg_basename=='AntiKt4LCTopo': calibseq = calibseq+'_Insitu'
 
         calibtool = CfgMgr.JetCalibrationTool(
             calibtoolname,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py
index 1fffbcfe03d18fc54349e02dab6806e6cd5c1d92..08edf7e56256a71b21cf42d66d6f65b9e6b30597 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py
@@ -264,7 +264,9 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder,
 
     # 2nd step run the trimming alg. We can re-use the original largeR jet since we reassociated the PseudoJet already.
     fatjet_groom = jetToolBuilder(groomedName, ungroomedName)
-    fatjet_rectool = [t for t in finderalg.Tools if t.name() == ungroomedName][0]
+    print (finderalg.Tools)
+    print (ungroomedName)
+    fatjet_rectool = [t for t in finderalg.Tools if t.name().endswith(ungroomedName)][0]
     fatjet_groom.InputPseudoJets = fatjet_rectool.InputPseudoJets # recopy the InputPseudoJets so tools know how to map fastjet constituents with xAOD constituents
     
     
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkL1Calo/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkL1Calo/CMakeLists.txt
index a1e0aeebc760ecfee386df5a1b09d368c2a86cb5..981d768764365813890e6e3846db5edda8d5b1d1 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkL1Calo/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkL1Calo/CMakeLists.txt
@@ -1,33 +1,12 @@
-################################################################################
-# Package: DerivationFrameworkL1Calo
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkL1Calo )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PRIVATE
-                          Event/xAOD/xAODTrigL1Calo
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
-
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkL1CaloLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkL1Calo
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaBaseComps
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODTrigL1Calo GaudiKernel )
-
 atlas_add_component( DerivationFrameworkL1Calo
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODTrigL1Calo GaudiKernel DerivationFrameworkL1CaloLib )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps DerivationFrameworkInterfaces xAODTrigL1Calo )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt
index d96bd1e3eb1285176311497381d03a84ac1db5b2..2fcbeef3bb4e7a2fc7b107110755b5f3f54e577d 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt
@@ -1,44 +1,18 @@
-################################################################################
-# Package: DerivationFrameworkMCTruth
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkMCTruth )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PRIVATE
-                          Control/AthenaKernel
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODJet
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation
-                          PhysicsAnalysis/MCTruthClassifier )
-
 # External dependencies:
 find_package( FastJet )
 find_package( HepPDT )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core Hist )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkMCTruthLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkMCTruth
-                   INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} 
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${FASTJET_LIBRARIES} AtlasHepMCLib AthenaBaseComps xAODEventInfo xAODTruth GaudiKernel SGtests ExpressionEvaluationLib MCTruthClassifierLib TauAnalysisToolsLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel xAODBase xAODJet GeneratorObjects )
-
 atlas_add_component( DerivationFrameworkMCTruth
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPPDT_LIBRARIES} ${FASTJET_LIBRARIES} AtlasHepMCLib AthenaBaseComps xAODEventInfo xAODTruth GaudiKernel AthenaKernel SGtests EventInfo xAODBase xAODJet GeneratorObjects ExpressionEvaluationLib MCTruthClassifierLib TauAnalysisToolsLib DerivationFrameworkMCTruthLib )
+                     src/*.cxx src/components/*.cxx
+                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${FASTJET_LIBRARIES} ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AtlasHepMCLib DerivationFrameworkInterfaces ExpressionEvaluationLib GaudiKernel GeneratorObjects MCTruthClassifierLib StoreGateLib TauAnalysisToolsLib TruthUtils xAODBase xAODEgamma xAODEventInfo xAODJet xAODMuon xAODTruth )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt
index 1a8dcf98482c1eb71a7578a5d84341aa4b135f53..32a0c0cea2c398e2812f4858966327bc7012acb2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt
@@ -1,53 +1,17 @@
-################################################################################
-# Package: DerivationFrameworkMuons
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkMuons )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloGeoHelpers
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODMuon
-                          GaudiKernel
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Reconstruction/RecoTools/RecoToolInterfaces
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigAnalysis/TrigMuonMatching
-                          Reconstruction/MuonIdentification/ICaloTrkMuIdTools
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          InnerDetector/InDetRecTools/InDetTrackSelectionTool
-                          PRIVATE
-                          Control/AthenaKernel
-			  Control/AthenaBaseComps
-                          PhysicsAnalysis/MCTruthClassifier 
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTruth )
-
 # External dependencies:
 find_package( CLHEP )
+find_package( ROOT COMPONENTS Core MathCore )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkMuonsLib
-   DerivationFrameworkMuons/*.h src/*.cxx
-   PUBLIC_HEADERS DerivationFrameworkMuons
-   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-   LINK_LIBRARIES CaloEvent CaloGeoHelpers AthenaBaseComps xAODCaloEvent
-   xAODMuon GaudiKernel RecoToolInterfaces ExpressionEvaluationLib
-   TrigDecisionToolLib TrigMuonMatchingLib ICaloTrkMuIdTools
-   TrkExInterfaces InDetTrackSelectionToolLib
-   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel xAODEventInfo
-   xAODTracking xAODTruth MCTruthClassifierLib FourMomUtils)
-
 atlas_add_component( DerivationFrameworkMuons
-   src/components/*.cxx
-   LINK_LIBRARIES GaudiKernel DerivationFrameworkMuonsLib )
+   DerivationFrameworkMuons/*.h src/*.cxx src/components/*.cxx
+   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AsgTools AthContainers AthenaBaseComps AthenaKernel CaloEvent CaloGeoHelpers DerivationFrameworkInterfaces ExpressionEvaluationLib FourMomUtils GaudiKernel ICaloTrkMuIdTools InDetTrackSelectionToolLib MCTruthClassifierLib RecoToolInterfaces TrigDecisionToolLib TrigMuonMatchingLib TrkExInterfaces TrkParameters TrkSurfaces muonEvent xAODBase xAODCaloEvent xAODEventInfo xAODJet xAODMuon xAODPrimitives xAODTracking xAODTruth )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt
index 59fdd1dc0ac2865812f41af81cc1fa79238ab9a2..759f5c066d8594bd1172f21af9ab36764498638b 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: DerivationFrameworkPhys
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkPhys )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py
index d605a59b3d5de3faf26a045fc4ba943fb295b6a3..2b68f07cc31679c15d15a96211f4f0505145d216 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py
@@ -77,33 +77,34 @@ if (DerivationFrameworkIsMonteCarlo):
 #====================================================================
 # TRIGGER CONTENT   
 #====================================================================
-# See https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerAPI
-# Get single and multi mu, e, photon triggers
-# Jet, tau, multi-object triggers not available in the matching code
-allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
-trig_el  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el,  livefraction=0.8)
-trig_mu  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu,  livefraction=0.8)
-trig_g   = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.g,   livefraction=0.8)
-trig_tau = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.tau, livefraction=0.8)
-# Add cross-triggers for some sets
-trig_em = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.mu,  livefraction=0.8)
-trig_et = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.tau, livefraction=0.8)
-trig_mt = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu, additionalTriggerType=TriggerType.tau, livefraction=0.8)
-# Note that this seems to pick up both isolated and non-isolated triggers already, so no need for extra grabs
-trig_txe = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.tau, additionalTriggerType=TriggerType.xe, livefraction=0.8)
-
-# Merge and remove duplicates
-trigger_names_full_notau = list(set(trig_el+trig_mu+trig_g+trig_em+trig_et+trig_mt))
-trigger_names_full_tau = list(set(trig_tau+trig_txe))
-
-# Now reduce the list...
-from RecExConfig.InputFilePeeker import inputFileSummary
-trigger_names_notau = []
-trigger_names_tau = []
-for trig_item in inputFileSummary['metadata']['/TRIGGER/HLT/Menu']:
-    if not 'ChainName' in trig_item: continue
-    if trig_item['ChainName'] in trigger_names_full_notau: trigger_names_notau += [ trig_item['ChainName'] ]
-    if trig_item['ChainName'] in trigger_names_full_tau:   trigger_names_tau   += [ trig_item['ChainName'] ]
+## Lines commented out temporarily 29th July 2020 to allow validation to proceed. Will need a new MR to fix.
+## See https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerAPI
+## Get single and multi mu, e, photon triggers
+## Jet, tau, multi-object triggers not available in the matching code
+#allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
+#trig_el  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el,  livefraction=0.8)
+#trig_mu  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu,  livefraction=0.8)
+#trig_g   = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.g,   livefraction=0.8)
+#trig_tau = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.tau, livefraction=0.8)
+## Add cross-triggers for some sets
+#trig_em = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.mu,  livefraction=0.8)
+#trig_et = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.tau, livefraction=0.8)
+#trig_mt = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu, additionalTriggerType=TriggerType.tau, livefraction=0.8)
+## Note that this seems to pick up both isolated and non-isolated triggers already, so no need for extra grabs
+#trig_txe = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.tau, additionalTriggerType=TriggerType.xe, livefraction=0.8)
+#
+## Merge and remove duplicates
+#trigger_names_full_notau = list(set(trig_el+trig_mu+trig_g+trig_em+trig_et+trig_mt))
+#trigger_names_full_tau = list(set(trig_tau+trig_txe))
+#
+## Now reduce the list...
+#from RecExConfig.InputFilePeeker import inputFileSummary
+#trigger_names_notau = []
+#trigger_names_tau = []
+#for trig_item in inputFileSummary['metadata']['/TRIGGER/HLT/Menu']:
+#    if not 'ChainName' in trig_item: continue
+#    if trig_item['ChainName'] in trigger_names_full_notau: trigger_names_notau += [ trig_item['ChainName'] ]
+#    if trig_item['ChainName'] in trigger_names_full_tau:   trigger_names_tau   += [ trig_item['ChainName'] ]
 
 
 #====================================================================
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt
index 04a7eeafe233e8ca9a94ea05ea0273eaff2cd6cd..7d6ef45df2edd8c1b78764105f4866b24bf68488 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: DerivationFrameworkSM
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkSM )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/CMakeLists.txt
index 2c19af072bbd0e6987107625b2ff577a44a669ae..8f920cef442d9a9acc1dbd6a3c614016df107637 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSUSY/CMakeLists.txt
@@ -1,42 +1,17 @@
-################################################################################
-# Package: DerivationFrameworkSUSY
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkSUSY )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODTruth
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Reconstruction/RecoTools/RecoToolInterfaces
-                          PRIVATE
-                          Control/AthenaKernel
-                          Event/xAOD/xAODAssociations
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODTracking
-                          GaudiKernel
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation
-                          PhysicsAnalysis/MCTruthClassifier )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkSUSYLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkSUSY
-                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthenaBaseComps xAODTruth RecoToolInterfaces ExpressionEvaluationLib MCTruthClassifierLib
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel xAODAssociations xAODEventInfo xAODJet xAODTracking GaudiKernel )
-
 atlas_add_component( DerivationFrameworkSUSY
-                     src/components/*.cxx
+                     src/*.cxx src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps xAODTruth RecoToolInterfaces AthenaKernel xAODAssociations xAODEventInfo xAODJet xAODTracking GaudiKernel ExpressionEvaluationLib MCTruthClassifierLib DerivationFrameworkSUSYLib )
+                     DEFINITIONS ${CLHEP_DEFINITIONS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel DerivationFrameworkInterfaces ExpressionEvaluationLib GaudiKernel MCTruthClassifierLib RecoToolInterfaces xAODAssociations xAODEventInfo xAODJet xAODTracking xAODTruth )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/CMakeLists.txt
index 973b600752a68ea1f7a49c65c24ed46de5417d85..d0b5dd2c704761793d066c829d6c76d763964618 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/CMakeLists.txt
@@ -1,20 +1,12 @@
-################################################################################
-# Package: DerivationFrameworkTau
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkTau )
 
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkTauLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkTau
-                   LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel JpsiUpsilonToolsLib TauAnalysisToolsLib DerivationFrameworkInterfaces
-                   PRIVATE_LINK_LIBRARIES xAODTau)
-
 atlas_add_component( DerivationFrameworkTau
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel xAODTau JpsiUpsilonToolsLib DerivationFrameworkTauLib )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel JpsiUpsilonToolsLib TauAnalysisToolsLib DerivationFrameworkInterfaces xAODTau )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTools/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTools/CMakeLists.txt
index df403be80d351bd5563d3c5dbdec3d8157549252..a960ed7126b08e849e958d29918b5f8e7309c9e3 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTools/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTools/CMakeLists.txt
@@ -1,36 +1,9 @@
-################################################################################
-# Package: DerivationFrameworkTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODBase
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisCommon/PATCore
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Event/xAOD/xAODEventInfo
-                          PRIVATE
-                          Control/AthenaKernel
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkToolsLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkTools
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaBaseComps xAODBase GaudiKernel PATCoreLib TrigDecisionToolLib ExpressionEvaluationLib xAODEventInfo
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel )
-
 atlas_add_component( DerivationFrameworkTools
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODBase GaudiKernel PATCoreLib TrigDecisionToolLib AthenaKernel ExpressionEvaluationLib DerivationFrameworkToolsLib )
-
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps DerivationFrameworkInterfaces ExpressionEvaluationLib GaudiKernel PATCoreLib StoreGateLib TrigDecisionToolLib xAODBase xAODEventInfo )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt
index f394033a5ef8fac1a09e92f68bae9e28b352244f..85da10191b61be3601524c0a49b650b4424f18d2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt
@@ -1,34 +1,12 @@
-################################################################################
-# Package: DerivationFrameworkTop
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkTop )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          PRIVATE
-                          Control/AthenaKernel
-                          PhysicsAnalysis/CommonTools/ExpressionEvaluation
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODBTagging
-                          Event/xAOD/xAODTracking )
-
 # Component(s) in the package:
-atlas_add_library( DerivationFrameworkTopLib
-                   src/*.cxx
-                   PUBLIC_HEADERS DerivationFrameworkTop
-                   LINK_LIBRARIES AthenaBaseComps xAODTruth GaudiKernel
-                   PRIVATE_LINK_LIBRARIES AthenaKernel ExpressionEvaluationLib xAODJet xAODEventInfo xAODBTagging xAODTracking )
-
 atlas_add_component( DerivationFrameworkTop
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps xAODTruth GaudiKernel AthenaKernel ExpressionEvaluationLib xAODJet xAODEventInfo xAODBTagging xAODTracking DerivationFrameworkTopLib )
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps DerivationFrameworkInterfaces ExpressionEvaluationLib GaudiKernel StoreGateLib xAODBTagging xAODEventInfo xAODJet xAODTracking xAODTruth )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt
index 4c50480a29eddc87d95f669d36c9b90ec32527cb..4a77743a6d96ae06fb4646a0dfbae4fccef423e5 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt
@@ -1,47 +1,14 @@
-################################################################################
-# Package: DerivationFrameworkTrigger
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DerivationFrameworkTrigger )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
-                          Trigger/TrigCost/EnhancedBiasWeighter
-                          Trigger/TrigAnalysis/TrigAnalysisInterfaces
-                          Trigger/TrigAnalysis/TriggerMatchingTool
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigEvent/TrigNavStructure
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODCore
-                          Event/xAOD/xAODTrigger
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODCaloEvent
-                          Event/FourMomUtils
-                          PRIVATE
-                          Event/xAOD/xAODEventInfo
-                          Tools/PathResolver )
-
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
-atlas_add_library( 
-    DerivationFrameworkTriggerLib
-    src/*.cxx
-    NO_PUBLIC_HEADERS
-    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-    LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps xAODBase TrigDecisionToolLib TrigNavStructure xAODCore xAODTrigger xAODCaloEvent FourMomUtils xAODEgamma
-)
-
-atlas_add_component(
-    DerivationFrameworkTrigger
-    src/components/*.cxx
-    LINK_LIBRARIES DerivationFrameworkTriggerLib
-)
+# Component(s) in the package:
+atlas_add_component( DerivationFrameworkTrigger
+                     src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps DerivationFrameworkInterfaces FourMomUtils GaudiKernel TrigDecisionToolLib TriggerMatchingToolLib xAODBase xAODCaloEvent xAODCore xAODTrigger )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py
index 78b67edb0c8da82ffd414c9c0810139e79978e26..bafb0fe5feb5bd7f2434ef1ec8379e149db32298 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py
@@ -14,8 +14,8 @@
 # For use for trigger studies for AOD
 ####################################################################
 
-# Needed import(s):
-import AthenaCommon.CfgMgr as CfgMgr
+from AthenaCommon.Logging import logging
+log = logging.getLogger(__name__)
 
 ## Class helping to set up (navigation) thinning in derivation jobs
 #
@@ -36,7 +36,6 @@ class ThinningHelper:
     # @param helperName The instance name of this helper object
     #
     def __init__( self, helperName, edmList, mode ):
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         self.helperName = helperName
         self.TriggerChains = ""
         self.edmList = edmList
@@ -58,10 +57,6 @@ class ThinningHelper:
     def AppendToStream( self, augmentedStream ):
         # Access the stream object:
         stream = augmentedStream.GetEventStream()
-        # Get the name of the "format":
-        formatName = stream.name().strip( "StreamDAOD_" )
-        # The necessary import(s):
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         
         from TrigNavTools.TrigNavToolsConfig import navigationThinningSvc
         tSvc = navigationThinningSvc( { 'name' : self.helperName,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TriggerMatchingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TriggerMatchingHelper.py
index 8df9c400da694b09331723947ff13a5eea339cf7..8ffbf79fdd5cbbac90f336ccd4c1b8a5292bf09c 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TriggerMatchingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TriggerMatchingHelper.py
@@ -1,15 +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
+
+from DerivationFrameworkTrigger.DerivationFrameworkTriggerConf import DerivationFramework__TriggerMatchingTool
+from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob # noqa: F401
 
-from DerivationFrameworkTrigger.DerivationFrameworkTriggerConf import (
-        DerivationFramework__TriggerMatchingTool)
-from DerivationFrameworkCore.DerivationFrameworkCoreConf import (
-        DerivationFramework__CommonAugmentation)
-from DerivationFrameworkCore.DerivationFrameworkMaster import (
-        DerivationFrameworkJob)
 import AthenaCommon.AppMgr as AppMgr
 from AthenaCommon.Configurable import Configurable
 import copy
-import logging
+from AthenaCommon.Logging import logging
 log = logging.getLogger(__name__)
 
 class TriggerMatchingHelper(object):
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt
index 214581144d989e86d781f60869afe46615d339a8..6cb851b4288c7b597cc65b6de33a716307d2672f 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/CMakeLists.txt
@@ -1,39 +1,8 @@
-################################################################################
-# Package: ElectronEfficiencyCorrection
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ElectronEfficiencyCorrection )
 
-# Extra dependencies when not in AnalysisBase:
-set( extra_deps )
-if( NOT XAOD_STANDALONE )
-   set( extra_deps Control/AthenaBaseComps GaudiKernel )
-else()
-   set( extra_deps Control/xAODRootAccess )
-endif()
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainers
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODEgamma
-   PhysicsAnalysis/AnalysisCommon/PATCore
-   PhysicsAnalysis/AnalysisCommon/PATInterfaces
-   PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
-   PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces	
-   PRIVATE
-   Control/AthAnalysisBaseComps
-   Tools/PathResolver
-   Control/CxxUtils
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODCore
-   Event/xAOD/xAODEventInfo
-   Event/xAOD/xAODTracking
-   Event/xAOD/xAODMetaData	
-   ${extra_deps} )
-
 # External dependencies:
 find_package( Boost )
 find_package( ROOT COMPONENTS Core Hist MathCore)
@@ -45,7 +14,7 @@ atlas_add_library( ElectronEfficiencyCorrectionLib
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
    LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AsgTools
    xAODEgamma PATInterfaces PATCoreLib AsgAnalysisInterfaces EgammaAnalysisInterfacesLib
-   PRIVATE_LINK_LIBRARIES xAODCaloEvent xAODCore xAODEventInfo xAODTracking
+   PRIVATE_LINK_LIBRARIES AthAnalysisBaseCompsLib xAODCaloEvent xAODCore xAODEventInfo xAODTracking
    xAODMetaData PathResolver )
 
 if( NOT XAOD_STANDALONE )
diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/CMakeLists.txt
index e49760cf866b8b8f509d68129d9a8787b28082e6..9c3f87eda5999c95b318fa354115461c6be637a3 100644
--- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/CMakeLists.txt
@@ -6,30 +6,11 @@
 atlas_subdir( IsolationCorrections )
 
 # Extra dependencies, based on the environment:
-set( extra_deps )
 set( extra_libs )
 if( NOT XAOD_STANDALONE )
-   set( extra_deps GaudiKernel 
-   Control/AthenaBaseComps	       
-   Control/AthAnalysisBaseComps)
    set( extra_libs AthAnalysisBaseCompsLib )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODEventInfo
-   Event/xAOD/xAODPrimitives
-   Event/xAOD/xAODTracking
-   Event/xAOD/xAODMetaData
-   PhysicsAnalysis/AnalysisCommon/PATInterfaces
-   PhysicsAnalysis/AnalysisCommon/PATCore	
-   PRIVATE
-   Tools/PathResolver
-   ${extra_deps} )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Hist RIO )
 find_package( Boost )
diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h
index f23159fcd01e9e98bd74233a0abb39a6d429a99d..97db502c9e028ac908b9b402794e4c115d9d2a6f 100644
--- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.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 ISOLATIONCORRECTION_ISOLATIONCORRECTIONTOOL_H
@@ -30,10 +30,6 @@ class IsolationCorrectionTool  : virtual public IIsolationCorrectionTool,
 #endif
           ;
 
-        virtual StatusCode beginInputFile() override;
-	virtual StatusCode beginEvent() override;
-	virtual StatusCode endInputFile() override;
-
         // Apply correction to a modifyable Egamma object
         virtual CP::CorrectionCode applyCorrection(xAOD::Egamma&) override;
 
@@ -67,7 +63,6 @@ class IsolationCorrectionTool  : virtual public IIsolationCorrectionTool,
         std::string m_corr_ddsmearing_file;
         IsolationCorrection* m_isol_corr;
         std::string m_tool_ver_str;
-        bool m_usemetadata;
 	bool m_is_mc;
         bool m_AFII_corr;
 	std::string m_ddVersion;
@@ -75,7 +70,6 @@ class IsolationCorrectionTool  : virtual public IIsolationCorrectionTool,
         bool m_apply_ddDefault;
         bool m_correct_etcone;
         bool m_trouble_categories;
-        bool m_metadata_retrieved;
 
 	// For systematcis
 	CP::SystematicVariation m_systDDonoff;
diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx
index 529767df8d6caad50b9830ae8b7fcd3df13b796f..3a45f2f785177eda04a2a7aeb011ca2e13906f49 100644
--- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.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 "IsolationCorrections/IsolationCorrectionTool.h"
@@ -20,14 +20,13 @@
 namespace CP {
 
   IsolationCorrectionTool::IsolationCorrectionTool( const std::string &name )
-    : asg::AsgMetadataTool(name),  m_apply_dd(false), m_metadata_retrieved(false), m_systDDonoff("PH_Iso_DDonoff") {
+    : asg::AsgMetadataTool(name),  m_apply_dd(false), m_systDDonoff("PH_Iso_DDonoff") {
     declareProperty("CorrFile",                    m_corr_file                    = "IsolationCorrections/v1/isolation_ptcorrections_rel20_2.root");
     declareProperty("CorrFile_ddshift_2015",       m_corr_ddshift_2015_file       = "IsolationCorrections/v1/isolation_ddcorrection_shift_2015_v3.root");
     declareProperty("CorrFile_ddshift",            m_corr_ddshift_file            = "IsolationCorrections/v1/isolation_ddcorrection_shift.root");
     declareProperty("CorrFile_ddsmearing",         m_corr_ddsmearing_file         = "IsolationCorrections/v1/isolation_ddcorrection_smearing.root");
     declareProperty("ToolVer",                     m_tool_ver_str                 = "REL20_2");
     declareProperty("DataDrivenVer",               m_ddVersion                    = "2015");
-    declareProperty("UseMetadata",                 m_usemetadata                  = false);
     declareProperty("AFII_corr",                   m_AFII_corr                    = false);
     declareProperty("IsMC",                        m_is_mc                        = true);
     declareProperty("Correct_etcone",              m_correct_etcone               = false);
@@ -65,8 +64,6 @@ namespace CP {
 
     CP::IsolationCorrection::Version tool_ver;
     
-    m_metadata_retrieved = false;
-    	   
     if      (m_tool_ver_str == "REL20_2") tool_ver = CP::IsolationCorrection::REL20_2;
     else if (m_tool_ver_str == "REL20")   tool_ver = CP::IsolationCorrection::REL20;
     else if (m_tool_ver_str == "REL17_2") tool_ver = CP::IsolationCorrection::REL17_2;
@@ -101,11 +98,8 @@ namespace CP {
       m_apply_dd = false;
     }
 
-    //If we do not want to use metadata
-    if(!m_usemetadata) {
     m_isol_corr->SetAFII(m_AFII_corr);
     m_isol_corr->SetDataMC(m_is_mc);    
-    }
 
     return m_isol_corr->initialize();
   }
@@ -115,129 +109,6 @@ namespace CP {
     return m_isol_corr->finalize();
   }
 
-  StatusCode IsolationCorrectionTool::get_simflavour_from_metadata(PATCore::ParticleDataType::DataType& result){
-    //When we can not retrieve metadata Failure will be returned from this method
-
-    //default result
-    result = PATCore::ParticleDataType::Data;
-    //
-    std::string simType("");
-    
-#ifndef ROOTCORE
-    //Athena environent
-    std::string dataType("");
-    if( AthAnalysisHelper::retrieveMetadata( "/TagInfo", "project_name" , dataType, inputMetaStore() ).isFailure() ) {
-      //In case we can not retrieve the metatada
-      return StatusCode::FAILURE;    
-    }
-    //
-    //We got the dataType is it data
-    if(dataType != "IS_SIMULATION") {
-      ATH_MSG_DEBUG("NOT IS_SIMULATION aka Data");
-      return StatusCode::SUCCESS;    
-    }
-    //
-    //if not data  determine Fast/FullSim
-    ATH_MSG_DEBUG("IS_SIMULATION");
-    if( AthAnalysisHelper::retrieveMetadata("/Simulation/Parameters", "SimulationFlavour", simType, inputMetaStore()).isFailure() ) {
-      return StatusCode::FAILURE;    
-    }
-    else{
-      boost::to_upper(simType);
-      result = (simType.find("ATLFASTII")==std::string::npos) ?  PATCore::ParticleDataType::Full : PATCore::ParticleDataType::Fast;
-      return StatusCode::SUCCESS;
-    }
-#endif    
-
-    //Here is the RootCore or to be dual use , assumes we have not returned before for Athena
-    std::string simulationType("");
-    if (!inputMetaStore()->contains<xAOD::FileMetaData>("FileMetaData")) {
-      return StatusCode::FAILURE;    
-    }
-    const xAOD::FileMetaData* fmd = 0;
-    ATH_CHECK(inputMetaStore()->retrieve(fmd, "FileMetaData"));      
-    //
-    const bool s = fmd->value(xAOD::FileMetaData::simFlavour, simulationType);
-    if (!s) { 
-      ATH_MSG_DEBUG("no sim flavour from metadata: must be data");
-      return StatusCode::FAILURE;    
-    }
-
-    boost::to_upper(simType);
-    result = (simType.find("ATLFASTII")==std::string::npos) ?  PATCore::ParticleDataType::Full : PATCore::ParticleDataType::Fast;
-    return StatusCode::SUCCESS;    
-  
-  }
-  
-  StatusCode IsolationCorrectionTool::beginInputFile() {
-    // If we do not want to use metadata
-    if(!m_usemetadata) {
-      return StatusCode::SUCCESS;    
-    }
-    //
-    PATCore::ParticleDataType::DataType result;
-    const StatusCode status = get_simflavour_from_metadata(result);
-    if (status == StatusCode::SUCCESS) {
-      ATH_MSG_DEBUG("We have metadata");
-    
-      if (result == PATCore::ParticleDataType::Fast) {
-	m_is_mc = true;
-	m_AFII_corr = true;
-	ATH_MSG_DEBUG("Fast sim");
-      }
-      else if (result == PATCore::ParticleDataType::Full) {
-	m_is_mc = true;
-	m_AFII_corr = false;
-	ATH_MSG_DEBUG("Full sim");
-      }else {
-	m_is_mc = false;
-	m_AFII_corr = false;
-	ATH_MSG_DEBUG("Data ");
-      }
-      ATH_MSG_INFO("is MC = " << m_is_mc);
-      ATH_MSG_INFO("use AFII = " << m_AFII_corr);
-      ATH_MSG_DEBUG("metadata from new file: " << (result == PATCore::ParticleDataType::Data ? "data" : 
-						   (result == PATCore::ParticleDataType::Full ? "full simulation" : "fast simulation")));
-    }
-    else {
-      ATH_MSG_WARNING("Not possible to retrieve metadata in the begin Input File");
-      m_metadata_retrieved = false;
-      m_is_mc = false;
-      m_AFII_corr = false;
-    }
-    m_isol_corr->SetAFII(m_AFII_corr);
-    m_isol_corr->SetDataMC(m_is_mc);    
-    //
-    return StatusCode::SUCCESS;    
-  }
-
-  StatusCode IsolationCorrectionTool::endInputFile() {
-    // If we do not want to use metadata
-    if(!m_usemetadata) {
-      return StatusCode::SUCCESS;    
-    }
-    m_metadata_retrieved = false;
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode IsolationCorrectionTool::beginEvent() {
-    // If we do not want to use metadata, or we retrieved them already
-    if((!m_usemetadata) || m_metadata_retrieved) {
-      return StatusCode::SUCCESS;    
-    }
-    //
-    //If not metadata have been available and want to use them go via event info 
-    const xAOD::EventInfo* evtInfo(0);
-    if( (evtStore()->retrieve(evtInfo, "")).isFailure()){
-      ATH_MSG_WARNING(" No default Event Info collection found") ;
-      return StatusCode::SUCCESS;
-    }
-    m_is_mc = evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION);   
-    m_metadata_retrieved = true;
-    m_isol_corr->SetDataMC(m_is_mc);
-    return StatusCode::SUCCESS;
-  }
-
   CP::CorrectionCode IsolationCorrectionTool::CorrectLeakage(xAOD::Egamma & eg) {
 
     static std::vector<xAOD::Iso::IsolationType> topoisolation_types = {xAOD::Iso::topoetcone20,
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventDefs.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventDefs.h
index 4f75e0986681a2e3376cb424ba70d5d2de6c23f7..3b92695b61bda2b9aa25d5df53c0bccd184773a1 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventDefs.h
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventDefs.h
@@ -13,6 +13,7 @@
 
 namespace HI{
 
+  enum BinningScheme{ TOWER = 100, COMPACT = 562 };
 
   namespace TowerBins{
     constexpr unsigned int numEtaBins() {return 100;}
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeIndex.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeIndex.h
index dc95d1db7d75f3a116408e2f11dcb19cfa01e635..2a3d218cf735a85d82cc34f1d69feffd1492cc4b 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeIndex.h
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeIndex.h
@@ -16,7 +16,6 @@ class HIEventShapeIndex
 {
 
 public:
-  enum BinningScheme{ TOWER, COMPACT};
   HIEventShapeIndex();
   ~HIEventShapeIndex();
 
@@ -25,7 +24,7 @@ public:
 
   unsigned int setBinning(const TH2* h2, bool asMask);
   unsigned int setBinning(const xAOD::HIEventShapeContainer* shape);
-  unsigned int setBinning(BinningScheme scheme);
+  unsigned int setBinning(HI::BinningScheme scheme);
 
   void initializeEventShapeContainer(xAOD::HIEventShapeContainer* shape_container, unsigned int num_harmonics) const;
   //can associate ptr to shape container w/ binning
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMap.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMap.h
index ab0c70f1ffc5dcaec41d0d1f3f54b47ac3ee0290..955d6bca71c236bcef90fb813bc98c34a4016d08 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMap.h
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMap.h
@@ -9,8 +9,7 @@
 #include "HIEventUtils/HIEventShapeIndex.h"
 #include <string>
 
-//Migration check: in this class keys are only used as strings to access the map.
-//For the moment we leave it untouched and we pass the only string to the methods
+//This class is currently supersed by HIEventShapeMapTool - fully MT safe
 
 class HIEventShapeMap
 {
@@ -24,7 +23,7 @@ class HIEventShapeMap
   private:
     HIEventShapeMap(){};
     std::map<std::string,HIEventShapeIndex> m_map;
-    static HIEventShapeMap s_obj; //TODO move to const implementation
+    static HIEventShapeMap s_obj;
 };
 
 
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMapTool.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMapTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..680d8d9936ca1024887bd0ab836551b2bb91152e
--- /dev/null
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIEventShapeMapTool.h
@@ -0,0 +1,39 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef HIEVENTUTILS_HIEVENTSHAPEMAPTOOL_H
+#define HIEVENTUTILS_HIEVENTSHAPEMAPTOOL_H
+
+#include "HIEventUtils/HIEventDefs.h"
+#include "xAODHIEvent/HIEventShape.h"
+#include "HIEventUtils/HIEventShapeIndex.h"
+#include "HIEventUtils/IHIEventShapeMapTool.h"
+#include "xAODHIEvent/HIEventShapeContainer.h"
+#include "AsgTools/IAsgTool.h"
+#include "AsgTools/AsgTool.h"
+
+#include <string>
+#include <map>
+
+class HIEventShapeMapTool : virtual public asg::AsgTool, virtual public IHIEventShapeMapTool
+{
+  ASG_TOOL_CLASS(HIEventShapeMapTool,IHIEventShapeMapTool)
+
+  public:
+
+  HIEventShapeMapTool(const std::string& n);
+  virtual ~HIEventShapeMapTool() {};
+
+  virtual StatusCode initialize() override;
+  virtual const HIEventShapeIndex* getIndex(HI::BinningScheme key) const override;
+  virtual const HIEventShapeIndex* getIndexFromShape(const xAOD::HIEventShapeContainer* shape) const override;
+
+  virtual bool hasKey(HI::BinningScheme key) override;
+
+  private:
+
+  std::map< HI::BinningScheme ,HIEventShapeIndex > m_map;
+
+};
+#endif
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/IHIEventShapeMapTool.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/IHIEventShapeMapTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..d8e4efee08d44518db78c0b90c3c1cd9c708c1cd
--- /dev/null
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/IHIEventShapeMapTool.h
@@ -0,0 +1,34 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef HIEVENTUTILS_IHIEVENTSHAPEMAPTOOL_H
+#define HIEVENTUTILS_IHIEVENTSHAPEMAPTOOL_H
+
+#include "HIEventUtils/HIEventDefs.h"
+#include "xAODHIEvent/HIEventShape.h"
+#include "HIEventUtils/HIEventShapeIndex.h"
+#include "xAODHIEvent/HIEventShapeContainer.h"
+#include "AsgTools/IAsgTool.h"
+#include "AsgTools/AsgTool.h"
+
+#include <string>
+#include <map>
+
+class IHIEventShapeMapTool : virtual public asg::AsgTool
+{
+    ASG_TOOL_INTERFACE(IHIEventShapeMapTool)
+
+    public:
+
+    virtual ~IHIEventShapeMapTool() {};
+
+    virtual StatusCode initialize() = 0;
+    virtual const HIEventShapeIndex* getIndex(HI::BinningScheme key) const  = 0;
+    virtual const HIEventShapeIndex* getIndexFromShape(const xAOD::HIEventShapeContainer* shape) const = 0;
+
+    virtual bool hasKey(HI::BinningScheme key)  = 0;
+
+
+};
+#endif
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeIndex.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeIndex.cxx
index 971ac86492d9ba09940594882bb3ff648aaa497c..77e3d879d8c077be773de74c8c33374f13c103ce 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeIndex.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeIndex.cxx
@@ -95,10 +95,10 @@ unsigned int HIEventShapeIndex::setBinning(const TH2* h2, bool asMask)
 	return count;
 }
 
-unsigned int HIEventShapeIndex::setBinning(HIEventShapeIndex::BinningScheme scheme)
+unsigned int HIEventShapeIndex::setBinning(HI::BinningScheme scheme)
 {
 	unsigned int index=0;
-	if(scheme==TOWER)
+	if(scheme==HI::BinningScheme::TOWER)
 	{
 		for(unsigned int layer=0; layer < static_cast<int>(HI::TowerBins::numLayers()); layer++)
 		{
@@ -112,7 +112,7 @@ unsigned int HIEventShapeIndex::setBinning(HIEventShapeIndex::BinningScheme sche
 			}
 		}
 	}
-	else if(scheme==COMPACT)
+	else if(scheme==HI::BinningScheme::COMPACT)
 	{
 		float deta=HI::TowerBins::getBinSizeEta();
 		for(int layer=0; layer < static_cast<int>(HI::TowerBins::numLayers()); layer++)
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeMapTool.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeMapTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a237c5747d349a836ca96b145b17947296cd5d8d
--- /dev/null
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/Root/HIEventShapeMapTool.cxx
@@ -0,0 +1,61 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "xAODHIEvent/HIEventShape.h"
+#include "HIEventUtils/HIEventShapeIndex.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
+
+HIEventShapeMapTool::HIEventShapeMapTool(const std::string& n) : asg::AsgTool(n){
+
+}
+
+StatusCode HIEventShapeMapTool::initialize(){
+
+  HIEventShapeIndex index_1, index_2;
+  index_1.setBinning(HI::BinningScheme::COMPACT);
+  index_2.setBinning(HI::BinningScheme::TOWER);
+  m_map[ HI::BinningScheme::COMPACT ] = index_1;
+  m_map[ HI::BinningScheme::TOWER   ] = index_2;
+
+  return StatusCode::SUCCESS;
+}
+
+const HIEventShapeIndex* HIEventShapeMapTool::getIndex(HI::BinningScheme key) const
+{
+  std::string myKey;
+  if(key == HI::BinningScheme::COMPACT) myKey="COMPACT";
+  else if (key == HI::BinningScheme::TOWER ) myKey="TOWER";
+  else myKey = "UNKNOWN SHAPE";
+
+  auto itr=m_map.find(key);
+  if(itr==m_map.end()) {
+    ATH_MSG_ERROR("HIEventShapeMapTool failed to find map w/ format  " << myKey);
+    return nullptr;
+  }
+  return &(itr->second);
+}
+
+const HIEventShapeIndex* HIEventShapeMapTool::getIndexFromShape(const xAOD::HIEventShapeContainer* shape) const
+{
+  ATH_MSG_INFO("In getIndexFromShape, Shape size " << shape->size() << " And TOWER is: " << (HI::TowerBins::numLayers()*HI::TowerBins::numEtaBins()));
+  if(shape->size() == HI::BinningScheme::TOWER){
+    //TOWER
+    auto itr = m_map.find( HI::BinningScheme::TOWER );
+    return &(itr->second);
+  }
+  else if(shape->size() == HI::BinningScheme::COMPACT){
+    //COMPACT
+    auto itr = m_map.find( HI::BinningScheme::COMPACT );
+    return &(itr->second);
+  }
+  else {
+    ATH_MSG_FATAL("Event Shape w/ unknown binning! Not TOWER or COMPACT. Not possible to get Index");
+    return nullptr;
+  }
+}
+
+bool HIEventShapeMapTool::hasKey(HI::BinningScheme key)
+{
+  return (m_map.find(key)!=m_map.end());
+}
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/src/components/HIEventUtils_entries.cxx b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/src/components/HIEventUtils_entries.cxx
index dabd16d614e01a126cfcfdf93c2a233f504b4b3b..c76da36df6f976a5cc4991b29262000c50fe59ca 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/src/components/HIEventUtils_entries.cxx
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/src/components/HIEventUtils_entries.cxx
@@ -2,10 +2,12 @@
 #include "HIEventUtils/HIVertexSelectionTool.h"
 #include "HIEventUtils/HIEventSelectionTool.h"
 #include "HIEventUtils/HITowerWeightTool.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 #include "HIEventUtils/ZdcRecTool.h"
 
 DECLARE_COMPONENT( HIEventShapeSummaryTool )
 DECLARE_COMPONENT( HITowerWeightTool )
+DECLARE_COMPONENT( HIEventShapeMapTool )
 DECLARE_COMPONENT( HI::HIVertexSelectionTool )
 DECLARE_COMPONENT( HI::HIEventSelectionTool )
 DECLARE_COMPONENT( ZDC::ZdcRecTool )
diff --git a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/AsgAnalysisInterfacesDict.h b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/AsgAnalysisInterfacesDict.h
index a330524dcf0fa8118cac0d8de8adf6107faf1323..441fcfa14dc51604afae4c913e6b9c9cab3f33ee 100644
--- a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/AsgAnalysisInterfacesDict.h
+++ b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/AsgAnalysisInterfacesDict.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- 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
 */
 
 // $Id: AsgAnalysisInterfacesDict.h 790193 2016-12-16 16:36:15Z krasznaa $
@@ -9,6 +9,7 @@
 #define ASGANALYSISINTERFACES_ASGANALYSISINTERFACESDICT_H
 
 // Local include(s):
+#include "AsgAnalysisInterfaces/IClassificationTool.h"
 #include "AsgAnalysisInterfaces/IEfficiencyScaleFactorTool.h"
 #include "AsgAnalysisInterfaces/ISelectionTool.h"
 #include "AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h"
diff --git a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/IClassificationTool.h b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/IClassificationTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b50b5b0d00b89e371790e469c6545da3f6bd0d9c
--- /dev/null
+++ b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/IClassificationTool.h
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/// @author Tadej Novak <tadej@cern.ch>
+
+
+#ifndef ICLASSIFICATIONTOOL_H_
+#define ICLASSIFICATIONTOOL_H_
+
+#include <AsgTools/IAsgTool.h>
+#include <xAODBase/IParticle.h>
+
+namespace CP
+{
+
+/// \brief a tool interface to classify particles into multiple categories
+/// by assigning them an unsigned integer
+class IClassificationTool : virtual public asg::IAsgTool
+{
+  ASG_TOOL_INTERFACE(IClassificationTool)
+
+public:
+  virtual ~IClassificationTool() = default;
+
+  /// \brief classify a particle and pass the classification as an integer
+  virtual StatusCode classify(const xAOD::IParticle &particle,
+                              unsigned int &classification) const = 0;
+};
+
+} // namespace CP
+
+#endif // ICLASSIFICATIONTOOL_H_
diff --git a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/selection.xml b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/selection.xml
index e7c871181fd1b8c9c41c50c7a98c8b050936b6fe..dd85df090701f832862bb1a9e20204aaedf7c564 100644
--- a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/selection.xml
+++ b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/selection.xml
@@ -1,6 +1,7 @@
 <!-- $Id: selection.xml 790193 2016-12-16 16:36:15Z krasznaa $ -->
 <lcgdict>
   <namespace name="CP"/>
+  <class name="CP::IClassificationTool" />
   <class name="CP::IEfficiencyScaleFactorTool" />
   <class name="CP::ISelectionTool" />
   <class name="CP::IPileupReweightingTool" />
diff --git a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/CMakeLists.txt b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/CMakeLists.txt
index 350dc8a1edff06e373409d499e93bc8ba14678e7..0c0de6de450a4a4d2fd7245603e848594c053f25 100644
--- a/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/CMakeLists.txt
+++ b/PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/CMakeLists.txt
@@ -7,6 +7,7 @@ atlas_subdir( AsgAnalysisInterfaces )
 atlas_depends_on_subdirs(
    PUBLIC
    Control/AthToolSupport/AsgTools
+   Event/xAOD/xAODBase
    Event/xAOD/xAODEventInfo
    PhysicsAnalysis/AnalysisCommon/PATInterfaces )
 
@@ -19,7 +20,7 @@ atlas_add_library( AsgAnalysisInterfaces
    INTERFACE
    PUBLIC_HEADERS AsgAnalysisInterfaces
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODEventInfo PATInterfaces )
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODBase xAODEventInfo PATInterfaces )
 
 atlas_add_dictionary( AsgAnalysisInterfacesDict
    AsgAnalysisInterfaces/AsgAnalysisInterfacesDict.h
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h
index f76f99de91741bb112522cbae6cfa4b3a3ae4801..8bfe43ab69663af58d84e34af4087dfc1b7a8dd3 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h
@@ -25,44 +25,7 @@ public:
   void augment(const xAOD::Jet &jet);
   void augment(const xAOD::Jet &jet, const xAOD::Jet &uncalibrated_jet);
 
-  std::string get_pt_uncalib_key();
-  std::string get_eta_uncalib_key();
-  std::string get_abs_eta_uncalib_key();
-
-  std::string get_ip2d_nTrks_key();
-  std::string get_ip2d_isDefaults_key();
-  std::string get_ip2d_cu_key();
-  std::string get_ip2d_bu_key();
-  std::string get_ip2d_bc_key();
-
-  std::string get_ip3d_nTrks_key();
-  std::string get_ip3d_isDefaults_key();
-  std::string get_ip3d_cu_key();
-  std::string get_ip3d_bu_key();
-  std::string get_ip3d_bc_key();
-
-  std::string get_jf_isDefaults_key();
-  std::string get_jf_deltaR_key();
-
-  std::string get_sv1_isDefaults_key();
-
-  std::string get_secondaryVtx_isDefaults_key();
-  std::string get_secondaryVtx_nTrks_key();
-  std::string get_secondaryVtx_m_key();
-  std::string get_secondaryVtx_E_key();
-  std::string get_secondaryVtx_EFrac_key();
-  std::string get_secondaryVtx_L3d_key();
-  std::string get_secondaryVtx_Lxy_key();
-  std::string get_secondaryVtx_min_trk_flightDirRelEta_key();
-  std::string get_secondaryVtx_max_trk_flightDirRelEta_key();
-  std::string get_secondaryVtx_avg_trk_flightDirRelEta_key();
-  std::string get_min_trk_flightDirRelEta_key();
-  std::string get_max_trk_flightDirRelEta_key();
-  std::string get_avg_trk_flightDirRelEta_key();
-
-  std::string get_smt_isDefaults_key();
-
-  std::string get_rnnip_isDefaults_key();
+  std::vector<std::string> getDecoratorKeys() const;
 
 private:
   bool jfIsDefaults(const xAOD::BTagging &btag);
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h
index 1427d6c572c1acaba99041c242faf78df3b3b60d..e150d0c4edd7046f4343435bdc2151513d2c5ab0 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h
@@ -22,6 +22,7 @@
 #include <vector>
 #include <functional>
 #include <exception>
+#include <type_traits>
 
 // forward declarations
 namespace lwt {
@@ -122,7 +123,17 @@ namespace FlavorTagDiscriminants {
       NamedVar operator()(const xAOD::Jet& jet) const {
         const xAOD::BTagging* btag = jet.btagging();
         if (!btag) throw std::runtime_error("can't find btagging object");
-        return {m_name, m_default_flag(*btag) ? NAN : m_getter(*btag)};
+        T ret_value = m_getter(*btag);
+        bool is_default = m_default_flag(*btag);
+        if constexpr (std::is_floating_point<T>::value) {
+          if (std::isnan(ret_value) && !is_default) {
+            throw std::runtime_error(
+              "Found NAN value for '" + m_name
+              + "'. This is only allowed when using a default"
+              " value for this input");
+          }
+        }
+        return {m_name, is_default ? NAN : ret_value};
       }
     };
 
@@ -142,7 +153,14 @@ namespace FlavorTagDiscriminants {
       NamedVar operator()(const xAOD::Jet& jet) const {
         const xAOD::BTagging* btag = jet.btagging();
         if (!btag) throw std::runtime_error("can't find btagging object");
-        return {m_name, m_getter(*btag)};
+        T ret_value = m_getter(*btag);
+        if constexpr (std::is_floating_point<T>::value) {
+          if (std::isnan(ret_value)) {
+            throw std::runtime_error(
+              "Found NAN value for '" + m_name + "'.");
+          }
+        }
+        return {m_name, ret_value};
       }
     };
 
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/HbbGraphConfig.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/HbbGraphConfig.h
index e6adb68f30cb44dad809b22ba9a12254fceea08f..863439de662f7b54a967fbdd879564331140b6f1 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/HbbGraphConfig.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/HbbGraphConfig.h
@@ -14,7 +14,7 @@
 #include <string>
 
 namespace lwt {
-  class GraphConfig;
+  struct GraphConfig;
 }
 
 namespace FlavorTagDiscriminants {
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx
index 60af7d82e5c31df1791c27a414cd110f566d4684..9fbda3003a88fd3cc089e3ee69dd7f09b500ad92 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx
@@ -112,138 +112,49 @@ BTagJetAugmenter::BTagJetAugmenter(std::string associator, FlavorTagDiscriminant
   m_rnnip_pbIsValid(rnn(f) + "_pbIsValid"),
   m_rnnip_isDefaults(rnn(f) + "_isDefaults")
 {
-  using namespace FlavorTagDiscriminants;
-  typedef SG::AuxElement::Decorator<float> ADF;
-  typedef SG::AuxElement::Decorator<double> ADD;
-  typedef SG::AuxElement::Decorator<char> ADC;
-  typedef SG::AuxElement::Decorator<int> ADI;
 }
 
 BTagJetAugmenter::~BTagJetAugmenter() = default;
 BTagJetAugmenter::BTagJetAugmenter(BTagJetAugmenter&&) = default;
 
-std::string BTagJetAugmenter::get_pt_uncalib_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_pt_uncalib.auxid() );
-}
-
-std::string BTagJetAugmenter::get_eta_uncalib_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_eta_uncalib.auxid() );
-}
-
-std::string BTagJetAugmenter:: get_abs_eta_uncalib_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_abs_eta_uncalib.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip2d_nTrks_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip2d_nTrks.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip2d_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip2d_isDefaults.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip2d_cu_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip2d_cu.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip2d_bu_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip2d_bu.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip2d_bc_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip2d_bc.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip3d_nTrks_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip3d_nTrks.auxid() );
-} 
-
-std::string BTagJetAugmenter::get_ip3d_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip3d_isDefaults.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip3d_cu_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip3d_cu.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip3d_bu_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip3d_bu.auxid() );
-}
-
-std::string BTagJetAugmenter::get_ip3d_bc_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_ip3d_bc.auxid() );
-}
-
-std::string BTagJetAugmenter::get_jf_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_jf_isDefaults.auxid() );
-}
-
-std::string BTagJetAugmenter::get_jf_deltaR_key()  {
-  return SG::AuxTypeRegistry::instance().getName( m_jf_deltaR.auxid() );
-}
-
-std::string BTagJetAugmenter::get_sv1_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_sv1_isDefaults.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_isDefaults.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_nTrks_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_nTrks.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_m_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_m.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_E_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_E.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_EFrac_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_EFrac.auxid() );
-}
-  
-std::string BTagJetAugmenter::get_secondaryVtx_L3d_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_L3d.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_Lxy_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_Lxy.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_min_trk_flightDirRelEta_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_min_trk_flightDirRelEta.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_max_trk_flightDirRelEta_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_max_trk_flightDirRelEta.auxid() );
-}
-
-std::string BTagJetAugmenter::get_secondaryVtx_avg_trk_flightDirRelEta_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_avg_trk_flightDirRelEta.auxid() );
-}
-
-std::string BTagJetAugmenter::get_min_trk_flightDirRelEta_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_min_trk_flightDirRelEta.auxid() );
-}
-
-std::string BTagJetAugmenter::get_max_trk_flightDirRelEta_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_max_trk_flightDirRelEta.auxid() );
-}
-
-std::string BTagJetAugmenter::get_avg_trk_flightDirRelEta_key()  {
-  return SG::AuxTypeRegistry::instance().getName( m_avg_trk_flightDirRelEta.auxid() );
-}
-
-std::string BTagJetAugmenter::get_smt_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_smt_isDefaults.auxid() );
-}
-
-std::string BTagJetAugmenter::get_rnnip_isDefaults_key() {
-  return SG::AuxTypeRegistry::instance().getName( m_rnnip_isDefaults.auxid() );
+std::vector<std::string> BTagJetAugmenter::getDecoratorKeys() const {
+  const auto& type_registry = SG::AuxTypeRegistry::instance();
+  std::vector<std::string> keys;
+  for (const auto& auxid: {
+      m_pt_uncalib.auxid(),
+        m_eta_uncalib.auxid(),
+        m_abs_eta_uncalib.auxid(),
+        m_ip2d_nTrks.auxid(),
+        m_ip2d_isDefaults.auxid(),
+        m_ip2d_cu.auxid(),
+        m_ip2d_bu.auxid(),
+        m_ip2d_bc.auxid(),
+        m_ip3d_nTrks.auxid(),
+        m_ip3d_isDefaults.auxid(),
+        m_ip3d_cu.auxid(),
+        m_ip3d_bu.auxid(),
+        m_ip3d_bc.auxid(),
+        m_jf_isDefaults.auxid(),
+        m_jf_deltaR.auxid(),
+        m_sv1_isDefaults.auxid(),
+        m_secondaryVtx_isDefaults.auxid(),
+        m_secondaryVtx_nTrks.auxid(),
+        m_secondaryVtx_m.auxid(),
+        m_secondaryVtx_E.auxid(),
+        m_secondaryVtx_EFrac.auxid(),
+        m_secondaryVtx_L3d.auxid(),
+        m_secondaryVtx_Lxy.auxid(),
+        m_secondaryVtx_min_trk_flightDirRelEta.auxid(),
+        m_secondaryVtx_max_trk_flightDirRelEta.auxid(),
+        m_secondaryVtx_avg_trk_flightDirRelEta.auxid(),
+        m_min_trk_flightDirRelEta.auxid(),
+        m_max_trk_flightDirRelEta.auxid(),
+        m_avg_trk_flightDirRelEta.auxid(),
+        m_smt_isDefaults.auxid(),
+        m_rnnip_isDefaults.auxid()}) {
+    keys.push_back(type_registry.getName(auxid));
+  }
+  return keys;
 }
 
 void BTagJetAugmenter::augment(const xAOD::Jet &jet, const xAOD::Jet &uncalibrated_jet) {
@@ -402,12 +313,14 @@ void BTagJetAugmenter::augment(const xAOD::Jet &jet) {
     track_number++;
     track_E_total += track_particle.e();
 
-    TVector3 track_flightDirRelVect = track_particle.p4().Vect();
-    track_flightDirRelVect.SetTheta(track_flightDirRelVect.Angle(flightDir));
 
     double track_flightDirRelEta = NAN;
-    if (track_flightDirRelVect.Perp() != 0) {
-      track_flightDirRelEta = track_flightDirRelVect.PseudoRapidity();
+    if (!std::isnan(jf_phi)) {
+      TVector3 track_flightDirRelVect = track_particle.p4().Vect();
+      if (track_flightDirRelVect.Perp()) {
+        track_flightDirRelVect.SetTheta(track_flightDirRelVect.Angle(flightDir));
+        track_flightDirRelEta = track_flightDirRelVect.PseudoRapidity();
+      }
     }
 
     track_flightDirRelEta_total += track_flightDirRelEta;
@@ -418,7 +331,7 @@ void BTagJetAugmenter::augment(const xAOD::Jet &jet) {
       max_track_flightDirRelEta = track_flightDirRelEta;
     }
     if (secondary_jf_vtx_index >= 0) {
-      for (const ElementLink<xAOD::TrackParticleContainer> vertex_track_particle : (**m_jf_vertices(btag).at(secondary_jf_vtx_index)).track_links()) {
+      for (const ElementLink<xAOD::TrackParticleContainer>& vertex_track_particle : (**m_jf_vertices(btag).at(secondary_jf_vtx_index)).track_links()) {
         if (*vertex_track_particle == &track_particle) {
           secondaryVtx_track_number++;
           TLorentzVector track_fourVector;
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx
index 339a116cc4ea5ec2fddce1ff6a97b81263e4895d..127db489ca7696ff32650dd311722ba374926e9c 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx
@@ -100,7 +100,8 @@ namespace FlavorTagDiscriminants {
       {"JetFitterFlip_.*"_r, "JetFitterFlip_isDefaults"},
       {"JetFitterSecondaryVertex_.*"_r, "JetFitterSecondaryVertex_isDefaults"},
       {"JetFitterSecondaryVertexFlip_.*"_r, "JetFitterSecondaryVertexFlip_isDefaults"},
-      {".*TrackRelativeEta(Flip)?"_r, ""},
+      {".*TrackRelativeEta"_r, "JetFitterSecondaryVertex_isDefaults"},
+      {".*TrackRelativeEtaFlip"_r, "JetFitterSecondaryVertexFlip_isDefaults"},
       {"rnnip_.*"_r, "rnnip_isDefaults"},
       {"rnnipflip_.*"_r, "rnnipflip_isDefaults"},
       {"iprnn_.*"_r, ""},
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h
index ed7eacd49dd40d90ad74dbcb7bae29e346a0b7d7..1b1d75a873ade6f7df4cf7f7cec2ad22b46bea49 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h
@@ -38,49 +38,14 @@ namespace Analysis {
 
 
     typedef SG::AuxElement AE;
-    
-    // Decorator keys will be modified at run-time to conform to the correct container name
-    // For the run-time update to work, the decoration key name properties must start with a period (".")
 
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_pt_uncalib {this, "pt_uncalib", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_eta_uncalib {this, "eta_uncalib", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_abs_eta_uncalib {this, "abs_eta_uncalib", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_nTrks {this, "ip2d_nTrks", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_isDefaults {this, "ip2d_isDefaults", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_cu {this, "ip2d_cu", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_bu {this, "ip2d_bu", "", "" };
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_bc {this, "ip2d_bc", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_nTrks {this, "ip3d_nTrks", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_isDefaults {this, "ip3d_isDefaults", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_cu {this, "ip3d_cu", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_bu {this, "ip3d_bu", "", "" };
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_bc {this, "ip3d_bc", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_jf_isDefaults {this, "jf_isDefaults", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_jf_deltaR {this, "jf_deltaR", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_sv1_isDefaults {this, "sv1_isDefaults", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_isDefaults {this, "secondaryVtx_isDefaults", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_nTrks {this, "secondaryVtx_nTrks", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_m {this, "secondaryVtx_m", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_E {this, "secondaryVtx_E", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_EFrac {this, "secondaryVtx_EFrac", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_L3d {this, "secondaryVtx_L3d", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_Lxy {this, "secondaryVtx_Lxy", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_min_trk_flightDirRelEta {this, "secondaryVtx_min_trk_flightDirRelEta", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_max_trk_flightDirRelEta {this, "secondaryVtx_max_trk_flightDirRelEta", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_avg_trk_flightDirRelEta {this, "secondaryVtx_avg_trk_flightDirRelEta", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_min_trk_flightDirRelEta {this, "min_trk_flightDirRelEta", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_max_trk_flightDirRelEta {this, "max_trk_flightDirRelEta", "", ""};
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_avg_trk_flightDirRelEta {this, "avg_trk_flightDirRelEta", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_smt_isDefaults {this, "smt_isDefaults", "", ""};
-
-    SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_rnnip_isDefaults {this, "rnnip_isDefaults", "", ""};
+    // Decorator keys will be created at run-time to conform to the
+    // correct container name.
+    std::vector<
+      std::unique_ptr<
+        SG::WriteDecorHandleKey<xAOD::BTaggingContainer>
+        >
+      > m_write_handles;
   };
 }
-
 #endif
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx
index bfa4efa4afdb754551bbcddfa9cfd306d359a1b0..7f51c85f14409a2231c4be6b4f5ed178bad4d1a2 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx
@@ -36,84 +36,16 @@ namespace Analysis {
     FlipTagConfig flipTagConf = FlavorTagDiscriminants::flipTagConfigFromString(m_flipTagConfig);
     m_aug = std::make_unique<BTagJetAugmenter>(m_acc_jet_track_links, flipTagConf);
 
-    m_dec_pt_uncalib = m_BTagCollectionName.key() + "." + m_aug->get_pt_uncalib_key();
-    m_dec_eta_uncalib = m_BTagCollectionName.key() + "." + m_aug->get_eta_uncalib_key();
-    m_dec_abs_eta_uncalib = m_BTagCollectionName.key() + "." + m_aug->get_abs_eta_uncalib_key();
-
-    m_dec_ip2d_nTrks = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_nTrks_key();
-    m_dec_ip2d_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_isDefaults_key();
-    m_dec_ip2d_cu = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_cu_key();
-    m_dec_ip2d_bu = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bu_key();
-    m_dec_ip2d_bc = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bc_key();
-
-    m_dec_ip3d_nTrks = m_BTagCollectionName.key() + "." + m_aug->get_ip3d_nTrks_key();
-    m_dec_ip3d_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_ip3d_isDefaults_key();
-    m_dec_ip3d_cu = m_BTagCollectionName.key() + "." + m_aug->get_ip3d_cu_key();
-    m_dec_ip3d_bu = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bu_key();
-    m_dec_ip3d_bc = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bc_key();
-    
-    m_dec_jf_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_jf_isDefaults_key();
-    m_dec_jf_deltaR = m_BTagCollectionName.key() + "." + m_aug->get_jf_deltaR_key();
-
-    m_dec_sv1_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_sv1_isDefaults_key();
-    
-    m_dec_secondaryVtx_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_isDefaults_key();
-    m_dec_secondaryVtx_nTrks = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_nTrks_key();
-    m_dec_secondaryVtx_m = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_m_key();
-    m_dec_secondaryVtx_E = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_E_key();
-    m_dec_secondaryVtx_EFrac = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_EFrac_key();
-    m_dec_secondaryVtx_L3d = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_L3d_key();
-    m_dec_secondaryVtx_Lxy = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_Lxy_key();
-    m_dec_secondaryVtx_min_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_min_trk_flightDirRelEta_key();
-    m_dec_secondaryVtx_max_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_max_trk_flightDirRelEta_key();
-    m_dec_secondaryVtx_avg_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_avg_trk_flightDirRelEta_key();
-    m_dec_min_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_min_trk_flightDirRelEta_key();
-    m_dec_max_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_max_trk_flightDirRelEta_key();
-    m_dec_avg_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_avg_trk_flightDirRelEta_key();
-    
-    m_dec_smt_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_smt_isDefaults_key();
-
-    m_dec_rnnip_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_rnnip_isDefaults_key();
-
-    CHECK( m_dec_pt_uncalib.initialize() );
-    CHECK( m_dec_eta_uncalib.initialize() );
-    CHECK( m_dec_abs_eta_uncalib.initialize() );
-
-    CHECK( m_dec_ip2d_nTrks.initialize() );
-    CHECK( m_dec_ip2d_isDefaults.initialize() );
-    CHECK( m_dec_ip2d_cu.initialize() );
-    CHECK( m_dec_ip2d_bu.initialize() );
-    CHECK( m_dec_ip2d_bc.initialize() );
-
-    CHECK( m_dec_ip3d_nTrks.initialize() );
-    CHECK( m_dec_ip3d_isDefaults.initialize() );
-    CHECK( m_dec_ip3d_cu.initialize() );
-    CHECK( m_dec_ip3d_bu.initialize() );
-    CHECK( m_dec_ip3d_bc.initialize() );
-
-    CHECK( m_dec_jf_isDefaults.initialize() );
-    CHECK( m_dec_jf_deltaR.initialize() );
-
-    CHECK( m_dec_sv1_isDefaults.initialize() );
-
-    CHECK( m_dec_secondaryVtx_isDefaults.initialize() );
-    CHECK( m_dec_secondaryVtx_nTrks.initialize() );
-    CHECK( m_dec_secondaryVtx_m.initialize() );
-    CHECK( m_dec_secondaryVtx_E.initialize() );
-    CHECK( m_dec_secondaryVtx_EFrac.initialize() );
-    CHECK( m_dec_secondaryVtx_L3d.initialize() );
-    CHECK( m_dec_secondaryVtx_Lxy.initialize() );
-    CHECK( m_dec_secondaryVtx_min_trk_flightDirRelEta.initialize() );
-    CHECK( m_dec_secondaryVtx_max_trk_flightDirRelEta.initialize() );
-    CHECK( m_dec_secondaryVtx_avg_trk_flightDirRelEta.initialize() );
-    CHECK( m_dec_min_trk_flightDirRelEta.initialize() );
-    CHECK( m_dec_max_trk_flightDirRelEta.initialize() );
-    CHECK( m_dec_avg_trk_flightDirRelEta.initialize() );
-
-    CHECK( m_dec_smt_isDefaults.initialize() );
-
-    CHECK( m_dec_rnnip_isDefaults.initialize() );
-
+    // create and initialize write handles
+    for (const std::string& key: m_aug->getDecoratorKeys()) {
+      std::string full_key = m_BTagCollectionName.key() + "." + key;
+      ATH_MSG_DEBUG("Adding " << full_key);
+      m_write_handles.emplace_back(
+        std::make_unique<SG::WriteDecorHandleKey<xAOD::BTaggingContainer>>(
+          this, key, full_key, ""));
+      ATH_MSG_DEBUG("Initializing " << full_key);
+      ATH_CHECK(m_write_handles.back()->initialize());
+    }
     return StatusCode::SUCCESS;
   }
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx
index 358cd14cad541617bc518d269b4c5fc732da3b10..9892d62b156406db4586c0c8f6b9a41357d3c673 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx
@@ -114,25 +114,23 @@ namespace Analysis {
 
     
     SG::ReadDecorHandle<xAOD::JetContainer, std::vector<ElementLink< xAOD::VertexContainer> > > h_jetSVLinkName (m_jetSVLinkName);
-    if (!h_jetSVLinkName.isAvailable()) {
-      ATH_MSG_ERROR( " cannot retrieve vertex container EL decoration with key " << m_jetSVLinkName.key()  );
-      return StatusCode::FAILURE;
+    std::vector< ElementLink< xAOD::VertexContainer > > SVertexLinks;
+    if (myVertexInfoVKal) {
+      if (!h_jetSVLinkName.isAvailable()) {
+        ATH_MSG_ERROR( " cannot retrieve vertex container EL decoration with key " << m_jetSVLinkName.key()  );
+        return StatusCode::FAILURE;
+      }
+      SVertexLinks = h_jetSVLinkName(myJet);
     }
-    const std::vector< ElementLink< xAOD::VertexContainer > > SVertexLinks = h_jetSVLinkName(myJet);
-    
-    std::vector<xAOD::Vertex*>::const_iterator verticesBegin = myVertexInfoVKal->vertices().begin();
-    std::vector<xAOD::Vertex*>::const_iterator verticesEnd   = myVertexInfoVKal->vertices().end();
 
+    std::vector<xAOD::Vertex*> vertices;
     std::vector<ElementLink<xAOD::TrackParticleContainer> > TrkList;
-    float    mass = -1., energyfrc = -1., energyTrk=-1, dsttomatlayer = -1; 
-    int  n2trk = -1, npsec = -1; //npprm = -1;
-    
-    if(myVertexInfoVKal->vertices().size()){
-      npsec=0;
-    }
-    
+    float    mass = 0, energyfrc = NAN, energyTrk = 0, dsttomatlayer = NAN;
+    int  n2trk = 0, npsec = 0;
+
     if(basename.find("MSV") != 0){
-      for (std::vector<xAOD::Vertex*>::const_iterator verticesIter=verticesBegin; verticesIter!=verticesEnd;++verticesIter) {  
+      for (std::vector<xAOD::Vertex*>::const_iterator verticesIter = vertices.begin();
+           verticesIter!=vertices.end();++verticesIter) {
         std::vector<ElementLink<xAOD::TrackParticleContainer> > theseTracks = (*verticesIter)->trackParticleLinks();
         npsec += theseTracks.size();
         for (std::vector<ElementLink<xAOD::TrackParticleContainer> >::iterator itr=theseTracks.begin();itr!=theseTracks.end();itr++){
@@ -140,7 +138,7 @@ namespace Analysis {
         }
       }
 
-      ATH_MSG_DEBUG("#BTAG# Size of the sec vertex linked to the BTagging: " << SVertexLinks.size());              
+      ATH_MSG_DEBUG("#BTAG# Size of the sec vertex linked to the BTagging: " << SVertexLinks.size());
       newBTag->setVariable<std::vector<ElementLink<xAOD::VertexContainer> > >(basename, "vertices", SVertexLinks);
       newBTag->setDynVxELName(basename, "vertices");
 
@@ -152,13 +150,10 @@ namespace Analysis {
 	      dsttomatlayer= myVertexInfoVKal->dstToMatLay();
       }
 
-
-
       newBTag->setVariable<float>(basename, "energyTrkInJet", energyTrk);
       newBTag->setVariable<float>(basename, "dstToMatLay", dsttomatlayer);
 
       if("SV1" == basename){
-        //newBTag->setTaggerInfo(npprm, xAOD::BTagInfo::SV0_NGTinJet);
         newBTag->setTaggerInfo(mass, xAOD::BTagInfo::SV1_masssvx);
         newBTag->setTaggerInfo(energyfrc, xAOD::BTagInfo::SV1_efracsvx);
         newBTag->setTaggerInfo(n2trk, xAOD::BTagInfo::SV1_N2Tpair);
@@ -171,8 +166,7 @@ namespace Analysis {
         newBTag->setTaggerInfo(n2trk, xAOD::BTagInfo::SV0_N2Tpair);
         newBTag->setTaggerInfo(npsec, xAOD::BTagInfo::SV0_NGTinSvx);
         newBTag->setSV0_TrackParticleLinks(TrkList);
-      } 
-      else{
+      } else{
         newBTag->setVariable<float>(basename, "masssvx", mass);
         newBTag->setVariable<float>(basename, "efracsvx", energyfrc);
         newBTag->setVariable<int>(basename, "N2Tpair", n2trk);
@@ -181,8 +175,8 @@ namespace Analysis {
         newBTag->setDynTPELName(basename, "TrackParticleLinks");
       }
     }//no msv
-    if(theTrackParticleContainer){
-      std::vector<ElementLink<xAOD::TrackParticleContainer> > badtrackEL;
+    std::vector<ElementLink<xAOD::TrackParticleContainer> > badtrackEL;
+    if(theTrackParticleContainer && myVertexInfoVKal){
       std::vector<const xAOD::IParticle*> btip =  myVertexInfoVKal->badTracksIP();
 
       std::vector<const xAOD::IParticle*>::iterator ipBegin = btip.begin();
@@ -197,11 +191,9 @@ namespace Analysis {
 	    tpel.toContainedElement(*theTrackParticleContainer, tp);
 	    badtrackEL.push_back(tpel);
       }
-      newBTag->setVariable<std::vector<ElementLink<xAOD::TrackParticleContainer> > >(basename, "badTracksIP", badtrackEL);
-      newBTag->setDynTPELName(basename, "badTracksIP");
-    } else {
-      ATH_MSG_WARNING("#BTAG# pointer to track particle container not available -> can't create EL to bad tracks IP");
     }
+    newBTag->setVariable<std::vector<ElementLink<xAOD::TrackParticleContainer> > >(basename, "badTracksIP", badtrackEL);
+    newBTag->setDynTPELName(basename, "badTracksIP");
 
     return StatusCode::SUCCESS;
 
@@ -214,16 +206,19 @@ namespace Analysis {
 					       std::string basename) const {
 
     SG::ReadDecorHandle<xAOD::JetContainer, std::vector<ElementLink< xAOD::BTagVertexContainer> > > h_jetJFVtxLinkName (m_jetJFVtxLinkName);
-    if (!h_jetJFVtxLinkName.isAvailable()) {
-      ATH_MSG_ERROR( " cannot retrieve vertex container EL decoration with key " << m_jetJFVtxLinkName.key()  );
-      return StatusCode::FAILURE;
+    std::vector< ElementLink< xAOD::BTagVertexContainer > > JFVerticesLinks;
+
+    //twotrackVerticesInJet
+    std::vector< const xAOD::Vertex*> vecTwoTrkVtx;
+    if (myVertexInfoJetFitter) {
+      const Trk::TwoTrackVerticesInJet* TwoTrkVtxInJet = myVertexInfoJetFitter->getTwoTrackVerticesInJet();
+      vecTwoTrkVtx = TwoTrkVtxInJet->getTwoTrackVertice();
+      if (!h_jetJFVtxLinkName.isAvailable()) {
+        ATH_MSG_ERROR( " cannot retrieve vertex container EL decoration with key " << m_jetJFVtxLinkName.key()  );
+        return StatusCode::FAILURE;
+      }
+      JFVerticesLinks = h_jetJFVtxLinkName(myJet);
     }
-    const std::vector< ElementLink< xAOD::BTagVertexContainer > > JFVerticesLinks = h_jetJFVtxLinkName(myJet);
-
-    //twotrackVerticesInJet   
-    const Trk::TwoTrackVerticesInJet* TwoTrkVtxInJet =  myVertexInfoJetFitter->getTwoTrackVerticesInJet();
-
-    const std::vector< const xAOD::Vertex*> vecTwoTrkVtx =  TwoTrkVtxInJet->getTwoTrackVertice();
 
     int N2TrkVtx = vecTwoTrkVtx.size();
     if("JetFitter" == basename){
@@ -232,66 +227,73 @@ namespace Analysis {
     else{
       newBTag->setVariable<int>(basename, "N2Tpair", N2TrkVtx);
     }
-         
+
     //list of JFvertices
-    const std::vector<Trk::VxJetCandidate*> JFvertices =  myVertexInfoJetFitter->verticesJF();
-  
+    std::vector<Trk::VxJetCandidate*> JFvertices;
+    if (myVertexInfoJetFitter) JFvertices = myVertexInfoJetFitter->verticesJF();
+
     int nVtx = 0;
+    Trk::VxJetCandidate* vxjetcand = nullptr;
+    std::vector<Trk::VxVertexOnJetAxis*> Vtxonjetaxes;
     if (JFvertices.size() > 0) {
-      Trk::VxJetCandidate* vxjetcand = dynamic_cast< Trk::VxJetCandidate*>(JFvertices[0]);
+      vxjetcand = dynamic_cast< Trk::VxJetCandidate*>(JFvertices[0]);
       if (!vxjetcand) {
         ATH_MSG_WARNING("#BTAG# bad VxCandidate is not a VxJetCandidate");
         return StatusCode::SUCCESS;
       }
 
       //vtx on jet axis
-      const std::vector<Trk::VxVertexOnJetAxis*> Vtxonjetaxes = vxjetcand->getVerticesOnJetAxis();
-            
-      nVtx = Vtxonjetaxes.size(); 
-      typedef std::vector<ElementLink<xAOD::BTagVertexContainer> > BTagVertices;
-      ATH_MSG_DEBUG("#BTAGJF# filling vertices for basename: " << basename);
-      newBTag->setVariable<std::vector<ElementLink<xAOD::BTagVertexContainer> > >(basename, "JFvertices", JFVerticesLinks);
-      newBTag->setDynBTagVxELName(basename, "JFvertices");
-      ATH_MSG_DEBUG("#BTAGJF# n vertices: " << newBTag->auxdata<BTagVertices>(basename + "_JFvertices").size());
+      Vtxonjetaxes = vxjetcand->getVerticesOnJetAxis();
+    }
 
+    nVtx = Vtxonjetaxes.size();
+    typedef std::vector<ElementLink<xAOD::BTagVertexContainer> > BTagVertices;
+    ATH_MSG_DEBUG("#BTAGJF# filling vertices for basename: " << basename);
+    newBTag->setVariable<std::vector<ElementLink<xAOD::BTagVertexContainer> > >(basename, "JFvertices", JFVerticesLinks);
+    newBTag->setDynBTagVxELName(basename, "JFvertices");
+    ATH_MSG_DEBUG("#BTAGJF# n vertices: " << newBTag->auxdata<BTagVertices>(basename + "_JFvertices").size());
 
+    Amg::VectorX vtxPositions = Amg::VectorX::Zero(5);
+    Amg::MatrixX vtxCovMatrix = Amg::MatrixX::Zero(5,5);
+    if (nVtx > 0){
       const Trk::RecVertexPositions& recVtxposition = vxjetcand->getRecVertexPositions();
-      const Amg::VectorX& vtxPositions = recVtxposition.position();
-      const Amg::MatrixX& vtxCovMatrix = recVtxposition.covariancePosition();
+      vtxPositions = recVtxposition.position();
+      vtxCovMatrix = recVtxposition.covariancePosition();
       ATH_MSG_DEBUG("#BTAGJF# size vtxPosition "<<vtxPositions.size());
-      std::vector< float > fittedPosition = std::vector<float>(nVtx+5,-1);
-      std::vector< float > fittedCov = std::vector<float>(nVtx+5,-1); //only store the diagonal terms
-      if(vtxPositions.rows()>4 ) {
-        fittedPosition[0] = vtxPositions[Trk::jet_xv]; //position x,y,z of PV
-        fittedPosition[1] = vtxPositions[Trk::jet_yv]; 
-        fittedPosition[2] = vtxPositions[Trk::jet_zv]; 
-        fittedPosition[3] = vtxPositions[Trk::jet_phi];  // direction of the jet axis
-        fittedPosition[4] = vtxPositions[Trk::jet_theta];
-              
-        fittedCov[0] = vtxCovMatrix(0,0);
-        fittedCov[1] = vtxCovMatrix(1,1);
-        fittedCov[2] = vtxCovMatrix(2,2);
-        fittedCov[3] = vtxCovMatrix(3,3);
-        fittedCov[4] = vtxCovMatrix(4,4);
-        
-      }
+    }
+    std::vector< float > fittedPosition = std::vector<float>(nVtx+5,-1);
+    std::vector< float > fittedCov = std::vector<float>(nVtx+5,-1); //only store the diagonal terms
+    if(vtxPositions.rows()>4 ) {
+      fittedPosition[0] = vtxPositions[Trk::jet_xv]; //position x,y,z of PV
+      fittedPosition[1] = vtxPositions[Trk::jet_yv];
+      fittedPosition[2] = vtxPositions[Trk::jet_zv];
+      fittedPosition[3] = nVtx > 0 ? vtxPositions[Trk::jet_phi] : NAN;  // direction of the jet axis
+      fittedPosition[4] = nVtx > 0 ? vtxPositions[Trk::jet_theta] : NAN;
+
+      fittedCov[0] = vtxCovMatrix(0,0);
+      fittedCov[1] = vtxCovMatrix(1,1);
+      fittedCov[2] = vtxCovMatrix(2,2);
+      fittedCov[3] = vtxCovMatrix(3,3);
+      fittedCov[4] = vtxCovMatrix(4,4);
+    }
 
-      for(int i=0; i<nVtx; ++i){
-        fittedPosition[i+5] = vtxPositions[i+5]; //dist of vtxi on jet axis from PV
-        fittedCov[i+5] = vtxCovMatrix(i+5,i+5);
-      }
-      
-      newBTag->setVariable<std::vector< float > >(basename, "fittedPosition", fittedPosition);
-      newBTag->setVariable<std::vector< float > >(basename, "fittedCov", fittedCov);
-    
-      //trks at PV
-      const std::vector<Trk::VxTrackAtVertex*> & trackatPV = vxjetcand->getPrimaryVertex()->getTracksAtVertex();
+    for(int i=0; i<nVtx; ++i){
+      fittedPosition[i+5] = vtxPositions[i+5]; //dist of vtxi on jet axis from PV
+      fittedCov[i+5] = vtxCovMatrix(i+5,i+5);
+    }
+
+    newBTag->setVariable<std::vector< float > >(basename, "fittedPosition", fittedPosition);
+    newBTag->setVariable<std::vector< float > >(basename, "fittedCov", fittedCov);
+
+    //trks at PV
+    std::vector<Trk::VxTrackAtVertex*> trackatPV;
+    std::vector< float > tracksAtPVchi2;
+    std::vector< float > tracksAtPVndf;
+    std::vector< ElementLink< xAOD::TrackParticleContainer > > tracksAtPVlinks;
+    if (vxjetcand) {
+      trackatPV = vxjetcand->getPrimaryVertex()->getTracksAtVertex();
       std::vector<Trk::VxTrackAtVertex*>::const_iterator irBegin = trackatPV.begin();
       std::vector<Trk::VxTrackAtVertex*>::const_iterator irEnd   = trackatPV.end();
-      std::vector< float > tracksAtPVchi2;
-      std::vector< float > tracksAtPVndf;
-      std::vector< ElementLink< xAOD::TrackParticleContainer > > tracksAtPVlinks;
-
       for (std::vector<Trk::VxTrackAtVertex*>::const_iterator it=irBegin; it!=irEnd; ++it) {
         const Trk::FitQuality& trkquality = (*it)->trackQuality();
         double tmpchi2 = trkquality.chiSquared();
@@ -310,18 +312,13 @@ namespace Analysis {
         tpel.toContainedElement(*theTrackParticleContainer, myTrklink);
         tracksAtPVlinks.push_back(tpel);
       }
-    
-      newBTag->setVariable<std::vector< float > >(basename, "tracksAtPVchi2", tracksAtPVchi2);
-      newBTag->setVariable<std::vector< float > >(basename, "tracksAtPVndf", tracksAtPVndf);
-      newBTag->setVariable<std::vector< ElementLink< xAOD::TrackParticleContainer > > >(basename, "tracksAtPVlinks", tracksAtPVlinks);  
-      newBTag->setDynTPELName(basename, "tracksAtPVlinks");
-
-      
-    }
-    else { //No JF vertices
-      ATH_MSG_ERROR("#BTAG# No JF vertices. Minimum 1");
     }
 
+    newBTag->setVariable<std::vector< float > >(basename, "tracksAtPVchi2", tracksAtPVchi2);
+    newBTag->setVariable<std::vector< float > >(basename, "tracksAtPVndf", tracksAtPVndf);
+    newBTag->setVariable<std::vector< ElementLink< xAOD::TrackParticleContainer > > >(basename, "tracksAtPVlinks", tracksAtPVlinks);
+    newBTag->setDynTPELName(basename, "tracksAtPVlinks");
+
     StatusCode sc = m_JFvarFactory->fillJetFitterVariables(myJet, newBTag, myVertexInfoJetFitter, basename);
     if(sc.isFailure()){
       ATH_MSG_ERROR("#BTAG# error filling variables in JetFitterVariablesFactory" );
@@ -380,7 +377,7 @@ namespace Analysis {
           const xAOD::Jet& jetToTag = **jetIter;
           const Trk::VxSecVertexInfo& myVertexInfo = **infoSVIter;
 
-          const xAOD::TrackParticleContainer* theTrackParticleContainer = 0;
+          const xAOD::TrackParticleContainer* theTrackParticleContainer = nullptr;
 
           std::string trackname = m_secVertexFinderTrackNameList[nameiter];
           std::string basename =  m_secVertexFinderBaseNameList[nameiter];
@@ -413,25 +410,27 @@ namespace Analysis {
 	          }
 	          else if("JetFitter" == basename) {
               std::vector< ElementLink< xAOD::TrackParticleContainer > > tracksAtPVlinks;
-              (*btagIter)->setVariable<std::vector< ElementLink< xAOD::TrackParticleContainer > > >(basename, "tracksAtPVlinks", tracksAtPVlinks);  
+              (*btagIter)->setVariable<std::vector< ElementLink< xAOD::TrackParticleContainer > > >(basename, "tracksAtPVlinks", tracksAtPVlinks);
               (*btagIter)->setDynTPELName(basename, "tracksAtPVlinks");
             }
           }
-        
+
           for (  ; itEL != itELend; ++itEL ) {
 	          /// warning -> will not work if at some point we decide to associate to several track collections at the same time (in the same assoc object)
 
             theTrackParticleContainer = (*itEL).getStorableObjectPointer();
           }
 
-          if (const Trk::VxSecVKalVertexInfo* myVertexInfoVKal = dynamic_cast<const Trk::VxSecVKalVertexInfo*>(&myVertexInfo)) {
+          if (basename == "SV1") {
+            const Trk::VxSecVKalVertexInfo* myVertexInfoVKal = dynamic_cast<const Trk::VxSecVKalVertexInfo*>(&myVertexInfo);
 	          ATH_MSG_DEBUG("#BTAG# Found valid VKalVertexInfo information: " << infoCont.key());
 	          StatusCode sc = fillVkalVariables(**jetIter, *btagIter, myVertexInfoVKal, theTrackParticleContainer, basename);
 	          if(sc.isFailure()){
 	            ATH_MSG_ERROR("#BTAG# error filling variables from VxSecVKalVertexInfo for " << basename);
 	            return sc;
 	          }
-          } else if (const Trk::VxJetFitterVertexInfo* myVertexInfoJetFitter = dynamic_cast<const Trk::VxJetFitterVertexInfo*>(&myVertexInfo)) {
+          } else if (basename == "JetFitter") {
+            const Trk::VxJetFitterVertexInfo* myVertexInfoJetFitter = dynamic_cast<const Trk::VxJetFitterVertexInfo*>(&myVertexInfo);
             ATH_MSG_DEBUG("#BTAG# Found valid VxJetFitterVertexInfo information: " << infoCont.key());
             StatusCode sc = fillJFVariables(jetToTag, *btagIter, myVertexInfoJetFitter, theTrackParticleContainer, basename);
             if(sc.isFailure()){
@@ -452,4 +451,4 @@ namespace Analysis {
     return StatusCode::SUCCESS;
   }
 
-} // namespace
\ No newline at end of file
+} // namespace
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterVariablesFactory.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterVariablesFactory.cxx
index 4d964b10b60ad71e2ef2a5dff451cb6b327a0d7d..74c2cc58c72f500849fc564967a97cb2df42461a 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterVariablesFactory.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterVariablesFactory.cxx
@@ -95,13 +95,15 @@ StatusCode JetFitterVariablesFactory::finalize() {
     int ndof(0);
     float deltaRFlightDir(0.);
 
-    const std::vector<Trk::VxJetCandidate*>& myVertices = myJetFitterInfo->verticesJF();
+    std::vector<Trk::VxJetCandidate*> myVertices;
+    Trk::VxJetCandidate* myVxJetCandidate = nullptr;
+    if (myJetFitterInfo) myVertices = myJetFitterInfo->verticesJF();
     if(myVertices.size() == 0){
-      ATH_MSG_WARNING("#BTAG# Trk::VxJetCandidate not found for jet fitter ");
+      ATH_MSG_DEBUG("#BTAG# Trk::VxJetCandidate not found for jet fitter ");
       fill(BTag, basename, mass_uncorr, nVTX, nSingleTracks, nTracksAtVtx, mass, energyFraction, significance3d, deltaeta, deltaphi, chi2, ndof, deltaRFlightDir);
       return StatusCode::SUCCESS;
     }
-    const Trk::VxJetCandidate* myVxJetCandidate=dynamic_cast<Trk::VxJetCandidate*>(myVertices[0]);
+    if(myVertices.size() > 0) myVxJetCandidate=dynamic_cast<Trk::VxJetCandidate*>(myVertices[0]);
     if (myVxJetCandidate==0) {
       ATH_MSG_WARNING("#BTAG# No correct VxJetCandidate could be retrieved." );
       fill(BTag, basename, mass_uncorr, nVTX, nSingleTracks, nTracksAtVtx, mass, energyFraction, significance3d, deltaeta, deltaphi, chi2, ndof, deltaRFlightDir);
diff --git a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx
index 1162e63ec1c11f7be0914656ded9daf91227461f..65367477477dc033943d0b38d80f905d9250c2ca 100644
--- a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx
+++ b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonancePlots.cxx
@@ -344,7 +344,7 @@ float MuonResonancePlots::deltaPt(TLorentzVector v1, TLorentzVector v2){
 }
 
 
-// function to return Chi² / DoF
+// function to return Chi^2 / DoF
 float MuonResonancePlots::getChiSquared(const xAOD::Muon& mu, int type){
 
   const xAOD::TrackParticle *cb_ = mu.trackParticle(xAOD::Muon::CombinedTrackParticle);
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisCore/python/PyEventTools.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisCore/python/PyEventTools.py
index a2397a5e7965cb0cbe2fb400e38f727e7ea8cc88..fc05a07a760c19ed354c4a528d79c55c74ff374e 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisCore/python/PyEventTools.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisCore/python/PyEventTools.py
@@ -21,4 +21,4 @@ def getEventInfo (aKey):
       athena> print e.event_ID().event_number()
     
     """
-    return PyK.retrieve(PyK.GNS.EventInfo,aKey)
+    return PyK.retrieve('xAOD::EventInfo',aKey)
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEvent/share/TruthParticle_test.txt b/PhysicsAnalysis/TruthParticleID/McParticleEvent/share/TruthParticle_test.txt
index 834e51e5c614832b3a4b131afa9cc6aa0d818298..7283c88f96472c5d3d59d668693f31434865b908 100644
--- a/PhysicsAnalysis/TruthParticleID/McParticleEvent/share/TruthParticle_test.txt
+++ b/PhysicsAnalysis/TruthParticleID/McParticleEvent/share/TruthParticle_test.txt
@@ -1,7 +1,7 @@
 // common job opts for SG unit tests
 
 #pragma print off
-ApplicationMgr.DLLs += { "StoreGate" };
+ApplicationMgr.Dlls += { "StoreGate" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", 
 			   "StoreGateSvc/DetectorStore", 
 			   "StoreGateSvc/HistoryStore" };
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx
index add3feeee5b1cccc7ce4b552d77d05962fd12e7c..77a2cbdb7380a8c9f010b000ceeb435243964433 100644
--- a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx
@@ -200,12 +200,10 @@ unsigned long RootTruthParticleCnvTool::refCount() const { abort(); }
 //               Implementation of the IProperty function(s)
 //
 
-StatusCode RootTruthParticleCnvTool::setProperty( const Property& ) { abort(); }
 StatusCode RootTruthParticleCnvTool::setProperty( const std::string& ) {
    abort(); }
-StatusCode RootTruthParticleCnvTool::setProperty( const std::string&,
-                                                  const std::string& ) {
-   abort(); }
+StatusCode RootTruthParticleCnvTool::setProperty( const std::string&, const Gaudi::Details::PropertyBase& ) { abort(); }
+StatusCode RootTruthParticleCnvTool::setPropertyRepr( const std::string&, const std::string& ){ abort(); }
 StatusCode RootTruthParticleCnvTool::getProperty( Property* ) const { abort(); }
 const Property&
 RootTruthParticleCnvTool::getProperty( const std::string& ) const{ abort(); }
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h
index 34c8595523ba1bdd23cbb824d3fa81943b177bc5..3573cbd1e416332bc5390b803940987431f87faf 100644
--- a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h
+++ b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h
@@ -8,6 +8,7 @@
 #define MCPARTICLEEVENTTPCNV_ROOTTRUTHPARTICLECNVTOOL_H
 
 #include "McParticleKernel/ITruthParticleCnvTool.h"
+#include "GaudiKernel/Property.h"
 
 class RootTruthParticleCnvTool
   : public ITruthParticleCnvTool
@@ -51,9 +52,10 @@ public:
 
   /// @name Function(s) inherited from IProperty
   /// @{
-  virtual StatusCode setProperty( const Property& p );
   virtual StatusCode setProperty( const std::string& s );
-  virtual StatusCode setProperty( const std::string& n, const std::string& v );
+  virtual StatusCode setProperty( const std::string& name, const Gaudi::Details::PropertyBase& p );
+  virtual StatusCode setPropertyRepr( const std::string& n, const std::string& r );
+
   virtual StatusCode getProperty( Property* p ) const;
   virtual const Property& getProperty( const std::string& name ) const;
   virtual StatusCode getProperty( const std::string& n, std::string& v ) const;
diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index 9d67d068bafef626e7133e9b982db97dbb777320..f40c389b87c2e27839f9cae0195ce4905aa5d6aa 100644
--- a/Projects/AnalysisBase/externals.txt
+++ b/Projects/AnalysisBase/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AnalysisBaseExternalsVersion = 2.0.71
+AnalysisBaseExternalsVersion = 2.0.72
diff --git a/Projects/AnalysisBase/version.txt b/Projects/AnalysisBase/version.txt
index a993ffd823693b4e7d1f68a8ffeced95f2e4e621..3c1b7f674146fd6e433fa11215110b1411c85eef 100644
--- a/Projects/AnalysisBase/version.txt
+++ b/Projects/AnalysisBase/version.txt
@@ -1 +1 @@
-22.0.16
+22.0.17
diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt
index 17c59acee12654235430b571b70e830349996fd2..3fb6232f033fdec47dd4af6ca5a4de1b0b736440 100644
--- a/Projects/AthDataQuality/externals.txt
+++ b/Projects/AthDataQuality/externals.txt
@@ -5,4 +5,4 @@
 # an "origin/" prefix before it. For tags however this is explicitly
 # forbidden.
 
-AtlasExternalsVersion = 2.0.71
+AtlasExternalsVersion = 2.0.72
diff --git a/Projects/AthDataQuality/version.txt b/Projects/AthDataQuality/version.txt
index a993ffd823693b4e7d1f68a8ffeced95f2e4e621..3c1b7f674146fd6e433fa11215110b1411c85eef 100644
--- a/Projects/AthDataQuality/version.txt
+++ b/Projects/AthDataQuality/version.txt
@@ -1 +1 @@
-22.0.16
+22.0.17
diff --git a/Projects/AthGeneration/build_externals.sh b/Projects/AthGeneration/build_externals.sh
index 26b6322843cfc0921664c4378e729ccb81c60eaf..04f619e34bc83cdbc7a08359cee8fe3c269719ee 100755
--- a/Projects/AthGeneration/build_externals.sh
+++ b/Projects/AthGeneration/build_externals.sh
@@ -24,7 +24,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=97 -DLCG_VERSION_POSTFIX="a_ATLAS_1")
+EXTRACMAKE=()
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt
index a02976e05e5cfbaec5d1b247293bdccf8cb7940a..f132bae02e50268d4db8afa1413149e0dc472d1d 100644
--- a/Projects/AthGeneration/externals.txt
+++ b/Projects/AthGeneration/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthGenerationExternalsVersion = 2.0.71
+AthGenerationExternalsVersion = 2.0.72
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v33r1.004
+GaudiVersion = v34r0.000
diff --git a/Projects/AthGeneration/version.txt b/Projects/AthGeneration/version.txt
index a993ffd823693b4e7d1f68a8ffeced95f2e4e621..3c1b7f674146fd6e433fa11215110b1411c85eef 100644
--- a/Projects/AthGeneration/version.txt
+++ b/Projects/AthGeneration/version.txt
@@ -1 +1 @@
-22.0.16
+22.0.17
diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh
index 640a10702acefce7155092f564fe5b385b74931d..0463ba13158ff7881e2acae50f4bdf4b27b2abd0 100755
--- a/Projects/AthSimulation/build_externals.sh
+++ b/Projects/AthSimulation/build_externals.sh
@@ -24,7 +24,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=97 -DLCG_VERSION_POSTFIX="a_ATLAS_1")
+EXTRACMAKE=()
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 8ffb68a00141f9cde0676922747302edd971da89..242f63bc4786e4b81e54ecad45da140d717eba6e 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthSimulationExternalsVersion = 2.0.71
+AthSimulationExternalsVersion = 2.0.72
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v33r1.004
+GaudiVersion = v34r0.000
diff --git a/Projects/AthSimulation/version.txt b/Projects/AthSimulation/version.txt
index a993ffd823693b4e7d1f68a8ffeced95f2e4e621..3c1b7f674146fd6e433fa11215110b1411c85eef 100644
--- a/Projects/AthSimulation/version.txt
+++ b/Projects/AthSimulation/version.txt
@@ -1 +1 @@
-22.0.16
+22.0.17
diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt
index 2403fa9c7198c93101b3db7cdadb3beebd949f4f..7ac8b2dc02659ceab4c24938ee81701c61f85ce1 100644
--- a/Projects/Athena/CMakeLists.txt
+++ b/Projects/Athena/CMakeLists.txt
@@ -31,9 +31,9 @@ if( LCG_NIGHTLY )
     set( TDAQ_VERSION "99-00-00" CACHE STRING
        "The version of tdaq to use for the build" )
 else()
-    set( TDAQ-COMMON_VERSION "04-01-01" CACHE STRING
+    set( TDAQ-COMMON_VERSION "04-01-00" CACHE STRING
        "The version of tdaq-common to use for the build" )
-    set( TDAQ_VERSION "09-01-01" CACHE STRING
+    set( TDAQ_VERSION "09-01-00" CACHE STRING
        "The version of tdaq to use for the build" )
 endif()
 
@@ -74,12 +74,6 @@ set( OpenBlasEnvironment_DIR "${CMAKE_SOURCE_DIR}/cmake"
 mark_as_advanced( OpenBlasEnvironment_DIR )
 find_package( OpenBlasEnvironment )
 
-# Set up the runtime environment for NumPy.
-set( NumPyEnvironment_DIR "${CMAKE_SOURCE_DIR}/cmake"
-   CACHE PATH "Directory holding NumPyEnvironmentConfig.cmake" )
-mark_as_advanced( NumPyEnvironment_DIR )
-find_package( NumPyEnvironment )
-
 # Set up where to find the AthenaPoolUtilitiesTest CMake code.
 set( AthenaPoolUtilitiesTest_DIR
    "${CMAKE_SOURCE_DIR}/../../Database/AthenaPOOL/AthenaPoolUtilities/cmake"
diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh
index 6929a21c2e76d3f37fdf1c657685513906213bae..95720fa9c0037ca4c6114b7fed107b626564c082 100755
--- a/Projects/Athena/build_externals.sh
+++ b/Projects/Athena/build_externals.sh
@@ -24,7 +24,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=97 -DLCG_VERSION_POSTFIX="a_ATLAS_1")
+EXTRACMAKE=()
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/Athena/cmake/NumPyEnvironmentConfig.cmake b/Projects/Athena/cmake/NumPyEnvironmentConfig.cmake
deleted file mode 100644
index 407af5d972f536b78c8aa8b9a0c5c60364fc19ed..0000000000000000000000000000000000000000
--- a/Projects/Athena/cmake/NumPyEnvironmentConfig.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-#
-# Module for setting up the runtime environment for numpy from an LCG release.
-#
-
-# Decide whether or not to pass "QUIET" to the subsequent find_package call(s).
-set( _quietFlag )
-if( NumPyEnvironment_FIND_QUIETLY )
-  set( _quietFlag QUIET )
-endif()
-
-# Find the lapack installation that's part of LCG. Note that this call finds the
-# CMake configuration included in the LAPACK installation, it does *not* use
-# CMake's FindLAPACK.cmake module.
-find_package( lapack ${_quietFlag} )
-
-# Extract the path of the library pointed to by the "lapack" imported library.
-if( lapack_FOUND )
-   get_target_property( _configs lapack IMPORTED_CONFIGURATIONS )
-   list( GET _configs 0 _config )
-   get_target_property( _libPath lapack IMPORTED_LOCATION_${_config} )
-   get_filename_component( NumPyEnvironment_LIBRARY_DIRS ${_libPath}
-      DIRECTORY )
-   unset( _configs )
-   unset( _config )
-   unset( _libPath )
-endif()
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index dc8b3c68f869d02aa151fb09d8a9f5c475342bf4..eb81e7685bde6621a4c4f9c512a91330fbb87bd6 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthenaExternalsVersion = 2.0.71
+AthenaExternalsVersion = 2.0.72
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v33r1.004
+GaudiVersion = v34r0.000
diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index 5530f3b9e71993f334456547ea88cabe95ab926a..d52c8479ca1c32edd2ccd6ca8b632f1cd328741f 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -43,7 +43,6 @@
 - PhysicsAnalysis/TauID/DiTauMassTools
 - PhysicsAnalysis/TopPhys/TopPhysUtils/.*
 - PhysicsAnalysis/TopPhys/xAOD/.*
-- PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools
 - Reconstruction/Jet/JetAnalysisTools/JetTileCorrection
 - Reconstruction/Jet/JetReclustering
 - Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching
diff --git a/Projects/Athena/version.txt b/Projects/Athena/version.txt
index a993ffd823693b4e7d1f68a8ffeced95f2e4e621..3c1b7f674146fd6e433fa11215110b1411c85eef 100644
--- a/Projects/Athena/version.txt
+++ b/Projects/Athena/version.txt
@@ -1 +1 @@
-22.0.16
+22.0.17
diff --git a/Projects/VP1Light/build_externals.sh b/Projects/VP1Light/build_externals.sh
index e2b5c3881f9051696fbea361d078a08523f140cc..4b83f43b313b6841ff8599a7418ea5a6a561824e 100755
--- a/Projects/VP1Light/build_externals.sh
+++ b/Projects/VP1Light/build_externals.sh
@@ -26,7 +26,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=97 -DLCG_VERSION_POSTFIX="a_ATLAS_1")
+EXTRACMAKE=()
 while getopts ":t:b:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/VP1Light/externals.txt b/Projects/VP1Light/externals.txt
index 46aef434d6acd1ff66610c74937d544cba4fe295..bb11012d898a61bb2e88decde4e714c1beb9b69d 100644
--- a/Projects/VP1Light/externals.txt
+++ b/Projects/VP1Light/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-VP1LightExternalsVersion = 2.0.71
+VP1LightExternalsVersion = 2.0.72
diff --git a/Projects/VP1Light/version.txt b/Projects/VP1Light/version.txt
index a993ffd823693b4e7d1f68a8ffeced95f2e4e621..3c1b7f674146fd6e433fa11215110b1411c85eef 100644
--- a/Projects/VP1Light/version.txt
+++ b/Projects/VP1Light/version.txt
@@ -1 +1 @@
-22.0.16
+22.0.17
diff --git a/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/HIEventShapeFillerTool.h b/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/HIEventShapeFillerTool.h
index 88167ae4fbe1eba330db4351cfd7099e3194778c..f3a139484ecc0f7ecd404917a2fd284ffdaa7d78 100644
--- a/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/HIEventShapeFillerTool.h
+++ b/Reconstruction/HeavyIonRec/HIGlobal/HIGlobal/HIEventShapeFillerTool.h
@@ -12,6 +12,7 @@
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "HIEventUtils/HIEventShapeIndex.h"
 #include "HIEventUtils/HITowerWeightTool.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 #include <NavFourMom/INavigable4MomentumCollection.h>
 
 #include "StoreGate/ReadHandleKey.h"
@@ -50,6 +51,8 @@ class HIEventShapeFillerTool : public asg::AsgTool, virtual public IHIEventShape
 
    ToolHandle<IHITowerWeightTool> m_towerWeightTool { this, "TowerWeightTool", "HITowerWeightTool", "Handle to Tower Weight Tool"};
 
+   ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
+
    Gaudi::Property< bool > m_useClusters { this, "UseClusters", false, "use Clusters boolean switch" }  ;
 
 };
diff --git a/Reconstruction/HeavyIonRec/HIGlobal/share/HIGlobal_jobOptions.py b/Reconstruction/HeavyIonRec/HIGlobal/share/HIGlobal_jobOptions.py
index e57b5f5e6de9fbbd65b9f7b7de66f9df92607a53..590dda514cf0c870879cd6e5e6c681d111ef4048 100755
--- a/Reconstruction/HeavyIonRec/HIGlobal/share/HIGlobal_jobOptions.py
+++ b/Reconstruction/HeavyIonRec/HIGlobal/share/HIGlobal_jobOptions.py
@@ -15,6 +15,12 @@ theAlg.ReadExistingKey=shape_key
 theAlg.OutputContainerKey=shape_key
 theAlg.HIEventShapeFillerTool=HIEventShapeFillerTool()
 theAlg.OrderOfFlowHarmonics=jobproperties.HIGlobalFlags.NumFlowHarmonics()
+
+#Import the map tool
+from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+theMapTool=HIEventShapeMapTool()
+theAlg.HIEventShapeFillerTool.EventShapeMapTool=theMapTool
+
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 topSequence += theAlg
diff --git a/Reconstruction/HeavyIonRec/HIGlobal/src/HIEventShapeFillerTool.cxx b/Reconstruction/HeavyIonRec/HIGlobal/src/HIEventShapeFillerTool.cxx
index afb7b5a186e819f4bdca8166c5a56686ca686fcb..18654d41dd864fbd21d32959448a204f3c8f275b 100644
--- a/Reconstruction/HeavyIonRec/HIGlobal/src/HIEventShapeFillerTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIGlobal/src/HIEventShapeFillerTool.cxx
@@ -7,7 +7,8 @@
 #include <CaloEvent/CaloCell.h>
 #include <CaloEvent/CaloCellContainer.h>
 #include <xAODHIEvent/HIEventShape.h>
-#include "HIEventUtils/HIEventShapeMap.h"
+#include "HIEventUtils/HIEventDefs.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 
 #include <iostream>
 #include <iomanip>
@@ -32,9 +33,7 @@ StatusCode HIEventShapeFillerTool::initializeCollection(xAOD::HIEventShapeContai
    //tool is initialized only once
    if(!m_index)
    {
-     HIEventShapeIndex index;
-     index.setBinning(HIEventShapeIndex::COMPACT);
-     m_index=HIEventShapeMap::getMap()->insert(getContainerName(),index);
+     m_index=m_eventShapeMapTool->getIndex( HI::BinningScheme::COMPACT );
    }
    //fix this to have proper name passing
    //use tool to initialize event shape object
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx
index 6c3e4f1a3bf7138ff47257786131de027c226c90..e292ac8b8a29c84231c01cb25bd7c9fc639679e1 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx
@@ -9,6 +9,7 @@
 #include "HIEventUtils/HIEventShapeIndex.h"
 #include "HIEventUtils/HIEventShapeSummaryUtils.h"
 #include "xAODCore/ShallowCopy.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
@@ -53,22 +54,18 @@ int HIEventShapeJetIteration::execute() const
   xAOD::HIEventShapeContainer* output_shape=nullptr;
   getShapes(input_shape,output_shape,true).ignore();
 
-  const HIEventShapeIndex* es_index = HIEventShapeMap::getIndex(m_inputEventShapeKey.key());
+  const HIEventShapeIndex* es_index = m_eventShapeMapTool->getIndexFromShape(input_shape);
   //New implementation after moving away from mutable
   ATH_MSG_INFO("HIEventShapeJetIteration: found index for  " << m_inputEventShapeKey.key());
-
   if(es_index==nullptr)
   {
-    ATH_MSG_INFO("No HIEventShapeIndex w/ name " << m_inputEventShapeKey.key() << " adding it to the map");
-    HIEventShapeIndex* h = new HIEventShapeIndex();
-    h->setBinning(input_shape);
-    es_index = HIEventShapeMap::insert( m_inputEventShapeKey.key(), *h );
+    ATH_MSG_FATAL("No HIEventShapeIndex w/ name " << m_inputEventShapeKey.key() << ". Shape not TOWER nor COMPACT");
   }
 
-  const HIEventShapeIndex* other_index = HIEventShapeMap::getIndex(m_outputEventShapeKey.key());
+  const HIEventShapeIndex* other_index = m_eventShapeMapTool->getIndexFromShape(output_shape);
   if(!other_index) {
-   HIEventShapeMap::getMap()->insert( m_outputEventShapeKey.key(), *es_index );
- }
+   ATH_MSG_FATAL("No HIEventShapeIndex w/ name " << m_outputEventShapeKey.key() << ". Shape not TOWER nor COMPACT");
+  }
   //End of new implementation
 
   const xAOD::JetContainer* theCaloJets=0;
@@ -190,12 +187,10 @@ void HIEventShapeJetIteration::updateShape(xAOD::HIEventShapeContainer* output_s
   {
     ATH_MSG_INFO("Problem, null pointer");
 
-    es_index=HIEventShapeMap::getIndex(m_inputEventShapeKey.key());
+    es_index=m_eventShapeMapTool->getIndexFromShape(output_shape);
     if(es_index==nullptr)
     {
-      HIEventShapeIndex* h=new HIEventShapeIndex();
-      h->setBinning(output_shape);
-      es_index=HIEventShapeMap::insert(m_inputEventShapeKey.key(),*h);
+      ATH_MSG_FATAL("Can't find correspondent index for map " << m_inputEventShapeKey.key() << " in the HIEventShapeMapTool");
     }
   }
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.h
index bc8902b6c6f49671ab6a05b9a2ed863e0d65fd8e..58de33a38f4c7c089f5765aebf298a529ceb879c 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.h
@@ -15,6 +15,7 @@
 #include "xAODCaloEvent/CaloCluster.h"
 #include "HIJetRec/IHISubtractorTool.h"
 #include "HIJetRec/IHIUEModulatorTool.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
@@ -46,9 +47,9 @@ public:
 
 private:
 
-
   ToolHandle<IHISubtractorTool> m_subtractorTool { this, "Subtractor", "HIJetClusterSubtractorTool", "Handle to HIJetClusterSubtractorTool" };
   ToolHandle<IHIUEModulatorTool> m_modulatorTool { this, "Modulator" , "HIUEModulatorTool", "Handle to HIUEModulatorTool" };
+  ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
 
   /// \brief Name of input HIEventShapeContainer
   SG::ReadHandleKey<xAOD::HIEventShapeContainer> m_inputEventShapeKey { this, "InputEventShapeKey", "HIEventShape", "HIEventShape"};
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx
index 98c4cf47c57a545a031b403b5de79cc3392e015b..4e85127f5b8bced8d96353b34c05ed69e69c90dc 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx
@@ -50,7 +50,7 @@ StatusCode HIJetConstituentSubtractionTool::modify(xAOD::JetContainer& jets) con
       return StatusCode::FAILURE;
     }
     shape = readHandleEvtShape.get();
-    es_index=HIEventShapeMap::getIndex(m_eventShapeKey.key());
+    es_index=m_eventShapeMapTool->getIndexFromShape(shape); 
     if(es_index==nullptr)
     {
       ATH_MSG_INFO("No HIEventShapeIndex w/ name " << m_eventShapeKey.key() << " adding it to the map");
@@ -88,7 +88,7 @@ StatusCode HIJetConstituentSubtractionTool::modify(xAOD::JetContainer& jets) con
       if( msgLvl(MSG::DEBUG) )
       {
       	const xAOD::CaloCluster* cl=static_cast<const xAOD::CaloCluster*>(itr->rawConstituent());
-        //here we can still keep cl->p4 because it's taking the unsubtracted state - moreover is debug 
+        //here we can still keep cl->p4 because it's taking the unsubtracted state - moreover is debug
       	p4_unsubtr+=cl->p4(HIJetRec::unsubtractedClusterState());
       }
     }
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
index 30699de280eae07e8df4b351c698860e20c2ca5f..c741f7a37bc801a509fe340d7fdea172a5f6b5db 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
@@ -32,6 +32,7 @@
 #include "HIJetRec/IHISubtractorTool.h"
 #include "HIJetRec/IHIUEModulatorTool.h"
 #include "AsgTools/ToolHandle.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
@@ -79,6 +80,7 @@ private:
   /// subtracted kinematics for each constituent
   ToolHandle<IHISubtractorTool> m_subtractorTool { this, "Subtractor", "HIJetClusterSubtractorTool", "" };
   ToolHandle<IHIUEModulatorTool> m_modulatorTool { this, "Modulator" , "HIUEModulatorTool ", "" };
+  ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
 
   Gaudi::Property< bool > m_originCorrection { this, "ApplyOriginCorrection", false, "Apply Origin Correction boolean switch"};
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
index 34e27ed98defa999a68ab00bf26fc6f4e3b63ff1..d2c57793ad4637e640dadf86354dab0962978f9d 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
@@ -126,6 +126,11 @@ def MakeSubtractionTool(shapeKey, moment_name='', momentOnly=False, **kwargs) :
     if 'modulator' in kwargs.keys() : mod_tool=kwargs['modulator']
     else : mod_tool=GetNullModulator()
 
+    if 'map_tool' in kwargs.keys() : map_tool=kwargs['map_tool']
+    else :
+        from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+        map_tool=HIEventShapeMapTool()
+
     subtr=HIJetConstituentSubtractionTool("HICS_"+suffix)
     subtr.EventShapeKey=shapeKey
     subtr.Modulator=mod_tool
@@ -133,6 +138,8 @@ def MakeSubtractionTool(shapeKey, moment_name='', momentOnly=False, **kwargs) :
     subtr.SetMomentOnly=momentOnly
     subtr.ApplyOriginCorrection=HIJetFlags.ApplyOriginCorrection()
     subtr.Subtractor=GetSubtractorTool(**kwargs)
+    subtr.EventShapeMapTool=map_tool
+
     jtm.add(subtr)
     return subtr
 
@@ -151,6 +158,11 @@ def ApplySubtractionToClusters(**kwargs) :
     if 'modulator' in kwargs.keys() : mod_tool=kwargs['modulator']
     else : mod_tool=GetNullModulator()
 
+    if 'map_tool' in kwargs.keys() : map_tool=kwargs['map_tool']
+    else :
+        from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+        map_tool=HIEventShapeMapTool()
+
     if 'update_only' in kwargs.keys() : update_only = kwargs['update_only']
     else : update_only = False
 
@@ -173,6 +185,7 @@ def ApplySubtractionToClusters(**kwargs) :
     theAlg.UpdateOnly=update_only
     theAlg.SetMoments=do_cluster_moments
     theAlg.ApplyOriginCorrection=apply_origin_correction
+    theAlg.EventShapeMapTool=map_tool
 
     if do_cluster_moments :
         CaloClusterMomentsMaker=CompFactory.CaloClusterMomentsMaker
@@ -254,6 +267,11 @@ def AddIteration(seed_container,shape_name, **kwargs) :
             #mod_shape_name=BuildHarmonicName(out_shape_name,**kwargs)
             mod_tool=MakeModulatorTool(mod_shape_key,**kwargs)
 
+    if 'map_tool' in kwargs.keys() : map_tool=kwargs['map_tool']
+    else :
+        from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+        map_tool=HIEventShapeMapTool()
+
     assoc_name=jtm.HIJetDRAssociation.AssociationName
     HIEventShapeJetIteration=CompFactory.HIEventShapeJetIteration
     iter_tool=HIEventShapeJetIteration('HIJetIteration_%s' % out_shape_name )
@@ -268,6 +286,7 @@ def AddIteration(seed_container,shape_name, **kwargs) :
     iter_tool.Modulator=mod_tool
     iter_tool.ShallowCopy=False
     iter_tool.ModulationEventShapeKey=mod_shape_key
+    iter_tool.EventShapeMapTool=map_tool
 
     if 'track_jet_seeds' in kwargs.keys() :
         iter_tool.TrackJetSeedContainerKey=kwargs['track_jet_seeds']
@@ -305,7 +324,7 @@ def JetAlgFromTools(rtools, suffix="HI",persistify=True) :
     # Add the PseudoJetAlgorithm
     # To avoid massive refactoring and to preserve familiarity,
     # jet guys kept calling things "getters", but these are already
-    # PseudoJetAlgorithms as they eliminated the wrappers 
+    # PseudoJetAlgorithms as they eliminated the wrappers
     for getter in jtm.allGetters:
         print ('Adding PseudoJetAlgorithm %s' % getter.name)
         print ('Input Container %s' % getter.InputContainer)
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py b/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py
index bf2e2d09812ee3d1aaf9d74681c6bb2a484ab378..f63c2cb67cb9812fbd916e0d20afe070fe4473a1 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py
@@ -26,19 +26,22 @@ class SubtractedCellGetter ( Configured )  :
 
         from AthenaCommon.AppMgr import ToolSvc
         ToolSvc += cellCopyTool
-        
+
         from HIJetRec.HIJetRecConf import HISubtractedCellMakerTool
         cellSubtrTool=HISubtractedCellMakerTool()
         from HIJetRec.HIJetRecFlags import HIJetFlags
         cellSubtrTool.EventShapeKey=HIJetFlags.IteratedEventShapeKey()
         from HIJetRec.HIJetRecTools import jtm
         cellSubtrTool.Modulator=jtm.modulator
+        from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+        theMapTool=HIEventShapeMapTool()
+        cellSubtrTool.EventShapeMapTool=theMapTool
         ToolSvc += cellSubtrTool
-        
+
         from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
         cellFinalizerTool = CaloCellContainerFinalizerTool("HICaloCellFinalizerTool")
         ToolSvc += cellFinalizerTool
-        
+
         cellMaker.CaloCellMakerToolNames = [cellCopyTool,cellSubtrTool,cellFinalizerTool]
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
@@ -48,9 +51,6 @@ class SubtractedCellGetter ( Configured )  :
 
     def outputKey(self):
         return self._output[self._outputType]
-    
+
     def outputType(self):
         return self._outputType
- 
-
-
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py b/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
index 1121181189174f2b11c8333d506a3b8ff88844a4..6b3eceb986b555e628ea75c62dd81db92ce6e2e3 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
@@ -58,12 +58,17 @@ if is_mc_or_overlay :
         theCalibTool.CalibSequence='EtaJES'
         theCalibTool.lock()
 
+#Import the map tool - it will have to harvest configuration along the path
+from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+theMapTool=HIEventShapeMapTool()
+
 if not HIJetFlags.DoCellBasedSubtraction():
     #Make new event shape at tower level
     from HIGlobal.HIGlobalConf import HIEventShapeMaker
     from HIGlobal.HIGlobalConf import HIEventShapeFillerTool
     #EventShapeKey set to point to weighted container, can remove code on L16
     EventShapeKey=jobproperties.HIGlobalFlags.EventShapeKey()+'Weighted'
+
     ESAlg_W=HIEventShapeMaker("ESAlg_W")
     ESAlg_W.OutputContainerKey=EventShapeKey
     ESAlg_W.UseCaloCell=False
@@ -90,6 +95,7 @@ if not HIJetFlags.DoCellBasedSubtraction():
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += HITowerWeightTool()
     ESFiller.TowerWeightTool=TWTool
+    ESFiller.EventShapeMapTool=theMapTool
 
     #Add to top sequence
     ESAlg_W.HIEventShapeFillerTool=ESFiller
@@ -138,9 +144,9 @@ seeds0=jtm.addJetCopier("%s_%s0" % (seed_prefix, HIJetFlags.SeedSuffix()),"%s_Un
 jtm.HIJetRecs+=[seeds0]
 
 #code nearly identical, but new behavior since upstream ES container and package flags are different
-iter0=AddIteration(seed_container=seeds0.OutputContainer,shape_name=EventShapeKey,suffix="iter0")
+iter0=AddIteration(seed_container=seeds0.OutputContainer,shape_name=EventShapeKey,map_tool=theMapTool, suffix="iter0")
 modulator0=iter0.Modulator
-subtr1=MakeSubtractionTool(iter0.OutputEventShapeKey,modulator=modulator0)
+subtr1=MakeSubtractionTool(iter0.OutputEventShapeKey,modulator=modulator0,map_tool=theMapTool)
 
 #now iterate
 print("Now moving to iteration 1")
@@ -150,16 +156,16 @@ jtm.HIJetRecs+=[seeds1]
 iteration_dict=dict(suffix="iter1")
 if jetFlags.useTracks() and HIJetFlags.TrackJetSeeds() : iteration_dict['track_jet_seeds']=HIJetFlags.TrackJetContainerName()
 print("Adding iteration 1")
-iter1=AddIteration(seed_container=seeds1.OutputContainer,shape_name=EventShapeKey,**iteration_dict)
+iter1=AddIteration(seed_container=seeds1.OutputContainer,shape_name=EventShapeKey,map_tool=theMapTool, **iteration_dict)
 
 HIJetFlags.IteratedEventShapeKey=iter1.OutputEventShapeKey
 modulator1=iter1.Modulator
 jtm.modulator=modulator1
 
 #subtraction BEFORE iteration for moment
-subtr1=MakeSubtractionTool(iter0.OutputEventShapeKey,moment_name="NoIteration",momentOnly=True,modulator=modulator0)
+subtr1=MakeSubtractionTool(iter0.OutputEventShapeKey,moment_name="NoIteration",momentOnly=True,modulator=modulator0,map_tool=theMapTool)
 #main subtractor
-subtr2=MakeSubtractionTool(HIJetFlags.IteratedEventShapeKey(),modulator=modulator1)
+subtr2=MakeSubtractionTool(HIJetFlags.IteratedEventShapeKey(),modulator=modulator1,map_tool=theMapTool)
 
 #==========#==========#==========#==========#==========#==========
 #special addition for egamma
@@ -168,16 +174,16 @@ subtr2=MakeSubtractionTool(HIJetFlags.IteratedEventShapeKey(),modulator=modulato
 #The fix is to define one more container from the seeds above just as in original reconstruction
 if not HIJetFlags.DoCellBasedSubtraction():
     iteration_dict=dict(suffix="iter_egamma")
-    iter_egamma=AddIteration(seed_container=seeds1.OutputContainer,shape_name=jobproperties.HIGlobalFlags.EventShapeKey(),useClusters=False,**iteration_dict)
+    iter_egamma=AddIteration(seed_container=seeds1.OutputContainer,shape_name=jobproperties.HIGlobalFlags.EventShapeKey(), map_tool=theMapTool, useClusters=False,**iteration_dict)
     cell_level_shape_key=iter_egamma.OutputEventShapeKey
     #HIJetFlags.IteratedEventShapeKey=iter_egamma.OutputEventShapeKey
 
 cluster_key_eGamma_deep=ClusterKey+"_eGamma_deep"
 cluster_key_final_deep=cluster_key_eGamma_deep+"_Cluster_deep"
 #Subtraction for egamma and to get layers - here no origin correction yet (done in the next stage)
-ApplySubtractionToClusters(name="HIClusterSubtraction_egamma", event_shape_key=cell_level_shape_key, cluster_key=ClusterKey, output_cluster_key=cluster_key_eGamma_deep, modulator=modulator1, CalculateMoments=True, useClusters=False, apply_origin_correction=False)
+ApplySubtractionToClusters(name="HIClusterSubtraction_egamma", event_shape_key=cell_level_shape_key, cluster_key=ClusterKey, output_cluster_key=cluster_key_eGamma_deep, modulator=modulator1, map_tool=theMapTool, CalculateMoments=True, useClusters=False, apply_origin_correction=False)
 #Cluster subtraction for jets
-ApplySubtractionToClusters(event_shape_key=HIJetFlags.IteratedEventShapeKey(), cluster_key=cluster_key_eGamma_deep, output_cluster_key=cluster_key_final_deep, modulator=modulator1, CalculateMoments=False, useClusters=True, apply_origin_correction=HIJetFlags.ApplyOriginCorrection())
+ApplySubtractionToClusters(event_shape_key=HIJetFlags.IteratedEventShapeKey(), cluster_key=cluster_key_eGamma_deep, output_cluster_key=cluster_key_final_deep, modulator=modulator1, map_tool=theMapTool, CalculateMoments=False, useClusters=True, apply_origin_correction=HIJetFlags.ApplyOriginCorrection())
 
 #put subtraction tool at the FRONT of the jet modifiers list
 hi_tools=[subtr1,subtr2]
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
index ec43691107e963510431a78c3761b3f410ccc212..11aba955adaa95e69705e7b978a44846cb3a6bfd 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.cxx
@@ -12,6 +12,7 @@
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/VertexContainer.h"
 #include "xAODCaloEvent/CaloClusterAuxContainer.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/WriteHandle.h"
@@ -85,7 +86,8 @@ int HIClusterSubtraction::execute() const
 	const xAOD::HIEventShapeContainer* shape = 0;
 	SG::ReadHandle<xAOD::HIEventShapeContainer>  readHandleEvtShape ( m_eventShapeKey );
   shape = readHandleEvtShape.cptr();
-  const HIEventShapeIndex* es_index = HIEventShapeMap::getIndex( m_eventShapeKey.key() );
+  const HIEventShapeIndex* es_index = m_eventShapeMapTool->getIndexFromShape( shape );
+	if(es_index == nullptr) ATH_MSG_FATAL("The HIEventShapeMapTool returned a null pointer. Binning scheme not coherent");
   const xAOD::HIEventShape* eshape = nullptr;
   CHECK(m_modulatorTool->getShape(eshape), 1);
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
index 7a665337dde5d8b198fee677b3e86381175642fe..d73a7dff18601fc93737fef358abd42864992cbe 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HIClusterSubtraction.h
@@ -28,6 +28,7 @@
 #include <HIJetRec/IHIUEModulatorTool.h>
 #include "CaloRec/CaloClusterCollectionProcessor.h"
 #include "xAODTracking/VertexContainer.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
@@ -62,7 +63,8 @@ private:
 	// Tool handles
   ToolHandle<IHISubtractorTool> m_subtractorTool { this, "Subtractor", "HIJetSubtractorToolBase", "Handle to IHISubtractorTool which does calculates subtracted kinematics" };
   ToolHandle<IHIUEModulatorTool> m_modulatorTool { this, "Modulator" , "HIUEModulatorTool" , "Handle to IHIModulatorTool" };
-  ToolHandleArray<CaloClusterCollectionProcessor> m_clusterCorrectionTools { this, "ClusterCorrectionTools", {}, "" };
+	ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
+	ToolHandleArray<CaloClusterCollectionProcessor> m_clusterCorrectionTools { this, "ClusterCorrectionTools", {}, "" };
 
 	// Booleans
 	Gaudi::Property< bool > m_setMoments { this, "SetMoments", true, "Set Moments boolean switch"};
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.cxx
index d80316b06030c42a113ebc4173bda48b475a8569..6248d6a395dd0e12a5a99192fe4c39540b451a67 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.cxx
@@ -43,7 +43,7 @@ StatusCode HISubtractedCellMakerTool::process (CaloCellContainer* theCells,
   SG::ReadHandle<xAOD::HIEventShapeContainer>  readHandleEvtShape ( m_eventShapeKey , ctx);
   shape = readHandleEvtShape.cptr();
 
-  const HIEventShapeIndex* index=HIEventShapeMap::getIndex(m_eventShapeKey.key());
+  const HIEventShapeIndex* index=m_eventShapeMapTool->getIndexFromShape( shape );
   if(index==nullptr)
   {
     ATH_MSG_ERROR("Could not retrieve HIEventShapeIndex for key " << m_eventShapeKey.key());
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.h b/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.h
index cfd255c9eba6b466b6ada2e2407ca9ff47fc5e89..15c0150079b95e17aa87afff33ccf04565a11cf7 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/HISubtractedCellMakerTool.h
@@ -8,6 +8,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "CaloInterface/ICaloCellMakerTool.h"
 #include "HIJetRec/IHIUEModulatorTool.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 #include "xAODHIEvent/HIEventShapeContainer.h"
 #include "AsgTools/ToolHandle.h"
 
@@ -30,6 +31,7 @@ private:
 
   SG::ReadHandleKey<xAOD::HIEventShapeContainer>  m_eventShapeKey     { this, "EventShapeKey", "HIEventShapeContainer", "Event Shape Key"};
   ToolHandle<IHIUEModulatorTool> m_modulatorTool { this, "Modulator", "HIUEModulatorTool", "Handle to HIUEModulatorTool"};
+  ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
 
 };
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx b/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx
index d5179ceab2dc78ba8ce5c378807122279dfe1449..191de1534b805b4386e20c964ca9f938f5268ad2 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx
@@ -31,4 +31,3 @@ DECLARE_COMPONENT( HIJetMaxOverMeanTool )
 DECLARE_COMPONENT( HIJetDiscriminatorTool )
 DECLARE_COMPONENT( HIJetSignificanceTool )
 DECLARE_COMPONENT( HIUEModulatorTool )
-
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetIsolationTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetIsolationTool.h
index 3d6cd25d95c78a7b5a7aba6a405c6423814afee2..d7d8e4ee89bfcfbec362bd09671c9f225d92951b 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetIsolationTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetIsolationTool.h
@@ -138,14 +138,14 @@ public:
   JetIsolationTool(const std::string &myname);
 
   /// Dtor.
-  ~JetIsolationTool(); 
+  virtual ~JetIsolationTool(); 
 
   // Athena algtool Hooks
   virtual StatusCode  initialize() override;
-  StatusCode  finalize();
+  virtual StatusCode  finalize() override;
 
   // Jet Modifier methods.
-  StatusCode decorate(const xAOD::JetContainer& jets) const override;
+  virtual StatusCode decorate(const xAOD::JetContainer& jets) const override;
 
 private: 
   Gaudi::Property<std::vector<std::string>> m_isolationCodes{this, "IsolationCalculations", {}, "Isolation calculation data vector"};
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtToolBDT.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtToolBDT.cxx
index d56444edd38b1940c4b279a78f22a9315b0414c7..93c8b154af6c918e0cd2cf93b871d288e3be0161 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtToolBDT.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtToolBDT.cxx
@@ -40,7 +40,7 @@ StatusCode JetForwardJvtToolBDT::initialize()
     
   if(m_isAna){
     // -- Retrieve MVfJVT WP configFile ONLY if tool used in 'Analysis mode'
-    std::string filename = PathResolverFindCalibFile(m_configDir+m_wpFile);
+    std::string filename = PathResolverFindCalibFile(std::string(m_configDir)+m_wpFile);
     if (filename.empty()){
       ATH_MSG_ERROR ( "Could NOT resolve file name " << m_wpFile);
       return StatusCode::FAILURE;
diff --git a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
index 5321f6cb976b5176142535ddb9e6c0b9cd567f2e..ae1731a421d15c54e0de87cdf54529baaadb2062 100644
--- a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
+++ b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
@@ -8,7 +8,6 @@
 #define JETMONITORING_JETVARIABLE_H
 #include <vector>
 
-
 #include "xAODJet/Jet.h"
 
 ///////////////////////////////////////////////////////////
@@ -90,7 +89,10 @@ namespace JetVar {
   template<typename T>
   struct VariableAtt : public Variable {
     VariableAtt(const std::string & name) : Variable(name), m_acc(name) {}
-    virtual float value(const xAOD::Jet & j) const { return m_acc(j)*m_scale;}
+    virtual float value(const xAOD::Jet & j) const { 
+      if ( m_acc.isAvailable( j ) ) return m_acc(j)*m_scale;
+      else return -999.;
+    }
     Accessor<T> m_acc;    
   };
 
@@ -120,11 +122,21 @@ namespace JetVar {
     virtual bool isVector() const {return m_index==-1;}
 
     // use only if the index is valid
-    virtual float value(const xAOD::Jet & j) const { return m_acc(j)[m_index]*m_scale;}
+    virtual float value(const xAOD::Jet & j) const {
+      if ( m_acc.isAvailable( j ) ) return m_acc(j)[m_index]*m_scale;
+      else return -999.;
+    }
 
     virtual VectorValue vector(const xAOD::Jet &j) const {
-      VectorValue v( new VectorWrapperT(&m_acc(j)) , m_scale ) ;
-      return v;
+      if ( m_acc.isAvailable( j ) ) {
+        VectorValue v( new VectorWrapperT(&m_acc(j)) , m_scale ) ;
+        return v;
+      }
+      else {
+        vect_t dummy(1,-999.);
+        VectorValue junk( new VectorWrapperT(&dummy), m_scale );
+        return junk;
+      }
     }
 
 
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py
index 6a8d9200a3048abb869f782dd6ef6be3a0f13ac1..c04cef28d225b778b017dd8bcc6071acdd4a9a59 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py
@@ -63,11 +63,6 @@ commonHistoSpecs = [
                 ] ),
 
 
-    SelectSpec( 'highJVF',
-                '0.3<JVF[0]', # JVF is a vector<float> for each jets. Here we cut on the 0th entry of this vector
-                FillerTools = [
-                    "pt",
-                ] ),
     # Selecting jets passing the LooseBad selection from the JetCleaningTool.
     SelectSpec( 'LooseBadJets',
                 'LooseBad', # this is not in the form 'min<x<max', so it will be assumed 'LooseBad' is an entry existing in JetStandardHistoSpecs.knownSelector
@@ -77,6 +72,15 @@ commonHistoSpecs = [
 
     ]
 
+# Separate these out because they cannot run in cosmics
+jvfHistosSpec = [
+    SelectSpec( 'highJVF',
+                '0.3<JVF[0]', # JVF is a vector<float> for each jets. Here we cut on the 0th entry of this vector
+                FillerTools = [
+                    "pt",
+                ] ),
+]
+
 
 topoHistosSpec = [
     # histos common to all topo jets
@@ -90,7 +94,7 @@ pflowHistosSpec = [
 
 
 
-def jetMonAlgConfig(  jetName, truthJetName='', trigger=''):
+def jetMonAlgConfig(  jetName, inputFlags, truthJetName='', trigger=''):
     """returns a specification of a JetMonitoringAlg (in the form of a JetMonAlgSpec dictionnary).
     """
     
@@ -107,6 +111,9 @@ def jetMonAlgConfig(  jetName, truthJetName='', trigger=''):
     # then add pre-defined lists as defined above :
     histoSpecs += commonHistoSpecs 
 
+    if inputFlags.DQ.DataType != 'cosmics':
+        histoSpecs += jvfHistosSpec
+
     if 'Topo' in jetName:
         histoSpecs += topoHistosSpec
     if 'PFlow' in jetName:
@@ -145,9 +152,9 @@ def standardJetMonitoring(inputFlags):
     # create a list of JetMonitoringAlg specifications
     jetAlgConfs = [
         # use the helper function defined above :
-        jetMonAlgConfig( "AntiKt4LCTopoJets", ),
+        jetMonAlgConfig( "AntiKt4LCTopoJets", inputFlags),
         #jetMonAlgConfig( "AntiKt4LCTopoJets", truthJetName="AntiKt4TruthJets"),     #How can we make sure truth jets are available ??
-        jetMonAlgConfig( "AntiKt4EMPFlowJets"),
+        jetMonAlgConfig( "AntiKt4EMPFlowJets", inputFlags),
         ]
     
     # schedule each JetMonitoringAlg by invoking the toAlg() methods of the config specification
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py b/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
index df219a76df1ecdefd6168a579d4be16dcadc370c..9f9702635b916a266b8c9f1e394de13848b8b19f 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
@@ -191,11 +191,26 @@ _knownHistos = [
     HistoSpec('ShowerDeconstructionW', (100, -100, 100), title='ShowerDeconstructionW;ShowerDeconstructionW;', ),
     HistoSpec('ShowerDeconstructionTop', (100, -100, 100), title='ShowerDeconstructionTop;ShowerDeconstructionTop;', ),
 
-    
-
 
+    HistoSpec( 'JetConstitScaleMomentum_eta',  (50,-5,5) , title='ConstitScale #eta;ConstitScale #eta;Entries'),
+    HistoSpec( 'JetConstitScaleMomentum_phi',  (50,-3.3,3.3) , title='ConstitScale #phi;ConstitScale #phi;Entries'),
+    HistoSpec( 'JetConstitScaleMomentum_pt:GeV',  (100,0,200) , title='ConstitScale p_{T};ConstitScale p_{T} [GeV];Entries'),    
+    HistoSpec( 'JetConstitScaleMomentum_m:GeV',  (100,0,300) , title='ConstitScale mass;ConstitScale mass [GeV];Entries'),
     
-
+    HistoSpec( 'JetEMScaleMomentum_eta',  (50,-5,5) , title='EMScale #eta;EMScale #eta;Entries'),
+    HistoSpec( 'JetEMScaleMomentum_phi',  (50,-3.3,3.3) , title='EMScale #phi;EMScale #phi;Entries'),
+    HistoSpec( 'JetEMScaleMomentum_pt:GeV',  (100,0,200) , title='EMScale p_{T};EMScale p_{T} [GeV];Entries'),    
+    HistoSpec( 'JetEMScaleMomentum_m:GeV',  (100,0,300) , title='EMScale mass;EMScale mass [GeV];Entries'),
+
+    HistoSpec( 'JetPileupScaleMomentum_eta',  (50,-5,5) , title='PileupScale #eta;PileupScale #eta;Entries'),
+    HistoSpec( 'JetPileupScaleMomentum_phi',  (50,-3.3,3.3) , title='PileupScale #phi;PileupScale #phi;Entries'),
+    HistoSpec( 'JetPileupScaleMomentum_pt:GeV',  (100,0,200) , title='PileupScale p_{T};PileupScale p_{T} [GeV];Entries'),    
+    HistoSpec( 'JetPileupScaleMomentum_m:GeV',  (100,0,300) , title='PileupScale mass;PileupScale mass [GeV];Entries'),
+
+    HistoSpec( 'JetEtaJESScaleMomentum_eta',  (50,-5,5) , title='EtaJESScale #eta;EtaJESScale #eta;Entries'),
+    HistoSpec( 'JetEtaJESScaleMomentum_phi',  (50,-3.3,3.3) , title='EtaJESScale #phi;EtaJESScale #phi;Entries'),
+    HistoSpec( 'JetEtaJESScaleMomentum_pt:GeV',  (100,0,200) , title='EtaJESScale p_{T};EtaJESScale p_{T} [GeV];Entries'),    
+    HistoSpec( 'JetEtaJESScaleMomentum_m:GeV',  (100,0,300) , title='EtaJESScale mass;EtaJESScale mass [GeV];Entries'),
     # ---------------------
     # 2D histogram (x and y vars are separated by ';' )
     HistoSpec( 'pt:GeV;m:GeV',  (100,0,1000, 100,0,300) , title='mass vs p_{T};p_{T};mass [GeV];'),
diff --git a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
index ce43bab58ff32e746b39ce67e2fd55604979cc4b..a3625a451b028f1cbbf47228c36881b9bea15dce 100644
--- a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
+++ b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
@@ -51,7 +51,7 @@ ConstModConfigs = {
     "SK":     {}
 }
 
-def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssoc",vtxKey="PrimaryVertices"):
+def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssoc",vtxKey="PrimaryVertices",monTool=None):
     inputtype = constit.basetype
 
     # Need to extend to TCC
@@ -114,7 +114,8 @@ def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssoc",vtxKey="Primary
         InputType=inputtype,
         OutputContainer = outputcontainer,
         InputContainer= inputcontainer,
-        Modifiers = modlist
+        Modifiers = modlist,
+        MonTool = monTool
     )
 
     constitmodalg = CompFactory.JetAlgorithm("jetalg_{0}".format(modseq.getName()))
diff --git a/Reconstruction/Jet/JetRecTools/CMakeLists.txt b/Reconstruction/Jet/JetRecTools/CMakeLists.txt
index 24e1acefa906702fbf2f8fd2f6c7db616fbea63f..b9796f9ea39307b5db1df7f526c7fbc6609e3c69 100644
--- a/Reconstruction/Jet/JetRecTools/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRecTools/CMakeLists.txt
@@ -7,6 +7,12 @@ atlas_subdir( JetRecTools )
 find_package( FastJet )
 find_package( FastJetContrib COMPONENTS SoftKiller ConstituentSubtractor )
 
+set( mon_lib )
+if( NOT GENERATIONBASE )
+   set( mon_deps Control/AthenaMonitoringKernel )
+   set( mon_lib AthenaMonitoringKernelLib )
+endif()
+
 # Component(s) in the package.
 atlas_add_library( JetRecToolsLib
    JetRecTools/*.h Root/*.cxx
@@ -16,13 +22,13 @@ atlas_add_library( JetRecToolsLib
    LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AsgTools xAODPFlow
    xAODTracking xAODCore xAODBase xAODCaloEvent xAODEgamma xAODJet
    TrackVertexAssociationToolLib JetEDM JetInterface JetRecLib
-   InDetTrackSelectionToolLib PFlowUtilsLib
+   InDetTrackSelectionToolLib PFlowUtilsLib AthenaMonitoringKernelLib
    PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} xAODTruth )
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( JetRecTools
       src/components/*.cxx
-      LINK_LIBRARIES JetRecToolsLib )
+      LINK_LIBRARIES JetRecToolsLib AthenaMonitoringKernelLib)
 endif()
 
 # Install files from the package.
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h b/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h
index ae65b61714af794624109cf1f618c9f037d22f75..d9bd8670609ee82fee74c491e2e32bdf36d602b0 100644
--- a/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h
@@ -26,6 +26,7 @@
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODPFlow/PFOContainer.h"
 
+#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
 
 class JetConstituentModSequence: public asg::AsgTool, virtual public IJetExecuteTool {
   // Changed from IJetExecute
@@ -53,6 +54,8 @@ protected:
   
   ToolHandleArray<IJetConstituentModifier> m_modifiers;
 
+  ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
+
   bool m_saveAsShallow = true;
 
   // note: not all keys will be used for a particular instantiation
diff --git a/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx b/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx
index 751d6410a4a43774d97804a9585784313f70e4a1..8368124a12e6074f67b09629e109b51b0d9b2f79 100644
--- a/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx
+++ b/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx
@@ -20,6 +20,7 @@
 #include "xAODPFlow/TrackCaloCluster.h"
 #include "xAODPFlow/TrackCaloClusterContainer.h"
 #include "xAODPFlow/TrackCaloClusterAuxContainer.h"
+#include "AthenaMonitoringKernel/Monitored.h"
 
 JetConstituentModSequence::JetConstituentModSequence(const std::string &name):
   asg::AsgTool(name),
@@ -44,6 +45,8 @@ StatusCode JetConstituentModSequence::initialize() {
 
   ATH_CHECK( m_modifiers.retrieve() );
 
+  ATH_CHECK( m_monTool.retrieve( DisableTool{m_monTool.empty()} ) );
+  
   // Set and initialise DataHandleKeys only for the correct input type
   // Die if the input type is unsupported
   switch(m_inputType) {
@@ -90,6 +93,12 @@ StatusCode JetConstituentModSequence::initialize() {
   
 int JetConstituentModSequence::execute() const {
 
+  // Define monitored quantities							
+  auto t_exec     = Monitored::Timer<std::chrono::milliseconds>( "TIME_execute"  );	
+  auto t_subtract = Monitored::Timer<std::chrono::milliseconds>( "TIME_subtract" );	
+  // Explicitly start/stop the timer around the subtraction tool calls			
+  t_subtract.start();
+
   // Create the shallow copy according to the input type
   switch(m_inputType){
 
@@ -128,7 +137,12 @@ int JetConstituentModSequence::execute() const {
   }
     
   }
-  
+
+  //Explicitly start/stop the timer around the subtraction tool calls
+  t_subtract.stop();
+
+  auto mon = Monitored::Group(m_monTool, t_exec, t_subtract);
+
   return 0;
 }
 
diff --git a/Reconstruction/Jet/JetRecTools/python/OnlineMon.py b/Reconstruction/Jet/JetRecTools/python/OnlineMon.py
new file mode 100644
index 0000000000000000000000000000000000000000..2a4ee3d95e16903e7a330d4edb958ed6bf274371
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/python/OnlineMon.py
@@ -0,0 +1,12 @@
+def getMonTool_Algorithm(path):
+    from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
+    monTool = GenericMonitoringTool('MonTool')
+
+    #monTool.HistPath = 'MyGroup/MySubDir'  # default is the parent name of MonTool
+    monTool.HistPath = path
+
+    monTool.defineHistogram( 'TIME_execute', path='EXPERT', type='TH1F', title='Counts',
+                             xbins=400, xmin=0, xmax=200 )
+    monTool.defineHistogram( 'TIME_subtract', path='EXPERT', type='TH1F', title='Counts',
+                             xbins=400, xmin=0, xmax=200 )
+    return monTool
diff --git a/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py b/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py
index d3aacf57fbf0bac1b27ded747c0c736333483ee0..934393e2f38623a8878f63308fcdb26f7257fe4d 100644
--- a/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py
+++ b/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py
@@ -72,16 +72,16 @@ def METMonitoringConfig(inputFlags):
     for mets in met_types:
         defineHistograms(METRefFinal_MonAlg, group,helper,mets)
 
+    if inputFlags.DQ.DataType != 'cosmics':
+        METPflow_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METPflow_MonAlg')   
+        pfmet_types = ["MET_PFlow","MET_PFlow_RefJet","MET_PFlow_Muon","MET_PFlow_RefEle","MET_PFlow_RefGamma","MET_PFlow_RefTau","MET_PFlow_PVSoftTrk"]
+        METPflow_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
+        METPflow_MonAlg.metKeys = pfmet_types
+        METPflow_MonAlg.alltrigger = True
 
-    METPflow_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METPflow_MonAlg')   
-    pfmet_types = ["MET_PFlow","MET_PFlow_RefJet","MET_PFlow_Muon","MET_PFlow_RefEle","MET_PFlow_RefGamma","MET_PFlow_RefTau","MET_PFlow_PVSoftTrk"]
-    METPflow_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
-    METPflow_MonAlg.metKeys = pfmet_types
-    METPflow_MonAlg.alltrigger = True
-
-    group = helper.addGroup(METPflow_MonAlg, "METMonitor", "MissingEt/AllTriggers/MET_AntiKt4EMPFlow/")
-    for mets in pfmet_types:
-        defineHistograms(METPflow_MonAlg, group,helper,mets)
+        group = helper.addGroup(METPflow_MonAlg, "METMonitor", "MissingEt/AllTriggers/MET_AntiKt4EMPFlow/")
+        for mets in pfmet_types:
+            defineHistograms(METPflow_MonAlg, group,helper,mets)
 
         
     METEMTopo_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METEMTopo_MonAlg')   
@@ -114,14 +114,15 @@ def METMonitoringConfig(inputFlags):
     for mets in met_types:
         defineHistograms(METRefFinal_XE30_MonAlg, group,helper,mets)
 
-    METPflow_XE30_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METPflow_XE30_MonAlg')
-    METPflow_XE30_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
-    METPflow_XE30_MonAlg.metTotalKey="FinalTrk"
-    METPflow_XE30_MonAlg.metKeys = pfmet_types
-    METPflow_XE30_MonAlg.dotrigger = True
-    group = helper.addGroup(METPflow_XE30_MonAlg,"METMonitor","MissingEt/TrigXE30/MET_AntiKt4EMPflow/")
-    for mets in pfmet_types:
-        defineHistograms(METPflow_XE30_MonAlg, group,helper,mets)
+    if inputFlags.DQ.DataType != 'cosmics':
+        METPflow_XE30_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METPflow_XE30_MonAlg')
+        METPflow_XE30_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
+        METPflow_XE30_MonAlg.metTotalKey="FinalTrk"
+        METPflow_XE30_MonAlg.metKeys = pfmet_types
+        METPflow_XE30_MonAlg.dotrigger = True
+        group = helper.addGroup(METPflow_XE30_MonAlg,"METMonitor","MissingEt/TrigXE30/MET_AntiKt4EMPflow/")
+        for mets in pfmet_types:
+            defineHistograms(METPflow_XE30_MonAlg, group,helper,mets)
 
     METCalo_XE30_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METCalo_XE30_MonAlg')
     METCalo_XE30_MonAlg.METCaloContainer="MET_Calo"
@@ -152,14 +153,15 @@ def METMonitoringConfig(inputFlags):
     for mets in met_types:
         defineHistograms(METRefFinal_METCut_MonAlg, group,helper,mets) 
    
-    METPflow_METCut_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METPflow_METCut_MonAlg')
-    METPflow_METCut_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
-    METPflow_METCut_MonAlg.metKeys = pfmet_types
-    METPflow_METCut_MonAlg.dometcut = True
-    METPflow_METCut_MonAlg.metcut = 80
-    group = helper.addGroup(METPflow_METCut_MonAlg,"METMonitor","MissingEt/CutMet80/MET_AntiKt4EMPflow/") 
-    for mets in pfmet_types:
-        defineHistograms(METPflow_METCut_MonAlg, group,helper,mets)
+    if inputFlags.DQ.DataType != 'cosmics':
+        METPflow_METCut_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METPflow_METCut_MonAlg')
+        METPflow_METCut_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
+        METPflow_METCut_MonAlg.metKeys = pfmet_types
+        METPflow_METCut_MonAlg.dometcut = True
+        METPflow_METCut_MonAlg.metcut = 80
+        group = helper.addGroup(METPflow_METCut_MonAlg,"METMonitor","MissingEt/CutMet80/MET_AntiKt4EMPflow/") 
+        for mets in pfmet_types:
+            defineHistograms(METPflow_METCut_MonAlg, group,helper,mets)
         
     METCalo_METCut_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METCalo_METCut_MonAlg')
     metcalo_types = [ "PEMB", "EMB", "PEME", "EME", "TILE", "HEC", "FCAL" ]
@@ -200,15 +202,16 @@ def METMonitoringConfig(inputFlags):
         defineHistograms(JetCleaning_METMonAlg, JetCleaningGroup,helper,mets)
         
 
-    PflowJetCleaning_METMonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'PflowJetCleaning_METMonAlg') 
-    PflowJetCleaning_METMonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
-    PflowJetCleaning_METMonAlg.metKeys = pfmet_types
-    PflowJetCleaning_METMonAlg.DoJetCleaning = True
-    PflowJetCleaning_METMonAlg.JetCleaningTool = jetCleaningTool
-    PflowJetCleaningGroup = helper.addGroup(PflowJetCleaning_METMonAlg,"METMonitor","MissingEt/Jetcleaning/MET_AntiKt4EMPflow/")    
-    PflowJetCleaning_METMonAlg.JetContainerName = "AntiKt4EMPFlowJets"
-    for mets in pfmet_types:
-         defineHistograms(PflowJetCleaning_METMonAlg, PflowJetCleaningGroup,helper,mets)
+    if inputFlags.DQ.DataType != 'cosmics':
+        PflowJetCleaning_METMonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'PflowJetCleaning_METMonAlg') 
+        PflowJetCleaning_METMonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
+        PflowJetCleaning_METMonAlg.metKeys = pfmet_types
+        PflowJetCleaning_METMonAlg.DoJetCleaning = True
+        PflowJetCleaning_METMonAlg.JetCleaningTool = jetCleaningTool
+        PflowJetCleaningGroup = helper.addGroup(PflowJetCleaning_METMonAlg,"METMonitor","MissingEt/Jetcleaning/MET_AntiKt4EMPflow/")    
+        PflowJetCleaning_METMonAlg.JetContainerName = "AntiKt4EMPFlowJets"
+        for mets in pfmet_types:
+            defineHistograms(PflowJetCleaning_METMonAlg, PflowJetCleaningGroup,helper,mets)
          
     METCaloJetCleaning_MonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'METCaloJetCleaning_MonAlg')   
     metcalo_types = [ "PEMB", "EMB", "PEME", "EME", "TILE", "HEC", "FCAL" ]
@@ -248,17 +251,18 @@ def METMonitoringConfig(inputFlags):
     for mets in met_types:
         defineHistograms(BadJets_METMonAlg, BadJetsGroup,helper,mets)
 
-    BadPFJets_METMonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'BadPFJets_METMonAlg')    
-    BadPFJets_METMonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
-    BadPFJets_METMonAlg.metKeys = pfmet_types
-    BadPFJets_METMonAlg.DoJetCleaning = True
-    BadPFJets_METMonAlg.alltrigger = True
-    BadPFJets_METMonAlg.DoBadJets = True
-    BadPFJets_METMonAlg.JetCleaningTool = jetCleaningTool
-    BadPFJets_METMonAlg.JetContainerName = "AntiKt4EMPFlowJets"
-    BadPFJetsGroup = helper.addGroup(BadPFJets_METMonAlg,"METMonitor","MissingEt/AllTriggers/BadJets/MET_AntiKt4EMPflow/")
-    for mets in pfmet_types:
-        defineHistograms(BadPFJets_METMonAlg, BadPFJetsGroup,helper,mets)
+    if inputFlags.DQ.DataType != 'cosmics':
+        BadPFJets_METMonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'BadPFJets_METMonAlg')    
+        BadPFJets_METMonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
+        BadPFJets_METMonAlg.metKeys = pfmet_types
+        BadPFJets_METMonAlg.DoJetCleaning = True
+        BadPFJets_METMonAlg.alltrigger = True
+        BadPFJets_METMonAlg.DoBadJets = True
+        BadPFJets_METMonAlg.JetCleaningTool = jetCleaningTool
+        BadPFJets_METMonAlg.JetContainerName = "AntiKt4EMPFlowJets"
+        BadPFJetsGroup = helper.addGroup(BadPFJets_METMonAlg,"METMonitor","MissingEt/AllTriggers/BadJets/MET_AntiKt4EMPflow/")
+        for mets in pfmet_types:
+            defineHistograms(BadPFJets_METMonAlg, BadPFJetsGroup,helper,mets)
 
 
     BadJets_CaloMETMonAlg = helper.addAlgorithm(CompFactory.METMonitoringAlg,'BadJets_CaloMETMonAlg')    
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MSSurfaces.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MSSurfaces.cxx
index 8cccba1b7873b86e39821c44292410ce57086c59..9173a7ff1c57ab853446a9509cc37bedc411934c 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MSSurfaces.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MSSurfaces.cxx
@@ -1,12 +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 "MSSurfaces.h"
 
 #include "TrkSurfaces/DiscSurface.h"
 #include "TrkSurfaces/CylinderSurface.h"
-//#include "CLHEP/Geometry/Transform3D.h"
 
 MSSurfaces::MSSurfaces(){ 
   Trk::Surface* empty =0;
@@ -20,7 +19,6 @@ MSSurfaces::MSSurfaces(){
   double rBI = 5000., rBM = 7000., rBO = 9500., rBE = 5000. ;
   double lenBI = 12000., lenBM = 10000., lenBO = 13000., lenBE = 12000.;
   const Amg::Vector3D posEI(0.,0.,7500.), posEM(0.,0.,13500.), posEO(0.,0.,21000.), posEE(0.,0.,10000.), zero(0.,0.,0.);
-  //const CLHEP::HepRotation unity;
   Amg::Transform3D* transEIA = new Amg::Transform3D(Amg::Translation3D(posEI));
   Amg::Transform3D* transEMA = new Amg::Transform3D(Amg::Translation3D(posEM));
   Amg::Transform3D* transEOA = new Amg::Transform3D(Amg::Translation3D(posEO));
@@ -29,10 +27,6 @@ MSSurfaces::MSSurfaces(){
   Amg::Transform3D* transEMC = new Amg::Transform3D(Amg::Translation3D(-posEM));
   Amg::Transform3D* transEOC = new Amg::Transform3D(Amg::Translation3D(-posEO));
   Amg::Transform3D* transEEC = new Amg::Transform3D(Amg::Translation3D(-posEE)); 
-  //HepGeom::Transform3D* transBI = new HepGeom::Transform3D(unity, zero );
-  //HepGeom::Transform3D* transBM = new HepGeom::Transform3D(unity, zero );
-  //HepGeom::Transform3D* transBO = new HepGeom::Transform3D(unity, zero );
-  //HepGeom::Transform3D* transBE = new HepGeom::Transform3D(unity, zero );
 
   m_vec[BI] = new Trk::CylinderSurface(rBI, lenBI );
   m_station[BI] = "BI" ;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx
index fd774dea9fbe7855dacb43c354528189d1277199..418ff63ce05e8a877a577bfd2b0bcd34b2ea21aa 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx
@@ -42,49 +42,13 @@
 namespace MuonCombined {
  
 
-  MuonCaloTagTool::MuonCaloTagTool (const std::string& type, const std::string& name, const IInterface* parent)
-    :	AthAlgTool(type, name, parent),
-	m_nTrueMuons(0),
-	m_nTracksTagged(0),
-	m_nMuonsTagged(0),
-	m_caloMuonLikelihood("CaloMuonLikelihoodTool/CaloMuonLikelihoodTool",this),
-        m_trkDepositInCalo("TrackDepositInCaloTool/TrackDepositInCaloTool"),
-	m_trackIsolationTool("xAOD::TrackIsolationTool"),
-        m_trkSelTool("InDet::InDetDetailedTrackSelectorTool/CaloTrkMuIdAlgTrackSelectorTool")
-  {
-    declareInterface<IMuonCombinedInDetExtensionTool>(this);
-    declareInterface<IMuonCombinedTrigCaloTagExtensionTool>(this);
-    
-    // --- Muon Dressing ---
-    declareProperty("doCosmicTrackSelection",            m_doCosmicTrackSelection  = false     );
-    
-    // --- Track Preselection Cuts ---
-    declareProperty("doTrkSelection",                    m_doTrkSelection            =  true   );
-    declareProperty("TrackEIsoBarrelCut",                m_eIsoBarrelCut             =  15000. );
-    declareProperty("TrackEIsoTransitionCut",            m_eIsoTransitionCut         =  8000.  );
-    declareProperty("TrackEIsoEndCapCut",                m_eIsoEndCapCut             =  12000. );
-    declareProperty("TrackPtIsoPtRatioCut",              m_ptIsoPtRatioCut           =  5.0    );
-    declareProperty("TrackEIsoPtRatioBarrelCut",         m_eIsoPtRatioBarrelCut      =  2.5    );
-    declareProperty("TrackEIsoPtRatioTransitionCut",     m_eIsoPtRatioTransitionCut  =  1.25   );
-    declareProperty("TrackEIsoPtRatioEndCapCut",         m_eIsoPtRatioEndCapCut      =  1.6    );
-    declareProperty("TrackIsoConeSize",                  m_trackIsoCone              =  0.45   );
-    declareProperty("EnergyIsoConeSize",                 m_energyIsoCone             =  0.4    );
-    
-    // --- Calorimeter ID Tools ---
-    declareProperty("doCaloMuonTag",                     m_doCaloMuonTag        =  true );
-    declareProperty("doCaloLR",                          m_doCaloLR             =  true );
-    declareProperty("ShowTruth",                         m_doTruth              =  true);
-    declareProperty("DebugMode",                         m_debugMode            =  false);
-    declareProperty("doOldExtrapolation",                m_doOldExtrapolation   =  false);
-    declareProperty("IgnoreSiAssociatedCandidates",      m_ignoreSiAssocated    =  true );
-    declareProperty("ShowCutFlow",                       m_showCutFlow          =  true);
-    declareProperty("CaloMuonLikelihoodTool",            m_caloMuonLikelihood           );
-    declareProperty("CaloLRLikelihoodCut",               m_CaloLRlikelihoodCut  =  0.5  );  //Likelihood ratio hard cut
-    
-    // --- Track in Calo Tools ---
-    declareProperty("TrackDepositInCaloTool",            m_trkDepositInCalo  );
-    declareProperty("TrackIsolationTool",                m_trackIsolationTool );
-    declareProperty("TrackSelectorTool",                 m_trkSelTool        );
+  MuonCaloTagTool::MuonCaloTagTool (const std::string& type, const std::string& name, const IInterface* parent) :
+    AthAlgTool(type, name, parent),
+    m_nTrueMuons(0),
+    m_nTracksTagged(0),
+    m_nMuonsTagged(0) {
+      declareInterface<IMuonCombinedInDetExtensionTool>(this);
+      declareInterface<IMuonCombinedTrigCaloTagExtensionTool>(this);
   }
 
   StatusCode MuonCaloTagTool::initialize() {
@@ -112,14 +76,10 @@ namespace MuonCombined {
   }
 
   StatusCode MuonCaloTagTool::finalize() {
-    
-    
     ATH_MSG_INFO("Number of true muons               : " << m_nTrueMuons);
     ATH_MSG_INFO("Number of tracks tagged            : " << m_nTracksTagged);
     ATH_MSG_INFO("Number of muons tagged             : " << m_nMuonsTagged);
-    
     return StatusCode::SUCCESS;
-  
   }
 
   void MuonCaloTagTool::extendWithPRDs( const InDetCandidateCollection& inDetCandidates, InDetCandidateToTagMap* tagMap, IMuonCombinedInDetExtensionTool::MuonPrdData prdData,
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.h
index f8f0288a34f5ba3cf926c8e006b8a5ec032a8615..637b98798716c5abcdce919f8c23422fd356c2e3 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.h
@@ -5,37 +5,31 @@
 #ifndef MUONCOMBINEDBASETOOLS_MUONCALOTAGTOOL_H
 #define MUONCOMBINEDBASETOOLS_MUONCALOTAGTOOL_H
 
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "MuonCombinedToolInterfaces/IMuonCombinedInDetExtensionTool.h"
 #include "MuonCombinedToolInterfaces/IMuonCombinedTrigCaloTagExtensionTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "MuonCombinedEvent/CaloTag.h"
-
 #include "xAODMuon/Muon.h"
 #include "xAODTracking/TrackParticle.h"
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "TrkParameters/TrackParameters.h"
 #include "RecoToolInterfaces/ITrackIsolationTool.h"
-
-// - NEW
 #include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
 #include "RecoToolInterfaces/IParticleCaloCellAssociationTool.h"
-//
 #include "muonEvent/DepositInCalo.h"
-
 #include "ICaloTrkMuIdTools/ICaloMuonLikelihoodTool.h"
 #include "ICaloTrkMuIdTools/ICaloMuonTag.h"
 #include "ICaloTrkMuIdTools/ITrackDepositInCaloTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
-
 #include "StoreGate/ReadHandleKey.h"
 
-// - STL
 #include <atomic>
+#include <string>
 #include <vector>
 
-
 namespace MuonCombined {
 
   class MuonCaloTagTool: public AthAlgTool, virtual public IMuonCombinedInDetExtensionTool, virtual public IMuonCombinedTrigCaloTagExtensionTool
@@ -81,40 +75,36 @@ namespace MuonCombined {
     mutable std::atomic_int m_nMuonsTagged;        //!< Counts the number of truth muons tagged
     
     // --- Set up what to do and what not to do ---
-    bool m_doCaloMuonTag;               //!< run CaloMuonTag Tool
-    bool m_doCaloLR;                    //!< run CaloMuonLikelihoodTool
-    bool m_doTrkSelection;              //!< This variable should be set to false when there is no primary vertex reconstructed.
-    bool m_doCosmicTrackSelection;      //!< Apply track selection for cosmics
-    
-    // --- Debugging options ---
-    bool m_showCutFlow;                 //!< Verbose track selection and track isolation
-    bool m_doTruth;                     //!< Display truth info for each analysed track
-    bool m_debugMode;                   //!< Switch for extra printout
-    bool m_doOldExtrapolation;          //!< In doubt ? >
-    //bool m_doDressing;                  //!< This is to speed up tests where high fake rate is expected. Should be true by default
-    bool m_ignoreSiAssocated;           //!< If true, ignore InDetCandidates which are SiAssociated
-    
-    // --- Isolation cuts ---
-    double m_ptIsoPtRatioCut;           //!< Pt isolation for a .45 cone, normalized to track pt
-    double m_eIsoBarrelCut;             //!< Energy isolation for a .45 cone in Barrel
-    double m_eIsoTransitionCut;         //!< Energy isolation  for a .45 cone in Barrel-EndCap transition region
-    double m_eIsoEndCapCut;             //!< Energy isolation for a .45 cone in Endcap
-    double m_eIsoPtRatioBarrelCut;      //!< Energy isolation for a .45 cone in Barrel, normalized to track pt
-    double m_eIsoPtRatioTransitionCut;  //!< Energy isolation  for a .45 cone in Barrel-EndCap transition region, normalized to track pt
-    double m_eIsoPtRatioEndCapCut;      //!< Energy isolation for a .45 cone in Endcap, normalized to track pt
-    double m_CaloLRlikelihoodCut;       //!< CaloLR likelihood cut
-    double m_trackIsoCone;              //!< Cone size for track isolation
-    double m_energyIsoCone;             //!< Cone size for energy isolation
+    Gaudi::Property<bool> m_doCaloMuonTag {this, "doCaloMuonTag", true, "run CaloMuonTag Tool"};
+    Gaudi::Property<bool> m_doCaloLR {this, "doCaloLR", true, "run CaloMuonLikelihoodTool"};
+    Gaudi::Property<bool> m_doTrkSelection {this, "doTrkSelection", true, "This variable should be set to false when there is no primary vertex reconstructed."};
+    Gaudi::Property<bool> m_doCosmicTrackSelection {this, "doCosmicTrackSelection", false, "Apply track selection for cosmics"};
+    Gaudi::Property<bool> m_showCutFlow {this, "ShowCutFlow", true, "Verbose track selection and track isolation"};
+    Gaudi::Property<bool> m_doTruth {this, "ShowTruth", true, "Display truth info for each analysed track"};
+    Gaudi::Property<bool> m_debugMode {this, "DebugMode", false, "Switch for extra printout"};
+    Gaudi::Property<bool> m_doOldExtrapolation {this, "doOldExtrapolation", false};
+    Gaudi::Property<bool> m_ignoreSiAssocated {this, "IgnoreSiAssociatedCandidates", true, "If true, ignore InDetCandidates which are SiAssociated"};
+
+    Gaudi::Property<double> m_ptIsoPtRatioCut {this, "TrackPtIsoPtRatioCut", 5, "Pt isolation for a .45 cone, normalized to track pt"};
+    Gaudi::Property<double> m_eIsoBarrelCut {this, "TrackEIsoBarrelCut", 15000, "Energy isolation for a .45 cone in Barrel"};
+    Gaudi::Property<double> m_eIsoTransitionCut {this, "TrackEIsoTransitionCut", 8000, "Energy isolation  for a .45 cone in Barrel-EndCap transition region"};
+    Gaudi::Property<double> m_eIsoEndCapCut {this, "TrackEIsoEndCapCut", 12000, "Energy isolation for a .45 cone in Endcap"};
+    Gaudi::Property<double> m_eIsoPtRatioBarrelCut {this, "TrackEIsoPtRatioBarrelCut", 2.5, "Energy isolation for a .45 cone in Barrel, normalized to track pt"};
+    Gaudi::Property<double> m_eIsoPtRatioTransitionCut {this, "TrackEIsoPtRatioTransitionCut", 1.25, "Energy isolation  for a .45 cone in Barrel-EndCap transition region, normalized to track pt"};
+    Gaudi::Property<double> m_eIsoPtRatioEndCapCut {this, "TrackEIsoPtRatioEndCapCut", 1.6, "Energy isolation for a .45 cone in Endcap, normalized to track pt"};
+    Gaudi::Property<double> m_CaloLRlikelihoodCut {this, "CaloLRLikelihoodCut", 0.5, "CaloLR likelihood ratio hard cut"};
+    Gaudi::Property<double> m_trackIsoCone {this, "TrackIsoConeSize", 0.45, "Cone size for track isolation"};
+    Gaudi::Property<double> m_energyIsoCone {this, "EnergyIsoConeSize", 0.4, "Cone size for energy isolation"};
     
     // --- CaloTrkMuIdTools ---
-    ToolHandle<ICaloMuonLikelihoodTool>  m_caloMuonLikelihood; //!< CaloTrkMuIdTools::CaloMuonLikelihoodTool
+    ToolHandle<ICaloMuonLikelihoodTool>  m_caloMuonLikelihood{this,"CaloMuonLikelihoodTool","CaloMuonLikelihoodTool/CaloMuonLikelihoodTool"};
     ToolHandle<ICaloMuonTag>             m_caloMuonTagLoose{this,"CaloMuonTagLoose","CaloMuonTag/CaloMuonTagLoose","CaloTrkMuIdTools::CaloMuonTag for loose tagging"}; 
     ToolHandle<ICaloMuonTag>             m_caloMuonTagTight{this,"CaloMuonTagTight","CaloMuonTag/CaloMuonTag","CaloTrkMuIdTools::CaloMuonTag for tight tagging"}; 
-    ToolHandle<ITrackDepositInCaloTool>  m_trkDepositInCalo;   //!< CaloTrkMuIdTools::TrackDepositInCaloTool
-    
+    ToolHandle<ITrackDepositInCaloTool>  m_trkDepositInCalo{this,"TrackDepositInCaloTool","TrackDepositInCaloTool/TrackDepositInCaloTool"};
+
     // --- External tools ---
-    ToolHandle<xAOD::ITrackIsolationTool>  m_trackIsolationTool; //!< track isolation
-    ToolHandle<Trk::ITrackSelectorTool>    m_trkSelTool;         //!<  ITrackSelectorTool
+    ToolHandle<xAOD::ITrackIsolationTool> m_trackIsolationTool{this,"TrackIsolationTool","xAOD::TrackIsolationTool"};
+    ToolHandle<Trk::ITrackSelectorTool>   m_trkSelTool{this,"TrackSelectorTool","InDet::InDetDetailedTrackSelectorTool/CaloTrkMuIdAlgTrackSelectorTool"};
   };
 
 }	// end of namespace
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx
index 606d4d63d14120c88f7aea6291a591af3cd64d76..6380199578bf6a5b97532cb3341e630fff6c39c4 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.cxx
@@ -18,18 +18,9 @@ namespace MuonCombined {
   //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
 
   MuonCandidateTool::MuonCandidateTool (const std::string& type, const std::string& name, const IInterface* parent)
-    : AthAlgTool(type, name, parent),
-      m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool", this),
-      m_trackBuilder("Rec::CombinedMuonTrackBuilder/CombinedMuonTrackBuilder", this),
-      m_trackExtrapolationTool("ExtrapolateMuonToIPTool/ExtrapolateMuonToIPTool", this),
-      m_ambiguityProcessor("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor", this)
+    : AthAlgTool(type, name, parent)
   {
     declareInterface<IMuonCandidateTool>(this);
-    declareProperty("Printer",m_printer );
-    declareProperty("ExtrapolationStrategy", m_extrapolationStrategy = 0 );
-    declareProperty("TrackBuilder",m_trackBuilder );
-    declareProperty("TrackExtrapolationTool",m_trackExtrapolationTool );
-    declareProperty("AmbiguityProcessor",m_ambiguityProcessor );
   }
 
   //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS                             >>>>>>
@@ -41,7 +32,7 @@ namespace MuonCombined {
     if( !m_trackExtrapolationTool.empty() ) ATH_CHECK(m_trackExtrapolationTool.retrieve());
     else m_trackExtrapolationTool.disable();
     ATH_CHECK(m_ambiguityProcessor.retrieve());
-    ATH_CHECK( m_trackSummaryTool.retrieve() );
+    ATH_CHECK(m_trackSummaryTool.retrieve());
     ATH_CHECK(m_idHelperSvc.retrieve());
     ATH_CHECK(m_beamSpotKey.initialize());
     return StatusCode::SUCCESS;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h
index 883a051c4c2218612770102252bdfc615296d0e7..42e0826aaee259afa40f79ed93539263558cc9e2 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCandidateTool.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 MUONCOMBINEDBASETOOLS_MUONCANDIDATETOOL_H
@@ -35,15 +35,17 @@ namespace MuonCombined {
       void create( const xAOD::TrackParticleContainer& tracks, MuonCandidateCollection& outputCollection, TrackCollection& outputTracks ) override;
 
   private:
-    ToolHandle<Muon::MuonEDMPrinterTool> m_printer;
-    ToolHandle<Rec::ICombinedMuonTrackBuilder> m_trackBuilder;
-    ToolHandle<Muon::IMuonTrackExtrapolationTool> m_trackExtrapolationTool;
-    ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor;
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<Rec::ICombinedMuonTrackBuilder> m_trackBuilder {this, "TrackBuilder", "Rec::CombinedMuonTrackBuilder/CombinedMuonTrackBuilder"};
+    ToolHandle<Muon::IMuonTrackExtrapolationTool> m_trackExtrapolationTool {this, "TrackExtrapolationTool", "ExtrapolateMuonToIPTool/ExtrapolateMuonToIPTool"};
+    ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor {this, "AmbiguityProcessor", "Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"};
     ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"};
+
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
 
-    unsigned int m_extrapolationStrategy;
+    Gaudi::Property<unsigned int> m_extrapolationStrategy {this, "ExtrapolationStrategy", 0};
   };
 
 }	// end of namespace
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.cxx
index f99dca5c642ad803af9282b94dcf3041b8cbc1c9..df604908399f9589cabde0d184e0032da3e86a0d 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.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
 */
 
 //////////////////////////////////////////////////////////////////////////////
@@ -9,49 +9,30 @@
 //  (c) ATLAS Combined Muon software
 //////////////////////////////////////////////////////////////////////////////
 
-//<<<<<< INCLUDES                                                       >>>>>>
+#include "MuonCombinedDebuggerTool.h"
 
-#include "MuidInterfaces/IMuonMatchQuality.h"
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "MuonCombinedEvent/MuonCandidate.h"
-#include "MuonCombinedDebuggerTool.h"
-
-#include "GaudiKernel/ITHistSvc.h"
-#include <TH1D.h>
-#include <TTree.h>
-
 #include "xAODTruth/TruthParticleContainer.h"
 #include "xAODTruth/TruthParticle.h"
 #include "AthLinks/ElementLink.h"
 
-#include "TrkToolInterfaces/ITruthToTrack.h"
-
+#include <TTree.h>
 
 namespace MuonCombined {
  
-  MuonCombinedDebuggerTool::MuonCombinedDebuggerTool (const std::string& type, const std::string& name, const IInterface* parent)
-    :	AthAlgTool(type, name, parent),
-	m_matchQuality("Rec::MuonMatchQuality/MuonMatchQuality", this), 
-	m_truthToTrack("Trk::TruthToTrack/TruthToTrack"),
-	m_histSvc("THistSvc", name),
-	m_recoTree(0)
+  MuonCombinedDebuggerTool::MuonCombinedDebuggerTool (const std::string& type, const std::string& name, const IInterface* parent) :
+    AthAlgTool(type, name, parent),
+    m_histSvc("THistSvc", name),
+    m_recoTree(nullptr)
   {  
     declareInterface<MuonCombinedDebuggerTool>(this);
   }
-  
-  MuonCombinedDebuggerTool::~MuonCombinedDebuggerTool()
-  {}
 
   StatusCode MuonCombinedDebuggerTool::initialize() {
-
     ATH_CHECK(m_matchQuality.retrieve());
     ATH_CHECK(m_truthToTrack.retrieve());
     ATH_CHECK(m_histSvc.retrieve());
-
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode MuonCombinedDebuggerTool::finalize() {
     return StatusCode::SUCCESS;
   }
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.h
index 2196de00266a39be5ba2861db729188777495c9f..caf15808e9d76802f525eaf20bf07faac9d06fe5 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedDebuggerTool.h
@@ -7,30 +7,21 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
 #include "MuonCombinedEvent/InDetCandidateCollection.h"
-#include <vector>
-
 #include "CxxUtils/checker_macros.h"
+#include "GaudiKernel/ITHistSvc.h"
+#include "TrkToolInterfaces/ITruthToTrack.h"
+#include "MuidInterfaces/IMuonMatchQuality.h"
 
-class ITHistSvc;
-class TH1D;
-class TTree;
-
-namespace Trk
-{
-  class ITruthToTrack;
-}
+#include <string>
+#include <vector>
 
-namespace Rec
-{
-  class IMuonMatchQuality;
-}
+class TTree;
 
 namespace MuonCombined {
 
-  class MuonInDetMatchCandidate;
-
   static const InterfaceID IID_MuonCombinedDebuggerTool("MuonCombined::MuonCombinedDebuggerTool", 1, 0);
 
   class ATLAS_NOT_THREAD_SAFE MuonCombinedDebuggerTool: public AthAlgTool // the MuonCombinedDebuggerTool can only be used when running with one thread
@@ -38,12 +29,11 @@ namespace MuonCombined {
     
   public:
     MuonCombinedDebuggerTool(const std::string& type, const std::string& name, const IInterface* parent);
-    ~MuonCombinedDebuggerTool(void); // destructor
+    ~MuonCombinedDebuggerTool()=default;
 
     static const InterfaceID& interfaceID() {return IID_MuonCombinedDebuggerTool;}
   
     StatusCode initialize();
-    StatusCode finalize();
 
     void bookBranches();
 
@@ -59,8 +49,9 @@ namespace MuonCombined {
 
   private:
 
-    ToolHandle<Rec::IMuonMatchQuality> m_matchQuality;
-    ToolHandle<Trk::ITruthToTrack> m_truthToTrack;
+    ToolHandle<Rec::IMuonMatchQuality> m_matchQuality {this, "MuonMatchQuality", "Rec::MuonMatchQuality/MuonMatchQuality"};
+    ToolHandle<Trk::ITruthToTrack> m_truthToTrack {this, "TruthToTrack", "Trk::TruthToTrack/TruthToTrack"};
+
     ServiceHandle<ITHistSvc> m_histSvc;
 
     TTree* m_recoTree;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.cxx
index 1bdec7606a72b93c02798cd170ba12576dc4151d..4e9cd12b48ec4769b9a1e92c284d3ff70d4b0e88 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.cxx
@@ -10,74 +10,28 @@
 //  (c) ATLAS Combined Muon software
 //////////////////////////////////////////////////////////////////////////////
 
-//<<<<<< INCLUDES                                                       >>>>>>
+#include "MuonCombinedFitTagTool.h"
+
 #include "TrkTrack/TrackStateOnSurface.h"
 #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
-
-#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
-
-#include "MuidInterfaces/ICombinedMuonTrackBuilder.h"
-#include "MuidInterfaces/IMuonTrackQuery.h"
-#include "MuidInterfaces/IMuidMuonRecovery.h"
-#include "MuidInterfaces/IMuonMatchQuality.h"
-
-#include "MuonCombinedToolInterfaces/IMuonCombinedTool.h"
-#include "MuonCombinedToolInterfaces/IMuonMomentumBalanceSignificance.h"
-
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "MuonCombinedEvent/InDetCandidateToTagMap.h"
 #include "MuonCombinedEvent/MuonCandidate.h"
 #include "MuonCombinedEvent/CombinedFitTag.h"
-#include "TrkToolInterfaces/ITrackScoringTool.h"
 #include "TrkTrackSummary/TrackSummary.h"
-
 #include "muonEvent/CaloEnergy.h"
-
-#include "MuonCombinedFitTagTool.h"
-
 #include "TrkMaterialOnTrack/MaterialEffectsOnTrack.h"
-#include "Identifier/Identifier.h"
 #include "TrkEventUtils/IdentifierExtractor.h"
 #include "TrkMaterialOnTrack/ScatteringAngles.h"
 #include "xAODTracking/Vertex.h"
 
 namespace MuonCombined {
- 
-  //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
 
   MuonCombinedFitTagTool::MuonCombinedFitTagTool(const std::string& type, const std::string& name, const IInterface* parent)
-    :	AthAlgTool(type, name, parent),
-  m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-  m_tagTool("MuonCombined::MuonTrackTagTestTool/MuonTrackTagTestTool"),
-  m_trackBuilder(""),
-  m_outwardsBuilder(""),
-  m_trackQuery("Rec::MuonTrackQuery/MuonTrackQuery"),
-  m_momentumBalanceTool("Rec::MuonMomentumBalanceSignificanceTool/MuonMomentumBalanceSignifTool"),
-  m_muonRecovery(""),
-  m_matchQuality("Rec::MuonMatchQuality/MuonMatchQuality", this),
-  m_trackScoringTool("Muon::MuonTrackScoringTool/MuonTrackScoringTool"),
-  m_DetID(0)
+    :	AthAlgTool(type, name, parent)
   {
     declareInterface<IMuonCombinedTagTool>(this);
-    declareProperty("Printer",                  m_printer);
-
-    declareProperty("TrackBuilder",		m_trackBuilder);
-    declareProperty("OutwardsTrackBuilder",	m_outwardsBuilder);
-    declareProperty("TrackQuery",		m_trackQuery);
-    declareProperty("MomentumBalanceTool",	m_momentumBalanceTool);
-    declareProperty("MuonRecovery",		m_muonRecovery);
-    declareProperty("MatchQuality",		m_matchQuality);
-    declareProperty("TrackScoringTool",         m_trackScoringTool);
-    declareProperty("BadFitChi2",		m_badFitChi2 = 2.5);
-    declareProperty("MomentumBalanceCut",	m_momentumBalanceCut = 6.0);
-    declareProperty("IndetPullCut", 		m_indetPullCut = 6.0);
-    declareProperty("MatchChiSquaredCut",	m_matchChiSquaredCut = 30.0);
   }
-
-  MuonCombinedFitTagTool::~MuonCombinedFitTagTool()
-  {}
-
-  //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS                             >>>>>>
   
   StatusCode MuonCombinedFitTagTool::initialize() {
     ATH_MSG_INFO( "Initializing MuonCombinedFitTagTool - package version " << PACKAGE_VERSION );
@@ -94,20 +48,11 @@ namespace MuonCombined {
     /// handle to the magnetic field cache
     ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
 
-    if (detStore()->retrieve(m_DetID, "AtlasID").isFailure()) {
-      ATH_MSG_ERROR ("Could not get AtlasDetectorID helper" );
-      return StatusCode::FAILURE;
-    }
-    
     //The trigger doesn't use the vertex information
     if(!m_vertexKey.empty()) ATH_CHECK( m_vertexKey.initialize() );
     
     return StatusCode::SUCCESS;
   }
-  
-  StatusCode MuonCombinedFitTagTool::finalize() {
-    return StatusCode::SUCCESS;
-  }
 
   void MuonCombinedFitTagTool::combine( const MuonCandidate& muonCandidate, const std::vector<const InDetCandidate*>& indetCandidates, InDetCandidateToTagMap& tagMap,
 					TrackCollection* combTracks, TrackCollection* METracks) const {  
@@ -515,7 +460,7 @@ namespace MuonCombined {
         Identifier id = Trk::IdentifierExtractor::extract(mot);
         if(id.is_valid()) {
           // skip after first Muon hit
-          if(m_DetID->is_muon(id)) break;
+          if(m_idHelperSvc->isMuon(id)) break;
         } 
       }
       if(pstart==0&&m->trackParameters()) {
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.h
index d299d68f194922f22763ce5f32fe4f085e9849e8..0926a88c7cea9058f3686ac8c371da447a8c4b75 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedFitTagTool.h
@@ -1,59 +1,47 @@
 /*
-  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 MUONCOMBINEDBASETOOLS_MUONCOMBINEDFITTAGTOOL_H
 #define MUONCOMBINEDBASETOOLS_MUONCOMBINEDFITTAGTOOL_H
 
-//<<<<<< INCLUDES                                                       >>>>>>
-
+#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
+
 #include "MuonCombinedToolInterfaces/IMuonTrackTagTool.h"
 #include "TrkTrack/TrackCollection.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkSegment/SegmentCollection.h"
 #include "xAODTracking/VertexContainer.h"
-// For magneticfield
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+#include "MuidInterfaces/ICombinedMuonTrackBuilder.h"
+#include "MuidInterfaces/IMuonTrackQuery.h"
+#include "MuidInterfaces/IMuidMuonRecovery.h"
+#include "MuidInterfaces/IMuonMatchQuality.h"
+#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
+#include "TrkToolInterfaces/ITrackScoringTool.h"
+#include "MuonCombinedToolInterfaces/IMuonCombinedTool.h"
+#include "MuonCombinedToolInterfaces/IMuonMomentumBalanceSignificance.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
+#include <string>
 #include <vector>
 
-//<<<<<< CLASS DECLARATIONS                                             >>>>>>
-
-namespace Rec
-{
-class ICombinedMuonTrackBuilder;
-class IMuonTrackQuery;
-class IMuonMomentumBalanceSignificance;
-class IMuidMuonRecovery;
-class IMuonMatchQuality;
-}
-namespace Trk {
-  class ITrackScoringTool;
-}
-
-namespace Muon
-{
-  class MuonEDMPrinterTool;
-}
-
 namespace MuonCombined {
   class InDetCandidate;
   class MuonCandidate;
-  class IMuonTrackTagTool;
   class CombinedFitTag;
   class InDetCandidateToTagMap;
 
-  class MuonCombinedFitTagTool: public AthAlgTool, virtual public IMuonCombinedTagTool
-  {
+  class MuonCombinedFitTagTool: public AthAlgTool, virtual public IMuonCombinedTagTool {
 
   public:
     MuonCombinedFitTagTool(const std::string& type, const std::string& name, const IInterface* parent);
-    virtual ~MuonCombinedFitTagTool(void); // destructor
+    virtual ~MuonCombinedFitTagTool()=default;
   
     virtual StatusCode initialize() override;
-    virtual StatusCode finalize() override;
 
     /**IMuonCombinedTagTool interface: build combined  muons from a muon and a vector of indet candidates */    
     virtual 
@@ -82,27 +70,27 @@ namespace MuonCombined {
 
     void dumpCaloEloss(const Trk::Track* track, std::string txt ) const;
 
-    // helpers, managers, tools
-    ToolHandle<Muon::MuonEDMPrinterTool>              m_printer;
-    ToolHandle<MuonCombined::IMuonTrackTagTool>       m_tagTool;
-    ToolHandle<Rec::ICombinedMuonTrackBuilder>	      m_trackBuilder;
-    ToolHandle<Rec::ICombinedMuonTrackBuilder>	      m_outwardsBuilder;
-    ToolHandle<Rec::IMuonTrackQuery>		      m_trackQuery;
-    ToolHandle<Rec::IMuonMomentumBalanceSignificance> m_momentumBalanceTool;
-    ToolHandle<Rec::IMuidMuonRecovery>		      m_muonRecovery; 
-    ToolHandle<Rec::IMuonMatchQuality>		      m_matchQuality;
-    ToolHandle<Trk::ITrackScoringTool>                m_trackScoringTool;
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<MuonCombined::IMuonTrackTagTool> m_tagTool {this, "MuonTrackTagTool", "MuonCombined::MuonTrackTagTestTool/MuonTrackTagTestTool"};
+    ToolHandle<Rec::ICombinedMuonTrackBuilder> m_trackBuilder {this, "TrackBuilder", ""};
+    ToolHandle<Rec::ICombinedMuonTrackBuilder> m_outwardsBuilder {this, "OutwardsTrackBuilder", ""};
+    ToolHandle<Rec::IMuonTrackQuery> m_trackQuery {this, "TrackQuery", "Rec::MuonTrackQuery/MuonTrackQuery"};
+    ToolHandle<Rec::IMuonMomentumBalanceSignificance> m_momentumBalanceTool {this, "MomentumBalanceTool", "Rec::MuonMomentumBalanceSignificanceTool/MuonMomentumBalanceSignifTool"};
+    ToolHandle<Rec::IMuidMuonRecovery> m_muonRecovery {this, "MuonRecovery", ""};
+    ToolHandle<Rec::IMuonMatchQuality> m_matchQuality {this, "MatchQuality", "Rec::MuonMatchQuality/MuonMatchQuality"};
+    ToolHandle<Trk::ITrackScoringTool> m_trackScoringTool {this, "TrackScoringTool", "Muon::MuonTrackScoringTool/MuonTrackScoringTool"};
+
+    Gaudi::Property<double> m_badFitChi2 {this, "BadFitChi2", 2.5};
+    Gaudi::Property<double> m_momentumBalanceCut {this, "MomentumBalanceCut", 6};
+    Gaudi::Property<double> m_indetPullCut {this, "IndetPullCut", 6};
+    Gaudi::Property<double> m_matchChiSquaredCut {this, "MatchChiSquaredCut", 30};
+
     // Read handle for conditions object to get the field cache
-    SG::ReadCondHandleKey<AtlasFieldCacheCondObj>    m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
-    const AtlasDetectorID *m_DetID;
+    SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
 
     SG::ReadHandleKey<xAOD::VertexContainer> m_vertexKey { this, "VertexContainer", "PrimaryVertices", "primary vertex container" };
-    // configuration
-    double			m_badFitChi2;
-    double			m_momentumBalanceCut;	// Cut on momentum balance of combined track
-    double			m_indetPullCut;		// Cut on indet-combined momentum pull
-    double			m_matchChiSquaredCut;	// Chi2 cut for classification as good match 
-
   };
 
 }	// end of namespace
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx
index 64c4acc58c8a2e89d3a7e8abf0f5a1428ac02186..33496cb470accda040a79030b356d42385c340c2 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.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
 */
 
 //////////////////////////////////////////////////////////////////////////////
@@ -10,51 +10,27 @@
 //  (c) ATLAS Combined Muon software
 //////////////////////////////////////////////////////////////////////////////
 
-//<<<<<< INCLUDES                                                       >>>>>>
-#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
-#include "TrkExInterfaces/IExtrapolator.h"
+#include "MuonCombinedStacoTagTool.h"
 
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "MuonCombinedEvent/InDetCandidateToTagMap.h"
 #include "MuonCombinedEvent/MuonCandidate.h"
 #include "MuonCombinedEvent/StacoTag.h"
-#include "MuonCombinedStacoTagTool.h"
 
 namespace MuonCombined {
- 
-  //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
-
-  MuonCombinedStacoTagTool::MuonCombinedStacoTagTool (const std::string& type, const std::string& name, const IInterface* parent)
-    :	AthAlgTool(type, name, parent),
-	m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",this),
-	m_tagTool("MuonCombined::MuonTrackTagTestTool/MuonTrackTagTestTool",this),
-        m_extrapolator("Trk::Extrapolator/AtlasExtrapolator"),
-	m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool",this)
+
+  MuonCombinedStacoTagTool::MuonCombinedStacoTagTool(const std::string& type, const std::string& name, const IInterface* parent) :
+    AthAlgTool(type, name, parent)
   {
     declareInterface<IMuonCombinedTagTool>(this);
-    declareProperty("Printer",m_printer );
-    declareProperty("TagTool",m_tagTool );
-    declareProperty("Extrapolator",m_extrapolator );
-    declareProperty("ParticleCaloExtensionTool", m_caloExtTool);
   }
 
-  MuonCombinedStacoTagTool::~MuonCombinedStacoTagTool()
-  {}
-
-  //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS                             >>>>>>
-
   StatusCode MuonCombinedStacoTagTool::initialize() {
     ATH_MSG_INFO( "Initializing MuonCombinedStacoTagTool - package version " << PACKAGE_VERSION );
-
     ATH_CHECK(m_printer.retrieve());
     ATH_CHECK(m_tagTool.retrieve());
     ATH_CHECK(m_extrapolator.retrieve());
     ATH_CHECK(m_caloExtTool.retrieve());
-
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode MuonCombinedStacoTagTool::finalize() {
     return StatusCode::SUCCESS;
   }
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h
index e718b4a7348ac2c9683455b9387cfc1c2d8b3ca1..4ad43e4796ec1fa73e4ae6114fc4df36b9b2b35f 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h
@@ -1,47 +1,38 @@
 /*
-  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 MUONCOMBINEDBASETOOLS_MUONCOMBINEDSTACOTAGTOOL_H
 #define MUONCOMBINEDBASETOOLS_MUONCOMBINEDSTACOTAGTOOL_H
 
-//<<<<<< INCLUDES                                                       >>>>>>
-
+#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
+
 #include "MuonCombinedToolInterfaces/IMuonTrackTagTool.h"
 #include "TrkTrack/TrackCollection.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkSegment/SegmentCollection.h"
 #include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
-#include <vector>
-
-//<<<<<< CLASS DECLARATIONS                                             >>>>>>
+#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
+#include "TrkExInterfaces/IExtrapolator.h"
 
-namespace Muon
-{
-  class MuonEDMPrinterTool;
-}
-namespace Trk {
-  class IExtrapolator;
-}
+#include <string>
+#include <vector>
 
 namespace MuonCombined {
   class InDetCandidate;
   class MuonCandidate;
   class InDetCandidateToTagMap;
-  class IMuonTrackTagTool;
 
   class MuonCombinedStacoTagTool: public AthAlgTool, virtual public IMuonCombinedTagTool
   {
 
   public:
     MuonCombinedStacoTagTool(const std::string& type, const std::string& name, const IInterface* parent);
-    virtual ~MuonCombinedStacoTagTool(void); // destructor
+    virtual ~MuonCombinedStacoTagTool()=default;
   
     virtual StatusCode initialize() override;
-    virtual StatusCode finalize() override;
 
     /**IMuonCombinedTagTool interface: build combined  muons from a muon and a vector of indet candidates */    
     virtual
@@ -52,12 +43,10 @@ namespace MuonCombined {
 
     std::unique_ptr<const Trk::Perigee> theCombIdMu( const Trk::Perigee& indetPerigee, const Trk::Perigee& extrPerigee, double& chi2 ) const;
 
-    // helpers, managers, tools
-    ToolHandle<Muon::MuonEDMPrinterTool>        m_printer;
-    ToolHandle<MuonCombined::IMuonTrackTagTool> m_tagTool;
-    ToolHandle<Trk::IExtrapolator>              m_extrapolator;
-    ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool;
-
+    ToolHandle<Muon::MuonEDMPrinterTool>        m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<MuonCombined::IMuonTrackTagTool> m_tagTool {this, "TagTool", "MuonCombined::MuonTrackTagTestTool/MuonTrackTagTestTool"};
+    ToolHandle<Trk::IExtrapolator>              m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
+    ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"};
   };
 
 }	// end of namespace
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx
index 01a400b59841aa44168857cb69b194f4b1b26f55..74326fbd4807fb43d3ec5b8f4ea2727960a8948d 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx
@@ -12,34 +12,20 @@
 //  (c) ATLAS Combined Muon software
 //////////////////////////////////////////////////////////////////////////////
 
-#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
 #include "GaudiKernel/ConcurrencyFlags.h"
-#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "MuonCombinedEvent/MuonCandidate.h"
 #include "MuonCombinedTool.h"
 
 namespace MuonCombined {
 
-  MuonCombinedTool::MuonCombinedTool (const std::string& type, const std::string& name, const IInterface* parent)
-    :	AthAlgTool(type, name, parent),
-	m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-	m_muonCombDebugger("MuonCombined::MuonCombinedDebuggerTool/MuonCombinedDebuggerTool")
+  MuonCombinedTool::MuonCombinedTool (const std::string& type, const std::string& name, const IInterface* parent) :
+    AthAlgTool(type, name, parent)
   {
     declareInterface<IMuonCombinedTool>(this);
-    declareProperty("Printer",m_printer );
-    declareProperty("MuonCombinedTagTools",     m_muonCombinedTagTools);
-    declareProperty("DeltaEtaPreSelection",     m_deltaEtaPreSelection = 0.5 );
-    declareProperty("DeltaPhiPreSelection",     m_deltaPhiPreSelection = 1.  );
-    declareProperty("PtBalancePreSelection",    m_ptBalance = 1.  );
-    declareProperty("RunMuonCombinedDebugger",  m_runMuonCombinedDebugger = false );
+    declareProperty("MuonCombinedTagTools", m_muonCombinedTagTools);
   }
 
-  MuonCombinedTool::~MuonCombinedTool()
-  {}
-
-  //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS                             >>>>>>
-
   StatusCode MuonCombinedTool::initialize() {
 
     ATH_CHECK(m_printer.retrieve());
@@ -56,10 +42,6 @@ namespace MuonCombined {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode MuonCombinedTool::finalize() {
-    return StatusCode::SUCCESS;
-  }
-
   void MuonCombinedTool::combine( const MuonCandidateCollection& muonCandidates, const InDetCandidateCollection& inDetCandidates, std::vector<InDetCandidateToTagMap*> tagMaps, 
 				  TrackCollection* combinedTracks, TrackCollection* METracks) const {
    
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.h
index 951fd91cdd9173d2023c48c44a7183b9ee843df9..e873c9a56dde50edaaba846f3aebc758652b55c7 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.h
@@ -1,36 +1,31 @@
 /*
-  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 MUONCOMBINEDBASETOOLS_MUONCOMBINEDTOOL_H
 #define MUONCOMBINEDBASETOOLS_MUONCOMBINEDTOOL_H
 
+#include "MuonCombinedToolInterfaces/IMuonCombinedTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonCombinedToolInterfaces/IMuonCombinedTool.h"
+
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
 #include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "MuonCombinedEvent/InDetCandidateToTagMap.h"
 #include "MuonCombinedDebuggerTool.h"
-
-namespace Muon
-{
-  class MuonEDMPrinterTool;
-}
+#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
+#include "MuonRecHelperTools/MuonEDMPrinterTool.h"
 
 namespace MuonCombined {
 
-  class IMuonCombinedTagTool;
-
   class MuonCombinedTool: public AthAlgTool, virtual public IMuonCombinedTool
   {
 
   public:
     MuonCombinedTool(const std::string& type, const std::string& name, const IInterface* parent);
-    ~MuonCombinedTool(void); // destructor
+    ~MuonCombinedTool()=default;
   
     StatusCode initialize();
-    StatusCode finalize();
 
     void combine(const MuonCandidateCollection& muonCandidates,const InDetCandidateCollection& inDetCandidates, std::vector<InDetCandidateToTagMap*> tagMaps, 
 		 TrackCollection* combinedTracks, TrackCollection* METracks) const;
@@ -41,14 +36,15 @@ namespace MuonCombined {
 		    std::vector<const InDetCandidate*>& associatedIdCandidates ) const ;
 
     // helpers, managers, tools
-    ToolHandle<Muon::MuonEDMPrinterTool>            m_printer;
-    ToolHandleArray<MuonCombined::IMuonCombinedTagTool>  m_muonCombinedTagTools;
-    ToolHandle<MuonCombinedDebuggerTool> m_muonCombDebugger;
-
-    double m_deltaEtaPreSelection;
-    double m_deltaPhiPreSelection;
-    double m_ptBalance;
-    bool m_runMuonCombinedDebugger;
+    ToolHandle<Muon::MuonEDMPrinterTool>m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandleArray<MuonCombined::IMuonCombinedTagTool> m_muonCombinedTagTools;
+    ToolHandle<MuonCombinedDebuggerTool> m_muonCombDebugger {this, "MuonCombinedDebuggerTool", "MuonCombined::MuonCombinedDebuggerTool/MuonCombinedDebuggerTool"};
+
+    Gaudi::Property<double> m_deltaEtaPreSelection {this, "DeltaEtaPreSelection", 0.5};
+    Gaudi::Property<double> m_deltaPhiPreSelection {this, "DeltaPhiPreSelection", 1};
+    Gaudi::Property<double> m_ptBalance {this, "PtBalancePreSelection", 1};
+
+    Gaudi::Property<bool> m_runMuonCombinedDebugger {this, "RunMuonCombinedDebugger", false};
   };
 
 }	// end of namespace
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
index 061c58b0485aff4dfa7890797acb8e241ef36694..ed56ae43e70f13bcff0d000eba768cdb81a36193 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
@@ -9,16 +9,16 @@
 //  (c) ATLAS Combined Muon software
 //////////////////////////////////////////////////////////////////////////////
 
+#include "MuonCreatorTool.h"
+
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "MuonCombinedEvent/MuonCandidate.h"
-#include "MuonCreatorTool.h"
 #include "SortInDetCandidates.h"
 #include "MuonCombinedEvent/StacoTag.h"
 #include "MuonCombinedEvent/CombinedFitTag.h"
 #include "MuonCombinedEvent/SegmentTag.h"
 #include "MuonCombinedEvent/CaloTag.h"
 #include "MuonCombinedEvent/MuGirlLowBetaTag.h"
-
 #include "MuonSegment/MuonSegment.h"
 #include "TrkTrack/Track.h"
 #include "TrkTrackSummary/TrackSummary.h"
@@ -30,79 +30,25 @@
 #include "TrkMaterialOnTrack/MaterialEffectsOnTrack.h"
 #include "TrkMaterialOnTrack/EnergyLoss.h"
 #include "TrkMaterialOnTrack/ScatteringAngles.h"
-
 #include "TrkSegment/SegmentCollection.h"
 #include "xAODMuon/MuonSegmentContainer.h"
 #include "xAODMuon/MuonSegment.h"
 #include "xAODMuonCnv/IMuonSegmentConverterTool.h"
-
 #include "muonEvent/CaloEnergy.h"
 #include "FourMomUtils/P4Helpers.h"
 #include "xAODCaloEvent/CaloCluster.h"
 #include "TrackToCalo/CaloCellCollector.h"
-
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
 #include "MuonRIO_OnTrack/RpcClusterOnTrack.h"
 #include "MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h"
-
 #include "MuidEvent/FieldIntegral.h"
-
 #include "StoreGate/ReadCondHandle.h"
 
 namespace MuonCombined {
  
-  MuonCreatorTool::MuonCreatorTool (const std::string& type, const std::string& name, const IInterface* parent)
-    :	AthAlgTool(type, name, parent),
-    m_makeMSPreExtrapLink(false),
-    m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-    m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool"),
-    m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this),
-    m_particleCreator("Trk::TrackParticleCreatorTool/MuonCombinedTrackParticleCreator"),
-    m_ambiguityProcessor("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"),
-    m_propagator("Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"),
-    m_muonDressingTool("MuonCombined::MuonDressingTool/MuonDressingTool"),
-    m_momentumBalanceTool("Rec::MuonMomentumBalanceSignificanceTool/MuonMomentumBalanceSignificanceTool"),
-    m_scatteringAngleTool("Rec::MuonScatteringAngleSignificanceTool/MuonScatteringAngleSignificanceTool"),
-    m_selectorTool("CP::MuonSelectionTool/MuonSelectionTool"),
-    m_muonSegmentConverterTool("Muon::MuonSegmentConverterTool/MuonSegmentConverterTool"),
-    m_meanMDTdADCTool("Rec::MuonMeanMDTdADCFillerTool/MuonMeanMDTdADCFillerTool"),
-    m_caloMaterialProvider("Trk::TrkMaterialProviderTool/TrkMaterialProviderTool", this),
-    m_trackSegmentAssociationTool("Muon::TrackSegmentAssociationTool/TrackSegmentAssociationTool"),
-    m_trackQuery("Rec::MuonTrackQuery/MuonTrackQuery"),
-    m_trackSummaryTool("MuonTrackSummaryTool")
-
-  {
+  MuonCreatorTool::MuonCreatorTool (const std::string& type, const std::string& name, const IInterface* parent) :
+    AthAlgTool(type, name, parent) {
     declareInterface<IMuonCreatorTool>(this);
-    declareProperty("MakeTrackAtMSLink",m_makeMSPreExtrapLink=false);
-    declareProperty("Printer",m_printer );
-    declareProperty("ParticleCaloExtensionTool", m_caloExtTool);      
-    declareProperty("MuonPrinter",m_muonPrinter );
-    declareProperty("TrackParticleCreator",m_particleCreator );
-    declareProperty("AmbiguityProcessor",m_ambiguityProcessor );
-    declareProperty("Propagator",m_propagator );
-    declareProperty("MuonDressingTool",m_muonDressingTool );
-    declareProperty("MomentumBalanceTool",m_momentumBalanceTool);
-    declareProperty("ScatteringAngleTool",m_scatteringAngleTool);
-    declareProperty("MuonSelectionTool", m_selectorTool);
-    declareProperty("MeanMDTdADCTool",m_meanMDTdADCTool);
-    declareProperty("TrackSegmentAssociationTool",m_trackSegmentAssociationTool);
-    declareProperty("BuildStauContainer",m_buildStauContainer=false);
-    declareProperty("FillEnergyLossFromTrack",m_fillEnergyLossFromTrack=true);
-    declareProperty("FillAlignmentEffectsOnTrack",m_fillAlignmentEffectsOnTrack=true);
-    declareProperty("FillExtraELossInfo", m_fillExtraELossInfo=true);
-    declareProperty("PrintSummary", m_printSummary=false);
-    declareProperty("UseUpdatedExtrapolatedTrack", m_useUpdatedExtrapolatedTrack = true );
-    //Default data source for the calocells
-    declareProperty("SigmaCaloNoiseCut", m_sigmaCaloNoiseCut=3.4);
-    declareProperty("CaloMaterialProvider", m_caloMaterialProvider);
-    declareProperty("FillTimingInformation", m_fillTimingInformation = true );
-    declareProperty("FillTimingInformationOnMuon", m_fillTimingInformationOnMuon = false );
-    declareProperty("AssociateSegmentsToLowBetaMuons",m_segLowBeta = false);
-    declareProperty("UseCaloCells",m_useCaloCells = true);
-    declareProperty("MakeSAMuons", m_doSA=false);
-    declareProperty("TrackQuery", m_trackQuery);
-    declareProperty("TrackSummaryTool", m_trackSummaryTool);
-  
   }
 
   StatusCode MuonCreatorTool::initialize() {
@@ -1110,6 +1056,24 @@ namespace MuonCombined {
 		  }
 		}
 	      }
+	      //Same for low-pT MuidCo muons
+              if(tag->author()==xAOD::Muon::MuidCo){
+		const CombinedFitTag* cfTag = static_cast<const CombinedFitTag*>(tag);
+		//this should be a problem only for low-pT muons, so to avoid too many extra calls I think it makes sense to put a pT cut here
+		//since this isn't really a tunable parameter of the reconstruction, I'm not making it a property
+                if(cfTag->combinedTrack() && cfTag->combinedTrack()->perigeeParameters()->pT()<3000){
+		  std::unique_ptr<xAOD::TrackParticle> combtp(m_particleCreator->createParticle(cfTag->combinedTrackLink(),nullptr,nullptr,xAOD::muon));
+		  std::unique_ptr<Trk::CaloExtension> caloExtension = m_caloExtTool->caloExtension(*combtp);
+		  if(!caloExtension){
+                    ATH_MSG_WARNING("failed to get a calo extension for this combined muon, don't use it");
+                    continue;
+		  }
+                  if( caloExtension->caloLayerIntersections().empty()){
+                    ATH_MSG_WARNING("failed to retrieve any calo layers for this combined muon, don't use it");
+                    continue;
+                  }
+                }
+	      } 
 	      tags.push_back(tag);
 	    }
           }
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
index e6237f3ab25752ad6068b5e3770f911c4545781f..2fca9f99a2116ff5490a6e9dcf861fb5cbaf5673 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.h
@@ -5,13 +5,13 @@
 #ifndef MUONCOMBINEDBASETOOLS_MUONCREATORTOOL_H
 #define MUONCOMBINEDBASETOOLS_MUONCREATORTOOL_H
 
+#include "MuonCombinedToolInterfaces/IMuonCreatorTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonCombinedToolInterfaces/IMuonCreatorTool.h"
+
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
-
 #include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "xAODMuon/MuonContainer.h"
 #include "xAODMuon/Muon.h"
@@ -39,28 +39,17 @@
 #include "TrkExInterfaces/IPropagator.h"
 #include "TrkToolInterfaces/ITrackParticleCreatorTool.h"
 #include "TrkToolInterfaces/ITrackAmbiguityProcessorTool.h"
-
 #include "TrackSegmentAssociationTool.h"
-
 #include "TrkSegment/Segment.h"
 #include "MuonSegment/MuonSegment.h"
 #include "TrackToCalo/CaloCellCollector.h"
 #include "CaloEvent/CaloCellContainer.h"
 #include "CaloConditions/CaloNoise.h"
-
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/ReadCondHandleKey.h"
-
 #include "TrkToolInterfaces/IExtendedTrackSummaryTool.h"
 #include "TrkTrackSummary/MuonTrackSummary.h"
 
-namespace Muon {
-  class MuonSegment;
-}
-namespace Trk
-{
-  class IExtendedTrackSummaryTool;
-}
 namespace MuonCombined {
   class StacoTag;
   class CombinedFitTag;
@@ -156,70 +145,45 @@ namespace MuonCombined {
     void addSegmentsOnTrack( xAOD::Muon& muon ) const;
     void addAlignmentEffectsOnTrack( xAOD::TrackParticleContainer* trkCont ) const;
 
-    /// flag to decide whether or not to make link to MS track before extrapolation
-    bool m_makeMSPreExtrapLink;
-
-    /// flag to decide whether to build stau or not
-    bool m_buildStauContainer;
-    
-    /// Decide whether to try to extract the calo energy loss from tracks 
-    bool m_fillEnergyLossFromTrack;
-
-    /// Decide whether to add alignment effects on track to the muon (available for CB and SA tracks)
-    bool m_fillAlignmentEffectsOnTrack;
-    
-    /// Can enabled this for debugging - will add extra information not for production
-    bool m_fillExtraELossInfo;
-    
-    /// configure whether to use the updated extrapolated track for a combined fit or not
-    bool m_useUpdatedExtrapolatedTrack;
-
-    /// Number of sigma for calo cell noise cut
-    float m_sigmaCaloNoiseCut;
-
-    /// flag to print muon edm
-    bool m_printSummary;
-    
-    /// enable filling of timing information
-    bool m_fillTimingInformation;
-    bool m_fillTimingInformationOnMuon;
-
-    //associate segments to MuGirlLowBeta muons;
-    bool m_segLowBeta;
-
-    //use calo cells
-    bool m_useCaloCells;
-
-    //flag for SA muons
-    bool m_doSA;
-
-    /// copy truth links from primary track particle (or put dummy link if this is missing)
-    //bool m_fillMuonTruthLinks;
-    
-    // helpers, managers, tools
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    ToolHandle<Muon::MuonEDMPrinterTool>          m_printer;
-    ServiceHandle<Muon::IMuonEDMHelperSvc>        m_edmHelperSvc {this, "edmHelper", 
-      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
-      "Handle to the service providing the IMuonEDMHelperSvc interface" };
-    ToolHandle<Rec::IMuonPrintingTool>            m_muonPrinter;
-    ToolHandle<Trk::IParticleCaloExtensionTool>   m_caloExtTool;
-    ToolHandle<Trk::ITrackParticleCreatorTool>    m_particleCreator;
-    ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor;
-    ToolHandle<Trk::IPropagator>                  m_propagator;
-    ToolHandle<xAOD::IMuonDressingTool>           m_muonDressingTool;
-    ToolHandle<Rec::IMuonMomentumBalanceSignificance> m_momentumBalanceTool;
-    ToolHandle<Rec::IMuonScatteringAngleSignificance> m_scatteringAngleTool; 
-    ToolHandle<CP::IMuonSelectionTool>            m_selectorTool; 
-    ToolHandle<xAODMaker::IMuonSegmentConverterTool>  m_muonSegmentConverterTool;
-    ToolHandle<Rec::IMuonMeanMDTdADCFiller>       m_meanMDTdADCTool;
-    ToolHandle<Trk::ITrkMaterialProviderTool>     m_caloMaterialProvider;
-    ToolHandle<Muon::TrackSegmentAssociationTool> m_trackSegmentAssociationTool;
-    ToolHandle<Rec::IMuonTrackQuery>              m_trackQuery;
-    ToolHandle<Trk::IExtendedTrackSummaryTool>    m_trackSummaryTool;
-    Rec::CaloCellCollector                        m_cellCollector;
-    SG::ReadHandleKey<CaloCellContainer>          m_cellContainerName{this,"CaloCellContainer","AllCalo","calo cells"};
-    SG::ReadCondHandleKey<CaloNoise>              m_caloNoiseKey{this,"CaloNoise","","CaloNoise object to use, or blank."};
+    ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", "Handle to the service providing the IMuonEDMHelperSvc interface" };
+
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<Rec::IMuonPrintingTool> m_muonPrinter {this, "MuonPrinter", "Rec::MuonPrintingTool/MuonPrintingTool"};
+    ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"};
+    ToolHandle<Trk::ITrackParticleCreatorTool> m_particleCreator {this, "TrackParticleCreator", "Trk::TrackParticleCreatorTool/MuonCombinedTrackParticleCreator"};
+    ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_ambiguityProcessor {this, "AmbiguityProcessor", "Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"};
+    ToolHandle<Trk::IPropagator> m_propagator {this, "Propagator", "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"};
+    ToolHandle<xAOD::IMuonDressingTool> m_muonDressingTool {this, "MuonDressingTool", "MuonCombined::MuonDressingTool/MuonDressingTool"};
+    ToolHandle<Rec::IMuonMomentumBalanceSignificance> m_momentumBalanceTool {this, "MomentumBalanceTool", "Rec::MuonMomentumBalanceSignificanceTool/MuonMomentumBalanceSignificanceTool"};
+    ToolHandle<Rec::IMuonScatteringAngleSignificance> m_scatteringAngleTool {this, "ScatteringAngleTool", "Rec::MuonScatteringAngleSignificanceTool/MuonScatteringAngleSignificanceTool"};
+    ToolHandle<CP::IMuonSelectionTool> m_selectorTool {this, "MuonSelectionTool", "CP::MuonSelectionTool/MuonSelectionTool"};
+    ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool {this, "MuonSegmentConverterTool", "Muon::MuonSegmentConverterTool/MuonSegmentConverterTool"};
+    ToolHandle<Rec::IMuonMeanMDTdADCFiller> m_meanMDTdADCTool {this, "MeanMDTdADCTool", "Rec::MuonMeanMDTdADCFillerTool/MuonMeanMDTdADCFillerTool"};
+    ToolHandle<Trk::ITrkMaterialProviderTool> m_caloMaterialProvider {this, "CaloMaterialProvider", "Trk::TrkMaterialProviderTool/TrkMaterialProviderTool"};
+    ToolHandle<Muon::TrackSegmentAssociationTool> m_trackSegmentAssociationTool {this, "TrackSegmentAssociationTool", "Muon::TrackSegmentAssociationTool/TrackSegmentAssociationTool"};
+    ToolHandle<Rec::IMuonTrackQuery> m_trackQuery {this, "TrackQuery", "Rec::MuonTrackQuery/MuonTrackQuery"};
+    ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"};
+
+    Rec::CaloCellCollector m_cellCollector;
+
+    SG::ReadHandleKey<CaloCellContainer> m_cellContainerName{this,"CaloCellContainer","AllCalo","calo cells"};
+    SG::ReadCondHandleKey<CaloNoise> m_caloNoiseKey{this,"CaloNoise","","CaloNoise object to use, or blank."};
+
+    Gaudi::Property<bool> m_makeMSPreExtrapLink {this, "MakeTrackAtMSLink", false, "flag to decide whether or not to make link to MS track before extrapolation"};
+    Gaudi::Property<bool> m_buildStauContainer {this, "BuildStauContainer", false, "flag to decide whether to build stau or not"};
+    Gaudi::Property<bool> m_fillEnergyLossFromTrack {this, "FillEnergyLossFromTrack", true, "Decide whether to try to extract the calo energy loss from tracks "};
+    Gaudi::Property<bool> m_fillAlignmentEffectsOnTrack {this, "FillAlignmentEffectsOnTrack", true, "Decide whether to add alignment effects on track to the muon (available for CB and SA tracks)"};
+    Gaudi::Property<bool> m_fillExtraELossInfo {this, "FillExtraELossInfo", true, "Can enabled this for debugging - will add extra information not for production"};
+    Gaudi::Property<bool> m_printSummary {this, "PrintSummary", false, "flag to print muon edm"};
+    Gaudi::Property<bool> m_useUpdatedExtrapolatedTrack {this, "UseUpdatedExtrapolatedTrack", true, "configure whether to use the updated extrapolated track for a combined fit or not"};
+    Gaudi::Property<bool> m_fillTimingInformation {this, "FillTimingInformation", true, "enable filling of timing information"};
+    Gaudi::Property<bool> m_fillTimingInformationOnMuon {this, "FillTimingInformationOnMuon", false, "enable filling of timing information"};
+    Gaudi::Property<bool> m_segLowBeta {this, "AssociateSegmentsToLowBetaMuons", false, "associate segments to MuGirlLowBeta muons"};
+    Gaudi::Property<bool> m_useCaloCells {this, "UseCaloCells", true};
+    Gaudi::Property<bool> m_doSA {this, "MakeSAMuons", false};
+
+    Gaudi::Property<float> m_sigmaCaloNoiseCut {this, "SigmaCaloNoiseCut", 3.4};
   };
 
   inline void MuonCreatorTool::setP4( xAOD::Muon& muon, const xAOD::TrackParticle& tp ) const {
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx
index 1559d252bd036c8229a9ba4410ff12940409336d..8305ed20e164f5c5554e1fbea96c950213ef89cd 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx
@@ -10,11 +10,9 @@
 namespace MuonCombined {
 
 MuonDressingTool::MuonDressingTool (const std::string& type, const std::string& name, const IInterface* parent) :
-    AthAlgTool(type, name, parent),
-    m_hitSummaryTool("Muon::MuonHitSummaryTool/MuonHitSummaryTool")
+    AthAlgTool(type, name, parent)
 {
   declareInterface<xAOD::IMuonDressingTool>(this);
-  declareProperty("MuonHitSummaryTool", m_hitSummaryTool );
 }
 
 StatusCode MuonDressingTool::initialize() {
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.h
index 89dfd4c6de24c476b0ca1177e88c1a7bf05b1681..057ed7f66cec9b041b7b97594cbcd9d2ce6dc7ff 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.h
@@ -29,7 +29,7 @@ namespace MuonCombined {
     void addMuonHitSummary( xAOD::Muon& muon, const Trk::TrackSummary* summary = 0 ) const ;
 
   private:
-    ToolHandle<Muon::IMuonHitSummaryTool> m_hitSummaryTool;
+    ToolHandle<Muon::IMuonHitSummaryTool> m_hitSummaryTool {this, "MuonHitSummaryTool", "Muon::MuonHitSummaryTool/MuonHitSummaryTool"};
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   };
   
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.cxx
index 5d9f4211223e11fd1ecafc3619e6f1acaa03c03f..cac554b54d098a3b3e01535d0f968309eab16ab9 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.cxx
@@ -12,53 +12,33 @@
 
 #include "MuonSegmentTagTool.h"
 
-
 #include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
 #include "MuonCombinedEvent/InDetCandidate.h"
 #include "MuonCombinedEvent/MuonCandidate.h"
 #include "MuonCombinedEvent/SegmentTag.h"
-
 #include "TrkParameters/TrackParameters.h"
 #include "TrkTrack/Track.h"
 #include "TrkTrackSummary/TrackSummary.h"
 #include "TrkEventPrimitives/PropDirection.h"
 #include "MuonSegment/MuonSegment.h"
-
 #include "MSSurfaces.h"
 #include "MuonCombinedEvent/MuonSegmentInfo.h"
 #include "MuonCombinedEvent/SegmentTag.h"
 #include "xAODMuon/MuonSegmentContainer.h"
 #include "xAODMuon/MuonSegment.h"
 #include "AthLinks/ElementLink.h"
-
 #include "xAODMuon/MuonSegmentContainer.h"
 #include "xAODMuon/MuonSegment.h"
-
 #include "TrkCaloExtension/CaloExtension.h" 
 
 #include <iomanip>
 #include <vector>
-
 #include <stdio.h>
 
 namespace MuonCombined {
 
   MuonSegmentTagTool::MuonSegmentTagTool (const std::string& type, const std::string& name, const IInterface* parent) :
-  AthAlgTool(type, name, parent),
-	m_CutTheta(999.), 
-	m_CutPhi(999.), 
-	m_HitInfoFor2ndCoord(0.),
-	m_doSegmentsFilter(true), 
-	m_doTable(false), 
-	m_doBidirectional(false), 
-	m_doPtDependentPullCut(true),
-	m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
-	p_MuTagMatchingTool("MuTagMatchingTool/MuTagMatchingTool") ,
-	p_MuTagAmbiguitySolverTool("MuTagAmbiguitySolverTool/MuTagAmbiguitySolverTool") ,
-  	m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this),
-	m_segmentSelector("Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"),
-	m_hitSummaryTool("Muon::MuonSegmentHitSummaryTool/MuonSegmentHitSummaryTool"),
-	m_surfaces(0),
+    AthAlgTool(type, name, parent),
 	m_ntotTracks(0),
 	m_nangleMatch(0),
 	m_npmatch(0),
@@ -66,27 +46,6 @@ namespace MuonCombined {
 	m_naccepted(0)
   {
     declareInterface<IMuonSegmentTagTool>(this);
-    declareProperty("CutTheta"                        , m_CutTheta = 3.);
-    declareProperty("CutPhi"                          , m_CutPhi = 3.);
-    //Option for determination of segment 2nd coordinate measurement
-    declareProperty("HitInfoFor2ndCoord"              , m_HitInfoFor2ndCoord = 1); 
-    declareProperty("DoSegmentsFilter"                , m_doSegmentsFilter = true);
-    declareProperty("MuTagMatchingTool"               , p_MuTagMatchingTool);
-    declareProperty("MuTagAmbiguitySolverTool"        , p_MuTagAmbiguitySolverTool);
-    declareProperty("ParticleCaloExtensionTool"       , m_caloExtensionTool);    
-    declareProperty("DoOverviewTable"                 , m_doTable = false);
-    declareProperty("DoBidirectionalExtrapolation"    , m_doBidirectional = false);
-    declareProperty("DoPtDependentPullCut"            , m_doPtDependentPullCut = false);
-    declareProperty("Printer"                         , m_printer);
-    declareProperty("RemoveLowPLowFieldRegion"        , m_removeLowPLowFieldRegion = false); // remove tracks with momenta below 6 GeV in eta 1.4-17 region (low p and low field)
-    declareProperty("UseIDTrackSegmentPreSelect"      , m_useSegmentPreselection = true);
-    declareProperty("SegmentQualityCut"               , m_segmentQualityCut = 1);
-    declareProperty("nmdtHits"                        , m_nmdtHits = 4);
-    declareProperty("nmdtHoles"                       , m_nmdtHoles = 3);
-    declareProperty("nmdtHitsML"                      , m_nmdtHitsML = 2);
-    declareProperty("TriggerHitCut"                   , m_triggerHitCut = true);
-    declareProperty("MakeMuons"                       , m_makeMuons = false);
-    declareProperty("IgnoreSiAssociatedCandidates"    , m_ignoreSiAssocated = true);
   }
 
   StatusCode MuonSegmentTagTool::initialize() {
@@ -114,14 +73,12 @@ namespace MuonCombined {
       return StatusCode::FAILURE;
     }
 
-    m_surfaces = new MSSurfaces();
     m_doTable= true;
     return StatusCode::SUCCESS;
   }
 
   StatusCode MuonSegmentTagTool::finalize()
   {
-	  delete m_surfaces;
 	  ATH_MSG_INFO("Total number of considered ID tracks         " << m_ntotTracks);
 	  ATH_MSG_INFO("Total number of ID tracks with angular match " << m_nangleMatch);
 	  ATH_MSG_INFO("Total number of preselected ID tracks        " << m_npmatch);
@@ -162,6 +119,8 @@ namespace MuonCombined {
   void MuonSegmentTagTool::tag( const InDetCandidateCollection& inDetCandidates, const std::vector<const Muon::MuonSegment*>& segments, 
 				SegmentMap* segmentToxAODSegmentMap, InDetCandidateToTagMap* tagMap ) const {
 
+  	MSSurfaces surfaces = MSSurfaces();
+
     std::vector<const Muon::MuonSegment*>  FilteredSegmentCollection;
     if (m_doSegmentsFilter) {
 
@@ -339,9 +298,6 @@ namespace MuonCombined {
 	if( hasMatch ) ++m_npmatch;
       }
 
-
-      //    std::vector< const MuTaggedSegment* > muTagSegVec;
-
       std::vector< MuonCombined::MuonSegmentInfo > segmentsInfo;
       int multiply(1);
       if( m_doBidirectional ) multiply=2; 
@@ -388,7 +344,6 @@ namespace MuonCombined {
 	const Trk::TrackParameters* atSurface = 0;
 	const Trk::TrackParameters* nextSurface = 0;
 	std::vector< bool > hasSurf(12, false);
-     
 
 	for( unsigned int surface_counter = 0; surface_counter<12 ; ++surface_counter, ++extrapolation_counter ){
 	  ATH_MSG_DEBUG( "Surface " << surface_counter );
@@ -398,8 +353,7 @@ namespace MuonCombined {
 	  if( m_doTable ) didExtrapolate[extrapolation_counter] = "X" ;
 
 	  std::vector<std::string> segVsSurf( FilteredSegmentCollection.size() , "xxx" );
-	  //        int ndof(0);
-	  const Trk::Surface* surface = m_surfaces->getSurface( surface_counter ) ;
+	  const Trk::Surface* surface = surfaces.getSurface( surface_counter ) ;
 	
 	  switch (surface_counter) {
 
@@ -548,8 +502,6 @@ namespace MuonCombined {
 	      }
 	    
 	      if(m_doTable) {
-		//		std::string threeLetters( p_OwnEDMHelper->SegmentAssociatedStationName( **itSeg ) );
-		//		segStation[segmentCount] = threeLetters + p_OwnEDMHelper->EtaStationString( **itSeg) ;
 		segStation[segmentCount] = "   ";
 	      }
 
@@ -559,11 +511,11 @@ namespace MuonCombined {
 	      if( !m_doTable ){
 		isMatched = p_MuTagMatchingTool->match( atSurface, 
 							*itSeg, 
-							m_surfaces->stationType(surface_counter) );
+							surfaces.stationType(surface_counter) );
 	      } else {
 		if( !p_MuTagMatchingTool->surfaceMatch( atSurface,
 							*itSeg, 
-							m_surfaces->stationType(surface_counter) ) ) {
+							surfaces.stationType(surface_counter) ) ) {
 		  segVsSurf[segmentCount] = "surface" ;
 		  continue;
 		}
@@ -573,12 +525,12 @@ namespace MuonCombined {
 
 		if( !p_MuTagMatchingTool->phiMatch( atSurface,
 						    *itSeg, 
-						    m_surfaces->stationType(surface_counter) ) ) {    
+						    surfaces.stationType(surface_counter) ) ) {    
 		  segVsSurf[segmentCount] = "RghPhi" ;
 		  continue ;
 		}
 		if( trkEtaInfo ){
-		  if( (m_surfaces->stationType(surface_counter)).find('B') != std::string::npos ) {
+		  if( (surfaces.stationType(surface_counter)).find('B') != std::string::npos ) {
 		    if( !p_MuTagMatchingTool->thetaMatch( atSurface, *itSeg ) ){
 		      segVsSurf[segmentCount] = "RghTheta" ;
 		      continue;
@@ -612,11 +564,6 @@ namespace MuonCombined {
 	      MuonCombined::MuonSegmentInfo info = p_MuTagMatchingTool->muTagSegmentInfo(track,*itSeg,atSegSurface) ;
 	      if(segmentToxAODSegmentMap)
 			info.link = (*segmentToxAODSegmentMap)[*itSeg];
-		//              ATH_MSG_DEBUG( " MuTagSegmentInfo  matchPosition  pullY " <<  info.pullY << " pullX " << info.pullX << " resY " <<  info.resY << " resX " << info.resX << " exErrorY " <<  info.exErrorY << " ex errorX " << info.exErrorX << " seg errorY " << info.segErrorY << " seg errorX " << info.segErrorX );
-	      //              ATH_MSG_DEBUG( " MuTagSegmentInfo matchDirection pullYZ " <<  info.pullYZ << " pullXZ " << info.pullXZ << " resYZ " <<  info.dangleYZ << " resXZ " << info.dangleXZ << " exErrorYZ " <<  info.exErrorYZ << " ex errorXZ " << info.exErrorXZ << " seg errorYZ " << info.segErrorYZ << " seg errorXZ " << info.segErrorXZ );
-	      //              ATH_MSG_DEBUG( " MuTagSegmentInfo matchDistance hasPhi " << info.hasPhi << " resX " << info.resX << " dangleXZ " << info.dangleXZ << " maximumResidualAlongTube " << info.maximumResidualAlongTube << " resY " << info.resY << " dangleYZ " << info.dangleYZ );    
-	      //               ATH_MSG_DEBUG( " MuTagSegmentInfo matchCombined Pull hasPhi " << info.hasPhi << " minimumPullPhi " << info.minimumPullPhi << " pullChamber " << info.pullChamber << " pullCY " << info.pullCY );
-
 
 	      isMatched =  p_MuTagMatchingTool->matchSegmentPosition( &info,trkEtaInfo);
 
@@ -654,10 +601,6 @@ namespace MuonCombined {
 	      }
 	  
 	      isMatched =  p_MuTagMatchingTool->matchCombinedPull( &info);
-	      //           if(!isMatchedNew) {
-	      //                ATH_MSG_DEBUG( " Segment rejected by combined pull cut " );
-	      //           }
-
 	      if( !isMatched ){ 
 		if( m_doTable ){
 		  segVsSurf[segmentCount] = "cpull" ;
@@ -714,12 +657,11 @@ namespace MuonCombined {
   
       if( m_doTable ){
 	const Trk::Perigee* Perigee = track->perigeeParameters();
-	//    const Trk::Perigee*  idperigee = dynamic_cast< const Trk::Perigee* >(perigee);
 	ATH_MSG_DEBUG( "Dump Table for TP " << std::setw(5) << trackCount );
 	ATH_MSG_DEBUG( "storing track to ntuple : " << Perigee->parameters()[Trk::d0] << ", " <<Perigee->parameters()[Trk::z0] 
 		       << Perigee->parameters()[Trk::phi] << ", " <<Perigee->parameters()[Trk::theta]  << ", " <<Perigee->parameters()[Trk::qOverP] );
 
-	printTable( didExtrapolate, segStation, trkToSegment );
+	printTable( didExtrapolate, segStation, trkToSegment, surfaces);
       }
 
       if( !matchedSegment ) {
@@ -786,7 +728,6 @@ namespace MuonCombined {
       if(match) {     
         ATH_MSG_DEBUG( "make Segment Tag object for " << m_printer->print(*track) << " nr segments " << segmentsInfoTag.size() );          
         SegmentTag* tag = new SegmentTag(segmentsInfoTag);
-        // FIXME const-cast changes object passed in as const
 	tagMap->addEntry(tagCandidate,tag);
       } 
     }   
@@ -797,7 +738,7 @@ namespace MuonCombined {
 
   void MuonSegmentTagTool::printTable( std::vector< std::string > didEx ,  
 				       std::vector< std::string > segStation , 
-				       std::vector< std::vector<std::string> > segToSurf  ) const {
+				       std::vector< std::vector<std::string> > segToSurf, MSSurfaces &surfaces  ) const {
   
     ATH_MSG_DEBUG( std::setw(6) << "" << "EX? (o: no extrap, X: extrap failed, V: extrap OK)" );
 
@@ -812,7 +753,7 @@ namespace MuonCombined {
     if (m_doBidirectional) signstr = "+";
 
     for( unsigned int counter = 0; counter<12 ; ++counter ){
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(5) <<  m_surfaces->stationType(counter) << signstr << std::setw(3) << didEx[extrapolation_counter];
+      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(5) <<  surfaces.stationType(counter) << signstr << std::setw(3) << didEx[extrapolation_counter];
       for( unsigned int segment_counter = 0; segment_counter < segStation.size() ; ++segment_counter ){
 	if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(10) << (segToSurf[extrapolation_counter])[segment_counter];
       } //end loop segments
@@ -823,7 +764,7 @@ namespace MuonCombined {
     if(m_doBidirectional ){
       signstr = "-";
       for( unsigned int counter = 0; counter<12 ; ++counter ){
-	if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(5) <<  m_surfaces->stationType(counter) << signstr << std::setw(3) << didEx[extrapolation_counter]; 
+	if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(5) <<  surfaces.stationType(counter) << signstr << std::setw(3) << didEx[extrapolation_counter]; 
 	for( unsigned int segment_counter = 0; segment_counter < segStation.size() ; ++segment_counter ){
 	  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(10) << (segToSurf[extrapolation_counter])[segment_counter];
 	} //end loop segments
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.h
index 61068a058cf006a50762a83d87df7cadf259f10e..42d464b7896940a8adb357998a97734466ac9ebd 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonSegmentTagTool.h
@@ -54,42 +54,38 @@ namespace MuonCombined {
 
   private:
 
-    void printTable( std::vector< std::string > didEx ,  
-		     std::vector< std::string > segStation , 
-		     std::vector< std::vector<std::string> > segToSurf  ) const; //!< method for extra DEBUG
-
-    float m_CutTheta           ;//!< Track/Segment pairing
-    float m_CutPhi             ;//!< Track/Segment pairing 
-    float m_HitInfoFor2ndCoord ;//!< Track/Segment pairing
-    bool  m_doSegmentsFilter;      //!< flag to switch segment filtering on/off (for trigger)
-    bool  m_doTable;
-    bool  m_doBidirectional ;   //!< flag to toggle to bidirectional extrapolation.
-    bool  m_doPtDependentPullCut; //!< flag to enable the pT-dependent pull cut
-    bool m_removeLowPLowFieldRegion; //! boolean to remove track with p < 6 GeV in eta 1.4-17 region
-    bool m_useSegmentPreselection; // use loose ID / segment matching to avoid extrapolations
-    int  m_segmentQualityCut; // minimum segment quality
-    unsigned int m_nmdtHits;
-    unsigned int m_nmdtHoles;
-    unsigned int m_nmdtHitsML;
-    bool m_triggerHitCut; // apply Trigger hit cut if trigger hits are expected
-    bool m_makeMuons; // switch off the making of muons (temporarily)
-    bool m_ignoreSiAssocated; //!< If true, ignore InDetCandidates which are SiAssociated
-
-    // helpers, managers, tools
-    ToolHandle<Muon::MuonEDMPrinterTool>            m_printer;
-
-
-    ToolHandle< IMuTagMatchingTool       > p_MuTagMatchingTool        ;  //!< Pointer to MuTagMatching Tool 
-    ToolHandle< IMuTagAmbiguitySolverTool> p_MuTagAmbiguitySolverTool ;  //!< Pointer to MuTagAmbiguitySolverTool
-    ToolHandle <Trk::IParticleCaloExtensionTool> m_caloExtensionTool; //!< Tool to make the step-wise extrapolation
+    void printTable(std::vector<std::string> didEx, std::vector<std::string> segStation, std::vector<std::vector<std::string>> segToSurf, MSSurfaces &surfaces) const; //!< method for extra DEBUG
+
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-    ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", 
-      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
-      "Handle to the service providing the IMuonEDMHelperSvc interface" };  //!< Pointer to IPropagator
-    ToolHandle< Muon::IMuonSegmentSelectionTool> m_segmentSelector; 
-    ToolHandle<Muon::IMuonSegmentHitSummaryTool> m_hitSummaryTool;
+    ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", "Handle to the service providing the IMuonEDMHelperSvc interface" };
+
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
+    ToolHandle<IMuTagMatchingTool> p_MuTagMatchingTool {this, "MuTagMatchingTool", "MuTagMatchingTool/MuTagMatchingTool"};
+    ToolHandle<IMuTagAmbiguitySolverTool> p_MuTagAmbiguitySolverTool {this, "MuTagAmbiguitySolverTool", "MuTagAmbiguitySolverTool/MuTagAmbiguitySolverTool"};
+    ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool to make the step-wise extrapolation"};
+    ToolHandle<Muon::IMuonSegmentSelectionTool> m_segmentSelector {this, "MuonSegmentSelectionTool", "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"};
+    ToolHandle<Muon::IMuonSegmentHitSummaryTool> m_hitSummaryTool {this, "MuonSegmentHitSummaryTool", "Muon::MuonSegmentHitSummaryTool/MuonSegmentHitSummaryTool"};
+
+    Gaudi::Property<float> m_CutTheta {this, "CutTheta", 3};
+    Gaudi::Property<float> m_CutPhi {this, "CutPhi", 3};
+    Gaudi::Property<float> m_HitInfoFor2ndCoord {this, "HitInfoFor2ndCoord", 1, "Option for determination of segment 2nd coordinate measurement"};
+
+    Gaudi::Property<bool> m_doSegmentsFilter {this, "DoSegmentsFilter", true, "flag to switch segment filtering on/off (for trigger)"};
+    Gaudi::Property<bool> m_doTable {this, "DoOverviewTable", false};
+    Gaudi::Property<bool> m_doBidirectional {this, "DoBidirectionalExtrapolation", false, "flag to toggle to bidirectional extrapolation"};
+    Gaudi::Property<bool> m_doPtDependentPullCut {this, "DoPtDependentPullCut", false, "flag to enable the pT-dependent pull cut"};
+    Gaudi::Property<bool> m_removeLowPLowFieldRegion {this, "RemoveLowPLowFieldRegion", false, "remove track with p < 6 GeV in eta 1.4-17 region (low p and low field)"};
+    Gaudi::Property<bool> m_useSegmentPreselection {this, "UseIDTrackSegmentPreSelect", true, "use loose ID / segment matching to avoid extrapolations"};
+
+    Gaudi::Property<int> m_segmentQualityCut {this, "SegmentQualityCut", 1, "minimum segment quality"};
+    Gaudi::Property<unsigned int> m_nmdtHits {this, "nmdtHits", 4};
+    Gaudi::Property<unsigned int> m_nmdtHoles {this, "nmdtHoles", 3};
+    Gaudi::Property<unsigned int> m_nmdtHitsML {this, "nmdtHitsML", 2};
+
+    Gaudi::Property<bool> m_triggerHitCut {this, "TriggerHitCut", true, "apply Trigger hit cut if trigger hits are expected"};
+    Gaudi::Property<bool> m_makeMuons {this, "MakeMuons", false, "switch off the making of muons (temporarily)"};
+    Gaudi::Property<bool> m_ignoreSiAssocated {this, "IgnoreSiAssociatedCandidates", true, "If true, ignore InDetCandidates which are SiAssociated"};
 
-    MSSurfaces*   m_surfaces;     //!< Pointer to a set of abstract surfaces describing MuonSpectrometer levels.
     mutable std::atomic_uint m_ntotTracks;
     mutable std::atomic_uint m_nangleMatch;
     mutable std::atomic_uint m_npmatch;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx
index 3220749f438fe038da49d6046bc625d17637fa8a..b7caac4d9d7eae3d3cbc52ebc2384156bb840349 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.cxx
@@ -1,39 +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
 */
 
 #include "TrackSegmentAssociationTool.h"
 #include "TrkTrack/Track.h"
 #include "TrkSegment/SegmentCollection.h"
 #include "MuonSegment/MuonSegment.h"
-#include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
 #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
 #include "MuonSegmentMakerUtils/MuonSegmentKey.h"
 #include "MuonSegmentMakerUtils/CompareMuonSegmentKeys.h"
 
 namespace Muon {
 
-  //Constructor
-
-  TrackSegmentAssociationTool::TrackSegmentAssociationTool(const std::string& t, 
-                                                                 const std::string& n, 
-                                                                 const IInterface* p):
-    AthAlgTool(t,n,p),
-    m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool")
-  {
-  
-    declareInterface<TrackSegmentAssociationTool>(this);
-    //  declareInterface<ITrackSegmentAssociationTool>(this);
-
-    declareProperty("MuonEDMPrinterTool",m_printer);
+  TrackSegmentAssociationTool::TrackSegmentAssociationTool(const std::string& t, const std::string& n, const IInterface* p) :
+    AthAlgTool(t,n,p) {
+      declareInterface<TrackSegmentAssociationTool>(this);
   }
 
-  //Destructor
-
-  TrackSegmentAssociationTool::~TrackSegmentAssociationTool() {}
-
-  //Initialization
-
   StatusCode TrackSegmentAssociationTool::initialize() {
     ATH_CHECK(m_edmHelperSvc.retrieve());
     ATH_CHECK(m_printer.retrieve());
@@ -41,13 +24,6 @@ namespace Muon {
     return StatusCode::SUCCESS;
   }
 
-  //Finalization
-
-  StatusCode TrackSegmentAssociationTool::finalize() {
-    return StatusCode::SUCCESS;
-  }
-
-
   const xAOD::MuonSegmentContainer* TrackSegmentAssociationTool::retrieveSegments( std::string location ) const {
     
     if( !evtStore()->contains<xAOD::MuonSegmentContainer>(location) ) {
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h
index 0c73765258059762c5b07265e9fc49c342938953..68879dc3ec63a7282006c315d2c7ae8e87dcd141 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/TrackSegmentAssociationTool.h
@@ -1,13 +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
 */
 
 #ifndef TRACKSEGMENTASSOCIATIONTOOL_H
 #define TRACKSEGMENTASSOCIATIONTOOL_H
 
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
+
 #include "TrkSegment/SegmentCollection.h"
 #include "xAODMuon/Muon.h"
 #include "xAODMuon/MuonSegmentContainer.h"
@@ -31,14 +32,9 @@ namespace Muon{
   public:
     TrackSegmentAssociationTool(const std::string&, const std::string&, const IInterface*);
 
-    /** default destructor **/
-    ~TrackSegmentAssociationTool();
+    ~TrackSegmentAssociationTool()=default;
 
-    /** standard initialization method **/
     StatusCode initialize();
-    
-    /** standard finalization method **/
-    StatusCode finalize();
 
     /** Returns a list of segments that match with the input Muon. */
     bool associatedSegments(const xAOD::Muon& muon, 
@@ -53,7 +49,7 @@ namespace Muon{
     ServiceHandle<Muon::IMuonEDMHelperSvc>  m_edmHelperSvc {this, "edmHelper", 
       "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
       "Handle to the service providing the IMuonEDMHelperSvc interface" };
-    ToolHandle<Muon::MuonEDMPrinterTool> m_printer;
+    ToolHandle<Muon::MuonEDMPrinterTool> m_printer{this,"MuonEDMPrinterTool","Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
 
     SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_segments{this,"MuonSegmentLocation","MuonSegments","muon segments"};
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py
index a6c669de7e7e4db2e779dfb8f19d24191c4c994a..a5624da3b662f00ef17b766f1bd64c0c0793cfe8 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py
@@ -47,17 +47,17 @@ def MuonCombinedTrackSummaryToolCfg(flags, name="", **kwargs):
     from MuonConfig.MuonRecToolsConfig import MuonTrackSummaryHelperToolCfg
     acc = MuonTrackSummaryHelperToolCfg(flags)
     muon_track_summary_helper_tool = acc.getPrimary()
-    track_summary_tool = CompFactory.Trk.TrackSummaryTool(name            = "CombinedMuonTrackSummary",
-                                                                doSharedHits             = False,
-                                                                doHolesInDet             = True,
-                                                                doHolesMuon              = False,
-                                                                AddDetailedInDetSummary  = True,
-                                                                AddDetailedMuonSummary   = True,
-                                                                InDetSummaryHelperTool   = indet_track_summary_helper_tool,
-                                                                TRT_ElectronPidTool      = None,
-                                                                PixelToTPIDTool          = None,
-                                                                MuonSummaryHelperTool    = muon_track_summary_helper_tool,
-                                                                PixelExists              = True )
+    track_summary_tool = CompFactory.Trk.TrackSummaryTool(name="CombinedMuonTrackSummary",
+                                                          doSharedHits             = False,
+                                                          doHolesInDet             = True,
+                                                          doHolesMuon              = False,
+                                                          AddDetailedInDetSummary  = True,
+                                                          AddDetailedMuonSummary   = True,
+                                                          InDetSummaryHelperTool   = indet_track_summary_helper_tool,
+                                                          TRT_ElectronPidTool      = None,
+                                                          PixelToTPIDTool          = None,
+                                                          MuonSummaryHelperTool    = muon_track_summary_helper_tool,
+                                                          PixelExists              = True )
     result.merge(acc)
     result.addPublicTool(track_summary_tool)
     result.setPrivateTools(track_summary_tool)
@@ -216,6 +216,15 @@ def MuonCreatorToolCfg(flags, name="MuonCreatorTool", **kwargs):
     kwargs.setdefault("ParticleCaloExtensionTool", acc.getPrimary() )
     result.merge(acc)
 
+    from MuonConfig.MuonRecToolsConfig import MuonAmbiProcessorCfg, MuonTrackSummaryToolCfg
+    acc = MuonAmbiProcessorCfg(flags)
+    kwargs.setdefault("AmbiguityProcessor", acc.popPrivateTools())
+    result.merge(acc)
+
+    acc = MuonTrackSummaryToolCfg(flags)
+    kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools())
+    result.merge(acc)
+
     # This tool needs MuonScatteringAngleSignificanceTool... which in turn needs TrackingVolumeSvc.
     # FIXME - probably this should be someplace central.
     trackingVolSvc = CompFactory.Trk.TrackingVolumesSvc(name="TrackingVolumesSvc")
@@ -311,6 +320,11 @@ def MuonCombinedFitTagToolCfg(flags, name="MuonCombinedFitTagTool",**kwargs):
     kwargs.setdefault("MatchQuality",           acc.popPrivateTools() )
     result.merge(acc)
 
+    from MuonConfig.MuonRecToolsConfig import MuonTrackScoringToolCfg
+    acc = MuonTrackScoringToolCfg(flags)
+    kwargs.setdefault("TrackScoringTool", acc.popPrivateTools())
+    result.merge(acc)
+
     tool = CompFactory.MuonCombined.MuonCombinedFitTagTool(name,**kwargs)
     result.setPrivateTools(tool)
     return result 
diff --git a/Reconstruction/RecExample/RecExAlgs/CMakeLists.txt b/Reconstruction/RecExample/RecExAlgs/CMakeLists.txt
deleted file mode 100644
index f98544c14cae7749ee5bb3e196aa3a40f9599ba6..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Package: RecExAlgs
-################################################################################
-
-# Declare the package name:
-atlas_subdir( RecExAlgs )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/SGTools
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate )
-
-# Component(s) in the package:
-atlas_add_component( RecExAlgs
-                     src/*.cxx
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps AthenaKernel SGTools GaudiKernel StoreGateLib SGtests )
-
-# Install files from the package:
-atlas_install_headers( RecExAlgs )
-atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
-atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ignore=F401,F821 )
diff --git a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleCookedObj.h b/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleCookedObj.h
deleted file mode 100755
index a07889785eac7fa35dfb9c23d9716e31849b1856..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleCookedObj.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SIMPLECOOKEDOBJ_H
-#define SIMPLECOOKEDOBJ_H 1
-#include "AthenaKernel/CLASS_DEF.h"
-#include "SGTools/BuiltinsClids.h"
-
-typedef float SimpleCookedObj;
-
-// clid for float is now defined by SGTools
-//CLASS_DEF(SimpleCookedObj,245111483,1)
-
-#endif // not SIMPLECOOKEDOBJ_H
diff --git a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleCookedObjMaker.h b/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleCookedObjMaker.h
deleted file mode 100755
index 727ddc97b30b79de63fc49574f55addd8f7755d0..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleCookedObjMaker.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// SimpleCookedObjMaker.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef SIMPLECOOKEDOBJMAKER_H
-#define SIMPLECOOKEDOBJMAKER_H 1
-
-// framework includes
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include <string>
-
-class AtlasDetectorID;
-class Identifier;
-
-
-  /** @class SimpleCookedObjMaker
-
-      This is for the Doxygen-Documentation.  
-      Please delete these lines and fill in information about
-      the Algorithm!
-      Please precede every member function declaration with a
-      short Doxygen comment stating the purpose of this function.
-      
-      @author  David Rousseau <rousseau@lal.in2p3.fr>
-  */  
-
-  class SimpleCookedObjMaker : public AthAlgorithm
-    {
-    public:
-
-       /** Standard Athena-Algorithm Constructor */
-       SimpleCookedObjMaker(const std::string& name, ISvcLocator* pSvcLocator);
-       /** Default Destructor */
-       ~SimpleCookedObjMaker();
-
-       /** standard Athena-Algorithm method */
-       StatusCode          initialize();
-       /** standard Athena-Algorithm method */
-       StatusCode          execute();
-       /** standard Athena-Algorithm method */
-       StatusCode          finalize();
-
-    private:
-      
-      /** member variables for algorithm properties: */
-      std::vector<std::string>  m_rawObjNames;
-      std::string  m_cookedObjOutputName;
-      std::string  m_cookedMessage;
-      
-    }; 
-
-
-#endif 
diff --git a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleRawObj.h b/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleRawObj.h
deleted file mode 100755
index 5154fd29108c7404471f8ad08e5ae9c81dd44452..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleRawObj.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SIMPLERAWOBJ_H
-#define SIMPLERAWOBJ_H 1
-#include "AthenaKernel/CLASS_DEF.h"
-#include "SGTools/BuiltinsClids.h"
-
-typedef int SimpleRawObj;
-
-// Clid for integer is now defined in SGTools
-//CLASS_DEF(SimpleRawObj,221490383,1)
-
-#endif // not SIMPLERAWOBJ_H
diff --git a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleRawObjMaker.h b/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleRawObjMaker.h
deleted file mode 100755
index d81f6960c740ab850c06fea96a018d125b508063..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/RecExAlgs/SimpleRawObjMaker.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// SimpleRawObjMaker.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef SIMPLERAWOBJMAKER_H
-#define SIMPLERAWOBJMAKER_H 1
-
-// Gaudi includes
-#include "GaudiKernel/ServiceHandle.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include <string>
-
-class AtlasDetectorID;
-class Identifier;
-
-
-  /** @class SimpleRawObjMaker
-
-      This is for the Doxygen-Documentation.  
-      Please delete these lines and fill in information about
-      the Algorithm!
-      Please precede every member function declaration with a
-      short Doxygen comment stating the purpose of this function.
-      
-      @author  David Rousseau <rousseau@lal.in2p3.fr>
-  */  
-
-  class SimpleRawObjMaker : public AthAlgorithm
-    {
-    public:
-
-       /** Standard Athena-Algorithm Constructor */
-       SimpleRawObjMaker(const std::string& name, ISvcLocator* pSvcLocator);
-       /** Default Destructor */
-       ~SimpleRawObjMaker();
-
-       /** standard Athena-Algorithm method */
-       StatusCode          initialize();
-       /** standard Athena-Algorithm method */
-       StatusCode          execute();
-       /** standard Athena-Algorithm method */
-       StatusCode          finalize();
-
-    private:
-      
-      /** member variables for algorithm properties: */
-      std::string  m_rawObjOutputName;
-      std::string  m_rawMessage;
-      
-    }; 
-
-
-#endif 
diff --git a/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h b/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h
deleted file mode 100644
index 5854b78a7341820cf89985cf5cf9049ab7cc65ec..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-@page RecExAlgs_page RecExAlgs Package
-
->> Please enter an overview of the created package here: What does it contain?
-
-@author David Rousseau <rousseau@lal.in2p3.fr>
-
-@section RecExAlgs_RecExAlgsIntro Introduction
-
->> Please enter a brief description of the package here.
-
-
-
-*/
diff --git a/Reconstruction/RecExample/RecExAlgs/python/SimpleCookedObjGetter.py b/Reconstruction/RecExample/RecExAlgs/python/SimpleCookedObjGetter.py
deleted file mode 100755
index 04653bf5d63aa9755c939885d8402cee2683a115..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/python/SimpleCookedObjGetter.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# specifies a specific SimpleCookedObjMaker instance
-
-from AthenaCommon.Logging import logging
-from RecExConfig.Configured import Configured
-
-class SimpleCookedObjGetter ( Configured )  :
-    _outputType = "SimpleCookedObj"
-    _output = { _outputType : "SimpleCookedObjBlaBlaDict" }
-
-        
-    def configure(self):
-        mlog = logging.getLogger( 'Py:SimpleCookedObjGetter::configure %s:' % self.__class__ )
-
-
-        # work indeed
-        # from __main__ import include
-        # include("RecExAlgs/SimpleCookedObjMaker_jobOptions.py")
-
-        # get handle to upstream object
-
-        try: 
-            from RecExAlgs.SimpleRawObjGetter import SimpleRawObjGetter
-        except ImportError:
-            mlog.error("could not import SimpleRawObjGetter. Quit")
-            return False
-            
-        theSimpleRawObjGetter=SimpleRawObjGetter()
-
-        if not theSimpleRawObjGetter.usable():
-            if not self.ignoreConfigError():
-                mlog.error("SimpleRawObjGetter unusable. Quit.")
-                return False
-            else:
-                mlog.error("SimpleRawObjGetter unusable. Continue nevertheless")
-
-                
-        # get handle to tools
-        
-
-        # now configure the algorithm, part of this could be done in a separate class
-        # cannot have same name
-        try:
-            from RecExAlgs.RecExAlgsConf import SimpleCookedObjMaker
-        except ImportError:
-            mlog.error("could not import SimpleCookedObjMaker. Quit")
-            return False
-
-        theSimpleCookedObjMaker=SimpleCookedObjMaker()
-        self._SimpleCookedObjMakerHandle = theSimpleCookedObjMaker
-        theSimpleCookedObjMaker.CookedMessage= "From SimpleCookedObjGetter.py"
-        #
-
-        # sets output key  
-        # these two lines are completely equivalent
-        #self.SimpleCookedObjMakerHandle().CookedObjOutputName=self.outputKey()
-        theSimpleCookedObjMaker.CookedObjOutputName=self.outputKey()        
-
-
-        # register output in objKeyStore
-        # should eventually specify there that object to be written in a stream
-        from RecExConfig.ObjKeyStore import objKeyStore
-        objKeyStore.addStreamESD(self.outputType(),self.outputKey())
-        # if only transient store
-        # objKeyStore.addTransient(self.outputType(),self.outputKey())
-
-
-        # can alter upstream alg property here, not recommended
-        # theSimpleRawObjGetter.SimpleRawObjMakerHandle().RawMessage= "from SimpleCookedObjGetter"
-        
-        theSimpleCookedObjMaker.RawObjNames = [ theSimpleRawObjGetter.outputKey()]
-
-        
-        # now add algorithm to topSequence
-        # this should always come at the end
-
-        mlog.info(" now adding to topSequence")
-        from AthenaCommon.AlgSequence import AlgSequence
-        topSequence = AlgSequence()
-        topSequence += self.SimpleCookedObjMakerHandle()
-
-        
-        return True
-
-    def SimpleCookedObjMakerHandle(self):
-        return self._SimpleCookedObjMakerHandle
-
-   
-# would work only if one output object type
-    def outputKey(self):
-        return self._output[self._outputType]
-
-    def outputType(self):
-        return self._outputType
-
-    def outputTypeKey(self):
-        return str(self.outputType()+"#"+self.outputKey())
-
-
diff --git a/Reconstruction/RecExample/RecExAlgs/python/SimpleRawObjGetter.py b/Reconstruction/RecExample/RecExAlgs/python/SimpleRawObjGetter.py
deleted file mode 100755
index b2d1f95d5289e6d1ca324ade64fab18fec6f12c2..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/python/SimpleRawObjGetter.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# specifies a specific SimpleRawObjMaker instance
-
-from AthenaCommon.Logging import logging
-from RecExConfig.Configured import Configured
-
-
-class SimpleRawObjGetter ( Configured )  :
-    _outputType = "SimpleRawObj"
-    # initialisation syntax {"typea":["key1", "key2"], "typeb":"key"}
-    _output =  { _outputType :"SimpleRawObjBlaBlaDict" }
-
-
-    def configure(self):
-        # should be only one
-        mlog = logging.getLogger( 'Py:SimpleRawObjGetter::configure %s:' % self.__class__ )
-
-
-
-        # now configure the algorithm, part of this could be done in a separate file, a Configurable python class for example
-
-        try:
-            from RecExAlgs.RecExAlgsConf import SimpleRawObjMaker
-        except ImportError as err:
-            mlog.error("could not import SimpleRawObjMaker:")
-            mlog.error(err)
-            return False
-
-        # create alg instance
-        theSimpleRawObjMaker=SimpleRawObjMaker()
-        self._SimpleRawObjMakerHandle = theSimpleRawObjMaker 
-        # sets output key  
-
-
-        theSimpleRawObjMaker.RawObjOutputName=self.outputKey()
-
-        theSimpleRawObjMaker.RawMessage=" from SimpleRawObjGetter "
-        # this line is equivalent to the previous
-        #self.SimpleRawObjMakerHandle().RawMessage=" from SimpleRawObjGetter "     
-        
-        from RecExConfig.ObjKeyStore import objKeyStore
-        objKeyStore.addTransient(self.outputType(),self.outputKey())
-
-        #anotherSimpleRawObjMaker=SimpleRawObjMaker()
-
-        mlog.info(" now adding to topSequence")
-        from AthenaCommon.AlgSequence import AlgSequence
-        topSequence = AlgSequence()
-        topSequence += self.SimpleRawObjMakerHandle()
-
-        # this still work
-        #theAlg.RawMessage=" from SimpleRawObjGetter with theAlg after topseq"             
-
-        mlog.info(" leaving configure")
-        
-        return True
-
-
-    def SimpleRawObjMakerHandle(self):
-        return self._SimpleRawObjMakerHandle
-   
-# would work only if one output object type
-    def outputKey(self):
-        return self._output[self._outputType]
-
-    def outputType(self):
-        return self._outputType
-
-    def outputTypeKey(self):
-        return str(self.outputType()+"#"+self.outputKey())
-
-
-
diff --git a/Reconstruction/RecExample/RecExAlgs/python/__init__.py b/Reconstruction/RecExample/RecExAlgs/python/__init__.py
deleted file mode 100755
index d2e5c08f4caec9bce247929f1daa12f39e853fd3..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/python/__init__.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#=======================================================================
-# File: RecExAlgs/python/__init__.py
-#=======================================================================
-__version__ = '1.0.0'
-__author__  = 'David Rousseau '
-__all__ = [ 'SimpleRawObjGetter','SimpleCookedObjGetter'] 
-__doc__ =""" - Python modules for the ATLAS Reconstruction - 
-         SimpleRawObjGetter  -> driving SimpleRawObjMaker alg 
-         SimpleCookedObjGetter  -> driving SimpleCookedObjMaker alg 
-         """ 
-__description__ ='Python interface for ATLAS reconstruction '
-
-#
-#=======================================================================
-
diff --git a/Reconstruction/RecExample/RecExAlgs/share/SimpleCookedObjMaker_jobOptions.py b/Reconstruction/RecExample/RecExAlgs/share/SimpleCookedObjMaker_jobOptions.py
deleted file mode 100755
index d2cb925bb74e3b82db304609abad67af8af52af1..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/share/SimpleCookedObjMaker_jobOptions.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-## get a handle on the algsequence
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-## add our alg
-from AthenaCommon                       import CfgMgr
-job += CfgMgr.SimpleCookedObjMaker()
-job.SimpleCookedObjMaker.RawObjNames = ["reallyRaw"]
-job.SimpleCookedObjMaker.CookedObjOutputName = "reallyCooked"
diff --git a/Reconstruction/RecExample/RecExAlgs/share/SimpleRawObjMaker_jobOptions.py b/Reconstruction/RecExample/RecExAlgs/share/SimpleRawObjMaker_jobOptions.py
deleted file mode 100755
index 056daf12f8355dea2b85ac0594caad4d6976aaab..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/share/SimpleRawObjMaker_jobOptions.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-## get a handle on the algsequence
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-
-## add our algorithm
-from AthenaCommon                       import CfgMgr
-job += CfgMgr.SimpleRawObjMaker()
-job.SimpleRawObjMaker.RawObjOutputName = "reallyRaw"
diff --git a/Reconstruction/RecExample/RecExAlgs/src/SimpleCookedObjMaker.cxx b/Reconstruction/RecExample/RecExAlgs/src/SimpleCookedObjMaker.cxx
deleted file mode 100755
index 76c6c71501ddc22950ab8f7f49e94bed81078bf4..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/src/SimpleCookedObjMaker.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// SimpleCookedObjMaker.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#include "RecExAlgs/SimpleCookedObjMaker.h"
-#include "RecExAlgs/SimpleCookedObj.h"
-#include "RecExAlgs/SimpleRawObj.h"
-
-//================ Constructor =================================================
-
-::SimpleCookedObjMaker::SimpleCookedObjMaker(const std::string& name, ISvcLocator* pSvcLocator)
-  :
-  AthAlgorithm(name,pSvcLocator),
-  m_cookedObjOutputName("unspecified"),
-  m_cookedMessage("unspecified")
-
-{
-  //  template for property decalration
-
-  declareProperty("RawObjNames", m_rawObjNames, " input objects key list ");
-  declareProperty("CookedObjOutputName", m_cookedObjOutputName, " output object key ");
-  declareProperty("CookedMessage", m_cookedMessage, " message to be printed");
-}
-
-//================ Destructor =================================================
-
-SimpleCookedObjMaker::~SimpleCookedObjMaker()
-{}
-
-
-//================ Initialisation =================================================
-
-StatusCode SimpleCookedObjMaker::initialize()
-{
-  // Code entered here will be executed once at program start.
-  
-  ATH_MSG_INFO(" initialize()" << endmsg
-               << " Cooked Message is: " << m_cookedMessage);
-
-  if (m_rawObjNames.size()==0) {
-    ATH_MSG_ERROR(" no input rawObj specified ");
-    return StatusCode::FAILURE;
-  } else {
-    for (std::vector<std::string>::const_iterator 
-           theRawObjName=m_rawObjNames.begin(),
-           itrEnd=m_rawObjNames.end();
-         theRawObjName != itrEnd;
-         ++theRawObjName) {
-      ATH_MSG_INFO(" will read in rawObj with key " << (*theRawObjName));
-    }
-  }
-
-  ATH_MSG_INFO(" will write out CookedObj with key " << m_cookedObjOutputName);
-
-  ATH_MSG_INFO("initialize() successful in " << name());
-  return StatusCode::SUCCESS;
-}
-
-//================ Finalisation =================================================
-
-StatusCode SimpleCookedObjMaker::finalize()
-{
-  // Code entered here will be executed once at the end of the program run.
-  return StatusCode::SUCCESS;
-}
-
-//================ Execution ====================================================
-
-StatusCode SimpleCookedObjMaker::execute()
-{
-
-  ATH_MSG_INFO(" Cooked Message is: " << m_cookedMessage);
-
-  for (std::vector<std::string>::const_iterator 
-         theRawObjName=m_rawObjNames.begin(),
-         itrEnd = m_rawObjNames.end();
-       theRawObjName!=itrEnd;
-       ++theRawObjName) {
-    ATH_MSG_INFO(" reading in in rawObj with key " << (*theRawObjName));
-
-    const SimpleRawObj * theRawObj=0;
-    StatusCode sc = evtStore()->retrieve(theRawObj,*theRawObjName);
-    if (!sc.isSuccess()) {
-      ATH_MSG_ERROR(" could not read in SimpleRawObj " << m_cookedObjOutputName);
-    }
-  }
-
-
-  SimpleCookedObj * theCookedObj = new SimpleCookedObj();
-
-  ATH_MSG_INFO(" recording SimpleCookedObj " << m_cookedObjOutputName);
-
-  StatusCode sc = evtStore()->record(theCookedObj,m_cookedObjOutputName,false);
-
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR(" could not record SimpleCookedObj " << m_cookedObjOutputName);
-  }
- 
-
-
-
-  // Code entered here will be executed once per event
-  return StatusCode::SUCCESS;
-}
-
-//============================================================================================
-
diff --git a/Reconstruction/RecExample/RecExAlgs/src/SimpleRawObjMaker.cxx b/Reconstruction/RecExample/RecExAlgs/src/SimpleRawObjMaker.cxx
deleted file mode 100755
index 1478bebf88112faf58ea80335f955b4dacb3b4c1..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/src/SimpleRawObjMaker.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// SimpleRawObjMaker.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#include "RecExAlgs/SimpleRawObjMaker.h"
-#include "RecExAlgs/SimpleRawObj.h"
-
-//================ Constructor =================================================
-
-SimpleRawObjMaker::SimpleRawObjMaker(const std::string& name, ISvcLocator* pSvcLocator)
-  :
-  AthAlgorithm(name,pSvcLocator),
-  m_rawObjOutputName("unspecified"),
-  m_rawMessage("unspecified")
-{
-  //  template for property declaration
-  declareProperty("RawObjOutputName", m_rawObjOutputName, "key of output object");
-  declareProperty("RawMessage", m_rawMessage,"message to be printed");
-}
-
-//================ Destructor =================================================
-
-SimpleRawObjMaker::~SimpleRawObjMaker()
-{}
-
-
-//================ Initialisation =================================================
-
-StatusCode SimpleRawObjMaker::initialize()
-{
-  // Code entered here will be executed once at program start.
-  
-  ATH_MSG_INFO(name() << " initialize()"
-               << endmsg
-               << " Raw Message is: " << m_rawMessage << endmsg
-               << " will write out RawObj with key " << m_rawObjOutputName);
-
-  ATH_MSG_INFO("initialize() successful in " << name());
-  return StatusCode::SUCCESS;
-}
-
-//================ Finalisation =================================================
-
-StatusCode SimpleRawObjMaker::finalize()
-{
-  // Code entered here will be executed once at the end of the program run.
-  return StatusCode::SUCCESS;
-}
-
-//================ Execution ====================================================
-
-StatusCode SimpleRawObjMaker::execute()
-{
-
-  ATH_MSG_INFO(" Raw Message is: " << m_rawMessage);
-
-  SimpleRawObj * theObj = new SimpleRawObj();
-
-  ATH_MSG_INFO(" recording SimpleRawObj " << m_rawObjOutputName);
-
-  StatusCode sc = evtStore()->record(theObj,m_rawObjOutputName,false);
-
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR(" could not record theObj " << m_rawObjOutputName);
-  }
-  
-  // Code entered here will be executed once per event
-  return StatusCode::SUCCESS;
-}
-
-//============================================================================================
-
diff --git a/Reconstruction/RecExample/RecExAlgs/src/components/RecExAlgs_entries.cxx b/Reconstruction/RecExample/RecExAlgs/src/components/RecExAlgs_entries.cxx
deleted file mode 100644
index b6a9beb481c90b5dfd19711f97fbd2ed79d2ccb7..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/src/components/RecExAlgs_entries.cxx
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "RecExAlgs/SimpleRawObjMaker.h"
-#include "RecExAlgs/SimpleCookedObjMaker.h"
-
-
-DECLARE_COMPONENT( SimpleRawObjMaker )
-DECLARE_COMPONENT( SimpleCookedObjMaker )
-
diff --git a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
index 8720819503bba414d40c8ffed115eea6e5f4b35e..016939583cb57e63861776be56b0fa272ec210a6 100644
--- a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
@@ -4,7 +4,6 @@ include.block ("RecExCommon/AnalysisCommon_topOptions.py")
 ## Common job preparation ##
 ############################
 
-svcMgr.CoreDumpSvc.FatalHandler = 438
 import traceback
 
 from AthenaCommon.Logging import logging
@@ -322,8 +321,6 @@ if rec.doFileMetaData():
     if not hasattr(svcMgr,"CutFlowSvc"):
         from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc
         CreateCutFlowSvc( svcName="CutFlowSvc", seq=topSequence, addMetaDataToAllOutputFiles=False )
-        #from EventBookkeeperTools.EventBookkeeperToolsConf import CutFlowSvc
-        #svcMgr+=CutFlowSvc()
         pass
     if rec.readAOD() or rec.readESD():
         #force CutFlowSvc execution (necessary for file merging)
@@ -426,13 +423,9 @@ if rec.doDPD() and (rec.DPDMakerScripts()!=[] or rec.doDPD.passThroughMode):
     #    MSMgr.WriteSkimDecisionsOfAllStreams()
     #    pass
 
-    #Configure CutFlowSv and common metadata
+    #Configure CutFlowSvc and common metadata
     if rec.doFileMetaData():
 
-        # # Determine current skimming cycle and input stream name
-        # svcMgr.CutFlowSvc.InputStream=rec.mergingStreamName()
-        # #svcMgr.CutFlowSvc.OutputLevel=DEBUG
-
         #Exception for DPD pass-through mode
         if rec.doDPD.passThroughMode:
             svcMgr.CutFlowSvc.InputStream="Virtual"
@@ -444,7 +437,6 @@ if rec.doDPD() and (rec.DPDMakerScripts()!=[] or rec.doDPD.passThroughMode):
             MSMgr.AddMetaDataItemToAllStreams( "LumiBlockCollection#*" )
             MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperContainer#*" )
             MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperAuxContainer#*" )
-            #MSMgr.AddMetaDataItemToAllStreams( "EventBookkeeperCollection#*" )
             MSMgr.AddMetaDataItemToAllStreams( "IOVMetaDataContainer#*" )
             pass
         pass
diff --git a/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py b/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py
index 84739a1f3bad0c1e7ac4cdad86e7cf246176081d..46d1e16359f3366b1c94dc99a11b36faac3ea6e3 100644
--- a/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py
+++ b/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py
@@ -15,7 +15,7 @@ svcMgr = theApp.serviceMgr()
 if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
     logBSRead.error("Can't find ByteStreamAddressProviderSvc!")
 
-if not athenaCommonFlags.isOnline() and not rec.readTAG():
+if not athenaCommonFlags.isOnline() and not rec.readTAG() and not globalflags.isOverlay():
     try:
         svcMgr.EventSelector.ProcessBadEvent=True
     except Exception:
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 9e67abc9d9f8ef8e91dc4876feb57520e4c2f653..98d249a73373ce64cf3b782c2ce1380dfa4bfec2 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -4,7 +4,6 @@ include.block ("RecExCommon/RecExCommon_topOptions.py")
 ## Common job preparation ##
 ############################
 
-svcMgr.CoreDumpSvc.FatalHandler = 438
 import traceback
 
 from AthenaCommon.Logging import logging
@@ -796,14 +795,6 @@ pdr.flag_domain('output')
 if rec.doCBNT():
     protectedInclude( "RecExCommon/CBNT_config.py" )
 
-# trigger extension to the TrkValNtuple (it needs to be included after TrkValNtuple) from Jiri Masik and Clemencia Mora
-# test if ID is on also (might not be sufficient)
-if recAlgs.doTrigger() and DetFlags.detdescr.ID_on() :
-    if globalflags.DataSource() == 'data'and globalflags.InputFormat == 'bytestream':
-        from InDetRecExample.InDetJobProperties import InDetFlags
-        from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-        if InDetFlags.doTrkNtuple() and InDetTrigFlags.doTrkNtuple():
-            protectedInclude("InDetTrigRecExample/InDetTrigRecNtupleCreation.py")
 
 #-----------------------------------------------------------------------------
 # Virtual Point1 Display
diff --git a/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py b/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
index d2bdce1c242def2c17619b10d2809ef290643eab..8e4646f26a980cd82e8d2dfb1403082aead23237 100644
--- a/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
+++ b/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
@@ -701,7 +701,7 @@ def ConfigureInputType():
         rec.doESD=False
         logAutoConfiguration.info ("setting rec.readESD=%s "%rec.readESD() )
         logAutoConfiguration.info ("setting rec.doAOD=%s "%rec.doAOD() )
-    elif ItemInListStartsWith ("Stream1", streamsName)  or ItemInListStartsWith ("StreamRDO", streamsName) or OverlapLists(streamsName,listRAWtoDPD):
+    elif ItemInListStartsWith ("Stream1", streamsName) or ItemInListStartsWith ("StreamRDO", streamsName) or ItemInListStartsWith ("OutputStreamRDO", streamsName) or OverlapLists(streamsName,listRAWtoDPD):
         logAutoConfiguration.info("Input RDO detected")   
         rec.readRDO=True
         rec.readESD=False
diff --git a/Reconstruction/RecExample/RecExConfig/share/SimpleConf_topOptions.py b/Reconstruction/RecExample/RecExConfig/share/SimpleConf_topOptions.py
deleted file mode 100755
index c9b585a3edc17756bc07b4296151c3aef7acc20f..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExConfig/share/SimpleConf_topOptions.py
+++ /dev/null
@@ -1,244 +0,0 @@
-# exercise dictionary
-if True:
-    d={"obj1":["tag1","tag2"],"obj2":"another" }
-    thetag=d["obj2"]
-    print thetag  # single string
-    thetag=d["obj1"]
-    print thetag  # list of string
-    # thetag=d["obj3"]
-    print thetag  # crash if wrong
-    print d.has_key("obj3")
-    print d.has_key("obj2")
-    print d.keys()
-    # the following does not work
-    #o="obj2"
-    #x=""
-    #print d.get( o[, x])
-    # print d.get("obj3"[, ""])    
-
-from AthenaCommon.Logging import logging
-
-#logRecExCommon_topOptions = logging.getLogger( 'py:RecExCommon_topOptions' )
-doNameAuditor=True
-doTrigger=False
-doWriteESD=False
-doWriteAOD=False
-doWriteTAG=False
-doAOD=False
-include ( "RecExCommon/RecExCommon_flags.py" )
-DetFlags.ID_setOff()
-DetFlags.Muon_setOff()
-DetFlags.Calo_setOff()
-
-
-#to read G4 POOL RDO
-if GlobalFlags.InputFormat.is_pool():
-    # to read pool Data
-    include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-
-
-
-    # G4 Pool input 
-    # it is possible to specify a list of files to be processed consecutively
-    # If using logical file name or using back navigation the relevant input
-    # files should be listed in the PoolFileCatalog.xml
-    EventSelector = Service( "EventSelector" )
-    EventSelector.InputCollections = PoolRDOInput
-
-
-
-# Set output level threshold
-#    (  ALL, VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL )
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel               = OutputLevel
-#increase the number of letter reserved to the alg/tool name from 18 to 30
-MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" 
-# to change the default limit on number of message
-
-
-# MessageSvc.debugLimit = 10000   # all debug message etc...
-MessageSvc.defaultLimit = 9999999  # all messages
-
-
-# Number of events to be processed 
-theApp.EvtMax = EvtMax
-
-
-
-theAuditorSvc = AuditorSvc()
-theAuditorSvc.Auditors  += [ "ChronoAuditor"]
-
-# Display detailed size and timing statistics for writing and reading
-AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" )
-AthenaPoolCnvSvc.UseDetailChronoStat = True
-
-#
-# write out a short message upon entering or leaving each algorithm
-#
-if doNameAuditor:
-    theAuditorSvc.Auditors  += [ "NameAuditor" ]
-
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-from __main__ import topSequence
-
-
-#other global variables (to be improved )
-ALLOWBACKNAV=False
-from __main__ import ALLOWBACKNAV
-ALLOWIGNOREEXISTINGDATAOBJECT=False
-from __main__ import ALLOWIGNOREEXISTINGDATAOBJECT
-ALLOWDISABLE=False
-from __main__ import ALLOWDISABLE
-ALLOWIGNORECONFIGERROR=False
-from __main__ import ALLOWIGNORECONFIGERROR
-
-
-from RecExConfig.ObjKeyStore import *
-objKeyStore = ObjKeyStore()
-
-
-print " Initial content of objKeyStore "
-objKeyStore.Print()
-
-from __main__ import objKeyStore
-
-
-# hack allowed here but not in standard config
-ALLOWIGNOREEXISTINGDATAOBJECT=True
-ALLOWDISABLE=True
-ALLOWIGNORECONFIGERROR=True
-
-
-# for example : disable SimpleRawObjGetter, this will cascade to
-# downstream algorithm
-if False:
-    from RecExAlgs.SimpleRawObjGetter import SimpleRawObjGetter
-    theSimpleRawObjGetter = SimpleRawObjGetter(disable=True)
-
-
-# entering normal configuration, no hack alowed anymore
-ALLOWIGNOREEXISTINGDATAOBJECT=False
-ALLOWDISABLE=False
-ALLOWIGNORECONFIGERROR=False
-
-# for example :if try to disable here, this would be ineffective 
-if False:
-    from RecExAlgs.SimpleRawObjGetter import SimpleRawObjGetter
-    theSimpleRawObjGetter = SimpleRawObjGetter(disable=True)
-
-
-
-
-# put quasi empty first algorithm so that the first real
-# algorithm does not see the memory change due to event manipulation
-theApp.Dlls += [ "GaudiAlg"  ]
-theApp.TopAlg += [ "EventCounter"  ]
-EventCounter = Algorithm( "EventCounter" )
-EventCounter.Frequency=100  # one print every 100 event
-
-# other algorithms
-
-
-
-
-# Print create SimpleCookedObjGetter, this will trigger SimpleRawObjGetter
-
-from RecExAlgs.SimpleCookedObjGetter import *
-aSimpleCookedObjGetter = SimpleCookedObjGetter()
-
-
-print "Py: now trying new instance "
-
-from RecExAlgs.SimpleRawObjGetter import *
-bSimpleRawObjGetter = SimpleRawObjGetter()
-
-if bSimpleRawObjGetter.usable():
-    print "Py:top raw getFullName from b should be same instance ",bSimpleRawObjGetter.outputTypeKey()
-    print "Py:top raw outputTypeKey in alg ",bSimpleRawObjGetter.SimpleRawObjMakerHandle().RawObjOutputName
-
-# it is still possible to alter an alg property from there
-# bSimpleRawObjGetter.SimpleRawObjMakerHandle().RawMessage=" from topOptions b"
-
-
-
-theOutput=bSimpleRawObjGetter.output()
-print theOutput
-
-
-
-
-
-# set up all detector description description 
-# include ("RecExCommon/AllDet_detDescr.py")
-
-
-
-#
-# G4 : RDO Pool converters
-#
-#if read or write ESD load the converters
-if ( doWriteESD or readESD) or doWriteAOD or doWriteRDO :
-    # Converters:
-    include ( "RecExCommon/RecoOutputPoolCnv_jobOptions.py" )
-
-if not readAOD and doTruth:        #needed to read MuonEntryRecord
-    include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-
-
-if DetFlags.readRDOPool.any_on() or DetFlags.readRIOPool.any_on() or readESD :
-    if DetFlags.readRDOPool.ID_on():
-    #FIXME tile reading very slow if InDet dict not there. Bug in Pool.     
-        include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" )
-
-    if DetFlags.readRDOPool.LAr_on() :
-        include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-
-    if DetFlags.readRDOPool.Tile_on():
-        include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-
-    if DetFlags.readRDOPool.Muon_on() or DetFlags.readRIOPool.Muon_on()  :
-    	include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-   
-
-    include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-
-
-
-if doTruth:
-    include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-
-
-        
-print "List all Dlls"
-print theApp.Dlls
-print "List all ExtSvc"
-print theApp.ExtSvc
-print "List of all top algorithms"
-print theApp.TopAlg
-
-print " Final content of objKeyStore "
-objKeyStore.Print()
-
-
-# exercise objKeyStore for fun
-if objKeyStore.isInInput("bidon"):
-    print "Py: in InPut :bidon"
-
-if objKeyStore.isInTransient("bidon"):
-    print "Py: bidon"
-
-if objKeyStore.isInTransient("bidon","truc"):
-    print "Py: bidon truc"
-
-if objKeyStore.isInTransient("SimpleCookedObj"):
-    print "Py: SimpleCookedObj"
-
-
-if objKeyStore.isInTransient("SimpleCookedObj","truc"):
-    print "Py: SimpleCookedObj truc"
-
-if objKeyStore.isInTransient("SimpleCookedObj","SimpleCookedObjBlaBla"):
-    print "Py: SimpleCookedObj SimpleCookedObjBlaBla"
-    
diff --git a/Reconstruction/RecExample/RecExConfig/share/Simple_topOptions.py b/Reconstruction/RecExample/RecExConfig/share/Simple_topOptions.py
deleted file mode 100755
index 0b42f3cacb6fa3e0cba688b3e42dfa135b295aa7..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExConfig/share/Simple_topOptions.py
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-from AthenaCommon.Logging import logging
-
-#logRecExCommon_topOptions = logging.getLogger( 'py:RecExCommon_topOptions' )
-
-doTrigger=False
-doWriteESD=False
-doWriteAOD=False
-doWriteTAG=False
-doAOD=False
-include ( "RecExCommon/RecExCommon_flags.py" )
-DetFlags.ID_setOff()
-DetFlags.Muon_setOff()
-DetFlags.Calo_setOff()
-
-
-#to read G4 POOL RDO
-if GlobalFlags.InputFormat.is_pool():
-    # to read pool Data
-    include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-
-
-
-    # G4 Pool input 
-    # it is possible to specify a list of files to be processed consecutively
-    # If using logical file name or using back navigation the relevant input
-    # files should be listed in the PoolFileCatalog.xml
-    EventSelector = Service( "EventSelector" )
-    EventSelector.InputCollections = PoolRDOInput
-
-
-
-# Set output level threshold
-#    (  ALL, VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL )
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel               = OutputLevel
-#increase the number of letter reserved to the alg/tool name from 18 to 30
-MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" 
-# to change the default limit on number of message
-
-
-# MessageSvc.debugLimit = 10000   # all debug message etc...
-MessageSvc.defaultLimit = 9999999  # all messages
-
-
-# Number of events to be processed 
-theApp.EvtMax = EvtMax
-
-
-# put quasi empty first algorithm so that the first real
-# algorithm does not see the memory change due to event manipulation
-theApp.Dlls += [ "GaudiAlg"  ]
-theApp.TopAlg += [ "EventCounter"  ]
-EventCounter = Algorithm( "EventCounter" )
-EventCounter.Frequency=100  # one print every 100 event
-
-# other algorithms
-
-include ("RecExAlgs/SimpleRawObjMaker_jobOptions.py")
-include ("RecExAlgs/SimpleCookedObjMaker_jobOptions.py")
-
-
-
-
-
-
-
-
-# set up all detector description description 
-include ("RecExCommon/AllDet_detDescr.py")
-
-
-
-#
-# G4 : RDO Pool converters
-#
-#if read or write ESD load the converters
-if ( doWriteESD or readESD) or doWriteAOD or doWriteRDO :
-    # Converters:
-    include ( "RecExCommon/RecoOutputPoolCnv_jobOptions.py" )
-
-if not readAOD and doTruth:        #needed to read MuonEntryRecord
-    include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-
-
-if DetFlags.readRDOPool.any_on() or DetFlags.readRIOPool.any_on() or readESD :
-    if DetFlags.readRDOPool.ID_on():
-    #FIXME tile reading very slow if InDet dict not there. Bug in Pool.     
-        include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" )
-
-    if DetFlags.readRDOPool.LAr_on() :
-        include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-
-    if DetFlags.readRDOPool.Tile_on():
-        include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" )
-
-    if DetFlags.readRDOPool.Muon_on() or DetFlags.readRIOPool.Muon_on()  :
-    	include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" )
-   
-
-    include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-
-
-
-if doTruth:
-    include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-
-
-        
-print "List all Dlls"
-print theApp.Dlls
-print "List all ExtSvc"
-print theApp.ExtSvc
-print "List of all top algorithms"
-print theApp.TopAlg
-
diff --git a/Reconstruction/RecExample/RecExOnline/share/RecExOnline_globalconfig.py b/Reconstruction/RecExample/RecExOnline/share/RecExOnline_globalconfig.py
index 13fb8dafe0c15c4d664a92366be20d99b29e6e6b..f55282b5ca46ee9c9483084186bf4d6b3cfd15e9 100644
--- a/Reconstruction/RecExample/RecExOnline/share/RecExOnline_globalconfig.py
+++ b/Reconstruction/RecExample/RecExOnline/share/RecExOnline_globalconfig.py
@@ -311,6 +311,17 @@ from AthenaCommon.GlobalFlags import globalflags
 #globalflags.DatabaseInstance = "CONDBR2"
 globalflags.DatabaseInstance.set_Value_and_Lock("CONDBR2")
 
+from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
+LuminosityCondAlgOnlineDefault()
+
+from LumiBlockComps.LumiBlockMuWriterDefault import LumiBlockMuWriterDefault
+LumiBlockMuWriterDefault()
+
+from AthenaCommon.AppMgr import ToolSvc
+from AthenaCommon import CfgMgr
+if not hasattr(ToolSvc, "LumiBlockMuTool"):
+    ToolSvc += CfgMgr.LumiBlockMuTool("LumiBlockMuTool")
+
 ## Another Problem with LAR offline databases
 from LArConditionsCommon.LArCondFlags import larCondFlags
 #larCondFlags.SingleVersion.set_Value_and_Lock(True)
diff --git a/Reconstruction/RecExample/RecExOnline/share/RecExOnline_postconfig.py b/Reconstruction/RecExample/RecExOnline/share/RecExOnline_postconfig.py
index a4af971e90762dea8654bb1d87cd3378fd85faab..b07ae96f0a8ead411a9ac7fe17430d46262e921c 100644
--- a/Reconstruction/RecExample/RecExOnline/share/RecExOnline_postconfig.py
+++ b/Reconstruction/RecExample/RecExOnline/share/RecExOnline_postconfig.py
@@ -25,60 +25,7 @@ if isOnline and useEmon:
 
 #ToolSvc.InDetCosmicsEventPhaseTool.GlobalOffset = 0
 
-
-###
-### Fix problem in PixelConditionsTools
-### From Fares Djama
-### " the RUN2 pixel tags have been copied from RUN1,
-###   while we have a new detector, the IBL.
-###   We need to add a new IOV to our tags in the online.
-###   I guess that's the same for all other condb folders"
-###
-
-
-#
-# This part is only for online (SMWANG : Nov 17th 2015)
-#
-
-#from IOVDbSvc.CondDB import conddb
-#
-#if not conddb.folderRequested("PIXEL/PixReco"):
-#        conddb.addFolder('PIXEL','/PIXEL/PixReco')
-#if not conddb.folderRequested("PIXEL/PixCalib"):
-#        conddb.addFolder('PIXEL','/PIXEL/PixCalib')
-#conddb.blockFolder("/PIXEL/PixCalib")
-#conddb.blockFolder("/PIXEL/PixReco")
-#
-#conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixReco","PixReco-HLT-RUN12-000-01",force=True) 
-#conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixCalib","PixReco-HLT-RUN12-000-01",force=True) 
-
-
-#
-# Need to get this part to work online and offline !!! (SMWANG : Nov 17th 2015)
-#
-
-if (isOnline and not isOfflineTest):
-  from IOVDbSvc.CondDB import conddb
-  if not conddb.folderRequested("PIXEL/PixReco"):
-    conddb.addFolder('PIXEL','/PIXEL/PixReco')
-  if not conddb.folderRequested("PIXEL/PixCalib"):
-    conddb.addFolder('PIXEL','/PIXEL/PixCalib')
-  conddb.blockFolder("/PIXEL/PixCalib")
-  conddb.blockFolder("/PIXEL/PixReco")
-  conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixReco","PixReco-HLT-RUN12-000-01",force=True) 
-  conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixCalib","PixReco-HLT-RUN12-000-01",force=True) 
-
-
-if (isOnline and isOfflineTest):
-  from IOVDbSvc.CondDB import conddb
-  if not conddb.folderRequested("PIXEL/PixReco"):
-    conddb.addFolder('PIXEL','/PIXEL/PixReco')
-  if not conddb.folderRequested("PIXEL/PixCalib"):
-    conddb.addFolder('PIXEL','/PIXEL/PixCalib')
-  conddb.blockFolder("/PIXEL/PixCalib")
-  conddb.blockFolder("/PIXEL/PixReco")
-  conddb.addFolderWithTag("/afs/cern.ch/work/s/smwang/public/DQM/InDet_online_db/NewHLT.db;dbname=CONDBR2","/PIXEL/PixReco","PixReco-HLT-RUN12-000-01",force=True) 
-  conddb.addFolderWithTag("/afs/cern.ch/work/s/smwang/public/DQM/InDet_online_db/NewHLT.db;dbname=CONDBR2","/PIXEL/PixCalib","PixReco-HLT-RUN12-000-01",force=True) 
+ToolSvc.InDetPixelClusterOnTrackTool.ErrorStrategy=1 # Added 13 Jul 2020 from ATLASRECTS-5544
 
 
 # ----------------------------- Printout
diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh
index ee46bc03edd8db3729f116a847fae7d3bba12e13..f34ebe17d75fde8a4b1e15b65bd526a98277cc17 100755
--- a/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_reco_tf_compare_SerialAndThreadedAthenas.sh
@@ -1,10 +1,11 @@
 #!/bin/bash
 
-preExecString = 'RAWtoESD:from RecExConfig.RecFlags import rec;rec.doTrigger.set_Value_and_Lock(False);from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)'
+preExecString="RAWtoESD:from RecExConfig.RecFlags import rec;rec.doTrigger.set_Value_and_Lock(False);from AthenaMonitoring.DQMonFlags import jobproperties;jobproperties.DQMonFlagsCont.doMonitoring.set_Value_and_Lock(False)"
+echo $preExecString
 
 echo "Creating new serial directory"
 mkdir serial; cd serial
-Reco_tf.py --AMI=$1 --preExec=preExecString --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaSerial.log
+Reco_tf.py --AMI=$1 --preExec="${preExecString}" --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaSerial.log
 rc=${PIPESTATUS[0]}
 echo "art-result: $rc Serial"
 
@@ -14,7 +15,7 @@ cd ../
 echo "Creating new threadOne directory"
 mkdir threadOne; cd threadOne
 
-Reco_tf.py --athenaopts="--threads=1" --AMI=$1 --preExec=preExecString --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaOneThread.log
+Reco_tf.py --athenaopts="--threads=1" --AMI=$1 --preExec="${preExecString}" --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaOneThread.log
 rc1=${PIPESTATUS[0]}
 echo "art-result: $rc1 OneThread"
 
@@ -36,7 +37,7 @@ cd ../
 echo "Creating new threadTwo directory"
 mkdir threadTwo; cd threadTwo
 
-Reco_tf.py --athenaopts="--threads=2" --AMI=$1 --preExec=preExecString --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaTwoThreads.log
+Reco_tf.py --athenaopts="--threads=2" --AMI=$1 --preExec="${preExecString}" --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaTwoThreads.log
 rc2=${PIPESTATUS[0]}
 echo "art-result: $rc2 TwoThreads"
 
@@ -54,7 +55,7 @@ cd ../
 echo "Creating new threadFive directory"
 mkdir threadFive; cd threadFive
 
-Reco_tf.py --athenaopts="--threads=5" --AMI=$1 --preExec=preExecString --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaFiveThreads.log
+Reco_tf.py --athenaopts="--threads=5" --AMI=$1 --preExec="${preExecString}" --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root | tee athenaFiveThreads.log
 rc5=${PIPESTATUS[0]}
 echo "art-result: $rc5 FiveThreads"
 
diff --git a/Reconstruction/RecJobTransforms/CMakeLists.txt b/Reconstruction/RecJobTransforms/CMakeLists.txt
index 7171f8312650f9081d9cf24dfaf34925ebc7dd9a..d5819bc9aad7f0f97cda906b245dc3532e7831d7 100644
--- a/Reconstruction/RecJobTransforms/CMakeLists.txt
+++ b/Reconstruction/RecJobTransforms/CMakeLists.txt
@@ -10,8 +10,12 @@ atlas_depends_on_subdirs( PUBLIC
                           Tools/PyJobTransforms
                           Tools/PyJobTransformsCore )
 
-# Install files from the package:
+# Install python modules
 atlas_install_python_modules( python/*.py )
-atlas_install_joboptions( share/*.py )
+# Install RDOtoRDOtrigger job opts with flake8 check
+atlas_install_joboptions( share/skeleton.RDOtoRDOtrigger*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+# Install other job opts without flake8 check
+atlas_install_joboptions( share/*.py EXCLUDE share/*RDOtoRDOtrigger*.py )
+# Install scripts
 atlas_install_runtime( scripts/*.py )
 
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py
index eeb8ee4b5e86f148424391e31054b01b7fb9f1d0..88390fdf027f4d79e41d43b8056a84f585cbc858 100644
--- a/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py
@@ -1,290 +1,9 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-import six
-
-####################################################################
-#
-# Skeleton top job options for RDO->RDOprime (RDO with trigger done)
-#
-#===================================================================
-
-#Common job options disable most RecExCommon by default. Re-enable below on demand.
-include("RecJobTransforms/CommonRecoSkeletonJobOptions.py")
-# disable ESD object making, but still enable trigger
-rec.doESD.set_Value_and_Lock(False)
-rec.doCalo.set_Value_and_Lock(True)
-rec.doInDet.set_Value_and_Lock(True)
-rec.doMuon.set_Value_and_Lock(True)
-rec.doJetMissingETTag.set_Value_and_Lock(False)
-rec.doEgamma.set_Value_and_Lock(False)
-rec.doMuonCombined.set_Value_and_Lock(False)
-rec.doTau.set_Value_and_Lock(False)
-rec.doTrigger.set_Value_and_Lock(True)
-rec.doRDOTrigger.set_Value_and_Lock(True)
-recAlgs.doTrigger.set_Value_and_Lock(True)
-rec.doMonitoring.set_Value_and_Lock(False)
-from AthenaMonitoring.DQMonFlags import DQMonFlags
-DQMonFlags.doMonitoring.set_Value_and_Lock(False)
-DQMonFlags.doLArMon.set_Value_and_Lock(False)
-
-#disable offline ID configuration and reco
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doNewTracking.set_Value_and_Lock(False)
-
-from AthenaCommon.CFElements import findAlgorithm, findOwningSequence, findSubSequence
-from AthenaCommon.Logging import logging
-recoLog = logging.getLogger('rdo_to_rdotrigger')
-recoLog.info( '****************** STARTING RDO->RDOTrigger MAKING *****************' )
-
-## Input
-if hasattr(runArgs,"inputRDOFile"):
-    rec.readRDO.set_Value_and_Lock( True )
-    globalflags.InputFormat.set_Value_and_Lock('pool')
-    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDOFile )
-elif hasattr(runArgs,"inputRDO_FILTFile"):
-    rec.readRDO.set_Value_and_Lock( True )
-    globalflags.InputFormat.set_Value_and_Lock('pool')
-    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDO_FILTFile )
-elif hasattr(runArgs,"inputRDO_FTKFile"):
-    rec.readRDO.set_Value_and_Lock( True )
-    globalflags.InputFormat.set_Value_and_Lock('pool')
-    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDO_FTKFile )
-
-    TriggerFlags.doFTK=True;
-else:
-     raise RuntimeError("No RDO input file specified")
-
-if hasattr(runArgs,"outputRDO_TRIGFile"):
-    rec.doWriteRDO.set_Value_and_Lock( True )
-    globalflags.InputFormat.set_Value_and_Lock('pool')
-    athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDO_TRIGFile )
-else:
-    raise RuntimeError("No RDO_TRIG output file specified")
-
-## Pre-exec
-if hasattr(runArgs,"preExec"):
-    recoLog.info("transform pre-exec")
-    for cmd in runArgs.preExec:
-        recoLog.info(cmd)
-        exec(cmd)
-
-## Pre-include
-if hasattr(runArgs,"preInclude"):
-    for fragment in runArgs.preInclude:
-        include(fragment)
-
-# Setup the algorithm and output sequences
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-from AthenaCommon.AlgSequence import AthSequencer
-outSequence = AthSequencer("AthOutSeq")
-
-
-if not TriggerFlags.doMT():
-
-    from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
-    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-    # small hack, switching temporarily the ESD writing on, to allow writing of some trigger containers into the RDOTrigger file
-    rec.doWriteESD = True
-    cfg = TriggerConfigGetter()
-    rec.doWriteESD.set_Value_and_Lock( False )
-    # end of hack.
-
-def preplist(input):
-    triglist = []
-    for k,val in six.iteritems (input):
-        for j in val:
-            triglist.append(k + "#" + j)
-    return triglist
-
-
-if TriggerFlags.doMT():
-    TriggerFlags.doHLT.set_Value_and_Lock(False)
-    from CaloRec.CaloRecFlags import jobproperties
-    jobproperties.CaloRecFlags.doLArNoisyRO.set_Value_and_Lock(False)
-
-#========================================================
-# Central topOptions (this is one is a string not a list)
-#========================================================
-if TriggerFlags.doMT():
-    TriggerFlags.MuonSlice.doTrigMuonConfig=True
-if hasattr(runArgs,"topOptions"): include(runArgs.topOptions)
-else: include( "RecExCommon/RecExCommon_topOptions.py" )
 
+from AthenaCommon.Include import include
+from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 if TriggerFlags.doMT():
-  doWriteRDOTrigger = False
-  doWriteBS        = False
-  include("TriggerJobOpts/runHLT_standalone.py")
-
-if rec.doFileMetaData():
-   from RecExConfig.ObjKeyStore import objKeyStore
-   metadataItems = [ "xAOD::TriggerMenuContainer#TriggerMenu",
-                 "xAOD::TriggerMenuAuxContainer#TriggerMenuAux." ]
-   objKeyStore.addManyTypesMetaData( metadataItems )
-
-
-from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \
-        RoIBResultToAOD
-idx=0
-for i in topSequence.getAllChildren():
-    idx += 1
-    if "TrigSteer_HLT" in i.getName():
-       if not hasattr(i,'RoIBResultToxAOD'):
-           idx += 1
-           topSequence.insert(idx, RoIBResultToAOD("RoIBResultToxAOD"))
-
-for i in outSequence.getAllChildren():
-    if "StreamRDO" in i.getName() and ( not TriggerFlags.doMT() ):
-        from TrigDecisionMaker.TrigDecisionMakerConfig import TrigDecisionMaker,WritexAODTrigDecision
-        topSequence.insert(idx, TrigDecisionMaker('TrigDecMaker'))
-        from AthenaCommon.Logging import logging
-        log = logging.getLogger( 'WriteTrigDecisionToAOD' )
-        log.info('TrigDecision writing enabled')
-
-        from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigDecisionCnvAlg
-        alg = xAODMaker__TrigDecisionCnvAlg()
-        alg.AODKey = "TrigDecision"
-        alg.xAODKey = "xTrigDecision"
-        alg.ExtraOutputs = [('xAOD::TrigDecision','StoreGateSvc+xTrigDecision')]
-        topSequence.insert(idx+1, alg)
-        from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigNavigationCnvAlg
-        trigNavCnv = xAODMaker__TrigNavigationCnvAlg()
-        trigNavCnv.ExtraOutputs = [('xAOD::TrigNavigation','StoreGateSvc+TrigNavigation')]
-        topSequence.insert(idx+2, trigNavCnv)
-        _TriggerESDList = {}
-        _TriggerAODList = {}
-        from TrigEDMConfig.TriggerEDM import getTriggerEDMList
-        _TriggerESDList.update( getTriggerEDMList(TriggerFlags.ESDEDMSet(),  TriggerFlags.EDMDecodingVersion()) )
-        _TriggerAODList.update( getTriggerEDMList(TriggerFlags.AODEDMSet(),  TriggerFlags.EDMDecodingVersion()) )
-
-
-        StreamRDO.ItemList += ["HLT::HLTResult#HLTResult_HLT"]
-        StreamRDO.ItemList += ["TrigDec::TrigDecision#TrigDecision"]
-        StreamRDO.ItemList += ["TrigInDetTrackTruthMap#*"]
-        StreamRDO.ItemList += preplist(_TriggerESDList)
-        StreamRDO.ItemList += preplist(_TriggerAODList)
-        from TrigEDMConfig.TriggerEDM import getLvl1ESDList
-        StreamRDO.ItemList += preplist(getLvl1ESDList())
-        from TrigEDMConfig.TriggerEDM import getLvl1AODList
-        StreamRDO.ItemList += preplist(getLvl1AODList())
-        StreamRDO.MetadataItemList +=  [ "xAOD::TriggerMenuContainer#*", "xAOD::TriggerMenuAuxContainer#*" ]
-
-    if "StreamRDO" in i.getName() and TriggerFlags.doMT():
-        ### Produce the trigger bits:
-        from TrigOutputHandling.TrigOutputHandlingConf import TriggerBitsMakerTool
-        from TrigDecisionMaker.TrigDecisionMakerConfig import TrigDecisionMakerMT
-        bitsmakerTool = TriggerBitsMakerTool()
-        tdm = TrigDecisionMakerMT('TrigDecMakerMT') # Replaces TrigDecMaker and finally deprecates Run 1 EDM
-        tdm.BitsMakerTool = bitsmakerTool
-        topSequence += tdm
-        log.info('xTrigDecision writing enabled')
-
-        ### Produce the metadata:
-        from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODMenuWriterMT
-        md = TrigConf__xAODMenuWriterMT()
-        topSequence += md
-        log.info('TriggerMenu Metadata writing enabled')
-
-        from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvc
-        svcMgr += TrigConfigSvc("TrigConfigSvc")
-        svcMgr.TrigConfigSvc.PriorityList = ["none", "ds", "xml"]
-
-        # Still need to produce Run-2 style L1 xAOD output
-        topSequence += RoIBResultToAOD("RoIBResultToxAOD")
-
-        from TrigEDMConfig.TriggerEDM import getTriggerEDMList
-
-        trigEDMListESD = {}
-        trigEDMListAOD = {}
-        # do the two lines above this need to be changed to this?
-        trigEDMListESD.update(getTriggerEDMList(TriggerFlags.ESDEDMSet(),  3) )
-        trigEDMListAOD.update(getTriggerEDMList(TriggerFlags.AODEDMSet(),  3) ) 
-
-        StreamRDO.ItemList += preplist(trigEDMListESD)
-        StreamRDO.ItemList += preplist(trigEDMListAOD)
-
-        from TriggerJobOpts.TriggerConfig import collectHypos, collectFilters, collectDecisionObjects
-        hypos = collectHypos( findSubSequence(topSequence, "HLTAllSteps") )
-        filters = collectFilters( findSubSequence(topSequence, "HLTAllSteps") )
-        decObj = collectDecisionObjects( hypos, filters, 
-            findAlgorithm(topSequence, "L1Decoder"), 
-            findAlgorithm(topSequence, "DecisionSummaryMakerAlg") )
-        StreamRDO.ItemList += [ "xAOD::TrigCompositeContainer#"+obj for obj in decObj ]
-        StreamRDO.ItemList += [ "xAOD::TrigCompositeAuxContainer#"+obj+"Aux." for obj in decObj ]
-        StreamRDO.MetadataItemList +=  [ "xAOD::TriggerMenuContainer#*", "xAOD::TriggerMenuAuxContainer#*" ]
-
-from AthenaCommon.AppMgr import ServiceMgr, ToolSvc
-
-
-if hasattr(ToolSvc, 'TrigDecisionTool'):
-    if TriggerFlags.doMT():
-        # No functional TDT in MT in RDOtoRDOTrigger
-        pass
-    else:
-    	# Causes TDT to use Run-1 style behaviour in this part of the transform
-        from TrigDecisionTool.TrigDecisionToolConf import *
-        ToolSvc.TrigDecisionTool.TrigDecisionKey = "TrigDecision"
-        ToolSvc.TrigDecisionTool.UseAODDecision = True
-
-if TriggerFlags.doMT():
-    # inform TD maker that some parts may be missing
-    if TriggerFlags.dataTakingConditions()=='Lvl1Only':
-        topSequence.TrigDecMakerMT.doHLT=False
-    elif TriggerFlags.dataTakingConditions()=='HltOnly':
-        topSequence.TrigDecMakerMT.doL1=False
+    include('RecJobTransforms/skeleton.RDOtoRDOtriggerMT.py')
 else:
-    # inform TD maker that some parts may be missing
-    if TriggerFlags.dataTakingConditions()=='Lvl1Only':
-        topSequence.TrigDecMaker.doL2=False
-        topSequence.TrigDecMaker.doEF=False
-        topSequence.TrigDecMaker.doHLT=False
-    elif TriggerFlags.dataTakingConditions()=='HltOnly':
-        from AthenaCommon.AlgSequence import AlgSequence
-        topSequence.TrigDecMaker.doL1=False
-        # Decide based on the run number whether to assume a merged, or a
-        # split HLT:
-    if not TriggerFlags.doMergedHLTResult():
-        topSequence.TrigDecMaker.doHLT = False
-    else:
-        topSequence.TrigDecMaker.doL2 = False
-        topSequence.TrigDecMaker.doEF = False
-
-
-#unconditinally store these items
-StreamRDO.ItemList += [ "DataVector<LVL1::TriggerTower>#TriggerTowers" ]
-StreamRDO.ItemList += [ "TRT_RDO_Container#TRT_RDOs" ]
-StreamRDO.ItemList += [ "SCT_RDO_Container#SCT_RDOs" ]
-StreamRDO.ItemList += [ "PixelRDO_Container#PixelRDOs" ]
-StreamRDO.ItemList +=["2721#*"]
-StreamRDO.ItemList +=["2927#*"]
-StreamRDO.ItemList +=["2934#*"]
-StreamRDO.ItemList += [ "xAOD::EventInfo#*", "xAOD::EventAuxInfo#*" ]
-condSeq = AthSequencer("AthCondSeq")
-if not hasattr( condSeq, "LumiBlockMuWriter" ):
-    include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
-
-rec.OutputFileNameForRecoStep="RDOtoRDO_TRIG"
-
-## Post-include
-if hasattr(runArgs,"postInclude"):
-    for fragment in runArgs.postInclude:
-        include(fragment)
-
-## Post-exec
-if hasattr(runArgs,"postExec"):
-    recoLog.info("transform post-exec")
-    for cmd in runArgs.postExec:
-        recoLog.info(cmd)
-        exec(cmd)
-
-ServiceMgr.MessageSvc.debugLimit=10000000
-ServiceMgr.MessageSvc.Format = "% F%40W%S%4W%e%s%7W%R%T %0W%M"
-#from AthenaCommon.Constants import DEBUG
-#findAlgorithm( topSequence, "TauL2CaloHypo").OutputLevel=DEBUG
-#findAlgorithm( topSequence, "TrigTauRecMerged_TauPrecisionMVA").OutputLevel=DEBUG
-
-if recoLog.getEffectiveLevel() <= logging.DEBUG:
-    import AthenaCommon.Configurable as Configurable
-    Configurable.log.setLevel(logging.INFO)
-    recoLog.debug('Printing topSequence:\n%s', topSequence)
-
+    include('RecJobTransforms/skeleton.RDOtoRDOtriggerLegacy.py')
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtriggerLegacy.py b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtriggerLegacy.py
new file mode 100644
index 0000000000000000000000000000000000000000..91f41f9df1424ae6736c06dde157cb9d7c367ecf
--- /dev/null
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtriggerLegacy.py
@@ -0,0 +1,226 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Transform skeleton for RDO -> RDO_TRIG (running trigger and adding its output to the RDO file).
+# These are old job options for Run-2 Trigger. For Run-3 see RDOtoRDOtriggerMT.py
+#
+
+from AthenaCommon.Include import include
+from RecExConfig.RecFlags import rec
+from RecExConfig.RecAlgsFlags import recAlgs
+from AthenaCommon.GlobalFlags import globalflags
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+import six
+
+#Common job options disable most RecExCommon by default. Re-enable below on demand.
+include("RecJobTransforms/CommonRecoSkeletonJobOptions.py")
+# disable ESD object making, but still enable trigger
+rec.doESD.set_Value_and_Lock(False)
+rec.doCalo.set_Value_and_Lock(True)
+rec.doInDet.set_Value_and_Lock(True)
+rec.doMuon.set_Value_and_Lock(True)
+rec.doJetMissingETTag.set_Value_and_Lock(False)
+rec.doEgamma.set_Value_and_Lock(False)
+rec.doMuonCombined.set_Value_and_Lock(False)
+rec.doTau.set_Value_and_Lock(False)
+rec.doTrigger.set_Value_and_Lock(True)
+rec.doRDOTrigger.set_Value_and_Lock(True)
+recAlgs.doTrigger.set_Value_and_Lock(True)
+rec.doMonitoring.set_Value_and_Lock(False)
+from AthenaMonitoring.DQMonFlags import DQMonFlags
+DQMonFlags.doMonitoring.set_Value_and_Lock(False)
+DQMonFlags.doLArMon.set_Value_and_Lock(False)
+
+#disable offline ID configuration and reco
+from InDetRecExample.InDetJobProperties import InDetFlags
+InDetFlags.doNewTracking.set_Value_and_Lock(False)
+
+from AthenaCommon.Logging import logging
+recoLog = logging.getLogger('rdo_to_rdotrigger')
+recoLog.info( '****************** STARTING RDO->RDOTrigger MAKING *****************' )
+
+## Input
+runArgs = globals()['runArgs']
+if hasattr(runArgs,"inputRDOFile"):
+    rec.readRDO.set_Value_and_Lock( True )
+    globalflags.InputFormat.set_Value_and_Lock('pool')
+    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDOFile )
+elif hasattr(runArgs,"inputRDO_FILTFile"):
+    rec.readRDO.set_Value_and_Lock( True )
+    globalflags.InputFormat.set_Value_and_Lock('pool')
+    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDO_FILTFile )
+elif hasattr(runArgs,"inputRDO_FTKFile"):
+    rec.readRDO.set_Value_and_Lock( True )
+    globalflags.InputFormat.set_Value_and_Lock('pool')
+    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDO_FTKFile )
+
+    TriggerFlags.doFTK = True
+else:
+     raise RuntimeError("No RDO input file specified")
+
+if hasattr(runArgs,"outputRDO_TRIGFile"):
+    rec.doWriteRDO.set_Value_and_Lock( True )
+    globalflags.InputFormat.set_Value_and_Lock('pool')
+    athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDO_TRIGFile )
+else:
+    raise RuntimeError("No RDO_TRIG output file specified")
+
+## Pre-exec
+if hasattr(runArgs,"preExec"):
+    recoLog.info("transform pre-exec")
+    for cmd in runArgs.preExec:
+        recoLog.info(cmd)
+        exec(cmd)
+
+## Pre-include
+if hasattr(runArgs,"preInclude"):
+    for fragment in runArgs.preInclude:
+        include(fragment)
+
+# Setup the algorithm and output sequences
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+from AthenaCommon.AlgSequence import AthSequencer
+outSequence = AthSequencer("AthOutSeq")
+
+from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
+# small hack, switching temporarily the ESD writing on, to allow writing of some trigger containers into the RDOTrigger file
+rec.doWriteESD = True
+cfg = TriggerConfigGetter()
+rec.doWriteESD.set_Value_and_Lock( False )
+# end of hack.
+
+def preplist(input):
+    triglist = []
+    for k,val in six.iteritems (input):
+        for j in val:
+            triglist.append(k + "#" + j)
+    return triglist
+
+
+#========================================================
+# Central topOptions (this is one is a string not a list)
+#========================================================
+if hasattr(runArgs,"topOptions"):
+    include(runArgs.topOptions)
+else:
+    include( "RecExCommon/RecExCommon_topOptions.py" )
+
+
+if rec.doFileMetaData():
+   from RecExConfig.ObjKeyStore import objKeyStore
+   metadataItems = [ "xAOD::TriggerMenuContainer#TriggerMenu",
+                 "xAOD::TriggerMenuAuxContainer#TriggerMenuAux." ]
+   objKeyStore.addManyTypesMetaData( metadataItems )
+
+
+from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \
+        RoIBResultToAOD
+idx=0
+for i in topSequence.getAllChildren():
+    idx += 1
+    if "TrigSteer_HLT" in i.getName():
+       if not hasattr(i,'RoIBResultToxAOD'):
+           idx += 1
+           topSequence.insert(idx, RoIBResultToAOD("RoIBResultToxAOD"))
+
+_streamRDO = None
+for i in outSequence.getAllChildren():
+    if 'StreamRDO' in i.getName():
+        _streamRDO = i
+
+if _streamRDO:
+    from TrigDecisionMaker.TrigDecisionMakerConfig import TrigDecisionMaker
+    topSequence.insert(idx, TrigDecisionMaker('TrigDecMaker'))
+    from AthenaCommon.Logging import logging
+    log = logging.getLogger( 'WriteTrigDecisionToAOD' )
+    log.info('TrigDecision writing enabled')
+
+    from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigDecisionCnvAlg
+    alg = xAODMaker__TrigDecisionCnvAlg()
+    alg.AODKey = "TrigDecision"
+    alg.xAODKey = "xTrigDecision"
+    alg.ExtraOutputs = [('xAOD::TrigDecision','StoreGateSvc+xTrigDecision')]
+    topSequence.insert(idx+1, alg)
+    from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigNavigationCnvAlg
+    trigNavCnv = xAODMaker__TrigNavigationCnvAlg()
+    trigNavCnv.ExtraOutputs = [('xAOD::TrigNavigation','StoreGateSvc+TrigNavigation')]
+    topSequence.insert(idx+2, trigNavCnv)
+    _TriggerESDList = {}
+    _TriggerAODList = {}
+    from TrigEDMConfig.TriggerEDM import getTriggerEDMList
+    _TriggerESDList.update( getTriggerEDMList(TriggerFlags.ESDEDMSet(),  TriggerFlags.EDMDecodingVersion()) )
+    _TriggerAODList.update( getTriggerEDMList(TriggerFlags.AODEDMSet(),  TriggerFlags.EDMDecodingVersion()) )
+
+    _streamRDO.ItemList += ["HLT::HLTResult#HLTResult_HLT"]
+    _streamRDO.ItemList += ["TrigDec::TrigDecision#TrigDecision"]
+    _streamRDO.ItemList += ["TrigInDetTrackTruthMap#*"]
+    _streamRDO.ItemList += preplist(_TriggerESDList)
+    _streamRDO.ItemList += preplist(_TriggerAODList)
+    from TrigEDMConfig.TriggerEDM import getLvl1ESDList
+    _streamRDO.ItemList += preplist(getLvl1ESDList())
+    from TrigEDMConfig.TriggerEDM import getLvl1AODList
+    _streamRDO.ItemList += preplist(getLvl1AODList())
+    _streamRDO.MetadataItemList +=  [ "xAOD::TriggerMenuContainer#*", "xAOD::TriggerMenuAuxContainer#*" ]
+
+from AthenaCommon.AppMgr import ServiceMgr, ToolSvc
+
+
+if hasattr(ToolSvc, 'TrigDecisionTool'):
+    # Causes TDT to use Run-1 style behaviour in this part of the transform
+    from TrigDecisionTool.TrigDecisionToolConf import *  # noqa: F401,F403 old Run-2 code
+    ToolSvc.TrigDecisionTool.TrigDecisionKey = "TrigDecision"
+    ToolSvc.TrigDecisionTool.UseAODDecision = True
+
+# inform TD maker that some parts may be missing
+if TriggerFlags.dataTakingConditions()=='Lvl1Only':
+    topSequence.TrigDecMaker.doL2=False
+    topSequence.TrigDecMaker.doEF=False
+    topSequence.TrigDecMaker.doHLT=False
+elif TriggerFlags.dataTakingConditions()=='HltOnly':
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence.TrigDecMaker.doL1=False
+    # Decide based on the run number whether to assume a merged, or a
+    # split HLT:
+if not TriggerFlags.doMergedHLTResult():
+    topSequence.TrigDecMaker.doHLT = False
+else:
+    topSequence.TrigDecMaker.doL2 = False
+    topSequence.TrigDecMaker.doEF = False
+
+if _streamRDO:
+    # always store these items
+    _streamRDO.ItemList += [ "DataVector<LVL1::TriggerTower>#TriggerTowers" ]
+    _streamRDO.ItemList += [ "TRT_RDO_Container#TRT_RDOs" ]
+    _streamRDO.ItemList += [ "SCT_RDO_Container#SCT_RDOs" ]
+    _streamRDO.ItemList += [ "PixelRDO_Container#PixelRDOs" ]
+    _streamRDO.ItemList +=["2721#*"]
+    _streamRDO.ItemList +=["2927#*"]
+    _streamRDO.ItemList +=["2934#*"]
+    _streamRDO.ItemList += [ "xAOD::EventInfo#*", "xAOD::EventAuxInfo#*" ]
+
+condSeq = AthSequencer("AthCondSeq")
+if not hasattr( condSeq, "LumiBlockMuWriter" ):
+    include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
+
+rec.OutputFileNameForRecoStep="RDOtoRDO_TRIG"
+
+## Post-include
+if hasattr(runArgs,"postInclude"):
+    for fragment in runArgs.postInclude:
+        include(fragment)
+
+## Post-exec
+if hasattr(runArgs,"postExec"):
+    recoLog.info("transform post-exec")
+    for cmd in runArgs.postExec:
+        recoLog.info(cmd)
+        exec(cmd)
+
+ServiceMgr.MessageSvc.debugLimit=10000000
+ServiceMgr.MessageSvc.Format = "% F%40W%S%4W%e%s%7W%R%T %0W%M"
+
+if recoLog.getEffectiveLevel() <= logging.DEBUG:
+    import AthenaCommon.Configurable as Configurable
+    Configurable.log.setLevel(logging.INFO)
+    recoLog.debug('Printing topSequence:\n%s', topSequence)
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtriggerMT.py b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtriggerMT.py
new file mode 100644
index 0000000000000000000000000000000000000000..9763c1746f414ce6094ab527a93405ae64f40034
--- /dev/null
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtriggerMT.py
@@ -0,0 +1,83 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Transform skeleton for RDO -> RDO_TRIG (running trigger and adding its output to the RDO file).
+# This is only a wrapper interfacing transform arguments into the main job options file
+# TriggerJobOpts/runHLT_standalone.py
+#
+
+from AthenaCommon.Include import include
+from AthenaCommon.Logging import logging
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+
+log = logging.getLogger('skeleton.RDOtoRDOtriggerMT')
+
+##################################################
+# Options read by runHLT_standalone, can be overwritten in runArgs/preExec/preInclude
+##################################################
+setMenu           = 'LS2_v1'
+doWriteRDOTrigger = True
+doWriteBS         = False
+
+##################################################
+# Parse runArgs
+##################################################
+if 'runArgs' not in globals():
+    raise RuntimeError('runArgs not defined')
+
+ra = globals()['runArgs']
+def getFromRunArgs(propName, failIfMissing=True):
+    if not hasattr(ra, propName):
+        if failIfMissing:
+            raise RuntimeError(propName + ' not defined in runArgs')
+        else:
+            return None
+    return getattr(ra, propName)
+
+# Input/Output
+athenaCommonFlags.FilesInput = getFromRunArgs('inputRDOFile')
+ConfigFlags.Input.Files = getFromRunArgs('inputRDOFile')
+ConfigFlags.Output.RDOFileName = getFromRunArgs('outputRDO_TRIGFile')
+
+# Max/skip events
+maxEvents = getFromRunArgs('maxEvents', False) or -1
+skipEvents = getFromRunArgs('skipEvents', False) or 0
+athenaCommonFlags.EvtMax = maxEvents
+athenaCommonFlags.SkipEvents = skipEvents
+
+##################################################
+# Parse preExec / preInclude
+##################################################
+preExec = getFromRunArgs('preExec', False)
+if preExec:
+    log.info('Executing transform preExec')
+    for cmd in preExec:
+        log.info(cmd)
+        exec(cmd)
+
+preInclude = getFromRunArgs('preInclude', False)
+if preInclude:
+    log.info('Executing transform preInclude')
+    for fragment in preInclude:
+        include(fragment)
+
+##################################################
+# Include the main job options
+##################################################
+include("TriggerJobOpts/runHLT_standalone.py")
+
+##################################################
+# Parse postExec / postInclude
+##################################################
+postExec = getFromRunArgs('postExec', failIfMissing=False)
+if postExec:
+    log.info('Executing transform postExec')
+    for cmd in postExec:
+        log.info(cmd)
+        exec(cmd)
+
+postInclude = getFromRunArgs('postInclude', failIfMissing=False)
+if postInclude:
+    log.info('Executing transform postInclude')
+    for fragment in postInclude:
+        include(fragment)
diff --git a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool.h b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool.h
index 4891053cda2c45e97e028321c01ecfbb58fda7de..a1c9649fa2fe82c359142bd5b94bccc29a06cadb 100755
--- a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool.h
+++ b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool/NewVrtSecInclusiveTool.h
@@ -54,8 +54,6 @@ namespace Trk{
  
 namespace MVAUtils { class BDT; }
 
-typedef std::vector<double> dvect;
-
  
 //------------------------------------------------------------------------
 namespace Rec {
diff --git a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Sel2TrkVertices.cxx b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Sel2TrkVertices.cxx
index 1f9e9b53f9a5e904cfc76b0485dc23978d13e497..500fd90c3bf0e7d92d0cee91336a8b704def3be5 100755
--- a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Sel2TrkVertices.cxx
+++ b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Sel2TrkVertices.cxx
@@ -17,7 +17,6 @@
 #include "TH1.h"
 #include "TH2D.h"
 //
-//#include<iostream>
 
 
 namespace Rec{
@@ -73,7 +72,7 @@ namespace Rec{
       }
 
       if( m_fillHist && m_curTup ){
-          m_curTup->nTrk=std::min(NTracks,DevTuple::maxNTrk);
+          m_curTup->nTrk=NTracks < DevTuple::maxNTrk ? NTracks : DevTuple::maxNTrk ;
           m_curTup->n2Vrt=0;
       }
 
@@ -192,9 +191,6 @@ namespace Rec{
 	     VARS[7]=sqrt(fabs(1.-cosSVPV*cosSVPV));
 	     VARS[8]=SVPV.Eta();
 	     VARS[9]=std::max(ihitR,jhitR);
-	     //VARS[9]=sumIBLHits;
-	     //VARS[10]=sumBLHits;
-	     //VARS[11]=std::max(Sig3D,m_selVrtSigCut);
              float wgtSelect=m_SV2T_BDT->GetGradBoostMVA(VARS);
              //std::vector<float> weights=m_SV2T_BDT->GetMultiResponse(VARS,3);
 	     //float wgtSelect=weights[0];
diff --git a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx
index 9377d1a92fb868ac24e8a363d891d905cd168be8..434ee61a610a926611b840382e4ba1602f9cb154 100755
--- a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx
+++ b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/Utilities.cxx
@@ -307,7 +307,7 @@ double NewVrtSecInclusiveTool::VrtVrtDist(const xAOD::Vertex & PrimVrt, const Am
     ParentPDG=0;
     if( child->hasProdVtx() ){
        if( child->prodVtx()->nIncomingParticles()==1 ){
-            ParentPDG = abs((*(child->prodVtx()->incomingParticleLinks())[0])->pdgId());
+            ParentPDG = std::abs((*(child->prodVtx()->incomingParticleLinks())[0])->pdgId());
             return *(child->prodVtx()->incomingParticleLinks())[0];
        }
     }
diff --git a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/VrtSecMulti.cxx b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/VrtSecMulti.cxx
index 48342e3225eb6ec03c6d5f77817c7469fa764a60..7076f45744d28c9bf7fb66b62eaf7ad9904eb049 100755
--- a/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/VrtSecMulti.cxx
+++ b/Reconstruction/VKalVrt/NewVrtSecInclusiveTool/src/VrtSecMulti.cxx
@@ -107,14 +107,14 @@ namespace Rec{
                   m_fitSvc->setApproximateVertex(PrimVrt.x(), PrimVrt.y(), PrimVrt.z(),*state); 
               }
           }
-//  std::cout<<"FoundAppVrt="<<newvrt.vertex[0]<<", "<<newvrt.vertex[1]<<", "<<newvrt.vertex[2]<<'\n';
 	  sc = StatusCode::FAILURE;
           sc=m_fitSvc->VKalVrtFit(xAODwrk->tmpListTracks, neutralPartDummy,
 	                                     newvrt.vertex,     newvrt.vertexMom, newvrt.vertexCharge, newvrt.vertexCov,
                                              newvrt.chi2PerTrk, newvrt.trkAtVrt,  newvrt.chi2,
                                              *state, false);
 
-//  std::cout << "Res="<<newvrt.chi2<<", "<<NPTR<<", "<<newvrt.selTrk[0]<<", "<<newvrt.selTrk[1]<<'\n'; 
+          ATH_MSG_VERBOSE("Found IniVertex="<<newvrt.vertex[0]<<", "<<newvrt.vertex[1]<<", "<<newvrt.vertex[2]);
+          ATH_MSG_VERBOSE("with Chi2="<<newvrt.chi2<<" Ntrk="<<NPTR<<" trk1,2="<<newvrt.selTrk[0]<<", "<<newvrt.selTrk[1]); 
           if( sc.isFailure() )           continue;   /* Bad fit - goto next solution */
           if(NPTR==2 && newvrt.chi2>10.) continue;   /* Bad 2track vertex */
           if(newvrt.chi2PerTrk.size()==2) newvrt.chi2PerTrk[0]=newvrt.chi2PerTrk[1]=newvrt.chi2/2.;
@@ -181,8 +181,8 @@ namespace Rec{
           vrtWithCommonTrk.emplace(nTCom,std::make_pair(iv,jv));
       } }
       //============================== DEBUG output
-      //printWrkSet(WrkVrtSet,"InitialVrts");
       //for(auto ku : vrtWithCommonTrk)std::cout<<" nCom="<<ku.first<<" v1="<<ku.second.first<<" v2="<<ku.second.second<<'\n';
+      if(msgLvl(MSG::DEBUG))printWrkSet(WrkVrtSet,"Initial Vertices");
       //===========================================
       for(icvrt=vrtWithCommonTrk.rbegin(); icvrt!=vrtWithCommonTrk.rend(); icvrt++){ 
           int nTCom=(*icvrt).first;
@@ -219,8 +219,8 @@ namespace Rec{
       return finalVertices;
     }
     //------
-    //printWrkSet(WrkVrtSet,"Interm");
-    //------
+    if(msgLvl(MSG::DEBUG))printWrkSet(WrkVrtSet,"Intermediate Vertices");
+     //------
     for( auto &tmpV : (*WrkVrtSet) ) tmpV.projectedVrt=MomProjDist(tmpV.vertex, PrimVrt, tmpV.vertexMom );  //Setup ProjectedVrt
 //----------------------------------------------------------------------------
 //             Here we have the overlapping solutions.
@@ -238,9 +238,11 @@ namespace Rec{
 
     state = m_fitSvc->makeState();
     while((foundMaxT=maxOfShared( WrkVrtSet, TrkInVrt, SelectedTrack, SelectedVertex))>0) {
- //std::cout << "MAX="<<foundMaxT<<", "<<SelectedTrack<<", "<<SelectedVertex<<'\n';
- //std::cout << "VRT="<<minVrtVrtDist( WrkVrtSet, foundV1, foundV2)<<", "<<foundV1<<", "<<foundV2<<'\n';
- //printWrkSet(WrkVrtSet,"Iterat");
+         if(msgLvl(MSG::VERBOSE)) { 
+           printWrkSet(WrkVrtSet,"Iteration");
+           ATH_MSG_VERBOSE("MAX="<<foundMaxT<<", "<<SelectedTrack<<", "<<SelectedVertex<<
+                           "VRT="<<minVrtVrtDist( WrkVrtSet, foundV1, foundV2)<<", "<<foundV1<<", "<<foundV2);
+         }
 
          double foundMinVrtDst = 1000000.;
          if(foundMaxT<m_trackDetachCut) foundMinVrtDst = minVrtVrtDist( WrkVrtSet, foundV1, foundV2);
@@ -391,8 +393,9 @@ namespace Rec{
              if(nth >2)m_hb_sig3DNtr->Fill( signif3D, m_w_1);
           }
 //
-//---  Check V0s and conversions ???
-/*          if(nth==2 && curVrt.vertexCharge==0 && curVrt.detachedTrack<0){
+//---  Check V0s and conversions. Necessity must be checked in physics applications
+#if 0
+          if(nth==2 && curVrt.vertexCharge==0 && curVrt.detachedTrack<0){
              double mass_PiPi =  curVrt.vertexMom.M();  
              double mass_PPi  =  massV0(curVrt.trkAtVrt,m_massP,m_massPi);
              double mass_EE   =  massV0(curVrt.trkAtVrt,m_massE,m_massE);
@@ -403,7 +406,7 @@ namespace Rec{
  	     if( fabs(mass_PPi-m_massLam) <  8.)     continue;
              if( mass_EE < 60. && curVrt.vertex.perp() > 20.) continue;
           }          
-*/
+#endif
 //---
           if(signif3D<m_selVrtSigCut+1.)              continue;      //Main PV-SV distance quality cut 
           if(curVrt.vertex.perp() > m_maxSVRadiusCut) continue;      // Too far from interaction point
diff --git a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
index e4188ae5d8794c62b881eff6846aca05607bafad..0afa22e13c1177145b1999697f1c28237c2af3d3 100644
--- a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
+++ b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
@@ -10,6 +10,7 @@ def getGSFTrackFitter():
     egRotCreator = TrackingCommon.getInDetRotCreator(
         name='egRotCreator',
         private=True)
+
     TrackingCommon.createAndAddCondAlg(
         TrackingCommon.getRIO_OnTrackErrorScalingCondAlg,
         'RIO_OnTrackErrorScalingCondAlg')
@@ -32,9 +33,11 @@ def getGSFTrackFitter():
 
     # Set up the GSF
     from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
-        Trk__GsfMaterialMixtureConvolutionLM)
+        Trk__GsfMaterialMixtureConvolution)
 
-    GsfMaterialUpdator = Trk__GsfMaterialMixtureConvolutionLM(name='GsfMaterialUpdator',MaximumNumberOfComponents=12)
+    GsfMaterialUpdator = Trk__GsfMaterialMixtureConvolution(
+        name='GsfMaterialUpdator',
+        MaximumNumberOfComponents=12)
 
     from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
         Trk__GsfExtrapolator)
@@ -62,6 +65,7 @@ def getGSFTrackFitter():
 
     from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
         Trk__GaussianSumFitter)
+
     GSFTrackFitter = Trk__GaussianSumFitter(
         name='GSFTrackFitter',
         ToolForExtrapolation=GsfExtrapolator,
diff --git a/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx b/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx
index 1c45a6ffbb02a84304ffd5cc94bba681dd5b3cf6..1abba788f4264f1329f6e1b866ac54b2b6004e4d 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/egammaTrkRefitterTool.cxx
@@ -23,24 +23,24 @@
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
 
 
-#include <algorithm> 
+#include <algorithm>
 #include <cmath>
 #include <vector>
 
 
 // INCLUDE GAUDI HEADER FILES:
-#include "GaudiKernel/ObjectVector.h"      
+#include "GaudiKernel/ObjectVector.h"
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/Property.h"
 #include "GaudiKernel/ListItem.h"
 
-egammaTrkRefitterTool::egammaTrkRefitterTool(const std::string& type, 
-                                             const std::string& name, 
+egammaTrkRefitterTool::egammaTrkRefitterTool(const std::string& type,
+                                             const std::string& name,
                                              const IInterface* parent)
   :
   AthAlgTool(type, name, parent),
-  m_ParticleHypothesis(Trk::electron), 
-  m_idHelper(nullptr) 
+  m_ParticleHypothesis(Trk::electron),
+  m_idHelper(nullptr)
 {
   declareInterface< IegammaTrkRefitterTool >(this) ;
 }
@@ -49,18 +49,18 @@ egammaTrkRefitterTool::~egammaTrkRefitterTool()
 {
 }
 
-     
+
 StatusCode egammaTrkRefitterTool::initialize()
 {
   ATH_MSG_DEBUG("Initializing egammaTrackRefitter");
- 
+
   // Retrieve fitter
   ATH_CHECK(m_ITrackFitter.retrieve());
 
   // configure Atlas extrapolator
-  ATH_CHECK(m_extrapolator.retrieve()); 
-  
-  ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID")); 
+  ATH_CHECK(m_extrapolator.retrieve());
+
+  ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
 
   ATH_CHECK(m_beamSpotKey.initialize(m_useBeamSpot));
 
@@ -74,7 +74,7 @@ StatusCode egammaTrkRefitterTool::initialize()
   // Set the particle hypothesis to match the material effects
   Trk::ParticleSwitcher particleSwitch;
   m_ParticleHypothesis = particleSwitch.particle[m_matEffects];
-  
+
   ATH_MSG_INFO("Initialization completed successfully");
   return StatusCode::SUCCESS;
 }
@@ -91,14 +91,14 @@ StatusCode  egammaTrkRefitterTool::refitElectronTrack(const EventContext& ctx,
   ATH_MSG_DEBUG("Refitting a track associated  with an electron");
   // protection against bad pointers
   if (eg==nullptr) return StatusCode::SUCCESS;
-  // Set the pointer to the egamma object. 
+  // Set the pointer to the egamma object.
   cache.electron = eg;
   const xAOD::TrackParticle *trackParticle = eg->trackParticle();
   return refitTrackParticle(ctx,trackParticle,cache);
 }
 
 StatusCode egammaTrkRefitterTool::refitTrackParticle(const EventContext& ctx,
-                                                     const xAOD::TrackParticle* trackParticle, 
+                                                     const xAOD::TrackParticle* trackParticle,
                                                      Cache& cache) const
 {
   ATH_MSG_DEBUG("Refitting a track associated  with a TrackParticle");
@@ -111,30 +111,30 @@ StatusCode egammaTrkRefitterTool::refitTrackParticle(const EventContext& ctx,
   uint8_t dummy(0);
   if(trackParticle->summaryValue(dummy,xAOD::numberOfSCTHits)){
     nSiliconHits_trk += dummy;
-  } 
+  }
   if(trackParticle->summaryValue(dummy,xAOD::numberOfPixelHits)){
     nSiliconHits_trk += dummy;
-  } 
-  
+  }
+
   if( nSiliconHits_trk <= m_MinNoSiHits ) {
     ATH_MSG_DEBUG( "Not enough Si hits on track particle.  The current min is set at " << m_MinNoSiHits );
     return StatusCode::FAILURE;
   }
-  
-  if ( trackParticle->trackLink().isValid()) {      
+
+  if ( trackParticle->trackLink().isValid()) {
     // retrieve and refit original track
     return refitTrack( ctx,trackParticle->track() , cache);
-  } 
+  }
     ATH_MSG_WARNING("Could not get TrackElementLink of the TrackParticle");
     return StatusCode::FAILURE;
-   
+
   return StatusCode::SUCCESS;
 }
 
 StatusCode  egammaTrkRefitterTool::refitTrack(const EventContext& ctx,
-                                              const Trk::Track* track, 
+                                              const Trk::Track* track,
                                               Cache& cache)  const
-{ 
+{
   cache.refittedTrack=nullptr;
   cache.refittedTrackPerigee=nullptr;
   cache.originalTrack=nullptr;
@@ -144,24 +144,24 @@ StatusCode  egammaTrkRefitterTool::refitTrack(const EventContext& ctx,
   }
   //Set the pointer to the track
   cache.originalTrack=track;
-  
+
   //Set pointer to the original perigee
   cache.originalTrackPerigee=cache.originalTrack->perigeeParameters();
-  
+
   if (cache.originalTrackPerigee!=nullptr){
       double od0 = cache.originalTrackPerigee->parameters()[Trk::d0];
       double oz0 = cache.originalTrackPerigee->parameters()[Trk::z0];
       double ophi0 = cache.originalTrackPerigee->parameters()[Trk::phi0];
       double otheta = cache.originalTrackPerigee->parameters()[Trk::theta];
-      double oqOverP = cache.originalTrackPerigee->parameters()[Trk::qOverP];         
-      ATH_MSG_DEBUG("Original parameters " << od0  << " " 
+      double oqOverP = cache.originalTrackPerigee->parameters()[Trk::qOverP];
+      ATH_MSG_DEBUG("Original parameters " << od0  << " "
         << oz0  << " " << ophi0 << " " << otheta << " " << oqOverP << " " << 1/oqOverP) ;
   } else {
     ATH_MSG_WARNING("Could not get Trk::Perigee of original track");
   }
-  
+
   // Refit the track with the beam spot if desired otherwise just refit the original track
-  if (m_useBeamSpot || m_useClusterPosition){ 
+  if (m_useBeamSpot || m_useClusterPosition){
     egammaTrkRefitterTool::MeasurementsAndTrash collect= addPointsToTrack(ctx,
                                                                           cache.originalTrack,
                                                                           cache.electron);
@@ -178,7 +178,7 @@ StatusCode  egammaTrkRefitterTool::refitTrack(const EventContext& ctx,
         ctx, *cache.originalTrack, m_runOutlier, m_ParticleHypothesis);
     }
   } else {
-    std::vector<const Trk::MeasurementBase*>  measurements = getIDHits(cache.originalTrack);  
+    std::vector<const Trk::MeasurementBase*>  measurements = getIDHits(cache.originalTrack);
     if(measurements.size()>4){
       cache.refittedTrack =
         m_ITrackFitter->fit(ctx,
@@ -188,90 +188,90 @@ StatusCode  egammaTrkRefitterTool::refitTrack(const EventContext& ctx,
                             m_ParticleHypothesis);
     } else {
       ATH_MSG_DEBUG("Not enough measurements on tracks");
-      cache.refittedTrack=nullptr; 
+      cache.refittedTrack=nullptr;
     }
   }
 
   // Store refitted perigee pointers
   if (cache.refittedTrack) {
-    cache.refittedTrackPerigee=cache.refittedTrack->perigeeParameters();   
+    cache.refittedTrackPerigee=cache.refittedTrack->perigeeParameters();
     if (cache.refittedTrackPerigee==nullptr){
-      ATH_MSG_WARNING("Could not get refitted Trk::Perigee");     
+      ATH_MSG_WARNING("Could not get refitted Trk::Perigee");
       return StatusCode::FAILURE;
     }
     return StatusCode::SUCCESS;
-  } 
+  }
     ATH_MSG_DEBUG("Refit Failed");
     return StatusCode::FAILURE;
-  
+
 }
 
 const Trk::TrackParameters* egammaTrkRefitterTool::lastTrackParameters(const Trk::Track* track) const
-{ 
-  ATH_MSG_DEBUG("Getting the final track parameters"); 
-  
+{
+  ATH_MSG_DEBUG("Getting the final track parameters");
+
   if (track == nullptr ){
-    ATH_MSG_DEBUG("Track == 0  returning  0"); 
+    ATH_MSG_DEBUG("Track == 0  returning  0");
     return nullptr;
   }
-  
+
   const DataVector<const Trk::TrackStateOnSurface>* oldTrackStates = track->trackStateOnSurfaces();
   if (oldTrackStates == nullptr)
   {
     ATH_MSG_DEBUG("Track has no TSOS vector! Skipping track, returning 0.");
     return nullptr;
   }
-  
-  const Trk::TrackParameters* lastValidTrkParameters(nullptr);  
-  for ( DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator rItTSoS = oldTrackStates->rbegin(); 
+
+  const Trk::TrackParameters* lastValidTrkParameters(nullptr);
+  for ( DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator rItTSoS = oldTrackStates->rbegin();
         rItTSoS != oldTrackStates->rend(); ++rItTSoS)
-  { 
+  {
     if (lastValidTrkParameters!=nullptr){
       break;
     }
-    if ( (*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) && 
+    if ( (*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) &&
          (*rItTSoS)->trackParameters()!=nullptr && (*rItTSoS)->measurementOnTrack()!=nullptr)
     {
       lastValidTrkParameters = (*rItTSoS)->trackParameters()->clone();
     }
   }
-    
+
   if (lastValidTrkParameters!=nullptr){
     ATH_MSG_DEBUG ("Last Valid Trk Q/P" << lastValidTrkParameters->parameters()[Trk::qOverP] );
     return lastValidTrkParameters;
   }
-  ATH_MSG_DEBUG("Last Track Parameters");  
+  ATH_MSG_DEBUG("Last Track Parameters");
   return nullptr;
 }
 
 double egammaTrkRefitterTool::getMaterialTraversed(Trk::Track* track) const {
-  ATH_MSG_DEBUG("Calculating Material Traversed by the Track");  
-  
+  ATH_MSG_DEBUG("Calculating Material Traversed by the Track");
+
   if (!track) return 0.;
-  
+
   double material(0);
   //Note I am not sure if this is the correct way of accessing the information
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator 
-    trackStateOnSurface = track->trackStateOnSurfaces()->begin();    
+  DataVector<const Trk::TrackStateOnSurface>::const_iterator
+    trackStateOnSurface = track->trackStateOnSurfaces()->begin();
   for (;trackStateOnSurface < track->trackStateOnSurfaces()->end(); ++ trackStateOnSurface){
-    // This could be a problebm 
+    // This could be a problebm
     const Trk:: MaterialEffectsBase* materialEffects = (*trackStateOnSurface)->materialEffectsOnTrack();
     if (materialEffects)
       material += materialEffects->thicknessInX0();
   }
   if (material<=0){
-    ATH_MSG_DEBUG(" Material Traversed by the Track >=0");   
+    ATH_MSG_DEBUG(" Material Traversed by the Track >=0");
     return 0.;
-  } 
+  }
   return material;
 }
 
 
 
 egammaTrkRefitterTool::MeasurementsAndTrash egammaTrkRefitterTool::addPointsToTrack(const EventContext& ctx,
-                                                                                    const Trk::Track* track, 
+                                                                                    const Trk::Track* track,
                                                                                     const xAOD::Electron* eg) const {
-  ATH_MSG_DEBUG("Adding Points to the Track");  
+  ATH_MSG_DEBUG("Adding Points to the Track");
   egammaTrkRefitterTool::MeasurementsAndTrash collect {};
    /* The issue here is that some of the returned measurements are owned by storegate
     * some not. For the ones that are not put them in a vector of unique_ptr which
@@ -284,7 +284,7 @@ egammaTrkRefitterTool::MeasurementsAndTrash egammaTrkRefitterTool::addPointsToTr
       collect.m_trash.push_back(std::move(vot));
       collect.m_measurements.push_back(collect.m_trash.back().get());
     }
-    std::vector<const Trk::MeasurementBase*> vecIDHits  = getIDHits(track);   
+    std::vector<const Trk::MeasurementBase*> vecIDHits  = getIDHits(track);
     std::vector<const Trk::MeasurementBase*>::const_iterator it    = vecIDHits.begin();
     std::vector<const Trk::MeasurementBase*>::const_iterator itend = vecIDHits.end();
     // Fill the track , these are not trash
@@ -297,21 +297,21 @@ egammaTrkRefitterTool::MeasurementsAndTrash egammaTrkRefitterTool::addPointsToTr
   }
   if (m_useClusterPosition && eg->caloCluster()){
     int charge(0);
-    if( track->perigeeParameters() ) charge  = (int)track->perigeeParameters()->charge(); 
+    if( track->perigeeParameters() ) charge  = (int)track->perigeeParameters()->charge();
     std::unique_ptr<const Trk::CaloCluster_OnTrack> ccot (m_CCOTBuilder->buildClusterOnTrack(eg->caloCluster(),charge));
     if (ccot!=nullptr){
       collect.m_trash.push_back(std::move(ccot));
       collect.m_measurements.push_back(collect.m_trash.back().get());
     }
   }
-  return collect; 
+  return collect;
 }
 
-const Trk::VertexOnTrack* egammaTrkRefitterTool::provideVotFromBeamspot(const EventContext& ctx, 
+const Trk::VertexOnTrack* egammaTrkRefitterTool::provideVotFromBeamspot(const EventContext& ctx,
                                                                         const Trk::Track* track) const{
-  
+
   const Trk::VertexOnTrack* vot = nullptr;
-  
+
   SG::ReadCondHandle<InDet::BeamSpotData> beamSpotData{m_beamSpotKey, ctx};
   /*
    * Perhaps usefull in serial Athena
@@ -319,7 +319,7 @@ const Trk::VertexOnTrack* egammaTrkRefitterTool::provideVotFromBeamspot(const Ev
   if(!(beamSpotData.isValid())){
       return nullptr;
   }
-  
+
   Amg::Vector3D bpos =beamSpotData->beamPos();
   float beamSpotX = bpos.x();
   float beamSpotY = bpos.y();
@@ -338,31 +338,31 @@ const Trk::VertexOnTrack* egammaTrkRefitterTool::provideVotFromBeamspot(const Ev
   ATH_MSG_DEBUG("constructing beam point (x,y,z) = ( "<<beamX<<" , "<<beamY<<" , "<<z0<<" )");
 
   const Trk::PerigeeSurface * surface = nullptr;
-   
+
   // covariance matrix of the beam-spot
   AmgSymMatrix(2)  beamSpotCov;
   beamSpotCov.setZero();
   beamSpotCov(0,0) = beamSigmaX * beamSigmaX;
-  beamSpotCov(1,1) = beamSigmaY * beamSigmaY; 
+  beamSpotCov(1,1) = beamSigmaY * beamSigmaY;
   const Amg::Vector3D& globPos(BSC);
   surface = new Trk::PerigeeSurface(globPos);
-  
+
   // create a measurement for the beamspot
   const Amg::Vector2D  Par0(0.,Trk::d0);
   Trk::LocalParameters beamSpotParameters(Par0);
-  
+
   // calculate perigee parameters wrt. beam-spot
   const Trk::Perigee * perigee = nullptr;
   const Trk::TrackParameters* tmp =m_extrapolator->extrapolate(*track, *surface);
   if(tmp->associatedSurface().type()==Trk::Surface::Perigee){
     perigee= static_cast<const Trk::Perigee*> (tmp);
   }
-  if (!perigee) {// if failure 
+  if (!perigee) {// if failure
     const Trk::Perigee * trackPerigee = track->perigeeParameters();
     if ( trackPerigee && ((trackPerigee->associatedSurface())) == *surface )
       perigee = trackPerigee->clone();
   }
-  
+
   Eigen::Matrix<double,1,2> Jacobian;
   Jacobian.setZero();
   if(perigee){
@@ -371,7 +371,7 @@ const Trk::VertexOnTrack* egammaTrkRefitterTool::provideVotFromBeamspot(const Ev
     Jacobian(0,1) =  ptInv * perigee->momentum().x();
   }
 
-  Amg::MatrixX errorMatrix(Jacobian*(beamSpotCov*Jacobian.transpose()));  
+  Amg::MatrixX errorMatrix(Jacobian*(beamSpotCov*Jacobian.transpose()));
   vot = new Trk::VertexOnTrack(beamSpotParameters, errorMatrix, *surface);
   ATH_MSG_DEBUG(" the VertexOnTrack objects created from BeamSpot are " << *vot);
 
@@ -382,23 +382,25 @@ const Trk::VertexOnTrack* egammaTrkRefitterTool::provideVotFromBeamspot(const Ev
 
 
 std::vector<const Trk::MeasurementBase*> egammaTrkRefitterTool::getIDHits(const Trk::Track* track)  const
-{ 
-  std::vector<const Trk::MeasurementBase*> measurementSet;
+{
   //store all silicon measurements into the measurementset
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator 
+  DataVector<const Trk::TrackStateOnSurface>::const_iterator
     trackStateOnSurface = track->trackStateOnSurfaces()->begin();
-  
+
+  std::vector<const Trk::MeasurementBase*> measurementSet;
+  measurementSet.reserve(track->trackStateOnSurfaces()->size());
+
   for ( ; trackStateOnSurface != track->trackStateOnSurfaces()->end(); ++trackStateOnSurface ) {
     if ( !(*trackStateOnSurface) ){
       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( Trk::TrackStateOnSurface::Measurement) ){
         const Trk::RIO_OnTrack* rio = nullptr;
         const Trk::MeasurementBase* tmp = (*trackStateOnSurface)->measurementOnTrack() ;
         if(tmp->type(Trk::MeasurementBaseType::RIO_OnTrack)){
-           rio =static_cast <const Trk::RIO_OnTrack*>( tmp);   
+           rio =static_cast <const Trk::RIO_OnTrack*>( tmp);
         }
         if (rio != nullptr) {
           const Identifier& surfaceID = (rio->identify()) ;
@@ -407,13 +409,13 @@ std::vector<const Trk::MeasurementBase*> egammaTrkRefitterTool::getIDHits(const
           } else if( !m_RemoveTRT && m_idHelper->is_trt(surfaceID) ) {
             measurementSet.push_back( (*trackStateOnSurface)->measurementOnTrack() );
           }
-        }        				
+        }
       }
       else if ( m_reintegrateOutliers && (*trackStateOnSurface)->type( Trk::TrackStateOnSurface::Outlier) ){
         const Trk::RIO_OnTrack* rio = nullptr;
         const Trk::MeasurementBase* tmp = (*trackStateOnSurface)->measurementOnTrack() ;
         if(tmp->type(Trk::MeasurementBaseType::RIO_OnTrack)){
-           rio =static_cast <const Trk::RIO_OnTrack*>( tmp);   
+           rio =static_cast <const Trk::RIO_OnTrack*>( tmp);
         }
         if (rio != nullptr) {
           const Identifier& surfaceID = (rio->identify()) ;
@@ -423,7 +425,7 @@ std::vector<const Trk::MeasurementBase*> egammaTrkRefitterTool::getIDHits(const
             measurementSet.push_back( (*trackStateOnSurface)->measurementOnTrack() );
           }
         }
-      } 
+      }
     }
   }
   return measurementSet;
diff --git a/Reconstruction/tauRecTools/Root/TauPi0ScoreCalculator.cxx b/Reconstruction/tauRecTools/Root/TauPi0ScoreCalculator.cxx
index 457eb95138c8253b21082c34acc6491699cb95c3..2f77020605c5c44fa06abfbce0a2be6dac36a460 100644
--- a/Reconstruction/tauRecTools/Root/TauPi0ScoreCalculator.cxx
+++ b/Reconstruction/tauRecTools/Root/TauPi0ScoreCalculator.cxx
@@ -55,7 +55,7 @@ StatusCode TauPi0ScoreCalculator::finalize()
 }
 
 
-StatusCode TauPi0ScoreCalculator::executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) 
+StatusCode TauPi0ScoreCalculator::executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) const
 {
     //---------------------------------------------------------------------
     // only run on 1-5 prong taus 
@@ -80,7 +80,7 @@ StatusCode TauPi0ScoreCalculator::executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOCo
 }
 
 
-float TauPi0ScoreCalculator::calculateScore(const xAOD::PFO* neutralPFO)
+float TauPi0ScoreCalculator::calculateScore(const xAOD::PFO* neutralPFO) const
 {
     std::map<TString, float> availableVariables; // map of the variable name to its value
     
diff --git a/Reconstruction/tauRecTools/Root/TauPi0Selector.cxx b/Reconstruction/tauRecTools/Root/TauPi0Selector.cxx
index c3071d1ef869dc1f0d58307140cf7727f0d64a27..6f7f2eae513debbf3d057dc1af520b581b0c223c 100644
--- a/Reconstruction/tauRecTools/Root/TauPi0Selector.cxx
+++ b/Reconstruction/tauRecTools/Root/TauPi0Selector.cxx
@@ -44,7 +44,7 @@ StatusCode TauPi0Selector::finalize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode TauPi0Selector::executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) 
+StatusCode TauPi0Selector::executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) const
 {
     // decay mode enum
     auto kDecayModeProto = xAOD::TauJetParameters::PanTau_DecayModeProto;
@@ -123,7 +123,7 @@ StatusCode TauPi0Selector::executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer
     return StatusCode::SUCCESS;
 }
 
-int TauPi0Selector::getPi0Cluster_etaBin(double Pi0Cluster_eta){
+int TauPi0Selector::getPi0Cluster_etaBin(double Pi0Cluster_eta) const {
     int Pi0Cluster_etaBin = -1;
     double Pi0Cluster_noCorr_ABSeta = std::abs(Pi0Cluster_eta);
 
@@ -135,7 +135,7 @@ int TauPi0Selector::getPi0Cluster_etaBin(double Pi0Cluster_eta){
     return Pi0Cluster_etaBin;
 }
 
-TLorentzVector TauPi0Selector::getP4(const xAOD::TauJet& pTau)
+TLorentzVector TauPi0Selector::getP4(const xAOD::TauJet& pTau) const
 {
     TLorentzVector p4(0.,0.,0.,0.);
     // Add charged PFOs 
diff --git a/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx b/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
index 19f60ab1b39a9d4450ebadb68fa70395fd1f5812..e6763cc28db5e6534835a1e4f904af9abd2dc055 100644
--- a/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
+++ b/Reconstruction/tauRecTools/Root/TauRecToolBase.cxx
@@ -192,12 +192,12 @@ StatusCode TauRecToolBase::executeVertexVariables(xAOD::TauJet& /*pTau*/, xAOD::
   return StatusCode::FAILURE;
 }
 
-StatusCode TauRecToolBase::executePi0ClusterScaler(xAOD::TauJet& /*pTau*/, xAOD::PFOContainer& /*neutralPFOContainer*/, xAOD::PFOContainer& /*chargedPFOContainer*/ ) {
+StatusCode TauRecToolBase::executePi0ClusterScaler(xAOD::TauJet& /*pTau*/, xAOD::PFOContainer& /*neutralPFOContainer*/, xAOD::PFOContainer& /*chargedPFOContainer*/ ) const {
   ATH_MSG_ERROR("function not implemented");
   return StatusCode::FAILURE;
 } 
 
-StatusCode TauRecToolBase::executePi0nPFO(xAOD::TauJet& /*pTau*/, xAOD::PFOContainer& /*neutralPFOContainer*/) {
+StatusCode TauRecToolBase::executePi0nPFO(xAOD::TauJet& /*pTau*/, xAOD::PFOContainer& /*neutralPFOContainer*/) const {
   ATH_MSG_ERROR("function not implemented");
   return StatusCode::FAILURE;
 }
diff --git a/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx b/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
index 8f5174d7ff8e960e413b5f037c2bc7998b7b5de9..31dfd4c4add060cf37a051e251cb82967b0d07ed 100644
--- a/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
+++ b/Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
@@ -1,67 +1,67 @@
 /*
-  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 "tauRecTools/TauWPDecorator.h"
 
 #include "AsgDataHandles/ReadHandle.h"
 
-#include <utility>
+#include <algorithm>
 #include "TFile.h"
 #include "TH2.h"
-#include "TString.h"
 
-/********************************************************************/
-TauWPDecorator::TauWPDecorator(const std::string& name) :
-  TauRecToolBase(name)
-{
-  declareProperty("flatteningFile0Prong", m_file0P);
-  declareProperty("flatteningFile1Prong", m_file1P);
-  declareProperty("flatteningFile3Prong", m_file3P);
 
-  declareProperty("ScoreName", m_scoreName = "BDTJetScore");
-  declareProperty("NewScoreName", m_newScoreName = "BDTJetScoreSigTrans");
 
-  declareProperty("DefineWPs", m_defineWP=false);
-  declareProperty("UseEleBDT", m_electronMode=false);
+TauWPDecorator::TauWPDecorator(const std::string& name) :
+  TauRecToolBase(name) {
+  declareProperty("UseEleBDT", m_electronMode = false);
+  declareProperty("DefineWPs", m_defineWPs = false);
+  declareProperty("ScoreName", m_scoreName = "");
+  declareProperty("NewScoreName", m_scoreNameTrans = "");
   
-  declareProperty("CutEnumVals", m_cut_bits);
-  declareProperty("SigEff0P", m_cut_effs_0p);
-  declareProperty("SigEff1P", m_cut_effs_1p);
-  declareProperty("SigEff3P", m_cut_effs_3p);
-
-  declareProperty("DecorWPNames", m_decoration_names);
-  declareProperty("DecorWPCutEffs0P", m_cut_effs_decoration_0p);
-  declareProperty("DecorWPCutEffs1P", m_cut_effs_decoration_1p);
-  declareProperty("DecorWPCutEffs3P", m_cut_effs_decoration_3p);
+  declareProperty("flatteningFile0Prong", m_file0p = "");
+  declareProperty("flatteningFile1Prong", m_file1p = "");
+  declareProperty("flatteningFile3Prong", m_file3p = "");
+  
+  declareProperty("CutEnumVals", m_EDMWPs);
+  declareProperty("SigEff0P", m_EDMWPEffs0p);
+  declareProperty("SigEff1P", m_EDMWPEffs1p);
+  declareProperty("SigEff3P", m_EDMWPEffs3p);
+
+  declareProperty("DecorWPNames", m_decorWPs);
+  declareProperty("DecorWPCutEffs0P", m_decorWPEffs0p);
+  declareProperty("DecorWPCutEffs1P", m_decorWPEffs1p);
+  declareProperty("DecorWPCutEffs3P", m_decorWPEffs3p);
 }
 
-/********************************************************************/
+
+
 TauWPDecorator::~TauWPDecorator() {
 }
 
-StatusCode TauWPDecorator::retrieveHistos(int nProng) {
 
+
+StatusCode TauWPDecorator::retrieveHistos(int nProng) {
   // Find and open file
   std::string fileName;
-  std::vector<m_pair_t>* histArray = nullptr;
+  std::shared_ptr<std::vector<m_pair_t>> histArray = nullptr;
   if (nProng == 0) { 
-    fileName = m_file0P;
-    histArray = m_hists0P.get();
+    fileName = m_file0p;
+    histArray = m_hists0p;
   }
   else if (nProng == 1) {
-    fileName = m_file1P;
-    histArray = m_hists1P.get();
+    fileName = m_file1p;
+    histArray = m_hists1p;
   }
   else {
-    fileName = m_file3P;
-    histArray = m_hists3P.get();
+    fileName = m_file3p;
+    histArray = m_hists3p;
   }
 
   std::string fullPath = find_file(fileName);
-  std::unique_ptr<TFile>  myFile(TFile::Open(fullPath.c_str(), "READ"));
+  std::unique_ptr<TFile> file(TFile::Open(fullPath.c_str(), "READ"));
 
-  if(!myFile || myFile->IsZombie()) {
+  if (!file || file->IsZombie()) {
     ATH_MSG_FATAL("Could not open file " << fullPath.c_str());
     return StatusCode::FAILURE;  
   }
@@ -69,218 +69,237 @@ StatusCode TauWPDecorator::retrieveHistos(int nProng) {
   ATH_MSG_INFO("Loading working points from " << fullPath.c_str());
   
   // Iterate over working points
-  for(int i=0; i<100; i++)
-  {
+  for (int i = 0; i < 100; ++i) {
     // Retrieve histogram
-    TH2* myGraph = dynamic_cast<TH2*>(myFile->Get(Form("h2_%02d", i)));
-    if(!myGraph){
+    TH2* graph = dynamic_cast<TH2*>(file->Get(Form("h2_%02d", i)));
+    if (!graph){
       ATH_MSG_WARNING("Failed to retrieve Graph " << i << " named " << Form("h2_%02d", i));
       continue;
     }
-      
-    std::unique_ptr<TH2> myLocalGraph(myGraph);
-    myLocalGraph->SetDirectory(0);       
-    histArray->push_back(m_pair_t(float(i)/100., std::move(myLocalGraph)));
+    graph->SetDirectory(0);       
+    std::shared_ptr<TH2> sharedGraph(graph);
+    histArray->push_back(m_pair_t(float(i)/100., std::move(sharedGraph)));
   }
   
-  myFile->Close();
+  file->Close();
+  
+  if (histArray->size() == 0) {
+    ATH_MSG_ERROR("There is no histograms for " << nProng << "-prong taus");
+    return StatusCode::FAILURE;
+  }
 
   return StatusCode::SUCCESS;  
 }
 
-StatusCode TauWPDecorator::storeLimits(int nProng) {
 
-  std::vector<m_pair_t>* histArray = nullptr;
-  if (nProng == 0) histArray = m_hists0P.get();
-  else if (nProng == 1) histArray = m_hists1P.get();
-  else histArray = m_hists3P.get();
 
-  // Default values
-  m_xmin[nProng] = 1E9;
-  m_xmax[nProng] = -1E9;
-  m_ymin[nProng] = 1E9;
-  m_ymax[nProng] = -1E9;
-
-  // Store limits
-  for (unsigned int i=0; i<histArray->size(); i++)
-  {
-    TH2* myHist = histArray->at(i).second.get();
-    m_xmin[nProng] = TMath::Min(myHist->GetXaxis()->GetXmin(), m_xmin[nProng]);
-    m_ymin[nProng] = TMath::Min(myHist->GetYaxis()->GetXmin(), m_ymin[nProng]);
+StatusCode TauWPDecorator::storeLimits(int nProng) {
+  std::shared_ptr<std::vector<m_pair_t>> histArray = nullptr;
+  if (nProng == 0) {
+    histArray = m_hists0p;
+  }
+  else if (nProng == 1) {
+    histArray = m_hists1p;
+  }
+  else {
+    histArray = m_hists3p;
+  }
 
-    m_xmax[nProng] = TMath::Max(myHist->GetXaxis()->GetBinCenter(myHist->GetNbinsX()), m_xmax[nProng]);
-    m_ymax[nProng] = TMath::Max(myHist->GetYaxis()->GetBinCenter(myHist->GetNbinsY()), m_ymin[nProng]);
+  std::shared_ptr<TH2> firstHist = histArray->at(0).second;
+  m_xMin[nProng] = firstHist->GetXaxis()->GetXmin();
+  m_xMax[nProng] = firstHist->GetXaxis()->GetBinCenter(firstHist->GetNbinsX());
+  m_yMin[nProng] = firstHist->GetYaxis()->GetXmin();
+  m_yMax[nProng] = firstHist->GetYaxis()->GetBinCenter(firstHist->GetNbinsY());
 
+  // Check all the histograms have the same limits
+  for (size_t i = 1; i < histArray->size(); ++i) {
+    std::shared_ptr<TH2> hist = histArray->at(i).second;
+  
+    double xMin = hist->GetXaxis()->GetXmin();
+    double xMax = hist->GetXaxis()->GetBinCenter(firstHist->GetNbinsX());
+    double yMin = hist->GetYaxis()->GetXmin();
+    double yMax = hist->GetYaxis()->GetBinCenter(firstHist->GetNbinsY());
+   
+    if (std::abs(m_xMin[nProng] - xMin) > 1e-5 ||
+        std::abs(m_xMax[nProng] - xMax) > 1e-5 ||
+        std::abs(m_yMin[nProng] - yMin) > 1e-5 ||
+        std::abs(m_yMax[nProng] - yMax) > 1e-5) {
+      ATH_MSG_WARNING("The " << i << " th histogram has different limit");
+    } 
   }
 
   return StatusCode::SUCCESS;
 }
 
-double TauWPDecorator::transformScore(double score, double cut_lo, double eff_lo, double cut_hi, double eff_hi) const {
-  double newscore = 1. - eff_lo - (score - cut_lo)/(cut_hi - cut_lo) * (eff_hi - eff_lo);
-  return newscore;
+double TauWPDecorator::transformScore(double score, double cutLow, double effLow, double cutHigh, double effHigh) const {
+  double efficiency = effLow + (score - cutLow)/(cutHigh - cutLow) * (effHigh - effLow);
+  double scoreTrans = 1.0 - efficiency;
+  return scoreTrans;
 }
 
-/********************************************************************/
+
+
 StatusCode TauWPDecorator::initialize() {
 
   ATH_CHECK( m_eventInfo.initialize() );
 
   // 0p is for trigger only
-  if(!m_file0P.empty()) {
-    m_hists0P = std::make_unique<std::vector<m_pair_t>>();
-    ATH_CHECK( retrieveHistos(0) );
-    ATH_CHECK( storeLimits(0) );
+  if (!m_file0p.empty()) {
+    m_hists0p = std::make_shared<std::vector<m_pair_t>>();
+    ATH_CHECK(retrieveHistos(0));
+    ATH_CHECK(storeLimits(0));
+  }
+  
+  // 1p and 3p file must be provided
+  if (m_file1p.empty() || m_file3p.empty()) {
+    ATH_MSG_ERROR("1p/3p flatterning file is not provided !");
+    return StatusCode::FAILURE;
   }
 
-  m_hists1P = std::make_unique<std::vector<m_pair_t>>();
-  ATH_CHECK( retrieveHistos(1) );
-  ATH_CHECK( storeLimits(1) );
+  m_hists1p = std::make_shared<std::vector<m_pair_t>>();
+  ATH_CHECK(retrieveHistos(1));
+  ATH_CHECK(storeLimits(1));
   
-  m_hists3P = std::make_unique<std::vector<m_pair_t>>();
-  ATH_CHECK( retrieveHistos(3) );
-  ATH_CHECK( storeLimits(3) );  
+  m_hists3p = std::make_shared<std::vector<m_pair_t>>();
+  ATH_CHECK(retrieveHistos(3));
+  ATH_CHECK(storeLimits(3));  
+    
+  for (size_t wpIndex=0; wpIndex < m_decorWPs.size(); ++wpIndex) {
+    const std::string& name = m_decorWPs[wpIndex];
+    m_charDecors.emplace_back(SG::AuxElement::Decorator<char>(name));
+  }
 
   return StatusCode::SUCCESS;
 }
 
-/********************************************************************/
-StatusCode TauWPDecorator::execute(xAOD::TauJet& pTau) const
-{ 
 
-  float mu = 0;
-  SG::ReadHandle<xAOD::EventInfo> eventinfoInHandle( m_eventInfo );
-  if (!eventinfoInHandle.isValid()) {
-    ATH_MSG_ERROR( "Could not retrieve HiveDataObj with key " << eventinfoInHandle.key() << ", mu is set to be .0");
-  }
+
+StatusCode TauWPDecorator::execute(xAOD::TauJet& pTau) const { 
+  // obtain the dependent variables of the efficiency 
+  // -- x variable is tau pt
+  double xVariable = pTau.pt();
+  
+  // -- y variable is |eta| of leading track in electron mode, and pileup in other cases
+  double yVariable = 0.0;
+  if (m_electronMode) {
+     const SG::AuxElement::ConstAccessor<float> acc_absEta("ABS_ETA_LEAD_TRACK");
+     yVariable = std::abs(acc_absEta(pTau));
+  } 
   else {
-    const xAOD::EventInfo* eventInfo = eventinfoInHandle.cptr();    
-    mu = eventInfo->averageInteractionsPerCrossing();
+    SG::ReadHandle<xAOD::EventInfo> eventinfoInHandle( m_eventInfo );
+    if (!eventinfoInHandle.isValid()) {
+        ATH_MSG_ERROR("Could not retrieve HiveDataObj with key " << eventinfoInHandle.key() << ", mu is set to be .0");
+    }
+    else {
+        const xAOD::EventInfo* eventInfo = eventinfoInHandle.cptr();    
+        yVariable = eventInfo->averageInteractionsPerCrossing();
+    }
   }
 
-  const SG::AuxElement::ConstAccessor<float> acc_score(m_scoreName);
-  SG::AuxElement::Accessor<float> acc_newScore(m_newScoreName);
-
-  // could use detail(TauJetParameters::nChargedTracks) for trigger, but TauIDVarCalculator used nTracks()
   int nProng = pTau.nTracks();
-
-  // WARNING, previous behaviour: use 1p flattening file for 1-track taus, else use 3p flattening file
-  // meaning when we don't use a 0p flattening file, 0p falls back to 3p case
-  // for now, keep it for backward-compatibility
-  if(nProng==0 && !m_hists0P) nProng = 3;
-  else if(nProng>=2) nProng = 3;
-
-  std::vector<m_pair_t>* histArray = nullptr;
-  if (nProng == 0) histArray = m_hists0P.get();
-  else if (nProng == 1) histArray = m_hists1P.get();
-  else histArray = m_hists3P.get();
   
- // Retrieve tau properties
-  double score = acc_score(pTau);
-  double pt = pTau.pt();
+  // nProng >=2 is treated as 3 prong 
+  // 0 prong is treated as 3 prong when 0 prong calibraction file is not provided
+  if (nProng==0 && !m_hists0p) {
+    nProng = 3;
+  }
+  else if (nProng>=2) {
+    nProng = 3;
+  }
 
-  double y_var = 0.0;
-  if(m_electronMode) {
-     const SG::AuxElement::ConstAccessor<float> acc_absEta("ABS_ETA_LEAD_TRACK");
-     y_var = std::abs(acc_absEta(pTau));
-  } else {
-     y_var = mu;
+  // make sure the dependent variables are within the range of calibration histograms
+  ATH_MSG_DEBUG("original pT:\t" << xVariable);
+  if (m_electronMode) {
+    ATH_MSG_DEBUG("original |eta|:\t" << yVariable);
+  }
+  else {
+    ATH_MSG_DEBUG("original mu:\t" << yVariable);
   }
 
-  ATH_MSG_VERBOSE("pT before " << pt);
-  ATH_MSG_VERBOSE("mu before " << y_var);
+  xVariable = std::min(m_xMax.at(nProng), std::max(m_xMin.at(nProng), xVariable));
+  yVariable = std::min(m_yMax.at(nProng), std::max(m_yMin.at(nProng), yVariable));
+  
+  ATH_MSG_DEBUG("final pT:\t" << xVariable);
+  if (m_electronMode) {
+    ATH_MSG_DEBUG("final |eta|:\t" << yVariable);
+  }
+  else {
+    ATH_MSG_DEBUG("final mu:\t" << yVariable);
+  }
 
-  // Implement limits
-  pt = TMath::Min(m_xmax.at(nProng), TMath::Max(m_xmin.at(nProng), pt));
-  y_var = TMath::Min(m_ymax.at(nProng), TMath::Max(m_ymin.at(nProng), y_var));
+  std::shared_ptr<std::vector<m_pair_t>> histArray = nullptr;
+  if (nProng == 0) histArray = m_hists0p;
+  else if (nProng == 1) histArray = m_hists1p;
+  else histArray = m_hists3p;
   
-  ATH_MSG_VERBOSE("pT after " << pt);
-  ATH_MSG_VERBOSE("mu after " << y_var);
-
-  // calculate flattened disc
-  std::vector<double> cuts(2,0.);
-  std::vector<double> effs(2,0.);
-  bool gotLow = false;
-  bool gotHigh = false;
+  std::array<double, 2> cuts = {-1.01, 1.01}; // lower and upper bounday of the score
+  std::array<double, 2> effs = {1.0, 0.0}; // efficiency corresponding to the score cut
+  bool gotLow = false; // whether lower bounday is found
+  bool gotHigh = false; // whether upper bounday is found
   
-  // Loop over all histograms
-  for (unsigned int i=0; i<histArray->size(); i++) {
-    TH2* myHist = histArray->at(i).second.get();
-    double myCut = myHist->Interpolate(pt, y_var);
+  const SG::AuxElement::ConstAccessor<float> acc_score(m_scoreName);
+  double score = acc_score(pTau); // original score (BDT/RNN)
+  
+  // Loop over all histograms to find the lower and upper bounary of the score and corresponding efficiency
+  for (unsigned int i = 0; i < histArray->size(); ++i) {
+    std::shared_ptr<TH2> myHist = histArray->at(i).second;
+    double myCut = myHist->Interpolate(xVariable, yVariable);
     
-    // Find upper and lower cuts
-    if(myCut <= score && ((!gotLow) || std::abs(myCut-score) < std::abs(cuts[0]-score))) {
+    if (myCut <= score && ((!gotLow) || std::abs(myCut-score) < std::abs(cuts[0]-score))) {
       gotLow = true;
       effs[0] = histArray->at(i).first;
       cuts[0] = myCut;
     }
-      
-    else if(myCut > score && ((!gotHigh) || std::abs(myCut-score) < std::abs(cuts[1]-score))) {
+    else if (myCut > score && ((!gotHigh) || std::abs(myCut-score) < std::abs(cuts[1]-score))) {
       gotHigh = true;
       effs[1] = histArray->at(i).first;
       cuts[1] = myCut;
     }
 
-    if(gotLow && gotHigh){
+    if (gotLow && gotHigh){
       ATH_MSG_VERBOSE("break @ " << myHist->GetName());
       break;
     }
   }
 
-  ATH_MSG_VERBOSE("BDTScore " << score);
-  ATH_MSG_VERBOSE("CutLow/High " << cuts[0] << " " << cuts[1]);
-  ATH_MSG_VERBOSE("EffLow/High " << effs[0] << " " << effs[1]);
-  ATH_MSG_VERBOSE("gotHigh=" << gotHigh << " gotLow=" << gotLow);
-
-  if(!gotLow && !gotHigh) {
-    ATH_MSG_WARNING("Must have at least upper or lower efficiency boundary!");
-    ATH_MSG_WARNING("Candidate pT/mu/BDTscore " << pt << " " << y_var << " " << score);
+  double scoreTrans = -1111.; // flattened score
+  if (score > cuts[1]) { // should not happen
+    scoreTrans = 1 - effs[1];
   }
-
-  // Upper & Lower Boundaries
-  if(!gotHigh) {
-    cuts[1] = 1.01;
-    effs[1] = 0.0;
+  else if (score < cuts[0]) { // score is -9999 when BDT/RNN fails
+    scoreTrans = 1 - effs[0];
   }
-  if(!gotLow) {
-    cuts[0] = -1.01;
-    effs[0] = 1.0;
-  }
-
-  // Evaluate and decorate new score
-  double newscore = -1111.;
-  // Score higher than default upper boundary (rare)
-  if( score > cuts[1] )      newscore = 1 - effs[1];
-  // Score lower than default lower boundary (rare)            
-  else if( score < cuts[0] ) newscore = 1 - effs[0];
-  // Score inside boundaries            
   else {
-    newscore = transformScore(score, cuts[0], effs[0], cuts[1], effs[1]);
+    scoreTrans = transformScore(score, cuts[0], effs[0], cuts[1], effs[1]);
   }
-  acc_newScore(pTau) = newscore;
+  SG::AuxElement::Accessor<float> acc_scoreTrans(m_scoreNameTrans);
+  acc_scoreTrans(pTau) = scoreTrans;
   
-  if(m_defineWP) {
-    for (u_int Nwp=0; Nwp < m_cut_bits.size(); Nwp++){
+  if(m_defineWPs) {
+    // WPs in EDM
+    for (size_t wpIndex=0; wpIndex < m_EDMWPs.size(); ++wpIndex) {
       if(nProng == 0) {
-	pTau.setIsTau((xAOD::TauJetParameters::IsTauFlag) m_cut_bits[Nwp], newscore > (1-m_cut_effs_0p[Nwp]));
+        pTau.setIsTau((xAOD::TauJetParameters::IsTauFlag) m_EDMWPs[wpIndex], scoreTrans > (1-m_EDMWPEffs0p[wpIndex]));
       }
       else if(nProng == 1) {
-	pTau.setIsTau((xAOD::TauJetParameters::IsTauFlag) m_cut_bits[Nwp], newscore > (1-m_cut_effs_1p[Nwp]));
+        pTau.setIsTau((xAOD::TauJetParameters::IsTauFlag) m_EDMWPs[wpIndex], scoreTrans > (1-m_EDMWPEffs1p[wpIndex]));
       }
       else {
-	pTau.setIsTau((xAOD::TauJetParameters::IsTauFlag) m_cut_bits[Nwp], newscore > (1-m_cut_effs_3p[Nwp]));
+        pTau.setIsTau((xAOD::TauJetParameters::IsTauFlag) m_EDMWPs[wpIndex], scoreTrans > (1-m_EDMWPEffs3p[wpIndex]));
       }
     }
     // Decorate other WPs
-    for (u_int Nwp=0; Nwp < m_decoration_names.size(); Nwp++){
+    for (size_t wpIndex=0; wpIndex < m_decorWPs.size(); ++wpIndex) {
+      const SG::AuxElement::Decorator<char>& decorator = m_charDecors[wpIndex];
+
       if(nProng == 0) {
-	pTau.auxdecor<char>(m_decoration_names[Nwp]) = newscore > (1-m_cut_effs_decoration_0p[Nwp]);
+        decorator(pTau) = scoreTrans > (1-m_decorWPEffs0p[wpIndex]);
       }
       else if(nProng == 1) {
-	pTau.auxdecor<char>(m_decoration_names[Nwp]) = newscore > (1-m_cut_effs_decoration_1p[Nwp]);    
+        decorator(pTau) = scoreTrans > (1-m_decorWPEffs1p[wpIndex]);    
       }
       else {
-	pTau.auxdecor<char>(m_decoration_names[Nwp]) = newscore > (1-m_cut_effs_decoration_3p[Nwp]);    
+        decorator(pTau) = scoreTrans > (1-m_decorWPEffs3p[wpIndex]);    
       }
     }
   }
@@ -288,12 +307,8 @@ StatusCode TauWPDecorator::execute(xAOD::TauJet& pTau) const
   return StatusCode::SUCCESS;
 }
 
-//-----------------------------------------------------------------------------
-// Finalize
-//-----------------------------------------------------------------------------
+
 
 StatusCode TauWPDecorator::finalize() {
-  
   return StatusCode::SUCCESS;
-  
 }
diff --git a/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.cxx b/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.cxx
index 2d9a903a0ac915b636c5e7670e2adef5442da919..e20747d4892432a2ad095d6add4ef07c3f32bf93 100644
--- a/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.cxx
+++ b/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.cxx
@@ -51,7 +51,7 @@ StatusCode TauPi0ClusterScaler::finalize()
 }
 
 
-StatusCode TauPi0ClusterScaler::executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer, xAOD::PFOContainer& chargedPFOContainer)
+StatusCode TauPi0ClusterScaler::executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer, xAOD::PFOContainer& chargedPFOContainer) const
 {
     // Clear vector of cell-based charged PFO Links. 
     // Required when rerunning on xAOD level.
@@ -82,7 +82,7 @@ StatusCode TauPi0ClusterScaler::executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD
     return StatusCode::SUCCESS;
 }
 
-void TauPi0ClusterScaler::resetNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer)
+void TauPi0ClusterScaler::resetNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) const
 {
     // Set neutral PFO kinematics to vertex corrected cluster
     ATH_MSG_DEBUG("Resetting neutral PFO kinematics");
@@ -109,7 +109,7 @@ void TauPi0ClusterScaler::resetNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContaine
 
 
 
-void TauPi0ClusterScaler::createChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& cPFOContainer)
+void TauPi0ClusterScaler::createChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& cPFOContainer) const
 {
     ATH_MSG_DEBUG("Creating charged PFOs");
     for(auto tauTrackLink : pTau.tauTrackLinks(xAOD::TauJetParameters::classifiedCharged)){
@@ -137,7 +137,7 @@ void TauPi0ClusterScaler::createChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContain
     }
 }
 
-void TauPi0ClusterScaler::associateHadronicToChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& chargedPFOContainer)
+void TauPi0ClusterScaler::associateHadronicToChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& chargedPFOContainer) const
 {
     ATH_MSG_DEBUG("Associating hadronic PFOs to charged PFOs");
 
@@ -209,13 +209,13 @@ void TauPi0ClusterScaler::associateHadronicToChargedPFOs(xAOD::TauJet& pTau, xAO
     }
 
     // finally set hadronic PFO links (note: we use existing TauShot enum)
-    for( auto kv : linkMap ){
-        if(not kv.first->setAssociatedParticleLinks(xAOD::PFODetails::TauShot,kv.second))
+    for( auto [k,v] : linkMap ){
+        if(not k->setAssociatedParticleLinks(xAOD::PFODetails::TauShot, v))
             ATH_MSG_WARNING("Couldn't add hadronic PFO links to charged PFO!");
     }
 }
 
-void TauPi0ClusterScaler::associateChargedToNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer)
+void TauPi0ClusterScaler::associateChargedToNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) const
 {
     ATH_MSG_DEBUG("Associating charged PFOs to neutral PFOs");
     // Will: I'm ashamed of this link-map, but its necessary until the 
@@ -287,14 +287,14 @@ void TauPi0ClusterScaler::associateChargedToNeutralPFOs(xAOD::TauJet& pTau, xAOD
     }
 
     // finally set charged PFO links
-    for( auto kv : linkMap ){
-        if(not kv.first->setAssociatedParticleLinks(xAOD::PFODetails::Track,kv.second))
+    for( auto [k,v] : linkMap ){
+        if(not k->setAssociatedParticleLinks(xAOD::PFODetails::Track,v))
             ATH_MSG_WARNING("Couldn't add charged PFO links to neutral PFO!");
     }
 }
 
 
-void TauPi0ClusterScaler::subtractChargedEnergyFromNeutralPFOs(xAOD::PFOContainer& neutralPFOContainer)
+void TauPi0ClusterScaler::subtractChargedEnergyFromNeutralPFOs(xAOD::PFOContainer& neutralPFOContainer) const
 {
     ATH_MSG_DEBUG("Subtracting charged energy from neutral PFOs");
     for( auto neutralPFO : neutralPFOContainer )
diff --git a/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.h b/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.h
index 099280916c116d9ad79094874529653dc035e950..9bfe5c51c5b7f6aec079a542688c67d3b4c1b52b 100644
--- a/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.h
+++ b/Reconstruction/tauRecTools/src/TauPi0ClusterScaler.h
@@ -30,7 +30,7 @@ public:
 
     virtual StatusCode initialize() override;
     virtual StatusCode finalize() override;
-    virtual StatusCode executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer, xAOD::PFOContainer& pChargedPFOContainer) override; 
+    virtual StatusCode executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer, xAOD::PFOContainer& pChargedPFOContainer) const override; 
 
 private:
 
@@ -38,22 +38,22 @@ private:
     //ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtensionTool;
 
     /** @brief reset neutral PFO kinematics (for AOD running) */
-    void resetNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer);
+    void resetNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer) const;
 
     /** @brief create charged PFOs */
-    void createChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pChargedPFOContainer);
+    void createChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pChargedPFOContainer) const;
 
     /** @brief extrapolate charged PFO tracks to EM and HAD layers */
     //void extrapolateChargedPFOs(xAOD::TauJet& pTau);
     
     /** @brief associate hadronic PFOs to charged PFOs */
-    void associateHadronicToChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pChargedPFOContainer);
+    void associateHadronicToChargedPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pChargedPFOContainer) const;
     
     /** @brief associate charged PFOs to neutral PFOs */
-    void associateChargedToNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer);
+    void associateChargedToNeutralPFOs(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer) const;
     
     /** @brief associate charged PFOs to neutral PFOs */
-    void subtractChargedEnergyFromNeutralPFOs(xAOD::PFOContainer& pNeutralPFOContainer);
+    void subtractChargedEnergyFromNeutralPFOs(xAOD::PFOContainer& pNeutralPFOContainer) const;
 
     /** @brief sets of EM/Had samplings for track extrapolation */
     //std::set<CaloSampling::CaloSample> m_EMSamplings;
diff --git a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
index 59a608693bda8c8c9f099de1a62f1d423824a6bf..6e27aea64d2971219b87f9856066902ed24664b3 100644
--- a/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/ITauToolBase.h
@@ -60,8 +60,8 @@ class ITauToolBase : virtual public asg::IAsgTool
 					      xAOD::CaloClusterContainer& caloClusterContainer, 
 					      const xAOD::CaloClusterContainer& pCaloClusterContainer ) const = 0;
   virtual StatusCode executeVertexVariables(xAOD::TauJet& pTau, xAOD::VertexContainer& vertexContainer ) const = 0;  
-  virtual StatusCode executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer, xAOD::PFOContainer& chargedPFOContainer ) = 0;  
-  virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) = 0;
+  virtual StatusCode executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer, xAOD::PFOContainer& chargedPFOContainer ) const = 0;  
+  virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) const = 0;
   virtual StatusCode executePanTau(xAOD::TauJet& pTau, xAOD::ParticleContainer& particleContainer) =0;
 
 #ifdef XAOD_ANALYSIS
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauPi0ScoreCalculator.h b/Reconstruction/tauRecTools/tauRecTools/TauPi0ScoreCalculator.h
index 8c01d0aac55090cef1c568c89a9a4174c37f2be4..fe9732e26f1eae2452517108855b0d00691e26e3 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauPi0ScoreCalculator.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauPi0ScoreCalculator.h
@@ -28,11 +28,11 @@ public:
 
     virtual StatusCode initialize() override;
     virtual StatusCode finalize() override;
-    virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer) override;
+    virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer) const override;
 
 private:
     /** @brief function used to calculate BDT score */
-    float calculateScore(const xAOD::PFO* neutralPFO);
+    float calculateScore(const xAOD::PFO* neutralPFO) const;
 
     std::string m_weightfile;    
     std::unique_ptr<tauRecTools::BDTHelper> m_mvaBDT;
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauPi0Selector.h b/Reconstruction/tauRecTools/tauRecTools/TauPi0Selector.h
index 0e9c5f724768c5f8d6bb9c828078ba37ef2a220a..954b67647253af6843c8c7fcec4235ea17903ac0 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauPi0Selector.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauPi0Selector.h
@@ -23,7 +23,7 @@ public:
     virtual ~TauPi0Selector();
     virtual StatusCode initialize() override;
     virtual StatusCode finalize() override;
-    virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer) override;
+    virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& pNeutralPFOContainer) const override;
 
 private:
 
@@ -31,9 +31,9 @@ private:
     std::vector<float> m_clusterBDTCut_1prong;
     std::vector<float> m_clusterBDTCut_mprong;
     /** @brief function used to get eta bin of Pi0Cluster */
-    int getPi0Cluster_etaBin(double Pi0Cluster_eta);
+    int getPi0Cluster_etaBin(double Pi0Cluster_eta) const;
     /** @brief function used to calculate the visible tau 4 momentum */
-    TLorentzVector getP4(const xAOD::TauJet& tauJet);
+    TLorentzVector getP4(const xAOD::TauJet& tauJet) const;
 };
 
 #endif	/* TAUPI0SELECTOR_H */
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h b/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
index bcff833427f229f54a76acbd14863983d4c2836c..171f0e91f5f22e990093f44b3786d67d59d39bdd 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauRecToolBase.h
@@ -57,8 +57,8 @@ class TauRecToolBase : public asg::AsgTool, virtual public ITauToolBase {
 					      xAOD::CaloClusterContainer& caloClusterContainer, 
 					      const xAOD::CaloClusterContainer& pCaloClusterContainer ) const override;
   virtual StatusCode executeVertexVariables(xAOD::TauJet& pTau, xAOD::VertexContainer& vertexContainer ) const override;  
-  virtual StatusCode executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer, xAOD::PFOContainer& chargedPFOContainer ) override;  
-  virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) override;
+  virtual StatusCode executePi0ClusterScaler(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer, xAOD::PFOContainer& chargedPFOContainer ) const override;  
+  virtual StatusCode executePi0nPFO(xAOD::TauJet& pTau, xAOD::PFOContainer& neutralPFOContainer) const override;
   virtual StatusCode executePanTau(xAOD::TauJet& pTau, xAOD::ParticleContainer& particleContainer) override;
 
   //-----------------------------------------------------------------
diff --git a/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h b/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
index 706903123046d7ebd21fab42fe15c5d07b16a6e2..64997de2ada77e884c78105d4677cf5e5dd9075f 100644
--- a/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
+++ b/Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
@@ -11,6 +11,9 @@
 #include "xAODEventInfo/EventInfo.h"
 #include "AsgDataHandles/ReadHandleKey.h"
 
+#include <utility>
+#include <memory>
+#include <vector>
 #include <map>
 
 class TH2;
@@ -18,64 +21,93 @@ class TH2;
 /**
  * @brief Implementation of tool to decorate flattened BDT score and working points
  * 
- *  Input comes from 2 ROOT files with lists of TH2s containing BDTScore distributions
- *  as a function of the dependent variables
+ *  Input comes from ROOT files with lists of TH2s containing BDT/RNN score distributions
+ *  as a function of the dependent variables. For eVeto, the score distributions depend on
+ *  tau pT and |eta| of the leading track. Otherwise, the score distributions depend on
+ *  tau pT and pileup.
  *
  * @author P.O. DeViveiros
  * @author W. Davey
  * @author L. Hauswald
- *                                                                              
  */
 
 class TauWPDecorator : public TauRecToolBase {
-public:
-
-    TauWPDecorator(const std::string& name="TauWPDecorator") ;
+  public:
+    
     ASG_TOOL_CLASS2(TauWPDecorator, TauRecToolBase, ITauToolBase)
+    
+    /** @brief Constructor */
+    TauWPDecorator(const std::string& name="TauWPDecorator");
+    
+    /** @brief Destructor */
     ~TauWPDecorator();
 
+    /** @brief Initialization of this tool */
     virtual StatusCode initialize() override;
-    virtual StatusCode finalize() override;
-    virtual StatusCode execute(xAOD::TauJet& pTau) const override;
 
-    virtual StatusCode retrieveHistos(int nProng);
-    virtual StatusCode storeLimits(int nProng);
-    virtual double transformScore(double score, double cut_lo, double eff_lo, double cut_hi, double eff_hi) const;
-
-private:
-    std::string m_file0P;
-    std::string m_file1P;
-    std::string m_file3P;
+    /** @brief Executation of this tool */
+    virtual StatusCode execute(xAOD::TauJet& pTau) const override;
     
-    typedef std::pair<double, std::unique_ptr<TH2> > m_pair_t;
+    /** @brief Finalization of this tool */
+    virtual StatusCode finalize() override;
 
-    std::unique_ptr<std::vector<m_pair_t>> m_hists0P; //!
-    std::unique_ptr<std::vector<m_pair_t>> m_hists1P; //!
-    std::unique_ptr<std::vector<m_pair_t>> m_hists3P; //!
+  private:
+
+    /** 
+     * @brief Retrieve the histograms containing BDT/RNN score distributions as a function of dependent variables 
+     * @param nProng Prong of the tau candidate
+     */
+    StatusCode retrieveHistos(int nProng);
+
+    /**
+     * @brief Obtain the limit of the dependent variables 
+     * @param nProng Prong of the tau candidate
+     */ 
+    StatusCode storeLimits(int nProng);
+
+    /**
+     * @brief Obtain the flattened score
+     * @param score Original BDT/RNN score
+     * @param cutLow Lower score cut
+     * @param effLow Efficiency of the lower cut
+     * @param cutHigh Higher score cut
+     * @param effHigh Efficiency of the higher cut
+     */ 
+    double transformScore(double score, double cutLow, double effLow, double cutHigh, double effHigh) const;
+
+    bool m_electronMode; //!< Whether we are flatterning electron veto WP
+    bool m_defineWPs; //!< Whether to decorate the WPs
     
-    // Limits, probably not needed
-    std::map<int, double> m_xmin;
-    std::map<int, double> m_ymin;
-    std::map<int, double> m_xmax;
-    std::map<int, double> m_ymax;
+    std::string m_scoreName; //!< Name of the original score
+    std::string m_scoreNameTrans; //!< Name of the transformed score
+
+    std::string m_file0p; //!< Calibration file name of 0-prong taus
+    std::string m_file1p; //!< Calibration file name of 1-prong taus
+    std::string m_file3p; //!< Calibration file name of 3-prong taus
+
+    std::vector<int> m_EDMWPs; //!< Vector of WPs in the EDM
+    std::vector<float> m_EDMWPEffs0p; //!< Efficiency of each WP in EDP for 0-prong taus
+    std::vector<float> m_EDMWPEffs1p; //!< Efficiency of each WP in EDP for 1-prong taus
+    std::vector<float> m_EDMWPEffs3p; //!< Efficiency of each WP in EDP for 3-prong taus
+
+    std::vector<std::string> m_decorWPs; //!< Vector of WPs not in the EDM (to be decorated)
+    std::vector<SG::AuxElement::Decorator<char>> m_charDecors; //!
+    std::vector<float> m_decorWPEffs0p; //!< Efficiency of each WP to be docorated for 0-prong taus
+    std::vector<float> m_decorWPEffs1p; //!< Efficiency of each WP to be docorated for 1-prong taus
+    std::vector<float> m_decorWPEffs3p; //!< Efficiency of each WP to be docorated for 3-prong taus
     
-    bool m_defineWP;
-    bool m_electronMode;
-
-    std::vector<int> m_cut_bits;
-    std::vector<float> m_cut_effs_0p;
-    std::vector<float> m_cut_effs_1p;
-    std::vector<float> m_cut_effs_3p;
-
-    std::vector<std::string> m_decoration_names;
-    std::vector<float> m_cut_effs_decoration_0p;
-    std::vector<float> m_cut_effs_decoration_1p;
-    std::vector<float> m_cut_effs_decoration_3p;
-
-    std::string m_scoreName;
-    std::string m_newScoreName;
-
     SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"Key_eventInfo", "EventInfo", "EventInfo key"};
+    
+    typedef std::pair<double, std::shared_ptr<TH2> > m_pair_t;
+
+    std::shared_ptr<std::vector<m_pair_t>> m_hists0p; //!< Efficiency and corresponding score distributions of 0-prong taus
+    std::shared_ptr<std::vector<m_pair_t>> m_hists1p; //!< Efficiency and corresponding score distributions of 1-prong taus
+    std::shared_ptr<std::vector<m_pair_t>> m_hists3p; //!< Efficiency and corresponding score distributions of 3-prong taus
+    
+    std::map<int, double> m_xMin; //!< Map of n-prong and the minimum value of x variables
+    std::map<int, double> m_yMin; //!< Map of n-prong and the minimum value of y variables
+    std::map<int, double> m_xMax; //!< Map of n-prong and the maximum value of x variables
+    std::map<int, double> m_yMax; //!< Map of n-prong and the maximum value of y variables
 };
 
 #endif
diff --git a/Simulation/Digitization/python/RunDependentMCTaskIterator.py b/Simulation/Digitization/python/RunDependentMCTaskIterator.py
index acebe1185570dcc837e0a38bcb011b32cfd60f93..1b120b71a871217b5e01831928d6312f0c26698b 100644
--- a/Simulation/Digitization/python/RunDependentMCTaskIterator.py
+++ b/Simulation/Digitization/python/RunDependentMCTaskIterator.py
@@ -82,7 +82,7 @@ def getFragment(jobnumber,task,maxEvents):
     try: tIter = findPlaceInTask(jobnumber,task,maxEvents)
     except StopIteration:
         raise IndexError('There are only %i jobs in this task (not %i).' % (len([1 for i in taskIterator(task,maxEvents)]) + 1,jobnumber + 1))
-    try: tIter.next()
+    try: tIter.__next__()
     except StopIteration:
         pass
     return tIter.donejob
@@ -128,7 +128,7 @@ class taskIterator(object):
     def __repr__(self):
         return "offset=%i; row=%i,%i" % (self.offset,self.current.get('run',0),self.current.get('lb',0))
 
-    def next(self):
+    def __next__(self):
         self.donejob = []
         if (self.current is None):  self.current = next(self.taskit)
         to_do = self.step
diff --git a/Simulation/FastShower/FastCaloSim/share/FastShower_CaloCellMaker_jobOptions.py b/Simulation/FastShower/FastCaloSim/share/FastShower_CaloCellMaker_jobOptions.py
index eb5ab6ac7fd039f08b182a20bc9e87caad15bbc0..4f075bb0fa744524db98bef27e9774b79fd95ed3 100755
--- a/Simulation/FastShower/FastCaloSim/share/FastShower_CaloCellMaker_jobOptions.py
+++ b/Simulation/FastShower/FastCaloSim/share/FastShower_CaloCellMaker_jobOptions.py
@@ -50,6 +50,6 @@ CaloCellMakerFS.CaloCellMakerToolNames += ["CaloCellContainerCheckerTool"]
 
 # if necessary finalize and check the compactified/decompactified tool
 if CaloCellMakerFlags.doCompactCellInAddition or CaloCellMakerFlags.doCompactCellInstead:
-    theApp.DLLs+= ["CaloTools"]
+    theApp.Dlls+= ["CaloTools"]
     CaloCellMakerFS.CaloCompactCellMakerToolNames += ["CaloCellContainerFinalizerTool"]
     CaloCellMakerFS.CaloCompactCellMakerToolNames += ["CaloCellContainerCheckerTool"] 
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
index 6fc596429b007d0f643ea2b1c721181a4eb13ea5..a67569805dabd67ccaf346cb9fb8204be3371c74 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
@@ -311,8 +311,8 @@ StatusCode G4AtlasAlg::execute()
 
   // Set the RNG to use for this event. We need to reset it for MT jobs
   // because of the mismatch between Gaudi slot-local and G4 thread-local RNG.
-  ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this);
-  rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() );
+  ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName);
+  rngWrapper->setSeed( m_randomStreamName, Gaudi::Hive::currentContext() );
   G4Random::setTheEngine(*rngWrapper);
 
   ATH_MSG_DEBUG("Calling SimulateG4Event");
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h
index d69a20e2b39db99b96bbc4ec1487d78d9628758f..d457b07c8b95614bcd35108c16025f0b04f3faaa 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h
@@ -122,6 +122,8 @@ private:
   Gaudi::Property<bool> m_activateParallelGeometries{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"};
   /// Random number service
   ServiceHandle<IAthRNGSvc> m_rndmGenSvc{this, "AtRndmGenSvc", "AthRNGSvc", ""}; // TODO rename property
+  /// Random Stream Name
+  Gaudi::Property<std::string> m_randomStreamName{this, "RandomStreamName", "Geant4", ""};
   ///
   ServiceHandle<IUserLimitsSvc> m_userLimitsSvc{this, "UserLimitsSvc", "UserLimitsSvc", ""};
   /// User Action Service
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py
index 51d3efbd297b60bc56119c115a2dcab55b54a7fc..e807a507c54dec12c50b788ed6bed0d62acd665d 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py
@@ -95,5 +95,15 @@ def createSimConfigFlags():
     scf.addFlag("Sim.FastChain.PUWeights_lar_hec", [1.0]) # LAr HEC
     scf.addFlag("Sim.FastChain.PUWeights_lar_bapre", [1.0]) # LAr Barrel presampler
     scf.addFlag("Sim.FastChain.PUWeights_tile", [1.0]) # Tile
+    
+    # Fatras
+    scf.addFlag("Sim.Fatras.RandomStreamName", "FatrasRnd")
+    scf.addFlag("Sim.Fatras.G4RandomStreamName", "FatrasG4")
+    scf.addFlag("Sim.Fatras.TrkExRandomStreamName", "TrkExRnd")
+    # Fatras fine tuning
+    scf.addFlag("Sim.Fatras.MomCutOffSec", 50.) # common momentum cut-off for secondaries
+    scf.addFlag("Sim.Fatras.HadronIntProb", 1.) # hadronic interaction scale factor
+    scf.addFlag("Sim.Fatras.GaussianMixtureModel", True) # use Gaussian mixture model for Multiple Scattering
+    scf.addFlag("Sim.Fatras.BetheHeitlerScale", 1.) # scale to Bethe-Heitler contribution
 
     return scf
diff --git a/Simulation/G4Atlas/G4AtlasServices/CMakeLists.txt b/Simulation/G4Atlas/G4AtlasServices/CMakeLists.txt
index 2d735a12d06a67ac253d5e95567b77b5be823ce9..83078840efae523467702f9a4d99d013788525fa 100644
--- a/Simulation/G4Atlas/G4AtlasServices/CMakeLists.txt
+++ b/Simulation/G4Atlas/G4AtlasServices/CMakeLists.txt
@@ -10,13 +10,15 @@ find_package( CLHEP )
 find_package( Geant4 )
 find_package( TBB )
 find_package( XercesC )
-
+find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 # Component(s) in the package:
 atlas_add_component( G4AtlasServices
                      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 G4AtlasInterfaces G4AtlasToolsLib G4PhysicsLists MagFieldInterfaces)
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS}  ${ROOT_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} ${ROOT_LIBRARIES}
+		     GaudiKernel AthenaBaseComps 
+		     G4AtlasInterfaces G4AtlasToolsLib G4PhysicsLists PathResolver MagFieldElements MagFieldInterfaces)
 
 #test G4AtlasFieldServices
 atlas_add_test( G4AtlasFieldServices_test
diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasFieldServices.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasFieldServices.py
index 8dcbf5aba462fd46d61cb5531dc723161e234454..b091f349ad9d3d201226ee953ea71b31c11944c1 100644
--- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasFieldServices.py
+++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasFieldServices.py
@@ -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
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 StandardFieldSvc=CompFactory.StandardFieldSvc
 
-from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
 #to prevent unit tests failing when just running over simulation
 import os
 if "AthSimulation_DIR" not in os.environ:
@@ -12,176 +11,184 @@ if "AthSimulation_DIR" not in os.environ:
 def StandardFieldSvcCfg(ConfigFlags,name="StandardField", **kwargs):
     result = ComponentAccumulator()
 
-    #setup the field and add the magneticfield service
-    acc = MagneticFieldSvcCfg(ConfigFlags)
-    result.merge(acc)
-
-    kwargs.setdefault("MagneticFieldSvc", result.getService("AtlasFieldSvc")) # TODO This should probably be based on simFlags.MagneticField?
-    #kwargs.setdefault("FieldOn", True)
-
     result.addService(StandardFieldSvc(name, **kwargs))
     return result
 
 def ForwardFieldSvcCfg(ConfigFlags, name="ForwardField", **kwargs):
     result = ComponentAccumulator()
 
-    #setup the field and add the magneticfield service
-    acc = MagneticFieldSvcCfg(ConfigFlags)
-    result.merge(acc)
-
-    #FIXME Once it exists this version should use the new MagField Service defined in ForwardRegionMgField
-    kwargs.setdefault("MagneticFieldSvc", result.getService("AtlasFieldSvc"))
-    #kwargs.setdefault("FieldOn", True)
-
+    # #FIXME Once it exists this version should use the new MagField Service defined in ForwardRegionMgField
+    # kwargs.setdefault("MagneticFieldSvc", result.getService("AtlasFieldSvc"))
+    # #kwargs.setdefault("FieldOn", True)
+    kwargs.setdefault("UseMagFieldSvc", True)
     result.addService(StandardFieldSvc(name, **kwargs))
     return result
 
 def Q1FwdG4FieldSvcCfg(ConfigFlags, name='Q1FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
 
-    result.addService( MagField__ForwardRegionFieldSvc("Q1", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q1",
                                                         Magnet = 0, # FIXME find a better way to do this.
                                                         MQXA_DataFile = "MQXA_NOMINAL.dat"))
 
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q1"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
+
 def Q2FwdG4FieldSvcCfg(ConfigFlags, name='Q2FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
 
-    result.addService( MagField__ForwardRegionFieldSvc("Q2", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q2",
                                                         Magnet = 1, # FIXME find a better way to do this.
                                                         MQXA_DataFile = "MQXA_NOMINAL.dat"))
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q2"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q3FwdG4FieldSvcCfg(ConfigFlags, name='Q3FwdG4FieldSvc', **kwargs): 
+
+def Q3FwdG4FieldSvcCfg(ConfigFlags, name='Q3FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
 
-    result.addService( MagField__ForwardRegionFieldSvc("Q3", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q3",
                                                         Magnet = 2, # FIXME find a better way to do this.
                                                         MQXA_DataFile = "MQXA_NOMINAL.dat"))
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q3"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def D1FwdG4FieldSvcCfg(ConfigFlags, name='D1FwdG4FieldSvc', **kwargs): 
+
+def D1FwdG4FieldSvcCfg(ConfigFlags, name='D1FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("D1", 
+    result.addService( MagField__ForwardRegionFieldSvc("D1",
                                                         Magnet = 3))# FIXME find a better way to do this.
-                                                        
+
     kwargs.setdefault("MagneticFieldSvc",           result.getService("D1"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def D2FwdG4FieldSvcCfg(ConfigFlags, name='D2FwdG4FieldSvc', **kwargs): 
+
+def D2FwdG4FieldSvcCfg(ConfigFlags, name='D2FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
 
-    result.addService( MagField__ForwardRegionFieldSvc("D2", 
+    result.addService( MagField__ForwardRegionFieldSvc("D2",
                                                         Magnet = 4))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("D2"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q4FwdG4FieldSvcCfg(ConfigFlags, name='Q4FwdG4FieldSvc', **kwargs): 
+
+def Q4FwdG4FieldSvcCfg(ConfigFlags, name='Q4FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q4", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q4",
                                                         Magnet = 5))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q4"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q5FwdG4FieldSvcCfg(ConfigFlags, name='Q5FwdG4FieldSvc', **kwargs): 
+
+def Q5FwdG4FieldSvcCfg(ConfigFlags, name='Q5FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q5", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q5",
                                                         Magnet = 6))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q5"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q6FwdG4FieldSvcCfg(ConfigFlags, name='Q6FwdG4FieldSvc', **kwargs): 
+
+def Q6FwdG4FieldSvcCfg(ConfigFlags, name='Q6FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q6", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q6",
                                                         Magnet = 7))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q6"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q7FwdG4FieldSvcCfg(ConfigFlags, name='Q7FwdG4FieldSvc', **kwargs): 
+
+def Q7FwdG4FieldSvcCfg(ConfigFlags, name='Q7FwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q7", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q7",
                                                         Magnet = 8))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q7"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q1HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q1HKickFwdG4FieldSvc', **kwargs): 
+
+def Q1HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q1HKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q1HKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q1HKick",
                                                         Magnet = 9))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q1HKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
+
 def Q1VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q1VKickFwdG4FieldSvc', **kwargs): #note is lower case "v" in ForwardRegionMgFieldConfig.py
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q1VKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q1VKick",
                                                         Magnet = 10))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q1VKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q2HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q2HKickFwdG4FieldSvc', **kwargs): 
+
+def Q2HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q2HKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q2HKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q2HKick",
                                                         Magnet = 11))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q2HKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q2VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q2VKickFwdG4FieldSvc', **kwargs): 
+
+def Q2VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q2VKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q2VKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q2VKick",
                                                         Magnet = 12))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q2VKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q3HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q3HKickFwdG4FieldSvc', **kwargs): 
+
+def Q3HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q3HKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q3HKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q3HKick",
                                                         Magnet = 13))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q3HKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q3VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q3VKickFwdG4FieldSvc', **kwargs): 
+
+def Q3VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q3VKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q3VKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q3VKick",
                                                         Magnet = 14))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q3VKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q4VKickAFwdG4FieldSvcCfg(ConfigFlags, name='Q4VKickAFwdG4FieldSvc', **kwargs): 
+
+def Q4VKickAFwdG4FieldSvcCfg(ConfigFlags, name='Q4VKickAFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q4VKickA", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q4VKickA",
                                                         Magnet = 15))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q4VKickA"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q4HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q4HKickFwdG4FieldSvc', **kwargs): 
+
+def Q4HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q4HKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q4HKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q4HKick",
                                                         Magnet = 16))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q4HKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q4VKickBFwdG4FieldSvcCfg(ConfigFlags, name='Q4VKickBFwdG4FieldSvc', **kwargs): 
+
+def Q4VKickBFwdG4FieldSvcCfg(ConfigFlags, name='Q4VKickBFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q4VKickB", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q4VKickB",
                                                         Magnet = 17))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q4VKickB"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q5HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q5HKickFwdG4FieldSvc', **kwargs): 
+
+def Q5HKickFwdG4FieldSvcCfg(ConfigFlags, name='Q5HKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q5HKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q5HKick",
                                                         Magnet = 18))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q5HKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
-def Q6VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q6VKickFwdG4FieldSvc', **kwargs): 
+
+def Q6VKickFwdG4FieldSvcCfg(ConfigFlags, name='Q6VKickFwdG4FieldSvc', **kwargs):
     result = ComponentAccumulator()
-    result.addService( MagField__ForwardRegionFieldSvc("Q6VKick", 
+    result.addService( MagField__ForwardRegionFieldSvc("Q6VKick",
                                                         Magnet = 19))# FIXME find a better way to do this.
     kwargs.setdefault("MagneticFieldSvc",           result.getService("Q6VKick"))
-    result.addService(StandardFieldSvc(name, **kwargs))
+    result.merge(ForwardFieldSvcCfg(ConfigFlags, name, **kwargs))
     return result
diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py
index 70df4efe8a08039e1dfad5eeb877c8c5992d1b26..ce513202dc5f39672a22a052c17b4f4c87151f7e 100644
--- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py
+++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from __future__ import print_function
 
 from AthenaCommon import CfgMgr
@@ -161,77 +161,95 @@ def getTB_RegionCreatorList():
 
 #########################################################################
 def getStandardFieldSvc(name="StandardField", **kwargs):
-    import MagFieldServices.SetupField  # noqa: F401
-    kwargs.setdefault("MagneticFieldSvc", "AtlasFieldSvc") # TODO This should probably be based on simFlags.MagneticField?
     #kwargs.setdefault("FieldOn", True)
     return CfgMgr.StandardFieldSvc(name, **kwargs)
 
 def getForwardFieldSvc(name="ForwardField", **kwargs):
-    #FIXME Once it exists this version should use the new MagField Service defined in ForwardRegionMgField
-    kwargs.setdefault("MagneticFieldSvc", "AtlasFieldSvc")
+    kwargs.setdefault("MagneticFieldSvc", "ForwardRegionFieldSvc")
     #kwargs.setdefault("FieldOn", True)
+    # Must switch on the use of a field svc to be able to have StandardFieldSvc use ForwardRegionFieldSvc
+    kwargs.setdefault("UseMagFieldSvc", True)
     return CfgMgr.StandardFieldSvc(name, **kwargs)
 
 def getQ1FwdG4FieldSvc(name='Q1FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q1")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ2FwdG4FieldSvc(name='Q2FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q2")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ3FwdG4FieldSvc(name='Q3FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q3")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getD1FwdG4FieldSvc(name='D1FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "D1")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getD2FwdG4FieldSvc(name='D2FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "D2")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ4FwdG4FieldSvc(name='Q4FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q4")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ5FwdG4FieldSvc(name='Q5FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q5")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ6FwdG4FieldSvc(name='Q6FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q6")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ7FwdG4FieldSvc(name='Q7FwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q7")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ1HKickFwdG4FieldSvc(name='Q1HKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q1HKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ1VKickFwdG4FieldSvc(name='Q1VKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q1VKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ2HKickFwdG4FieldSvc(name='Q2HKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q2HKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ2VKickFwdG4FieldSvc(name='Q2VKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q2VKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ3HKickFwdG4FieldSvc(name='Q3HKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q3HKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ3VKickFwdG4FieldSvc(name='Q3VKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q3VKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ4VKickAFwdG4FieldSvc(name='Q4VKickAFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q4VKickA")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ4HKickFwdG4FieldSvc(name='Q4HKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q4HKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ4VKickBFwdG4FieldSvc(name='Q4VKickBFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q4VKickB")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ5HKickFwdG4FieldSvc(name='Q5HKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q5HKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
+
 def getQ6VKickFwdG4FieldSvc(name='Q6VKickFwdG4FieldSvc', **kwargs):
     kwargs.setdefault("MagneticFieldSvc",           "Q6VKick")
-    return CfgMgr.StandardFieldSvc(name, **kwargs)
+    return getForwardFieldSvc(name, **kwargs)
 
 def getATLAS_FieldMgrList():
     fieldMgrList = []
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.cxx b/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.cxx
index 2d237afd057fe2fc8f84edeb96640b50a8b32ccc..a4f533e3410e85e4a1fd7279c7d5ae434bcf48ea 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.cxx
@@ -1,24 +1,30 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "StandardFieldSvc.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+#include "StoreGate/ReadCondHandle.h"
+
+// Field map
+#include "MagFieldElements/AtlasFieldMap.h"
+
+// PathResolver
+#include "PathResolver/PathResolver.h"
+
+// ROOT
+#include "TFile.h"
+#include "TTree.h"
 
-//-----------------------------------------------------------------------------
-// Constructor for the AtlasField G4 field object
-//-----------------------------------------------------------------------------
-AtlasField::AtlasField(MagField::IMagFieldSvc* m)
-  : m_magFieldSvc(m)
-{}
 
 //-----------------------------------------------------------------------------
 // Constructor for the StandardFieldSvc
 //-----------------------------------------------------------------------------
 StandardFieldSvc::StandardFieldSvc(const std::string& name,
                                    ISvcLocator* pSvcLocator)
-  : G4MagFieldSvcBase(name, pSvcLocator)
-{
-}
+    : G4MagFieldSvcBase(name, pSvcLocator)
+{}
+
 
 //-----------------------------------------------------------------------------
 // Initialize the service
@@ -26,7 +32,18 @@ StandardFieldSvc::StandardFieldSvc(const std::string& name,
 StatusCode StandardFieldSvc::initialize()
 {
   ATH_MSG_INFO( "Initializing " << name() );
-  ATH_CHECK( m_magFieldSvc.retrieve() );
+
+  // Either initialize the field map - used for solenoid and toroid, or the field service for the forward field
+  if (m_useMagFieldSvc) {
+      ATH_CHECK( m_magFieldSvc.retrieve() );
+      ATH_MSG_INFO( "initialize: using field service  " << m_magFieldSvc.name() );
+  }
+  else {
+      // Create field map
+      ATH_CHECK( createFieldMap() );
+      ATH_MSG_INFO( "initialize: using created map for field cache  ");
+  }
+
   return StatusCode::SUCCESS;
 }
 
@@ -36,5 +53,91 @@ StatusCode StandardFieldSvc::initialize()
 G4MagneticField* StandardFieldSvc::makeField()
 {
   ATH_MSG_INFO( "StandardFieldSvc::makeField" );
-  return new AtlasField( &*m_magFieldSvc );
+
+  AtlasField* af{nullptr};
+  
+  // Either initialize the field map - used for solenoid and toroid, or the field service for the forward field
+  if (m_useMagFieldSvc) {
+      af = new AtlasField( &*m_magFieldSvc );
+  }
+  else {
+      af = new AtlasField(m_fieldMap.get());
+  }
+  
+  return (af);
+}
+
+
+//-----------------------------------------------------------------------------
+// Create field map
+//-----------------------------------------------------------------------------
+StatusCode StandardFieldSvc::createFieldMap()
+{
+  ATH_MSG_INFO( "StandardFieldSvc::createFieldMap" );
+
+
+    // Select map file according to the value of the currents which indicate which map is 'on'
+
+    // determine the map to load
+    std::string mapFile;
+    if ( solenoidOn() && toroidOn() ) mapFile = m_fullMapFilename;
+    else if ( solenoidOn() )          mapFile = m_soleMapFilename;
+    else if ( toroidOn() )            mapFile = m_toroMapFilename;
+    else {
+        // all magnets OFF. no need to read map
+        return StatusCode::SUCCESS;
+    }
+        
+    ATH_MSG_INFO ( "StandardFieldSvc::createFieldMap: Set map currents from FieldSvc: solenoid/toroid " 
+                   << m_mapSoleCurrent << "," << m_mapToroCurrent);
+    ATH_MSG_INFO ( "StandardFieldSvc::createFieldMap: Use map file " << mapFile);
+
+        
+    // find the path to the map file
+    std::string resolvedMapFile = PathResolver::find_file( mapFile.c_str(), "DATAPATH" );
+    if ( resolvedMapFile.empty() ) {
+        ATH_MSG_ERROR( "StandardFieldSvc::createFieldMap: Field map file " << mapFile << " not found" );
+        return StatusCode::FAILURE;
+    }
+    // Do checks and extract root file to initialize the map
+    if ( resolvedMapFile.find(".root") == std::string::npos ) {
+        ATH_MSG_ERROR("StandardFieldSvc::createFieldMap: input file name '" << resolvedMapFile << "' does not end with .root");
+        return StatusCode::FAILURE;
+    } 
+
+    std::unique_ptr<TFile> rootfile = std::make_unique<TFile>(resolvedMapFile.c_str(), "OLD");
+    if ( ! rootfile.get() ) {
+        ATH_MSG_ERROR("StandardFieldSvc::createFieldMap: failed to open " << resolvedMapFile);
+        return StatusCode::FAILURE;
+    }
+    if ( !rootfile->cd() ) {
+        // could not make it current directory
+        ATH_MSG_ERROR("StandardFieldSvc::createFieldMap: unable to cd() into the ROOT field map TFile");
+        rootfile->Close();
+        return StatusCode::FAILURE; 
+    }
+    // open the tree
+    TTree* tree = (TTree*)rootfile->Get("BFieldMap");
+    if ( tree == nullptr ) {
+        // no tree
+        ATH_MSG_ERROR("StandardFieldSvc::createFieldMap: TTree 'BFieldMap' does not exist in ROOT field map");
+        rootfile->Close();
+        return StatusCode::FAILURE;
+    }
+
+    // create map
+    m_fieldMap = std::make_unique<MagField::AtlasFieldMap>();
+
+    // initialize map
+    if (!m_fieldMap->initializeMap( rootfile.get(), m_mapSoleCurrent, m_mapToroCurrent )) {
+        // failed to initialize the map
+        ATH_MSG_ERROR("StandardFieldSvc::createFieldMap: unable to initialize the map for AtlasFieldMap for file " << resolvedMapFile);
+        rootfile->Close();
+        return StatusCode::FAILURE;
+    }
+    
+    rootfile->Close();
+
+    ATH_MSG_INFO( "StandardFieldSvc::createFieldMap: Initialized the field map from " << resolvedMapFile );
+  return StatusCode::SUCCESS;
 }
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.h b/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.h
index 03a08adf7233da5180e21af9af5e4837f57a813d..871f5af51d015094711d1ae668b45b71d4c3ee09 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/StandardFieldSvc.h
@@ -18,38 +18,122 @@
 // Base classes
 #include "G4MagFieldSvcBase.h"
 
+// MagField cache
+#include "MagFieldElements/AtlasFieldCache.h"
+
+// forward declarations
+namespace MagField {
+    class AtlasFieldMap;
+}
+
+/**
+ * The ATLASFieldCacheTLSWrapper
+ * is needed due to the current threading model in simulation.
+ *
+ * In general clients need a MagField::AtlasFieldCache
+ * returning the magnetic field values
+ * for a specific position.
+ *
+ * The MagField::AtlasFieldCache refer to a specific "cell" and might
+ * need to be filled or updated when the position changes.
+ * In the other hand subsequent calls more often
+ * than not re-use the info from the same "cell".
+ * One can look at MagFieldElements for more details.
+ *
+ * Ideally objects would be passed by/be local to the caller.
+ * Actually this is what happens in offline/online
+ * where we moved completely to Condition Objects.
+ * i.e AtlasFieldCacheCondObj.
+ *
+ * But this is not yet possible in simulation.
+ * So we need to wrap things in a way that mimics
+ * the relevant TLS behaviour of the to be removed ATLAS Svc.
+ *
+ * The end result is that for now the ATLASFieldCacheTLSWrapper 
+ * is to be used instead of AtlasFieldCacheCondObj in simulation.
+ *
+ * It has similar payload.
+ * The major difference is that when we use the
+ * condition Object each user of the magnetic field
+ * ends up with its own local MagField::AtlasFieldCache so there is
+ * no need for synchronisation.
+ *
+ * In the other hand here we provide thread-specific
+ * MagField::AtlasFieldCache (s) to allow for the TLS
+ * scheme needed by the simulation.
+ *
+ */
+struct ATLASFieldCacheTLSWrapper
+{
+private:
+  MagField::AtlasFieldCache createCache() const
+  {
+    return MagField::AtlasFieldCache(solFieldScale, torFieldScale, fieldMap);
+  }
+
+public:
+  ///Sclae for solenoid
+  double solFieldScale{ 1 };
+  ///Scale for toroid 
+  double torFieldScale{ 1 };
+  ///Not owning ptr 
+  const MagField::AtlasFieldMap* fieldMap{ nullptr };
+
+  /// Method setting up the TLS 
+  /// and returning ref to 
+  /// the TLS MagField::AtlasFieldCache
+  MagField::AtlasFieldCache& getTLSCache() const
+  {
+    static thread_local MagField::AtlasFieldCache fieldCache = createCache();
+    return fieldCache;
+  }
+
+  /// getField method, forwarding to the TLS object
+  void getField(const double* point, double* field) const
+  {
+    MagField::AtlasFieldCache& fieldCache = getTLSCache();
+    fieldCache.getField(point, field);
+  }
+};
 
 /// @class AtlasField
-/// @brief G4 wrapper around the main ATLAS magnetic field service.
-///
-/// @todo TODO this should probably be put in a good namespace.
-///
+/// @brief G4 wrapper around the main ATLAS magnetic field cache or field svc for forward field.
 class AtlasField : public G4MagneticField
 {
   public:
-
+    /// Construct the field object from conditions object
+    AtlasField(const MagField::AtlasFieldMap* fieldMap) {
+            m_fieldCache.fieldMap = fieldMap;
+    }
     /// Construct the field object from the IMagFieldSvc
-    AtlasField(MagField::IMagFieldSvc* m);
+    AtlasField(MagField::IMagFieldSvc* m) :
+        m_magFieldSvc(m)
+        {}
+            
+
+    MagField::AtlasFieldCache& fieldCache() { return m_fieldCache.getTLSCache(); }
 
     /// Implementation of G4 method to retrieve field value
     void GetFieldValue(const double *point, double *field) const
     {
-      m_magFieldSvc->getField(point, field);
+        if (m_magFieldSvc) m_magFieldSvc->getField(point, field);
+        else               m_fieldCache.getField(point, field);
     }
 
   private:
+    /// Field cache TLS Wrapper
+    ATLASFieldCacheTLSWrapper   m_fieldCache{};
 
     /// Pointer to the magnetic field service.
     /// We use a raw pointer here to avoid ServiceHandle overhead.
-    MagField::IMagFieldSvc* m_magFieldSvc{};
+    MagField::IMagFieldSvc* m_magFieldSvc{nullptr};
+    
 };
 
 
 /// @class StandardFieldSvc
 /// @brief Athena service for constructing the AtlasField object
 ///
-/// @todo TODO this should probably be put in a good namespace.
-///
 class StandardFieldSvc final : public G4MagFieldSvcBase
 {
   public:
@@ -63,15 +147,51 @@ class StandardFieldSvc final : public G4MagFieldSvcBase
     StatusCode initialize() override final;
 
   protected:
-
     /// Create/retrieve the AtlasField object
     G4MagneticField* makeField() override final;
 
   private:
 
-    /// Handle to the ATLAS magnetic field service
-    ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc{this, "MagneticFieldSvc", "MagField::AtlasFieldSvc/AtlasFieldSvc"};
-
+    // There are two options for the magnetic field:
+    //
+    // 1) For solenoid and toroid, this has moved to use AtlasFieldCache and here we must create and
+    //    same the field map
+    // 2) For the forward quadrupole fields, we preserve the access to the magnetic field service
+    //
+    // The boolean flag UseMagFieldSvc is now used to differentiate between the two cases (default is false)
+    //
+
+    // flag to use magnet field service
+    Gaudi::Property<bool> m_useMagFieldSvc {this, 
+            "UseMagFieldSvc", false, "Use magnetic field service - Should ONLY be used for ForwardRegionFieldSvc"};
+    
+    /// Handle to the the Forward ATLAS magnetic field service
+    ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc {this, "MagneticFieldSvc", ""};
+
+    StatusCode createFieldMap();
+
+    // properties taken from AtlasFieldMapCondAlg
+    bool solenoidOn() { return (m_mapSoleCurrent > 0.0); }
+    bool toroidOn()   { return (m_mapToroCurrent > 0.0); }
+
+    /// map file names
+    Gaudi::Property<std::string> m_fullMapFilename {this,
+            "FullMapFile", "MagneticFieldMaps/bfieldmap_7730_20400_14m.root",
+            "File storing the full magnetic field map"};
+    Gaudi::Property<std::string> m_soleMapFilename {this,
+                                                    "SoleMapFile", "MagneticFieldMaps/bfieldmap_7730_0_14m.root",
+                                                    "File storing the solenoid-only magnetic field map"};
+    Gaudi::Property<std::string> m_toroMapFilename {this,
+                                                    "ToroMapFile", "MagneticFieldMaps/bfieldmap_0_20400_14m.root",
+                                                    "File storing the toroid-only magnetic field map"};
+    /// nominal current for the maps
+    Gaudi::Property<double>      m_mapSoleCurrent  {this,
+                                                    "MapSoleCurrent", 7730., "Nominal solenoid current (A)"};
+    Gaudi::Property<double>      m_mapToroCurrent  {this,
+                                                    "MapToroCurrent", 20400., "Nominal toroid current (A)"};
+
+    // field map held locally in svc - in Athena, this would go into a conditions object
+    std::unique_ptr<MagField::AtlasFieldMap> m_fieldMap;
 };
 
 #endif // G4ATLASSERVICES_StandardFieldSvc_H
diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py
index f8710d2776160e60948df769396bde7cd087823d..e8fbc88377ece06dc79bacbbce461b84a2aaff3f 100644
--- a/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py
+++ b/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
 
@@ -78,7 +78,6 @@ def getBasicFwdFieldMangerTool(name='FwdFieldManagerTool', **kwargs):
     kwargs.setdefault('DeltaOneStep',       1e-8)
     kwargs.setdefault('MaximumEpsilonStep', 1e-8)
     kwargs.setdefault('MinimumEpsilonStep', 1e-9)
-    kwargs.setdefault("FieldSvc",           "ForwardField")
     from G4AtlasApps.SimFlags import simFlags
     if simFlags.FwdStepLimitation.statusOn:
         kwargs.setdefault("MaximumStep", simFlags.FwdStepLimitation())
diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfigNew.py b/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfigNew.py
index 6c6527733357bce10bf28a083095b2a5830be0ac..72a9ef731d0a255395da2a6232d3a5b58eff1de5 100644
--- a/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfigNew.py
+++ b/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfigNew.py
@@ -1,9 +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
 
 # ComponentAccumulator based configuration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 GlobalFieldManagerTool, DetectorFieldManagerTool=CompFactory.getComps("GlobalFieldManagerTool","DetectorFieldManagerTool",)
-from G4AtlasServices.G4AtlasFieldServices import StandardFieldSvcCfg, ForwardFieldSvcCfg, Q1FwdG4FieldSvcCfg, Q2FwdG4FieldSvcCfg, Q3FwdG4FieldSvcCfg, D1FwdG4FieldSvcCfg, D2FwdG4FieldSvcCfg, Q4FwdG4FieldSvcCfg, Q5FwdG4FieldSvcCfg, Q6FwdG4FieldSvcCfg, Q7FwdG4FieldSvcCfg, Q1HKickFwdG4FieldSvcCfg, Q1VKickFwdG4FieldSvcCfg, Q2HKickFwdG4FieldSvcCfg, Q2VKickFwdG4FieldSvcCfg, Q3HKickFwdG4FieldSvcCfg, Q3VKickFwdG4FieldSvcCfg, Q4VKickAFwdG4FieldSvcCfg, Q4HKickFwdG4FieldSvcCfg, Q4VKickBFwdG4FieldSvcCfg, Q5HKickFwdG4FieldSvcCfg, Q6VKickFwdG4FieldSvcCfg
+from G4AtlasServices.G4AtlasFieldServices import StandardFieldSvcCfg, Q1FwdG4FieldSvcCfg, Q2FwdG4FieldSvcCfg, Q3FwdG4FieldSvcCfg, D1FwdG4FieldSvcCfg, D2FwdG4FieldSvcCfg, Q4FwdG4FieldSvcCfg, Q5FwdG4FieldSvcCfg, Q6FwdG4FieldSvcCfg, Q7FwdG4FieldSvcCfg, Q1HKickFwdG4FieldSvcCfg, Q1VKickFwdG4FieldSvcCfg, Q2HKickFwdG4FieldSvcCfg, Q2VKickFwdG4FieldSvcCfg, Q3HKickFwdG4FieldSvcCfg, Q3VKickFwdG4FieldSvcCfg, Q4VKickAFwdG4FieldSvcCfg, Q4HKickFwdG4FieldSvcCfg, Q4VKickBFwdG4FieldSvcCfg, Q5HKickFwdG4FieldSvcCfg, Q6VKickFwdG4FieldSvcCfg
 
 # Field Managers
 def ATLASFieldManagerToolCfg(ConfigFlags, name='ATLASFieldManager', **kwargs):
@@ -31,11 +32,12 @@ def ClassicFieldManagerToolCfg(ConfigFlags, name='ClassicFieldManager', **kwargs
     kwargs.setdefault("IntegratorStepper", "ClassicalRK4")
     return ATLASFieldManagerToolCfg(ConfigFlags, name, **kwargs)
 
-#not used in G4AtlasServicesConfigNew?
 def BasicDetectorFieldManagerToolCfg(ConfigFlags, name='BasicDetectorFieldManager', **kwargs):
-    result = StandardFieldSvcCfg(ConfigFlags)
+    result = ComponentAccumulator()
+    if 'FieldSvc' not in kwargs: # don't create the StandardFieldSvc if it is not required by this tool.
+        result.merge(StandardFieldSvcCfg(ConfigFlags))
+        kwargs.setdefault("FieldSvc", result.getService("StandardField"))
     kwargs.setdefault("IntegratorStepper", ConfigFlags.Sim.G4Stepper)
-    kwargs.setdefault("FieldSvc", result.getService("StandardField"))
     kwargs.setdefault('MuonOnlyField',     False)
     if len(ConfigFlags.Sim.G4EquationOfMotion)>0:
         kwargs.setdefault("EquationOfMotion", ConfigFlags.Sim.G4EquationOfMotion )
@@ -81,23 +83,17 @@ def MuonFieldManagerToolCfg(ConfigFlags, name='MuonFieldManager', **kwargs):
 
 #not used in G4AtlasServicesConfigNew?
 def BasicFwdFieldManagerToolCfg(ConfigFlags, name='FwdFieldManagerTool', **kwargs):
-    result = ForwardFieldSvcCfg(ConfigFlags)
     #kwargs.setdefault('DeltaChord',         0.00000002)
     kwargs.setdefault('DeltaIntersection',  1e-9)
     kwargs.setdefault('DeltaOneStep',       1e-8)
     kwargs.setdefault('MaximumEpsilonStep', 1e-8)
     kwargs.setdefault('MinimumEpsilonStep', 1e-9)
-    #kwargs.setdefault("FieldSvc", ForwardFieldSvcCfg(ConfigFlags))
-    kwargs.setdefault("FieldSvc", result.getService("ForwardField")) #accessing the right service?
     #from G4AtlasApps.SimFlags import simFlags
     #if simFlags.FwdStepLimitation.statusOn:
     #    kwargs.setdefault("MaximumStep", simFlags.FwdStepLimitation())
     if False:
         kwargs.setdefault("MaximumStep", 1000.)
-    acc = BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs)
-    tool = result.popToolsAndMerge(acc)
-    result.setPrivateTools(tool)
-    return result
+    return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs)
 
 def Q1FwdFieldManagerToolCfg(ConfigFlags, name='Q1FwdFieldManager', **kwargs):
     result = Q1FwdG4FieldSvcCfg(ConfigFlags)
diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfigNew.py b/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfigNew.py
index b985690499a3fa81502c990370cb3ef0d3709ee2..a06608032d58c8ef9e501ca75e392a37dfb4c844 100644
--- a/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfigNew.py
+++ b/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfigNew.py
@@ -11,7 +11,7 @@ from BarcodeServices.BarcodeServicesConfigNew import BarcodeSvcCfg
 def ParticleHelperCfg(flags, name="ISF_ParticleHelper", **kwargs):
     acc = BarcodeSvcCfg(flags)
     kwargs.setdefault("BarcodeSvc", acc.getPrimary())
-    acc.setPrivateTools(CompFactory.ISF.ParticleHelper(name, **kwargs))
+    acc.addPublicTool(CompFactory.ISF.ParticleHelper(name, **kwargs))
     return acc
 
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
index dae64b09f4f22ed7c79f1886401d5f466bab00f8..7a62d9fe77da0cf0d0cbc0da69a7694363ba0940 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
@@ -1,2 +1,2 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p1_test.ref b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p1_test.ref
index f32abb737021b5335aae952c8319691cb15d47af..82917f2d8370fe3e702ac9de281822d26d445141 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p1_test.ref
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p2_test.ref b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p2_test.ref
index 8220477e696c35d2ad0ced9a7f509cf8d19c4a6a..432cf47acd56cf7e3e9115b2347131fb5a48c448 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p2_test.ref
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p1_test.ref b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p1_test.ref
index 7cb10a08bc6954ea971ff657a5394ddb8a6eb29a..b8c535f5255910051314db16ee684150116ed4d7 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p1_test.ref
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p1_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p2_test.ref b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p2_test.ref
index 677d21c3b112e6d4b7851bd283f61a818e4e432f..13182b07cab14ffe0ce4078d5f6c75bf15c59117 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p2_test.ref
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/PlanarClusterContainerCnv_p2_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from /afs/cern.ch/user/s/ssnyder/atlas-work3/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/share/ISF_FatrasEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt
index cbf9e11127292880badd463b50c117ce15feb209..5f5c8c28792993b0b3cd4e26d0cd85b04c8eaea2 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt
@@ -12,5 +12,5 @@ atlas_add_component( ISF_FatrasServices
                      LINK_LIBRARIES AthenaBaseComps AtlasDetDescr GaudiKernel ISF_InterfacesLib TrkTrack ISF_Event )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/FatrasTrackingGeometrySvc.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/FatrasTrackingGeometrySvc.py
index 6a34bd8309613baf61608685fa59c80749076846..6426782625052ac08464e63c37ff0e5bd0e75dad 100755
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/FatrasTrackingGeometrySvc.py
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/FatrasTrackingGeometrySvc.py
@@ -4,7 +4,6 @@ from __future__ import print_function
 
 class FatrasTrackingGeometrySvc:
   def __init__(self):
-    from AthenaCommon.Include import include
     from AthenaCommon.AppMgr import ToolSvc
 
     ##################################################################################
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasConfig.py
index 8916d22761bad1fd1257aa56ba2717ac34b4707b..5444dd2e3555772700b37ed5d1f75f1ba3343750 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasConfig.py
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasConfig.py
@@ -6,6 +6,12 @@ from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+from ISF_Tools.ISF_ToolsConfigNew import ParticleHelperCfg
+from ISF_Services.ISF_ServicesCoreConfigNew import (
+    ParticleBrokerSvcCfg, TruthServiceCfg,
+)
+from RngComps.RandomServices import RNG
+from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
 
 ################################################################################
 # HIT CREATION SECTION
@@ -20,12 +26,15 @@ def fatrasHitCreatorPixelCfg(flags, name="ISF_FatrasHitCreatorPixel", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
-    acc = ComponentAccumulator()
+    result = ComponentAccumulator()
 
     hits_collection_name = generate_mergeable_collection_name(bare_collection_name="PixelHits",
                                                               mergeable_collection_suffix="_Fatras",
                                                               merger_input_property="PixelHits")
 
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
     kwargs.setdefault("IdHelperName", 'PixelID')
     kwargs.setdefault("CollectionName", hits_collection_name)
 
@@ -34,8 +43,8 @@ def fatrasHitCreatorPixelCfg(flags, name="ISF_FatrasHitCreatorPixel", **kwargs):
     kwargs.setdefault("UseConditionsTool", False)
 
     iFatras__HitCreatorSilicon = CompFactory.iFatras.HitCreatorSilicon
-    acc.addPublicTool(iFatras__HitCreatorSilicon(name=name, **kwargs))
-    return acc
+    result.addPublicTool(iFatras__HitCreatorSilicon(name=name, **kwargs))
+    return result
 
 
 def fatrasHitCreatorSCTCfg(flags, name="ISF_FatrasHitCreatorSCT", **kwargs):
@@ -43,34 +52,59 @@ def fatrasHitCreatorSCTCfg(flags, name="ISF_FatrasHitCreatorSCT", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
-    acc = ComponentAccumulator()
+    result = ComponentAccumulator()
 
     hits_collection_name = generate_mergeable_collection_name(bare_collection_name="SCT_Hits",
                                                               mergeable_collection_suffix="_Fatras",
                                                               merger_input_property="SCTHits")
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
     kwargs.setdefault("IdHelperName", 'SCT_ID')
     kwargs.setdefault("CollectionName", hits_collection_name)
     kwargs.setdefault("UseConditionsTool", False)
 
     iFatras__HitCreatorSilicon = CompFactory.iFatras.HitCreatorSilicon
-    acc.addPublicTool(iFatras__HitCreatorSilicon(name=name, **kwargs))
-    return acc
+    result.addPublicTool(iFatras__HitCreatorSilicon(name=name, **kwargs))
+    return result
 
 
 def fatrasHitCreatorTRTCfg(flags, name="ISF_FatrasHitCreatorTRT", **kwargs):
+    """Return ISF_FatrasHitCreatorTRT configured with ComponentAccumulator"""
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
-    acc = ComponentAccumulator()
+    result = ComponentAccumulator()
 
     hits_collection_name = generate_mergeable_collection_name(bare_collection_name="TRTUncompressedHits",
                                                               mergeable_collection_suffix="_Fatras",
                                                               merger_input_property="TRTUncompressedHits")
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
     kwargs.setdefault("CollectionName", hits_collection_name)
 
     iFatras__HitCreatorTRT = CompFactory.iFatras.HitCreatorTRT
-    acc.addPublicTool(iFatras__HitCreatorTRT(name=name, **kwargs))
-    return acc
+    result.addPublicTool(iFatras__HitCreatorTRT(name=name, **kwargs))
+    return result
+
+
+def fatrasPileupHitCreatorPixelCfg(flags, name="ISF_FatrasPileupHitCreatorPixel", **kwargs):
+    """Return ISF_FatrasHitCreatorPixel configured for pileup with ComponentAccumulator"""
+    kwargs.setdefault("CollectionName", "PileupPixelHits")
+    return fatrasHitCreatorPixelCfg(flags, name, **kwargs)
+
+
+def fatrasPileupHitCreatorSCTCfg(flags, name="ISF_FatrasPileupHitCreatorSCT", **kwargs):
+    """Return ISF_FatrasHitCreatorSCT configured for pileup with ComponentAccumulator"""
+    kwargs.setdefault("CollectionName", "PileupSCT_Hits")
+    return fatrasHitCreatorSCTCfg(flags, name, **kwargs)
+
+
+def fatrasPileupHitCreatorTRTCfg(flags, name="ISF_FatrasPileupHitCreatorTRT", **kwargs):
+    """Return ISF_FatrasHitCreatorTRT configured with ComponentAccumulator"""
+    kwargs.setdefault("CollectionName", "PileupTRTUncompressedHits")
+    return fatrasHitCreatorTRTCfg(flags, name, **kwargs)
 
 
 ################################################################################
@@ -100,13 +134,39 @@ def fatrasSimHitCreatorIDCfg(flags, name="ISF_FatrasSimHitCreatorID", **kwargs):
     result.merge(acc)
     kwargs.setdefault("TrtHitCreator", trt_hit_cfg)
 
-    kwargs.setdefault("OutputLevel", 3)
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
 
     iFatras__SimHitCreatorID = CompFactory.iFatras.SimHitCreatorID
     result.addPublicTool(iFatras__SimHitCreatorID(name=name, **kwargs))
     return result
 
 
+def fatrasPileupSimHitCreatorIDCfg(flags, name="ISF_FatrasPileupSimHitCreatorID", **kwargs):
+    """Return ISF_FatrasSimHitCreatorID configured for pileup with ComponentAccumulator"""
+
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    acc = fatrasPileupHitCreatorPixelCfg(flags)
+    pixel_hit_cfg = acc.getPublicTool('ISF_FatrasHitCreatorPixel')
+    result.merge(acc)
+    kwargs.setdefault("PixelHitCreator", pixel_hit_cfg)
+
+    acc = fatrasPileupHitCreatorSCTCfg(flags)
+    sct_hit_cfg = acc.getPublicTool('ISF_FatrasHitCreatorSCT')
+    result.merge(acc)
+    kwargs.setdefault("SctHitCreator", sct_hit_cfg)
+
+    acc = fatrasPileupHitCreatorTRTCfg(flags)
+    trt_hit_cfg = acc.getPublicTool("ISF_FatrasHitCreatorTRT")
+    result.merge(acc)
+    kwargs.setdefault("TrtHitCreator", trt_hit_cfg)
+
+    return fatrasSimHitCreatorIDCfg(flags, name, **kwargs)
+
+
 def fatrasSimHitCreatorMSCfg(flags, name="ISF_FatrasSimHitCreatorMS", **kwargs):
     """Return ISF_FatrasSimHitCreatorMS configured with ComponentAccumulator"""
 
@@ -132,9 +192,11 @@ def fatrasSimHitCreatorMSCfg(flags, name="ISF_FatrasSimHitCreatorMS", **kwargs):
     csc_hits_collection_name = generate_mergeable_collection_name(bare_collection_name="CSC_Hits",
                                                                   mergeable_collection_suffix=mergeable_collection_suffix,
                                                                   merger_input_property="CSCHits")
-
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
     #####
-    # Extrapolator from ACTS to be added
+    # Extrapolator from ACTS to be added TODO
     # kwargs.setdefault("Extrapolator" , getPublicTool('ISF_FatrasExtrapolator'))
     #####
     kwargs.setdefault("MDTCollectionName", mdt_hits_collection_name)
@@ -192,23 +254,20 @@ def G4RunManagerHelperCfg(flags, name="ISF_G4RunManagerHelper", **kwargs):
     return result
 
 
-def fatrasParticleHelperCfg(flags, name="ISF_ParticleHelper", **kwargs):
+def fatrasParticleDecayHelperCfg(flags, name="ISF_FatrasParticleDecayHelper", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
     result = ComponentAccumulator()
 
-    ISF__ParticleHelper = CompFactory.ISF.ParticleHelper
-    result.addPublicTool(ISF__ParticleHelper(name=name, **kwargs))
-
-    return result
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+    kwargs.setdefault("G4RandomStreamName", flags.Sim.Fatras.G4RandomStreamName)
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
 
-
-def fatrasParticleDecayHelperCfg(flags, name="ISF_FatrasParticleDecayHelper", **kwargs):
-    mlog = logging.getLogger(name)
-    mlog.debug('Start configuration')
-
-    result = ComponentAccumulator()
+    result.merge(ParticleBrokerSvcCfg(flags))
+    kwargs.setdefault("ParticleBroker", result.getService("ISF_ParticleBrokerSvc"))
 
     acc = fatrasPdgG4ParticleCfg(flags)
     pdg_g4part_cfg = acc.getPublicTool('ISF_FatrasPdgG4Particle')
@@ -223,13 +282,14 @@ def fatrasParticleDecayHelperCfg(flags, name="ISF_FatrasParticleDecayHelper", **
     acc = G4RunManagerHelperCfg(flags)
     g4run_man_cfg = acc.getPublicTool('ISF_G4RunManagerHelper')
     result.merge(acc)
-    kwargs.setdefault("PDGToG4ParticleConverter", g4run_man_cfg)
+    kwargs.setdefault("G4RunManagerHelper", g4run_man_cfg)
 
     iFatras__G4ParticleDecayHelper = CompFactory.iFatras.G4ParticleDecayHelper
     result.addPublicTool(iFatras__G4ParticleDecayHelper(name=name, **kwargs))
 
     return result
 
+
 ################################################################################
 # Extrapolator
 ################################################################################
@@ -238,9 +298,8 @@ def fatrasNavigatorCfg(flags, name="ISF_FatrasNavigator", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
-    result = ComponentAccumulator()    
+    result = ComponentAccumulator()
 
-    from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
     acc = TrackingGeometrySvcCfg(flags)
     kwargs.setdefault("TrackingGeometrySvc", acc.getPrimary())
     result.merge(acc)
@@ -250,32 +309,178 @@ def fatrasNavigatorCfg(flags, name="ISF_FatrasNavigator", **kwargs):
 
     return result
 
+
+def fatrasNeutralPropagatorIDCfg(flags, name="ISF_FatrasNeutralPropagatorID", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+    
+    Trk__StraightLinePropagator = CompFactory.Trk.StraightLinePropagator
+    result.addPublicTool(Trk__StraightLinePropagator(name=name, **kwargs))
+    
+    return result
+
+
+def fatrasPropagatorCfg(flags, name="ISF_FatrasPropagator", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+    
+    Trk__RungeKuttaPropagator = CompFactory.Trk.RungeKuttaPropagator
+    result.addPublicTool(Trk__RungeKuttaPropagator(name=name, **kwargs))
+    
+    return result
+
+
+# from the Propagator create a Propagation engine to handle path length
+def fatrasStaticPropagatorCfg(flags, name="ISF_FatrasStaticPropagator", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+    
+    result.merge(fatrasPropagatorCfg(flags))
+    kwargs.setdefault("Propagator", result.getPublicTool("ISF_FatrasPropagator"))
+    
+    # configure output formatting
+    kwargs.setdefault("OutputPrefix", "[SP] - ")
+    kwargs.setdefault("OutputPostfix", " - ")
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    
+    Trk__PropagationEngine = CompFactory.Trk.PropagationEngine
+    result.addPublicTool(Trk__PropagationEngine(name, **kwargs))
+    
+    return result
+
+
+# load the static navigation engine
+def fatrasStaticNavigationEngineCfg(flags, name="ISF_FatrasStaticNavigationEngine", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasStaticPropagatorCfg(flags))
+    kwargs.setdefault("PropagationEngine", result.getPublicTool("ISF_FatrasStaticPropagator"))
+    result.merge(fatrasMaterialEffectsEngineCfg(flags))
+    kwargs.setdefault("MaterialEffectsEngine", result.getPublicTool("ISF_FatrasMaterialEffectsEngine"))
+    acc = TrackingGeometrySvcCfg(flags)
+    kwargs.setdefault("TrackingGeometrySvc", acc.getPrimary())
+    result.merge(acc)
+    
+    # configure output formatting
+    kwargs.setdefault("OutputPrefix", "[SN] - ")
+    kwargs.setdefault("OutputPostfix", " - ")
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    Trk__StaticNavigationEngine = CompFactory.Trk.StaticNavigationEngine
+    acc.setPrivateTools(Trk__StaticNavigationEngine(name, **kwargs))
+    return acc
+
+
 def fatrasEnergyLossUpdatorCfg(flags, name="ISF_FatrasEnergyLossUpdator", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
     result = ComponentAccumulator()
 
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+
     kwargs.setdefault("UsePDG_EnergyLossFormula", True)
     kwargs.setdefault("EnergyLossDistribution", 2)
-    
+
     iFatras__McEnergyLossUpdator = CompFactory.iFatras.McEnergyLossUpdator
     result.addPublicTool(iFatras__McEnergyLossUpdator(name=name, **kwargs))
 
     return result
 
+
+def fatrasEnergyLossSamplerBetheHeitlerCfg(flags, name="ISF_FatrasEnergyLossSamplerBetheHeitler", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+
+    kwargs.setdefault("ScaleFactor", flags.Sim.Fatras.BetheHeitlerScale)
+
+    iFatras__EnergyLossSamplerBetheHeitler = CompFactory.iFatras.EnergyLossSamplerBetheHeitler
+    result.addPublicTool(iFatras__EnergyLossSamplerBetheHeitler(name=name, **kwargs))
+
+    return result
+
+
 def fatrasMultipleScatteringUpdatorCfg(flags, name="ISF_FatrasMultipleScatteringUpdator", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
     result = ComponentAccumulator()
-    kwargs.setdefault("GaussianMixtureModel", True)
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.TrkExRandomStreamName)
+    kwargs.setdefault("GaussianMixtureModel", flags.Sim.Fatras.GaussianMixtureModel)
 
     Trk__MultipleScatteringUpdator = CompFactory.Trk.MultipleScatteringUpdator
     result.addPublicTool(Trk__MultipleScatteringUpdator(name=name, **kwargs))
 
     return result
 
+
+def fatrasMultipleScatteringSamplerHighlandCfg(flags, name="ISF_MultipleScatteringSamplerHighland", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.TrkExRandomStreamName)
+
+    Trk__MultipleScatteringSamplerHighland = CompFactory.Trk.MultipleScatteringSamplerHighland
+    result.addPublicTool(Trk__MultipleScatteringSamplerHighland(name=name, **kwargs))
+
+    return result
+
+
+def fatrasMultipleScatteringSamplerGaussianMixtureCfg(flags, name="ISF_MultipleScatteringSamplerGaussianMixture", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.TrkExRandomStreamName)
+
+    Trk__MultipleScatteringSamplerGaussianMixture = CompFactory.Trk.MultipleScatteringSamplerGaussianMixture
+    result.addPublicTool(Trk__MultipleScatteringSamplerGaussianMixture(name=name, **kwargs))
+
+    return result
+
+
+def fatrasMultipleScatteringSamplerGeneralMixtureCfg(flags, name="ISF_MultipleScatteringSamplerGeneralMixture", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.TrkExRandomStreamName)
+
+    Trk__MultipleScatteringSamplerGeneralMixture = CompFactory.Trk.MultipleScatteringSamplerGeneralMixture
+    result.addPublicTool(Trk__MultipleScatteringSamplerGeneralMixture(name=name, **kwargs))
+
+    return result
+
+
 # Combining all in the MaterialEffectsUpdator
 def fatrasMaterialUpdatorCfg(flags, name="ISF_FatrasMaterialUpdator", **kwargs):
     mlog = logging.getLogger(name)
@@ -283,12 +488,15 @@ def fatrasMaterialUpdatorCfg(flags, name="ISF_FatrasMaterialUpdator", **kwargs):
 
     result = ComponentAccumulator()
 
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+
     # Geometry Svc
-    from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
     acc = TrackingGeometrySvcCfg(flags)
     kwargs.setdefault("TrackingGeometrySvc", acc.getPrimary())
     result.merge(acc)
-    
+
     # hadronic interactions
     kwargs.setdefault("HadronicInteraction", True)
     acc = fatrasG4HadIntProcessorCfg(flags)
@@ -315,10 +523,14 @@ def fatrasMaterialUpdatorCfg(flags, name="ISF_FatrasMaterialUpdator", **kwargs):
     ph_conv_cfg = acc.getPublicTool('ISF_FatrasConversionCreator')
     result.merge(acc)
     kwargs.setdefault("PhotonConversionTool", ph_conv_cfg)
-  
+
     # the validation output
-    ##  NOTE to be checked
-    ###  kwargs.setdefault("ValidationMode", ISF_Flags.ValidationMode())
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
+    kwargs.setdefault("BremPhotonValidation", False)
+    kwargs.setdefault("EnergyDepositValidation", False)
+
+    kwargs.setdefault("MomentumCut", flags.Sim.Fatras.MomCutOffSec)
+    kwargs.setdefault("MinimumBremPhotonMomentum", flags.Sim.Fatras.MomCutOffSec)
 
     acc = fatrasPhysicsValidationToolCfg(flags)
     phys_val_cfg = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
@@ -335,12 +547,82 @@ def fatrasMaterialUpdatorCfg(flags, name="ISF_FatrasMaterialUpdator", **kwargs):
     result.merge(acc)
     kwargs.setdefault("ParticleDecayHelper", pdhelper_cfg)
 
+    # MCTruth Process Code
+    kwargs.setdefault("BremProcessCode", 3) # TODO: to be taken from central definition
+    acc = TrackingGeometrySvcCfg(flags)
+    kwargs.setdefault("TrackingGeometrySvc", acc.getPrimary())
+    result.merge(acc)
 
     iFatras__McMaterialEffectsUpdator = CompFactory.iFatras.McMaterialEffectsUpdator
     result.addPublicTool(iFatras__McMaterialEffectsUpdator(name=name, **kwargs))
 
     return result
 
+
+
+def fatrasMaterialEffectsEngineCfg(flags, name="ISF_FatrasMaterialEffectsEngine", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+
+    result.merge(ParticleBrokerSvcCfg(flags))
+    kwargs.setdefault("ParticleBroker", result.getService("ISF_ParticleBrokerSvc"))
+    
+    acc = TruthServiceCfg(flags)
+    kwargs.setdefault("TruthRecordSvc", acc.getPrimary())
+    result.merge(acc)
+    
+    result.merge(fatrasProcessSamplingToolCfg(flags))
+    kwargs.setdefault("ProcessSamplingTool", result.getPublicTool("ISF_FatrasProcessSamplingTool"))
+    
+    result.merge(fatrasParticleDecayHelperCfg(flags))
+    kwargs.setdefault("ParticleDecayHelper", result.getPublicTool("ISF_FatrasParticleDecayHelper"))
+    
+    # energy loss
+    result.merge(fatrasEnergyLossUpdatorCfg(flags))
+    kwargs.setdefault("EnergyLossSampler", result.getPublicTool("ISF_FatrasEnergyLossUpdator"))
+    kwargs.setdefault("EnergyLoss", True)
+    
+    result.merge(fatrasEnergyLossSamplerBetheHeitlerCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasEnergyLossSamplerBetheHeitler")
+    kwargs.setdefault("ElectronEnergyLossSampler", tool)
+    kwargs.setdefault("UseElectronSampler", True)
+    kwargs.setdefault("CreateBremPhotons", True)
+    
+    # multiple scattering
+    result.merge(fatrasMultipleScatteringSamplerHighlandCfg(flags))
+    tool = result.getPublicTool("ISF_MultipleScatteringSamplerHighland")
+    kwargs.setdefault("MultipleScatteringSampler", tool)
+    kwargs.setdefault("MultipleScattering", True)
+    
+    # the properties given throuth the JobProperties interface
+    kwargs.setdefault("MomentumCut", flags.Sim.Fatras.MomCutOffSec)
+    kwargs.setdefault("MinimumBremPhotonMomentum", flags.Sim.Fatras.MomCutOffSec)
+    
+    # MCTruth Process Code
+    kwargs.setdefault("BremProcessCode", 3) # TODO: to be taken from central definition
+    
+    # the validation output
+    result.merge(fatrasPhysicsValidationToolCfg(flags))
+    tool = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
+    kwargs.setdefault("PhysicsValidationTool", tool)
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
+    
+    kwargs.setdefault("OutputPrefix", "[McME] - ")
+    kwargs.setdefault("OutputPostfix", " - ")
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    
+    iFatras__McMaterialEffectsEngine = CompFactory.iFatras.McMaterialEffectsEngine
+    result.setPublicTool(iFatras__McMaterialEffectsEngine(name, **kwargs))
+    
+    return result
+
+
 def fatrasChargedPropagatorCfg(flags, name="ISF_FatrasChargedPropagator", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
@@ -357,6 +639,7 @@ def fatrasSTEP_PropagatorCfg(flags, name="ISF_FatrasSTEP_Propagator", **kwargs):
     mlog.debug('Start configuration')
 
     result = ComponentAccumulator()
+    kwargs.setdefault("MomentumCutOff", flags.Sim.Fatras.MomCutOffSec)
     kwargs.setdefault("SimulationMode", True)
 
     acc = fatrasMaterialUpdatorCfg(flags)
@@ -402,6 +685,7 @@ def fatrasExtrapolatorCfg(flags, name="ISF_FatrasExtrapolator", **kwargs):
     # Fatras specific: stop the trajectory
     kwargs.setdefault("StopWithNavigationBreak", True)
     kwargs.setdefault("StopWithUpdateKill", True)
+    kwargs.setdefault("RobustSampling", True)
     kwargs.setdefault("ResolveMuonStation", True)
     kwargs.setdefault("UseMuonMatApproximation", True)
 
@@ -410,6 +694,56 @@ def fatrasExtrapolatorCfg(flags, name="ISF_FatrasExtrapolator", **kwargs):
 
     return result
 
+
+def fatrasStaticExtrapolatorCfg(flags, name="ISF_FatrasStaticExEngine", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+    
+    result.merge(fatrasStaticPropagatorCfg(flags))
+    kwargs.setdefault("PropagationEngine", result.getPublicTool("ISF_FatrasStaticPropagator"))
+    result.merge(fatrasMaterialEffectsEngineCfg(flags))
+    kwargs.setdefault("MaterialEffectsEngine", result.getPublicTool("ISF_FatrasMaterialEffectsEngine"))
+    result.merge(fatrasStaticNavigationEngineCfg(flags))
+    kwargs.setdefault("NavigationEngine", result.getPublicTool("ISF_FatrasStaticNavigationEngine"))
+    
+    # configure output formatting
+    kwargs.setdefault("OutputPrefix", "[SE] - ")
+    kwargs.setdefault("OutputPostfix", " - ")
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    
+    Trk__StaticEngine = CompFactory.Trk.StaticEngine
+    result.setPrivateTools(Trk__StaticEngine(name, **kwargs))
+    return result
+
+
+def fatrasExEngineCfg(flags, name="ISF_FatrasExEngine", **kwargs):
+    # load the tracking geometry service
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+    
+    # assign the tools
+    result.merge(fatrasStaticExtrapolatorCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasStaticExEngine")
+    kwargs.setdefault("ExtrapolationEngines", [tool])
+    acc = TrackingGeometrySvcCfg(flags)
+    kwargs.setdefault("TrackingGeometrySvc", acc.getPrimary())
+    result.merge(acc)
+    result.merge(fatrasStaticPropagatorCfg(flags))
+    kwargs.setdefault("PropagationEngine", result.getPublicTool("ISF_FatrasStaticPropagator"))
+    
+    # configure output formatting
+    kwargs.setdefault("OutputPrefix", "[ME] - ")
+    kwargs.setdefault("OutputPostfix", " - ")
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    
+    Trk__ExtrapolationEngine = CompFactory.Trk.ExtrapolationEngine
+    result.setPrivateTools(Trk__ExtrapolationEngine(name, **kwargs))
+    return result
+
 ################################################################################
 # SIMULATION TOOL and SERVICE
 ################################################################################
@@ -421,6 +755,7 @@ def fatrasKinematicFilterCfg(flags, name="ISF_FatrasKinematicFilter", **kwargs):
     result = ComponentAccumulator()
 
     kwargs.setdefault("MaxEtaSymmetric", 10.)
+    kwargs.setdefault("MinMomentum", flags.Sim.Fatras.MomCutOffSec)
 
     ISF__KinematicParticleFilter = CompFactory.ISF.KinematicParticleFilter
     result.addPublicTool(ISF__KinematicParticleFilter(name=name, **kwargs))
@@ -435,11 +770,21 @@ def fatrasConversionCreatorCfg(flags, name="ISF_FatrasConversionCreator", **kwar
 
     result = ComponentAccumulator()
 
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+
+    result.merge(ParticleBrokerSvcCfg(flags))
+    kwargs.setdefault("ParticleBroker", result.getService("ISF_ParticleBrokerSvc"))
+
     acc = fatrasPhysicsValidationToolCfg(flags)
     phys_val_cfg = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
     result.merge(acc)
     kwargs.setdefault("PhysicsValidationTool", phys_val_cfg)
 
+    kwargs.setdefault("PhysicsProcessCode", 14) # TODO: to be taken from central definition
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
+
     iFatras__PhotonConversionTool = CompFactory.iFatras.PhotonConversionTool
     result.addPublicTool(iFatras__PhotonConversionTool(name=name, **kwargs))
 
@@ -452,23 +797,79 @@ def fatrasG4HadIntProcessorCfg(flags, name="ISF_FatrasG4HadIntProcessor", **kwar
 
     result = ComponentAccumulator()
 
-    acc = fatrasPhysicsValidationToolCfg(flags)
-    phys_val_cfg = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+
+    result.merge(ParticleBrokerSvcCfg(flags))
+    kwargs.setdefault("ParticleBroker", result.getService("ISF_ParticleBrokerSvc"))
+    
+    acc = TruthServiceCfg(flags)
+    kwargs.setdefault("TruthRecordSvc", acc.getPrimary())
     result.merge(acc)
+
+    result.merge(fatrasPhysicsValidationToolCfg(flags))
+    phys_val_cfg = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
     kwargs.setdefault("PhysicsValidationTool", phys_val_cfg)
 
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
+    kwargs.setdefault("MomentumCut", flags.Sim.Fatras.MomCutOffSec)
+
     iFatras__G4HadIntProcessor = CompFactory.iFatras.G4HadIntProcessor
     result.addPublicTool(iFatras__G4HadIntProcessor(name=name, **kwargs))
 
     return result
 
 
+#   Fatras Hadronic Interaction Processor
+def fatrasParametricHadIntProcessorCfg(flags, name="ISF_FatrasParametricHadIntProcessor", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    kwargs.setdefault("RandomStreamName", flags.Sim.Fatras.RandomStreamName)
+    
+    result.merge(ParticleBrokerSvcCfg(flags))
+    kwargs.setdefault("ParticleBroker", result.getService("ISF_ParticleBrokerSvc"))
+    
+    acc = TruthServiceCfg(flags)
+    kwargs.setdefault("TruthRecordSvc", acc.getPrimary())
+    result.merge(acc)
+    
+    kwargs.setdefault("HadronicInteractionScaleFactor", flags.Sim.Fatras.HadronIntProb)
+    kwargs.setdefault("MinimumHadronicInitialEnergy", flags.Sim.Fatras.MomCutOffSec)
+    kwargs.setdefault("MinimumHadronicOutEnergy", flags.Sim.Fatras.MomCutOffSec)
+    kwargs.setdefault("HadronicInteractionValidation", False)
+    kwargs.setdefault("PhysicsProcessCode", 121) # TODO: to be taken from central definition
+    
+    result.merge(fatrasPhysicsValidationToolCfg(flags))
+    phys_val_cfg = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
+    kwargs.setdefault("PhysicsValidationTool", phys_val_cfg)
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
+    
+    iFatras__HadIntProcessorParametric = CompFactory.iFatras.HadIntProcessorParametric
+    result.setPrivateTools(iFatras__HadIntProcessorParametric(name, **kwargs))
+    
+    return result
+
+
 def fatrasProcessSamplingToolCfg(flags, name="ISF_FatrasProcessSamplingTool", **kwargs):
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
 
     result = ComponentAccumulator()
 
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+
+    # truth record
+    acc = TruthServiceCfg(flags)
+    kwargs.setdefault("TruthRecordSvc", acc.getPrimary())
+    result.merge(acc)
+
     # decays
     acc = fatrasParticleDecayHelperCfg(flags)
     pd_helper_cfg = acc.getPublicTool('ISF_FatrasParticleDecayHelper')
@@ -486,12 +887,14 @@ def fatrasProcessSamplingToolCfg(flags, name="ISF_FatrasProcessSamplingTool", **
     g4had_proc_cfg = acc.getPublicTool('ISF_FatrasG4HadIntProcessor')
     result.merge(acc)
     kwargs.setdefault("HadronicInteractionProcessor", g4had_proc_cfg)
+    kwargs.setdefault("HadronicInteraction", True)
 
     # Validation Tool
     acc = fatrasPhysicsValidationToolCfg(flags)
     phys_val_cfg = acc.getPublicTool('ISF_FatrasPhysicsValidationTool')
     result.merge(acc)
     kwargs.setdefault("PhysicsValidationTool", phys_val_cfg)
+    kwargs.setdefault("ValidationMode", flags.Sim.ISF.ValidationMode)
 
     iFatras__ProcessSamplingTool = CompFactory.iFatras.ProcessSamplingTool
     result.addPublicTool(iFatras__ProcessSamplingTool(name=name, **kwargs))
@@ -505,10 +908,11 @@ def fatrasSimToolCfg(flags, name="ISF_FatrasSimTool", **kwargs):
 
     result = ComponentAccumulator()
 
-    acc = fatrasSimHitCreatorIDCfg(flags)
-    id_cfg = acc.getPublicTool('ISF_FatrasSimHitCreatorID')
-    result.merge(acc)
-    kwargs.setdefault("SimHitCreatorID", id_cfg)
+    if "SimHitCreatorID" not in kwargs:
+        acc = fatrasSimHitCreatorIDCfg(flags)
+        id_cfg = acc.getPublicTool('ISF_FatrasSimHitCreatorID')
+        result.merge(acc)
+        kwargs.setdefault("SimHitCreatorID", id_cfg)
 
     acc = fatrasSimHitCreatorMSCfg(flags)
     ms_cfg = acc.getPublicTool('ISF_FatrasSimHitCreatorMS')
@@ -520,7 +924,7 @@ def fatrasSimToolCfg(flags, name="ISF_FatrasSimTool", **kwargs):
     result.merge(acc)
     kwargs.setdefault("ParticleDecayHelper", pdhelper_cfg)
 
-    acc = fatrasParticleHelperCfg(flags)
+    acc = ParticleHelperCfg(flags)
     part_helper_cfg = acc.getPublicTool('ISF_ParticleHelper')
     result.merge(acc)
     kwargs.setdefault("ParticleHelper", part_helper_cfg)
@@ -547,6 +951,188 @@ def fatrasSimToolCfg(flags, name="ISF_FatrasSimTool", **kwargs):
     result.merge(acc)
     kwargs.setdefault("ProcessSamplingTool", proc_samp_cfg)
 
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    kwargs.setdefault("ValidationOutput", flags.Sim.ISF.ValidationMode)
+    
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    
     iFatras__TransportTool = CompFactory.iFatras.TransportTool
-    result.setPrivateTools(iFatras__TransportTool(name=name, **kwargs))
+    result.addPublicTool(iFatras__TransportTool(name=name, **kwargs))
+    return result
+
+
+def fatrasSimEngineCfg(flags, name="ISF_FatrasSimEngine", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    acc = fatrasSimHitCreatorIDCfg(flags)
+    id_cfg = acc.getPublicTool('ISF_FatrasSimHitCreatorID')
+    result.merge(acc)
+    kwargs.setdefault("SimHitCreatorID", id_cfg)
+    
+    acc = fatrasParticleDecayHelperCfg(flags)
+    pdhelper_cfg = acc.getPublicTool('ISF_FatrasParticleDecayHelper')
+    result.merge(acc)
+    kwargs.setdefault("ParticleDecayHelper", pdhelper_cfg)
+
+    acc = fatrasKinematicFilterCfg(flags)
+    kin_filter_cfg = acc.getPublicTool('ISF_FatrasKinematicFilter')
+    result.merge(acc)
+    kwargs.setdefault("TrackFilter", kin_filter_cfg)
+    kwargs.setdefault("NeutralFilter", kin_filter_cfg)
+    kwargs.setdefault("PhotonFilter", kin_filter_cfg)
+    
+    acc = fatrasExEngineCfg(flags)
+    extrapolator_cfg = acc.getPublicTool('ISF_FatrasExEngine')
+    kwargs.setdefault("Extrapolator", extrapolator_cfg)
+    result.merge(acc)
+
+    acc = fatrasProcessSamplingToolCfg(flags)
+    proc_samp_cfg = acc.getPublicTool('ISF_FatrasProcessSamplingTool')
+    result.merge(acc)
+    kwargs.setdefault("ProcessSamplingTool", proc_samp_cfg)
+    
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    kwargs.setdefault("ValidationOutput", flags.Sim.ISF.ValidationMode)
+    
+    result.merge(fatrasPhysicsValidationToolCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasPhysicsValidationTool")
+    kwargs.setdefault("PhysicsValidationTool", tool)
+    
+    result.merge(RNG(flags.Random.Engine))
+    kwargs.setdefault("RandomNumberService", result.getService("AthRNGSvc"))
+    
+    iFatras__TransportEngine = CompFactory.iFatras.TransportEngine
+    result.addPublicTool(iFatras__TransportEngine(name=name, **kwargs))
+    return result
+
+
+def fatrasPileupSimToolCfg(flags, name="ISF_FatrasPileupSimTool", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasPileupSimHitCreatorIDCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasPileupSimHitCreatorID")
+    kwargs.setdefault("SimHitCreatorID", tool)
+    
+    result.merge(fatrasSimToolCfg(flags, name, **kwargs))
+    return result
+
+
+# FatrasSimulatorTool
+def fatrasSimulatorToolSTCfg(flags, name="ISF_FatrasSimulatorToolST", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasSimToolCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasSimTool")
+    kwargs.setdefault("IDSimulationTool", tool)
+    kwargs.setdefault("SimulationTool", tool)
+    
+    kwargs.setdefault("OutputLevel", flags.Exec.OutputLevel)
+    
+    ISF__FatrasSimTool = CompFactory.ISF.FatrasSimTool
+    result.addPublicTool(ISF__FatrasSimTool(name, **kwargs))
+    return result
+
+
+def fatrasNewExtrapolationSimulatorToolSTCfg(flags, name="ISF_FatrasNewExtrapolationSimulatorToolST", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasSimEngineCfg(flags))
+    tool = result.getPrivateTool("ISF_FatrasSimEngine")
+    kwargs.setdefault("IDSimulationTool", tool)
+    kwargs.setdefault("UseSimulationTool", True)
+    
+    result.merge(fatrasSimulatorToolSTCfg(flags, name, **kwargs))
+    return result
+
+
+def fatrasPileupSimulatorToolSTCfg(flags, name="ISF_FatrasPileupSimulatorToolST", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasPileupSimToolCfg(flags))
+    tool = result.getPrivateTool("ISF_FatrasPileupSimTool")
+    kwargs.setdefault("IDSimulationTool", tool)
+    
+    result.merge(fatrasSimToolCfg(flags))
+    tool = result.getPrivateTool("ISF_FatrasSimTool")
+    kwargs.setdefault("SimulationTool", tool)
+    
+    result.merge(fatrasSimulatorToolSTCfg(flags, name, **kwargs))
+    return result
+
+
+# FatrasSimulationSvc
+def fatrasSimServiceIDCfg(flags, name="ISF_FatrasSimSvc", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    kwargs.setdefault("Identifier", "Fatras")
+    
+    result.merge(fatrasSimulatorToolSTCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasSimulatorToolST")
+    kwargs.setdefault("SimulatorTool", tool)
+    
+    result.addService(CompFactory.ISF.LegacySimSvc(name, **kwargs))
+    
+    return result
+
+
+def fatrasNewExtrapolationSimServiceIDCfg(flags, name="ISF_FatrasNewExtrapolationSimSvc", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasNewExtrapolationSimulatorToolSTCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasNewExtrapolationSimulatorToolST")
+    kwargs.setdefault("SimulatorTool", tool)
+    
+    result.merge(fatrasSimServiceIDCfg(flags, name, **kwargs))
+    
+    return result
+
+
+def fatrasGeoIDFixSimServiceIDCfg(flags, name="ISF_FatrasGeoIDFixSimSvc", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    kwargs.setdefault("EnableGeoIDOverride", True)
+    kwargs.setdefault("GeoIDOverrideZ", 3150.)
+    kwargs.setdefault("GeoIDOverride", 3) # ISF::fAtlasCalo
+    
+    result.merge(fatrasSimServiceIDCfg(flags, name, **kwargs))
+    
+    return result
+
+
+def fatrasPileupSimServiceIDCfg(flags, name="ISF_FatrasPileupSimSvc", **kwargs):
+    mlog = logging.getLogger(name)
+    mlog.debug('Start configuration')
+
+    result = ComponentAccumulator()
+
+    result.merge(fatrasPileupSimulatorToolSTCfg(flags))
+    tool = result.getPublicTool("ISF_FatrasPileupSimulatorToolST")
+    kwargs.setdefault("SimulatorTool", tool)
+    
+    result.merge(fatrasSimServiceIDCfg(flags, name, **kwargs))
     return result
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
index 48393250ef1e45f32ca9d78c8e9c4d023a2a6d42..88d3c195bc7c78979b699a1ec3cfadd93947bc40 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
@@ -8,18 +8,14 @@ KG Tan, 04/12/2012
 from __future__ import print_function
 
 from AthenaCommon import CfgMgr
-from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\
-        getService,getServiceClone,getAlgorithm,getAlgorithmClone
+from AthenaCommon.CfgGetter import getPublicTool
 
-from AthenaCommon.Constants import *  # FATAL,ERROR etc.
-from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.DetFlags import DetFlags
 from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
 
 from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be set before tools are retrieved
 from ISF_FatrasServices.ISF_FatrasJobProperties import ISF_FatrasFlags
 from ISF_FatrasServices.FatrasTuning import FatrasTuningFlags
-from ISF_FatrasServices.FatrasValidation import FatrasValidationFlags
 from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
 
 #################################################################################
@@ -36,7 +32,7 @@ def initialiseCoolDataBaseFolder():
       print ('[ TrackingGeometrySvc ]')
 
     # check whether the material retrieval is ment to be from COOL
-    if TrkDetFlags.MaterialSource() is 'COOL' :
+    if TrkDetFlags.MaterialSource() == 'COOL' :
         # the tag names
         CoolDataBaseFolder = TrkDetFlags.MaterialStoreGateKey()
         AtlasMaterialTag = TrkDetFlags.MaterialTagBase()+str(TrkDetFlags.MaterialVersion())+'_'
@@ -238,7 +234,7 @@ def getFatrasPdgG4Particle(name="ISF_FatrasPdgG4Particle", **kwargs):
     return iFatras__PDGToG4Particle(name, **kwargs )
 
 def getFatrasParticleDecayHelper(name="ISF_FatrasParticleDecayHelper", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasG4" ):
       simFlags.RandomSeedList.addSeed( "FatrasG4" , 23491234, 23470291 )
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
@@ -265,7 +261,7 @@ def getFatrasParticleDecayHelper(name="ISF_FatrasParticleDecayHelper", **kwargs)
 #     the G4 MaterialEffectsUpdator
 
 def getFatrasG4HadIntProcessor(name="ISF_FatrasG4HadIntProcessor", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"      , ISF_Flags.ParticleBroker())
@@ -278,7 +274,7 @@ def getFatrasG4HadIntProcessor(name="ISF_FatrasG4HadIntProcessor", **kwargs):
     return iFatras__G4HadIntProcessor(name, **kwargs )
 
 def getFatrasParametricHadIntProcessor(name="ISF_FatrasParametricHadIntProcessor", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     #   Fatras Hadronic Interaction Processor
     #   hadronic interaction creator
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
@@ -301,7 +297,7 @@ def getFatrasParametricHadIntProcessor(name="ISF_FatrasParametricHadIntProcessor
 def getFatrasConversionCreator(name="ISF_FatrasConversionCreator", **kwargs):
     #   Fatras Hadronic Interaction Processor
     #   hadronic interaction creator
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"  , ISF_Flags.ParticleBroker())
@@ -316,7 +312,7 @@ def getFatrasConversionCreator(name="ISF_FatrasConversionCreator", **kwargs):
 def getFatrasProcessSamplingTool(name="ISF_FatrasProcessSamplingTool", **kwargs):
 
     # random number service
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc())
     # truth record
     kwargs.setdefault("TruthRecordSvc"      , simFlags.TruthStrategy.TruthServiceName())
@@ -339,7 +335,7 @@ def getFatrasProcessSamplingTool(name="ISF_FatrasProcessSamplingTool", **kwargs)
 #      - Ionization and Bremstrahlung loss
 #      - assing the Bethe-Heitler Eloss updator
 def getFatrasEnergyLossUpdator(name="ISF_FatrasEnergyLossUpdator", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("UsePDG_EnergyLossFormula", True)
@@ -350,7 +346,7 @@ def getFatrasEnergyLossUpdator(name="ISF_FatrasEnergyLossUpdator", **kwargs):
     return iFatras__McEnergyLossUpdator(name, **kwargs )
 
 def getFatrasEnergyLossSamplerBetheHeitler(name="ISF_FatrasEnergyLossSamplerBetheHeitler", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ScaleFactor"  , FatrasTuningFlags.BetheHeitlerScalor())
@@ -361,7 +357,7 @@ def getFatrasEnergyLossSamplerBetheHeitler(name="ISF_FatrasEnergyLossSamplerBeth
 #
 # (iii) Multiple scattering
 def getFatrasMultipleScatteringUpdator(name="ISF_FatrasMultipleScatteringUpdator", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ):
       simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 )
     kwargs.setdefault("RandomNumberService"   , simFlags.RandomSvc() )
@@ -372,7 +368,7 @@ def getFatrasMultipleScatteringUpdator(name="ISF_FatrasMultipleScatteringUpdator
     return Trk__MultipleScatteringUpdator(name, **kwargs )
 
 def getFatrasMultipleScatteringSamplerHighland(name="ISF_MultipleScatteringSamplerHighland", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ):
       simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 )
     kwargs.setdefault("RandomNumberService"   , simFlags.RandomSvc() )
@@ -381,7 +377,7 @@ def getFatrasMultipleScatteringSamplerHighland(name="ISF_MultipleScatteringSampl
     return iFatras__MultipleScatteringSamplerHighland(name, **kwargs )
 
 def getFatrasMultipleScatteringSamplerGaussianMixture(name="ISF_MultipleScatteringSamplerGaussianMixture", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ):
       simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 )
     kwargs.setdefault("RandomNumberService"   , simFlags.RandomSvc() )
@@ -390,7 +386,7 @@ def getFatrasMultipleScatteringSamplerGaussianMixture(name="ISF_MultipleScatteri
     return iFatras__MultipleScatteringSamplerGaussianMixture(name, **kwargs )
 
 def getFatrasMultipleScatteringSamplerGeneralMixture(name="ISF_MultipleScatteringSamplerGeneralMixture", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ):
       simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 )
     kwargs.setdefault("RandomNumberService"   , simFlags.RandomSvc() )
@@ -400,7 +396,7 @@ def getFatrasMultipleScatteringSamplerGeneralMixture(name="ISF_MultipleScatterin
 
 # Combining all in the MaterialEffectsUpdator
 def getFatrasMaterialUpdator(name="ISF_FatrasMaterialUpdator", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
@@ -437,7 +433,7 @@ def getFatrasMaterialUpdator(name="ISF_FatrasMaterialUpdator", **kwargs):
     return iFatras__McMaterialEffectsUpdator(name, **kwargs )
 
 def getFatrasMaterialEffectsEngine(name="ISF_FatrasMaterialEffectsEngine", **kwargs):
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService"         , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"            , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"              , ISF_Flags.ParticleBroker())
@@ -538,13 +534,12 @@ def getFatrasHitCreatorPixel(name="ISF_FatrasHitCreatorPixel", **kwargs):
                                                               mergeable_collection_suffix,
                                                               merger_input_property)
 
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("IdHelperName"    , 'PixelID')
     kwargs.setdefault("CollectionName"  , hits_collection_name)
 
-    from FastCaloSimHit.FastCaloSimHitConf import FastHitConvertTool
     kwargs.setdefault("UseConditionsTool", False)
 
     from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorSilicon
@@ -557,7 +552,7 @@ def getFatrasHitCreatorSCT(name="ISF_FatrasHitCreatorSCT", **kwargs):
     hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
                                                               mergeable_collection_suffix,
                                                               merger_input_property)
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("IdHelperName"    , 'SCT_ID')
@@ -574,7 +569,7 @@ def getFatrasHitCreatorTRT(name="ISF_FatrasHitCreatorTRT", **kwargs):
     hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
                                                               mergeable_collection_suffix,
                                                               merger_input_property)
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("CollectionName"  , hits_collection_name)
@@ -636,7 +631,7 @@ def getFatrasSimHitCreatorMS(name="ISF_FatrasSimHitCreatorMS", **kwargs):
                                                                   mergeable_collection_suffix,
                                                                   csc_merger_input_property)
 
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("Extrapolator" , getPublicTool('ISF_FatrasExtrapolator'))
@@ -684,7 +679,7 @@ def getFatrasSimTool(name="ISF_FatrasSimTool", **kwargs):
     kwargs.setdefault("OutputLevel"         , ISF_FatrasFlags.OutputLevelGeneral())
     kwargs.setdefault("ValidationOutput"              , ISF_Flags.ValidationMode())
     # random number service
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc())
 
     from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__TransportTool
@@ -708,7 +703,7 @@ def getFatrasSimEngine(name="ISF_FatrasSimEngine", **kwargs):
     kwargs.setdefault("ValidationMode"              , ISF_Flags.ValidationMode())
     kwargs.setdefault("PhysicsValidationTool"       , getPublicTool('ISF_FatrasPhysicsValidationTool'))
     # random number service
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc())
 
     from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__TransportEngine
@@ -752,7 +747,7 @@ def getFatrasSimulatorToolST(name="ISF_FatrasSimulatorToolST", **kwargs):
     # set the output level
     kwargs.setdefault("OutputLevel"         , ISF_FatrasFlags.OutputLevelGeneral())
     # register Fatras random number stream if not already registered
-    from G4AtlasApps.SimFlags import SimFlags,simFlags
+    from G4AtlasApps.SimFlags import simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasRnd" ):
       simFlags.RandomSeedList.addSeed( "FatrasRnd", 81234740, 23474923 )
     return CfgMgr.ISF__FatrasSimTool(name, **kwargs)
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py
index 5cbb63294b86e1f07ea62867bd8fde906ea14413..254e92cd4c060d9a39e3a06a205947aed794f0e4 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py
@@ -1,19 +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
 
 """
 Configuration database for ISF
 Elmar Ritsch, 10/11/2014
 """
 
-from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorithm, \
-     addTypesToExcludeIfDefaultValue, addNamesToExcludeIfDefaultValue, addFullNamesToExcludeIfDefaultValue, \
-     addPropertiesToExcludeIfDefault, \
-     addTypesToSkipIfNotAvailable, addNamesToSkipIfNotAvailable, addFullNamesToSkipIfNotAvailable, \
-     addTypesOnlyToSkip
-
-from AthenaCommon.Constants import *  # FATAL,ERROR etc.
-import AthenaCommon.SystemOfUnits as Units
-
+from AthenaCommon.CfgGetter import addTool, addService
 
 addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getInDetTrackingGeometryBuilder",            "ISF_InDetTrackingGeometryBuilder")
 addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasCaloTrackingGeometryBuilder",       "ISF_FatrasCaloTrackingGeometryBuilder")
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesSimConfigNew.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesSimConfigNew.py
new file mode 100644
index 0000000000000000000000000000000000000000..dfb396b461341e785188ac3e99fd0a90dc985545
--- /dev/null
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesSimConfigNew.py
@@ -0,0 +1,49 @@
+"""
+ComponentAccumulator service configuration for ISF_Fatras simulator tool FatrasSimTool
+Separated from main config to avoid circular dependences
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from ISF_FatrasServices.ISF_FatrasServicesConfigNew import (
+    FatrasSimulatorToolSTCfg,
+    FatrasNewExtrapolationSimulatorToolSTCfg,
+    FatrasPileupSimulatorToolSTCfg,
+)
+from ISF_SimulationSelectors.ISF_SimulationSelectorsConfigNew import (
+    DefaultFatrasSelectorCfg, MuonFatrasSelectorCfg,
+)
+
+def FatrasSimulatorToolCfg(flags, name="ISF_FatrasSimulatorTool", **kwargs):
+    acc = ComponentAccumulator()
+    deftool = acc.popToolsAndMerge(DefaultFatrasSelectorCfg(flags))
+    muontool = acc.popToolsAndMerge(MuonFatrasSelectorCfg(flags))
+    kwargs.setdefault("IDSimulationSelectors", [deftool])
+    kwargs.setdefault("CaloSimulationSelectors", [muontool])
+    kwargs.setdefault("MSSimulationSelectors", [deftool])
+    tool = acc.popToolsAndMerge(FatrasSimulatorToolSTCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
+
+
+def FatrasNewExtrapolationSimulatorToolCfg(flags, name="ISF_FatrasSNewExtrapolationimulatorTool", **kwargs):
+    acc = ComponentAccumulator()
+    deftool = acc.popToolsAndMerge(DefaultFatrasSelectorCfg(flags))
+    muontool = acc.popToolsAndMerge(MuonFatrasSelectorCfg(flags))
+    kwargs.setdefault("IDSimulationSelectors", [deftool])
+    kwargs.setdefault("CaloSimulationSelectors", [muontool])
+    kwargs.setdefault("MSSimulationSelectors", [deftool])
+    tool = acc.popToolsAndMerge(FatrasNewExtrapolationSimulatorToolSTCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return tool
+
+def FatrasPileupSimulatorToolCfg(flags, name="ISF_FatrasPileupSimulatorTool", **kwargs):
+    acc = ComponentAccumulator()
+    deftool = acc.popToolsAndMerge(DefaultFatrasSelectorCfg(flags))
+    muontool = acc.popToolsAndMerge(MuonFatrasSelectorCfg(flags))
+    kwargs.setdefault("IDSimulationSelectors", [deftool])
+    kwargs.setdefault("CaloSimulationSelectors", [muontool])
+    kwargs.setdefault("MSSimulationSelectors", [deftool])
+    tool = acc.popToolsAndMerge(FatrasPileupSimulatorToolSTCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return tool
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.cxx
index 96971e087ab78a3faca5b56f9a2b3d7b5c285222..b98cc9d2876aa22b3ad15ebbc5f018b39f40a0a7 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -20,16 +20,9 @@
 #include "G4PVPlacement.hh"
 #include "globals.hh"
 
-// G4 material : vacuum setup
-G4Material* G4DetectorConstruction::s_g4vacuum = new G4Material("Vacuum",1.,1.01*CLHEP::g/CLHEP::mole,
-                                                                     CLHEP::universe_mean_density,
-                                                                     kStateGas,0.1*CLHEP::kelvin, 1.e-19*CLHEP::pascal);
-
 G4DetectorConstruction::G4DetectorConstruction()
   :   m_worldLog(nullptr),
-      //m_detectorLog(nullptr),
       m_worldPhys(nullptr)
-      ///m_detectorPhys(nullptr),
 {}
 
 
@@ -44,8 +37,15 @@ void G4DetectorConstruction::dummyDetector()
   // (1) WORLD
   // create the world setup
   G4Box* worldBox = new G4Box("WorldBox",25000.,25000.,25000.);
-  m_worldLog      = m_worldLog ? new(m_worldLog) G4LogicalVolume(worldBox,s_g4vacuum,"WorldLogical", 0, 0, 0) :
-    new G4LogicalVolume(worldBox,s_g4vacuum,"WorldLogical", 0, 0, 0);
+  
+  // G4 material : vacuum setup
+  G4Material* g4vacuum = G4Material::GetMaterial("Vacuum",false);
+  if(!g4vacuum) g4vacuum = new G4Material("FatrasDummyVacuum",1.,1.01*CLHEP::g/CLHEP::mole,
+                                           CLHEP::universe_mean_density,
+                                           kStateGas,0.1*CLHEP::kelvin, 1.e-19*CLHEP::pascal);
+  
+  m_worldLog      = m_worldLog ? new(m_worldLog) G4LogicalVolume(worldBox,g4vacuum,"WorldLogical", 0, 0, 0) :
+    new G4LogicalVolume(worldBox,g4vacuum,"WorldLogical", 0, 0, 0);
   m_worldPhys     = m_worldPhys ? new(m_worldPhys) G4PVPlacement(0,G4ThreeVector(0.,0.,0),"WorldPhysical",m_worldLog,0,false,0) :
     new G4PVPlacement(0,materialPosition,"WorldPhysical",m_worldLog,0,false,0);
 
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h
index 885f2b3222a45631bf583305b46284daa8225ad3..90107de37e12aa43248f9130dde989d7fc8f5e33 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4DetectorConstruction.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -36,17 +36,10 @@ private:
   // Logical volumes
   //
   G4LogicalVolume*          m_worldLog;
-  //G4LogicalVolume*          m_detectorLog;
 
   // Physical volumes
   //
   G4VPhysicalVolume*        m_worldPhys;
-  //G4VPhysicalVolume*        m_detectorPhys;
-
-  // Vaccum material
-  //
-  static G4Material*        s_g4vacuum;
-
 };
 
 #endif
diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/CMakeLists.txt b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/CMakeLists.txt
index f8974a2b0b839ee879963e5ffb3c7f704f47dfd7..c59950c012e8dadb49f48ba814a7b06b937a3498 100644
--- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/CMakeLists.txt
+++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/CMakeLists.txt
@@ -38,5 +38,5 @@ atlas_add_test( GenParticleLifetimeFilter_test
                 LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} AtlasHepMCLib AthenaBaseComps TruthUtils ISF_HepMC_Interfaces )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py
index 34bbfc0de3245fe120bbf65b3c53956789aa1586..1b1bbf1f607732586501714eb5ae3ba81a82e718 100644
--- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py
+++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py
@@ -6,7 +6,6 @@ KG Tan, 17/06/2012
 """
 
 from AthenaCommon import CfgMgr
-from AthenaCommon.Constants import *  # FATAL,ERROR etc.
 from AthenaCommon.SystemOfUnits import MeV, mm
 
 #--------------------------------------------------------------------------------------------------
@@ -132,7 +131,7 @@ def getTruthStrategyGroupID_MC15(name="ISF_MCTruthStrategyGroupID_MC15", **kwarg
     kwargs.setdefault('VertexTypeRangeLow'  , 201)  # All kinds of decay processes
     kwargs.setdefault('VertexTypeRangeHigh' , 298)  # ...
     kwargs.setdefault('Regions', [1,2]) # Could import AtlasDetDescr::AtlasRegion enum as in TruthService CfgGetter methods here
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 
 def getTruthStrategyGroupID(name="ISF_MCTruthStrategyGroupID", **kwargs):
@@ -142,7 +141,7 @@ def getTruthStrategyGroupID(name="ISF_MCTruthStrategyGroupID", **kwargs):
     kwargs.setdefault('VertexTypeRangeLow'  , 201)  # All kinds of decay processes
     kwargs.setdefault('VertexTypeRangeHigh' , 298)  # ...
     kwargs.setdefault('Regions', [1,2])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 
 def getTruthStrategyGroupIDHadInt_MC15(name="ISF_MCTruthStrategyGroupIDHadInt_MC15", **kwargs):
@@ -151,7 +150,7 @@ def getTruthStrategyGroupIDHadInt_MC15(name="ISF_MCTruthStrategyGroupIDHadInt_MC
     kwargs.setdefault('VertexTypes'                       , [ 111, 121, 131, 141, 151, 161, 210 ])
     kwargs.setdefault('AllowChildrenOrParentPassKineticCuts' , True)
     kwargs.setdefault('Regions', [1])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 
 def getTruthStrategyGroupIDHadInt(name="ISF_MCTruthStrategyGroupIDHadInt", **kwargs):
@@ -160,7 +159,7 @@ def getTruthStrategyGroupIDHadInt(name="ISF_MCTruthStrategyGroupIDHadInt", **kwa
     kwargs.setdefault('VertexTypes'                       , [ 111, 121, 131, 141, 151, 161, 210 ])
     kwargs.setdefault('AllowChildrenOrParentPassKineticCuts' , True)
     kwargs.setdefault('Regions', [1])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 
 def getTruthStrategyGroupCaloMuBrem_MC15(name="ISF_MCTruthStrategyGroupCaloMuBrem_MC15", **kwargs):
@@ -169,7 +168,7 @@ def getTruthStrategyGroupCaloMuBrem_MC15(name="ISF_MCTruthStrategyGroupCaloMuBre
     kwargs.setdefault('VertexTypes'         , [ 3 ])
     kwargs.setdefault('ParentPDGCodes'      , [ 13, -13 ])
     kwargs.setdefault('Regions', [3])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 def getTruthStrategyGroupCaloMuBrem(name="ISF_MCTruthStrategyGroupCaloMuBrem", **kwargs):
     kwargs.setdefault('ParentMinEkin'       , 500.*MeV)
@@ -177,7 +176,7 @@ def getTruthStrategyGroupCaloMuBrem(name="ISF_MCTruthStrategyGroupCaloMuBrem", *
     kwargs.setdefault('VertexTypes'         , [ 3 ])
     kwargs.setdefault('ParentPDGCodes'      , [ 13, -13 ])
     kwargs.setdefault('Regions', [3])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 def getTruthStrategyGroupCaloDecay_MC15(name="ISF_MCTruthStrategyGroupCaloDecay_MC15", **kwargs):
     kwargs.setdefault('ParentMinEkin'       , 1000.*MeV)
@@ -186,7 +185,7 @@ def getTruthStrategyGroupCaloDecay_MC15(name="ISF_MCTruthStrategyGroupCaloDecay_
     kwargs.setdefault('VertexTypeRangeLow'  , 201)  # All kinds of decay processes
     kwargs.setdefault('VertexTypeRangeHigh' , 298)  # ...
     kwargs.setdefault('Regions', [3])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 def getTruthStrategyGroupCaloDecay(name="ISF_MCTruthStrategyGroupCaloDecay", **kwargs):
     kwargs.setdefault('ParentMinPt'         , 1000.*MeV)
@@ -195,12 +194,12 @@ def getTruthStrategyGroupCaloDecay(name="ISF_MCTruthStrategyGroupCaloDecay", **k
     kwargs.setdefault('VertexTypeRangeLow'  , 201)  # All kinds of decay processes
     kwargs.setdefault('VertexTypeRangeHigh' , 298)  # ...
     kwargs.setdefault('Regions', [3])
-    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__GenericTruthStrategy(name, **kwargs)
 
 def getValidationTruthStrategy(name="ISF_ValidationTruthStrategy", **kwargs):
     kwargs.setdefault('ParentMinP'          , 50.*MeV)
     kwargs.setdefault('Regions', [1,3])
-    return CfgMgr.ISF__ValidationTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__ValidationTruthStrategy(name, **kwargs)
 
 def getLLPTruthStrategy(name="ISF_LLPTruthStrategy", **kwargs):
     kwargs.setdefault('PassProcessCodeRangeLow',  200 )
@@ -209,7 +208,7 @@ def getLLPTruthStrategy(name="ISF_LLPTruthStrategy", **kwargs):
     #   http://www-geant4.kek.jp/lxr/source//processes/management/include/G4ProcessType.hh
     kwargs.setdefault('PassProcessCategory',      9   ) # ==
     kwargs.setdefault('Regions', [1,2,3,4])
-    return CfgMgr.ISF__LLPTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__LLPTruthStrategy(name, **kwargs)
 
 def getKeepLLPDecayChildrenStrategy(name="ISF_KeepLLPDecayChildrenStrategy", **kwargs):
     # ProcessCategory==9 corresponds to the 'fUserDefined' G4ProcessType:
@@ -218,12 +217,12 @@ def getKeepLLPDecayChildrenStrategy(name="ISF_KeepLLPDecayChildrenStrategy", **k
     kwargs.setdefault('VertexTypeRangeLow'  , 200) # All kinds of decay processes
     kwargs.setdefault('VertexTypeRangeHigh' , 299) # ...
     kwargs.setdefault('BSMParent'           , True)
-    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs)
 
 def getKeepLLPHadronicInteractionChildrenStrategy(name="ISF_KeepLLPHadronicInteractionChildrenStrategy", **kwargs):
     kwargs.setdefault('VertexTypes'          , [ 111, 121, 131, 141, 151, 161, 210 ])
     kwargs.setdefault('BSMParent'            , True)
-    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs)
 
 def getKeepAllDecayChildrenStrategy(name="ISF_KeepAllDecayChildrenStrategy", **kwargs):
     # ProcessCategory==9 corresponds to the 'fUserDefined' G4ProcessType:
@@ -231,8 +230,8 @@ def getKeepAllDecayChildrenStrategy(name="ISF_KeepAllDecayChildrenStrategy", **k
     kwargs.setdefault('PassProcessCategory' , 9  ) # ==
     kwargs.setdefault('VertexTypeRangeLow'  , 200) # All kinds of decay processes
     kwargs.setdefault('VertexTypeRangeHigh' , 299) # ...
-    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs)
 
 def getKeepHadronicInteractionChildrenStrategy(name="ISF_KeepHadronicInteractionChildrenStrategy", **kwargs):
     kwargs.setdefault('VertexTypes'          , [ 111, 121, 131, 141, 151, 161, 210 ])
-    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs);
+    return CfgMgr.ISF__KeepChildrenTruthStrategy(name, **kwargs)
diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py
index 554e8709079ae4dc6af1fb634d5356dedb5258f1..c95349dde3b0373fe5adc9192ff0165748adc13c 100644
--- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py
+++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py
@@ -7,9 +7,6 @@ from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaCommon.SystemOfUnits import MeV, mm
 from ISF_Services.ISF_ServicesCoreConfigNew import GeoIDSvcCfg
 
-#Functions yet to be migrated:
-#getParticlePositionFilterMS
-#getTruthStrategyGroupID, getTruthStrategyGroupIDHadInt, getTruthStrategyGroupCaloMuBrem_MC15, getTruthStrategyGroupCaloDecay, getValidationTruthStrategy, getLLPTruthStrategy
 
 # GenParticleFilters
 def ParticleFinalStateFilterCfg(ConfigFlags, name="ISF_ParticleFinalStateFilter", **kwargs):
diff --git a/Simulation/ISF/ISF_SimulationSelectors/CMakeLists.txt b/Simulation/ISF/ISF_SimulationSelectors/CMakeLists.txt
index c45118e877e807a7f3c8c74598fdf6d69aa81a02..9aea9edd2017c1d57320aa97605bbf4d3f2ccee1 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/CMakeLists.txt
+++ b/Simulation/ISF/ISF_SimulationSelectors/CMakeLists.txt
@@ -17,5 +17,5 @@ atlas_add_component( ISF_SimulationSelectors
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPPDT_LIBRARIES} AtlasHepMCLib GaudiKernel BarcodeServicesLib ISF_Event ISF_InterfacesLib ISF_TrackingInterfacesLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py
index ac7fb2086c9dca5953dc68ecb5b35450bb095c2a..f253c348e765ed0f8327ab9b5f3cf511a1e25971 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py
+++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py
@@ -6,8 +6,6 @@ Elmar Ritsch, 04/02/2013
 
 from AthenaCommon import CfgMgr
 
-from AthenaCommon.Constants import *  # FATAL,ERROR etc.
-from AthenaCommon.SystemOfUnits import *
 from ISF_SimulationSelectors import SimulationFlavor
 ### DefaultSimSelector configurations
 
diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py
index fde6340e3d45cb4c6cfd7d46ca7c1f6fc28c72a2..2901ef2bf103d99c6d6d1f55b4377fb3fa5feef3 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py
+++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py
@@ -10,7 +10,18 @@ from ISF_SimulationSelectors import SimulationFlavor
 from ISF_Services.ISF_ServicesConfigNew import ParticleKillerSvcCfg
 from ISF_Geant4Services.ISF_Geant4ServicesConfigNew import (
     Geant4SimCfg, AFIIGeant4SimCfg, LongLivedGeant4SimCfg, AFII_QS_Geant4SimCfg,
-    FullGeant4SimCfg, PassBackGeant4SimCfg
+    FullGeant4SimCfg, PassBackGeant4SimCfg,
+)
+from ISF_FastCaloSimServices.ISF_FastCaloSimServicesConfigNew import (
+    FastCaloSimSvcCfg, LegacyAFIIFastCaloSimSvcCfg,
+    FastCaloSimSvcV2Cfg, DNNCaloSimSvcCfg,
+    FastHitConvAlgFastCaloSimSvcCfg,
+    FastHitConvAlgLegacyAFIIFastCaloSimSvcCfg,
+    FastCaloSimPileupSvcCfg, FastCaloSimPileupOTSvcCfg,
+)
+from ISF_FatrasServices.ISF_FatrasServicesConfigNew import (
+    FatrasSimServiceIDCfg, FatrasNewExtrapolationSimServiceIDCfg,
+    FatrasPileupSimServiceIDCfg, 
 )
 
 
@@ -22,16 +33,19 @@ def DefaultSimSelectorCfg(flags, name="ISF_DefaultSimSelector", **kwargs):
 
 def DefaultParticleKillerSelectorCfg(flags, name="ISF_DefaultParticleKillerSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller)
-    acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def PileupParticleKillerSelectorCfg(flags, name="ISF_PileupParticleKillerSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
     kwargs.setdefault("PileupBCID", [1])
-    kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller)
     acc.setPrivateTools(CompFactory.ISF.KinematicPileupSimSelector(name, **kwargs))
     return acc
@@ -39,99 +53,151 @@ def PileupParticleKillerSelectorCfg(flags, name="ISF_PileupParticleKillerSelecto
 
 def DefaultGeant4SelectorCfg(flags, name="ISF_DefaultGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
-    acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def DefaultAFIIGeant4SelectorCfg(flags, name="ISF_DefaultAFIIGeant4Selector", **kwargs):
     acc = AFIIGeant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
-    acc.merge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
+    tool = acc.popToolsAndMerge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def DefaultLongLivedGeant4SelectorCfg(flags, name="ISF_DefaultLongLivedGeant4Selector", **kwargs):
     acc = LongLivedGeant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_LongLivedGeant4SimSvc"))
-    acc.merge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_LongLivedGeant4SimSvc"))
+    tool = acc.popToolsAndMerge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def DefaultAFII_QS_Geant4SelectorCfg(flags, name="ISF_DefaultAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
-    acc.merge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
+    tool = acc.popToolsAndMerge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def FullGeant4SelectorCfg(flags, name="ISF_FullGeant4Selector", **kwargs):
     acc = FullGeant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_FullGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FullGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
-    acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def PassBackGeant4SelectorCfg(flags, name="ISF_PassBackGeant4Selector", **kwargs):
     acc = PassBackGeant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_PassBackGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_PassBackGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
-    acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def DefaultFastCaloSimSelectorCfg(flags, name="ISF_DefaultFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FastCaloSimSvc") # TODO
+    acc = FastCaloSimSvcCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def DefaultLegacyAFIIFastCaloSimSelectorCfg(flags, name="ISF_DefaultLegacyAFIIFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_LegacyAFIIFastCaloSimSvc") # TODO
+    acc = LegacyAFIIFastCaloSimSvcCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_LegacyAFIIFastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def DefaultFastCaloSimV2SelectorCfg(flags, name="ISF_DefaultFastCaloSimV2Selector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FastCaloSimSvcV2") # TODO
+    acc = FastCaloSimSvcV2Cfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvcV2"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimV2)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def DefaultDNNCaloSimSelectorCfg(flags, name="ISF_DefaultDNNCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_DNNCaloSimSvc") # TODO
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    acc = DNNCaloSimSvcCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_DNNCaloSimSvc"))
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def FastHitConvAlgFastCaloSimSelectorCfg(flags, name="ISF_FastHitConvAlgFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FastHitConvAlgFastCaloSimSvc") # TODO
+    acc = ComponentAccumulator()
+    acc.merge(FastHitConvAlgFastCaloSimSvcCfg(flags))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastHitConvAlgFastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
+
 
 def FastHitConvAlgLegacyAFIIFastCaloSimSelectorCfg(flags, name="ISF_FastHitConvAlgLegacyAFIIFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FastHitConvAlgLegacyAFIIFastCaloSimSvc") # TODO
+    acc = ComponentAccumulator()
+    acc.merge(FastHitConvAlgLegacyAFIIFastCaloSimSvcCfg(flags))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastHitConvAlgLegacyAFIIFastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def DefaultFatrasSelectorCfg(flags, name="ISF_DefaultFatrasSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FatrasSimSvc") # TODO
+    acc = FatrasSimServiceIDCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def DefaultFatrasNewExtrapolationSelectorCfg(flags, name="ISF_DefaultFatrasNewExtrapolationSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FatrasNewExtrapolationSimSvc") # TODO
+    acc = ComponentAccumulator()
+    acc.merge(FatrasNewExtrapolationSimServiceIDCfg(flags))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasNewExtrapolationSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def DefaultParametricSimulationSelectorCfg(flags, name="ISF_DefaultParametricSimulationSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_ParametricSimSvc") # TODO
+    acc = ComponentAccumulator()
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", "ISF_ParametricSimSvc") # TODO
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Parametric)
-    return DefaultSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(DefaultSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 # PileUpSimSelector Configurations
@@ -142,38 +208,50 @@ def PileupSimSelectorCfg(flags, name="ISF_PileupSimSelector", **kwargs):
 
 
 def FatrasPileupSelectorCfg(flags, name="ISF_FatrasPileupSelector", **kwargs):
+    acc = ComponentAccumulator()
+    acc.merge(FatrasPileupSimServiceIDCfg(flags))
     kwargs.setdefault("PileupBCID", [1])
-    kwargs.setdefault("Simulator", "ISF_FatrasPileupSimSvc") # TODO
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasPileupSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FatrasPileup)
-    return PileupSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
-def FatrasPileupSelector_noHits(flags, name="ISF_FatrasPileupSelector_noHits", **kwargs):
-    kwargs.setdefault("PileupBCID", [2])
-    kwargs.setdefault("Simulator", "ISF_FatrasPileupSimSvc_noHits") # TODO
-    kwargs.setdefault("SimulationFlavor", SimulationFlavor.FatrasPileup)
-    return PileupSimSelectorCfg(flags, name, **kwargs)
+# FatrasPileupSelector_noHits not migrated
+# due to missing getter for Simulator "ISF_FatrasPileupSimSvc_noHits"
 
 
 def FastCaloSimPileupSelectorCfg(flags, name="ISF_FastCaloSimPileupSelector", **kwargs):
+    acc = FastCaloSimPileupSvcCfg(flags)
     kwargs.setdefault("PileupBCID"  , flags.Sim.FastChain.BCID)
-    kwargs.setdefault("Simulator", "ISF_FastCaloSimPileupSvc") # TODO
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimPileupSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimPileup)
-    return PileupSimSelectorCfg(flags, name, **kwargs)
+    acc.merge(PileupSimSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def FastCaloSimPileupOTSelectorCfg(flags, name="ISF_FastCaloSimPileupOTSelector", **kwargs):
+    acc = FastCaloSimPileupOTSvcCfg(flags)
     kwargs.setdefault("PileupBCID", flags.Sim.FastChain.BCID)
-    kwargs.setdefault("Simulator", "ISF_FastCaloSimPileupOTSvc") # TODO
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimPileupOTSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimPileup)
-    return PileupSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 # KinematicSimSelector Configurations
 def ElectronGeant4SelectorCfg(flags, name="ISF_ElectronGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("ParticlePDG", 11)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -182,7 +260,8 @@ def ElectronGeant4SelectorCfg(flags, name="ISF_ElectronGeant4Selector", **kwargs
 def NeutralGeant4SelectorCfg(flags, name="ISF_NeutralGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("Charge", 0)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -192,7 +271,8 @@ def ProtonAFIIGeant4SelectorCfg(flags, name="ISF_ProtonAFIIGeant4Selector", **kw
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 750)
     kwargs.setdefault("ParticlePDG", 2212)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -200,7 +280,8 @@ def ProtonAFIIGeant4SelectorCfg(flags, name="ISF_ProtonAFIIGeant4Selector", **kw
 
 def ProtonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ProtonAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(ProtonAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
 
@@ -209,7 +290,8 @@ def PionAFIIGeant4SelectorCfg(flags, name="ISF_PionAFIIGeant4Selector", **kwargs
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 200)
     kwargs.setdefault("ParticlePDG", 211)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -217,7 +299,8 @@ def PionAFIIGeant4SelectorCfg(flags, name="ISF_PionAFIIGeant4Selector", **kwargs
 
 def PionAFII_QS_Geant4SelectorCfg(flags, name="ISF_PionAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(PionAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
 
@@ -226,7 +309,8 @@ def ChargedKaonAFIIGeant4SelectorCfg(flags, name="ISF_ChargedKaonAFIIGeant4Selec
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 750)
     kwargs.setdefault("ParticlePDG", 321)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -234,7 +318,8 @@ def ChargedKaonAFIIGeant4SelectorCfg(flags, name="ISF_ChargedKaonAFIIGeant4Selec
 
 def ChargedKaonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ChargedKaonAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(ChargedKaonAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
 
@@ -243,7 +328,8 @@ def KLongAFIIGeant4SelectorCfg(flags, name="ISF_KLongAFIIGeant4Selector", **kwar
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 750)
     kwargs.setdefault("ParticlePDG", 130)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -251,7 +337,8 @@ def KLongAFIIGeant4SelectorCfg(flags, name="ISF_KLongAFIIGeant4Selector", **kwar
 
 def KLongAFII_QS_Geant4SelectorCfg(flags, name="ISF_KLongAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(KLongAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
 
@@ -262,46 +349,63 @@ def MuonSelectorCfg(flags, name="ISF_MuonSelector", **kwargs):
     acc.setPrivateTools(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
 
+
 def MuonGeant4SelectorCfg(flags, name="ISF_MuonGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
-    acc.merge(MuonSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(MuonSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def MuonAFIIGeant4SelectorCfg(flags, name="ISF_MuonAFIIGeant4Selector", **kwargs):
     acc = AFIIGeant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
-    acc.merge(MuonGeant4SelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(MuonGeant4SelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def MuonAFII_QS_Geant4SelectorCfg(flags, name="ISF_MuonAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
-    acc.merge(MuonGeant4SelectorCfg(flags, name, **kwargs))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
+    tool = acc.popToolsAndMerge(MuonGeant4SelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def MuonFatrasSelectorCfg(flags, name="ISF_MuonFatrasSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FatrasSimSvc") # TODO
+    acc = FatrasSimServiceIDCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
-    return MuonSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(MuonSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def MuonFatrasPileupSelectorCfg(flags, name="ISF_MuonFatrasPileupSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FatrasPileupSimSvc") # TODO
+    acc = ComponentAccumulator()
+    acc.merge(FatrasPileupSimServiceIDCfg(flags))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasPileupSimSvc"))
     kwargs.setdefault("PileupBCID", [1])
     kwargs.setdefault("ParticlePDG", 13)
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
-    return PileupSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(PileupSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def WithinEta5FastCaloSimSelectorCfg(flags, name="ISF_WithinEta5FastCaloSimSelector", **kwargs):
-    acc = ComponentAccumulator()
-    kwargs.setdefault("Simulator", "ISF_FastCaloSimSvc") # TODO
+    acc = FastCaloSimSvcCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvc"))
     kwargs.setdefault("MinPosEta", -5.0)
     kwargs.setdefault("MaxPosEta",  5.0)
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
@@ -311,7 +415,8 @@ def WithinEta5FastCaloSimSelectorCfg(flags, name="ISF_WithinEta5FastCaloSimSelec
 
 def EtaGreater5ParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("MinPosEta", -5.0)
     kwargs.setdefault("MaxPosEta",  5.0)
     kwargs.setdefault("InvertCuts", True)
@@ -322,7 +427,8 @@ def EtaGreater5ParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5Particle
 
 def EtaGreater5PileupParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5PileupParticleKillerSimSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("MinPosEta", -5.0)
     kwargs.setdefault("MaxPosEta",  5.0)
     kwargs.setdefault("InvertCuts", True)
@@ -343,14 +449,19 @@ def PhotonConeSelectorCfg(flags, name="ISF_PhotonConeSelector", **kwargs):
 
 
 def PhotonConeFatrasSelectorCfg(flags, name="ISF_PhotonConeFatrasSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FatrasSimSvc") # TODO
+    acc = FatrasSimServiceIDCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
-    return PhotonConeSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(PhotonConeSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def PhotonConeGeant4SelectorCfg(flags, name="ISF_PhotonConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(PhotonConeSelectorCfg(flags, name, **kwargs))
     return acc
@@ -372,7 +483,8 @@ def HiggsLeptonsConeSimSelectorCfg(flags, name="ISF_HiggsLeptonsConeSimSelector"
 
 def HiggsLeptonsConeGeant4SelectorCfg(flags, name="ISF_HiggsLeptonsConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(HiggsLeptonsConeSimSelectorCfg(flags, name, **kwargs))
     return acc
@@ -393,7 +505,8 @@ def HiggsLeptonsConeGeant4CaloSelectorCfg(flags, name="ISF_HiggsLeptonsConeGeant
 
 def WLeptonsConeGeant4SelectorCfg(flags, name="ISF_WLeptonsConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     kwargs.setdefault("ConeCreatorMinPt", 0.)
     kwargs.setdefault("ConeSize", 0.4)
@@ -410,7 +523,8 @@ def ZLeptonsDirectionConeGeant4SelectorCfg(flags, name="ISF_ZLeptonsDirectionCon
     # this selector picks all particles with a mometum direction
     # within DeltaR<ConeSize relative to the Z decay lepton directions
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     kwargs.setdefault("ConeCreatorMinPt", 0.)
     kwargs.setdefault("ConeSize", 0.4)
@@ -432,7 +546,8 @@ def ZLeptonsPositionConeGeant4SelectorCfg(flags, name="ISF_ZLeptonsPositionConeG
 
 def JPsiLeptonsConeGeant4SelectorCfg(flags, name="ISF_JPsiLeptonsConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     kwargs.setdefault("ConeCreatorMinPt", 0.)
     kwargs.setdefault("ConeSize", 0.4)
@@ -463,16 +578,22 @@ def BHadronProductsSimSelectorCfg(flags, name="ISF_BHadronProductsSimSelector",
 
 def BHadronProductsGeant4SelectorCfg(flags, name="ISF_BHadronProductsGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
-    acc.merge(BHadronProductsSimSelectorCfg(flags, name, **kwargs))
+    tool = acc.popToolsAndMerge(BHadronProductsSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
     return acc
 
 
 def BHadronProductsFatrasSelectorCfg(flags, name="ISF_BHadronProductsFatrasSelector", **kwargs):
-    kwargs.setdefault("Simulator", "ISF_FatrasSimSvc") # TODO
+    acc = FatrasSimServiceIDCfg(flags)
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
-    return BHadronProductsSimSelectorCfg(flags, name, **kwargs)
+    tool = acc.popToolsAndMerge(BHadronProductsSimSelectorCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
 
 
 def TauProductsSimSelectorCfg(flags, name="ISF_TauProductsSimSelector", **kwargs):
@@ -487,7 +608,8 @@ def TauProductsSimSelectorCfg(flags, name="ISF_TauProductsSimSelector", **kwargs
 
 def TauProductsGeant4SelectorCfg(flags, name="ISF_TauProductsGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(TauProductsSimSelectorCfg(flags, name, **kwargs))
     return acc
@@ -505,7 +627,8 @@ def ZProductsSimSelectorCfg(flags, name="ISF_ZProductsSimSelector", **kwargs):
 
 def ZProductsGeant4SelectorCfg(flags, name="ISF_ZProductsGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(ZProductsSimSelectorCfg(flags, name, **kwargs))
     return acc
@@ -514,10 +637,10 @@ def ZProductsGeant4SelectorCfg(flags, name="ISF_ZProductsGeant4Selector", **kwar
 # HistorySimSelector Configurations
 def SubDetStickyGeant4SimSelectorCfg(flags, name="ISF_SubDetStickyGeant4SimSelector", **kwargs):
     acc = Geant4SimCfg(flags)
-    kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("RequiresUnchangedGeoID", True)
-    kwargs.setdefault("Simulator", "ISF_Geant4SimSvc")
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc"))
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.HistorySimSelector(name, **kwargs))
     return acc
@@ -527,7 +650,8 @@ def GlobalStickyGeant4SimSelectorCfg(flags, name="ISF_GlobalStickyGeant4SimSelec
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("RequiresUnchangedGeoID", False)
-    kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
+    if flags.Concurrency.NumThreads == 0:
+        kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.setPrivateTools(CompFactory.ISF.HistorySimSelector(name, **kwargs))
     return acc
diff --git a/Simulation/ISF/ISF_Validation/test/test_MC16_G4FastCalo_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_MC16_G4FastCalo_ttbar.sh
index 7a1d99faab235dd09e3dbde0bc2c7a7fd05b0f7a..b4787ba82e94c9a81abf2b9f3c2c4f1bc8934d0a 100755
--- a/Simulation/ISF/ISF_Validation/test/test_MC16_G4FastCalo_ttbar.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_MC16_G4FastCalo_ttbar.sh
@@ -18,7 +18,7 @@ Sim_tf.py \
 --simulator 'G4FastCalo' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
---preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' 'from ISF_FastCaloSimServices.ISF_FastCaloSimJobProperties import ISF_FastCaloSimFlags;ISF_FastCaloSimFlags.ParamsInputFilename="/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/FastCaloSim/MC16/TFCSparam_v012.root"'\
+--preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' 'from ISF_FastCaloSimServices.ISF_FastCaloSimJobProperties import ISF_FastCaloSimFlags;ISF_FastCaloSimFlags.ParamsInputFilename="/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/FastCaloSim/MC16/TFCSparam_v012.root"' \
 --DataRunNumber '284500' \
 --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
 --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.evgen.EVNT.e4993.EVNT.08166201._000012.pool.root.1" \
diff --git a/Simulation/Overlay/OverlayConfiguration/CMakeLists.txt b/Simulation/Overlay/OverlayConfiguration/CMakeLists.txt
index 6c078af2f3c9100415f81e767d0ee50796035425..a25bc02f5935753b7383d9e7e4ed375318c53c6d 100644
--- a/Simulation/Overlay/OverlayConfiguration/CMakeLists.txt
+++ b/Simulation/Overlay/OverlayConfiguration/CMakeLists.txt
@@ -5,11 +5,12 @@
 # Declare the package name:
 atlas_subdir( OverlayConfiguration )
 
-# External dependencies:
-
 # Install files from the package:
+atlas_install_joboptions( share/*.py
+                          POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_python_modules( python/*.py
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_runtime( scripts/*.py )
 atlas_install_runtime( test/OverlayTest.py )
 
 # Setup and run tests
@@ -22,3 +23,8 @@ atlas_add_test( OverlayTest_data
                 SCRIPT test/OverlayTest.py -d
                 PROPERTIES TIMEOUT 900
                 POST_EXEC_SCRIPT nopost.sh )
+
+atlas_add_test( OverlayMetadataConfig_test
+                SCRIPT test/OverlayMetadataConfig_test.py
+                PROPERTIES TIMEOUT 300
+                POST_EXEC_SCRIPT nopost.sh )
diff --git a/Simulation/Overlay/OverlayConfiguration/python/OverlayMetadata.py b/Simulation/Overlay/OverlayConfiguration/python/OverlayMetadata.py
new file mode 100644
index 0000000000000000000000000000000000000000..9244b5c2418fea0563a64a60ee66901c686be84f
--- /dev/null
+++ b/Simulation/Overlay/OverlayConfiguration/python/OverlayMetadata.py
@@ -0,0 +1,206 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+import re
+
+from AthenaCommon.Logging import logging
+from PyUtils.MetaReader import read_metadata
+
+logger = logging.getLogger("OverlayMetadataConfig")
+
+# Module level cache of file-metadata:
+_fileMetadata = dict()
+
+def _getFileMD(filenames):
+    if type(filenames) == list:
+        filename = filenames[0]
+    else:
+        filename = filenames
+
+    if filename not in _fileMetadata:
+        logger.info("Obtaining full metadata of %s", filename)
+
+        thisFileMD = read_metadata(filename, None, 'full')
+        _fileMetadata.update(thisFileMD)
+
+    return _fileMetadata[filename]
+
+
+def signalMetadataCheck(flags, simDict, tagInfoDict):
+    """Check the metadata for signal HITS file"""
+    logger.info("Checking Overlay configuration against Signal Simulation metadata...")
+
+    simKeys = simDict.keys()
+    tagInfoKeys = tagInfoDict.keys()
+
+    # Check the PhysicsList set agrees with that used in the simulation
+    if "PhysicsList" in simKeys:
+        if re.match(simDict["PhysicsList"], flags.Sim.PhysicsList):
+            logger.debug("Overlay configuration matches Signal Simulation metadata. [Sim.PhysicsList = %s]", flags.Sim.PhysicsList)
+        else:
+            flags.Sim.PhysicsList = simDict["PhysicsList"]
+            logger.warning("Overlay Sim.PhysicsList does not match the PhysicsList used in the Signal Simulation step! Assume the value from the Signal Simulation step is correct!")
+            logger.warning("Set Sim.PhysicsList = %s", flags.Sim.PhysicsList)
+    else:
+        logger.error("'PhysicsList' key not found in Signal Simulation metadata!")
+        raise AssertionError("Signal Simulation metadata key not found")
+
+    # Check the DetDescrVersion set agrees with that used in the simulation
+    if "SimLayout" in simKeys:
+        if re.match(simDict["SimLayout"], flags.GeoModel.AtlasVersion):
+            logger.debug("Overlay configuration matches Signal Simulation metadata. [Geomodel.AtlasVersion = %s]",
+                         flags.GeoModel.AtlasVersion)
+        else:
+            flags.GeoModel.AtlasVersion = simDict["SimLayout"]
+            logger.warning("Overlay Geomodel.AtlasVersion does not match the value used in the Signal Simulation step! Assume the value from the Signal Simulation step is correct!")
+            logger.warning("Set Geomodel.AtlasVersion = %s", flags.GeoModel.AtlasVersion)
+    else:
+        logger.error("'SimLayout' key not found in Signal Simulation metadata!")
+        raise AssertionError("Signal Simulation metadata key not found")
+
+    # Check the Conditions Tag set against that used in the simulation
+    if "IOVDbGlobalTag" in tagInfoKeys:
+        if not re.match(tagInfoDict["IOVDbGlobalTag"], flags.IOVDb.GlobalTag):
+            logger.debug("Overlay configuration: [IOVDb.GlobalTag = %s], Signal Simulation metadata: [IOVDb.GlobalTag = %s]",
+                         flags.IOVDb.GlobalTag, tagInfoDict['IOVDbGlobalTag'])
+    else:
+        logger.error("'IOVDbGlobalTag' key not found in Signal Simulation metadata!")
+        raise AssertionError("Signal Simulation metadata key not found")
+
+    # Set the TRTRangeCut digitizationFlag based on what was used during the simulation.
+    if "TRTRangeCut" in simKeys:
+        if not re.match(simDict["TRTRangeCut"], str(flags.Digitization.TRTRangeCut)):
+            flags.Digitization.TRTRangeCut = simDict["TRTRangeCut"]
+            logger.warning("Overlay Digitization.TRTRangeCut does not match the value used in the Signal Simulation step! Assume the value from the Signal Simulation step is correct!")
+            logger.warning("Set Digitization.TRTRangeCut = %s", flags.Digitization.TRTRangeCut)
+    else:
+        logger.warning("'TRTRangeCut' key not found in Signal Simulation metadata!")
+
+    # Check which sub-detectors were simulated
+    # TODO: needed?
+
+    logger.info("Completed checks of Overlay configuration against Signal Simulation metadata.")
+
+
+def simulationMetadataCheck(sigdict, pudict):
+    """Check the simulation metadata for pre-mixed pileup RDO file"""
+    sigkeys = sigdict.keys()
+    pukeys = pudict.keys()
+
+    # Loop over metadata keys which must have matching values
+    warningKeys = ['G4Version']
+    sigKeysToCheck = ['PhysicsList', 'SimLayout', 'MagneticField', 'hitFileMagicNumber'] + warningKeys
+    for o in sigKeysToCheck:
+        try:
+            assert o in pukeys
+        except AssertionError:
+            logger.error("%s key missing from Pre-mixed pile-up Simulation metadata!", o)
+            raise AssertionError("Pre-mixed pile-up Simulation metadata key not found")
+        try:
+            assert o in sigkeys
+        except AssertionError:
+            logger.error("%s key missing from Signal Simulation metadata!", o)
+            raise AssertionError("Signal Simulation metadata key not found")
+        try:
+            if not isinstance(pudict[o], type(sigdict[o])):
+                assert re.match(str(pudict[o]), str(sigdict[o]))
+            else:
+                if isinstance(pudict[o], str):
+                    assert re.match(pudict[o], sigdict[o])
+                elif isinstance(pudict[o], int):
+                    assert (pudict[o] == sigdict[o])
+                else:
+                    assert re.match(str(pudict[o]), str(sigdict[o]))
+        except AssertionError:
+            if o in warningKeys:
+                logger.warning("Simulation metadata mismatch! Pre-mixed pile-up: [%s = %s] Signal: [%s = %s]", o, pudict[o], o, sigdict[o])
+            else:
+                logger.error("Simulation metadata mismatch! Pre-mixed pile-up: [%s = %s] Signal: [%s = %s]", o, pudict[o], o, sigdict[o])
+                raise AssertionError("Simulation metadata mismatch")
+
+
+def tagInfoMetadataCheck(sigdict, pudict):
+    """Check the tag info metadata for pre-mixed pileup RDO File"""
+    sigkeys = sigdict.keys()
+    pukeys = pudict.keys()
+
+    logger.debug("Signal /TagInfo ", sigdict)
+    logger.debug("Pileup /TagInfo ", pudict)
+
+    sigOnlyDict = dict()
+    sigOnlyKeySet = set(sigkeys).difference(set(pukeys))
+    logger.debug("The following keys only appear in Signal /TagInfo metadata:")
+    logger.debug(sigOnlyKeySet)
+    for key in sigOnlyKeySet:
+        sigOnlyDict[key] = sigdict[key]
+        logger.debug("  key: ", key, "value: ", sigdict[key])
+        pass
+    # TODO: extra
+    keysToCompareSet = set(sigkeys).intersection(set(pukeys))
+    logger.debug("The following keys appear in Signal and Pre-mixed pile-up /TagInfo metadata:")
+    logger.debug(keysToCompareSet)
+    
+    # Loop over metadata keys which must have matching values
+    warningKeys = ['IOVDbGlobalTag']
+    sigKeysToCheck = warningKeys
+    for o in sigKeysToCheck:
+        try:
+            assert o in pukeys
+        except AssertionError:
+            logger.error("%s key missing from Pre-mixed pile-up Simulation metadata!", o)
+            raise AssertionError("Pre-mixed pile-up Simulation metadata key not found")
+        try:
+            assert o in sigkeys
+        except AssertionError:
+            logger.error("%s key missing from Signal Simulation metadata!", o)
+            raise AssertionError("Signal Simulation metadata key not found")
+        try:
+            if not isinstance(pudict[o], type(sigdict[o])):
+                assert re.match(str(pudict[o]), str(sigdict[o]))
+            else:
+                if isinstance(pudict[o], str):
+                    assert re.match(pudict[o], sigdict[o])
+                elif isinstance(pudict[o], int):
+                    assert (pudict[o] == sigdict[o])
+                else:
+                    assert re.match(str(pudict[o]), str(sigdict[o]))
+        except AssertionError:
+            if o in warningKeys:
+                logger.warning("Simulation metadata mismatch! Pre-mixed pile-up: [%s = %s] Signal: [%s = %s]", o, pudict[o], o, sigdict[o])
+            else:
+                logger.error("Simulation metadata mismatch! Pre-mixed pile-up: [%s = %s] Signal: [%s = %s]", o, pudict[o], o, sigdict[o])
+                raise AssertionError("Simulation metadata mismatch")
+
+
+def overlayMetadataCheck(flags):
+    """Check overlay metadata"""
+    if flags.Overlay.DataOverlay:
+        files = flags.Input.Files
+        filesPileup = flags.Input.SecondaryFiles
+    else:
+        files = flags.Input.SecondaryFiles
+        filesPileup = flags.Input.Files
+
+    signalMetadata = _getFileMD(files)
+    signalSimulationMetadata = signalMetadata["/Simulation/Parameters"]
+    signalTagInfoMetadata = signalMetadata["/TagInfo"]
+
+    # signal check
+    signalMetadataCheck(flags, signalSimulationMetadata, signalTagInfoMetadata)
+
+    # pile-up check
+    if not flags.Overlay.DataOverlay:
+        pileupMetaDataCheck = _getFileMD(filesPileup)
+        pileupSimulationMetadata = pileupMetaDataCheck["/Simulation/Parameters"]
+        pileupTagInfoMetadata = pileupMetaDataCheck["/TagInfo"]
+    
+        logger.info("Checking Pre-mixed pile-up metadata against Signal Simulation metadata...")
+        simulationMetadataCheck(signalSimulationMetadata, pileupSimulationMetadata)
+        tagInfoMetadataCheck(signalTagInfoMetadata, pileupTagInfoMetadata)
+        logger.info("Completed all checks against Pre-mixed pile-up Simulation metadata.")
+
+
+def overlayMetadataWrite(flags):
+    """Write overlay metadata"""
+    from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg
+    acc = IOVDbSvcCfg(flags)
+    return acc
diff --git a/Simulation/Overlay/OverlayConfiguration/python/OverlayTransformHelpers.py b/Simulation/Overlay/OverlayConfiguration/python/OverlayTransformHelpers.py
new file mode 100644
index 0000000000000000000000000000000000000000..a0cbaa1dd8b956ac2641c07a5409d3106f326141
--- /dev/null
+++ b/Simulation/Overlay/OverlayConfiguration/python/OverlayTransformHelpers.py
@@ -0,0 +1,72 @@
+"""Main overlay transform configuration helpers
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+
+from PyJobTransforms.trfArgClasses import argBSFile, argFactory, argRDOFile, argSubstep
+from PyJobTransforms.trfExe import athenaExecutor
+
+
+def addOverlayTrfArgs(parser):
+    """Add common overlay command-line parser arguments."""
+    parser.defineArgGroup('Overlay', 'Common Overlay Options')
+    parser.add_argument('--outputRDO_SGNLFile', nargs='+',
+                        type=argFactory(argRDOFile, io='output'),
+                        help='The output RDO file of the MC signal alone',
+                        group='Overlay')
+
+
+def addDataOverlayTrfArgs(parser):
+    """Add data overlay command-line parser arguments."""
+    parser.defineArgGroup('DataOverlay', 'Data Overlay Options')
+    parser.add_argument('--inputBS_SKIMFile', nargs='+',
+                        type=argFactory(argBSFile, io='input'),
+                        help='Input skimmed RAW BS for pileup overlay',
+                        group='DataOverlay')
+    parser.add_argument('--fSampltag',
+                        type=argFactory(argSubstep, defaultSubstep='overlay'),
+                        help='The cool tag for /LAR/ElecCalib/fSampl/Symmetry, see https://twiki.cern.ch/twiki/bin/viewauth/Atlas/LArCalibMCPoolCool',
+                        group='DataOverlay')
+
+
+def addMCOverlayTrfArgs(parser):
+    """Add MC overlay command-line parser arguments."""
+    parser.defineArgGroup('MCOverlay', 'MC Overlay Options')
+    parser.add_argument('--inputRDO_BKGFile', nargs='+',
+                        type=argFactory(argRDOFile, io='input'),
+                        help='Input background RDO for MC+MC overlay',
+                        group='MCOverlay')
+
+
+def addOverlayArguments(parser):
+    """Add all overlay command-line parser arguments."""
+    # TODO: are forward detectors really needed?
+    from SimuJobTransforms.simTrfArgs import addBasicDigiArgs  # , addForwardDetTrfArgs
+    addBasicDigiArgs(parser)
+    # addForwardDetTrfArgs(parser)
+    addOverlayTrfArgs(parser)
+    addMCOverlayTrfArgs(parser)
+    addDataOverlayTrfArgs(parser)
+
+
+def addOverlaySubstep(executor_set, in_reco_chain=False):
+    executor = athenaExecutor(name='Overlay',
+                              skeletonFile='OverlayConfiguration/skeleton_LegacyOverlay.py',
+                              substep='overlay',
+                              tryDropAndReload=False,
+                              perfMonFile='ntuple.pmon.gz',
+                              inData=['RDO_BKG', 'BS_SKIM', 'HITS'],
+                              outData=['RDO', 'RDO_SGNL'])
+
+    if in_reco_chain:
+        executor.inData = []
+        executor.outData = []
+
+    executor_set.add(executor)
+
+
+def appendOverlaySubstep(trf, in_reco_chain=False):
+    """Add overlay transform substep."""
+    executor = set()
+    addOverlaySubstep(executor, in_reco_chain)
+    trf.appendToExecutorSet(executor)
diff --git a/Simulation/Overlay/OverlayConfiguration/scripts/Overlay_tf.py b/Simulation/Overlay/OverlayConfiguration/scripts/Overlay_tf.py
new file mode 100755
index 0000000000000000000000000000000000000000..6723fc838a045fdde52d251f15698767296ffb01
--- /dev/null
+++ b/Simulation/Overlay/OverlayConfiguration/scripts/Overlay_tf.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+"""
+Run overlay between either pre-mixed MC background RDO or zero-bias data RDO and hard scatter HITS
+"""
+
+import sys
+import time
+
+from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
+from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments, addTriggerArguments
+from PyJobTransforms.transform import transform
+
+# Setup core logging here
+from PyJobTransforms.trfLogger import msg
+msg.info('logging set in %s', sys.argv[0])
+
+
+# Prodsys hack...
+ListOfDefaultPositionalKeys = ['--AMIConfig', '--AMITag', '--AddCaloDigi', '--CA', '--DBRelease', '--PileUpPremixing', '--argJSON', '--asetup', '--athena', '--athenaMPEventsBeforeFork', '--athenaMPMergeTargetSize', '--athenaMPStrategy', '--athenaMPUseEventOrders', '--athenaopts', '--attempt', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--digiRndmSvc', '--digiSeedOffset1', '--digiSeedOffset2', '--digiSteeringConf', '--doAllNoise', '--dumpJSON', '--dumpPickle', '--env', '--eventAcceptanceEfficiency', '--eventService', '--execOnly', '--fSampltag', '--fileValidation', '--geometryVersion', '--ignoreErrors', '--ignoreFiles',
+                               '--ignorePatterns', '--imf', '--inputBS_SKIMFile', '--inputFileValidation', '--inputHITSFile', '--inputRDO_BKGFile', '--jobid', '--maxEvents', '--multiprocess', '--multithreaded', '--outputFileValidation', '--outputRDOFile', '--outputRDO_FILTFile', '--outputRDO_SGNLFile', '--parallelFileValidation', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--reportType', '--runNumber', '--samplingFractionDbTag', '--sharedWriter', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--steering', '--taskid', '--tcmalloc', '--triggerConfig', '--valgrind', '--valgrindDefaultOpts', '--valgrindExtraOpts']
+
+
+@stdTrfExceptionHandler
+@sigUsrStackTrace
+def main():
+    msg.info('This is %s', sys.argv[0])
+
+    trf = getTransform()
+    trf.parseCmdLineArgs(sys.argv[1:])
+    trf.execute()
+    trf.generateReport()
+
+    msg.info('%s stopped at %s, trf exit code %d',
+             sys.argv[0], time.asctime(), trf.exitCode)
+    sys.exit(trf.exitCode)
+
+
+def getTransform():
+    executor_set = set()
+    from OverlayConfiguration.OverlayTransformHelpers import addOverlayArguments, addOverlaySubstep
+    addOverlaySubstep(executor_set)
+    trf = transform(executor=executor_set,
+                    description='ATLAS Overlay transform. Inputs must be HITS. Outputs must be RDO.')
+    addAthenaArguments(trf.parser)
+    addDetectorArguments(trf.parser)
+    addTriggerArguments(trf.parser, addTrigFilter=False)
+    addOverlayArguments(trf.parser)
+    return trf
+
+
+if __name__ == '__main__':
+    main()
diff --git a/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py b/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py
new file mode 100644
index 0000000000000000000000000000000000000000..39a6f8798a1053050875b7c53efd0f3c54a354d9
--- /dev/null
+++ b/Simulation/Overlay/OverlayConfiguration/share/skeleton_LegacyOverlay.py
@@ -0,0 +1,287 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+# -------------------------------------
+# Common data and MC overlay skeleton
+# -------------------------------------
+# flake8 hack
+overlayArgs = runArgs  # noqa F821
+
+from AthenaCommon.Logging import logging
+logOverlay = logging.getLogger('Overlay')
+logOverlay.info('****************** STARTING OVERLAY *****************')
+
+logOverlay.info('**** Transformation run arguments')
+logOverlay.info(str(overlayArgs))
+
+# PerfMon
+from PerfMonComps.PerfMonFlags import jobproperties as pm
+pm.PerfMonFlags.doMonitoring = True  # to enable monitoring
+pm.PerfMonFlags.doFastMon = True     # to only enable a lightweight monitoring
+
+# Pre-exec
+if hasattr(overlayArgs, 'preExec') and overlayArgs.preExec != 'NONE':
+    for cmd in overlayArgs.preExec:
+        exec(cmd)
+
+# Pre-include
+if hasattr(overlayArgs, 'preInclude'):
+    for cf in overlayArgs.preInclude:
+        include(cf)  # noqa F821
+
+# ----------------------------
+# Set flags from job options
+# ----------------------------
+from AthenaCommon.GlobalFlags import globalflags
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from Digitization.DigitizationFlags import digitizationFlags
+from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+hasRDO_BKGInput = hasattr(overlayArgs, 'inputRDO_BKGFile')
+hasBS_SKIMInput = hasattr(overlayArgs, 'inputBS_SKIMFile')
+
+if hasRDO_BKGInput and hasBS_SKIMInput:
+    raise RuntimeError('Both RDO_BKG and BS_SKIM are defined')
+if not hasRDO_BKGInput and not hasBS_SKIMInput:
+    raise RuntimeError('Define one of RDO_BKG and BS_SKIM file types')
+
+# Set overlay specifics
+globalflags.isOverlay.set_Value_and_Lock(True)
+if hasRDO_BKGInput:
+    logOverlay.info('Running MC+MC overlay')
+    globalflags.DataSource.set_Value_and_Lock('geant4')
+else:
+    logOverlay.info('Running MC+data overlay')
+    overlayFlags.isDataOverlay.set_Value_and_Lock(True)
+    globalflags.DataSource.set_Value_and_Lock('data')
+    globalflags.DetGeo = 'commis'  # TODO: why?
+    globalflags.InputFormat.set_Value_and_Lock('bytestream')
+
+    from AthenaCommon.BeamFlags import jobproperties
+    jobproperties.Beam.beamType.set_Value_and_Lock('collisions')
+
+overlayFlags.isDataOverlay.set_Value_and_Lock(False)
+# TODO: temporarily force MT
+overlayFlags.isOverlayMT.set_Value_and_Lock(True)
+
+# Common athena flags
+if hasattr(overlayArgs, 'skipEvents'):
+    athenaCommonFlags.SkipEvents.set_Value_and_Lock(overlayArgs.skipEvents)
+if hasattr(overlayArgs, 'maxEvents'):
+    athenaCommonFlags.EvtMax.set_Value_and_Lock(overlayArgs.maxEvents)
+
+if hasattr(overlayArgs, 'inputHITSFile'):
+    athenaCommonFlags.PoolHitsInput.set_Value_and_Lock(overlayArgs.inputHITSFile)
+else:
+    raise RuntimeError('No input HITS file defined')
+
+if hasattr(overlayArgs, 'inputRDO_BKGFile'):
+    athenaCommonFlags.PoolRDOInput.set_Value_and_Lock(overlayArgs.inputRDO_BKGFile)
+elif hasattr(overlayArgs, 'inputBS_SKIMFile'):
+    athenaCommonFlags.FilesInput.set_Value_and_Lock(overlayArgs.inputBS_SKIMFile)
+
+if hasattr(overlayArgs, 'outputRDOFile'):
+    athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock(overlayArgs.outputRDOFile)
+else:
+    raise RuntimeError('No output RDO file defined')
+
+if hasattr(overlayArgs, 'outputRDO_SGNLFile'):
+    overlayFlags.signalOnlyOutput.set_Value_and_Lock(True)
+    overlayFlags.PoolSignalRDOOutput.set_Value_and_Lock(
+        overlayArgs.outputRDO_SGNLFile)
+else:
+    overlayFlags.signalOnlyOutput.set_Value_and_Lock(False)
+
+if hasattr(overlayArgs, 'geometryVersion'):
+    globalflags.DetDescrVersion.set_Value_and_Lock(overlayArgs.geometryVersion)
+if hasattr(overlayArgs, 'conditionsTag'):
+    globalflags.ConditionsTag.set_Value_and_Lock(overlayArgs.conditionsTag)
+
+# Digitization flags
+if hasattr(overlayArgs, 'digiSeedOffset1'):
+    digitizationFlags.rndmSeedOffset1 = int(overlayArgs.digiSeedOffset1)
+if hasattr(overlayArgs, 'digiSeedOffset2'):
+    digitizationFlags.rndmSeedOffset2 = int(overlayArgs.digiSeedOffset2)
+if hasattr(overlayArgs, 'samplingFractionDbTag'):
+    digitizationFlags.physicsList = overlayArgs.samplingFractionDbTag
+if hasattr(overlayArgs, 'digiRndmSvc'):
+    digitizationFlags.rndmSvc = overlayArgs.digiRndmSvc
+if hasattr(overlayArgs, 'AddCaloDigi'):
+    digitizationFlags.experimentalDigi += ['AddCaloDigi']
+
+# LAr flags
+if overlayFlags.isDataOverlay():
+    from LArConditionsCommon.LArCondFlags import larCondFlags
+    larCondFlags.LArCoolChannelSelection.set_Value_and_Lock('')
+    larCondFlags.useShape.set_Value_and_Lock(True)
+    larCondFlags.OFCShapeFolder.set_Value_and_Lock('')
+    if hasattr(overlayArgs, 'fSampltag'):
+        larCondFlags.LArfSamplTag.set_Value_and_Lock(overlayArgs.fSampltag + digitizationFlags.physicsList.get_Value())
+    else:
+        raise RuntimeError ('--fSampltag not specified on command-line - see --help message')
+
+# TODO: investigate why this is even needed
+from RecExConfig.RecFlags import rec
+rec.projectName = 'IS_SIMULATION'
+
+
+# ----------------------------
+# Setup detector flags
+# ----------------------------
+logOverlay.info('================ DetFlags ================ ')
+if 'DetFlags' in dir():
+    logOverlay.warning(
+        'DetFlags already defined! This means DetFlags should have been fully configured already..')
+else:
+    from AthenaCommon.DetFlags import DetFlags
+    DetFlags.all_setOn()
+    DetFlags.bpipe_setOff()
+    DetFlags.FTK_setOff()
+
+    if hasattr(overlayArgs, 'triggerConfig') and overlayArgs.triggerConfig == 'NONE':
+        DetFlags.LVL1_setOff()
+    else:
+        DetFlags.LVL1_setOn()
+
+    DetFlags.digitize.LVL1_setOff()
+
+from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
+if not MuonGeometryFlags.hasCSC():
+    DetFlags.CSC_setOff()
+if not MuonGeometryFlags.hasSTGC():
+    DetFlags.sTGC_setOff()
+if not MuonGeometryFlags.hasMM():
+    DetFlags.Micromegas_setOff()
+
+# TODO: need to do it better
+# DetFlags.makeRIO.all_setOff() # needed for MT TRT conditions
+DetFlags.pileup.all_setOff()
+if not overlayFlags.isDataOverlay():
+    DetFlags.readRDOBS.all_setOff()
+    DetFlags.readRIOBS.all_setOff()
+    DetFlags.readRIOPool.all_setOff()
+DetFlags.readRDOPool.all_setOff()
+DetFlags.simulate.all_setOff()
+DetFlags.writeBS.all_setOff()
+DetFlags.writeRIOPool.all_setOff()
+
+DetFlags.Print()
+
+
+# -------------------------------------------------------------
+# Read Simulation MetaData (unless override flag set to True)
+# ------------------------------------------------------------
+if 'ALL' in digitizationFlags.overrideMetadata.get_Value():
+    logOverlay.info('Skipping input file MetaData check.')
+else:
+    from EventOverlayJobTransforms.OverlayReadMetaData import readInputFileMetadata
+    readInputFileMetadata()
+
+DetFlags.Print()
+
+# -------------------------
+# Conditions
+# -------------------------
+from IOVDbSvc.CondDB import conddb
+if hasattr(overlayArgs, 'conditionsTag') and overlayArgs.conditionsTag not in ['', 'NONE']:
+    globalflags.ConditionsTag = overlayArgs.conditionsTag
+    if len(globalflags.ConditionsTag()) != 0:
+        conddb.setGlobalTag(globalflags.ConditionsTag())
+
+
+# LVL1 Trigger Menu
+if hasattr(overlayArgs, 'triggerConfig') and overlayArgs.triggerConfig != 'NONE':
+    # LVL1 Trigger Menu
+    # PJB 9/2/2009 Setup the new triggerConfig flags here
+    from TriggerJobOpts.TriggerFlags import TriggerFlags
+    triggerArg = overlayArgs.triggerConfig
+    # if not prefixed with LVL1: add it here
+    Args = triggerArg.split(':')
+    if Args[0] != 'LVL1':
+        TriggerFlags.triggerConfig = 'LVL1:'+triggerArg
+    else:
+        TriggerFlags.triggerConfig = triggerArg
+    logOverlay.info('triggerConfig argument is: %s ',
+                    TriggerFlags.triggerConfig.get_Value())
+    from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
+    cfg = TriggerConfigGetter('HIT2RDO')
+
+
+# -------------------------
+# Configuration
+# -------------------------
+logOverlay.info('================ Configure ================= ')
+
+# Initialise overlay
+include('EventOverlayJobTransforms/ConfiguredOverlayMT_jobOptions.py')  # noqa F821
+
+# load the input properly
+include('EventOverlayJobTransforms/OverlayInput_jobOptions.py')  # noqa F821
+
+if DetFlags.overlay.Truth_on():
+    include('EventOverlayJobTransforms/TruthOverlay_jobOptions.py')  # noqa F821
+
+if DetFlags.overlay.BCM_on() or DetFlags.overlay.Lucid_on():
+    include('EventOverlayJobTransforms/BeamOverlay_jobOptions.py')  # noqa F821
+
+if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on():
+    include('EventOverlayJobTransforms/InnerDetectorOverlay_jobOptions.py')  # noqa F821
+
+if DetFlags.overlay.LAr_on() or DetFlags.overlay.Tile_on():
+    include('EventOverlayJobTransforms/CaloOverlay_jobOptions.py')  # noqa F821
+
+if (MuonGeometryFlags.hasCSC() and DetFlags.overlay.CSC_on()) or DetFlags.overlay.MDT_on() or DetFlags.overlay.RPC_on() or DetFlags.overlay.TGC_on() or (MuonGeometryFlags.hasSTGC() and DetFlags.overlay.sTGC_on()) or (MuonGeometryFlags.hasMM() and DetFlags.overlay.Micromegas_on()):
+    include('EventOverlayJobTransforms/MuonOverlay_jobOptions.py')  # noqa F821
+
+if DetFlags.overlay.LVL1_on():
+    include('EventOverlayJobTransforms/Level1Overlay_jobOptions.py')  # noqa F821
+
+# save the overlay output
+include('EventOverlayJobTransforms/OverlayOutput_jobOptions.py')  # noqa F821
+
+# save the signal-only output
+if overlayFlags.signalOnlyOutput():
+    include('EventOverlayJobTransforms/SignalOutput_jobOptions.py')  # noqa F821
+
+
+# -------------------------
+# Random numbers
+# -------------------------
+# TODO: move somewhere more appropriate
+from AthenaCommon.ConfigurableDb import getConfigurable
+from AthenaCommon.AppMgr import ServiceMgr
+ServiceMgr += getConfigurable(digitizationFlags.rndmSvc.get_Value())()
+digitizationFlags.rndmSeedList.addtoService()
+digitizationFlags.rndmSeedList.printSeeds()
+
+
+# -------------------------
+# Logging
+# -------------------------
+from AthenaCommon.Constants import INFO
+ServiceMgr.MessageSvc.OutputLevel = INFO
+ServiceMgr.MessageSvc.Format = '% F%45W%S%5W%e%s%7W%R%T %0W%M'
+
+# Post-include
+if hasattr(overlayArgs, 'postInclude'):
+    for fragment in overlayArgs.postInclude:
+        include(fragment)  # noqa F821
+
+# Post-exec
+if hasattr(overlayArgs, 'postExec') and overlayArgs.postExec != 'NONE':
+    for cmd in overlayArgs.postExec:
+        exec(cmd)
+
+# Patch /TagInfo metadata container
+# TODO: move somewhere more appropriate
+if not overlayFlags.isDataOverlay():
+    ServiceMgr.TagInfoMgr.ExtraTagValuePairs.update(
+        overlayFlags.extraTagInfoPairs.get_Value())
+
+if hasattr(overlayArgs, 'AMITag'):
+    if overlayArgs.AMITag != 'NONE':
+        ServiceMgr.TagInfoMgr.ExtraTagValuePairs.update(
+            {'AMITag': overlayArgs.AMITag})
+
+# ================================================================
+logOverlay.info('\nOverlay: OutputStream = \n' + str(outStream))  # noqa F821
+logOverlay.info('\nOverlay: ServiceMgr = \n' + str(ServiceMgr))
diff --git a/Simulation/Overlay/OverlayConfiguration/test/OverlayMetadataConfig_test.py b/Simulation/Overlay/OverlayConfiguration/test/OverlayMetadataConfig_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..8e3740ede83999b3cc29c8fcd816a8394418ebe8
--- /dev/null
+++ b/Simulation/Overlay/OverlayConfiguration/test/OverlayMetadataConfig_test.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+"""Run tests for overlay metadata
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+import sys
+
+from AthenaCommon.Configurable import Configurable
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoOverlayCfg
+
+from OverlayConfiguration.OverlayMetadata import overlayMetadataCheck, overlayMetadataWrite
+from OverlayConfiguration.OverlayTestHelpers import defaultTestFlags, postprocessAndLockFlags, printAndRun, CommonTestArgumentParser
+
+# Set up logging and new style config
+Configurable.configurableRun3Behavior = True
+
+# Argument parsing
+parser = CommonTestArgumentParser("OverlayMetadataConfig_test.py")
+args = parser.parse_args()
+
+# Configure
+defaultTestFlags(ConfigFlags, args)
+overlayMetadataCheck(ConfigFlags)
+postprocessAndLockFlags(ConfigFlags, args)
+
+# Construct our accumulator to run
+acc = MainServicesCfg(ConfigFlags)
+acc.merge(PoolReadCfg(ConfigFlags))
+acc.merge(overlayMetadataWrite(ConfigFlags))
+
+# Add event info overlay for minimal output
+acc.merge(EventInfoOverlayCfg(ConfigFlags))
+
+# Print and run
+sys.exit(printAndRun(acc, ConfigFlags, args))
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7f7edce02f2f0cdb8695217181001a9753fbe1ef
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an mc16e ttbar sample with 2018 geometry and conditions, 25ns pile-up
+# art-type: grid
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+# art-output: mc16e_ttbar.RDO.pool.root
+
+DigiOutFileName="mc16e_ttbar.RDO.pool.root"
+
+
+
+
+HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*"
+LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*"
+
+
+
+#--digiSteeringConf "StandardSignalOnlyTruth"
+
+Digi_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--conditionsTag default:OFLCOND-MC16-SDR-20 \
+--digiSeedOffset1 170 --digiSeedOffset2 170 \
+--geometryVersion default:ATLAS-R2-2016-01-00-01 \
+--inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \
+--inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \
+--jobNumber 568 \
+--maxEvents 25 \
+--numberOfCavernBkg 0 \
+--numberOfHighPtMinBias 0.2099789464 \
+--numberOfLowPtMinBias 80.290021063135 \
+--outputRDOFile ${DigiOutFileName} \
+--digiSteeringConf "StandardSignalOnlyTruth" \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postInclude 'default:PyJobTransforms/UseFrontier.py' \
+--pileupFinalBunch 6 \
+--preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' \
+--preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run310000.py' \
+--skipEvents 0
+
+rc=$?
+echo  "art-result: $rc Digi_tf.py"
+rc1=-9999
+rc2=-9999
+rc3=-9999
+rc4=-9999
+
+# get reference directory
+source DigitizationCheckReferenceLocation.sh
+echo "Reference set being used: " ${DigitizationTestsVersion}
+
+if [ $rc -eq 0 ]
+then
+    # Do reference comparisons
+    art-diff.py ./$DigiOutFileName   /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ReferenceFiles/$DigitizationTestsVersion/$CMTCONFIG/$DigiOutFileName
+    rc1=$?
+fi
+echo  "art-result: $rc1 diff-pool"
+#
+#
+#
+if [ $rc -eq 0 ]
+then
+    art-diff.py ./$DigiOutFileName /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ReferenceFiles/$DigitizationTestsVersion/$CMTCONFIG/$DigiOutFileName --diff-type=diff-root --mode=semi-detailed
+    rc2=$?
+fi
+echo  "art-result: $rc2 diff-root"
+#
+if [ $rc -eq 0 ]
+then
+    checkFile ./$DigiOutFileName
+    rc3=$?
+fi
+echo "art-result: $rc3 checkFile"
+#
+#
+if [ $rc -eq 0 ]
+then
+    ArtPackage=$1
+    ArtJobName=$2
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed
+    rc4=$?
+fi
+echo  "art-result: $rc4 art-compare"
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_Zmumu_Old_vs_New.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_Zmumu_Old_vs_New.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c806de37b8e6a740173e80da195090fcbc5617e5
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_Zmumu_Old_vs_New.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# art-description: MC+data Overlay with MT support, sequential running
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: *.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--outputRDOFile MC_plus_data.NEW.RDO.pool.root \
+--triggerConfig 'Overlay=NONE' \
+--maxEvents 5 \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--samplingFractionDbTag FTFP_BERT_BIRK \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--imf False
+
+rc=$?
+echo "art-result: $rc overlay_tf"
+
+OverlayBS_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--outputRDOFile MC_plus_data.OLD.RDO.pool.root \
+--maxEvents 5 \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--samplingFractionDbTag FTFP_BERT_BIRK \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--postExec 'outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--imf False
+
+rc2=$?
+echo "art-result: $rc2 overlaybs_tf"
+
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root MC_plus_data.OLD.RDO.pool.root MC_plus_data.NEW.RDO.pool.root \
+        --mode=semi-detailed \
+        --ignore-leaves index_ref \
+            RecoTimingObj_p1_HITStoRDO_timings.timings \
+            RecoTimingObj_p1_EVNTtoHITS_timings.timings \
+            xAOD::EventAuxInfo_v2_EventInfoAuxDyn.subEventIndex \
+            xAOD::EventAuxInfo_v2_EventInfoAuxDyn.subEventTime \
+            xAOD::EventAuxInfo_v2_EventInfoAuxDyn.subEventType \
+            xAOD::EventAuxInfo_v2_EventInfoAux.detectorMask0 \
+            xAOD::EventAuxInfo_v2_EventInfoAux.detectorMask1 \
+            xAOD::EventAuxInfo_v2_EventInfoAux.detectorMask2 \
+            xAOD::EventAuxInfo_v2_EventInfoAux.detectorMask3 \
+            xAOD::EventAuxInfo_v2_EventInfoAux.actualInteractionsPerCrossing \
+            xAOD::EventAuxInfo_v2_EventInfoAux.averageInteractionsPerCrossing
+    rc3=$?
+fi
+echo "art-result: $rc3 comparison"
diff --git a/TestBeam/TBCaloGeometry/src/TBCaloCoordinate.cxx b/TestBeam/TBCaloGeometry/src/TBCaloCoordinate.cxx
index 986fb9f8651128d6ea95bf2c300bb885f0230c55..64f47ec3785439d206462b569c10773a835aadad 100755
--- a/TestBeam/TBCaloGeometry/src/TBCaloCoordinate.cxx
+++ b/TestBeam/TBCaloGeometry/src/TBCaloCoordinate.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
 */
 
 // ***************************************************************************
@@ -16,12 +16,8 @@
 #include "GaudiKernel/IToolSvc.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
-#include "StoreGate/StoreGate.h"
 #include <vector>
 
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-
 #include "TBCaloConditions/ITBCaloPosTool.h"
 #include "CaloGeoHelpers/CaloPhiRange.h"
 
@@ -31,6 +27,7 @@
 
 //#include "CLHEP/Geometry/Transform3D.h"
 #include "GeoPrimitives/GeoPrimitives.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 #include <iostream>
 #include <iomanip>
 
@@ -220,14 +217,9 @@ void
 TBCaloCoordinate::read_table_position()
 {   
   if ( m_firstevt == 0 ) {
-    const EventInfo* eventInfo;
-    StatusCode sc = StoreGate::pointer()->retrieve(eventInfo);
-    if ( !sc.isFailure()) {
-      const EventID* myEventID=eventInfo->event_ID();
-      m_runNumber=myEventID->run_number();
-
-      m_firstevt = 1;
-    }
+    const EventContext& ctx = Gaudi::Hive::currentContext();
+    m_runNumber = ctx.eventID().run_number();
+    m_firstevt = 1;
   }
 
   if ( m_DBRead >= 0 ) {
diff --git a/TestBeam/TBMonitoring/share/TBMonExemple_jobOptions.txt b/TestBeam/TBMonitoring/share/TBMonExemple_jobOptions.txt
index 498e10bb4a3b35a7b43d4157f7516c21e887855c..34214bf34231e1fc77655a68a8a35255fbb4dfdc 100755
--- a/TestBeam/TBMonitoring/share/TBMonExemple_jobOptions.txt
+++ b/TestBeam/TBMonitoring/share/TBMonExemple_jobOptions.txt
@@ -10,7 +10,7 @@ DetDescrCnvSvc.DetectorManagers += { "CaloMgr" };
 //
 //---- EMTB-Files input --------------------
 //
-ApplicationMgr.DLLs += {"LArTBCnv"};
+ApplicationMgr.Dlls += {"LArTBCnv"};
 ApplicationMgr.ExtSvc += { "LArTBCnvSvc" , "LArTBEventSelector/EventSelector"};
 ApplicationMgr.EvtSel = "EventSelector";
 
@@ -18,11 +18,11 @@ EventPersistencySvc.CnvServices     += { "LArTBCnvSvc" };
 EventSelector.InputFiles = {"/afs/cern.ch/user/r/rmcphers/w0/data/rd13_run220113.dat"};
 
 //--- LArMonitoring ---------------------------
-ApplicationMgr.DLLs += { "AthenaMonitoring"};
+ApplicationMgr.Dlls += { "AthenaMonitoring"};
 
 ApplicationMgr.TopAlg += { "AthenaMon/athenamon" };
 
-ApplicationMgr.DLLs += { "TBMonitoring" };
+ApplicationMgr.Dlls += { "TBMonitoring" };
 
 
 athenamon.AthenaMonTools = {"BeamDetectorMonTool/beamdetmon"};
@@ -54,12 +54,12 @@ ToolSvc.beamdetmon.TDCMin = 0;
 ToolSvc.beamdetmon.TriggFlags = {1,2,4,8,16,32};
 
 // -- use root histos --
-ApplicationMgr.DLLs += { "RootHistCnv" };
+ApplicationMgr.Dlls += { "RootHistCnv" };
 ApplicationMgr.HistogramPersistency = "ROOT";
 HistogramPersistencySvc.OutputFile  = "test.root";
 
 // -- Use auditors --
-ApplicationMgr.DLLs += { "GaudiAud" };
+ApplicationMgr.Dlls += { "GaudiAud" };
 
 // write out a summary of the time spent
 //
diff --git a/TestBeam/TBMonitoring/share/jobOptions_MonTBInstruments.py b/TestBeam/TBMonitoring/share/jobOptions_MonTBInstruments.py
index 9f0eb105315386ca89444cfef14ed7c77f8c834d..6743982293ead94c4543a6a5988d07ca9918510b 100755
--- a/TestBeam/TBMonitoring/share/jobOptions_MonTBInstruments.py
+++ b/TestBeam/TBMonitoring/share/jobOptions_MonTBInstruments.py
@@ -8,7 +8,7 @@
 include( "TBCnv/TBReadH8BS_jobOptions.py") 
 
 #---- Reconstruct Beam Instrumentation ------------------------
-theApp.DLLs+=["TBRec"]
+theApp.Dlls+=["TBRec"]
 #--- BPCs
 theApp.TopAlg += ["TBBPCRec/TBBPCRec"]
 TBBPCRec =  Algorithm("TBBPCRec")
diff --git a/TestBeam/TBRec/share/H8TimingNtuple.py b/TestBeam/TBRec/share/H8TimingNtuple.py
index a2d4af7fe50df31058592f7b3fbbce0d10d773c0..86e0840171cb7d354fcedd6afd131bfba6688507 100755
--- a/TestBeam/TBRec/share/H8TimingNtuple.py
+++ b/TestBeam/TBRec/share/H8TimingNtuple.py
@@ -32,7 +32,7 @@ ToolSvc.TBByteStreamCnvTool.Dump = False
 
 #---- LAr BS Reading & Reconstruction
 include("LArTBRec/LArTBRec_H8_Simple_jobOptions.py")
-theApp.DLLs+=["LArTools"]
+theApp.Dlls+=["LArTools"]
 include( "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_H8_joboptions.py" )
 LArRawChannelSimpleBuilder.RecoMode    = "CUBIC" 
 
diff --git a/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py
index f331a2014c195b921c92a082e9a340d8ec72a93e..ec65125a570e5d32d05fe7362cc14ab3c01edd6a 100644
--- a/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py
@@ -254,7 +254,7 @@ if __name__=='__main__':
 
     from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     tileTypeNames = ['TileRawChannelContainer/TileRawChannelCnt', 'TileDigitsContainer/TileDigitsCnt']
-    cfg.merge( ByteStreamReadCfg(ConfigFlags, typeNames = tileTypeNames) )
+    cfg.merge( ByteStreamReadCfg(ConfigFlags, type_names = tileTypeNames) )
 
     from TileRecUtils.TileRawChannelMakerConfig import TileRawChannelMakerCfg
     cfg.merge( TileRawChannelMakerCfg(ConfigFlags) )
diff --git a/TileCalorimeter/TileMonitoring/python/TileDigiNoiseMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileDigiNoiseMonitorAlgorithm.py
index 3e750d187f66399b5421a88dd5b62401c572e493..ac987ea30442c19f24eec878b67a0ae4265ed516 100644
--- a/TileCalorimeter/TileMonitoring/python/TileDigiNoiseMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileDigiNoiseMonitorAlgorithm.py
@@ -108,7 +108,7 @@ if __name__=='__main__':
 
     from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     tileTypeNames = ['TileRawChannelContainer/TileRawChannelCnt', 'TileDigitsContainer/TileDigitsCnt']
-    cfg.merge( ByteStreamReadCfg(ConfigFlags, typeNames = tileTypeNames) )
+    cfg.merge( ByteStreamReadCfg(ConfigFlags, type_names = tileTypeNames) )
 
     cfg.merge( TileDigiNoiseMonitoringConfig(ConfigFlags, TriggerChain = '') )
 
diff --git a/TileCalorimeter/TileMonitoring/python/TileJetMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileJetMonitorAlgorithm.py
index 91b7ea9172d3d767da513dcbc4b4c7e56e097f8b..5698c66ef42b0acdce86915302d56bccf10f0fbb 100644
--- a/TileCalorimeter/TileMonitoring/python/TileJetMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileJetMonitorAlgorithm.py
@@ -50,7 +50,7 @@ def TileJetMonitoringConfig(flags, **kwargs):
     DoEnergyDiffHistograms  = kwargs.get('DoEnergyDiffHistograms', tileJetMonAlg._descriptors['DoEnergyDiffHistograms'].default)
 
 
-    if not flags.DQ.DataType == 'heavyioncollision':
+    if flags.DQ.DataType not in ('heavyioncollisions', 'cosmics'):
 
         jvtTool = CompFactory.JetVertexTaggerTool()
         jetContainer = kwargs.get('JetContainer', tileJetMonAlg._descriptors['JetContainer'].default)
diff --git a/TileCalorimeter/TileMonitoring/python/TileRawChannelNoiseMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileRawChannelNoiseMonitorAlgorithm.py
index ae75099c21e8a8758caf657e8d209efa255fe133..248106129f1b4beac869ea0f36143d38452a65fc 100644
--- a/TileCalorimeter/TileMonitoring/python/TileRawChannelNoiseMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileRawChannelNoiseMonitorAlgorithm.py
@@ -107,7 +107,7 @@ if __name__=='__main__':
     from AthenaConfiguration.TestDefaults import defaultTestFiles
     ConfigFlags.Input.Files = defaultTestFiles.RAW
 
-    ConfigFlags.Input.Files = ['root://eosatlas//eos/atlas/atlascerngroupdisk/det-tile/test/data14_cos.00239908.physics_CosmicCalo.merge.RAW._lb0004._SFO-ALL._0001.1']
+    ConfigFlags.Input.Files = ['root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-tile/test/data14_cos.00239908.physics_CosmicCalo.merge.RAW._lb0004._SFO-ALL._0001.1']
     ConfigFlags.IOVDb.GlobalTag = 'CONDBR2-ES1PA-2018-02'
 
     ConfigFlags.Output.HISTFileName = 'TileRawChannelNoiseMonitorOutput.root'
@@ -121,7 +121,7 @@ if __name__=='__main__':
 
     from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     tileTypeNames = ['TileRawChannelContainer/TileRawChannelCnt', 'TileDigitsContainer/TileDigitsCnt']
-    cfg.merge( ByteStreamReadCfg(ConfigFlags, typeNames = tileTypeNames) )
+    cfg.merge( ByteStreamReadCfg(ConfigFlags, type_names = tileTypeNames) )
 
     from TileRecUtils.TileRawChannelMakerConfig import TileRawChannelMakerCfg
     cfg.merge( TileRawChannelMakerCfg(ConfigFlags) )
diff --git a/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py
index e0cb1adf8e7a0bb95da478f1a61c57940ff8fc7e..3f662248fbfcb6d29beb0e64bc81ec2a32c232a8 100644
--- a/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py
+++ b/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py
@@ -155,7 +155,7 @@ if __name__=='__main__':
     tileTypeNames = ['TileRawChannelContainer/TileRawChannelCnt',
                      'TileDigitsContainer/TileDigitsCnt',
                      'TileBeamElemContainer/TileBeamElemCnt']
-    cfg.merge( ByteStreamReadCfg(ConfigFlags, typeNames = tileTypeNames) )
+    cfg.merge( ByteStreamReadCfg(ConfigFlags, type_names = tileTypeNames) )
 
     from TileRecUtils.TileRawChannelMakerConfig import TileRawChannelMakerCfg
     cfg.merge( TileRawChannelMakerCfg(ConfigFlags) )
diff --git a/TileCalorimeter/TileRecAlgs/python/TileDigitsFilterConfig.py b/TileCalorimeter/TileRecAlgs/python/TileDigitsFilterConfig.py
index 97e1fd31c06c170a8fd6dd0bbc9b2ba27d545e2f..0542192fb2201ded04a335a29596a8ab4db7a511 100644
--- a/TileCalorimeter/TileRecAlgs/python/TileDigitsFilterConfig.py
+++ b/TileCalorimeter/TileRecAlgs/python/TileDigitsFilterConfig.py
@@ -78,7 +78,7 @@ if __name__ == "__main__":
 
     from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     tileTypeNames = ['TileRawChannelContainer/TileRawChannelCnt', 'TileDigitsContainer/TileDigitsCnt']
-    acc.merge( ByteStreamReadCfg(ConfigFlags, typeNames = tileTypeNames) )
+    acc.merge( ByteStreamReadCfg(ConfigFlags, type_names = tileTypeNames) )
 
     acc.merge( TileDigitsFilterOutputCfg(ConfigFlags) )
 
diff --git a/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref b/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref
index b81a803596968e3390e9be275db841a369e130f0..26e7e3fc1ab72c25a6f7339e27da3b95ccd22d2e 100644
--- a/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileCellBuilderFromHit_test.ref
@@ -38,7 +38,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7151 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -255,7 +254,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref b/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref
index 014dd1b635eba014af02f56e0ba3d5688d1efe70..a7f332aae587052481ead1e83524035cce18fc5a 100644
--- a/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileCellBuilder_test.ref
@@ -38,7 +38,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7151 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -255,7 +254,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref b/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref
index c396b721f546a699ade833d34e63b1c19dc3d047..a5ee1a2b0af2247e1c8f55e5c466a73619907f8a 100644
--- a/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileDQstatusAlg_test.ref
@@ -38,7 +38,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7151 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -293,7 +292,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref b/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref
index d9ad04bb640d648e7bd5683cd3e9f4d504541557..8173dca6aeaf989487dff883969d46a4a243fb75 100644
--- a/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileDQstatusTool_test.ref
@@ -38,7 +38,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7151 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -293,7 +292,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref b/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref
index b0822cfd21ca12b36d860ed01114f85408aa7a96..33779261bc48cdd8c02c90200c86a7372b38073c 100644
--- a/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref
+++ b/TileCalorimeter/TileRecUtils/share/TileRawChannelBuilder_test.ref
@@ -38,7 +38,6 @@ StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7151 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -293,7 +292,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileSimAlgs/python/TileDigitsMakerConfig.py b/TileCalorimeter/TileSimAlgs/python/TileDigitsMakerConfig.py
index bf7398360ebdadd6647688e3a18e3aacfbc0785e..06070f59d8c289fea3fbfc21a97f58757276fef5 100644
--- a/TileCalorimeter/TileSimAlgs/python/TileDigitsMakerConfig.py
+++ b/TileCalorimeter/TileSimAlgs/python/TileDigitsMakerConfig.py
@@ -60,7 +60,7 @@ def TileDigitsMakerCfg(flags, **kwargs):
 
         if flags.Overlay.DataOverlay:
             from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
-            acc.merge(ByteStreamReadCfg(flags, typeNames=[
+            acc.merge(ByteStreamReadCfg(flags, type_names=[
                 'TileDigitsContainer/' + flags.Overlay.BkgPrefix + 'TileDigitsCnt',
                 'TileRawChannelContainer/' + flags.Overlay.BkgPrefix + 'TileRawChannelCnt']
             ))
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
index 9ed90acaf0bbd5e2728690cf5f837cbfb992c33c..16204bfc6b9ce2d86123bf1d98dbfa9af6788eab 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
@@ -37,7 +37,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -299,7 +298,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
@@ -686,7 +685,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -951,7 +949,7 @@ TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyC
 TileEMScaleCondAlg                             0    INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
index 6cf57f1ac97e3f4bc13d111d6d67938d8cb33c03..80bba733b55f49470a6931732415bf1ec8845a38 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
@@ -37,7 +37,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -299,7 +298,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
@@ -688,7 +687,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -953,7 +951,7 @@ TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyC
 TileEMScaleCondAlg                             0    INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
index 9afe1fdd345d573c68cad9c2ef5ab097c90742ed..ca5eaeeea7e3b5b09934bf6330b794a2693b01a1 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
@@ -37,7 +37,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -299,7 +298,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
@@ -687,7 +686,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -952,7 +950,7 @@ TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyC
 TileEMScaleCondAlg                             0    INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
index 74564973e68ca36649ef1875b57f79db0a4dbafe..a1560684b443721fdf890dde538c25575985cbad 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
@@ -37,7 +37,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -298,7 +297,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
@@ -685,7 +684,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -949,7 +947,7 @@ TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyC
 TileEMScaleCondAlg                             0    INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
index 6b3dceaa3d3543db89ed0fd92d11877583aa8f06..9d6904eac926931fbc292f570e88c437366fb130 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
@@ -37,7 +37,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -299,7 +298,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
@@ -688,7 +687,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -953,7 +951,7 @@ TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyC
 TileEMScaleCondAlg                             0    INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
index 75d978955253a326c921ce97bfc40a2cf063f58c..d4cdec9edf9b126088739ac051ac1611793f4645 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
@@ -37,7 +37,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7006 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -299,7 +298,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCondAlg   INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg   INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
@@ -688,7 +687,6 @@ ApplicationMgr                                      INFO Updating Gaudi::PluginS
 AthDictLoaderSvc                                    INFO in initialize...
 AthDictLoaderSvc                                    INFO acquired Dso-registry
 ClassIDSvc                                          INFO  getRegistryEntries: read 7378 CLIDRegistry entries for module ALL
-CoreDumpSvc                                         INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                         INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 MetaDataSvc                                         INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc                                    INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
@@ -953,7 +951,7 @@ TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyC
 TileEMScaleCondAlg                             0    INFO ProxyOflLasFib is set up and can be used
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflCes) for folder: "/TILE/OFL02/CALIB/CES"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OflEms) for folder: "/TILE/OFL02/CALIB/EMS"
-TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':Invalid
+TileEMScaleCondAlg                             0    INFO Undoing online calibration is not requested, since OnlCacheUnit= 'OnlCacheUnit':'Invalid'
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCis) for folder: "/TILE/OFL02/CALIB/CIS/FIT/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlLas) for folder: "/TILE/OFL02/CALIB/LAS/LIN"
 TileEMScaleCondAlg.TileCondProxyCool_...       0    INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlCes) for folder: "/TILE/OFL02/CALIB/CES"
diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index 8b781f017800f6471fc9c3e442e398e80285782f..875c9e0059df7ff7f6de2b3ce537cd10901472ca 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -9,16 +9,16 @@
       284500    87473063          62          76           5           2           6           2           4           6           4           2
       284500    87473068          26          35           1           1           0           0           0           0           0           0
       284500    87473075          72          85           6           0           5           0           5           5           4           1
-      284500    87473084          83          86           7           2          15           1          14           9           4           5
+      284500    87473084          83          86           7           2          15           1          14          10           4           6
       284500    87473091          43          49           3           0           2           1           1           5           2           3
       284500    87473096          72          76           3           2           2           0           2           3           2           1
       284500    87473104          61          63           6           0           6           1           5           5           4           1
       284500    87473114          93          78           7           2          13           1          12           8           5           3
       284500    87473121          93         100           6           3          16           4          12           6           5           1
-      284500    87473132          81          60           9           1          10           0          10           5           5           0
+      284500    87473132          81          58           9           1          11           0          11           4           4           0
       284500    87473137          81          71           8           3          15           0          15           6           6           0
       284500    87473144          83          67           7           1           6           0           6           8           5           3
-      284500    87473154          89          88           7           0          10           2           8           8           4           4
+      284500    87473154          89          89           7           0          10           2           8           8           4           4
       284500    87473162          52          52           3           0           7           0           7           3           2           1
       284500    87473167          74          54           6           3          12           2          10          13           8           5
       284500    87473171          82          70           8           3           4           2           2           5           3           2
diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref
index ca6ae0b120c9fb784d931f82a897cee95cbf8370..7601ecfd0c02496387da5da6cd41126fc184c31c 100644
--- a/Tools/PROCTools/data/master_q431_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref
@@ -1,22 +1,22 @@
          run       event       nTopo   nIdTracks       nJets      nMuons
       330470  1183722158           1           0           0           0
       330470  1183722342         394         415          18           0
-      330470  1183727953         532         570          13           4
+      330470  1183727953         532         569          11           4
       330470  1183732647         467         452          12           1
       330470  1183733040         381         285           6           1
       330470  1183734651         361         363          14           3
       330470  1183735332         406         372           9           1
-      330470  1183736475         741         654          17           3
+      330470  1183736475         741         654          15           2
       330470  1183738728           1           0           0           0
-      330470  1183738949         368         419           9           1
+      330470  1183738949         368         420           9           1
       330470  1183742489         152         125           2           1
       330470  1183743040         285         305           5           0
       330470  1183746343         492         465          14           0
       330470  1183746710           6           0           0           0
-      330470  1183751782         239         235           5           0
+      330470  1183751782         239         235           4           0
       330470  1183752624         347         342           8           2
       330470  1183753006         357         377          11           3
-      330470  1183754806         470         406          14           0
+      330470  1183754806         470         406          15           0
       330470  1183769295         342         317           8           1
       330470  1183769939         348         341          11           3
       330470  1183773832         307         198           7           0
diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 1550daabc9b3abedf19379469f004816cf949755..ecf1561ef033d53f47a29f2b00e2f5b5b6250f30 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -25,7 +25,7 @@ ciRefFileMap = {
                 's3505-21.0'           : 'v1',
                 's3505-21.3'           : 'v1',
                 's3505-21.9'           : 'v1',
-                's3505-22.0'           : 'v5',
+                's3505-22.0'           : 'v6',
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
                 'overlay-d1498-22.0'   : 'v33',
diff --git a/Tools/Scripts/share/check_joboptions b/Tools/Scripts/share/check_joboptions
index 926c2815c03b8befcb72d5ae40fc2afae6344603..cb443bdf83d08901ed36792628e48601962b37ad 100755
--- a/Tools/Scripts/share/check_joboptions
+++ b/Tools/Scripts/share/check_joboptions
@@ -84,8 +84,8 @@ function check ()
 
   ##echo file=${file}
 
-  #echo "------ DLLs:"
-  for f in `awk '/(DLLs).*{/,/}/ {print}' ${file} | sed -e 's#[^{]*{##' -e 's#}.*##' -e 's#[",]##g'`; do
+  #echo "------ Dlls:"
+  for f in `awk '/(Dlls).*{/,/}/ {print}' ${file} | sed -e 's#[^{]*{##' -e 's#}.*##' -e 's#[",]##g'`; do
     #echo ${tabulation}${f}
 
     s=`echo "${all_dlls}" | egrep -e "[ ]${f}[ ]"`
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ATLASMagneticFieldWrapper.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ATLASMagneticFieldWrapper.h
index 29c875cca6b15c6a5963775a4420eabe12e9e516..1a3433422e0c42d31a06e4ec0e89a9ce9dd2d5b4 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ATLASMagneticFieldWrapper.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ATLASMagneticFieldWrapper.h
@@ -5,7 +5,8 @@
 #ifndef ACTSGEOMETRY_ATLASMAGNETICFIELDWRAPPER_H
 #define ACTSGEOMETRY_ATLASMAGNETICFIELDWRAPPER_H
 
-#include "MagFieldInterfaces/IMagFieldSvc.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 #include "Acts/Utilities/Definitions.hpp"
 #include "Acts/Utilities/Units.hpp"
 #include "Acts/MagneticField/MagneticFieldContext.hpp"
@@ -17,65 +18,29 @@ class ATLASMagneticFieldWrapper
 public:
 
   struct Cache {
-    // empty, no cache for now
 
-    Cache(std::reference_wrapper<const Acts::MagneticFieldContext> /*mctx*/) {
-      // does nothing, but is required
+    Cache(std::reference_wrapper<const Acts::MagneticFieldContext> mctx) {
+      std::any_cast<const AtlasFieldCacheCondObj*>(mctx)->getInitializedCache(fieldCache);
     }
-  };
-
-  // FieldCell is not needed anymore, keep it for backwards compatibility right now.
-  struct FieldCell {
-  public:
-    FieldCell(MagField::IMagFieldSvc* fieldService)
-      : m_fieldService(fieldService)
-    {
-    }
-
-    Acts::Vector3D
-    getField(const Acts::Vector3D& pos) const
-    {
-      Acts::Vector3D bfield;
-      m_fieldService->getField(&pos, &bfield);
-
-      bfield *= m_bFieldUnit; // kT -> T;
-
-      return bfield;
-    }
-
-    Acts::Vector3D
-    getFieldGradient(const Acts::Vector3D& position, Acts::ActsMatrixD<3, 3>& gradient) const
-    {
-      Acts::Vector3D bfield;
-      m_fieldService->getField(&position, &bfield, &gradient);
-
-      bfield *= m_bFieldUnit; // kT -> T;
-      gradient *= m_bFieldUnit;
 
-      return bfield;
-    }
-
-    inline
-    bool isInside(const Acts::Vector3D&) const {
-      return true;
-    }
-
-  private:
-    MagField::IMagFieldSvc *m_fieldService;
-    const double m_bFieldUnit = 1000.*Acts::UnitConstants::T;
+    MagField::AtlasFieldCache fieldCache;
   };
 
-  ATLASMagneticFieldWrapper(MagField::IMagFieldSvc *fieldService)
-    : m_fieldCell(fieldService),
-      m_fieldService(fieldService)
-  {
-  }
+  ATLASMagneticFieldWrapper() = default;
 
   Acts::Vector3D
-  getField(const Acts::Vector3D& pos) const
+  getField(const Acts::Vector3D& position, Cache& cache) const
   {
-    Acts::Vector3D bfield;
-    m_fieldService->getField(&pos, &bfield);
+    double posXYZ[3];
+    posXYZ[0] = position.x();
+    posXYZ[1] = position.y();
+    posXYZ[2] = position.z();
+    double BField[3];
+
+    cache.fieldCache.getField(posXYZ, BField);
+
+    // Magnetic field
+    Acts::Vector3D bfield{BField[0],BField[1],BField[2]};
 
     bfield *= m_bFieldUnit; // kT -> T;
 
@@ -83,16 +48,25 @@ public:
   }
 
   Acts::Vector3D
-  getField(const Acts::Vector3D& pos, Cache& /*cache*/) const
+  getFieldGradient(const Acts::Vector3D& position,
+                   Acts::ActsMatrixD<3, 3>& gradient,
+                   Cache& cache) const
   {
-    return getField(pos);
-  }
+    double posXYZ[3];
+    posXYZ[0] = position.x();
+    posXYZ[1] = position.y();
+    posXYZ[2] = position.z();
+    double BField[3];
+    double grad[9];
+
+    cache.fieldCache.getField(posXYZ, BField, grad);
+
+    // Magnetic field
+    Acts::Vector3D bfield{BField[0], BField[1],BField[2]};
+    Acts::ActsMatrixD<3, 3> tempGrad;
+    tempGrad << grad[0], grad[1], grad[2], grad[3], grad[4], grad[5], grad[6], grad[7], grad[8]; 
+    gradient = tempGrad;
 
-  Acts::Vector3D
-  getFieldGradient(const Acts::Vector3D& position, Acts::ActsMatrixD<3, 3>& gradient) const
-  {
-    Acts::Vector3D bfield;
-    m_fieldService->getField(&position, &bfield, &gradient);
 
     bfield *= m_bFieldUnit; // kT -> T;
     gradient *= m_bFieldUnit;
@@ -100,26 +74,7 @@ public:
     return bfield;
   }
 
-  Acts::Vector3D
-  getFieldGradient(const Acts::Vector3D& position,
-                   Acts::ActsMatrixD<3, 3>& gradient,
-                   Cache& /*cache*/) const
-  {
-    return getFieldGradient(position, gradient);
-  }
-
-  // only kept for backwards compatibility
-  FieldCell
-  getFieldCell(const Acts::Vector3D& /*position*/) const
-  {
-    return m_fieldCell;
-  }
-
 private:
-  // only kept for backwards compatibility
-  FieldCell m_fieldCell;
-
-  MagField::IMagFieldSvc *m_fieldService;
   const double m_bFieldUnit = 1000.*Acts::UnitConstants::T;
 };
 
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
index ddd2a3ca6fc28aa3f60dd6a259cd11fe77654e2a..2be0eca267ffad316f940cc021b258423a3b5565 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationTool.h
@@ -29,10 +29,6 @@
 
 #include <cmath>
 
-namespace MagField {
-  class IMagFieldSvc;
-}
-
 namespace Acts {
 class Surface;
 class BoundaryCheck;
@@ -102,10 +98,16 @@ public:
   }
 
 
+  virtual
+  Acts::MagneticFieldContext
+  getMagneticFieldContext(const EventContext& ctx) const override;
+
+
 private:
   std::unique_ptr<ActsExtrapolationDetail::VariantPropagator> m_varProp;
 
-  ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle;
+  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
+
   ToolHandle<IActsTrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
 
   Gaudi::Property<std::string> m_fieldMode{this, "FieldMode", "ATLAS", "Either ATLAS or Constant"};
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometry.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometry.h
index 206e485aed91e915ab4ab6fd57c76cecbc6813d4..9d79fb9e7ed6590d5daddfe8110e67e2c8842152 100755
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometry.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometry.h
@@ -8,7 +8,6 @@
 // ATHENA
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "AthenaKernel/IAthRNGSvc.h"
 #include "GaudiKernel/Property.h"  /*no forward decl: typedef*/
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometryTransforms.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometryTransforms.h
index ee427c47165c71ecf55d53e3c9758a9ae2ee782c..14d1da4953312df6e5d4c9c85b60d29c5086a7e3 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometryTransforms.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsWriteTrackingGeometryTransforms.h
@@ -8,7 +8,6 @@
 // ATHENA
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "AthenaKernel/IAthRNGSvc.h"
 #include "GaudiKernel/Property.h"  /*no forward decl: typedef*/
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Tracking/Acts/ActsGeometry/CMakeLists.txt b/Tracking/Acts/ActsGeometry/CMakeLists.txt
index 15827aae1bc2a998fe69e22331934f2424c5f7bf..9f516690bfe7bfb7638d5c5100f415271a0e7a00 100755
--- a/Tracking/Acts/ActsGeometry/CMakeLists.txt
+++ b/Tracking/Acts/ActsGeometry/CMakeLists.txt
@@ -18,7 +18,7 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/GeoPrimitives
                           Event/EventInfo
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagFieldElements MagFieldConditions
                           Calorimeter/CaloDetDescr
                           Tracking/Acts/ActsGeometryInterfaces
                           Tracking/Acts/ActsInterop
@@ -52,7 +52,8 @@ atlas_add_library( ActsGeometryLib
                    TrkGeometry
                    PixelReadoutGeometry
                    SCT_ReadoutGeometry
-                   TRT_ReadoutGeometry)
+                   TRT_ReadoutGeometry
+                   MagFieldElements MagFieldConditions)
 
 atlas_add_component( ActsGeometry
                      src/ActsExtrapolationAlg.cxx
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
index 84ada281557659e88deb733e78e9f084ae7cfc7e..30b177811a3716c43f13291367ec44849cf058bd 100755
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
@@ -9,7 +9,6 @@
 #include "AthenaKernel/RNGWrapper.h"
 #include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/ISvcLocator.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 // ACTS
 #include "Acts/Propagator/MaterialInteractor.hpp"
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
index 5ba834fc0b993e64f57d356b4fd569d2e695fec8..f572ebaf15b6a1e7f5b65fdbca2f2955500d413b 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx
@@ -6,7 +6,6 @@
 
 // ATHENA
 #include "GaudiKernel/IInterface.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 // PACKAGE
 #include "ActsGeometry/ActsGeometryContext.h"
@@ -51,8 +50,7 @@ using ActsExtrapolationDetail::VariantPropagator;
 
 ActsExtrapolationTool::ActsExtrapolationTool(const std::string& type, const std::string& name,
     const IInterface* parent)
-  : base_class(type, name, parent),
-    m_fieldServiceHandle("AtlasFieldSvc", name)
+  : base_class(type, name, parent)
 {
 }
 
@@ -76,12 +74,13 @@ ActsExtrapolationTool::initialize()
 
   Acts::Navigator navigator(trackingGeometry);
 
-  if (m_fieldMode == "ATLAS"s) {
-    // we need the field service
-    ATH_CHECK( m_fieldServiceHandle.retrieve() );
+  if (m_fieldMode == "ATLAS"s) {    
     ATH_MSG_INFO("Using ATLAS magnetic field service");
     using BField_t = ATLASMagneticFieldWrapper;
-    BField_t bField(m_fieldServiceHandle.get());
+
+    ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
+
+    BField_t bField;
     auto stepper = Acts::EigenStepper<BField_t>(std::move(bField));
     auto propagator = Acts::Propagator<decltype(stepper), Acts::Navigator>(std::move(stepper),
                                                                       std::move(navigator));
@@ -115,7 +114,7 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx,
   using namespace Acts::UnitLiterals;
   ATH_MSG_VERBOSE(name() << "::" << __FUNCTION__ << " begin");
 
-  Acts::MagneticFieldContext mctx;
+  Acts::MagneticFieldContext mctx = getMagneticFieldContext(ctx);
   const ActsGeometryContext& gctx
     = m_trackingGeometryTool->getGeometryContext(ctx);
 
@@ -320,7 +319,7 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
   using namespace Acts::UnitLiterals;
   ATH_MSG_VERBOSE(name() << "::" << __FUNCTION__ << " begin");
 
-  Acts::MagneticFieldContext mctx;
+  Acts::MagneticFieldContext mctx = getMagneticFieldContext(ctx);
   const ActsGeometryContext& gctx
     = m_trackingGeometryTool->getGeometryContext(ctx);
 
@@ -360,3 +359,15 @@ ActsExtrapolationTool::propagate(const EventContext& ctx,
 
   return parameters;
 }
+
+Acts::MagneticFieldContext ActsExtrapolationTool::getMagneticFieldContext(const EventContext& ctx) const {
+  SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
+  if (!readHandle.isValid()) {
+     std::stringstream msg;
+     msg << "Failed to retrieve magnetic field condition data " << m_fieldCacheCondObjInputKey.key() << ".";
+     throw std::runtime_error(msg.str());
+  }
+  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
+
+  return Acts::MagneticFieldContext(fieldCondObj);
+}
diff --git a/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx b/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx
index 7ecd32bcf8265761a9f381b244aefde9078995a7..ae6842218a4b7e3d22e60df21fb8ff5127a8d53e 100755
--- a/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsMaterialMapping.cxx
@@ -10,7 +10,6 @@
 #include "ActsGeometry/IActsPropStepRootWriterSvc.h"
 #include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/ISvcLocator.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 // ACTS
 #include "Acts/Propagator/detail/SteppingLogger.hpp"
diff --git a/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx
index ce6e4327358d5bbb5fe371612fd2e684ef69e248..68fff9b388dfa31c4741ee51f60bc1ab662dbb7f 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsSurfaceMappingTool.cxx
@@ -6,8 +6,6 @@
 
 // ATHENA
 #include "GaudiKernel/IInterface.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-
 // PACKAGE
 #include "ActsInterop/Logger.h"
 #include "ActsGeometry/ActsGeometryContext.h"
diff --git a/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
index 627bc1cfdf82a5a0a94f7bc8a32c5728e175e2f3..97c4a7ad8052b098eac7f7f3085ca58cf9c24a33 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsVolumeMappingTool.cxx
@@ -6,7 +6,6 @@
 
 // ATHENA
 #include "GaudiKernel/IInterface.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 // PACKAGE
 #include "ActsGeometry/ActsGeometryContext.h"
diff --git a/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h b/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h
index 380aa667da03ab1e3af50ec604946092a5ff5f08..c012a91e8428486546c2b7aabe1ca187f7abcf27 100644
--- a/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h
+++ b/Tracking/Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/IActsExtrapolationTool.h
@@ -10,6 +10,7 @@
 #include "GaudiKernel/IAlgTool.h"
 #include "GaudiKernel/EventContext.h"
 #include "ActsGeometry/ActsGeometryContext.h"
+#include "Acts/MagneticField/MagneticFieldContext.hpp"
 
 #include "Acts/Propagator/MaterialInteractor.hpp"
 #include "Acts/Propagator/detail/SteppingLogger.hpp"
@@ -63,6 +64,9 @@ class IActsExtrapolationTool : virtual public IAlgTool {
   virtual
   const IActsTrackingGeometryTool*
   trackingGeometryTool() const = 0;
+
+  virtual 
+  Acts::MagneticFieldContext getMagneticFieldContext(const EventContext& ctx) const = 0;
 };
 
 #endif
diff --git a/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h b/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
index 412ae34e4a25fbdbd94925b9b34ba83fe613683b..cfb416be91c90eadb1f7fbb522bdbe52a203c271 100644
--- a/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
+++ b/Tracking/Acts/ActsPriVtxFinder/ActsPriVtxFinder/ActsAdaptiveMultiPriVtxFinderTool.h
@@ -19,6 +19,7 @@
 
 // PACKAGE
 #include "ActsGeometryInterfaces/IActsTrackingGeometryTool.h"
+#include "ActsGeometryInterfaces/IActsExtrapolationTool.h"
 #include "ActsGeometry/ActsGeometryContext.h"
 #include "ActsGeometry/ATLASMagneticFieldWrapper.h"
 
@@ -26,7 +27,6 @@
 #include "Acts/Propagator/EigenStepper.hpp"
 #include "Acts/Propagator/Propagator.hpp"
 #include "Acts/Propagator/Navigator.hpp"
-#include "Acts/MagneticField/MagneticFieldContext.hpp"
 #include "Acts/Utilities/Units.hpp"
 #include "Acts/Utilities/Helpers.hpp"
 #include "Acts/Vertexing/AdaptiveMultiVertexFinder.hpp"
@@ -43,10 +43,6 @@
 
 #include <cmath>
 
-namespace MagField {
-  class IMagFieldSvc;
-}
-
 namespace Acts {
 class Surface;
 class BoundaryCheck;
@@ -114,11 +110,12 @@ private:
 
   std::shared_ptr<VertexFinder> m_vertexFinder = nullptr;
 
-  ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle;
   ToolHandle<IActsTrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "", "ActsTrackingGeometryTool"};
+  ToolHandle<IActsExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "", "ActsExtrapolationTool"};
   ToolHandle<InDet::IInDetTrackSelectionTool> m_trkFilter{this, "TrackSelector", "", "InDetTrackSelectionTool"};
   SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
 
+
   // Configuration variables
   // For details check ACTS documentation
   //
diff --git a/Tracking/Acts/ActsPriVtxFinder/CMakeLists.txt b/Tracking/Acts/ActsPriVtxFinder/CMakeLists.txt
index 27be7af70e06f87e0350e0f954997bd6e2ba7418..bb78265c75719445627efe1174e03d293d0e195f 100644
--- a/Tracking/Acts/ActsPriVtxFinder/CMakeLists.txt
+++ b/Tracking/Acts/ActsPriVtxFinder/CMakeLists.txt
@@ -20,7 +20,7 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/GeoPrimitives
                           Event/EventInfo
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagFieldElements MagFieldConditions
                           Calorimeter/CaloDetDescr
                           Tracking/Acts/ActsInterop
                           Tracking/TrkEvent/TrkTrackLink
@@ -68,7 +68,8 @@ atlas_add_library( ActsPriVtxFinderLib
                    VxVertex
                    TrkVertexFitterInterfaces
                    AthenaMonitoringKernelLib
-                   InDetRecToolInterfaces )
+                   InDetRecToolInterfaces 
+                   MagFieldElements MagFieldConditions)
 
 atlas_add_component( ActsPriVtxFinder
                      src/*.cxx
diff --git a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
index 55d42bb2d89f28376c8627adbd5f739cb5637479..3cd5914f102f2921bbbfbb65943659944934fdb5 100755
--- a/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
+++ b/Tracking/Acts/ActsPriVtxFinder/src/ActsAdaptiveMultiPriVtxFinderTool.cxx
@@ -6,7 +6,6 @@
 
 // ATHENA
 #include "GaudiKernel/IInterface.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TrkParticleBase/LinkToTrackParticleBase.h"
 #include "TrkLinks/LinkToXAODTrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
@@ -42,8 +41,7 @@ namespace
 
   ActsAdaptiveMultiPriVtxFinderTool::ActsAdaptiveMultiPriVtxFinderTool(const std::string& type, const std::string& name,
     const IInterface* parent)
-  : base_class(type, name, parent),
-  m_fieldServiceHandle("AtlasFieldSvc", name)
+  : base_class(type, name, parent)
   {}
 
 StatusCode
@@ -59,13 +57,12 @@ ActsAdaptiveMultiPriVtxFinderTool::initialize()
     std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry
     = m_trackingGeometryTool->trackingGeometry();
 
+    ATH_CHECK( m_extrapolationTool.retrieve() );
+
     Acts::Navigator navigator(trackingGeometry);
 
-  	// We need the field service
-    ATH_CHECK( m_fieldServiceHandle.retrieve() );
-    ATH_MSG_INFO("Using ATLAS magnetic field service");
     using BField_t = ATLASMagneticFieldWrapper;
-    BField_t bField(m_fieldServiceHandle.get());
+    BField_t bField;
     auto stepper = Acts::EigenStepper<BField_t>(std::move(bField));
     auto propagator = std::make_shared<Propagator>(std::move(stepper), 
       std::move(navigator));
@@ -220,8 +217,8 @@ ActsAdaptiveMultiPriVtxFinderTool::findVertex(const EventContext& ctx, std::vect
     std::shared_ptr<Acts::PerigeeSurface> perigeeSurface =
     Acts::Surface::makeShared<Acts::PerigeeSurface>(beamSpotPos);
 
-    // TODO: Get the correct magnetic field context
-    Acts::MagneticFieldContext magFieldContext;
+    // Get the magnetic field context
+    Acts::MagneticFieldContext magFieldContext = m_extrapolationTool->getMagneticFieldContext(ctx);
 
     const auto& geoContext
     = m_trackingGeometryTool->getGeometryContext(ctx).any();
diff --git a/Tracking/TrkAlignment/TrkAlignGenAlgs/CMakeLists.txt b/Tracking/TrkAlignment/TrkAlignGenAlgs/CMakeLists.txt
index 92c48607d4f03806d8ce0b7fff443c3ea5b95122..63b6df9d80c852ec051f381db813ac7965e28197 100644
--- a/Tracking/TrkAlignment/TrkAlignGenAlgs/CMakeLists.txt
+++ b/Tracking/TrkAlignment/TrkAlignGenAlgs/CMakeLists.txt
@@ -24,7 +24,7 @@ atlas_add_component( TrkAlignGenAlgs
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib SGtests xAODEventInfo TrkAlignEvent TrkTrack )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib SGtests xAODEventInfo TrkAlignEvent TrkTrack TrkAlignInterfaces )
 
 # Install files from the package:
 atlas_install_headers( TrkAlignGenAlgs )
diff --git a/Tracking/TrkAlignment/TrkAlignGenTools/CMakeLists.txt b/Tracking/TrkAlignment/TrkAlignGenTools/CMakeLists.txt
index 62321a73853a92c78f4235d88e7917367c29ee8c..b119cf6635ff07f9e04390e96b7da61874852094 100644
--- a/Tracking/TrkAlignment/TrkAlignGenTools/CMakeLists.txt
+++ b/Tracking/TrkAlignment/TrkAlignGenTools/CMakeLists.txt
@@ -62,13 +62,13 @@ atlas_add_library( TrkAlignGenToolsLib
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives EventPrimitives xAODTracking GaudiKernel muonEvent TrkAlignEvent TrkEventPrimitives VxVertex TrkFitterUtils StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} AtlasDetDescr xAODEventInfo MuonSegment MuonRecToolInterfaces Particle TrkAlgebraUtils TrkDetElementBase TrkSurfaces TrkCompetingRIOsOnTrack TrkEventUtils TrkMaterialOnTrack TrkMeasurementBase TrkParameters TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack TrkVertexOnTrack TrkExInterfaces TrkFitterInterfaces TrkToolInterfaces TrkVertexFitterInterfaces BeamSpotConditionsData InDetTrackSelectionToolLib )
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives EventPrimitives xAODTracking GaudiKernel muonEvent TrkAlignEvent TrkEventPrimitives VxVertex TrkFitterUtils StoreGateLib SGtests TrkAlignInterfaces
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} AtlasDetDescr xAODEventInfo MuonSegment MuonRecToolInterfaces Particle TrkAlgebraUtils TrkDetElementBase TrkSurfaces TrkCompetingRIOsOnTrack TrkEventUtils TrkMaterialOnTrack TrkMeasurementBase TrkParameters TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack TrkVertexOnTrack TrkExInterfaces TrkFitterInterfaces TrkToolInterfaces TrkVertexFitterInterfaces BeamSpotConditionsData InDetTrackSelectionToolLib InDetAlignGenToolsLib )
 
 atlas_add_component( TrkAlignGenTools
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives EventPrimitives xAODTracking GaudiKernel muonEvent TrkAlignEvent TrkEventPrimitives VxVertex TrkFitterUtils StoreGateLib SGtests AtlasDetDescr xAODEventInfo MuonSegment MuonRecToolInterfaces Particle TrkAlgebraUtils TrkDetElementBase TrkSurfaces TrkCompetingRIOsOnTrack TrkEventUtils TrkMaterialOnTrack TrkMeasurementBase TrkParameters TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack TrkVertexOnTrack TrkExInterfaces TrkFitterInterfaces TrkToolInterfaces TrkVertexFitterInterfaces BeamSpotConditionsData TrkAlignGenToolsLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives EventPrimitives xAODTracking GaudiKernel muonEvent TrkAlignEvent TrkEventPrimitives VxVertex TrkFitterUtils StoreGateLib SGtests AtlasDetDescr xAODEventInfo MuonSegment MuonRecToolInterfaces Particle TrkAlgebraUtils TrkDetElementBase TrkSurfaces TrkCompetingRIOsOnTrack TrkEventUtils TrkMaterialOnTrack TrkMeasurementBase TrkParameters TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack TrkVertexOnTrack TrkExInterfaces TrkFitterInterfaces TrkToolInterfaces TrkVertexFitterInterfaces BeamSpotConditionsData TrkAlignGenToolsLib InDetAlignGenToolsLib InDetTrackSelectionToolLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h
index 56cba7fd6489f97cf6bac21dee560a6a98c17376..d4cefcb7d8c1eb5173709590db66cbb127325b98 100755
--- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h
+++ b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h
@@ -47,7 +47,9 @@ public:
     , m_line{}
     , m_radius{ 0 }
     , m_hasPointAndLine{ 1 }
-  {}
+  {
+    m_line.setZero();
+  }
 
   /** Constructor with point and line, search with direction */
   ComparisonFunction(const Amg::Vector3D& sp, const Amg::Vector3D& dir)
@@ -63,7 +65,10 @@ public:
     , m_line{}
     , m_radius{ std::abs(cradius) }
     , m_hasPointAndLine{ 0 }
-  {}
+  {
+    m_point.setZero();
+    m_line.setZero();
+  }
 
   bool operator()(const T* one, const T* two) const
   {
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h
index aea681e00f1d6ce842911a78676b2a960f2e49a4..523a713d7c40c0a22318ced322cc9b73ac245439 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h
@@ -41,6 +41,14 @@ template<typename T, size_t ALIGNMENT>
 struct AlignedDynArray
 {
 
+  // These come from the posix_memalign
+  // which is the typical underlying implementation
+  static_assert(ALIGNMENT != 0, "Zero alignment 0");
+  static_assert((ALIGNMENT & (ALIGNMENT - 1)) == 0,
+                "Alignment not a power of 2");
+  static_assert((ALIGNMENT % sizeof(void*)) == 0,
+                "Alignment not an integral multiple of sizeof(void*)");
+
   ///@{
   // Standard typedefs
   typedef T value_type;
@@ -56,25 +64,25 @@ struct AlignedDynArray
 
   /// Deleted default constructor
   AlignedDynArray() = delete;
-  
+
   /// Deleted default copy constructor
   AlignedDynArray(AlignedDynArray const&) = delete;
-  
+
   /// Deleted default assignment operator
   AlignedDynArray& operator=(AlignedDynArray const&) = delete;
 
   /// Constructor with default initializing elements
-  explicit AlignedDynArray(size_type n);
- 
+  explicit AlignedDynArray(const size_type n);
+
   /// Constructor initializing elements to value
-  explicit AlignedDynArray(size_type n, const T& value);
+  explicit AlignedDynArray(const size_type n, const T& value);
 
   /// Move copy constructor
   AlignedDynArray(AlignedDynArray&&) noexcept;
- 
+
   /// Move assignment operator
   AlignedDynArray& operator=(AlignedDynArray&&) noexcept;
- 
+
   /// Destructor
   ~AlignedDynArray();
 
@@ -86,7 +94,7 @@ struct AlignedDynArray
 
   /// index array operator
   reference operator[](size_type pos) noexcept;
-  
+
   /// index array operator (const)
   const_reference operator[](size_type pos) const noexcept;
 
@@ -98,7 +106,7 @@ struct AlignedDynArray
 
   /// iterator pointing to the past-the-end  element
   iterator end() noexcept;
- 
+
   /// const iterator pointing to the past-the-end  element
   const_iterator end() const noexcept;
 
@@ -108,15 +116,14 @@ struct AlignedDynArray
   /// returns true is size == 0
   bool empty() const noexcept;
 
-
 private:
   /// Helper method for calling the dtor for the elements
   void cleanup();
 
-  ///Pointer to the underlying buffer
+  /// Pointer to the underlying buffer
   pointer m_buffer = nullptr;
-  
-  ///Num of elements/size
+
+  /// Num of elements/size
   size_type m_size = 0;
 };
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc
index a9b64c6bd030ea6a34e8ccc6489e3549e72f9e72..5a47cbcd38735b4cc3aa55b9b70dbb668b90dd67 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc
@@ -12,21 +12,23 @@
 namespace GSFUtils {
 
 template<typename T, size_t ALIGNMENT>
-inline AlignedDynArray<T, ALIGNMENT>::AlignedDynArray(size_type n)
+inline AlignedDynArray<T, ALIGNMENT>::AlignedDynArray(const size_type n)
   : m_buffer(nullptr)
   , m_size(n)
 {
-  const size_t bufferSize = n * sizeof(T);
+
+  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);
 }
 
 template<typename T, size_t ALIGNMENT>
-inline AlignedDynArray<T, ALIGNMENT>::AlignedDynArray(size_type n, const T& value)
+inline AlignedDynArray<T, ALIGNMENT>::AlignedDynArray(const size_type n,
+                                                      const T& value)
   : m_buffer(nullptr)
   , m_size(n)
 {
-  const size_t bufferSize = n * sizeof(T);
+  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);
 }
@@ -83,15 +85,15 @@ AlignedDynArray<T, ALIGNMENT>::buffer() const noexcept
 
 template<typename T, size_t ALIGNMENT>
 inline typename AlignedDynArray<T, ALIGNMENT>::reference
-  AlignedDynArray<T, ALIGNMENT>::operator[](const std::size_t pos) noexcept
+AlignedDynArray<T, ALIGNMENT>::operator[](const std::size_t pos) noexcept
 {
   return m_buffer[pos];
 }
 
 template<typename T, size_t ALIGNMENT>
 inline typename AlignedDynArray<T, ALIGNMENT>::const_reference
-  AlignedDynArray<T, ALIGNMENT>::operator[](
-    const AlignedDynArray<T, ALIGNMENT>::size_type pos) const noexcept
+AlignedDynArray<T, ALIGNMENT>::operator[](
+  const AlignedDynArray<T, ALIGNMENT>::size_type pos) const noexcept
 {
   return m_buffer[pos];
 }
@@ -133,7 +135,8 @@ AlignedDynArray<T, ALIGNMENT>::size() const noexcept
 }
 
 template<typename T, size_t ALIGNMENT>
-bool AlignedDynArray<T, ALIGNMENT>::empty() const noexcept
+bool
+AlignedDynArray<T, ALIGNMENT>::empty() const noexcept
 {
   return (size() == 0);
 }
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h
index 65d4e5296cd14e1e7615df4077ffd23404a5b792..5b3bd9377b6f4549c578196128e0c3b38fea5df3 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h
@@ -6,7 +6,7 @@
  * @file   GsfMaterialMixtureConvolution.h
  * @date   Thursday 7th September 2006
  * @author Tom Athkinson, Anthony Morley, Christos Anastopoulos
- * @brief Class description for convolution of GSF material mixture 
+ * @brief Class description for convolution of GSF material mixture
  */
 
 #ifndef TrkGsfMaterialMixtureConvolution_H
@@ -21,7 +21,9 @@
 namespace Trk {
 
 class IMultiStateMaterialEffectsUpdator;
+class IMultiStateMaterialEffects;
 class Layer;
+class MaterialProperties;
 
 class GsfMaterialMixtureConvolution
   : public AthAlgTool
@@ -29,6 +31,13 @@ class GsfMaterialMixtureConvolution
 {
 
 public:
+  enum MaterialUpdateType
+  {
+    Normal = 0,
+    Preupdate = 1,
+    Postupdate = 2
+  };
+
   //!< Constructor with AlgTool parameters
   GsfMaterialMixtureConvolution(const std::string&,
                                 const std::string&,
@@ -44,36 +53,41 @@ public:
   virtual StatusCode finalize() override;
 
   //!< Convolution with full material properties
-  virtual MultiComponentState update(std::vector<Trk::IMultiStateMaterialEffects::Cache>&, 
-                                     const MultiComponentState&,
-                                     const Layer&,
-                                     PropDirection direction = anyDirection,
-                                     ParticleHypothesis particleHypothesis =
-                                       nonInteracting) const override final;
+  virtual MultiComponentState update(
+    std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+    const MultiComponentState&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
   //!< Convolution with pre-measurement-update material properties
-  virtual MultiComponentState preUpdate(std::vector<Trk::IMultiStateMaterialEffects::Cache>&, 
-                                        const MultiComponentState&,
-                                        const Layer&,
-                                        PropDirection direction = anyDirection,
-                                        ParticleHypothesis particleHypothesis =
-                                          nonInteracting) const override final;
+  virtual MultiComponentState preUpdate(
+    std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+    const MultiComponentState&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
   //!< Convolution with post-measurement-update material properties
-  virtual MultiComponentState postUpdate(std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
-                                         const MultiComponentState&,
-                                         const Layer&,
-                                         PropDirection direction = anyDirection,
-                                         ParticleHypothesis particleHypothesis =
-                                           nonInteracting) const override final;
-
-  //!< Retain for now redundant simplified material effects
-  virtual MultiComponentState simplifiedMaterialUpdate(
-    const MultiComponentState& multiComponentState,
+  virtual MultiComponentState postUpdate(
+    std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+    const MultiComponentState&,
+    const Layer&,
     PropDirection direction = anyDirection,
     ParticleHypothesis particleHypothesis =
       nonInteracting) const override final;
 
+  //!< Retain for now redundant simplified material effects
+  virtual MultiComponentState simplifiedMaterialUpdate(
+    const MultiComponentState&,
+    PropDirection,
+    ParticleHypothesis) const override final
+  {
+    return {};
+  };
+
 private:
   Gaudi::Property<unsigned int> m_maximumNumberOfComponents{
     this,
@@ -88,6 +102,37 @@ private:
     "Trk::GsfMaterialEffectsUpdator/GsfMaterialEffectsUpdator",
     ""
   };
+
+  ToolHandle<IMultiStateMaterialEffects> m_materialEffects{
+    this,
+    "MaterialEffects",
+    "Trk::GsfCombinedMaterialEffects/GsfCombinedMaterialEffects",
+    ""
+  };
+
+  Gaudi::Property<bool> m_useReferenceMaterial{ this,
+                                                "UseReferenceMaterial",
+                                                false,
+                                                "" };
+
+  Gaudi::Property<double> m_momentumCut{ this,
+                                         "MinimalMomentum",
+                                         250. * Gaudi::Units::MeV,
+                                         "" };
+
+  Trk::MultiComponentState update(
+    std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+    const Trk::MultiComponentState& inputState,
+    const Trk::Layer& layer,
+    Trk::PropDirection direction,
+    Trk::ParticleHypothesis particleHypothesis,
+    MaterialUpdateType updateType) const;
+
+  bool updateP(double& qOverP, double deltaP) const;
+
+  std::pair<const Trk::MaterialProperties*, double> getMaterialProperties(
+    const Trk::TrackParameters* trackParameters,
+    const Trk::Layer& layer) const;
 };
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolutionLM.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolutionLM.h
deleted file mode 100644
index 4611856669cdf962b39a5f1f664ba9b1fa9037d5..0000000000000000000000000000000000000000
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolutionLM.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file   GsfMaterialMixtureConvolutionLM.h
- * @date   Thursday 7th September 2006
- * @author Tom Athkinson, Anthony Morley, Christos Anastopoulos
- * @brief Class description for convolution of GSF material mixture 
- */
-
-#ifndef TrkGsfMaterialMixtureConvolutionLM_H
-#define TrkGsfMaterialMixtureConvolutionLM_H
-
-#include "TrkGaussianSumFilter/IMaterialMixtureConvolution.h"
-#include "TrkMultiComponentStateOnSurface/MultiComponentState.h"
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-
-namespace Trk {
-
-class IMultiStateMaterialEffectsUpdator;
-class IMultiStateMaterialEffects;
-class Layer;
-class MaterialProperties;
-
-class GsfMaterialMixtureConvolutionLM
-  : public AthAlgTool
-  , virtual public IMaterialMixtureConvolution
-{
-
-public:
-  
-  enum MaterialUpdateType{ Normal = 0, Preupdate=1, Postupdate=2 }; 
-
-  //!< Constructor with AlgTool parameters
-  GsfMaterialMixtureConvolutionLM(const std::string&,
-                                const std::string&,
-                                const IInterface*);
-
-  //!< Destructor
-  virtual ~GsfMaterialMixtureConvolutionLM();
-
-  //!< AlgTool initialise method
-  virtual StatusCode initialize() override;
-
-  //!< AlgTool finalize method
-  virtual StatusCode finalize() override;
-
-  //!< Convolution with full material properties
-  virtual MultiComponentState update(std::vector<Trk::IMultiStateMaterialEffects::Cache>&,  
-                                     const MultiComponentState&,
-                                     const Layer&,
-                                     PropDirection direction = anyDirection,
-                                     ParticleHypothesis particleHypothesis =
-                                       nonInteracting) const override final;
-
-  //!< Convolution with pre-measurement-update material properties
-  virtual MultiComponentState preUpdate(std::vector<Trk::IMultiStateMaterialEffects::Cache>&, 
-                                        const MultiComponentState&,
-                                        const Layer&,
-                                        PropDirection direction = anyDirection,
-                                        ParticleHypothesis particleHypothesis =
-                                          nonInteracting) const override final;
-
-  //!< Convolution with post-measurement-update material properties
-  virtual MultiComponentState postUpdate(std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
-                                         const MultiComponentState&,
-                                         const Layer&,
-                                         PropDirection direction = anyDirection,
-                                         ParticleHypothesis particleHypothesis =
-                                           nonInteracting) const override final;
-
-  //!< Retain for now redundant simplified material effects
-  virtual MultiComponentState simplifiedMaterialUpdate(
-    const MultiComponentState& ,
-    PropDirection,
-    ParticleHypothesis) const override final { return {}; };
-
-
- private:
-  Gaudi::Property<unsigned int> m_maximumNumberOfComponents{
-    this,
-    "MaximumNumberOfComponents",
-    12,
-    "Maximum number of components"
-  };
-
-  ToolHandle<IMultiStateMaterialEffectsUpdator> m_updator{
-    this,
-    "MaterialEffectsUpdator",
-    "Trk::GsfMaterialEffectsUpdator/GsfMaterialEffectsUpdator",
-    ""
-  };
-
-  ToolHandle<IMultiStateMaterialEffects> m_materialEffects{
-    this,
-    "MaterialEffects",
-    "Trk::GsfCombinedMaterialEffects/GsfCombinedMaterialEffects",
-    ""
-  };
-  
-  Gaudi::Property<bool> m_useReferenceMaterial{
-    this,
-    "UseReferenceMaterial",
-    false,
-    ""
-  };
-  
-  Gaudi::Property<double> m_momentumCut{
-    this,
-    "MinimalMomentum",
-    250. * Gaudi::Units::MeV,
-    ""
-  };
-
-
-  Trk::MultiComponentState update(
-    std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
-    const Trk::MultiComponentState& inputState,
-    const Trk::Layer& layer,
-    Trk::PropDirection direction,
-    Trk::ParticleHypothesis particleHypothesis,
-    MaterialUpdateType  updateType) const;
- 
-  bool updateP(double& qOverP,  double deltaP) const;
-  
-  std::pair< const Trk::MaterialProperties*, double >  getMaterialProperties( 
-    const Trk::TrackParameters* trackParameters,
-    const Trk::Layer& layer ) const;
- 
-
-};
-
-} // end Trk namespace
-
-#endif
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
index b44311b4fc9d3cad9e28117910a429d44b8f4149..cb7ae7b385e7b537672ace9385e00bf358d59389 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
@@ -30,10 +30,10 @@
  *
  * [ (1,0) ] <br>
  * [ (2,0), (2,1) ] <br>
- * [ (3,0), (3,1), (3,2)] <br> 
+ * [ (3,0), (3,1), (3,2)] <br>
  * [ (4,0), (4,1), (4,2) , (4,3) <br>
  * [.............................] <br>
- * [(N-1,0),(N-1,1),(N-1,2),(N-1,3) ... (N-1,N-2)]<br> 
+ * [(N-1,0),(N-1,1),(N-1,2),(N-1,3) ... (N-1,N-2)]<br>
  *
  * With size 1+2+3+ .... (N-1) = N*(N-1)/2
  *
@@ -44,7 +44,7 @@
  * (2,0) => 2 *(2-1)/2 + 0 => 1 <br>
  * (2,1) => 2 *(2-1)/2 + 1 => 2 <br>
  * (3,0) => 3 * (3-1)/2 +0 => 3 <br>
- *  
+ *
  * Leading to <br>
  * [(1,0),(2,0),(2,1),(3,0),(3,1),(3,2).... (N-1,N-2)]
  *
@@ -99,7 +99,7 @@ struct Component1D
 /**
  * @brief Helper struct to map position in
  * triangular array to I, J indices
- */ 
+ */
 struct triangularToIJ
 {
   int32_t I = -1;
@@ -121,16 +121,22 @@ findMerges(Component1D* componentsIn,
  */
 #if HAVE_FUNCTION_MULTIVERSIONING
 #if defined(__x86_64__)
-__attribute__((target("avx2"))) std::pair<int32_t, float>
+__attribute__((target("avx2")))
+int32_t
 findMinimumIndex(const float* distancesIn, const int32_t n);
-__attribute__((target("sse4.1"))) std::pair<int32_t, float>
+
+__attribute__((target("sse4.1")))
+int32_t
 findMinimumIndex(const float* distancesIn, const int32_t n);
-__attribute__((target("sse2"))) std::pair<int32_t, float>
+
+__attribute__((target("sse2")))
+int32_t
 findMinimumIndex(const float* distancesIn, const int32_t n);
 #endif // x86_64 specific targets
+
 __attribute__((target("default")))
 #endif // function multiversioning
-std::pair<int32_t, float>
+int32_t
 findMinimumIndex(const float* distancesIn, const int32_t n);
 
 } // namespace KLGaussianMixtureReduction
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx
index 251154f86a8996fae6eb3031eb7ece63562786c1..99417a5534f4c2f017cb1407f4ec72ae02407d96 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx
@@ -33,6 +33,7 @@ decription           : Implementation code for GsfExtrapolator class
 #include "TrkTrack/TrackStateOnSurface.h"
 
 #include <utility>
+#include <unordered_set>
 
 namespace {
 const bool useBoundaryMaterialUpdate(true);
@@ -482,7 +483,7 @@ Trk::GsfExtrapolator::extrapolate(
     ATH_MSG_DEBUG("MultiComponentState is empty...");
     return {};
   }
-  
+
   cache.reset();
 
   // Set the propagator to that one corresponding to the configuration level
@@ -706,7 +707,7 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(
                                                          *navigationParameters,
                                                          direction,
                                                          trackingVolume);
-   
+
     nextVolume = nextNavigationCell.nextVolume;
     if (navigationPropagatorIndex >= 1) {
       delete navigationParameters;
@@ -961,7 +962,7 @@ Trk::GsfExtrapolator::extrapolateFromLayerToLayer(
   const Trk::Layer* nextLayer =
     currentLayer->nextLayer(currentPosition, currentDirection);
 
-  std::set<const Trk::Layer*> layersHit;
+  std::unordered_set<const Trk::Layer*> layersHit;
   layersHit.insert(currentLayer);
 
   // Begin while loop over all intermediate layers
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx
index eabd4ae974bf1d4644bf7deab9d3d72928749d5b..c684643aacc647afc6d353779f55505b220f261b 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx
@@ -1,18 +1,21 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2020-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /*************************************************************************************
       GsfMaterialMixtureConvolution.cxx  -  description
       -------------------------------------------------
-begin                : Thursday 7th September 2006
-author               : atkinson
-email                : Tom.Atkinson@cern.ch
+author               : amorley
+email                : amorley@cern.ch
 decription           : Implementation code for GSF material mixture convolution
+that uses less mem
 ************************************************************************************/
 
 #include "TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h"
+#include "TrkGaussianSumFilter/AlignedDynArray.h"
+#include "TrkGaussianSumFilter/IMultiStateMaterialEffects.h"
 #include "TrkGaussianSumFilter/IMultiStateMaterialEffectsUpdator.h"
+#include "TrkGaussianSumFilter/KLGaussianMixtureReduction.h"
 #include "TrkGaussianSumFilter/MultiComponentStateAssembler.h"
 #include "TrkGaussianSumFilter/MultiComponentStateCombiner.h"
 #include "TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h"
@@ -37,11 +40,9 @@ StatusCode
 Trk::GsfMaterialMixtureConvolution::initialize()
 {
 
-  if (m_updator.retrieve().isFailure()) {
-    ATH_MSG_ERROR("Could not retrieve the material effects updator instance "
-                  << m_updator.typeAndName() << "... Exiting");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(m_updator.retrieve());
+
+  ATH_CHECK(m_materialEffects.retrieve());
 
   return StatusCode::SUCCESS;
 }
@@ -58,7 +59,7 @@ Trk::GsfMaterialMixtureConvolution::finalize()
 
 Trk::MultiComponentState
 Trk::GsfMaterialMixtureConvolution::update(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
   const Trk::MultiComponentState& multiComponentState,
   const Trk::Layer& layer,
   Trk::PropDirection direction,
@@ -72,65 +73,27 @@ Trk::GsfMaterialMixtureConvolution::update(
     ATH_MSG_DEBUG("UPDATE but no material properties!!!");
   }
 
-  /* -------------------------------------
-     Preliminary checks
-     ------------------------------------- */
-
-  // Assembler Cache
-  MultiComponentStateAssembler::Cache cache;
-  // Reset the assembler
-  MultiComponentStateAssembler::reset(cache);
-
-  // Check the multi-component state is populated
-  if (multiComponentState.empty()) {
-    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();
-
-  for (; component != multiComponentState.end(); ++component) {
-
-    Trk::MultiComponentState updatedState =
-      m_updator->updateState(*component, layer, direction, particleHypothesis);
-
-    if (updatedState.empty()) {
-      continue;
-    }
-
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(
-      cache, std::move(updatedState));
-
-    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);
-
-  ATH_MSG_DEBUG("UPDATE update N in: " <<  multiComponentState.size() <<" N out: "<< mergedState.size() );
-  if (mergedState.empty()) {
+  Trk::MultiComponentState updatedMergedState = update(
+    caches, multiComponentState, layer, direction, particleHypothesis, Normal);
+  ATH_MSG_DEBUG("UPDATE update N in: " << multiComponentState.size()
+                                       << " N out: "
+                                       << updatedMergedState.size());
+  if (updatedMergedState.empty()) {
     return {};
   }
   // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(mergedState);
+  MultiComponentStateHelpers::renormaliseState(updatedMergedState);
 
-  return mergedState;
+  return updatedMergedState;
 }
 
 /* ==========================================
    Update with pre-update material effects
-   ========================================== */
+========================================== */
 
 Trk::MultiComponentState
 Trk::GsfMaterialMixtureConvolution::preUpdate(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
   const Trk::MultiComponentState& multiComponentState,
   const Trk::Layer& layer,
   Trk::PropDirection direction,
@@ -144,50 +107,22 @@ Trk::GsfMaterialMixtureConvolution::preUpdate(
   /* -------------------------------------
      Preliminary checks
      ------------------------------------- */
-  // Assembler Cache
-  MultiComponentStateAssembler::Cache cache;
-
-  // Check the multi-component state is populated
-  if (multiComponentState.empty()) {
-    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();
-
-  for (; component != multiComponentState.end(); ++component) {
-
-    Trk::MultiComponentState updatedState = m_updator->preUpdateState(
-      *component, layer, direction, particleHypothesis);
-     ATH_MSG_DEBUG("PREUPDATE update component result size:  " <<  updatedState.size() );
-    if (updatedState.empty()) {
-      continue;
-    }
-
-    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_DEBUG("PREUPDATE before merge N: " <<  cache.multiComponentState.size()  );
-  Trk::MultiComponentState mergedState =
-    QuickCloseComponentsMultiStateMerger::merge(
-      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
-
-  ATH_MSG_DEBUG("PREUPDATE update N in: " <<  multiComponentState.size() <<" N out: "<< mergedState.size() );
-  if (mergedState.empty()) {
+  Trk::MultiComponentState updatedMergedState = update(caches,
+                                                       multiComponentState,
+                                                       layer,
+                                                       direction,
+                                                       particleHypothesis,
+                                                       Preupdate);
+  ATH_MSG_DEBUG("PREUPDATE update N in: " << multiComponentState.size()
+                                          << " N out: "
+                                          << updatedMergedState.size());
+  if (updatedMergedState.empty()) {
     return {};
   }
   // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(mergedState);
+  MultiComponentStateHelpers::renormaliseState(updatedMergedState);
 
-  return mergedState;
+  return updatedMergedState;
 }
 
 /* ==========================================
@@ -196,7 +131,7 @@ Trk::GsfMaterialMixtureConvolution::preUpdate(
 
 Trk::MultiComponentState
 Trk::GsfMaterialMixtureConvolution::postUpdate(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>&,
+  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
   const Trk::MultiComponentState& multiComponentState,
   const Trk::Layer& layer,
   Trk::PropDirection direction,
@@ -212,149 +147,382 @@ Trk::GsfMaterialMixtureConvolution::postUpdate(
      Preliminary checks
      ------------------------------------- */
 
-  // Assembler Cache
-  MultiComponentStateAssembler::Cache cache;
+  Trk::MultiComponentState updatedMergedState = update(caches,
+                                                       multiComponentState,
+                                                       layer,
+                                                       direction,
+                                                       particleHypothesis,
+                                                       Postupdate);
+
+  ATH_MSG_DEBUG("POSTUPDATE update N in: " << multiComponentState.size()
+                                           << " N out: "
+                                           << updatedMergedState.size());
+  if (updatedMergedState.empty()) {
+    return {};
+  }
+  // Renormalise state
+  MultiComponentStateHelpers::renormaliseState(updatedMergedState);
+
+  return updatedMergedState;
+}
+
+Trk::MultiComponentState
+Trk::GsfMaterialMixtureConvolution::update(
+  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
+  const Trk::MultiComponentState& inputState,
+  const Trk::Layer& layer,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis,
+  MaterialUpdateType updateType) const
+{
 
   // Check the multi-component state is populated
-  if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is "
+  if (inputState.empty()) {
+    ATH_MSG_DEBUG("Multi component state passed to update is "
                   "not populated... returning 0");
     return {};
   }
 
-  // Loop over all components and perform material effects update separately
-  Trk::MultiComponentState::const_iterator component =
-    multiComponentState.begin();
+  double updateFactor(1.);
+  // Full method does this for each component which i don't think this is needed
+  if (updateType == Preupdate) {
+    updateFactor =
+      layer.preUpdateMaterialFactor(*inputState.front().first, direction);
+    ATH_MSG_DEBUG("Material effects update prior to propagation using layer "
+                  "information and particle hypothesis: "
+                  << particleHypothesis);
+  } else if (updateType == Postupdate) {
+    updateFactor =
+      layer.postUpdateMaterialFactor(*inputState.front().first, direction);
+    ATH_MSG_DEBUG("Material effects update after propagation using layer "
+                  "information and particle hypothesis: "
+                  << particleHypothesis);
+  }
 
-  for (; component != multiComponentState.end(); ++component) {
+  if (updateFactor < 0.01) {
+    // Bail out as factor is too small to bother about
+    return {};
+  }
 
-    Trk::MultiComponentState updatedState = m_updator->postUpdateState(
-      *component, layer, direction, particleHypothesis);
+  caches.resize(inputState.size());
+
+  // Fill cache and work out how many final components there should be
+  size_t n(0);
+  for (size_t i(0); i < inputState.size(); ++i) {
+    const AmgSymMatrix(5)* measuredCov = inputState[i].first->covariance();
+    // If the momentum is too dont apply material effects
+    if (inputState[i].first->momentum().mag() <= m_momentumCut) {
+      ATH_MSG_DEBUG("Ignoring material effects... Momentum too low");
+      caches[i].resetAndAddDummyValues();
+      caches[i].deltaParameters[0] = inputState[i].first->parameters();
+      caches[i].weights[0] = inputState[i].second;
+      if (measuredCov) {
+        caches[i].deltaCovariances[0] += *measuredCov;
+      }
+      n += caches[i].weights.size();
+      continue;
+    }
 
-    if (updatedState.empty()) {
+    // Get the material effects and store them in the cache
+    std::pair<const Trk::MaterialProperties*, double> matPropPair =
+      getMaterialProperties(inputState[i].first.get(), layer);
+
+    if (!matPropPair.first) {
+      ATH_MSG_DEBUG("No material properties .. dont apply material effects");
+      caches[i].resetAndAddDummyValues();
+      caches[i].deltaParameters[0] = inputState[i].first->parameters();
+      caches[i].weights[0] = inputState[i].second;
+      if (measuredCov) {
+        caches[i].deltaCovariances[0] += *measuredCov;
+      }
+      n += caches[i].weights.size();
       continue;
     }
 
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(
-      cache, std::move(updatedState));
+    // Apply the update factor
+    matPropPair.second *= updateFactor;
+
+    m_materialEffects->compute(caches[i],
+                               inputState[i],
+                               *matPropPair.first,
+                               matPropPair.second,
+                               direction,
+                               particleHypothesis);
+
+    // check vectors have the same size
+    if (caches[i].weights.size() != caches[i].deltaPs.size()) {
+      ATH_MSG_ERROR("Inconsistent number of components in the updator!!! no "
+                    "material effect will be applied");
+      caches[i].resetAndAddDummyValues();
+    }
 
-    if (!componentAdded) {
-      ATH_MSG_WARNING(
-        "Component could not be added to the state in the assembler");
+    // Apply material effects to input state and store results in cache
+    for (size_t j(0); j < caches[i].weights.size(); ++j) {
+      if (measuredCov) {
+        caches[i].deltaCovariances[j] += *measuredCov;
+      } else {
+        caches[i].deltaCovariances[j].setZero();
+      }
+      caches[i].deltaParameters[j] = inputState[i].first->parameters();
+      // Adjust the momentum of the component's parameters vector here. Check to
+      // make sure update is good.
+      if (!updateP(caches[i].deltaParameters[j][Trk::qOverP],
+                   caches[i].deltaPs[j])) {
+        ATH_MSG_ERROR("Cannot update state vector momentum!!! return nullptr");
+        return {};
+      }
+      // Store component weight
+      caches[i].weights[j] *= inputState[i].second;
+      // Ensure weight of component is not too small to save us from potential
+      // FPE's Value chosen to be sufficiently small so that the final state
+      // will not be impacted
+      if (caches[i].weights[j] < 1e-12) {
+        caches[i].weights[j] = 1e-12;
+      }
     }
+    n += caches[i].weights.size();
   }
 
-  Trk::MultiComponentState mergedState =
-    QuickCloseComponentsMultiStateMerger::merge(
-      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
+  // Fill information for to calculate which components to merge
+  // Inaddition scan all components for covariance matrices. If one or more
+  // component is missing an error matrix, component reduction is impossible.
+  bool componentWithoutMeasurement = false;
+
+  GSFUtils::AlignedDynArray<GSFUtils::Component1D, GSFUtils::alignment>
+    components(n);
+  size_t k(0);
+  std::vector<std::pair<size_t, size_t>> indices(n);
+  for (size_t i(0); i < inputState.size(); ++i) {
+    for (size_t j(0); j < caches[i].weights.size(); ++j) {
+      const AmgSymMatrix(5)* measuredCov = inputState[i].first->covariance();
+      // Fill in infomation
+      const double cov =
+        measuredCov ? caches[i].deltaCovariances[j](Trk::qOverP, Trk::qOverP)
+                    : -1.;
+      if (!measuredCov) {
+        componentWithoutMeasurement = true;
+      }
+
+      components[k].mean = caches[i].deltaParameters[j][Trk::qOverP];
+      components[k].cov = cov;
+      components[k].invCov = cov > 0 ? 1. / cov : 1e10;
+      components[k].weight = caches[i].weights[j];
+      indices[k] = { i, j };
+      ++k;
+    }
+  }
 
-  ATH_MSG_DEBUG("POSTUPDATE update N in: " <<  multiComponentState.size() <<" N out: "<< mergedState.size() );
-  if (mergedState.empty()) {
-    return {};
+  if (componentWithoutMeasurement) {
+    auto result = std::max_element(
+      components.begin(), components.end(), [](const auto& a, const auto& b) {
+        return a.weight < b.weight;
+      });
+    auto index = std::distance(components.begin(), result);
+
+    // Build the first TP
+    size_t stateIndex = indices[index].first;
+    size_t materialIndex = indices[index].second;
+
+    AmgVector(5)& updatedStateVector =
+      caches[stateIndex].deltaParameters[materialIndex];
+    const AmgSymMatrix(5)* measuredCov =
+      inputState[stateIndex].first->covariance();
+    AmgSymMatrix(5)* updatedCovariance = nullptr;
+    if (measuredCov &&
+        caches[stateIndex].deltaCovariances.size() > materialIndex) {
+      updatedCovariance =
+        new AmgSymMatrix(5)(caches[stateIndex].deltaCovariances[materialIndex]);
+    }
+    Trk::TrackParameters* updatedTrackParameters =
+      inputState[stateIndex].first->associatedSurface().createTrackParameters(
+        updatedStateVector[Trk::loc1],
+        updatedStateVector[Trk::loc2],
+        updatedStateVector[Trk::phi],
+        updatedStateVector[Trk::theta],
+        updatedStateVector[Trk::qOverP],
+        updatedCovariance);
+
+    Trk::ComponentParameters dummyCompParams(updatedTrackParameters, 1.);
+    Trk::MultiComponentState returnMultiState;
+    returnMultiState.push_back(std::move(dummyCompParams));
+    return returnMultiState;
   }
-  // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(mergedState);
 
-  return mergedState;
-}
+  // Gather the merges -- order is important -- RHS is smaller than LHS
+  std::vector<std::pair<int32_t, int32_t>> merges;
+  if (n > m_maximumNumberOfComponents)
+    merges = findMerges(components.buffer(), n, m_maximumNumberOfComponents);
+
+  // Merge components
+  MultiComponentStateAssembler::Cache assemblerCache;
+  int nMerges(0);
+  std::vector<bool> isMerged(n, false);
+  for (const auto& mergePair : merges) {
+    const int32_t mini = mergePair.first;
+    const int32_t minj = mergePair.second;
+    if (isMerged[minj]) {
+      ATH_MSG_WARNING("Component is already merged " << minj);
+      for (const auto& mergePair2 : merges) {
+        ATH_MSG_DEBUG("Pairs that should be merged together: "
+                      << mergePair2.first << "  " << mergePair2.second);
+      }
+      continue;
+    }
+    // Get the first TP
+    size_t stateIndex = indices[mini].first;
+    size_t materialIndex = indices[mini].second;
+    AmgVector(5)& stateVector =
+      caches[stateIndex].deltaParameters[materialIndex];
+    AmgSymMatrix(5)& measuredCov =
+      caches[stateIndex].deltaCovariances[materialIndex];
+
+    // Get the second TP
+    size_t stateIndex2 = indices[minj].first;
+    size_t materialIndex2 = indices[minj].second;
+
+    // Some values for sanity checks
+    ++nMerges;
+    isMerged[minj] = true;
+
+    // Copy weight and first parameters as they are needed later on
+    const AmgVector(5) firstParameters = stateVector;
+    const double firstWeight = caches[stateIndex].weights[materialIndex];
+
+    // Update first parameters and weight
+    Trk::MultiComponentStateCombiner::combineParametersWithWeight(
+      caches[stateIndex].deltaParameters[materialIndex],
+      caches[stateIndex].weights[materialIndex],
+      caches[stateIndex2].deltaParameters[materialIndex2],
+      caches[stateIndex2].weights[materialIndex2]);
+    // Update first cov
+    Trk::MultiComponentStateCombiner::combineCovWithWeight(
+      firstParameters,
+      measuredCov,
+      firstWeight,
+      caches[stateIndex2].deltaParameters[materialIndex2],
+      caches[stateIndex2].deltaCovariances[materialIndex2],
+      caches[stateIndex2].weights[materialIndex2]);
+
+    // Reset 2nd parameters values just for clarity
+    caches[stateIndex2].deltaParameters[materialIndex2].setZero();
+    caches[stateIndex2].deltaCovariances[materialIndex2].setZero();
+  }
 
-/* ==========================================
-   Update with simplified material effects
-   ========================================== */
+  for (size_t i(0); i < n; ++i) {
+    if (isMerged[i])
+      continue;
 
-Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolution::simplifiedMaterialUpdate(
-  const Trk::MultiComponentState& multiComponentState,
-  Trk::PropDirection direction,
-  Trk::ParticleHypothesis particleHypothesis) const
-{
-  /* -------------------------------------
-     Preliminary checks
-     ------------------------------------- */
-  // Assembler Cache
-  MultiComponentStateAssembler::Cache cache;
+    // Build the TP
+    size_t stateIndex = indices[i].first;
+    size_t materialIndex = indices[i].second;
+    AmgVector(5)& stateVector =
+      caches[stateIndex].deltaParameters[materialIndex];
+    AmgSymMatrix(5)& measuredCov =
+      caches[stateIndex].deltaCovariances[materialIndex];
+
+    Trk::TrackParameters* updatedTrackParameters =
+      inputState[stateIndex].first->associatedSurface().createTrackParameters(
+        stateVector[Trk::loc1],
+        stateVector[Trk::loc2],
+        stateVector[Trk::phi],
+        stateVector[Trk::theta],
+        stateVector[Trk::qOverP],
+        new AmgSymMatrix(5)(measuredCov));
+
+    double updatedWeight = caches[stateIndex].weights[materialIndex];
+
+    assemblerCache.multiComponentState.emplace_back(updatedTrackParameters,
+                                                    updatedWeight);
+    assemblerCache.validWeightSum += updatedWeight;
+  }
 
-  // Check the multi-component state is populated
-  if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is "
-                  "not populated... returning 0");
-    return {};
+  if (nMerges + assemblerCache.multiComponentState.size() != n) {
+    ATH_MSG_WARNING("Combining complete but merger size is incompatible: "
+                    << n << "  " << nMerges << " "
+                    << assemblerCache.multiComponentState.size());
   }
 
-  // Hardwired material effects based on approximate material distribution
-  std::unique_ptr<Trk::TrackParameters> combinedState =
-    MultiComponentStateCombiner::combine(multiComponentState);
-  const Amg::Vector3D& globalPosition = combinedState->position();
+  // Check all weights
+  Trk::MultiComponentState mergedState =
+    MultiComponentStateAssembler::assembledState(assemblerCache);
 
-  const Trk::MaterialProperties* materialProperties = nullptr;
+  if (mergedState.size() > m_maximumNumberOfComponents)
+    ATH_MSG_ERROR("Merging failed, target size: " << m_maximumNumberOfComponents
+                                                  << " final size: "
+                                                  << mergedState.size());
+  return mergedState;
+}
 
-  // 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);
+bool
+Trk::GsfMaterialMixtureConvolution::updateP(double& qOverP, double deltaP) const
+{
+  double p = 1. / std::abs(qOverP);
+  p += deltaP;
+  if (p <= 0.) {
+    return false;
   }
+  qOverP = qOverP > 0. ? 1. / p : -1. / p;
+  return true;
+}
 
-  // 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);
-  }
+std::pair<const Trk::MaterialProperties*, double>
+Trk::GsfMaterialMixtureConvolution::getMaterialProperties(
+  const Trk::TrackParameters* trackParameters,
+  const Trk::Layer& layer) const
+{
 
-  if (!materialProperties) {
-    return std::move(*MultiComponentStateHelpers::clone(multiComponentState));
-  }
+  const Trk::MaterialProperties* materialProperties(nullptr);
+  double pathCorrection(0.);
 
-  // Exclude material effects on the perigee surface
-  const Trk::Surface* associatedSurface = &(combinedState->associatedSurface());
-  const Trk::PerigeeSurface* perigeeSurface = nullptr;
-  if (associatedSurface && associatedSurface->type() == Trk::Surface::Perigee) {
-    perigeeSurface = static_cast<const Trk::PerigeeSurface*>(associatedSurface);
-  }
-  if (perigeeSurface) {
-    delete materialProperties;
-    return std::move(*MultiComponentStateHelpers::clone(multiComponentState));
-  }
+  // Incorporate the reference material
 
-  // Assume tracks normal to detector surface. Approximation resonable for the
-  // CTB
-  double pathLength = materialProperties->thickness();
+  if (m_useReferenceMaterial) {
 
-  // Loop over all components and perform material effects update separately
-  Trk::MultiComponentState::const_iterator component =
-    multiComponentState.begin();
+    // Get the surface associated with the parameters
+    const Trk::Surface* surface = &(trackParameters->associatedSurface());
 
-  for (; component != multiComponentState.end(); ++component) {
-    Trk::MultiComponentState updatedState =
-      m_updator->updateState(*component,
-                             *materialProperties,
-                             pathLength,
-                             direction,
-                             particleHypothesis);
+    // Only utilise the reference material if an associated detector element
+    // exists
+    if (surface && surface->associatedDetectorElement()) {
 
-    if (updatedState.empty()) {
-      continue;
-    }
+      // Get the layer material properties
+      const Trk::LayerMaterialProperties* layerMaterial =
+        layer.layerMaterialProperties();
 
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(
-      cache, std::move(updatedState));
+      // Assign the material properties
+      materialProperties =
+        layerMaterial ? layerMaterial->fullMaterial(trackParameters->position())
+                      : nullptr;
 
-    if (!componentAdded) {
-      ATH_MSG_WARNING(
-        "Component could not be added to the state in the assembler");
+      // Determine the pathCorrection if the material properties exist
+      pathCorrection = materialProperties
+                         ? 1. / std::abs(surface->normal().dot(
+                                  trackParameters->momentum().unit()))
+                         : 0.;
     }
+  }
 
-  } // end loop over components
-
-  Trk::MultiComponentState mergedState =
-    QuickCloseComponentsMultiStateMerger::merge(
-      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
+  // Check that the material properties have been defined - if not define them
+  // from the layer information
+  materialProperties = materialProperties
+                         ? materialProperties
+                         : layer.fullUpdateMaterialProperties(*trackParameters);
 
-  if (mergedState.empty()) {
-    return {};
+  // Bail out if still no material properties can be found
+  if (!materialProperties) {
+    return { nullptr, 0 };
   }
-  // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(mergedState);
 
-  return mergedState;
+  // 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
+  double pathLength = pathCorrection * materialProperties->thickness();
+
+  return { materialProperties, pathLength };
 }
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolutionLM.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolutionLM.cxx
deleted file mode 100644
index 6a1e0184f32ee99f44229d99322a1f9e66e8696b..0000000000000000000000000000000000000000
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolutionLM.cxx
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
-  Copyright (C) 2020-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-/*************************************************************************************
-      GsfMaterialMixtureConvolutionLM.cxx  -  description
-      -------------------------------------------------
-author               : amorley
-email                : amorley@cern.ch
-decription           : Implementation code for GSF material mixture convolution that uses less mem
-************************************************************************************/
-
-#include "TrkGaussianSumFilter/GsfMaterialMixtureConvolutionLM.h"
-#include "TrkGaussianSumFilter/IMultiStateMaterialEffectsUpdator.h"
-#include "TrkGaussianSumFilter/IMultiStateMaterialEffects.h"
-#include "TrkGaussianSumFilter/MultiComponentStateAssembler.h"
-#include "TrkGaussianSumFilter/MultiComponentStateCombiner.h"
-#include "TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h"
-#include "TrkGeometry/Layer.h"
-#include "TrkGeometry/MaterialProperties.h"
-#include "TrkGaussianSumFilter/AlignedDynArray.h"
-#include "TrkGaussianSumFilter/KLGaussianMixtureReduction.h"
-
-#include "TrkMultiComponentStateOnSurface/MultiComponentState.h"
-#include "TrkSurfaces/PerigeeSurface.h"
-
-Trk::GsfMaterialMixtureConvolutionLM::GsfMaterialMixtureConvolutionLM(
-  const std::string& type,
-  const std::string& name,
-  const IInterface* parent)
-  : AthAlgTool(type, name, parent)
-{
-  declareInterface<IMaterialMixtureConvolution>(this);
-}
-
-Trk::GsfMaterialMixtureConvolutionLM::~GsfMaterialMixtureConvolutionLM() = default;
-
-StatusCode
-Trk::GsfMaterialMixtureConvolutionLM::initialize()
-{
- 
-  ATH_CHECK( m_updator.retrieve() ); 
-  
-  ATH_CHECK( m_materialEffects.retrieve() );
-  
-  return StatusCode::SUCCESS;
-}
-
-StatusCode
-Trk::GsfMaterialMixtureConvolutionLM::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
-/* ==========================================
-   Update with full material effects
-   ========================================== */
-
-Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolutionLM::update(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
-  const Trk::MultiComponentState& multiComponentState,
-  const Trk::Layer& layer,
-  Trk::PropDirection direction,
-  Trk::ParticleHypothesis particleHypothesis) const
-{
-
-  const Trk::MaterialProperties* materialProperties =
-    layer.fullUpdateMaterialProperties(*(multiComponentState.begin()->first));
-
-  if (!materialProperties) {
-    ATH_MSG_DEBUG("UPDATE but no material properties!!!");
-  }
-  
-  Trk::MultiComponentState updatedMergedState = update( caches, 
-                                                 multiComponentState,
-                                                 layer,
-                                                 direction,
-                                                 particleHypothesis,
-                                                 Normal );
-  ATH_MSG_DEBUG("UPDATE update N in: " <<  multiComponentState.size() <<" N out: "<< updatedMergedState.size() );
-  if (updatedMergedState.empty()) {
-    return {};
-  }
-  // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(updatedMergedState);
-
-  return updatedMergedState;
-}
-
-/* ==========================================
-   Update with pre-update material effects
-========================================== */
-
-Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolutionLM::preUpdate(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
-  const Trk::MultiComponentState& multiComponentState,
-  const Trk::Layer& layer,
-  Trk::PropDirection direction,
-  Trk::ParticleHypothesis particleHypothesis) const
-{
-  const Trk::MaterialProperties* materialProperties =
-    layer.fullUpdateMaterialProperties(*(multiComponentState.begin()->first));
-  if (!materialProperties) {
-    ATH_MSG_DEBUG("PREUPDATE but no material properties!!!");
-  }
-  /* -------------------------------------
-     Preliminary checks
-     ------------------------------------- */
-  Trk::MultiComponentState updatedMergedState = update( caches,
-                                                 multiComponentState,
-                                                 layer,
-                                                 direction,
-                                                 particleHypothesis,
-                                                 Preupdate );
-  ATH_MSG_DEBUG("PREUPDATE update N in: " <<  multiComponentState.size() <<" N out: "<< updatedMergedState.size() );
-  if (updatedMergedState.empty()) {
-    return {};
-  }
-  // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(updatedMergedState);
-
-  return updatedMergedState;
-}
-
-/* ==========================================
-   Update with post-update material effects
-   ========================================== */
-
-Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolutionLM::postUpdate(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
-  const Trk::MultiComponentState& multiComponentState,
-  const Trk::Layer& layer,
-  Trk::PropDirection direction,
-  Trk::ParticleHypothesis particleHypothesis) const
-{
-
-  const Trk::MaterialProperties* materialProperties =
-    layer.fullUpdateMaterialProperties(*(multiComponentState.begin()->first));
-  if (!materialProperties) {
-    ATH_MSG_DEBUG("POSTUPDATE but no material properties!!!");
-  }
-  /* -------------------------------------
-     Preliminary checks
-     ------------------------------------- */
-
-  Trk::MultiComponentState updatedMergedState = update( caches, 
-                                                 multiComponentState,
-                                                 layer,
-                                                 direction,
-                                                 particleHypothesis,
-                                                 Postupdate );
-                                                  
-  
-  ATH_MSG_DEBUG("POSTUPDATE update N in: " <<  multiComponentState.size() <<" N out: "<< updatedMergedState.size() );
-  if (updatedMergedState.empty()) {
-    return {};
-  }
-  // Renormalise state
-  MultiComponentStateHelpers::renormaliseState(updatedMergedState);
-
-
-  return updatedMergedState;
-}
-
-
-
-Trk::MultiComponentState  Trk::GsfMaterialMixtureConvolutionLM::update(
-  std::vector<Trk::IMultiStateMaterialEffects::Cache>& caches,
-  const Trk::MultiComponentState& inputState,
-  const Trk::Layer& layer,
-  Trk::PropDirection direction,
-  Trk::ParticleHypothesis particleHypothesis,
-  MaterialUpdateType  updateType) const
-{
-
-
-  // Check the multi-component state is populated
-  if (inputState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to update is "
-                  "not populated... returning 0");
-    return {};
-  }
-
- 
-  double updateFactor(1.);  
-  // Full method does this for each component which i don't think this is needed
-  if( updateType == Preupdate ){
-    updateFactor = layer.preUpdateMaterialFactor(*inputState.front().first, direction);  
-    ATH_MSG_DEBUG("Material effects update prior to propagation using layer "
-                  "information and particle hypothesis: "
-                  << particleHypothesis);
-  } else if ( updateType == Postupdate) {
-    updateFactor = layer.postUpdateMaterialFactor( *inputState.front().first, direction);
-    ATH_MSG_DEBUG("Material effects update after propagation using layer "
-                  "information and particle hypothesis: "
-                  << particleHypothesis);
-  } 
-
-  if( updateFactor < 0.01 ){ 
-    //Bail out as factor is too small to bother about
-    return {};
-  } 
-
-
-  caches.resize( inputState.size() );
-  
-  // Fill cache and work out how many final components there should be
-  size_t n(0);
-  for( size_t i(0) ; i < inputState.size(); ++i){
-    const AmgSymMatrix(5)* measuredCov = inputState[i].first->covariance();
-    //If the momentum is too dont apply material effects
-    if( inputState[i].first->momentum().mag() <=  m_momentumCut ){
-      ATH_MSG_DEBUG("Ignoring material effects... Momentum too low");
-      caches[i].resetAndAddDummyValues();
-      caches[i].deltaParameters[0] = inputState[i].first->parameters();
-      caches[i].weights[0] = inputState[i].second;
-      if (measuredCov) {
-        caches[i].deltaCovariances[0] += *measuredCov;
-      }
-      n += caches[i].weights.size();
-      continue;
-    }
-    
-    // Get the material effects and store them in the cache
-    std::pair< const Trk::MaterialProperties*, double > matPropPair =   
-      getMaterialProperties( inputState[i].first.get(), layer );
-   
-    if( !matPropPair.first ) {
-      ATH_MSG_DEBUG("No material properties .. dont apply material effects");
-      caches[i].resetAndAddDummyValues();
-      caches[i].deltaParameters[0] = inputState[i].first->parameters();
-      caches[i].weights[0] = inputState[i].second;
-      if (measuredCov) {
-        caches[i].deltaCovariances[0] += *measuredCov;
-      }
-      n += caches[i].weights.size();
-      continue;
-    }
-    
-    // Apply the update factor
-    matPropPair.second *= updateFactor;    
- 
-    m_materialEffects->compute(caches[i],
-                           inputState[i],
-                           *matPropPair.first,
-                           matPropPair.second,
-                           direction,
-                           particleHypothesis);
-
-    // check vectors have the same size
-    if (caches[i].weights.size() != caches[i].deltaPs.size()) {
-      ATH_MSG_ERROR("Inconsistent number of components in the updator!!! no material effect will be applied");
-      caches[i].resetAndAddDummyValues();
-    }
-
-    // Apply material effects to input state and store results in cache
-    for( size_t j(0); j < caches[i].weights.size(); ++j){
-      if (measuredCov) {
-        caches[i].deltaCovariances[j] += *measuredCov;
-      } else {
-        caches[i].deltaCovariances[j].setZero();
-      }
-      caches[i].deltaParameters[j] = inputState[i].first->parameters();
-      // Adjust the momentum of the component's parameters vector here. Check to
-      // make sure update is good.
-      if (!updateP(caches[i].deltaParameters[j][Trk::qOverP], caches[i].deltaPs[j])) {
-        ATH_MSG_ERROR("Cannot update state vector momentum!!! return nullptr"); 
-        return {};
-      }
-      // Store component weight
-      caches[i].weights[j] *= inputState[i].second; 
-      // Ensure weight of component is not too small to save us from potential FPE's
-      // Value chosen to be sufficiently small so that the final state will not be impacted
-      if( caches[i].weights[j] < 1e-12 ){ 
-        caches[i].weights[j] = 1e-12;
-      }
-    }
-    n += caches[i].weights.size();   
-  } 
-
-
-  // Fill information for to calculate which components to merge
-  // Inaddition scan all components for covariance matrices. If one or more component
-  // is missing an error matrix, component reduction is impossible.
-  bool componentWithoutMeasurement = false;
- 
-  GSFUtils::AlignedDynArray<GSFUtils::Component1D, GSFUtils::alignment> components(n);
-  size_t k(0);
-  std::vector< std::pair<size_t,size_t> > indices(n);
-  for( size_t i(0) ; i < inputState.size(); ++i){  
-    for( size_t j(0); j < caches[i].weights.size(); ++j ){ 
-      const AmgSymMatrix(5)* measuredCov = inputState[i].first->covariance();
-      // Fill in infomation
-      const double cov =
-        measuredCov ? caches[i].deltaCovariances[j](Trk::qOverP, Trk::qOverP) : -1.;
-      if( !measuredCov ){
-        componentWithoutMeasurement = true; 
-      }
-
-      components[k].mean = caches[i].deltaParameters[j][Trk::qOverP];
-      components[k].cov = cov;
-      components[k].invCov = cov > 0 ? 1. / cov : 1e10;
-      components[k].weight = caches[i].weights[j];
-      indices[k] = {i,j};
-      ++k;
-    }
-  }
-
-  if(componentWithoutMeasurement){
-    auto result = std::max_element(components.begin(), 
-                                   components.end(),
-                                   [](const auto& a, const auto& b){ 
-                                     return a.weight < b.weight;
-                                   });
-    auto index = std::distance(components.begin(), result);
-
-    // Build the first TP
-    size_t stateIndex = indices[index].first;
-    size_t materialIndex = indices[index].second;
-
-    AmgVector(5)& updatedStateVector = caches[stateIndex].deltaParameters[materialIndex];
-    const AmgSymMatrix(5)* measuredCov = inputState[stateIndex].first->covariance();
-    AmgSymMatrix(5)* updatedCovariance = nullptr;
-    if (measuredCov && caches[stateIndex].deltaCovariances.size() > materialIndex) {
-      updatedCovariance = new AmgSymMatrix(5)(
-        caches[stateIndex].deltaCovariances[materialIndex] );
-    }
-    Trk::TrackParameters* updatedTrackParameters =
-      inputState[stateIndex].first->associatedSurface().createTrackParameters(
-        updatedStateVector[Trk::loc1],
-        updatedStateVector[Trk::loc2],
-        updatedStateVector[Trk::phi],
-        updatedStateVector[Trk::theta],
-        updatedStateVector[Trk::qOverP],
-        updatedCovariance);
- 
-    Trk::ComponentParameters dummyCompParams( updatedTrackParameters, 1.);
-    Trk::MultiComponentState returnMultiState;
-    returnMultiState.push_back(std::move(dummyCompParams));
-    return returnMultiState;
-  }
-  
-
-  // Gather the merges -- order is important -- RHS is smaller than LHS 
-  std::vector<std::pair<int32_t, int32_t>> merges; 
-  if (n > m_maximumNumberOfComponents)
-    merges = findMerges(components.buffer(), n, m_maximumNumberOfComponents);
-
-  //Merge components
-  MultiComponentStateAssembler::Cache assemblerCache;
-  int nMerges(0);
-  std::vector<bool> isMerged( n, false); 
-  for (const auto& mergePair : merges) {
-    const int32_t mini = mergePair.first;
-    const int32_t minj = mergePair.second; 
-    if( isMerged[minj] ){
-      ATH_MSG_WARNING( "Component is already merged " << minj);
-      for (const auto& mergePair2 : merges) {
-        ATH_MSG_DEBUG(  "Pairs that should be merged together: " << mergePair2.first << "  "<< mergePair2.second );
-      }
-      continue;
-    }
-    // Get the first TP
-    size_t stateIndex = indices[mini].first;
-    size_t materialIndex = indices[mini].second;
-    AmgVector(5)&  stateVector   = caches[stateIndex].deltaParameters[materialIndex];
-    AmgSymMatrix(5)& measuredCov = caches[stateIndex].deltaCovariances[materialIndex];
-    
-    // Get the second TP
-    size_t stateIndex2    = indices[minj].first;
-    size_t materialIndex2 = indices[minj].second;
-    
-    // Some values for sanity checks
-    ++nMerges;
-    isMerged[minj] = true;
-    
-    // Copy weight and first parameters as they are needed later on
-    const AmgVector(5) firstParameters = stateVector;
-    const double firstWeight     = caches[stateIndex].weights[materialIndex]; 
-    
-    // Update first parameters and weight
-    Trk::MultiComponentStateCombiner::combineParametersWithWeight( caches[stateIndex].deltaParameters[materialIndex], 
-                                   caches[stateIndex].weights[materialIndex],
-                                   caches[stateIndex2].deltaParameters[materialIndex2], 
-                                   caches[stateIndex2].weights[materialIndex2] );
-    // Update first cov
-    Trk::MultiComponentStateCombiner::combineCovWithWeight( firstParameters,  
-                            measuredCov,  
-                            firstWeight, 
-                            caches[stateIndex2].deltaParameters[materialIndex2], 
-                            caches[stateIndex2].deltaCovariances[materialIndex2], 
-                            caches[stateIndex2].weights[materialIndex2] );
-    
-   
-    // Reset 2nd parameters values just for clarity
-    caches[stateIndex2].deltaParameters[materialIndex2].setZero();
-    caches[stateIndex2].deltaCovariances[materialIndex2].setZero();
-     
-  }
-  
-  for( size_t i(0); i < n; ++i ){
-    if( isMerged[i] )
-      continue;
-
-    // Build the TP
-    size_t stateIndex = indices[i].first;
-    size_t materialIndex = indices[i].second;
-    AmgVector(5)&  stateVector   = caches[stateIndex].deltaParameters[materialIndex];
-    AmgSymMatrix(5)& measuredCov = caches[stateIndex].deltaCovariances[materialIndex];
-    
-    Trk::TrackParameters* updatedTrackParameters =
-      inputState[stateIndex].first->associatedSurface().createTrackParameters(
-        stateVector[Trk::loc1],
-        stateVector[Trk::loc2],
-        stateVector[Trk::phi],
-        stateVector[Trk::theta],
-        stateVector[Trk::qOverP],
-        new AmgSymMatrix(5)( measuredCov ) );
-    
-    double updatedWeight = caches[stateIndex].weights[materialIndex];
- 
-    assemblerCache.multiComponentState.emplace_back( updatedTrackParameters, updatedWeight);
-    assemblerCache.validWeightSum += updatedWeight;
-  } 
- 
-  if( nMerges + assemblerCache.multiComponentState.size() != n ){
-    ATH_MSG_WARNING("Combining complete but merger size is incompatible: " << n << "  " << nMerges << " " <<  assemblerCache.multiComponentState.size() );  
-  }
-  
-  // Check all weights 
-  Trk::MultiComponentState mergedState =
-    MultiComponentStateAssembler::assembledState(assemblerCache);
- 
-  if(mergedState.size() > m_maximumNumberOfComponents)
-    ATH_MSG_ERROR("Merging failed, target size: " << m_maximumNumberOfComponents << " final size: " << mergedState.size());
-  return mergedState;
-}
-
-
-bool Trk::GsfMaterialMixtureConvolutionLM::updateP(double& qOverP,  double deltaP) const
-{
-  double p = 1. / std::abs(qOverP);
-  p += deltaP;
-  if (p <= 0.) {
-    return false;
-  }
-  qOverP = qOverP > 0. ? 1. / p : -1. / p;
-  return true;
-}
-
-
-
-std::pair< const Trk::MaterialProperties*, double >  
-  Trk::GsfMaterialMixtureConvolutionLM::getMaterialProperties( 
-    const Trk::TrackParameters* trackParameters,
-    const Trk::Layer& layer) const
-{
-
-  const Trk::MaterialProperties* materialProperties(nullptr);
-  double pathCorrection(0.);
-
-  // Incorporate the reference material
-
-  if (m_useReferenceMaterial) {
-
-    // Get the surface associated with the parameters
-    const Trk::Surface* surface = &(trackParameters->associatedSurface());
-
-    // 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();
-
-      // Assign the material properties
-      materialProperties =
-        layerMaterial ? layerMaterial->fullMaterial(trackParameters->position())
-                      : nullptr;
-
-      // Determine the pathCorrection if the material properties exist
-      pathCorrection =
-        materialProperties
-          ? 1. / std::abs(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);
-
-  // Bail out if still no material properties can be found
-  if (!materialProperties) {
-    return {nullptr,0};
-  }
-
-  // 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
-  double pathLength = pathCorrection * materialProperties->thickness();
-
-  return {materialProperties,pathLength};
-}
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
index 294223d8bf10e35421ef96aec60144f31db47f85..9272a42af19f77befff4bd11e36ab1b2cbe4d533 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
@@ -24,9 +24,8 @@
  * Implementation of KLGaussianMixtureReduction
  *
  */
- 
 
-/// This enables -ftree-vectorize in gcc (we compile with O2)
+/// This enables -ftree-vectorize in gcc (since we compile with -O2)
 ATH_ENABLE_VECTORIZATION;
 
 namespace {
@@ -36,7 +35,7 @@ using namespace GSFUtils;
  * Based on
  * https://www.sciencedirect.com/science/article/pii/089812218990103X
  * equation (16)
- * or 
+ * or
  * https://arxiv.org/pdf/2001.00727.pdf
  * equation (10)
  * but not accounting for weights
@@ -84,9 +83,9 @@ combine(GSFUtils::Component1D& updated, GSFUtils::Component1D& removed)
 
   // large numbers to enter the multiplications/sums
   // make distance large
-  removed.mean = 1e10;
-  removed.cov = 1e10;
-  removed.invCov = 1e10;
+  removed.mean = std::numeric_limits<float>::max();
+  removed.cov = std::numeric_limits<float>::max();
+  removed.invCov = std::numeric_limits<float>::max();
   removed.weight = -1;
 }
 
@@ -108,33 +107,29 @@ recalculateDistances(const Component1D* componentsIn,
 
   const int32_t j = mini;
   const int32_t indexConst = (j - 1) * j / 2;
-  //This is the component that has been updated
-  //so we calculate distances wrt.
+  // This is the component that has been updated
+  // so we calculate distances wrt.
   const Component1D componentJ = components[j];
-  
+
   // Rows
   for (int32_t i = 0; i < j; ++i) {
     const Component1D componentI = components[i];
     const int32_t index = indexConst + i;
-    //This component has been merged to/removed
-    //so keep the distance wrt to it max always
-    if (componentI.weight < 0) {
-      distances[index] = std::numeric_limits<float>::max();
-      continue;
-    }
-    distances[index] = symmetricKL(componentI, componentJ);
+    // if the component has been merged already
+    // keep the distance wrt to it max always
+    distances[index] = componentI.weight < 0
+                         ? std::numeric_limits<float>::max()
+                         : symmetricKL(componentI, componentJ);
   }
   // Columns
   for (int32_t i = j + 1; i < n; ++i) {
     const Component1D componentI = components[i];
     const int32_t index = (i - 1) * i / 2 + j;
-    //This component has been merged to/removed
-    //so keep the distance wrt to it max always
-    if (componentI.weight < 0) {
-      distances[index] = std::numeric_limits<float>::max();
-      continue;
-    }
-    distances[index] = symmetricKL(componentI, componentJ);
+    // if the component has been merged already
+    // keep the distance wrt to it max always
+    distances[index] = componentI.weight < 0
+                         ? std::numeric_limits<float>::max()
+                         : symmetricKL(componentI, componentJ);
   }
 }
 
@@ -165,11 +160,10 @@ calculateAllDistances(const Component1D* componentsIn,
  * Reset the distances wrt to a mini index
  */
 void
-resetDistances(float* distancesIn,
-               const int32_t minj,
-               const int32_t n)
+resetDistances(float* distancesIn, const int32_t minj, const int32_t n)
 {
-  float* distances = (float*)__builtin_assume_aligned(distancesIn, alignment);
+  float* distances =
+    static_cast<float*>(__builtin_assume_aligned(distancesIn, alignment));
   const int32_t j = minj;
   const int32_t indexConst = (j - 1) * j / 2;
   // Rows
@@ -203,6 +197,7 @@ findMerges(Component1D* componentsIn,
   // 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) {
@@ -227,9 +222,7 @@ findMerges(Component1D* componentsIn,
   int32_t numberOfComponentsLeft = n;
   while (numberOfComponentsLeft > reducedSize) {
     // see if we have the next already
-    const std::pair<int32_t, float> minDis =
-      findMinimumIndex(distances.buffer(), nn2);
-    const int32_t minIndex = minDis.first;
+    const int32_t minIndex = findMinimumIndex(distances.buffer(), nn2);
     const triangularToIJ conversion = convert[minIndex];
     const int32_t mini = conversion.I;
     const int32_t minj = conversion.J;
@@ -289,7 +282,8 @@ findMerges(Component1D* 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")))
+int32_t
 findMinimumIndex(const float* distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
@@ -322,7 +316,7 @@ findMinimumIndex(const float* distancesIn, const int n)
       minDistance = distances[i];
     }
   }
-  return { minIndex, minDistance };
+  return minIndex;
 }
 /*
  * SSE intrinsics used
@@ -351,7 +345,8 @@ findMinimumIndex(const float* 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")))
+int32_t
 findMinimumIndex(const float* distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
@@ -399,11 +394,11 @@ findMinimumIndex(const float* distancesIn, const int n)
       minDistance = distances[i];
     }
   }
-  return { minIndex, minDistance };
+  return minIndex;
 }
 /*
  * SSE2 does not have a blend/select instruction.
- * To create one  
+ * To create one
  * We AND &
  * - a with the NOT of the mask
  * - b with the mask
@@ -414,7 +409,8 @@ 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")))
+int32_t
 findMinimumIndex(const float* distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
@@ -442,8 +438,8 @@ findMinimumIndex(const float* distancesIn, const int n)
     minindices2 = SSE2_mm_blendv_epi8(minindices2, indices2, lt2);
     minvalues2 = _mm_min_ps(values2, minvalues2);
   }
- 
-   // Compare //1 with //2
+
+  // Compare //1 with //2
   __m128i lt = _mm_castps_si128(_mm_cmplt_ps(minvalues1, minvalues2));
   minindices1 = SSE2_mm_blendv_epi8(minindices2, minindices1, lt);
   minvalues1 = _mm_min_ps(minvalues2, minvalues1);
@@ -462,14 +458,14 @@ findMinimumIndex(const float* distancesIn, const int n)
       minDistance = distances[i];
     }
   }
-  
-  return { minIndex, minDistance };
+
+  return minIndex;
 }
 #endif // end of x86_64 versions
-//Always fall back to a simple default version with no intrinsics
+// Always fall back to a simple default version with no intrinsics
 __attribute__((target("default")))
 #endif // HAVE_FUNCTION_MULTIVERSIONING
-std::pair<int32_t, float>
+int32_t
 findMinimumIndex(const float* distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
@@ -482,6 +478,6 @@ findMinimumIndex(const float* distancesIn, const int n)
       minDistance = value;
     }
   }
-  return { minIndex, minDistance };
+  return minIndex;
 }
 } // end namespace GSFUtils
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx
index 021b080857ad9204e1149492638a5044a6b0c7a5..07ad09c6e71e03deead959383f52dcd8adb097c3 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx
@@ -17,9 +17,10 @@
 #include <cmath>
 
 namespace {
-//note: sqrt is not constexpr; although gcc might accept it, clang doesn't.
-//but cmath constants can still be used..
-constexpr double invsqrt2PI = M_2_SQRTPI/(2.*M_SQRT2);//1. / sqrt(2. * M_PI);
+constexpr double invsqrt2PI =
+  M_2_SQRTPI / (2. * M_SQRT2); // 1. / sqrt(2. * M_PI);
+
+using namespace Trk::MultiComponentStateModeCalculator;
 
 /** bried method to determine the value of the a gaussian distribution at a
  * given value */
@@ -28,15 +29,13 @@ 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)) )  
+  // ((x-mean)*(1/sigma)) )
   //= invsqrt2PI * invertsigma * exp (-0.5 *z * z)
-  double invertsigma = 1. / sigma;
-  double z = (x - mean) * invertsigma;
-  double result = (invsqrt2PI * invertsigma) * exp(-0.5 * z * z);
-  return result;
+  const double invertsigma = 1. / sigma;
+  const double z = (x - mean) * invertsigma;
+  return (invsqrt2PI * invertsigma) * exp(-0.5 * z * z);
 }
 
-using namespace Trk::MultiComponentStateModeCalculator;
 /** @brief method to determine the pdf of the cashed mixture at a given value*/
 double
 pdf(double x, int i, const std::array<std::vector<Component>, 5>& mixture)
@@ -94,7 +93,8 @@ width(int i, const std::array<std::vector<Component>, 5>& mixture)
   return pdf;
 }
 
-}
+}//end of anonymous namespace
+
 
 std::array<double, 10>
 Trk::MultiComponentStateModeCalculator::calculateMode(
@@ -169,7 +169,7 @@ Trk::MultiComponentStateModeCalculator::calculateMode(
       }
       // Ensure that phi is between -pi and pi
       if (i == 2) {
-        modes[i] = CxxUtils::wrapToPi( modes[i] ) ;
+        modes[i] = CxxUtils::wrapToPi(modes[i]);
       }
     }
   }
@@ -182,31 +182,33 @@ Trk::MultiComponentStateModeCalculator::fillMixture(
   std::array<std::vector<Component>, 5>& mixture)
 {
 
-  for (int i = 0; i < 5; i++) {
+  constexpr Trk::ParamDefs parameter[5] = {
+    Trk::d0, Trk::z0, Trk::phi, Trk::theta, Trk::qOverP
+  };
+
+  const size_t componentsNum = multiComponentState.size();
+  for (size_t i = 0; i < 5; ++i) {
     mixture[i].clear();
+    mixture[i].reserve(componentsNum);
   }
 
   // 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
-  };
-  for (; component != multiComponentState.end(); ++component) {
-    for (int i = 0; i < 5; ++i) {
-      const Trk::TrackParameters* componentParameters = component->first.get();
+  for (const Trk::ComponentParameters& component : multiComponentState) {
 
-      const AmgSymMatrix(5)* measuredCov = componentParameters->covariance();
+    //And then for each component over each 5 parameters
+    for (size_t i = 0; i < 5; ++i) {
 
+      const Trk::TrackParameters* componentParameters = component.first.get();
+      const AmgSymMatrix(5)* measuredCov = componentParameters->covariance();
       if (!measuredCov) {
         return;
       }
       // Enums for Perigee //
-      //                           d0=0, z0=1, phi0=2, theta=3, qOverP=4,
-      double weight = component->second;
+      // d0=0, z0=1, phi0=2, theta=3, qOverP=4,
+      double weight = component.second;
       double mean = componentParameters->parameters()[parameter[i]];
-      // FIXME ATLASRECTS-598 this std::abs() should not be necessary... for some
-      // reason cov(qOverP,qOverP) can be negative
+      // FIXME ATLASRECTS-598 this std::abs() should not be necessary... for
+      // some reason cov(qOverP,qOverP) can be negative
       double sigma = sqrt(std::abs((*measuredCov)(parameter[i], parameter[i])));
 
       // Ensure that we don't have any problems with the cyclical nature of phi
@@ -220,8 +222,7 @@ Trk::MultiComponentStateModeCalculator::fillMixture(
           mean -= 2 * M_PI;
         }
       }
-      Component comp(weight, mean, sigma);
-      mixture[i].push_back(comp);
+      mixture[i].emplace_back(weight, mean, sigma);
     }
   }
 }
@@ -254,7 +255,8 @@ Trk::MultiComponentStateModeCalculator::findMode(
     double pdfPreviousMode = pdf(previousMode, i, mixture);
 
     if ((pdfMode + pdfPreviousMode) != 0.0) {
-      tolerance = std::abs(pdfMode - pdfPreviousMode) / (pdfMode + pdfPreviousMode);
+      tolerance =
+        std::abs(pdfMode - pdfPreviousMode) / (pdfMode + pdfPreviousMode);
     } else {
       return xStart;
     }
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/components/TrkGaussianSumFilter_entries.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/components/TrkGaussianSumFilter_entries.cxx
index f53ef90ca49b278f379b7e42a9d7c5a82e9e0e70..86bd37996bb9a33d5164599b62c9fd34442ab1fe 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/components/TrkGaussianSumFilter_entries.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/components/TrkGaussianSumFilter_entries.cxx
@@ -1,4 +1,3 @@
-#include "TrkGaussianSumFilter/GsfMaterialMixtureConvolutionLM.h"
 #include "TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h"
 #include "TrkGaussianSumFilter/GsfCombinedMaterialEffects.h"
 #include "TrkGaussianSumFilter/GsfMaterialEffectsUpdator.h"
@@ -9,7 +8,6 @@
 #include "TrkGaussianSumFilter/GsfExtrapolator.h"
 #include "TrkGaussianSumFilter/GsfSmoother.h"
 
-DECLARE_COMPONENT( Trk::GsfMaterialMixtureConvolutionLM )
 DECLARE_COMPONENT( Trk::GsfMaterialMixtureConvolution )
 DECLARE_COMPONENT( Trk::GsfCombinedMaterialEffects )
 DECLARE_COMPONENT( Trk::GsfMaterialEffectsUpdator )
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/test/testAlignedDynArray.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/test/testAlignedDynArray.cxx
index 46cdea220056818e5f27d66d1173541d6fbc5c51..88130c93856b64f6f813aa8d38f10f1d9eeb38d0 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/test/testAlignedDynArray.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/test/testAlignedDynArray.cxx
@@ -9,13 +9,13 @@ main()
 {
 
   //
-  //32 bit int has size 4 bytes 
+  //32 bit int has size 4 bytes
   using testType = int32_t;
-  constexpr size_t alignement = 32; //32 byte alignment 
+  constexpr size_t alignement = 32; //32 byte alignment
   constexpr size_t n = 100;
 
-   //begin should be aligned at 32 boundary 
-   //end (32+100*4)%32 ==> 16 
+   //begin should be aligned at 32 boundary
+   //end (32+100*4)%32 ==> 16
 
 
   std::cout << "\n ==> Test ctor with default init of elements " << '\n';
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/test/testFindMinimumIndex.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/test/testFindMinimumIndex.cxx
index 93b1ec6be3350c3be3c6b67a250f16726f9351ff..5edfc548ec74a68b65756672c04910cae4362109 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/test/testFindMinimumIndex.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/test/testFindMinimumIndex.cxx
@@ -14,8 +14,8 @@ int main(){
     6.97245, 2.13307, 2.89188, 1.46095, 1.32797, 4.67858, 5.1219,  5.38812, 8.14577, 9.28787, 8.26778, 7.35197, 1.02537,
     7.39633, 6.79565, 5.1043,  7.96525, 6.16379, 8.89082, 8.27358, 1.15997, 8.39121, 8.38757, 9.46067, 4.714};
 
-  std::pair<int32_t,float> minIndex=GSFUtils::findMinimumIndex(array,64);
-  std::cout << "FindMinimumIndex Index = " <<  minIndex.first <<  " with value = " <<  minIndex.second <<'\n'; 
+  int32_t minIndex=GSFUtils::findMinimumIndex(array,64);
+  std::cout << "FindMinimumIndex Index = " <<  minIndex <<  " with value = " <<  array[minIndex] <<'\n';
 
   return 0;
 }
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
index fc315640e83c0b347a0a92024a35f59ac43ba321..19e4a05a587e9a15770fc96bae2c1f315e5d397b 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrackState.h
@@ -47,7 +47,7 @@ namespace Trk {
     GXFMaterialEffects *materialEffects();
     const Surface *surface();
     void setJacobian(TransportJacobian *);
-    double (* (jacobian)())[5];
+    Eigen::Matrix<double, 5, 5> & jacobian();
     Amg::MatrixX & derivatives();
     void setDerivatives(Amg::MatrixX &);
     AmgSymMatrix(5) * trackCovariance(bool takeownership = false);
@@ -79,7 +79,7 @@ namespace Trk {
     TrackState::TrackStateType m_tsType;      //!< type of track state, eg Fittable, Outlier, Scatterer, Brem, Hole
     const TrackParameters *m_trackpar;  //!< track parameters
     GXFMaterialEffects *m_materialEffects;      //!< Material effects on track (ie scatterer, brem)
-    double m_jacobian[5][5];    //!< Transport jacobian wrt previous state
+    Eigen::Matrix<double, 5, 5> m_jacobian;    //!< Transport jacobian wrt previous state
     Amg::MatrixX * m_derivs;  //!< Derivatives of local parameters wrt fit parameters
     AmgSymMatrix(5) * m_covariancematrix;     //!< Covariance matrix of track parameters at this surface
     const FitQualityOnSurface *m_fitqual;
@@ -95,7 +95,7 @@ namespace Trk {
     Amg::Vector3D m_globpos;
   };
 
-  inline double (* (GXFTrackState::jacobian)())[5] {
+  inline Eigen::Matrix<double, 5, 5> & GXFTrackState::jacobian() {
     return m_jacobian;
   } 
   
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h
index 33b4470490810f2e504cc3514b88e3627351caa2..5ee0720db437e4a81e0e7a2c4f50331a2c8af8ff 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GXFTrajectory.h
@@ -36,7 +36,7 @@ namespace Trk {
     void setReferenceParameters(const TrackParameters *);
     void setScatteringAngles(std::vector < std::pair < double, double > >&);
     void setTrackStates(std::vector < GXFTrackState * >&);
-    void setBrems(std::vector < double >&);
+    void setBrems(std::vector<double> &);
     void setNumberOfPerigeeParameters(int);
     void setConverged(bool);
     void reset();
@@ -44,10 +44,11 @@ namespace Trk {
     void setOutlier(int, bool isoutlier = true);
     void setPrevChi2(double);
     void setChi2(double);
-    void setResiduals(std::vector < double >&);
-    void setResidualDerivatives(std::vector < std::vector < double > >&);
     void setMass(double);
 
+    std::pair<GXFTrackState *, GXFTrackState *> findFirstLastMeasurement(void);
+    bool hasKink(void);
+
     int numberOfScatterers();
     void setNumberOfScatterers(int);
     int numberOfBrems();
@@ -66,7 +67,7 @@ namespace Trk {
     std::vector < GXFTrackState * >&trackStates();
     std::vector < std::pair < double, double >>&scatteringAngles();
     std::vector < std::pair < double, double >>&scatteringSigmas();
-    std::vector < double >&brems();
+    std::vector<double> & brems();
     
     const TrackParameters *referenceParameters(bool takeownership = false);
     bool converged();
@@ -76,9 +77,9 @@ namespace Trk {
     double prevchi2();
     int nDOF();
   
-    std::vector < double >&residuals();
-    std::vector < double >&errors();
-    std::vector < std::vector < double >>&weightedResidualDerivatives();
+    Amg::VectorX & residuals();
+    Amg::VectorX & errors();
+    Amg::MatrixX & weightedResidualDerivatives();
 
     double totalX0();
     double totalEnergyLoss();
@@ -115,10 +116,10 @@ namespace Trk {
     bool m_converged;
     std::vector < std::pair < double, double >>m_scatteringangles;
     std::vector < std::pair < double, double >>m_scatteringsigmas;
-    std::vector < double >m_brems;
-    std::vector < double >m_res;
-    std::vector < double >m_errors;
-    std::vector < std::vector < double >>m_weightresderiv;
+    std::vector<double> m_brems;
+    Amg::VectorX m_res;
+    Amg::VectorX m_errors;
+    Amg::MatrixX m_weightresderiv;
     double m_totx0;
     double m_toteloss;
     double m_mass;
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index 22954464ea261699144745de6831faeb226b55b9..e2f7baf142de1602adc0554cf3b9867450c6f778 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -23,9 +23,6 @@
 
 class AtlasDetectorID;
 
-namespace MagField {
-  class IMagFieldSvc;
-}
 
 namespace Trk {
   class Track;
@@ -42,7 +39,6 @@ namespace Trk {
   class ITrackingGeometrySvc;
   class TrackFitInputPreparator;
   class IMagneticFieldTool;
-  class IMagFieldSvc;
   class MeasuredPerigee;
   class PrepRawDataComparisonFunction;
   class MeasurementBaseComparisonFunction;
@@ -88,11 +84,11 @@ namespace Trk {
       std::vector<double> m_phiweight;
       std::vector<int> m_firstmeasurement;
       std::vector<int> m_lastmeasurement;
-      
+
       std::vector < const Trk::Layer * >m_negdiscs;
       std::vector < const Trk::Layer * >m_posdiscs;
       std::vector < const Trk::Layer * >m_barrelcylinders;
-      
+
       bool m_fastmat = true;
 
       int m_lastiter;
@@ -101,7 +97,7 @@ namespace Trk {
       #ifdef GXFDEBUGCODE
       int m_iterations = 0;
       #endif
-      
+
       Amg::MatrixX m_derivmat;
       Amg::SymMatrixX m_fullcovmat;
 
@@ -211,7 +207,7 @@ namespace Trk {
       const RunOutlierRemoval  runOutlier=false,
       const ParticleHypothesis matEffects=Trk::nonInteracting
     ) const override;
-  
+
   private:
     void calculateJac(
       Eigen::Matrix<double, 5, 5> &,
@@ -219,14 +215,6 @@ namespace Trk {
       int, int
     ) const;
 
-    void processStates(
-      GXFTrajectory &,
-      bool,
-      Eigen::Matrix<double, 5, 5> &,
-      std::vector<Eigen::Matrix<double, 5, 5>> &,
-      std::vector<Eigen::Matrix<double, 5, 5>> &
-    ) const;
-
     Track * fitIm(
       const EventContext& ctx,
       Cache & cache,
@@ -291,7 +279,7 @@ namespace Trk {
       Cache &,
       const Trk::TrackingVolume * tvol
     ) const;
-    
+
     /**
      * @brief Find the intersection of a set of track parameters onto a disc
      * surface.
@@ -447,7 +435,26 @@ namespace Trk {
       const ParticleHypothesis
     ) const;
 
-    Track *makeTrack(
+    void makeTrackFillDerivativeMatrix(
+      Cache &,
+      GXFTrajectory &
+    ) const;
+
+    std::unique_ptr<const TrackParameters> makeTrackFindPerigeeParameters(
+      const EventContext &,
+      Cache &,
+      GXFTrajectory &,
+      const ParticleHypothesis
+    ) const;
+
+    std::unique_ptr<const TrackStateOnSurface> makeTrackFindPerigee(
+      const EventContext &,
+      Cache &,
+      GXFTrajectory &,
+      const ParticleHypothesis
+    ) const;
+
+    std::unique_ptr<Track> makeTrack(
       const EventContext& ctx,
       Cache &,
       GXFTrajectory &,
@@ -533,24 +540,6 @@ namespace Trk {
 
     bool correctAngles(double &, double &) const;
 
-    void errors1(
-      double (*jac)[5], 
-      AmgSymMatrix(5) & prevcov,
-      AmgSymMatrix(5) & trackerrmat, 
-      bool onlylocal
-    ) const;
-
-    void errors2(
-      Amg::MatrixX & derivatives, 
-      AmgSymMatrix(5) & trackerrmat,
-      double *myarray, 
-      std::vector<int> *rowindices, 
-      int &maxl,
-      int *minm, 
-      bool onlylocal, 
-      int nfitpars
-    ) const;
-     
     bool isMuonTrack(const Track &) const;
 
     void incrementFitStatus(enum FitterStatusType) const;
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
index 7d887de825e3f3d8d15e5a9098e2c7f375049814..0836e3b85a2d789514c5779f5333a679d30c5477 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrackState.cxx
@@ -60,7 +60,7 @@ namespace Trk {
     for (int i = 0; i < 5; i++) {
       m_measerror[i] = rhs.m_measerror[i];
       for (int j = 0; j < 5; j++) {
-        m_jacobian[i][j] = rhs.m_jacobian[i][j];
+        m_jacobian(i, j) = rhs.m_jacobian(i, j);
       }
     }
   }
@@ -201,7 +201,7 @@ namespace Trk {
       for (int i = 0; i < 5; i++) {
         m_measerror[i] = rhs.m_measerror[i];
         for (int j = 0; j < 5; j++) {
-          m_jacobian[i][j] = rhs.m_jacobian[i][j];
+          m_jacobian(i, j) = rhs.m_jacobian(i, j);
         }
       }
     }
@@ -252,7 +252,7 @@ namespace Trk {
     GXFTrackState::setJacobian(TransportJacobian * jac) {
     for (int i = 0; i < 5; i++) {
       for (int j = 0; j < 5; j++) {
-        m_jacobian[i][j] = (*jac) (i, j);
+        m_jacobian(i, j) = (*jac)(i, j);
       }
     }
     delete jac;
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx
index 82f3e06279bf38c41bbe45a32771e34c967496d2..1b20623bd4e38bde3dbfec9c777fb1e9cf1ec524 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx
@@ -436,9 +436,9 @@ namespace Trk {
   }
 
   void GXFTrajectory::reset() {
-    m_res.clear();
-    m_weightresderiv.clear();
-    m_errors.clear();
+    m_res.resize(0);
+    m_weightresderiv.resize(0, 0);
+    m_errors.resize(0);
     m_scatteringangles.clear();
     m_scatteringsigmas.clear();
     m_converged = false;
@@ -570,7 +570,7 @@ namespace Trk {
     return m_scatteringsigmas;
   }
 
-  std::vector < double >& GXFTrajectory::brems() {
+  std::vector<double> & GXFTrajectory::brems() {
     return m_brems;
   }
 
@@ -592,14 +592,14 @@ namespace Trk {
   }
 
   void
-    GXFTrajectory::setBrems(std::vector < double >&brems) {
+    GXFTrajectory::setBrems(std::vector<double> & brems) {
     // if (m_prefit==1) return;
     m_brems = brems;
     int bremno = 0;
     for (auto & state : m_states) {
       if (((*state).materialEffects() != nullptr)
           && (*state).materialEffects()->sigmaDeltaE() > 0) {
-        (*state).materialEffects()->setdelta_p(brems[bremno]);
+        (*state).materialEffects()->setdelta_p(m_brems[bremno]);
         bremno++;
       }
     }
@@ -614,39 +614,26 @@ namespace Trk {
     m_states = states;
   }
 
-  std::vector < double >& GXFTrajectory::residuals() {
-    if (m_res.empty()) {
-      m_res =
-        std::vector <
-        double >( /* 2*m_nscatterers+ */ numberOfBrems() + m_ndof +
-                 m_nperpars + m_nmeasoutl, 0);
+  Amg::VectorX & GXFTrajectory::residuals() {
+    if (m_res.size() == 0) {
+      m_res.setZero(numberOfBrems() + m_ndof + m_nperpars + m_nmeasoutl);
     }
     return m_res;
   }
 
-  std::vector < double >& GXFTrajectory::errors() {
-    if (m_errors.empty()) {
-      m_errors =
-        std::vector <
-        double >( /* 2*m_nscatterers+ */ numberOfBrems() + m_ndof +
-                 m_nperpars + m_nmeasoutl, 0);
+  Amg::VectorX & GXFTrajectory::errors() {
+    if (m_errors.size() == 0) {
+      m_errors.setZero(numberOfBrems() + m_ndof + m_nperpars + m_nmeasoutl);
     }
     return m_errors;
   }
 
-  std::vector < std::vector < double >>&
-    GXFTrajectory::weightedResidualDerivatives() {
-    if (m_weightresderiv.empty()) {
-      m_weightresderiv.resize(numberOfBrems() + m_ndof + m_nperpars +
-                              m_nmeasoutl);
-      // std::cout << "nmeas: " << 2*m_nscatterers+m_nbrems+m_ndof+m_nperpars+m_nmeasoutl << " capacity: " <<
-      // m_resderiv.capacity() << " numberOfFitParameters: " << numberOfFitParameters() << std::endl;
-      int nfitpar = numberOfFitParameters();
-      // std::cout << "capacity: " << m_resderiv.capacity() << " nbrems: " << numberOfBrems() << " ndof: " << m_ndof <<
-      // " perpars: " << m_nperpars << " noutl: " << m_nmeasoutl << std::endl;
-      for (auto & i : m_weightresderiv) {
-        i.resize(nfitpar);
-      }
+  Amg::MatrixX & GXFTrajectory::weightedResidualDerivatives() {
+    if (m_weightresderiv.size() == 0) {
+      m_weightresderiv.setZero(
+        numberOfBrems() + m_ndof + m_nperpars + m_nmeasoutl,
+        numberOfFitParameters()
+      );
     }
     return m_weightresderiv;
   }
@@ -679,4 +666,51 @@ namespace Trk {
     GXFTrajectory::upstreamMaterialLayers() {
     return m_upstreammat;
   }
+
+  std::pair<GXFTrackState *, GXFTrackState *> GXFTrajectory::findFirstLastMeasurement(void) {
+    GXFTrackState *firstmeasstate = nullptr;
+    GXFTrackState *lastmeasstate = nullptr;
+
+    for (auto & hit : trackStates()) {
+      if (
+        hit->measurementType() == TrackState::Pseudo &&
+        hit->trackStateType() == TrackState::GeneralOutlier
+      ) {
+        continue;
+      }
+
+      if (hit->measurement(false) != nullptr) {
+        if (firstmeasstate == nullptr) {
+          firstmeasstate = hit;
+        }
+        lastmeasstate = hit;
+      }
+    }
+
+    if (firstmeasstate == nullptr) {
+      throw std::logic_error("no first measurement.");
+    }
+
+    return std::make_pair(firstmeasstate, lastmeasstate);
+  }
+
+  bool GXFTrajectory::hasKink(void) {
+    for (auto & hit : trackStates()) {
+      if (
+        hit->measurementType() == TrackState::Pseudo &&
+        hit->trackStateType() == TrackState::GeneralOutlier
+      ) {
+        continue;
+      }
+      
+      if (
+        (hit->materialEffects() != nullptr) && 
+        hit->materialEffects()->isKink()
+      ) {
+        return true;
+      }
+    }
+
+    return false;
+  }
 }
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index b3562ac57f24a6cfede263063c5909f54359b6ab..64e6cb74a504d92a7ef870278ebf5facc893632b 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -1,7 +1,6 @@
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
 #include "TrkFitterUtils/TrackFitInputPreparator.h"
 #include "TrkGlobalChi2Fitter/GlobalChi2Fitter.h"
 #include "TrkGlobalChi2Fitter/GXFMaterialEffects.h"
@@ -72,6 +71,9 @@
 #include <exception>
 #include <memory>
 
+#include <Eigen/Dense>
+#include <Eigen/StdVector>
+
 using CLHEP::MeV;
 using CLHEP::mm;
 
@@ -1882,7 +1884,7 @@ namespace Trk {
     if (
       !firstismuon && 
       trajectory.converged() &&
-      std::abs(trajectory.residuals().back() / trajectory.errors().back()) > 10
+      std::abs(trajectory.residuals().tail<1>()(0) / trajectory.errors().tail<1>()(0)) > 10
     ) {
       return nullptr;
     }
@@ -5493,7 +5495,8 @@ namespace Trk {
       }
     }
     
-    Track *track = nullptr;
+    std::unique_ptr<Track> track = nullptr;
+
     if (finaltrajectory->prefit() > 0) {
       if (finaltrajectory != &trajectory) {
         delete finaltrajectory;
@@ -5517,8 +5520,7 @@ namespace Trk {
         track->fitQuality()->chiSquared() / track->fitQuality()->numberDoF() > cut
       )
     ) {
-      delete track;
-      track = nullptr;
+      track.reset(nullptr);
       incrementFitStatus(S_HIGH_CHI2);
     }
     
@@ -5530,7 +5532,7 @@ namespace Trk {
       delete finaltrajectory;
     }
     
-    return track;
+    return track.release();
   }
 
   void GlobalChi2Fitter::fillResiduals(
@@ -5552,14 +5554,15 @@ namespace Trk {
     int nbrem = trajectory.numberOfBrems();
     int nperpars = trajectory.numberOfPerigeeParameters();
     int nfitpars = trajectory.numberOfFitParameters();
-    std::vector < double >&res = trajectory.residuals();
-    std::vector < std::vector < double >>&weightderiv = trajectory.weightedResidualDerivatives();
+
+    Amg::VectorX & res = trajectory.residuals();
+    Amg::MatrixX & weightderiv = trajectory.weightedResidualDerivatives();
     int nidhits = trajectory.numberOfSiliconHits() + trajectory.numberOfTRTHits();
     int nsihits = trajectory.numberOfSiliconHits();
     int ntrthits = trajectory.numberOfTRTHits();
     int nhits = trajectory.numberOfHits();
     int nmeas = (int) res.size();
-    std::vector < double >&error = trajectory.errors();
+    Amg::VectorX & error = trajectory.errors();
     ParamDefsAccessor paraccessor;
     bool scatwasupdated = false;
 
@@ -5567,8 +5570,6 @@ namespace Trk {
     int bremno_maxbrempull = 0;
     double maxbrempull = 0;
 
-    std::vector < double >residuals;
-
     for (int hitno = 0; hitno < (int) states.size(); hitno++) {
       GXFTrackState *state = states[hitno];
       const TrackParameters *currenttrackpar = state->trackParameters();
@@ -5602,6 +5603,8 @@ namespace Trk {
         }
         
         double *errors = state->measurementErrors();
+
+        std::vector<double> residuals;
         m_residualPullCalculator->residuals(residuals, measbase, currenttrackpar, ResidualPull::Biased, hittype);
         
         for (int i = 0; i < 5; i++) {
@@ -5825,7 +5828,7 @@ namespace Trk {
       }
 
       for (int i = 0; i < nfitpars; i++) {
-        if (weightderiv[nmeas - nbrem + bremno_maxbrempull][i] == 0) {
+        if (weightderiv(nmeas - nbrem + bremno_maxbrempull, i) == 0) {
           continue;
         }
 
@@ -5833,14 +5836,13 @@ namespace Trk {
           a.fillSymmetric(
             i, j,
             a(i, j) - (
-              weightderiv[nmeas - nbrem + bremno_maxbrempull][i] *
-              weightderiv[nmeas - nbrem + bremno_maxbrempull][j] * 
+              weightderiv(nmeas - nbrem + bremno_maxbrempull, i) *
+              weightderiv(nmeas - nbrem + bremno_maxbrempull, j) * 
               (1 - olderror * olderror / (newerror * newerror))
             )
           );
         }
-        
-        weightderiv[nmeas - nbrem + bremno_maxbrempull][i] *= olderror / newerror;
+        weightderiv(nmeas - nbrem + bremno_maxbrempull, i) *= olderror / newerror;
       }
       lu_m = a;
       trajectory.setChi2(1e15);
@@ -5864,10 +5866,10 @@ namespace Trk {
     int nbrem = trajectory.numberOfBrems();
     int nperparams = trajectory.numberOfPerigeeParameters();
 
-    std::vector < std::vector < double >>&weightderiv = trajectory.weightedResidualDerivatives();
-    std::vector < double >&error = trajectory.errors();
+    Amg::MatrixX & weightderiv = trajectory.weightedResidualDerivatives();
+    Amg::VectorX & error = trajectory.errors();
 
-    int nmeas = (int) weightderiv.size();
+    int nmeas = (int) weightderiv.rows();
 
     ParamDefsAccessor paraccessor;
     
@@ -5907,24 +5909,12 @@ namespace Trk {
           }
           
           if (trajectory.numberOfPerigeeParameters() > 0) {
-            if (i == 0 && sinstereo != 0) {
-              weightderiv[measno][0] = (derivatives(0, 0) * cosstereo + sinstereo * derivatives(1, 0)) / error[measno];
-              weightderiv[measno][1] = (derivatives(0, 1) * cosstereo + sinstereo * derivatives(1, 1)) / error[measno];
-              weightderiv[measno][2] = (derivatives(0, 2) * cosstereo + sinstereo * derivatives(1, 2)) / error[measno];
-              weightderiv[measno][3] = (derivatives(0, 3) * cosstereo + sinstereo * derivatives(1, 3)) / error[measno];
-              
-              if (!trajectory.m_straightline) {
-                weightderiv[measno][4] = (derivatives(0, 4) * cosstereo + sinstereo * derivatives(1, 4)) / error[measno];
-              }
+            int cols = trajectory.m_straightline ? 4 : 5;
+
+            if (i == 0) {
+              weightderiv.row(measno).head(cols) = (derivatives.row(0).head(cols) * cosstereo + sinstereo * derivatives.row(1).head(cols)) / error[measno];
             } else {
-              weightderiv[measno][0] = derivatives(i, 0) / error[measno];
-              weightderiv[measno][1] = derivatives(i, 1) / error[measno];
-              weightderiv[measno][2] = derivatives(i, 2) / error[measno];
-              weightderiv[measno][3] = derivatives(i, 3) / error[measno];
-              
-              if (!trajectory.m_straightline) {
-                weightderiv[measno][4] = derivatives(i, 4) / error[measno];
-              }
+              weightderiv.row(measno).head(cols) = derivatives.row(i).head(cols) / error[measno];
             }
           }
           
@@ -5940,7 +5930,7 @@ namespace Trk {
               thisderiv = sign * derivatives(i, index);
             }
             
-            weightderiv[measno][index] = thisderiv / error[measno];
+            weightderiv(measno, index) = thisderiv / error[measno];
             
             if (trajectory.prefit() != 1) {
               index++;
@@ -5951,7 +5941,7 @@ namespace Trk {
                 thisderiv = sign * derivatives(i, index);
               }
               
-              weightderiv[measno][index] = thisderiv / error[measno];
+              weightderiv(measno, index) = thisderiv / error[measno];
             }
           }
           
@@ -5965,7 +5955,7 @@ namespace Trk {
               thisderiv = derivatives(i, index);
             }
             
-            weightderiv[measno][index] = thisderiv / error[measno];
+            weightderiv(measno, index) = thisderiv / error[measno];
           }
           
           measno++;
@@ -5995,7 +5985,7 @@ namespace Trk {
         double mass = .001 * trajectory.mass();
         
         if (trajectory.numberOfPerigeeParameters() > 0) {
-          weightderiv[nmeas - nbrem + bremno][4] = (
+          weightderiv(nmeas - nbrem + bremno, 4) = (
             (
               -sign / (qoverp * qoverp * sqrt(1 + mass * mass * qoverp * qoverp)) + 
               sign2 / (qoverpbrem * qoverpbrem * sqrt(1 + mass * mass * qoverpbrem * qoverpbrem))
@@ -6004,13 +5994,13 @@ namespace Trk {
         }
         
         if (bremno < nbremupstream) {
-          weightderiv[nmeas - nbrem + bremno][nperparams + 2 * nscat + bremno] = (
+          weightderiv(nmeas - nbrem + bremno, nperparams + 2 * nscat + bremno) = (
             (sign / (qoverp * qoverp * sqrt(1 + mass * mass * qoverp * qoverp))) /
             error[nmeas - nbrem + bremno]
           );
           
           for (int bremno2 = bremno + 1; bremno2 < nbremupstream; bremno2++) {
-            weightderiv[nmeas - nbrem + bremno][nperparams + 2 * nscat + bremno2] = (
+            weightderiv(nmeas - nbrem + bremno, nperparams + 2 * nscat + bremno2) = (
               -(
                 -sign / (qoverp * qoverp * sqrt(1 + mass * mass * qoverp * qoverp)) +
                 sign2 / (qoverpbrem * qoverpbrem * sqrt(1 + mass * mass * qoverpbrem * qoverpbrem))
@@ -6018,13 +6008,13 @@ namespace Trk {
             );
           }
         } else {
-          weightderiv[nmeas - nbrem + bremno][nperparams + 2 * nscat + bremno] = (
+          weightderiv(nmeas - nbrem + bremno, nperparams + 2 * nscat + bremno) = (
             (sign2 / (qoverpbrem * qoverpbrem * sqrt(1 + mass * mass * qoverpbrem * qoverpbrem))) / 
             error[nmeas - nbrem + bremno]
           );
           
           for (int bremno2 = nbremupstream; bremno2 < bremno; bremno2++) {
-            weightderiv[nmeas - nbrem + bremno][nperparams + 2 * nscat + bremno2] = (
+            weightderiv(nmeas - nbrem + bremno, nperparams + 2 * nscat + bremno2) = (
               (
                 -sign / (qoverp * qoverp * sqrt(1 + mass * mass * qoverp * qoverp)) +
                 sign2 / (qoverpbrem * qoverpbrem * sqrt(1 + mass * mass * qoverpbrem * qoverpbrem))
@@ -6083,13 +6073,13 @@ namespace Trk {
       return FitterStatusCode::Success;
     }
 
-    std::vector < double >&res = trajectory.residuals();
-    std::vector < double >&error = trajectory.errors();
+    Amg::VectorX & res = trajectory.residuals();
+    Amg::VectorX & error = trajectory.errors();
     std::vector < std::pair < double, double >>&scatsigmas = trajectory.scatteringSigmas();
 
     int nmeas = (int) res.size();
 
-    std::vector < std::vector < double >>&weightderiv = trajectory.weightedResidualDerivatives();
+    const Amg::MatrixX & weight_deriv = trajectory.weightedResidualDerivatives();
 
     if (doderiv) {
       calculateDerivatives(trajectory);
@@ -6157,13 +6147,13 @@ namespace Trk {
 
       for (measno = minmeas; measno < maxmeas; measno++) {
         double tmp =
-          res[measno] * (1. / error[measno]) * weightderiv[measno][k];
+          res[measno] * (1. / error[measno]) * weight_deriv(measno, k);
         b[k] += tmp;
       }
 
       if (k == 4 || k >= nperpars + scatpars) {
         for (measno = nmeas - nbrem; measno < nmeas; measno++) {
-          b[k] += res[measno] * (1. / error[measno]) * weightderiv[measno][k];
+          b[k] += res[measno] * (1. / error[measno]) * weight_deriv(measno, k);
         }
       }
       
@@ -6176,7 +6166,7 @@ namespace Trk {
                      cache.m_firstmeasurement[l]);
           double tmp = 0;
           for (measno = minmeas; measno < maxmeas; measno++) {
-            tmp += weightderiv[measno][k] * weightderiv[measno][l];
+            tmp += weight_deriv(measno, k) * weight_deriv(measno, l);
           }
           a.fillSymmetric(l, k, tmp);
         }
@@ -6202,7 +6192,7 @@ namespace Trk {
             if (l == 5) {
               l = nperpars + scatpars;
             }
-            double tmp = a(l, k) + weightderiv[measno][k] * weightderiv[measno][l];
+            double tmp = a(l, k) + weight_deriv(measno, k) * weight_deriv(measno, l);
             a.fillSymmetric(l, k, tmp);
           }
         }
@@ -6297,7 +6287,7 @@ namespace Trk {
       for (measno = 0; measno < nmeas; measno++) {
         for (int k = 0; k < nfitpars; k++) {
           ATH_MSG_VERBOSE(
-            "deriv[" << measno << "][" << k << "]=" << weightderiv[measno][k] * error[measno] << 
+            "deriv[" << measno << "][" << k << "]=" << weight_deriv(measno, k) * error[measno] << 
             " error: " << error[measno]
           );
         }
@@ -6433,9 +6423,9 @@ namespace Trk {
     }
     
     std::vector < GXFTrackState * >&states = trajectory.trackStates();
-    std::vector < double >&res = trajectory.residuals();
-    std::vector < double >&err = trajectory.errors();
-    std::vector < std::vector < double >>&weightderiv = trajectory.weightedResidualDerivatives();
+    Amg::VectorX & res = trajectory.residuals();
+    Amg::VectorX & err = trajectory.errors();
+    Amg::MatrixX & weightderiv = trajectory.weightedResidualDerivatives();
     int nfitpars = trajectory.numberOfFitParameters();
     
     if (a.cols() != nfitpars) {
@@ -6470,16 +6460,19 @@ namespace Trk {
             double olderror = errors[0];
             
             for (int i = 0; i < nfitpars; i++) {
-              if (weightderiv[measno][i] == 0) {
+              if (weightderiv(measno, i) == 0) {
                 continue;
               }
               
-              b[i] -= res[measno] * weightderiv[measno][i] / olderror;
+              b[i] -= res[measno] * weightderiv(measno, i) / olderror;
               
               for (int j = i; j < nfitpars; j++) {
-                a.fillSymmetric(i, j, a(i, j) - weightderiv[measno][i] * weightderiv[measno][j]);
+                a.fillSymmetric(
+                  i, j,
+                  a(i, j) - weightderiv(measno, i) * weightderiv(measno, j)
+                );
               }
-              weightderiv[measno][i] = 0;
+              weightderiv(measno, i) = 0;
             }
             
             res[measno] = 0;
@@ -6528,13 +6521,11 @@ namespace Trk {
                 state->setMeasurement(newrot);
 
                 for (int i = 0; i < nfitpars; i++) {
-                  if (weightderiv[measno][i] == 0) {
+                  if (weightderiv(measno, i) == 0) {
                     continue;
                   }
 
-                  b[i] -= weightderiv[measno][i] * (
-                    oldres / olderror - (newres * olderror) / (newerror * newerror)
-                  );
+                  b[i] -= weightderiv(measno, i) * (oldres / olderror - (newres * olderror) / (newerror * newerror));
                   
                   for (int j = i; j < nfitpars; j++) {
                     double weight = 1;
@@ -6551,11 +6542,10 @@ namespace Trk {
                     
                     a.fillSymmetric(
                       i, j,
-                      a(i, j) + weightderiv[measno][i] * weightderiv[measno][j] * ((olderror * olderror) / (newerror * newerror) - 1) * weight
+                      a(i, j) + weightderiv(measno, i) * weightderiv(measno, j) * ((olderror * olderror) / (newerror * newerror) - 1) * weight
                     );
                   }
-                  
-                  weightderiv[measno][i] *= olderror / newerror;
+                  weightderiv(measno, i) *= olderror / newerror;
                 }
                 
                 res[measno] = newres;
@@ -6610,9 +6600,9 @@ namespace Trk {
     while (!trackok && oldtrajectory->nDOF() > 0) {
       trackok = true;
       std::vector < GXFTrackState * >&states = oldtrajectory->trackStates();
-      std::vector < double >&res = oldtrajectory->residuals();
-      std::vector < double >&err = oldtrajectory->errors();
-      std::vector < std::vector < double >>&weightderiv = oldtrajectory->weightedResidualDerivatives();
+      Amg::VectorX & res = oldtrajectory->residuals();
+      Amg::VectorX & err = oldtrajectory->errors();
+      Amg::MatrixX & weightderiv = oldtrajectory->weightedResidualDerivatives();
       int nfitpars = oldtrajectory->numberOfFitParameters();
       int nhits = oldtrajectory->numberOfHits();
       int nsihits = oldtrajectory->numberOfSiliconHits();
@@ -6822,21 +6812,23 @@ namespace Trk {
           err[measno_maxsipull] = newerror[0];
           
           for (int i = 0; i < nfitpars; i++) {
-            if (weightderiv[measno_maxsipull][i] == 0) {
+            if (weightderiv(measno_maxsipull, i) == 0) {
               continue;
             }
             
-            b[i] -= weightderiv[measno_maxsipull][i] * (oldres1 / olderror[0] - (newres1 * olderror[0]) / (newerror[0] * newerror[0]));
+            b[i] -= weightderiv(measno_maxsipull, i) * (oldres1 / olderror[0] - (newres1 * olderror[0]) / (newerror[0] * newerror[0]));
             
             for (int j = i; j < nfitpars; j++) {
               a.fillSymmetric(
                 i, j,
-                a(i, j) + weightderiv[measno_maxsipull][i] * weightderiv[measno_maxsipull][j] *
-                ((olderror[0] * olderror[0]) / (newerror[0] * newerror[0]) - 1)
+                a(i, j) + (
+                  weightderiv(measno_maxsipull, i) *
+                  weightderiv(measno_maxsipull, j) *
+                  ((olderror[0] * olderror[0]) / (newerror[0] * newerror[0]) - 1)
+                )
               );
             }
-            
-            weightderiv[measno_maxsipull][i] *= olderror[0] / newerror[0];
+            weightderiv(measno_maxsipull, i) *= olderror[0] / newerror[0];
           }
           
           if (hittype_maxsipull == TrackState::Pixel) {
@@ -6845,21 +6837,24 @@ namespace Trk {
             err[measno_maxsipull + 1] = newerror[1];
             
             for (int i = 0; i < nfitpars; i++) {
-              if (weightderiv[measno_maxsipull + 1][i] == 0) {
+              if (weightderiv(measno_maxsipull + 1, i) == 0) {
                 continue;
               }
               
-              b[i] -= weightderiv[measno_maxsipull + 1][i] * (oldres2 / olderror[1] - (newres2 * olderror[1]) / (newerror[1] * newerror[1]));
+              b[i] -= weightderiv(measno_maxsipull + 1, i) * (oldres2 / olderror[1] - (newres2 * olderror[1]) / (newerror[1] * newerror[1]));
               
               for (int j = i; j < nfitpars; j++) {
                 a.fillSymmetric(
                   i, j,
-                  a(i, j) + weightderiv[measno_maxsipull + 1][i] * weightderiv[measno_maxsipull + 1][j] * 
-                  ((olderror[1] * olderror[1]) / (newerror[1] * newerror[1]) - 1)
+                  a(i, j) + (
+                    weightderiv(measno_maxsipull + 1, i) *
+                    weightderiv(measno_maxsipull + 1, j) * 
+                    ((olderror[1] * olderror[1]) / (newerror[1] * newerror[1]) - 1)
+                  )
                 );
               }
               
-              weightderiv[measno_maxsipull + 1][i] *= olderror[1] / newerror[1];
+              weightderiv(measno_maxsipull + 1, i) *= olderror[1] / newerror[1];
             }
           }
           
@@ -6901,9 +6896,8 @@ namespace Trk {
             ATH_MSG_ERROR("Your assumption is wrong!!!!");
           }
 
-          std::vector < double >&newres = newtrajectory->residuals();
-          std::vector < std::vector < double >>&newweightderiv = newtrajectory->weightedResidualDerivatives();
-          
+          Amg::VectorX & newres = newtrajectory->residuals();
+          Amg::MatrixX & newweightderiv = newtrajectory->weightedResidualDerivatives();
           if ((measno_maxsipull < 0) or(measno_maxsipull >= (int) res.size())) {
             throw std::runtime_error(
               "'res' array index out of range in TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx:" + std::to_string(__LINE__)
@@ -6914,20 +6908,22 @@ namespace Trk {
           newres[measno_maxsipull] = 0;
           
           for (int i = 0; i < nfitpars; i++) {
-            if (weightderiv[measno_maxsipull][i] == 0) {
+            if (weightderiv(measno_maxsipull, i) == 0) {
               continue;
             }
             
-            newb[i] -= weightderiv[measno_maxsipull][i] * oldres1 / olderror[0];
+            newb[i] -= weightderiv(measno_maxsipull, i) * oldres1 / olderror[0];
             
             for (int j = i; j < nfitpars; j++) {
               newa.fillSymmetric(
                 i, j,
-                newa(i, j) - weightderiv[measno_maxsipull][i] * weightderiv[measno_maxsipull][j]
+                newa(i, j) - (
+                  weightderiv(measno_maxsipull, i) *
+                  weightderiv(measno_maxsipull, j)
+                )
               );
             }
-            
-            newweightderiv[measno_maxsipull][i] = 0;
+            newweightderiv(measno_maxsipull, i) = 0;
           }
           
           if (hittype_maxsipull == TrackState::Pixel) {
@@ -6935,24 +6931,26 @@ namespace Trk {
             newres[measno_maxsipull + 1] = 0;
             
             for (int i = 0; i < nfitpars; i++) {
-              if (weightderiv[measno_maxsipull + 1][i] == 0) {
+              if (weightderiv(measno_maxsipull + 1, i) == 0) {
                 continue;
               }
               
-              newb[i] -= weightderiv[measno_maxsipull + 1][i] * oldres2 / olderror[1];
+              newb[i] -= weightderiv(measno_maxsipull + 1, i) * oldres2 / olderror[1];
               
               for (int j = i; j < nfitpars; j++) {
-                if (weightderiv[measno_maxsipull + 1][j] == 0) {
+                if (weightderiv(measno_maxsipull + 1, j) == 0) {
                   continue;
                 }
                 
                 newa.fillSymmetric(
                   i, j,
-                  newa(i, j) - weightderiv[measno_maxsipull + 1][i] * weightderiv[measno_maxsipull + 1][j]
+                  newa(i, j) - (
+                    weightderiv(measno_maxsipull + 1, i) *
+                    weightderiv(measno_maxsipull + 1, j)
+                  )
                 );
               }
-              
-              newweightderiv[measno_maxsipull + 1][i] = 0;
+              newweightderiv(measno_maxsipull + 1, i) = 0;
             }
           }
           
@@ -7137,125 +7135,68 @@ namespace Trk {
     return new TrackStateOnSurface(measurement, trackpar, fitQual, mateff, typePattern);
   }
 
-  Track *GlobalChi2Fitter::makeTrack(
-    const EventContext& ctx,
-    Cache & cache,
-    GXFTrajectory & oldtrajectory,
-    ParticleHypothesis matEffects
+  void GlobalChi2Fitter::makeTrackFillDerivativeMatrix(
+    Cache &cache,
+    GXFTrajectory &oldtrajectory
   ) const {
-    // Convert internal trajectory into track
-    DataVector<const TrackStateOnSurface> *trajectory = new DataVector<const TrackStateOnSurface>;
-    std::vector<GXFTrackState *> & states = oldtrajectory.trackStates();
-    
-    if (m_fillderivmatrix) {
-      std::vector < std::vector < double >>&derivs = oldtrajectory.weightedResidualDerivatives();
-      std::vector < double >&errors = oldtrajectory.errors();
-      int nrealmeas = 0;
-     
-      for (auto & hit : states) {
-        if (
-          hit->trackStateType() == TrackState::Fittable && (
-            (dynamic_cast<const RIO_OnTrack *>(hit->measurement()) != nullptr) || 
-            (dynamic_cast<const CompetingRIOsOnTrack *>(hit->measurement()) != nullptr)
-          )
-        ) {
-          nrealmeas += hit->numberOfMeasuredParameters();
-        }
-      } 
-      
-      cache.m_derivmat.resize(nrealmeas, oldtrajectory.numberOfFitParameters());
-      cache.m_derivmat.setZero();
-
-      int measindex = 0;
-      int measindex2 = 0;
-      int nperpars = oldtrajectory.numberOfPerigeeParameters();
-      int nscat = oldtrajectory.numberOfScatterers();
-     
-      for (auto & hit : states) {
-        if (
-          hit->trackStateType() == TrackState::Fittable && (
-            (dynamic_cast<const RIO_OnTrack *>(hit->measurement()) != nullptr) || 
-            (dynamic_cast<const CompetingRIOsOnTrack *>(hit->measurement()) != nullptr)
-          )
-        ) {
-          for (int i = measindex; i < measindex + hit->numberOfMeasuredParameters(); i++) {
-            for (int j = 0; j < oldtrajectory.numberOfFitParameters(); j++) {
-              cache.m_derivmat(i, j) = derivs[measindex2][j] * errors[measindex2];
-              if ((j == 4 && !oldtrajectory.m_straightline) || j >= nperpars + 2 * nscat) {
-                cache.m_derivmat(i, j) *= 1000;
-              }
-            }
-            
-            measindex2++;
-          }
-          
-          measindex += hit->numberOfMeasuredParameters();
-        } else if (hit->materialEffects() == nullptr) {
-          measindex2 += hit->numberOfMeasuredParameters();
-        }
-      }
-    }
-    
-    GXFTrackState *firstmeasstate = nullptr;
-    GXFTrackState *lastmeasstate = nullptr;
-    bool foundbrem = false;
+    Amg::MatrixX & derivs = oldtrajectory.weightedResidualDerivatives();
+    Amg::VectorX & errors = oldtrajectory.errors();
+    int nrealmeas = 0;
     
-    for (auto & hit : states) {
+    for (auto & hit : oldtrajectory.trackStates()) {
       if (
-        hit->measurementType() == TrackState::Pseudo &&
-        hit->trackStateType() == TrackState::GeneralOutlier
+        hit->trackStateType() == TrackState::Fittable && (
+          (dynamic_cast<const RIO_OnTrack *>(hit->measurement()) != nullptr) || 
+          (dynamic_cast<const CompetingRIOsOnTrack *>(hit->measurement()) != nullptr)
+        )
       ) {
-        if (hit->trackCovariance() != nullptr) {
-          hit->setTrackCovariance(nullptr);
-        }
-        continue;
+        nrealmeas += hit->numberOfMeasuredParameters();
       }
-      
+    } 
+    
+    cache.m_derivmat.resize(nrealmeas, oldtrajectory.numberOfFitParameters());
+    cache.m_derivmat.setZero();
+
+    int measindex = 0;
+    int measindex2 = 0;
+    int nperpars = oldtrajectory.numberOfPerigeeParameters();
+    int nscat = oldtrajectory.numberOfScatterers();
+    
+    for (auto & hit : oldtrajectory.trackStates()) {
       if (
-        matEffects == electron && 
-        (hit->materialEffects() != nullptr) && 
-        hit->materialEffects()->isKink()
+        hit->trackStateType() == TrackState::Fittable && (
+          (dynamic_cast<const RIO_OnTrack *>(hit->measurement()) != nullptr) || 
+          (dynamic_cast<const CompetingRIOsOnTrack *>(hit->measurement()) != nullptr)
+        )
       ) {
-        foundbrem = true;
-      }
-      
-      const TrackStateOnSurface *trackState = makeTSOS(hit, matEffects);
-      trajectory->push_back(trackState);
-      
-      if (trackState->measurementOnTrack() != nullptr) {
-        if (firstmeasstate == nullptr) {
-          firstmeasstate = hit;
+        for (int i = measindex; i < measindex + hit->numberOfMeasuredParameters(); i++) {
+          for (int j = 0; j < oldtrajectory.numberOfFitParameters(); j++) {
+            cache.m_derivmat(i, j) = derivs(measindex2, j) * errors[measindex2];
+            if ((j == 4 && !oldtrajectory.m_straightline) || j >= nperpars + 2 * nscat) {
+              cache.m_derivmat(i, j) *= 1000;
+            }
+          }
+          
+          measindex2++;
         }
-        lastmeasstate = hit;
-      }
-    }
-
-    const FitQuality *qual = new FitQuality(oldtrajectory.chi2(), oldtrajectory.nDOF());
-
-    ATH_MSG_VERBOSE("making Trk::Track...");
-    
-    TrackInfo info;
-    
-    if (matEffects != electron) {
-      info = TrackInfo(TrackInfo::GlobalChi2Fitter, matEffects);
-    } else {
-      info = TrackInfo(TrackInfo::GlobalChi2Fitter, Trk::electron);
-      info.setTrackProperties(TrackInfo::BremFit);
-      if (foundbrem) {
-        info.setTrackProperties(TrackInfo::BremFitSuccessful);
+        
+        measindex += hit->numberOfMeasuredParameters();
+      } else if (hit->materialEffects() == nullptr) {
+        measindex2 += hit->numberOfMeasuredParameters();
       }
     }
-    
-    if (oldtrajectory.m_straightline) {
-      info.setTrackProperties(TrackInfo::StraightTrack);
-    }
+  }
 
-    if (firstmeasstate == nullptr) {
-      throw std::logic_error("no first measurement.");
-    }
-    
+  std::unique_ptr<const TrackParameters> GlobalChi2Fitter::makeTrackFindPerigeeParameters(
+    const EventContext & ctx,
+    Cache &cache,
+    GXFTrajectory &oldtrajectory,
+    const ParticleHypothesis matEffects
+  ) const {
+    GXFTrackState *firstmeasstate, *lastmeasstate;
+    std::tie(firstmeasstate, lastmeasstate) = oldtrajectory.findFirstLastMeasurement();
     const TrackParameters *per = nullptr;
-    
+
     if (cache.m_acceleration && !m_matupdator.empty()) {
       const TrackParameters *prevpar = firstmeasstate->trackParameters();
       const TrackParameters *tmppar = firstmeasstate->trackParameters();
@@ -7378,14 +7319,9 @@ namespace Trk {
       }
       
       if (per == nullptr) {
-        delete trajectory;
-        delete qual;
-        
         ATH_MSG_DEBUG("Failed to extrapolate to perigee, returning 0");
-        
-        cache.m_fittercode = FitterStatusCode::ExtrapolationFailure;
-
         incrementFitStatus(S_PROPAGATION_FAIL);
+        cache.m_fittercode = FitterStatusCode::ExtrapolationFailure;
         return nullptr;
       }
     } else if (cache.m_acceleration && (firstmeasstate->trackParameters() != nullptr)) {
@@ -7400,21 +7336,91 @@ namespace Trk {
       per = oldtrajectory.referenceParameters(true);
     }
 
+    return std::unique_ptr<const TrackParameters>(per);
+  }
+
+  std::unique_ptr<const TrackStateOnSurface> GlobalChi2Fitter::makeTrackFindPerigee(
+    const EventContext & ctx,
+    Cache &cache,
+    GXFTrajectory &oldtrajectory,
+    const ParticleHypothesis matEffects
+  ) const {
+    std::unique_ptr<const TrackParameters> per = makeTrackFindPerigeeParameters(ctx, cache, oldtrajectory, matEffects);
+
+    if (per == nullptr) {
+      return nullptr;
+    }
+
     std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
     typePattern.set(TrackStateOnSurface::Perigee);
-    const TrackStateOnSurface *pertsos = new TrackStateOnSurface(nullptr, per, nullptr, nullptr, typePattern);
-    
+
     ATH_MSG_DEBUG("Final perigee: " << *per << " pos: " << per->position() << " pT: " << per->pT());
+
+    return std::make_unique<const TrackStateOnSurface>(nullptr, per.release(), nullptr, nullptr, typePattern);
+  }
+
+  std::unique_ptr<Track> GlobalChi2Fitter::makeTrack(
+    const EventContext & ctx,
+    Cache & cache,
+    GXFTrajectory & oldtrajectory,
+    ParticleHypothesis matEffects
+  ) const {
+    // Convert internal trajectory into track
+    std::unique_ptr<DataVector<const TrackStateOnSurface>> trajectory = std::make_unique<DataVector<const TrackStateOnSurface>>();
     
-    if (!cache.m_acceleration) {
-      trajectory->insert(trajectory->begin() + oldtrajectory.numberOfUpstreamStates(), pertsos);
+    if (m_fillderivmatrix) {
+      makeTrackFillDerivativeMatrix(cache, oldtrajectory);
+    }
+        
+    for (auto & hit : oldtrajectory.trackStates()) {
+      if (
+        hit->measurementType() == TrackState::Pseudo &&
+        hit->trackStateType() == TrackState::GeneralOutlier
+      ) {
+        if (hit->trackCovariance() != nullptr) {
+          hit->setTrackCovariance(nullptr);
+        }
+        continue;
+      }
+      
+      const TrackStateOnSurface *trackState = makeTSOS(hit, matEffects);
+      trajectory->push_back(trackState);
+    }
+
+    std::unique_ptr<const FitQuality> qual = std::make_unique<const FitQuality>(oldtrajectory.chi2(), oldtrajectory.nDOF());
+
+    ATH_MSG_VERBOSE("making Trk::Track...");
+    
+    TrackInfo info;
+    
+    if (matEffects != electron) {
+      info = TrackInfo(TrackInfo::GlobalChi2Fitter, matEffects);
     } else {
-      trajectory->insert(trajectory->begin(), pertsos);
+      info = TrackInfo(TrackInfo::GlobalChi2Fitter, Trk::electron);
+      info.setTrackProperties(TrackInfo::BremFit);
+
+      if (matEffects == electron && oldtrajectory.hasKink()) {
+        info.setTrackProperties(TrackInfo::BremFitSuccessful);
+      }
     }
+    
+    if (oldtrajectory.m_straightline) {
+      info.setTrackProperties(TrackInfo::StraightTrack);
+    }
+    
+    std::unique_ptr<const TrackStateOnSurface> pertsos = makeTrackFindPerigee(ctx, cache, oldtrajectory, matEffects);
 
-    Track *track = new Track(info, trajectory, qual);
+    if (pertsos == nullptr) {
+      return nullptr;
+    }
+        
+    if (!cache.m_acceleration) {
+      trajectory->insert(trajectory->begin() + oldtrajectory.numberOfUpstreamStates(), pertsos.release());
+    } else {
+      trajectory->insert(trajectory->begin(), pertsos.release());
+    }
 
-    return track;
+    return std::make_unique<Track>(info, trajectory.release(), qual.release());
   }
 
   GlobalChi2Fitter::~GlobalChi2Fitter() {
@@ -7819,330 +7825,181 @@ namespace Trk {
     return FitterStatusCode::Success;
   }
 
-  void
-    GlobalChi2Fitter::calculateDerivatives(GXFTrajectory & trajectory) const {
-    ATH_MSG_DEBUG("CalculateDerivatives");
+  void GlobalChi2Fitter::calculateJac(
+    Eigen::Matrix<double, 5, 5> & jac,
+    Eigen::Matrix<double, 5, 5> & out,
+    int jmin, int jmax
+  ) const {
+    out = (jac * out);
+    
+    if (jmin > 0) {
+      out.block(0, 0, 4, jmin).setZero();
+    }
 
-    std::vector < GXFTrackState * >&states = trajectory.trackStates();
-    int scatno = trajectory.numberOfUpstreamScatterers() - 1;
-    int bremno = trajectory.numberOfUpstreamBrems() - 1;
+    if (jmax < 4) {
+      out.block(0, jmax + 1, 4, 5 - (jmax + 1)).setZero();
+    }
+
+    out(4, 4) = jac(4, 4);
+  }
+
+  void GlobalChi2Fitter::calculateDerivatives(GXFTrajectory & trajectory) const { 
     int nstatesupstream = trajectory.numberOfUpstreamStates();
     int nscatupstream = trajectory.numberOfUpstreamScatterers();
     int nbremupstream = trajectory.numberOfUpstreamBrems();
     int nscats = trajectory.numberOfScatterers();
-    int nperpars = trajectory.numberOfPerigeeParameters();
-    // int nfitpars=trajectory.numberOfFitParameters();
-
-    // A bit of a nightmare here SMatris is Row major
-    // Storage in eigen is normally column major
-    // change stuff around so that indicies dont need to worked out;
-    // Intruth what follows is impossible to follow and needs to be clearly documented
-
-    typedef Eigen::Matrix < double, 5, 5, Eigen::RowMajor > EigenRM55;
-    EigenRM55 initialjac;
-      initialjac.setZero();
-      initialjac(4, 4) = 1;
-    EigenRM55 jacvertex(initialjac);
-      std::vector < EigenRM55 > jacscat(trajectory.numberOfScatterers(),
-                                        initialjac);
-    int maxk[5] = {
-      4, 4, 4, 4, 5
-    };
-    std::vector < EigenRM55 > jacbrem(trajectory.numberOfBrems(), initialjac);
-    GXFTrackState *prevstate = nullptr;
-    GXFTrackState *state = nullptr;
-    for (int hitno = nstatesupstream - 1; hitno >= 0; hitno--) {
-      state = states[hitno];
-      bool fillderivmat = false;
-      TrackState::TrackStateType tstype = state->trackStateType();
-      if (tstype != TrackState::Scatterer && tstype != TrackState::Brem) {
-        fillderivmat = true;
-      }
-      int jmin = 0;
-      int jmax = 4;
-      int jminbrem = 0;
-      int jmaxbrem = 4;
-      if (hitno == 0) {
-        if (!fillderivmat) {
-          break;
-        }
-        jmin = 2;
-        jmax = 3;
-        jminbrem = 4;
-      }
-      double (*jac)[5] = state->jacobian();
-      if (hitno == nstatesupstream - 1) {
-        for (int i = 0; i < 4; i++) {
-          for (int j = 0; j < 5; j++) {
-            jacvertex(i, j) = jac[i][j];
-          }
-        }
-        jacvertex(4, 4) = jac[4][4];
-      } else {
-        for (int scatindex = nscatupstream - 1; scatindex > scatno;
-             scatindex--) {
-          if ((prevstate != nullptr)
-              && prevstate->trackStateType() == TrackState::Scatterer
-              && scatindex == scatno + 1 && ((trajectory.prefit() == 0)
-                                             || prevstate->materialEffects()->
-                                             deltaE() == 0)) {
-            for (int i = 0; i < 4; i++) {
-              for (int j = jmin; j <= jmax; j++) {
-                jacscat[scatindex] (i, j) = jac[i][j];
-              }
-            }
-            jacscat[scatindex] (4, 4) = jac[4][4];
-          } else {
-            EigenRM55 & tmpjac2 = jacscat[scatindex];
-            EigenRM55 & tmpjac = initialjac;
-            double *myarray = tmpjac2.data();
-            for (int i = 0; i < 4; i++) {
-              int myindex;
-              for (int j = jmin; j <= jmax; j++) {
-                double tmp = 0;
-                myindex = j;
-                for (int k = 0; k < maxk[j]; k++) {
-                  tmp += jac[i][k] * myarray[myindex];
-                  myindex += 5;
-                }
-                tmpjac(i, j) = tmp;
-              }
-            }
-            jacscat[scatindex] = tmpjac;
-            jacscat[scatindex] (4, 4) = jac[4][4] * jacscat[scatindex] (4, 4);
-          }
-          if (fillderivmat) {
-            Amg::MatrixX & derivmat = state->derivatives();
-            int scatterPos = nperpars + 2 * scatindex;
-            for (int i = 0; i < 4; i++) {
-              derivmat(i, scatterPos) = -jacscat[scatindex] (i, 2);
-              derivmat(i, scatterPos + 1) = -jacscat[scatindex] (i, 3);
-            }
-          }
-        }
-        for (int bremindex = nbremupstream - 1; bremindex > bremno;
-             bremindex--) {
-          if ((prevstate != nullptr) && (prevstate->materialEffects() != nullptr)
-              && prevstate->materialEffects()->sigmaDeltaE() > 0
-              && bremindex == bremno + 1) {
-            for (int i = 0; i < 4; i++) {
-              for (int j = jminbrem; j <= jmaxbrem; j++) {
-                jacbrem[bremindex] (i, j) = jac[i][j];
-              }
-            }
-            jacbrem[bremindex] (4, 4) = jac[4][4];
-          } else {
-            EigenRM55 & tmpjac = initialjac;
-            for (int i = 0; i < 4; i++) {
-              for (int j = jminbrem; j <= jmaxbrem; j++) {
-                double tmp = 0;
-                for (int k = 0; k < maxk[j]; k++) {
-                  tmp += jac[i][k] * jacbrem[bremindex] (k, j);
-                }
-                tmpjac(i, j) = tmp;
-              }
-            }
-            jacbrem[bremindex] = tmpjac;
-            jacbrem[bremindex] (4, 4) = jac[4][4] * jacbrem[bremindex] (4, 4);
-          }
+    int nperpars = trajectory.numberOfPerigeeParameters(); 
+    int nfitpars = trajectory.numberOfFitParameters();
 
-          if (fillderivmat) {
-            Amg::MatrixX & derivmat = state->derivatives();
-            int scatterPos = nperpars + 2 * nscats + bremindex;
-            for (int i = 0; i < 5; i++) {
-              derivmat(i, scatterPos) = -0.001 * jacbrem[bremindex] (i, 4);
-            }
-          }
-        }
+    typedef Eigen::Matrix<double, 5, 5> Matrix55;
 
-        EigenRM55 & tmpjac = initialjac;
-        for (int i = 0; i < 4; i++) {
-          for (int j = 0; j < 5; j++) {
-            double tmp = 0;
-            for (int k = 0; k < maxk[j]; k++) {
-              tmp += jac[i][k] * jacvertex(k, j);
-            }
-            tmpjac(i, j) = tmp;
-          }
+    Matrix55 initialjac;
+    initialjac.setZero();
+    initialjac(4, 4) = 1;
+    
+    Matrix55 jacvertex(initialjac);
+    
+    std::vector<Matrix55, Eigen::aligned_allocator<Matrix55>> jacscat(trajectory.numberOfScatterers(), initialjac);
+    std::vector<Matrix55, Eigen::aligned_allocator<Matrix55>> jacbrem(trajectory.numberOfBrems(), initialjac);
+
+    std::vector<GXFTrackState*> & states = trajectory.trackStates(); 
+    GXFTrackState *prevstate = nullptr, *state = nullptr;
+
+    int hit_begin, hit_end, scatno, bremno;
+
+    for (bool forward : {false, true}) {
+      if (forward) {
+        hit_begin = nstatesupstream;
+        hit_end = (int) states.size();  
+        scatno = nscatupstream;
+        bremno = nbremupstream;
+      } else {
+        hit_begin = nstatesupstream - 1;
+        hit_end = 0;
+        scatno = trajectory.numberOfUpstreamScatterers() - 1;
+        bremno = trajectory.numberOfUpstreamBrems() - 1;
+      }      
+      
+      for (
+        int hitno = hit_begin;
+        forward ? (hitno < hit_end) : (hitno >= hit_end); 
+        hitno += (forward ? 1 : -1)
+      ) {
+        state = states[hitno];
+        
+        TrackState::TrackStateType tstype = state->trackStateType();
+        bool fillderivmat = (tstype != TrackState::Scatterer && tstype != TrackState::Brem);
+       
+        if (fillderivmat && state->derivatives().cols() != nfitpars) {
+          state->derivatives().resize(5, nfitpars);
+          state->derivatives().setZero();
         }
-        jacvertex = tmpjac;
-        jacvertex(4, 4) = jac[4][4] * jacvertex(4, 4);
-      }
 
-      if (fillderivmat) {
-        Amg::MatrixX & derivmat = state->derivatives();
-        for (int i = 0; i < 4; i++) {
-          for (int j = 0; j < nperpars; j++) {
-            derivmat(i, j) = jacvertex(i, j);
-          }
-          if (nperpars == 5) {
-            derivmat(i, 4) *= .001;
+        int jminscat = 0, jmaxscat = 4, jminbrem = 0, jmaxbrem = 4;
+        
+        if (hitno == (forward ? hit_end - 1 : 0)) {
+          if (!fillderivmat) {
+            break;
           }
+          jminscat = 2;
+          jmaxscat = 3;
+          jminbrem = 4;
         }
-        if (nperpars == 5) {
-          derivmat(4, 4) = .001 * jacvertex(4, 4);
-        }
-      }
+        
+        Eigen::Matrix<double, 5, 5> & jac = state->jacobian();
 
-      if (tstype == TrackState::Scatterer &&
-          ((trajectory.prefit() == 0)
-           || states[hitno]->materialEffects()->deltaE() == 0)) {
-        scatno--;
-      }
-      if ((states[hitno]->materialEffects() != nullptr)
-          && states[hitno]->materialEffects()->sigmaDeltaE() > 0) {
-        bremno--;
-      }
-      prevstate = states[hitno];
-    }
+        if (hitno == nstatesupstream + (forward ? 0 : -1)) {
+          jacvertex.block<4, 5>(0, 0) = jac.block<4, 5>(0, 0);
+          jacvertex(4, 4) = jac(4, 4);
+        } else {
+          int jmin, jmax, jcnt;
+          int lp_bgn, lp_end;
 
-    scatno = nscatupstream;
-    bremno = nbremupstream;
-    prevstate = nullptr;
+          jmin = jminscat;
+          jmax = jmaxscat;
+          jcnt = jmax - jmin + 1;
 
-    for (int hitno = nstatesupstream; hitno < (int) states.size(); hitno++) {
-      state = states[hitno];
-      bool fillderivmat = false;
-      TrackState::TrackStateType tstype = state->trackStateType();
-      int imax = 3;
-      if (tstype != TrackState::Scatterer && tstype != TrackState::Brem) {
-        fillderivmat = true;
-      }
-      int jmin = 0;
-      int jmax = 4;
-      int jminbrem = 0;
-      int jmaxbrem = 4;
-      if (hitno == (int) states.size() - 1) {
-        if (!fillderivmat) {
-          break;
-        }
-        jmin = 2;
-        jmax = 3;
-        jminbrem = 4;
-      }
-      double (*jac)[5] = state->jacobian();
+          lp_bgn = forward ? nscatupstream : nscatupstream - 1;
+          lp_end = scatno;
 
-      if (hitno == nstatesupstream) {
-        for (int i = 0; i < 4; i++) {
-          for (int j = 0; j < 5; j++) {
-            jacvertex(i, j) = jac[i][j];
-          }
-        }
-        jacvertex(4, 4) = jac[4][4];
-      } else {
-        for (int scatindex = nscatupstream; scatindex < scatno; scatindex++) {
-          if ((prevstate != nullptr)
-              && prevstate->trackStateType() == TrackState::Scatterer
-              && scatindex == scatno - 1 && ((trajectory.prefit() == 0)
-                                             || prevstate->materialEffects()->
-                                             deltaE() == 0)) {
-            for (int i = 0; i < 4; i++) {
-              for (int j = jmin; j <= jmax; j++) {
-                jacscat[scatindex] (i, j) = jac[i][j];
-              }
-            }
-            jacscat[scatindex] (4, 4) = jac[4][4];
-          } else {
-            EigenRM55 & tmpjac2 = jacscat[scatindex];
-            EigenRM55 & tmpjac = initialjac;
-            double *myarray = tmpjac2.data();
-            for (int i = 0; i < 4; i++) {
-              int myindex;
-              for (int j = jmin; j <= jmax; j++) {
-                double tmp = 0;
-                myindex = j;
-                for (int k = 0; k < maxk[j]; k++) {
-                  tmp += jac[i][k] * myarray[myindex];
-                  myindex += 5;
-                }
-                tmpjac(i, j) = tmp;
-              }
-            }
-            jacscat[scatindex] = tmpjac;
-            jacscat[scatindex] (4, 4) = jacscat[scatindex] (4, 4) * jac[4][4];
-          }
-          if (fillderivmat) {
-            Amg::MatrixX & derivmat = state->derivatives();
-            int scatterPos = nperpars + 2 * scatindex;
-            for (int i = 0; i <= imax; i++) {
-              derivmat(i, scatterPos) = jacscat[scatindex] (i, 2);
-              derivmat(i, scatterPos + 1) = jacscat[scatindex] (i, 3);
-            }
-          }
-        }
-        for (int bremindex = nbremupstream; bremindex < bremno; bremindex++) {
-          if ((prevstate != nullptr) && (prevstate->materialEffects() != nullptr)
-              && prevstate->materialEffects()->sigmaDeltaE() > 0
-              && bremindex == bremno - 1) {
-            for (int i = 0; i < 4; i++) {
-              for (int j = jminbrem; j <= jmaxbrem; j++) {
-                jacbrem[bremindex] (i, j) = jac[i][j];
-              }
+          for (int i = lp_bgn; forward ? (i < lp_end) : (i > lp_end); i += (forward ? 1 : -1)) {
+            if (
+              i == scatno + (forward ? -1 : 1) &&
+              prevstate != nullptr && 
+              prevstate->trackStateType() == TrackState::Scatterer && 
+              (!trajectory.prefit() || prevstate->materialEffects()->deltaE() == 0)
+            ) {
+              jacscat[i].block(0, jmin, 4, jcnt) = jac.block(0, jmin, 4, jcnt);
+              jacscat[i](4, 4) = jac(4, 4);
+            } else {
+              calculateJac(jac, jacscat[i], jmin, jmax);
             }
-            jacbrem[bremindex] (4, 4) = jac[4][4];
-          } else {
-            EigenRM55 & tmpjac = initialjac;
-            for (int i = 0; i < 4; i++) {
-              for (int j = jminbrem; j <= jmaxbrem; j++) {
-                double tmp = 0;
-                for (int k = 0; k < maxk[j]; k++) {
-                  tmp += jac[i][k] * jacbrem[bremindex] (k, j);
-                }
-                tmpjac(i, j) = tmp;
-              }
+
+            if (fillderivmat) {
+              Eigen::MatrixXd & derivmat = state->derivatives();
+              int scatterPos = nperpars + 2 * i;
+            
+              derivmat.block<4, 2>(0, scatterPos) = (forward ? 1 : -1) * jacscat[i].block<4, 2>(0, 2);
             }
-            jacbrem[bremindex] = tmpjac;
-            jacbrem[bremindex] (4, 4) = jacbrem[bremindex] (4, 4) * jac[4][4];
           }
 
-          if (fillderivmat) {
-            Amg::MatrixX & derivmat = state->derivatives();
-            int scatterPos = nperpars + 2 * nscats + bremindex;
-            for (int i = 0; i <= 4; i++) {
-              derivmat(i, scatterPos) = .001 * jacbrem[bremindex] (i, 4);
+          jmin = jminbrem;
+          jmax = jmaxbrem;
+          jcnt = jmax - jmin + 1;
+
+          lp_bgn = forward ? nbremupstream : nbremupstream - 1;
+          lp_end = bremno;
+
+          for (int i = lp_bgn; forward ? (i < lp_end) : (i > lp_end); i += (forward ? 1 : -1)) {
+            if (
+              i == bremno + (forward ? -1 : 1) &&
+              prevstate && 
+              prevstate->materialEffects() && 
+              prevstate->materialEffects()->sigmaDeltaE() > 0 
+            ) {
+              jacbrem[i].block(0, jmin, 4, jcnt) = jac.block(0, jmin, 4, jcnt);
+              jacbrem[i](4, 4) = jac(4, 4);
+            } else {
+              calculateJac(jac, jacbrem[i], jmin, jmax);
             }
-          }
-        }
 
-        EigenRM55 & tmpjac = initialjac;
-        for (int i = 0; i < 4; i++) {
-          for (int j = 0; j < 5; j++) {
-            double tmp = 0;
-            for (int k = 0; k < maxk[j]; k++) {
-              tmp += jac[i][k] * jacvertex(k, j);
+            if (fillderivmat) {
+              Eigen::MatrixXd & derivmat = state->derivatives();
+              int scatterPos = nperpars + 2 * nscats + i;
+
+              derivmat.block<5, 1>(0, scatterPos) = (forward ? .001 : -.001) * jacbrem[i].block<5, 1>(0, 4);
             }
-            tmpjac(i, j) = tmp;
           }
+
+          calculateJac(jac, jacvertex, 0, 4);
         }
-        jacvertex = tmpjac;
-        jacvertex(4, 4) = jacvertex(4, 4) * jac[4][4];
-      }
 
-      if (fillderivmat) {
-        Amg::MatrixX & derivmat = state->derivatives();
-        for (int i = 0; i <= imax; i++) {
-          for (int j = 0; j < nperpars; j++) {
-            derivmat(i, j) = jacvertex(i, j);
-          }
+        if (fillderivmat) {
+          Eigen::MatrixXd & derivmat = state->derivatives();
+          derivmat.block(0, 0, 4, nperpars) = jacvertex.block(0, 0, 4, nperpars);
+
           if (nperpars == 5) {
-            derivmat(i, 4) *= .001;
+            derivmat.col(4).segment(0, 4) *= .001;
+            derivmat(4, 4) = .001 * jacvertex(4, 4);
           }
         }
-        if (nperpars == 5) {
-          derivmat(4, 4) = 0.001 * jacvertex(4, 4);
-        }
-      }
 
-      if (tstype == TrackState::Scatterer &&
-          ((trajectory.prefit() == 0)
-           || states[hitno]->materialEffects()->deltaE() == 0)) {
-        scatno++;
-      }
-      if ((states[hitno]->materialEffects() != nullptr)
-          && states[hitno]->materialEffects()->sigmaDeltaE() > 0) {
-        bremno++;
+        if (
+          tstype == TrackState::Scatterer &&
+          (!trajectory.prefit() || states[hitno]->materialEffects()->deltaE() == 0)
+        ) {
+          scatno += (forward ? 1 : -1);
+        }
+        
+        if (
+          states[hitno]->materialEffects() && 
+          states[hitno]->materialEffects()->sigmaDeltaE() > 0
+        ) {
+          bremno += (forward ? 1 : -1);
+        }
+        
+        prevstate = states[hitno];
       }
-      prevstate = states[hitno];
     }
   }
 
@@ -8160,9 +8017,6 @@ namespace Trk {
     int nstatesupstream = trajectory.numberOfUpstreamStates();
     int nscatupstream = trajectory.numberOfUpstreamScatterers();
     int nbremupstream = trajectory.numberOfUpstreamBrems();
-    int nfitpars = trajectory.numberOfFitParameters();
-    int nscats = trajectory.numberOfScatterers();
-    int nperpars = trajectory.numberOfPerigeeParameters();
     int hitno = 0;
     int scatno = nscatupstream;
     int bremno = nbremupstream;
@@ -8177,10 +8031,6 @@ namespace Trk {
         indices[j] = j;
       }
     }
-    std::vector < int >rowindices[5];
-    for (auto & rowindice : rowindices) {
-      rowindice.reserve(nfitpars);
-    }
     for (int stateno = 0; stateno < (int) states.size(); stateno++) {
       if (stateno == 0 || stateno == nstatesupstream) {
         scatno = nscatupstream;
@@ -8219,56 +8069,14 @@ namespace Trk {
           (prevstate->trackStateType() == TrackState::Fittable ||
            prevstate->trackStateType() == TrackState::GeneralOutlier)
           && !onlylocal) {
-        double (*jac)[5] = state->jacobian();
-        AmgMatrix(5, 5) & prevcov =
-          *states[indices[stateno - 1]]->trackCovariance();
-        errors1(jac, prevcov, trackerrmat, onlylocal);
+        Eigen::Matrix<double, 5, 5> & jac = state->jacobian();
+        AmgMatrix(5, 5) & prevcov = *states[indices[stateno - 1]]->trackCovariance();
+      
+        trackerrmat = jac * prevcov * jac.transpose();
       } else {
-        int maxl = trajectory.m_straightline ? 3 : 4;
-        int minm[5] = {
-          0, 0, 0, 0, 0
-        };
-        if (onlylocal) {
-          TrackState::MeasurementType hittype = state->measurementType();
-          if (hittype == TrackState::Pixel || state->sinStereo() != 0) {
-            maxl = 1;
-          } else {
-            maxl = 0;
-          }
-          if (hittype == TrackState::Pixel) {
-            minm[1] = 1;
-          }
-        }
         Amg::MatrixX & derivatives = state->derivatives();
-        // Only consider scatterers and brems which give non-zero derivatives
-        int scatmin = (scatno < nscatupstream) ? scatno : nscatupstream;
-        int scatmax = (scatno < nscatupstream) ? nscatupstream : scatno;
-        int bremmin = (bremno < nbremupstream) ? bremno : nbremupstream;
-        int bremmax = (bremno < nbremupstream) ? nbremupstream : bremno;
-        for (int i = 0; i < 4; i++) {
-          rowindices[i].clear();
-          for (int j = 0; j < nperpars; j++) {
-            rowindices[i].push_back(j);
-          }
-          for (int j = nperpars + 2 * scatmin; j < nperpars + 2 * scatmax;
-               j++) {
-            rowindices[i].push_back(j);
-          }
-          for (int j = nperpars + 2 * nscats + bremmin;
-               j < nperpars + 2 * nscats + bremmax; j++) {
-            rowindices[i].push_back(j);
-          }
-        }
-        if (!trajectory.m_straightline) {
-          rowindices[4].clear();
-          rowindices[4].push_back(4);
-          for (int j = nperpars + 2 * nscats + bremmin;
-               j < nperpars + 2 * nscats + bremmax; j++) {
-            rowindices[4].push_back(j);
-          }
-        }
-        errors2(derivatives, trackerrmat, fullcovmat.data(), rowindices, maxl,
-                minm, onlylocal, nfitpars);
+        
+        trackerrmat = derivatives * fullcovmat * derivatives.transpose();
       }
 
       if (!onlylocal) {
@@ -8532,98 +8340,6 @@ namespace Trk {
     return !(theta < 0 || theta > M_PI || phi < -M_PI || phi > M_PI);
   }
 
-  void
-   
-    GlobalChi2Fitter::errors1(double (*jac)[5], AmgSymMatrix(5) & prevcov,
-                              AmgSymMatrix(5) & trackerrmat,
-                              bool onlylocal) const {
-    // propagate error from previous state to current state
-
-    double tmp3 = 0;
-
-    for (int l = 0; l < 4; l++) {
-      for (int m = 0; m < l; m++) {
-        if (!onlylocal && trackerrmat(l, m) != 0) {
-          continue;
-        }
-        tmp3 = 0;
-        for (int j = 0; j < 5; j++) {
-          for (int k = 0; k < 5; k++) {
-            tmp3 += jac[l][j] * prevcov(j, k) * jac[m][k];
-          }
-        }
-        trackerrmat(l, m) = trackerrmat(m, l) = tmp3;
-      }
-
-      tmp3 = 0;
-      for (int k = 0; k < 5; k++) {
-        tmp3 += prevcov(4, k) * jac[l][k];
-      }
-      trackerrmat(4, l) = trackerrmat(l, 4) = tmp3;
-      if (!onlylocal && trackerrmat(l, l) != 0) {
-        continue;
-      }
-      tmp3 = 0;
-      for (int j = 0; j < 5; j++) {
-        for (int k = 0; k < j; k++) {
-          tmp3 += 2 * jac[l][j] * prevcov(j, k) * jac[l][k];
-        }
-        tmp3 += jac[l][j] * prevcov(j, j) * jac[l][j];
-      }
-      trackerrmat(l, l) = tmp3;
-    }
-    trackerrmat(4, 4) = prevcov(4, 4);
-  }
-
-  void
-   
-    GlobalChi2Fitter::errors2(Amg::MatrixX & derivatives,
-                              AmgSymMatrix(5) & trackerrmat, double *myarray,
-                              std::vector < int >*rowindices, int &maxl,
-                              int *minm, bool onlylocal, int nfitpars) const {
-    // Project global error matrix onto current state
-
-    double tmp3 = 0;
-    int j;
-    int k;
-    int rowindex;
-
-    for (int l = 0; l <= maxl; l++) {
-      for (int m = minm[l]; m < l; m++) {
-        if (!onlylocal && trackerrmat(l, m) != 0) {
-          continue;
-        }
-        tmp3 = 0;
-        for (int j2 = 0; j2 < (int) rowindices[l].size(); j2++) {
-          j = rowindices[l][j2];
-          rowindex = j * nfitpars;
-          for (int k2 = 0; k2 < (int) rowindices[m].size(); k2++) {
-            k = rowindices[m][k2];
-            tmp3 +=
-              derivatives(l, j) * myarray[rowindex + k] * derivatives(m, k);
-          }
-        }
-        trackerrmat(l, m) = trackerrmat(m, l) = tmp3;
-      }
-
-      if (!onlylocal && trackerrmat(l, l) != 0) {
-        continue;
-      }
-      tmp3 = 0;
-      for (int j2 = 0; j2 < (int) rowindices[l].size(); j2++) {
-        j = rowindices[l][j2];
-        rowindex = j * nfitpars;
-        for (int k2 = 0; k2 < j2; k2++) {
-          k = rowindices[l][k2];
-          tmp3 +=
-            2 * derivatives(l, j) * myarray[rowindex + k] * derivatives(l, k);
-        }
-        tmp3 += derivatives(l, j) * myarray[rowindex + j] * derivatives(l, j);
-      }
-      trackerrmat(l, l) = tmp3;
-    }
-  }
-
   bool Trk::GlobalChi2Fitter::isMuonTrack(const Track & intrk1) const {
     int nmeas1 = (int) intrk1.measurementsOnTrack()->size();
     
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
index 9471609d45083cc19a29562c0d48b550cc0bfcca..2daa8c1f8b75589748818db60ae3fae58ba47374 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
@@ -21,9 +21,9 @@
 #include <iterator>
 
 //TODO: to be improved
-bool Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack( const Trk::Track *track) const {
+bool 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack( const Trk::Track *track) const {
 	  if (!track )return true;
-	
 	  bool error=false;
 	  if (track->trackParameters()){
 	    int counter=0;
@@ -54,8 +54,7 @@ Trk::DenseEnvironmentsAmbiguityProcessorTool::DenseEnvironmentsAmbiguityProcesso
   m_extrapolatorTool("Trk::Extrapolator/AtlasExtrapolator"),
   m_selectionTool("InDet::InDetDenseEnvAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool"),
   m_etaBounds{0.8, 1.6, 2.5, 4.0},
-  m_stat(m_etaBounds)
-{
+  m_stat(m_etaBounds){
   // statitics stuff
 
   m_fitterTool.push_back("Trk::KalmanFitter/InDetTrackFitter");
@@ -86,13 +85,12 @@ Trk::DenseEnvironmentsAmbiguityProcessorTool::DenseEnvironmentsAmbiguityProcesso
 }
 //==================================================================================================
 
-Trk::DenseEnvironmentsAmbiguityProcessorTool::~DenseEnvironmentsAmbiguityProcessorTool()
-{
+Trk::DenseEnvironmentsAmbiguityProcessorTool::~DenseEnvironmentsAmbiguityProcessorTool(){
 }
 //==================================================================================================
 
-StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::initialize()
-{
+StatusCode 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::initialize(){
   StatusCode sc = StatusCode::SUCCESS;
   ATH_CHECK( m_scoringTool.retrieve());
   ATH_CHECK( m_assoMapName.initialize(!m_assoMapName.key().empty()));
@@ -134,13 +132,13 @@ StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::initialize()
 }
 //==================================================================================================
 
-StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::finalize()
-{
+StatusCode 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::finalize(){
   return StatusCode::SUCCESS;
 }
 
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::statistics()
-{
+void 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::statistics(){
   if (msgLvl(MSG::INFO)) {
      MsgStream &out=msg(MSG::INFO);
      out << " -- statistics \n";
@@ -150,28 +148,21 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::statistics()
   }
 }
 
-
-
 //==================================================================================================
-
-
 /** Do actual processing of event. Takes a track container, 
     and then returns the tracks which have been selected*/
 
-TrackCollection* Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const TracksScores *trackScoreTrackMap) const
-{
+TrackCollection* 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const TracksScores *trackScoreTrackMap) const{
   if (!trackScoreTrackMap) return nullptr;
   // clear prdAssociationTool via selection tool
   // @TODO remove :
-  std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map( m_assoTool->createPRDtoTrackMap() );
+  std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap( m_assoTool->createPRDtoTrackMap() );
   if (!m_assoMapName.key().empty()) {
      SG::ReadHandle<Trk::PRDtoTrackMap> input_prd_map(m_assoMapName);
      if (!input_prd_map.isValid()) {
         ATH_MSG_ERROR("Failed to retrieve prd to track map " << m_assoMapName.key() );
      }
-     else {
-        //  *prd_to_track_map = *input_prd_map;
-     }
   }
   std::vector<std::unique_ptr<const Trk::Track> > cleanup_tracks;
   reloadHadROIs();
@@ -179,14 +170,12 @@ TrackCollection* Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const Tra
   // - take track with highest score
   // - remove shared hits from all other tracks
   // - take next highest scoring tracks, and repeat 
-
   ATH_MSG_DEBUG ("Solving Tracks");
-
   TrackCollection* finalTracks = new TrackCollection;
   {
      TrackStat stat(m_etaBounds);
      stat.newEvent();
-     solveTracks(*trackScoreTrackMap, *prd_to_track_map, *finalTracks, cleanup_tracks,stat);
+     solveTracks(*trackScoreTrackMap, *prdToTrackMap, *finalTracks, cleanup_tracks,stat);
      {
         std::lock_guard<std::mutex> lock(m_statMutex);
         m_stat += stat;
@@ -201,21 +190,21 @@ TrackCollection* Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const Tra
 
 //==================================================================================================
 // taking ownership of input track
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, const bool fitted,
+void 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, const bool fitted,
                                                             std::multimap<float, TrackPtr > &scoreTrackFitflagMap,
-                                                            const Trk::PRDtoTrackMap &prd_to_track_map,
+                                                            const Trk::PRDtoTrackMap &prdToTrackMap,
                                                             std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks,
-                                        TrackStat &stat) const{
+                                                            TrackStat &stat) const{
   // compute score
   TrackScore score;
   bool suppressHoleSearch = fitted ? m_suppressHoleSearch : true;
   ATH_MSG_DEBUG ("addTrack()::Fitted             "<< fitted);
   if (m_trackSummaryTool.isEnabled()) {
-     m_trackSummaryTool->computeAndReplaceTrackSummary(*track,
-                                                       &prd_to_track_map,
+    m_trackSummaryTool->computeAndReplaceTrackSummary(*track,
+                                                       &prdToTrackMap,
                                                        suppressHoleSearch);
   }
-
   // @TODO create track summary for track
   score = m_scoringTool->score( *track, suppressHoleSearch );
   // do we accept the track ?
@@ -227,10 +216,10 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c
   }
   // do we try to recover the track ?
   if ( fitted && m_tryBremFit &&
-      !track->info().trackProperties(Trk::TrackInfo::BremFit) &&
-      track->trackParameters()->front()->pT() > m_pTminBrem &&
-      (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI)))
-  {
+    !track->info().trackProperties(Trk::TrackInfo::BremFit) &&
+    track->trackParameters()->front()->pT() > m_pTminBrem &&
+    (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))){
+    //
     ATH_MSG_DEBUG ("Track score is zero, try to recover it via brem fit");
     // run track fit using electron hypothesis
     Trk::Track* bremTrack = fit(*track,true,Trk::electron);
@@ -243,7 +232,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c
       track=nullptr;
     } else {
       if (m_trackSummaryTool.isEnabled()) {
-         m_trackSummaryTool->computeAndReplaceTrackSummary(*bremTrack,&prd_to_track_map,m_suppressHoleSearch);
+         m_trackSummaryTool->computeAndReplaceTrackSummary(*bremTrack,&prdToTrackMap,m_suppressHoleSearch);
       }
       stat.incrementCounterByRegion(EStatType::kNgoodFits,bremTrack);
       // rerun score
@@ -270,15 +259,16 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c
     // @TODO can delete this track ?
     cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(track) );
   }
-  }
+}
 //==================================================================================================
 
 
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScores &trackScoreTrackMap,
-                                                               Trk::PRDtoTrackMap &prd_to_track_map,
+void 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScores &trackScoreTrackMap,
+                                                               Trk::PRDtoTrackMap &prdToTrackMap,
                                                                TrackCollection &finalTracks,
                                                                std::vector<std::unique_ptr<const Trk::Track> > &cleanup_tracks,
-                                           TrackStat &stat) const{
+                                                               TrackStat &stat) const{
   std::multimap<float, TrackPtr  > scoreTrackFitflagMap;
   for(const std::pair< const Trk::Track *, float> &scoreTrack: trackScoreTrackMap){
      scoreTrackFitflagMap.emplace(scoreTrack.second, TrackPtr(scoreTrack.first) );
@@ -295,55 +285,57 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore
     // clean it out to make sure not to many shared hits
     ATH_MSG_DEBUG ("--- Trying next track "<<atrack.track()<<"\t with score "<<-ascore);
     std::unique_ptr<Trk::Track> cleanedTrack;
-    auto [cleanedTrack_tmp, keep_orig] = m_selectionTool->getCleanedOutTrack( atrack.track() , -ascore, prd_to_track_map);
-    cleanedTrack.reset(cleanedTrack_tmp);
+    const auto & [tmpCleanedTrack, keepOriginal] = m_selectionTool->getCleanedOutTrack( atrack.track() , -ascore, prdToTrackMap);
+    cleanedTrack.reset(tmpCleanedTrack);
     ATH_MSG_DEBUG ("--- cleaned next track "<< cleanedTrack.get());
     // cleaned track is input track and fitted
-    if (keep_orig && atrack.fitted()){
+    if (keepOriginal && atrack.fitted()){
       // track can be kept as is and is already fitted
-       ATH_MSG_DEBUG ("Accepted track "<<atrack.track()<<"\t has score "<<-ascore);
-       stat.incrementCounterByRegion(EStatType::kNaccepted, atrack.track() );
-       if (m_tryBremFit && atrack.track()->info().trackProperties(Trk::TrackInfo::BremFit)) {
-          stat.incrementCounterByRegion(EStatType::kNacceptedBrem,atrack.track());
-       }
-
+      ATH_MSG_DEBUG ("Accepted track "<<atrack.track()<<"\t has score "<<-ascore);
+      stat.incrementCounterByRegion(EStatType::kNaccepted, atrack.track() );
+      if (m_tryBremFit && atrack.track()->info().trackProperties(Trk::TrackInfo::BremFit)) {
+        stat.incrementCounterByRegion(EStatType::kNacceptedBrem,atrack.track());
+      }
       //Compute the fitQuality
       double fitQual = 0;
       if  (atrack->fitQuality() && atrack->fitQuality()->numberDoF()>0 ){ 
          fitQual = atrack->fitQuality()->chiSquared()/atrack->fitQuality()->numberDoF();
       }
-
       if(fitQual > 1.3 && decideIfInHighPtBROI(atrack.track())){
         std::unique_ptr<Trk::Track> refittedTrack( refitTracksFromB(atrack.track(), fitQual)); //Q: Is there the case  atrack == refittedTrack ?
         if(refittedTrack){
           // add track to PRD_AssociationTool
-          StatusCode sc = m_assoTool->addPRDs(prd_to_track_map, *refittedTrack);
-          if (sc.isFailure()) ATH_MSG_ERROR( "addPRDs() failed" );
+          if ( m_assoTool->addPRDs(prdToTrackMap, *refittedTrack).isFailure()){
+            ATH_MSG_ERROR( "addPRDs() failed" );
+          } 
           // add to output list
           finalTracks.push_back( refittedTrack.release() );
           if (atrack.newTrack()) {
              cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(atrack.release()) );
           }
-        }else{
+        } else {
           // add track to PRD_AssociationTool
-          StatusCode sc = m_assoTool->addPRDs(prd_to_track_map, *atrack);
-          if (sc.isFailure()) ATH_MSG_ERROR( "addPRDs() failed" );
+          StatusCode sc = m_assoTool->addPRDs(prdToTrackMap, *atrack);
+          if (m_assoTool->addPRDs(prdToTrackMap, *atrack).isFailure()){
+            ATH_MSG_ERROR( "addPRDs() failed" );
+          }
           // add to output list 
           finalTracks.push_back( atrack.release() );
         }
-      }else {
+      } else {
         // add track to PRD_AssociationTool
-        StatusCode sc = m_assoTool->addPRDs(prd_to_track_map, *atrack);
-        if (sc.isFailure()) ATH_MSG_ERROR( "addPRDs() failed" );
+        if (m_assoTool->addPRDs(prdToTrackMap, *atrack).isFailure()){ 
+          ATH_MSG_ERROR( "addPRDs() failed" );
+        }
         // add to output list 
         finalTracks.push_back( atrack.release() );
       }
-    }else if ( keep_orig){
+    } else if ( keepOriginal){
       // track can be kept as is, but is not yet fitted
       ATH_MSG_DEBUG ("Good track("<< atrack.track() << ") but need to fit this track first, score, add it into map again and retry ! ");
-      Trk::Track *refittedTrack = refitTrack(atrack.track(),prd_to_track_map, stat);
+      Trk::Track *refittedTrack = refitTrack(atrack.track(),prdToTrackMap, stat);
       if(refittedTrack) {
-         addTrack( refittedTrack, true , scoreTrackFitflagMap, prd_to_track_map, cleanup_tracks, stat);
+         addTrack( refittedTrack, true , scoreTrackFitflagMap, prdToTrackMap, cleanup_tracks, stat);
       }
       // remove original copy, but delay removal since some pointer to it or its constituents may still be in used
       if (atrack.newTrack()) {
@@ -353,7 +345,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore
       ATH_MSG_DEBUG ("Candidate excluded, add subtrack to map. Track "<<cleanedTrack.get());
       stat.incrementCounterByRegion(EStatType::kNsubTrack,cleanedTrack.get());
       // for this case clenedTrack is a new created object.
-      addTrack(cleanedTrack.release(), false, scoreTrackFitflagMap, prd_to_track_map, cleanup_tracks, stat);
+      addTrack(cleanedTrack.release(), false, scoreTrackFitflagMap, prdToTrackMap, cleanup_tracks, stat);
       // remove original copy, but delay removal since some pointer to it or its constituents may still be in used
       if (atrack.newTrack()) {
          cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(atrack.release()) );
@@ -364,7 +356,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore
       stat.incrementCounterByRegion(EStatType::kNnoSubTrack,atrack.track());
       // remove original copy, but delay removal since some pointer to it or its constituents may still be in used
       if (atrack.newTrack()) {
-         cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(atrack.release()) );
+        cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(atrack.release()) );
       }
     }
   }
@@ -375,14 +367,14 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore
 
 //==================================================================================================
 Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTrack( const Trk::Track* track,
-                                                                      Trk::PRDtoTrackMap &prd_to_track_map,
+                                                                      Trk::PRDtoTrackMap &prdToTrackMap,
                                                   TrackStat &stat) const{
   Trk::Track* newTrack = nullptr;
   if (!m_suppressTrackFit){
     if (m_refitPrds) {
       // simple case, fit PRD directly
       ATH_MSG_VERBOSE ("Refit track "<<track<<" from PRDs");
-      newTrack = refitPrds (track,prd_to_track_map, stat);
+      newTrack = refitPrds (track,prdToTrackMap, stat);
     }else {
       // ok, we fit ROTs
       ATH_MSG_VERBOSE ("Refit track "<<track<<" from ROTs");
@@ -425,22 +417,18 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTrack( const Trk:
 
 //==================================================================================================
 
-Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk::Track* track,
-                                                                     Trk::PRDtoTrackMap &prd_to_track_map,
-                                                 TrackStat &stat) const
-{
-
+Trk::Track* 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk::Track* track,
+                                                 Trk::PRDtoTrackMap &prdToTrackMap,
+                                                 TrackStat &stat) const{
   // get vector of PRDs
   // @TODO ensured that prds on track are registered for this track ?
-   std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prd_to_track_map,*track);
-
+  const auto & prds = m_assoTool->getPrdsOnTrack(prdToTrackMap,*track);
   if ( prds.empty() ) {
     ATH_MSG_WARNING( "No PRDs on track");
     return nullptr;
   }
-     
   ATH_MSG_VERBOSE ("Track "<<track<<"\t has "<<prds.size()<<"\t PRDs");
-
   const TrackParameters* par = track->perigeeParameters();
   if (par==nullptr) {
     ATH_MSG_DEBUG ("Track ("<<track<<") has no perigee! Try any other ?");
@@ -450,29 +438,19 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk::
       return nullptr;
     }
   }
-
   // refit using first parameter, do outliers
   Trk::Track* newTrack = nullptr;
-
-  if (m_tryBremFit && track->info().trackProperties(Trk::TrackInfo::BremFit))
-  {
-
+  if (m_tryBremFit && track->info().trackProperties(Trk::TrackInfo::BremFit)){
     stat.incrementCounterByRegion(EStatType::kNbremFits,track);
-
     ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit");
     // TODO revert once GlobalChi2Fitter properly handles brem fits when 
     //      starting from prds
     // newTrack = fit(prds, *par, true, Trk::electron);
     newTrack = fit(*track, true, Trk::electron);
-
-  }
-  else
-  {
+  } else {
     stat.incrementCounterByRegion(EStatType::kNfits,track);
-
     ATH_MSG_VERBOSE ("Normal track, refit");
     newTrack = fit(prds, *par, true, m_particleHypothesis);
-
     if (!newTrack && m_tryBremFit && par->pT() > m_pTminBrem &&
   (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI)))
     {
@@ -482,17 +460,14 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk::
       //      starting from prds
       // newTrack = fit(prds, *par, true, Trk::electron);
       newTrack = fit(*track, true, Trk::electron);
-
     }
   }
-  
   if(newTrack) {
     stat.incrementCounterByRegion(EStatType::kNgoodFits,newTrack);
     //keeping the track of previously accumulated TrackInfo
-    const Trk::TrackInfo& old_info = track->info();
-    newTrack->info().addPatternReco(old_info);
-  }
-  else {
+    const Trk::TrackInfo& originalInfo = track->info();
+    newTrack->info().addPatternReco(originalInfo);
+  } else {
      stat.incrementCounterByRegion(EStatType::kNfailedFits,track);
   }
   return newTrack;
@@ -500,29 +475,21 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk::
 
 //==================================================================================================
 
-Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::Track* track,
-                                                TrackStat &stat) const
-{
-
+Trk::Track* 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::Track* track,
+                                                TrackStat &stat) const{
   ATH_MSG_VERBOSE ("Refit track "<<track);
-
   // refit using first parameter, do outliers
   Trk::Track* newTrack = nullptr;
-
   if (m_tryBremFit &&
-      track->info().trackProperties(Trk::TrackInfo::BremFit))
-  {
+      track->info().trackProperties(Trk::TrackInfo::BremFit)){
     stat.incrementCounterByRegion(EStatType::kNbremFits,track);
     ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit");
     newTrack = fit(*track, true, Trk::electron);
-  }
-  else
-  {
-
+  } else {
     stat.incrementCounterByRegion(EStatType::kNfits,track);
     ATH_MSG_VERBOSE ("Normal track, refit");
     newTrack = fit(*track, true, m_particleHypothesis);
-
     if (!newTrack && m_tryBremFit &&
         track->trackParameters()->front()->pT() > m_pTminBrem &&
         (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI)))
@@ -533,14 +500,12 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::T
     }
   }
 
-  if(newTrack)
-  {
+  if(newTrack){
     stat.incrementCounterByRegion(EStatType::kNgoodFits,newTrack);
     //keeping the track of previously accumulated TrackInfo
-    const Trk::TrackInfo& old_info = track->info();
-    newTrack->info().addPatternReco(old_info);
-  }
-  else {
+    const Trk::TrackInfo& originalInfo = track->info();
+    newTrack->info().addPatternReco(originalInfo);
+  } else {
     stat.incrementCounterByRegion(EStatType::kNfailedFits,track);
   }
   return newTrack;
@@ -549,15 +514,15 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::T
 
 //==================================================================================================
 
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::storeTrkDistanceMapdR( TrackCollection& tracks,
-                                                                          std::vector<Trk::Track*> &refit_tracks_out )
-{
+void 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::storeTrkDistanceMapdR( TrackCollection& tracks,
+                                          std::vector<Trk::Track*> &refittedTracks ){
   ATH_MSG_VERBOSE ("Creating track Distance dR map");
   SG::WriteHandle<InDet::DRMap> dRMapHandle (m_dRMap);
   dRMapHandle = std::make_unique<InDet::DRMap>();
   if ( !dRMapHandle.isValid() ){
     ATH_MSG_WARNING("Could not record Distance dR map.");
-  } else{
+  } else {
     ATH_MSG_VERBOSE("Distance dR map recorded as '" << m_dRMap.key() <<"'.");
   }
   constexpr double twoPi = 2.*M_PI;
@@ -643,13 +608,13 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::storeTrkDistanceMapdR( TrackC
 	        }
          }
       }
-      if(refit) refit_tracks_out.push_back(track);
+      if(refit) refittedTracks.push_back(track);
   }
   }
 
 //============================================================================================================
-bool Trk::DenseEnvironmentsAmbiguityProcessorTool::decideIfInHighPtBROI(const Trk::Track* ptrTrack) const
-{
+bool 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::decideIfInHighPtBROI(const Trk::Track* ptrTrack) const{
   // Are we in a ROI?
   bool inROIandPTok(true);
   if(  ptrTrack->trackParameters()->front() ){
@@ -658,31 +623,27 @@ bool Trk::DenseEnvironmentsAmbiguityProcessorTool::decideIfInHighPtBROI(const Tr
       return false;
     }
     if(inROIandPTok){
-
       bool inROI  = m_useHClusSeed && isHadCaloCompatible(*ptrTrack->trackParameters()->front());
       return inROI;
     }
-    
-      return false;
-  } 
     return false;
+  } 
+  return false;
 }
 
 //============================================================================================================
-bool Trk::DenseEnvironmentsAmbiguityProcessorTool::isHadCaloCompatible(const Trk::TrackParameters& Tp) const
-{
+bool 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::isHadCaloCompatible(const Trk::TrackParameters& Tp) const{
   const double pi = M_PI;
   const double pi2 = 2.*M_PI;
-    if(m_hadF.empty()) return false;
+  if(m_hadF.empty()) return false;
   auto f = m_hadF.begin();
   auto fe = m_hadF.end();
   auto e = m_hadE.begin();
   auto r = m_hadR.begin();
   auto z = m_hadZ.begin();
-  
   double F = Tp.momentum().phi();
   double E = Tp.eta();
-  
   for(; f!=fe; ++f) {
     double df = std::abs(F-(*f));
     if(df > pi        ) df = std::abs(pi2-df);
@@ -701,8 +662,8 @@ bool Trk::DenseEnvironmentsAmbiguityProcessorTool::isHadCaloCompatible(const Trk
 }
 
 //============================================================================================================
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::reloadHadROIs() const
-{
+void 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::reloadHadROIs() const{
   // turn into conditions algorithm
   if(m_useHClusSeed) {
     m_hadF.clear();
@@ -721,8 +682,8 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::reloadHadROIs() const
 }
    
 //============================================================================================================
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::removeInnerHits(std::vector<const Trk::MeasurementBase*>& measurements) const
-{
+void 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::removeInnerHits(std::vector<const Trk::MeasurementBase*>& measurements) const{
   int count = 0; 
   for (size_t i=0; i < measurements.size(); ++i){
     const Trk::RIO_OnTrack* rio = dynamic_cast <const Trk::RIO_OnTrack*>(measurements.at(i));
@@ -736,19 +697,16 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::removeInnerHits(std::vector<c
           measurements.erase(measurements.begin()+i);
           break;
         }
-        
-          break;
-        
-      }
-      
         break;
+      }
+      break;
     }
   }
 }
 
 //============================================================================================================
-Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTracksFromB(const Trk::Track* track, double fitQualityOriginal) const
-{
+Trk::Track* 
+Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTracksFromB(const Trk::Track* track, double fitQualityOriginal) const{
   const Trk::TrackParameters* par = track->perigeeParameters();
   if (par==nullptr) {
     par = track->trackParameters()->front();
@@ -756,10 +714,8 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTracksFromB(const
       ATH_MSG_DEBUG ("Track ("<<track<<") has no Track Parameters ! No refit !");
       return nullptr;
     }
-  }
-  
-  //std::vector<const Trk::MeasurementBase*>* measurementSet = new std::vector<const Trk::MeasurementBase*>;
-  std::vector<const Trk::MeasurementBase*> measurementSet;
+  }  
+  std::vector<const Trk::MeasurementBase*> measurementSet{};
   //store all silicon measurements into the measurementset
   DataVector<const Trk::TrackStateOnSurface>::const_iterator trackStateOnSurface = track->trackStateOnSurfaces()->begin();
   for ( ; trackStateOnSurface != track->trackStateOnSurfaces()->end(); ++trackStateOnSurface ) {
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h
index ebe80437b0587eb8f44747e8a958cd9a6961486b..178af39e0e4d5fca62a75a4bd2fd3643870dae13 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h
@@ -69,227 +69,229 @@ namespace Trk {
       kNgoodFits,
       kNfailedFits,
       kNCounter
-   };
-   using TrackStat = AmbiCounter<EStatType>;
-   // default methods
-   DenseEnvironmentsAmbiguityProcessorTool(const std::string&,const std::string&,const IInterface*);
-   virtual ~DenseEnvironmentsAmbiguityProcessorTool ();
-   virtual StatusCode initialize() override;
-   virtual StatusCode finalize  () override;
-   void dumpStat(MsgStream &out) const;
-
-
-      /**Returns a processed TrackCollection from the passed 'tracks'
-     @param tracks collection of tracks which will have ambiguities resolved. Will not be 
-     modified.
-     The tracks will be refitted if no fitQuality is given at input.
-     @return new collections of tracks, with ambiguities resolved. Ownership is passed on 
-     (i.e. client handles deletion)*/
-      virtual TrackCollection*  process(const TracksScores *trackScoreTrackMap) const override;
-
-      virtual TrackCollection*  process(const TrackCollection*,Trk::PRDtoTrackMap *) const override {return nullptr;};
-
-      /** statistics output to be called by algorithm during finalize. */
-      virtual void statistics() override;
-    private:
-
-      //transfer ownership
-      void addTrack(Track* track, const bool fitted,
-                    std::multimap<float, TrackPtr > &scoreTrackFitflagMap,
-                    const Trk::PRDtoTrackMap &prd_to_track_map,
-                    std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks,
-                    TrackStat &stat) const;
-
-      void solveTracks(const TracksScores& trackScoreTrackMap,
-                       Trk::PRDtoTrackMap &prd_to_track_map,
-                       TrackCollection &finalTracks,
-                       std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks,
-                       TrackStat &stat) const;
-
-      /** refit track */
-      Track* refitTrack( const Trk::Track* track, Trk::PRDtoTrackMap &prd_to_track_map,
-     TrackStat &stat) const;
-
-      /** refit PRDs */
-      Track* refitPrds( const Track* track, Trk::PRDtoTrackMap &prd_to_track_map,
+    };
+  using TrackStat = AmbiCounter<EStatType>;
+  // default methods
+  DenseEnvironmentsAmbiguityProcessorTool(const std::string&,const std::string&,const IInterface*);
+  virtual ~DenseEnvironmentsAmbiguityProcessorTool ();
+  virtual StatusCode initialize() override;
+  virtual StatusCode finalize  () override;
+  void dumpStat(MsgStream &out) const;
+
+
+  /**Returns a processed TrackCollection from the passed 'tracks'
+  @param tracks collection of tracks which will have ambiguities resolved. Will not be 
+  modified.
+  The tracks will be refitted if no fitQuality is given at input.
+  @return new collections of tracks, with ambiguities resolved. Ownership is passed on 
+  (i.e. client handles deletion)*/
+  virtual TrackCollection*  process(const TracksScores *trackScoreTrackMap) const override;
+
+  virtual TrackCollection*  process(const TrackCollection*,Trk::PRDtoTrackMap *) const override {return nullptr;};
+
+  /** statistics output to be called by algorithm during finalize. */
+  virtual void statistics() override;
+  
+  private:
+    //transfer ownership
+    void addTrack(Track* track, const bool fitted,
+                  std::multimap<float, TrackPtr > &scoreTrackFitflagMap,
+                  const Trk::PRDtoTrackMap &prd_to_track_map,
+                  std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks,
+                  TrackStat &stat) const;
+
+    void solveTracks(const TracksScores& trackScoreTrackMap,
+                     Trk::PRDtoTrackMap &prd_to_track_map,
+                     TrackCollection &finalTracks,
+                     std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks,
+                     TrackStat &stat) const;
+
+    /** refit track */
+    Track* refitTrack( const Trk::Track* track, Trk::PRDtoTrackMap &prd_to_track_map,
     TrackStat &stat) const;
 
-      /** refit ROTs corresponding to PRDs*/
-      //TODO or Q: new created track, why const
-      Track* refitRots( const Track* track, TrackStat &stat) const;
-
-      /** stores the minimal dist(trk,trk) for covariance correction*/
-      void storeTrkDistanceMapdR(TrackCollection& tracks,
-                                 std::vector<Trk::Track*> &refit_tracks_out );
-      
-      /** refit Tracks that are in the region of interest and removes inner hits that are wrongly assigned*/
-      void removeInnerHits(std::vector<const Trk::MeasurementBase*>& measurements) const;
-      Trk::Track* refitTracksFromB(const Trk::Track* track,double fitQualityOriginal) const;
-     
-      /** see if we are in the region of interest for B tracks*/
-      bool decideIfInHighPtBROI(const Trk::Track*) const;
-
-      /** Check if the cluster is compatible with a hadronic cluster*/
-      bool isHadCaloCompatible(const Trk::TrackParameters& Tp) const;
-
-      /** Load the clusters to see if they are compatibles with ROI*/
-      void reloadHadROIs() const;
-           
- 
-      Trk::Track *fit(std::vector<const Trk::PrepRawData*> &raw,
-      			const TrackParameters &param, bool flag, Trk::ParticleHypothesis hypo) const;
-      Trk::Track *fit(std::vector<const Trk::MeasurementBase*> &measurements,
-      			const TrackParameters &param, bool flag, Trk::ParticleHypothesis hypo) const;
-      template<typename... Args>
-      Trk::Track *fit(const Track &track, Args... args) const;
-      bool checkTrack(const Trk::Track *) const;
+    /** refit PRDs */
+    Track* refitPrds( const Track* track, Trk::PRDtoTrackMap &prd_to_track_map,
+    TrackStat &stat) const;
+
+    /** refit ROTs corresponding to PRDs*/
+    //TODO or Q: new created track, why const
+    Track* refitRots( const Track* track, TrackStat &stat) const;
+
+    /** stores the minimal dist(trk,trk) for covariance correction*/
+    void storeTrkDistanceMapdR(TrackCollection& tracks, std::vector<Trk::Track*> &refit_tracks_out );
     
-      // private data members
-
-      /** brem recovery mode with brem fit ? */
-      bool  m_tryBremFit;
-      bool  m_caloSeededBrem;
-      float m_pTminBrem;
-
-      /** by default refit tracks from PRD */
-      bool m_refitPrds;
-      
-      /** rescale pixel PRD covariances */
-      bool m_applydRcorrection;
-
-      /** suppress Hole Search */ 
-      bool m_suppressHoleSearch;
-
-      /** suppress Track Fit */ 
-      bool m_suppressTrackFit;
-
-      /** by default tracks at input get refitted */
-      bool m_forceRefit;
-
-      /** variables to decide if we are in a ROI */
-      bool m_useHClusSeed;
-      float m_minPtBjetROI;
-      float m_phiWidth;
-      float m_etaWidth;
-      SG::ReadHandleKey<CaloClusterROI_Collection> m_inputHadClusterContainerName;
-
-      mutable std::vector<double>   m_hadF;
-      mutable std::vector<double>   m_hadE;
-      mutable std::vector<double>   m_hadR;
-      mutable std::vector<double>   m_hadZ;
-
-      /** control material effects (0=non-interacting, 1=pion, 2=electron, 3=muon, 4=pion) read in as an integer 
-      read in as an integer and convert to particle hypothesis */
-      int m_matEffects;
-      Trk::ParticleHypothesis m_particleHypothesis;   
-      
-      /**Scoring tool
-         This tool is used to 'score' the tracks, i.e. to quantify what a good track is.
-         @todo The actual tool that is used should be configured through job options*/
-      ToolHandle<ITrackScoringTool> m_scoringTool;
-      
-      /** refitting tool - used to refit tracks once shared hits are removed. 
-          Refitting tool used is configured via jobOptions.*/
-      ToolHandleArray<ITrackFitter> m_fitterTool;
-      /** extrapolator tool - used to refit tracks once shared hits are removed. 
-          Extrapolator tool used is configured via jobOptions.*/
-      ToolHandle<IExtrapolator> m_extrapolatorTool;
-
-      ToolHandle<Trk::IPRDtoTrackMapTool>         m_assoTool
-         {this, "AssociationTool", "InDet::InDetPRDtoTrackMapToolGangedPixels" };
-
-      ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool
-        {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};
-
-      /** key for the PRDtoTrackMap to filled by the ambiguity score processor.**/
-      SG::ReadHandleKey<Trk::PRDtoTrackMap>  m_assoMapName
-         {this,"AssociationMapName",""};  ///< the key given to the newly created association map
-
-      /** selection tool - here the decision which hits remain on a track and
-          which are removed are made */
-      ToolHandle<IAmbiTrackSelectionTool> m_selectionTool;
-
-      
-      /**These allow us to retrieve the helpers*/
-      const PixelID* m_pixelId;
-      const AtlasDetectorID* m_idHelper;
-      std::vector<float>     m_etaBounds;           //!< eta intervals for internal monitoring
-
-      SG::WriteHandleKey<InDet::DRMap>                    m_dRMap;      //!< the actual dR map         
-
-      mutable std::mutex m_statMutex;
-      mutable TrackStat  m_stat ATLAS_THREAD_SAFE;
-
-      bool m_rejectInvalidTracks;
-  };
-      inline
-      Trk::Track *DenseEnvironmentsAmbiguityProcessorTool::fit(std::vector<const Trk::PrepRawData*> &raw,
-                                                               const TrackParameters &param, bool flag,
-                                                               Trk::ParticleHypothesis hypo) const {
-         Trk::Track *new_track=nullptr;
-         for ( const ToolHandle<ITrackFitter> &a_fitter : m_fitterTool) {
-              delete new_track;
-              new_track=nullptr;
-              new_track =  a_fitter->fit(raw, param, flag,hypo);
-              if (Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack(new_track)) {
-                          return new_track;
-              }
-              ATH_MSG_WARNING( "The track fitter, " <<  a_fitter->name() << ", produced a track with an invalid covariance matrix." );
-         }
-         ATH_MSG_WARNING( "None of the " <<  m_fitterTool.size() << " track fitter(s) produced a track with a valid covariance matrix." );
-         if (m_rejectInvalidTracks) {
-             delete new_track;
-             new_track=nullptr;
-         }
-         return new_track;
-      }
+    /** refit Tracks that are in the region of interest and removes inner hits that are wrongly assigned*/
+    void removeInnerHits(std::vector<const Trk::MeasurementBase*>& measurements) const;
+    
+    Trk::Track* refitTracksFromB(const Trk::Track* track,double fitQualityOriginal) const;
+   
+    /** see if we are in the region of interest for B tracks*/
+    bool decideIfInHighPtBROI(const Trk::Track*) const;
+
+    /** Check if the cluster is compatible with a hadronic cluster*/
+    bool isHadCaloCompatible(const Trk::TrackParameters& Tp) const;
+
+    /** Load the clusters to see if they are compatibles with ROI*/
+    void reloadHadROIs() const;
+         
+
+    Trk::Track *fit(const std::vector<const Trk::PrepRawData*> &raw,
+          const TrackParameters &param, bool flag, Trk::ParticleHypothesis hypo) const;
+          
+    Trk::Track *fit(const std::vector<const Trk::MeasurementBase*> &measurements,
+          const TrackParameters &param, bool flag, Trk::ParticleHypothesis hypo) const;
+          
+    template<typename... Args>
+    Trk::Track *fit(const Track &track, Args... args) const;
+    
+    bool checkTrack(const Trk::Track *) const;
+  
+    // private data members
 
-      inline
-      Trk::Track *DenseEnvironmentsAmbiguityProcessorTool::fit(std::vector<const Trk::MeasurementBase*> &measurements,
-                                                               const TrackParameters &param,
-                                                               bool flag,
-                                                               Trk::ParticleHypothesis hypo) const
-      {
-        Trk::Track *new_track=nullptr;
-        for ( const ToolHandle<ITrackFitter> &a_fitter : m_fitterTool) {
-           delete new_track;
-           new_track=nullptr;
-           new_track =  a_fitter->fit(measurements, param, flag, hypo);
-           if (Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack(new_track)) {
-              return new_track;
-           }
-           ATH_MSG_WARNING( "The track fitter, " <<  a_fitter->name() << ", produced a track with an invalid covariance matrix." );
-        }
-        ATH_MSG_WARNING( "None of the " <<  m_fitterTool.size() << " track fitter(s) produced a track with a valid covariance matrix." );
-        if (m_rejectInvalidTracks) {
-          delete new_track;
-          new_track=nullptr;
-        }
-        return new_track;
-      }
+    /** brem recovery mode with brem fit ? */
+    bool  m_tryBremFit;
+    bool  m_caloSeededBrem;
+    float m_pTminBrem;
 
-      template<typename... Args>
-      inline
-      Trk::Track *DenseEnvironmentsAmbiguityProcessorTool::fit(const Track &track, Args... args) const
-      {
-         Trk::Track *new_track=nullptr;
-         for ( const ToolHandle<ITrackFitter> &a_fitter : m_fitterTool) {
-            delete new_track;
-            new_track=nullptr;
-            new_track =  a_fitter->fit(track,args...);
-            if (Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack(new_track)) {
-               return new_track;
-            }
-            ATH_MSG_WARNING( "The track fitter, " <<  a_fitter->name() << ", produced a track with an invalid covariance matrix." );
-            //TODO: potential memory leakage 
-         }
-        ATH_MSG_WARNING( "None of the " <<  m_fitterTool.size() << " track fitter(s) produced a track with a valid covariance matrix." );
-        if (m_rejectInvalidTracks) {
-          delete new_track;
-          new_track=nullptr;
-        }
-        return new_track;
+    /** by default refit tracks from PRD */
+    bool m_refitPrds;
+    
+    /** rescale pixel PRD covariances */
+    bool m_applydRcorrection;
+
+    /** suppress Hole Search */ 
+    bool m_suppressHoleSearch;
+
+    /** suppress Track Fit */ 
+    bool m_suppressTrackFit;
+
+    /** by default tracks at input get refitted */
+    bool m_forceRefit;
+
+    /** variables to decide if we are in a ROI */
+    bool m_useHClusSeed;
+    float m_minPtBjetROI;
+    float m_phiWidth;
+    float m_etaWidth;
+    SG::ReadHandleKey<CaloClusterROI_Collection> m_inputHadClusterContainerName;
+
+    mutable std::vector<double>   m_hadF;
+    mutable std::vector<double>   m_hadE;
+    mutable std::vector<double>   m_hadR;
+    mutable std::vector<double>   m_hadZ;
+
+    /** control material effects (0=non-interacting, 1=pion, 2=electron, 3=muon, 4=pion) read in as an integer 
+    read in as an integer and convert to particle hypothesis */
+    int m_matEffects;
+    Trk::ParticleHypothesis m_particleHypothesis;   
+    
+    /**Scoring tool
+       This tool is used to 'score' the tracks, i.e. to quantify what a good track is.
+       @todo The actual tool that is used should be configured through job options*/
+    ToolHandle<ITrackScoringTool> m_scoringTool;
+    
+    /** refitting tool - used to refit tracks once shared hits are removed. 
+        Refitting tool used is configured via jobOptions.*/
+    ToolHandleArray<ITrackFitter> m_fitterTool;
+    /** extrapolator tool - used to refit tracks once shared hits are removed. 
+        Extrapolator tool used is configured via jobOptions.*/
+    ToolHandle<IExtrapolator> m_extrapolatorTool;
+
+    ToolHandle<Trk::IPRDtoTrackMapTool>         m_assoTool
+       {this, "AssociationTool", "InDet::InDetPRDtoTrackMapToolGangedPixels" };
+
+    ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool
+      {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};
+
+    /** key for the PRDtoTrackMap to filled by the ambiguity score processor.**/
+    SG::ReadHandleKey<Trk::PRDtoTrackMap>  m_assoMapName
+       {this,"AssociationMapName",""};  ///< the key given to the newly created association map
+
+    /** selection tool - here the decision which hits remain on a track and
+        which are removed are made */
+    ToolHandle<IAmbiTrackSelectionTool> m_selectionTool;
+
+    /**These allow us to retrieve the helpers*/
+    const PixelID* m_pixelId;
+    const AtlasDetectorID* m_idHelper;
+    std::vector<float>     m_etaBounds;           //!< eta intervals for internal monitoring
+
+    SG::WriteHandleKey<InDet::DRMap>                    m_dRMap;      //!< the actual dR map         
+
+    mutable std::mutex m_statMutex;
+    mutable TrackStat  m_stat ATLAS_THREAD_SAFE;
+
+    bool m_rejectInvalidTracks;
+  };
+  
+  inline Trk::Track *
+  DenseEnvironmentsAmbiguityProcessorTool::fit(const std::vector<const Trk::PrepRawData*> &raw,
+                                                           const TrackParameters &param, bool flag,
+                                                           Trk::ParticleHypothesis hypo) const {
+     Trk::Track *newTrack=nullptr;
+     for ( const ToolHandle<ITrackFitter> &thisFitter : m_fitterTool) {
+          delete newTrack;
+          newTrack=nullptr;
+          newTrack =  thisFitter->fit(raw, param, flag,hypo);
+          if (Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack(newTrack)) {
+                      return newTrack;
+          }
+          ATH_MSG_WARNING( "The track fitter, " <<  thisFitter->name() << ", produced a track with an invalid covariance matrix." );
+     }
+     ATH_MSG_WARNING( "None of the " <<  m_fitterTool.size() << " track fitter(s) produced a track with a valid covariance matrix." );
+     if (m_rejectInvalidTracks) {
+         delete newTrack;
+         newTrack=nullptr;
+     }
+     return newTrack;
+  }
+
+  inline Trk::Track *
+  DenseEnvironmentsAmbiguityProcessorTool::fit(const std::vector<const Trk::MeasurementBase*> &measurements,
+                                                           const TrackParameters &param,
+                                                           bool flag,
+                                                           Trk::ParticleHypothesis hypo) const{
+    Trk::Track *newTrack=nullptr;
+    for ( const ToolHandle<ITrackFitter> &thisFitter : m_fitterTool) {
+      delete newTrack;
+      newTrack = nullptr;
+      newTrack = thisFitter->fit(measurements, param, flag, hypo);
+      if (Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack(newTrack)) {
+        return newTrack;
+      }
+      ATH_MSG_WARNING( "The track fitter, " <<  thisFitter->name() << ", produced a track with an invalid covariance matrix." );
+    }
+    ATH_MSG_WARNING( "None of the " <<  m_fitterTool.size() << " track fitter(s) produced a track with a valid covariance matrix." );
+    if (m_rejectInvalidTracks) {
+      delete newTrack;
+      newTrack = nullptr;
+    }
+    return newTrack;
+  }
+
+  template<typename... Args>
+  inline Trk::Track *
+  DenseEnvironmentsAmbiguityProcessorTool::fit(const Track &track, Args... args) const{
+    Trk::Track *newTrack=nullptr;
+    for ( const ToolHandle<ITrackFitter> &thisFitter : m_fitterTool) {
+      delete newTrack;
+      newTrack=nullptr;
+      newTrack =  thisFitter->fit(track,args...);
+      if (Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack(newTrack)) {
+         return newTrack;
       }
+      ATH_MSG_WARNING( "The track fitter, " <<  thisFitter->name() << ", produced a track with an invalid covariance matrix." );
+      //TODO: potential memory leakage 
+    }
+    ATH_MSG_WARNING( "None of the " <<  m_fitterTool.size() << " track fitter(s) produced a track with a valid covariance matrix." );
+    if (m_rejectInvalidTracks) {
+      delete newTrack;
+      newTrack=nullptr;
+    }
+    return newTrack;
+  }
+  
 } //end ns
 
 
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx
index 1ba7763fe8347fb873f85be696432539c0546688..d05f9fcc88a03da2cea7f10a268634c55482d68c 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx
@@ -46,13 +46,12 @@ Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::DenseEnvironmentsAmbiguitySco
 }
 //==================================================================================================
 
-Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::~DenseEnvironmentsAmbiguityScoreProcessorTool()
-{
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::~DenseEnvironmentsAmbiguityScoreProcessorTool(){
 }
 //==================================================================================================
 
-StatusCode Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::initialize()
-{
+StatusCode 
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::initialize(){
   StatusCode sc = StatusCode::SUCCESS;
   ATH_CHECK( m_scoringTool.retrieve());
   ATH_CHECK( m_assoTool.retrieve()) ;
@@ -76,12 +75,13 @@ StatusCode Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::initialize()
 }
 //==================================================================================================
 
-StatusCode Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::finalize()
-{
+StatusCode 
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::finalize(){
   return StatusCode::SUCCESS;
 }
 
-void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::statistics() {
+void 
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::statistics() {
    if (msgLvl(MSG::INFO)) {
       MsgStream &out=msg(MSG::INFO);
       out << " -- statistics " << "\n";
@@ -97,9 +97,9 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::statistics() {
 /** Do actual processing of event. Takes a track container, 
     and then returns the tracks which have been selected*/
 
-void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::process(std::vector<const Track*>* tracks,
-                                                                Trk::TracksScores* trackScoreTrackMap) const
-{
+void 
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::process(std::vector<const Track*>* tracks,
+                                                    Trk::TracksScores* trackScoreTrackMap) const{
   InDet::PixelGangedClusterAmbiguities *splitClusterMap = nullptr;
   if(!m_splitClusterMapKey.key().empty()){
     if(!m_splitClusterMapKey_last.key().empty()){
@@ -113,22 +113,19 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::process(std::vector<cons
       splitClusterMap =  new InDet::PixelGangedClusterAmbiguities();
     }
   }
-
   addNewTracks(tracks, trackScoreTrackMap);
-  std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map( m_assoToolNotGanged.isEnabled()
+  std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap( m_assoToolNotGanged.isEnabled()
                                                         ? m_assoToolNotGanged->createPRDtoTrackMap()
                                                         : m_assoTool->createPRDtoTrackMap() );
-  overlappingTracks(trackScoreTrackMap, splitClusterMap, *prd_to_track_map);
+  overlappingTracks(trackScoreTrackMap, splitClusterMap, *prdToTrackMap);
   if (!m_assoMapName.key().empty()) {
      if (SG::WriteHandle<Trk::PRDtoTrackMap>(m_assoMapName).record(
                 (m_assoToolNotGanged.isEnabled()
-                 ? m_assoToolNotGanged->reduceToStorableMap(std::move(prd_to_track_map))
-                 : m_assoTool->reduceToStorableMap(std::move(prd_to_track_map)) )).isFailure()) {
+                 ? m_assoToolNotGanged->reduceToStorableMap(std::move(prdToTrackMap))
+                 : m_assoTool->reduceToStorableMap(std::move(prdToTrackMap)) )).isFailure()) {
         ATH_MSG_FATAL("Failed to add PRD to track association map " << m_assoMapName.key() << ".");
      }
   }
-
-
   if(!m_splitClusterMapKey.key().empty()){
     SG::WriteHandle<InDet::PixelGangedClusterAmbiguities> splitClusterMapHandle(m_splitClusterMapKey);
     splitClusterMapHandle = std::unique_ptr<InDet::PixelGangedClusterAmbiguities>(splitClusterMap);
@@ -136,33 +133,30 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::process(std::vector<cons
       ATH_MSG_ERROR("Could not record splitClusterMap.");
     }
   }
-
-  }
+}
 
 
 //==================================================================================================
-void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks(std::vector<const Track*>* tracks,
-                                                                     Trk::TracksScores* trackScoreTrackMap) const
-{
+void 
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks(std::vector<const Track*>* tracks,
+                                                          Trk::TracksScores* trackScoreTrackMap) const{
   TrackStat3 stat(m_etaBounds);
   stat.newEvent();
-  std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map( m_assoTool->createPRDtoTrackMap() );
+  std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap( m_assoTool->createPRDtoTrackMap() );
   PrdSignatureSet prdSigSet;  
   ATH_MSG_DEBUG ("Number of tracks at Input: "<<tracks->size());
- 
   for(const Track* a_track : *tracks) {
     ATH_MSG_DEBUG ("Processing track candidate "<<a_track);
     stat.incrementCounterByRegion(EStatType::kNcandidates,a_track); // @TODO should go to the score processor
-    
     // only fitted tracks get hole search, input is not fitted
     float score = m_scoringTool->score( *a_track, true);
     ATH_MSG_DEBUG ("Track Score is "<< score);
     // veto tracks with score 0
-    bool reject = score==0;      
+    bool reject = (score==0);      
     if (reject){
       stat.incrementCounterByRegion(EStatType::kNcandScoreZero,a_track);
     } else {// double track rejection
-      const std::vector<const Trk::PrepRawData*> & prds = m_assoTool->getPrdsOnTrack(*prd_to_track_map, *a_track);
+      const std::vector<const Trk::PrepRawData*> & prds = m_assoTool->getPrdsOnTrack(*prdToTrackMap, *a_track);
       // convert to set
       //PrdSignature prdSig( prds.begin(),prds.end() );
       // we try to insert it into the set, if we fail (pair.second), it then exits already
@@ -174,27 +168,24 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks(std::vector
         ATH_MSG_DEBUG ("Insert new track in PrdSignatureSet");
       }
     }
-
     if (!reject) {
       // add track to map, map is sorted small to big ! set if fitted
       ATH_MSG_VERBOSE ("Track ("<< a_track <<" --> "<< *a_track << ") has score "<<score);
       trackScoreTrackMap->push_back( std::make_pair(a_track, -score));
     }
   }
-
   ATH_MSG_DEBUG ("Number of tracks in map:"<<trackScoreTrackMap->size());
   {
      std::lock_guard<std::mutex> lock(m_statMutex);
      m_stat += stat;
   }
-
-  }
+}
 
 //==================================================================================================
-void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformationForCluster(const std::pair<const InDet::PixelCluster* const,
-                                                                                                              const Trk::TrackParameters*> & clusterTrkPara,
-                                                                                              InDet::PixelGangedClusterAmbiguities *splitClusterMap) const
-{
+void 
+Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformationForCluster(const std::pair<const InDet::PixelCluster* const,
+                                                                                             const Trk::TrackParameters*> & clusterTrkPara,
+                                                                                              InDet::PixelGangedClusterAmbiguities *splitClusterMap) const{
 
   // Recalculate the split prob with the use of the track parameters
   InDet::PixelClusterSplitProb splitProb = m_splitProbTool->splitProbability( *clusterTrkPara.first, *clusterTrkPara.second );
@@ -213,7 +204,7 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformat
   if ( splitProb.splitProbability(2)  < 0 ){
     pixelCluster->packSplitInformation( false, 0.0, 0.0 );    
     pixelCluster->setTooBigToBeSplit( true );    
-  }else{  
+  } else {  
     pixelCluster->packSplitInformation( false, splitProb.splitProbability(2), splitProb.splitProbability(3) ) ;
     pixelCluster->setTooBigToBeSplit( false );    
   }
@@ -233,20 +224,16 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformat
 void 
 Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks(const TracksScores* scoredTracks,
                                                                           InDet::PixelGangedClusterAmbiguities *splitClusterMap,
-                                                                          Trk::PRDtoTrackMap &prd_to_track_map) const
-{
+                                                                          Trk::PRDtoTrackMap &prdToTrackMap) const{
   const Trk::IPRDtoTrackMapTool *the_asso_tool = (m_assoToolNotGanged.isEnabled() ? &(*m_assoToolNotGanged) : &(*m_assoTool));
   // Function currnetly does nothing useful expect for printout debug information
   ATH_MSG_DEBUG ("Starting to resolve overlapping tracks");
-
   // Map to add all pixel clusters on track to
   std::map< const InDet::PixelCluster*, const Trk::TrackParameters* > setOfPixelClustersOnTrack;
   std::map< const InDet::PixelCluster*, const Trk::Track* > setOfPixelClustersToTrackAssoc;
-
   // Fill pixel cluster into the above map
   // Fill all PRD infromation into the association tool
-  for( const std::pair<const Track*, float>& scoredTracksItem : *scoredTracks )
-  {
+  for( const std::pair<const Track*, float>& scoredTracksItem : *scoredTracks ){
     // clean it out to make sure not to many shared hits
     ATH_MSG_VERBOSE ("--- Adding next track "<<scoredTracksItem.first
                      << ":" << (scoredTracksItem.first->trackParameters() ? scoredTracksItem.first->trackParameters()->front()->pT() : -1.)
@@ -255,38 +242,31 @@ Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks(const Track
     
     //  This should only be done in region defined by Jets 
     //  ..... for now let do the whole detector coudl be slow
-    if(the_asso_tool->addPRDs( prd_to_track_map, *scoredTracksItem.first ).isSuccess()){
+    if(the_asso_tool->addPRDs( prdToTrackMap, *scoredTracksItem.first ).isSuccess()){
       ATH_MSG_VERBOSE("--- Added hits to the association tool");
     } else {
       ATH_MSG_VERBOSE("--- Failed to add hits to the association tool");
       continue;    
     }  
-  
     // get all prds on 'track'
     const DataVector<const TrackStateOnSurface>* tsosVec = scoredTracksItem.first->trackStateOnSurfaces();  
     if(!tsosVec){
       ATH_MSG_WARNING("TSOS vector does not exist");
       continue;   
     }
-
     ATH_MSG_VERBOSE("---> Looping over TSOS's to allow  for cluster updates: "<< tsosVec->size() );
-
     DataVector<const Trk::TrackStateOnSurface>::const_iterator tsos = tsosVec->begin();
     for (; tsos != tsosVec->end(); ++tsos) {
       const MeasurementBase* measurement = (*tsos)->measurementOnTrack();
-
       if(!measurement || ! (*tsos)->trackParameters()){
         ATH_MSG_VERBOSE("---- TSOS has either no measurement or parameters: "<< measurement << "  " << (*tsos)->trackParameters() );
         continue;
       }
-
       if (!measurement->type(Trk::MeasurementBaseType::RIO_OnTrack)) continue;
-
       const Trk::RIO_OnTrack* rio = static_cast<const Trk::RIO_OnTrack*>(measurement);
       if (rio->rioType(Trk::RIO_OnTrackType::PixelCluster)) {
          const InDet::PixelCluster* pixel = static_cast<const InDet::PixelCluster*> ( rio->prepRawData() );
          assert( pixel);
-
          //Update the pixel split information if the element is unique (The second element of the pair indiciates if the element was inserted into the map)
          auto ret =  setOfPixelClustersOnTrack.insert(std::make_pair( pixel, (*tsos)->trackParameters() ));
          if (ret.second && m_splitProbTool.isEnabled()) {
@@ -294,43 +274,38 @@ Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks(const Track
          }
          setOfPixelClustersToTrackAssoc.insert( std::make_pair( pixel, scoredTracksItem.first ) );
       }
-
     }
   }
-
   // now loop as long as map is not empty
-    std::vector< std::pair< const InDet::PixelCluster*, const Trk::Track* > > sorted;
-    sorted.reserve( setOfPixelClustersToTrackAssoc.size() );
-    for( const std::pair< const InDet::PixelCluster* const, const Trk::Track* > &pixelTrackItem : setOfPixelClustersToTrackAssoc ) {
-      sorted.push_back( pixelTrackItem );
-    }
-    std::sort( sorted.begin(), sorted.end(), [](const std::pair< const InDet::PixelCluster*, const Trk::Track* > &a,
-                                                const std::pair< const InDet::PixelCluster*, const Trk::Track* > &b) {
-                 return a.first->getHashAndIndex().collHash() < b.first->getHashAndIndex().collHash()
-                   || ( a.first->getHashAndIndex().collHash() == b.first->getHashAndIndex().collHash()
-                        &&  a.first->getHashAndIndex().objIndex() < b.first->getHashAndIndex().objIndex() );
-      });
-    //  for( auto pixelTrackItem : setOfPixelClustersToTrackAssoc )
-    for (const std::pair< const InDet::PixelCluster*, const Trk::Track* >  &pixelTrackItem :  sorted) {
+  std::vector< std::pair< const InDet::PixelCluster*, const Trk::Track* > > sorted;
+  sorted.reserve( setOfPixelClustersToTrackAssoc.size() );
+  for( const std::pair< const InDet::PixelCluster* const, const Trk::Track* > &pixelTrackItem : setOfPixelClustersToTrackAssoc ) {
+    sorted.push_back( pixelTrackItem );
+  }
+  std::sort( sorted.begin(), sorted.end(), [](const std::pair< const InDet::PixelCluster*, const Trk::Track* > &a,
+                                              const std::pair< const InDet::PixelCluster*, const Trk::Track* > &b) {
+               return a.first->getHashAndIndex().collHash() < b.first->getHashAndIndex().collHash()
+                 || ( a.first->getHashAndIndex().collHash() == b.first->getHashAndIndex().collHash()
+                      &&  a.first->getHashAndIndex().objIndex() < b.first->getHashAndIndex().objIndex() );
+  });
+  for (const std::pair< const InDet::PixelCluster*, const Trk::Track* >  &pixelTrackItem :  sorted) {
     ATH_MSG_VERBOSE ("---- Checking if track shares pixel hits if other tracks: " << pixelTrackItem.first << " with R " << pixelTrackItem.first->globalPosition().perp() );
-
     // find out how many tracks use this hit already
-    Trk::PRDtoTrackMap::ConstPrepRawDataTrackMapRange range = prd_to_track_map.onTracks( *pixelTrackItem.first );
+    Trk::PRDtoTrackMap::ConstPrepRawDataTrackMapRange range = prdToTrackMap.onTracks( *pixelTrackItem.first );
     int numberOfTracksWithThisPrd = std::distance(range.first,range.second);
     if (msgLvl(MSG::VERBOSE)) {
       TString tracks("---- number of tracks with this shared Prd: ");
       tracks += numberOfTracksWithThisPrd;
       for (Trk::IPRD_AssociationTool::ConstPRD_MapIt it =range.first; it != range.second;++it ){
-       tracks += "    ";
-       tracks += Form( " %p",(void*)(it->second));
-       double pt = (it->second->trackParameters() ? it->second->trackParameters()->front()->pT() : -1);
-       tracks += Form(":%.3f", pt);
-       tracks += Form(",%i",static_cast<int>(it->second->measurementsOnTrack()->size()));
+        tracks += "    ";
+        tracks += Form( " %p",(void*)(it->second));
+        double pt = (it->second->trackParameters() ? it->second->trackParameters()->front()->pT() : -1);
+        tracks += Form(":%.3f", pt);
+        tracks += Form(",%i",static_cast<int>(it->second->measurementsOnTrack()->size()));
       }
       ATH_MSG_VERBOSE (tracks);
     }
-    
-  }  
+  }
 }
 
 void
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
index caa5b510de24169a48b47c1488d5a65f7cedc798..969ce2d25a44a231b2ebb8c2471e12ce1e153edd 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
@@ -4,7 +4,6 @@
 
 #include "SimpleAmbiguityProcessorTool.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"
-#include "GaudiKernel/MsgStream.h"
 #include "TrackScoringTool.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
@@ -16,18 +15,15 @@
 
 //==================================================================================================
 Trk::SimpleAmbiguityProcessorTool::SimpleAmbiguityProcessorTool(const std::string& t, 
-								const std::string& n,
-								const IInterface*  p )
+                const std::string& n,
+                const IInterface*  p )
   :
   AthAlgTool(t,n,p),
   m_particleHypothesis{undefined},
   m_scoringTool("Trk::TrackScoringTool/TrackScoringTool"), 
   m_fitterTool ("Trk::KalmanFitter/InDetTrackFitter"), 
   m_selectionTool("InDet::InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool"),
-  m_etabounds( {0.8,
-                1.6,
-                2.5,
-                10.0} ),
+  m_etabounds( {0.8,1.6,2.5,10.0} ),
   m_stat(m_etabounds)
 {
   // statitics stuff
@@ -75,7 +71,7 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize(){
   // Print out memo that tracks have to be fitted
   if (!m_forceRefit) {
     ATH_MSG_INFO( "The forced refit of Tracks is switched off." );
-    ATH_MSG_INFO( "Ensure, that the tracks are fitted after the ambiguity processing!");
+    ATH_MSG_INFO( "Ensure that the tracks are fitted after the ambiguity processing!");
   }
   // Configuration of the material effects
   Trk::ParticleSwitcher particleSwitch;
@@ -84,7 +80,6 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize(){
   if (m_tryBremFit) {
      ATH_MSG_INFO( "Try brem fit and recovery for electron like tracks.");
   }
-
   // statistics
   if (m_etabounds.size() != Counter::nRegions) {
      ATH_MSG_ERROR( "There must be exactly " << Counter::nRegions
@@ -112,35 +107,29 @@ void Trk::SimpleAmbiguityProcessorTool::statistics(){
 
 
 //==================================================================================================
-
 /** Do actual processing of event. Takes a track container, 
     and then returns the tracks which have been selected*/
 
-
 TrackCollection*  
 Trk::SimpleAmbiguityProcessorTool::process(const TrackCollection* trackCol, Trk::PRDtoTrackMap *prdToTrackMap) const {
-  std::vector<const Track*> tracks;
-  tracks.reserve(trackCol->size());
-  for(const Track* e: *trackCol){
-    tracks.push_back(e);
-  }
-  return process_vector(tracks, prdToTrackMap);
+  return processVector(*trackCol, prdToTrackMap);
 }
 
 
-TrackCollection*  Trk::SimpleAmbiguityProcessorTool::process(const TracksScores* tracksScores) const {
-  std::vector<const Track*> tracks;
+TrackCollection*  
+Trk::SimpleAmbiguityProcessorTool::process(const TracksScores* tracksScores) const {
+  TrackCollection tracks(SG::VIEW_ELEMENTS);
   tracks.reserve(tracksScores->size());
   for(const std::pair<const Trk::Track *, float>& e: *tracksScores){
-    tracks.push_back(e.first);
+    auto atrack ATLAS_THREAD_SAFE = const_cast<Trk::Track *>(e.first);
+    tracks.push_back(atrack);
   }
-
-  TrackCollection* re_tracks = process_vector(tracks,nullptr /* no external PRD-to-track map*/);
+  TrackCollection* re_tracks = processVector(tracks,nullptr /* no external PRD-to-track map*/);
   return re_tracks;
 }
 
 TrackCollection*  
-Trk::SimpleAmbiguityProcessorTool::process_vector(std::vector<const Track*> &tracks, Trk::PRDtoTrackMap *prdToTrackMap) const{
+Trk::SimpleAmbiguityProcessorTool::processVector(const TrackCollection &tracks, Trk::PRDtoTrackMap *prdToTrackMap) const{
   TrackScoreMap trackScoreTrackMap;
   std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap_cleanup;
   if (!prdToTrackMap) {
@@ -160,7 +149,6 @@ Trk::SimpleAmbiguityProcessorTool::process_vector(std::vector<const Track*> &tra
   // - take track with highest score
   // - remove shared hits from all other tracks
   // - take next highest scoring tracks, and repeat
-
   ATH_MSG_DEBUG ("Solving Tracks");
   std::vector<std::unique_ptr<const Trk::Track> > cleanupTracks;
   TrackCollection* finalTracks = solveTracks(trackScoreTrackMap, *prdToTrackMap,cleanupTracks, stat);
@@ -173,7 +161,7 @@ Trk::SimpleAmbiguityProcessorTool::process_vector(std::vector<const Track*> &tra
 }
 
 //==================================================================================================
-void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const std::vector<const Track*> &tracks,
+void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const TrackCollection &tracks,
                                                      TrackScoreMap& trackScoreTrackMap,
                                                      Trk::PRDtoTrackMap &prdToTrackMap,
                                                      Counter &stat) const {
@@ -197,7 +185,7 @@ void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const std::vector<const Tra
       ATH_MSG_DEBUG ("Track Score is "<< score);
       // double track rejection
       if (m_dropDouble) {
-        std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prdToTrackMap, *pTrack);
+        const auto & prds = m_assoTool->getPrdsOnTrack(prdToTrackMap, *pTrack);
         // unfortunately PrepRawDataSet is not a set !
         PrdSignature prdSig;
         prdSig.insert( prds.begin(),prds.end() );
@@ -230,100 +218,69 @@ void Trk::SimpleAmbiguityProcessorTool::addTrack(Trk::Track* in_track,
                                                  TrackScoreMap &trackScoreTrackMap,
                                                  Trk::PRDtoTrackMap &prdToTrackMap,
                                                  std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks,
-                                                 Counter &stat) const
-{
+                                                 Counter &stat) const {
   std::unique_ptr<Trk::Track> atrack(in_track);
   // compute score
   TrackScore score;
   bool suppressHoleSearch = fitted ? m_suppressHoleSearch : true;
   if (m_trackSummaryTool.isEnabled()) {
-     m_trackSummaryTool->computeAndReplaceTrackSummary(*atrack,
-                                                       &prdToTrackMap,
-                                                       suppressHoleSearch);
+     m_trackSummaryTool->computeAndReplaceTrackSummary(*atrack,&prdToTrackMap,suppressHoleSearch);
   }
-
   score = m_scoringTool->score( *atrack, suppressHoleSearch );
-
   // do we accept the track ?
-  if (score!=0)
-    {
-      ATH_MSG_DEBUG ("Track  ("<< atrack.get() <<") has score "<<score);
-      // statistic
-      stat.incrementCounterByRegion(ECounter::kNscoreOk,atrack.get());
-
-      // add track to map, map is sorted small to big !
-      trackScoreTrackMap.insert( std::make_pair(-score, TrackPtr(atrack.release(), fitted)) );
-
-      return;
-    }
-
+  if (score!=0){
+    ATH_MSG_DEBUG ("Track  ("<< atrack.get() <<") has score "<<score);
+    // statistic
+    stat.incrementCounterByRegion(ECounter::kNscoreOk,atrack.get());
+    // add track to map, map is sorted small to big !
+    trackScoreTrackMap.insert( std::make_pair(-score, TrackPtr(atrack.release(), fitted)) );
+    return;
+  }
   // do we try to recover the track ?
   if (score==0 && fitted && m_tryBremFit &&
-      !atrack->info().trackProperties(Trk::TrackInfo::BremFit) &&
-      atrack->trackParameters()->front()->pT() > m_pTminBrem &&
-      (!m_caloSeededBrem || atrack->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI)))
-    {
-
-      ATH_MSG_DEBUG ("Track score is zero, try to recover it via brem fit");
-
-      // run track fit using electron hypothesis
-      std::unique_ptr<Trk::Track> bremTrack( m_fitterTool->fit(*atrack,true,Trk::electron) );
-
-      if (!bremTrack)
-	{
-	  ATH_MSG_DEBUG ("Brem refit failed, drop track");
-	  // statistic
-	  stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefitFailed,atrack.get());
-	  stat.incrementCounterByRegion(ECounter::kNfailedFits,atrack.get());
-
-	  // clean up
-    cleanupTracks.push_back(std::move(atrack));
-
-	}
-      else
-	{
-
-	  // statistic
-          stat.incrementCounterByRegion(ECounter::kNgoodFits,bremTrack.get());
-
-	  // rerun score
-          if (m_trackSummaryTool.isEnabled()) {
-             m_trackSummaryTool->computeAndReplaceTrackSummary(*bremTrack,
-                                                               &prdToTrackMap,
-                                                               suppressHoleSearch);
-          }
-	  score = m_scoringTool->score( *bremTrack, suppressHoleSearch );
-
-	  // do we accept the track ?
-	  if (score!=0)
-	    {
-              ATH_MSG_DEBUG ("Brem refit successful, recovered track  ("<< atrack.get() <<") has score "<<score);
-	      // statistics
-	      stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefit,bremTrack.get());
-
-	      // add track to map, map is sorted small to big !
-	      trackScoreTrackMap.insert( std::make_pair(-score, TrackPtr(bremTrack.release(), fitted)) );
-	      return;
-	    }
-	  else
-	    {
-	      ATH_MSG_DEBUG ("Brem refit gave still track score zero, reject it");
-	      // statistic
-	      stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefitScoreZero,bremTrack.get());
-
-	    }
-          cleanupTracks.push_back(std::move(atrack));
-	}
-    }
-  else
-    {
-      ATH_MSG_DEBUG ("Track score is zero, reject it");
+    !atrack->info().trackProperties(Trk::TrackInfo::BremFit) &&
+    atrack->trackParameters()->front()->pT() > m_pTminBrem &&
+    (!m_caloSeededBrem || atrack->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))){
+    ATH_MSG_DEBUG ("Track score is zero, try to recover it via brem fit");
+    // run track fit using electron hypothesis
+    std::unique_ptr<Trk::Track> bremTrack( m_fitterTool->fit(*atrack,true,Trk::electron) );
+    if (!bremTrack){
+      ATH_MSG_DEBUG ("Brem refit failed, drop track");
       // statistic
-      stat.incrementCounterByRegion(ECounter::kNscoreZero,atrack.get());
-
+      stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefitFailed,atrack.get());
+      stat.incrementCounterByRegion(ECounter::kNfailedFits,atrack.get());
+      // clean up
+      cleanupTracks.push_back(std::move(atrack));
+    } else {
+      // statistic
+      stat.incrementCounterByRegion(ECounter::kNgoodFits,bremTrack.get());
+      // rerun score
+      if (m_trackSummaryTool.isEnabled()) {
+        m_trackSummaryTool->computeAndReplaceTrackSummary(*bremTrack, &prdToTrackMap,suppressHoleSearch);
+      }
+      score = m_scoringTool->score( *bremTrack, suppressHoleSearch );
+      // do we accept the track ?
+      if (score!=0){
+        ATH_MSG_DEBUG ("Brem refit successful, recovered track  ("<< atrack.get() <<") has score "<<score);
+        // statistics
+        stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefit,bremTrack.get());
+        // add track to map, map is sorted small to big !
+        trackScoreTrackMap.insert( std::make_pair(-score, TrackPtr(bremTrack.release(), fitted)) );
+        return;
+      } else {
+        ATH_MSG_DEBUG ("Brem refit gave still track score zero, reject it");
+        // statistic
+        stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefitScoreZero,bremTrack.get());
+      }
       cleanupTracks.push_back(std::move(atrack));
     }
+  } else {
+    ATH_MSG_DEBUG ("Track score is zero, reject it");
+    // statistic
+    stat.incrementCounterByRegion(ECounter::kNscoreZero,atrack.get());
+    cleanupTracks.push_back(std::move(atrack));
   }
+}
 //==================================================================================================
 
 TrackCollection *Trk::SimpleAmbiguityProcessorTool::solveTracks(TrackScoreMap& trackScoreTrackMap,
@@ -363,20 +320,20 @@ TrackCollection *Trk::SimpleAmbiguityProcessorTool::solveTracks(TrackScoreMap& t
       if (atrack.newTrack()) {
         cleanupTracks.push_back( std::unique_ptr<Trk::Track>(atrack.release()) );
       }
-	  // delete original copy
-	  } else if ( cleanedTrack ) {
-	    // now delete original track
+    // delete original copy
+    } else if ( cleanedTrack ) {
+      // now delete original track
       if (atrack.newTrack()) {
         cleanupTracks.push_back( std::unique_ptr<Trk::Track>(atrack.release()));
       }
-	    // don't forget to drop track from map
+      // don't forget to drop track from map
       // stripped down version should be reconsidered
       ATH_MSG_DEBUG ("Candidate excluded, add subtrack to map. Track "<<cleanedTrack.get());
       // statistic
       stat.incrementCounterByRegion(ECounter::kNsubTrack,cleanedTrack.get());
       // track needs fitting !
       addTrack( cleanedTrack.release(), false, trackScoreTrackMap, prdToTrackMap, cleanupTracks, stat);
-	  } else {
+    } else {
       // track should be discarded
       ATH_MSG_DEBUG ("Track "<< atrack.track() << " is excluded, no subtrack, reject");
       // statistic
@@ -384,8 +341,8 @@ TrackCollection *Trk::SimpleAmbiguityProcessorTool::solveTracks(TrackScoreMap& t
       if (atrack.newTrack()) {
         cleanupTracks.push_back(  std::unique_ptr<Trk::Track>(atrack.release()) );
       }
-	  // don't forget to drop track from map
-	  }
+    // don't forget to drop track from map
+    }
   }
   ATH_MSG_DEBUG ("Finished, number of track on output: "<<finalTracks->size());
   return finalTracks.release();
@@ -393,7 +350,8 @@ TrackCollection *Trk::SimpleAmbiguityProcessorTool::solveTracks(TrackScoreMap& t
 
 //==================================================================================================
 
-void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track,
+void 
+Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track,
                                                     TrackScoreMap& trackScoreTrackMap,
                                                     Trk::PRDtoTrackMap &prdToTrackMap,
                                                     std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks,
@@ -410,7 +368,8 @@ void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track,
       newTrack.reset( refitRots (track,stat) );
     }
   }else{
-    double reXi2 = 0.; int nDF = 0;
+    double reXi2 = 0.; 
+    int nDF = 0;
     const DataVector<const TrackStateOnSurface>* tsos = track->trackStateOnSurfaces();
     DataVector<const TrackStateOnSurface>* vecTsos = new DataVector<const TrackStateOnSurface>();
     // loop over TSOS, copy TSOS and push into vector
@@ -423,9 +382,9 @@ void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track,
         if ((*iTsos)->fitQualityOnSurface()) {
           reXi2 += (*iTsos)->fitQualityOnSurface()->chiSquared();
           nDF   += (*iTsos)->fitQualityOnSurface()->numberDoF();
-	      }
-	    }
-	  }
+        }
+      }
+    }
     Trk::FitQuality* fq = new Trk::FitQuality(reXi2,nDF-5);
     Trk::TrackInfo info;
     info.addPatternRecoAndProperties(track->info());
@@ -444,9 +403,10 @@ void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track,
 
 //==================================================================================================
 
-Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* track,
-                                                          Trk::PRDtoTrackMap &prdToTrackMap,
-                                                          Counter &stat) const{
+Trk::Track* 
+Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* track,
+                                              Trk::PRDtoTrackMap &prdToTrackMap,
+                                              Counter &stat) const{
   // get vector of PRDs
   std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prdToTrackMap,*track);
   if ( prds.empty() ) {
@@ -487,8 +447,8 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac
     // statistic
     stat.incrementCounterByRegion(ECounter::kNgoodFits,newTrack);
     //keeping the track of previously accumulated TrackInfo
-    const Trk::TrackInfo& old_info = track->info();
-    newTrack->info().addPatternReco(old_info);
+    const Trk::TrackInfo& originalInfo = track->info();
+    newTrack->info().addPatternReco(originalInfo);
   } else {
     // statistic
     stat.incrementCounterByRegion(ECounter::kNfailedFits,track);
@@ -499,54 +459,37 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac
 //==================================================================================================
 
 Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* track,
-                                                          Counter &stat) const
-{
-
+                                                          Counter &stat) const {
   ATH_MSG_VERBOSE ("Refit track "<<track);
-
   // refit using first parameter, do outliers
   Trk::Track* newTrack = nullptr;
-
-  if (m_tryBremFit &&
-      track->info().trackProperties(Trk::TrackInfo::BremFit))
-    {
+  if (m_tryBremFit && track->info().trackProperties(Trk::TrackInfo::BremFit)) {
+    // statistics
+    stat.incrementCounterByRegion(ECounter::kNbremFits,track);
+    ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit");
+    newTrack = m_fitterTool->fit(*track, true, Trk::electron);
+  } else {
+    // statistics
+    stat.incrementCounterByRegion(ECounter::kNfits,track);
+    ATH_MSG_VERBOSE ("Normal track, refit");
+    newTrack = m_fitterTool->fit(*track, true, m_particleHypothesis);
+    if (!newTrack && m_tryBremFit &&
+      track->trackParameters()->front()->pT() > m_pTminBrem &&
+      (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))){
       // statistics
-      stat.incrementCounterByRegion(ECounter::kNbremFits,track);
+      stat.incrementCounterByRegion(ECounter::kNrecoveryBremFits,track);
 
-      ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit");
+      ATH_MSG_VERBOSE ("Normal fit failed, try brem recovery");
       newTrack = m_fitterTool->fit(*track, true, Trk::electron);
     }
-  else
-    {
-      // statistics
-      stat.incrementCounterByRegion(ECounter::kNfits,track);
-
-      ATH_MSG_VERBOSE ("Normal track, refit");
-      newTrack = m_fitterTool->fit(*track, true, m_particleHypothesis);
-
-      if (!newTrack && m_tryBremFit &&
-	  track->trackParameters()->front()->pT() > m_pTminBrem &&
-	  (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI)))
-	{
-	  // statistics
-          stat.incrementCounterByRegion(ECounter::kNrecoveryBremFits,track);
-
-	  ATH_MSG_VERBOSE ("Normal fit failed, try brem recovery");
-	  newTrack = m_fitterTool->fit(*track, true, Trk::electron);
-	}
-    }
-
-  if(newTrack)
-    {
+  }
+  if(newTrack){
       // statistic
       stat.incrementCounterByRegion(ECounter::kNgoodFits,newTrack);
-
       //keeping the track of previously accumulated TrackInfo
-      const Trk::TrackInfo& old_info = track->info();
-      newTrack->info().addPatternReco(old_info);
-    }
-  else
-    {
+      const Trk::TrackInfo& originalInfo = track->info();
+      newTrack->info().addPatternReco(originalInfo);
+    } else {
       // statistic
       stat.incrementCounterByRegion(ECounter::kNfailedFits,track);
     }
@@ -555,23 +498,19 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* trac
 
 //==================================================================================================
 
-void Trk::SimpleAmbiguityProcessorTool::dumpTracks( const TrackCollection& tracks ) const
-{
-
+void Trk::SimpleAmbiguityProcessorTool::dumpTracks( const TrackCollection& tracks ) const{
   ATH_MSG_VERBOSE ("Dumping tracks in collection");
   int num=0;
   TrackScore totalScore = 0;
   TrackCollection::const_iterator it    = tracks.begin();
   TrackCollection::const_iterator itEnd = tracks.end();
   for (; it != itEnd ; ++it){
-      // score track:
-      const TrackScore score = m_scoringTool->score( **it, m_suppressHoleSearch );
-      ATH_MSG_VERBOSE (num++<<"\tTrack :"<<*it<<"\tScore: "<<score);
-      totalScore+=score;
-    }
+    // score track:
+    const TrackScore score = m_scoringTool->score( **it, m_suppressHoleSearch );
+    ATH_MSG_VERBOSE (num++<<"\tTrack :"<<*it<<"\tScore: "<<score);
+    totalScore+=score;
+  }
   ATH_MSG_DEBUG ("Total event score : "<<totalScore);
-  
-  
 }
 
 void 
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h
index 1f7b0f441b4671abc6b27c376f8f5d80d1bb7960..074760b7f3277676eea39eebd71478dab5ba08ee 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h
@@ -58,15 +58,15 @@ namespace Trk {
       virtual StatusCode finalize  () override;
 
       /**Returns a processed TrackCollection from the passed 'tracks'
-	 @param tracks collection of tracks which will have ambiguities resolved. Will not be 
-	 modified.
-	 The tracks will be refitted if no fitQuality is given at input.
-         @param prdToTrackMap on optional prd-to-track map being filled by the processor.
-	 @return new collections of tracks, with ambiguities resolved. Ownership is passed on 
-	 (i.e. client handles deletion).
-
-         If no prd-to-track map is given the processor will create
-         one internally (exported to storegate).*/
+      @param tracks collection of tracks which will have ambiguities resolved. Will not be 
+      modified.
+      The tracks will be refitted if no fitQuality is given at input.
+      @param prdToTrackMap on optional prd-to-track map being filled by the processor.
+      @return new collections of tracks, with ambiguities resolved. Ownership is passed on 
+      (i.e. client handles deletion).
+
+      If no prd-to-track map is given the processor will create
+      one internally (exported to storegate).*/
       virtual TrackCollection*  process(const TrackCollection*, Trk::PRDtoTrackMap *prdToTrackMap) const override;
       virtual TrackCollection*  process(const TracksScores* scoredTracks) const override;
 
@@ -74,13 +74,14 @@ namespace Trk {
       virtual void statistics() override;
     private:
 
-      TrackCollection*  process_vector(std::vector<const Track*> &tracks, Trk::PRDtoTrackMap *prdToTrackMap) const;
+      TrackCollection*  processVector(const TrackCollection &tracks, Trk::PRDtoTrackMap *prdToTrackMap) const;
 
       /**Add passed TrackCollection, and Trk::PrepRawData from tracks to caches
-	 @param tracks the TrackCollection is looped over, 
-	 and each Trk::Track is added to the various caches. 
-	 The Trk::PrepRawData from each Trk::Track are added to the IPRD_AssociationTool*/
-      void addNewTracks(const std::vector<const Track*> &tracks,
+      @param tracks the TrackCollection is looped over, 
+      and each Trk::Track is added to the various caches. 
+      The Trk::PrepRawData from each Trk::Track are added to the IPRD_AssociationTool*/
+      //void addNewTracks(const std::vector<const Track*> &tracks,
+      void addNewTracks(const TrackCollection &tracks,
                         TrackScoreMap& trackScoreTrackMap,
                         Trk::PRDtoTrackMap &prdToTrackMap,
                         Counter &stat) const;
@@ -143,18 +144,17 @@ namespace Trk {
       bool m_suppressTrackFit;
 
       /** control material effects (0=non-interacting, 1=pion, 2=electron, 3=muon, 4=pion) read in as an integer 
-	  read in as an integer and convert to particle hypothesis */
+      read in as an integer and convert to particle hypothesis */
       int m_matEffects;
       Trk::ParticleHypothesis m_particleHypothesis;
    
       /**Scoring tool
-	    This tool is used to 'score' the tracks, i.e. to quantify what a good track is.
-	    @todo The actual tool that is used should be configured through job options*/
+      This tool is used to 'score' the tracks, i.e. to quantify what a good track is.
+      @todo The actual tool that is used should be configured through job options*/
       ToolHandle<ITrackScoringTool> m_scoringTool;
 
-
       /** refitting tool - used to refit tracks once shared hits are removed. 
-	    Refitting tool used is configured via jobOptions.*/
+      Refitting tool used is configured via jobOptions.*/
       ToolHandle<ITrackFitter> m_fitterTool;
 
       ToolHandle<Trk::IPRDtoTrackMapTool>         m_assoTool
@@ -164,13 +164,13 @@ namespace Trk {
         {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};
 
       /** selection tool - here the decision which hits remain on a track and
-	     which are removed are made
+       which are removed are made
       */
       ToolHandle<IAmbiTrackSelectionTool> m_selectionTool;
 
       /** monitoring statistics */
-      //enum RegionIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, iDBM = 4, nRegions=5};
-      std::vector<float> m_etabounds;           //!< eta intervals for internal monitoring
+      //enum RegionIndex {iBarrel , iTransi , iEndcap , iDBM = 4, nRegions=4};
+      std::vector<float> m_etabounds;           //!< Four eta intervals for internal monitoring
       mutable std::mutex m_statMutex;
       mutable Counter m_stat ATLAS_THREAD_SAFE;
 
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx
index 7486cfb338e162e4480edc8506734caef1334a41..6c9a67ad3a2a48ac40a6c9cbad1ef351d593933c 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx
@@ -54,24 +54,23 @@ Trk::TrackScoringTool::TrackScoringTool(const std::string& t,
 	m_summaryTypeScore[Trk::numberOfRpcEtaHits]	= 10;
 }
 
-Trk::TrackScoringTool::~TrackScoringTool()
-{
+Trk::TrackScoringTool::~TrackScoringTool(){
 }
 
-StatusCode Trk::TrackScoringTool::initialize()
-{
+StatusCode 
+Trk::TrackScoringTool::initialize(){
 	ATH_CHECK( AlgTool::initialize());
 	ATH_CHECK( m_trkSummaryTool.retrieve());
 	ATH_MSG_VERBOSE("Retrieved tool " << m_trkSummaryTool );
 	return StatusCode::SUCCESS;
 }
 
-StatusCode Trk::TrackScoringTool::finalize()
-{
+StatusCode Trk::TrackScoringTool::finalize(){
 	return AlgTool::finalize();
 }
 
-Trk::TrackScore Trk::TrackScoringTool::score( const Track& track, const bool suppressHoleSearch ) const{
+Trk::TrackScore 
+Trk::TrackScoringTool::score( const Track& track, const bool suppressHoleSearch ) const{
 	const TrackSummary* summary = nullptr;
 	if (suppressHoleSearch)
 	  summary = m_trkSummaryTool->createSummaryNoHoleSearch(track);
@@ -99,8 +98,7 @@ Trk::TrackScoringTool::simpleScore( const Track& track, const TrackSummary& trac
 	}
 
 	// --- summary score analysis
-	for (int i=0; i<Trk::numberOfTrackSummaryTypes; ++i) 
-	{
+	for (int i=0; i<Trk::numberOfTrackSummaryTypes; ++i) {
 		int value = trackSummary.get(static_cast<Trk::SummaryType>(i));
 		//value is -1 if undefined.
 		if (value>0) { 
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.h
index 234ec9187a5f75c62f1c8160bbbf6cefd8f21387..1894f845d284b99353b0d36b362e1d73583e0c81 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.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,27 +20,25 @@ class ITrackSummaryTool;
 class TrackSummary;
 
 /**Concrete implementation of the ITrackScoringTool pABC*/
- class TrackScoringTool : virtual public ITrackScoringTool, public AthAlgTool
- {
+ class TrackScoringTool : virtual public ITrackScoringTool, public AthAlgTool{
 
-   public:
-	TrackScoringTool(const std::string&,const std::string&,const IInterface*);
-	virtual ~TrackScoringTool ();
-	virtual StatusCode initialize() override;
-	virtual StatusCode finalize  () override;
-	/** create a score based on how good the passed track is*/
-	TrackScore score( const Track& track, const bool suppressHoleSearch ) const override;
+  public:
+    TrackScoringTool(const std::string&,const std::string&,const IInterface*);
+    virtual ~TrackScoringTool ();
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize  () override;
+    /** create a score based on how good the passed track is*/
+    TrackScore score( const Track& track, const bool suppressHoleSearch ) const override;
 
-	/** create a score based on how good the passed TrackSummary is*/
-	TrackScore simpleScore( const Track& track, const TrackSummary& trackSummary ) const override;
+    /** create a score based on how good the passed TrackSummary is*/
+    TrackScore simpleScore( const Track& track, const TrackSummary& trackSummary ) const override;
 
-   private:
+  private:
+    /**\todo make this const, once createSummary method is const*/
+    ToolHandle<ITrackSummaryTool> m_trkSummaryTool;
 
-	/**\todo make this const, once createSummary method is const*/
-	ToolHandle<ITrackSummaryTool> m_trkSummaryTool;
-
-	/**holds the scores assigned to each Trk::SummaryType from the track's Trk::TrackSummary*/
-	std::vector<TrackScore> m_summaryTypeScore;
+    /**holds the scores assigned to each Trk::SummaryType from the track's Trk::TrackSummary*/
+    std::vector<TrackScore> m_summaryTypeScore;
   }; 
 }
 #endif 
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx
index f7eaca968e729a2b21c14633e5513bfa65b3ef96..77476c2939b984d474e0c74dabfe1faeec91e79c 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx
@@ -9,13 +9,11 @@
 #include "AthContainers/ConstDataVector.h"
 #include "GaudiKernel/MsgStream.h"
 #include <map>
-#include <ext/functional>
-#include <iterator>
 
 //==================================================================================================
 Trk::TrackSelectionProcessorTool::TrackSelectionProcessorTool(const std::string& t, 
-								const std::string& n,
-								const IInterface*  p )
+                const std::string& n,
+                const IInterface*  p )
   :
   AthAlgTool(t,n,p),
   m_scoringTool("Trk::TrackScoringTool/TrackScoringTool"), 
@@ -29,53 +27,30 @@ Trk::TrackSelectionProcessorTool::TrackSelectionProcessorTool(const std::string&
 }
 //==================================================================================================
 
-Trk::TrackSelectionProcessorTool::~TrackSelectionProcessorTool()
-{
+Trk::TrackSelectionProcessorTool::~TrackSelectionProcessorTool(){
 }
 //==================================================================================================
 
-StatusCode Trk::TrackSelectionProcessorTool::initialize()
-{
-
+StatusCode 
+Trk::TrackSelectionProcessorTool::initialize(){
   StatusCode sc = AthAlgTool::initialize();
-  if (sc.isFailure()) 
-    {
-      msg(MSG::FATAL) << "AlgTool::initialise failed" << endmsg;
-      return StatusCode::FAILURE;
-    }
-
+  if (sc.isFailure()) {
+    ATH_MSG_FATAL( "AlgTool::initialise failed" );
+    return StatusCode::FAILURE;
+  }
   ATH_CHECK( m_assoMapName.initialize(!m_assoMapName.key().empty()));
   ATH_CHECK( m_assoTool.retrieve() );
-  
-  sc = m_scoringTool.retrieve();
-  if (sc.isFailure()) 
-    {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_scoringTool << endmsg;
-      return StatusCode::FAILURE;
-    } 
-  
-    msg(MSG::INFO) << "Retrieved tool " << m_scoringTool << endmsg;
-  
-  sc = m_selectionTool.retrieve();
-  if (sc.isFailure()) 
-    {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_selectionTool << endmsg;
-      return StatusCode::FAILURE;
-    } 
-  
-    msg(MSG::INFO) << "Retrieved tool " << m_selectionTool << endmsg;
-
-
-  if(m_disableSorting) 
-    msg(MSG::INFO) << "Internal sorting disabled, using external ordering!" << endmsg;    
-      
+  ATH_CHECK( m_scoringTool.retrieve());
+  ATH_CHECK(m_selectionTool.retrieve());
+  if (m_disableSorting) ATH_MSG_INFO( "Internal sorting disabled, using external ordering!" );    
   return sc;
 }
 //==================================================================================================
 
-StatusCode Trk::TrackSelectionProcessorTool::finalize()
-{
-  StatusCode sc = AlgTool::finalize(); return sc;
+StatusCode 
+Trk::TrackSelectionProcessorTool::finalize(){
+  StatusCode sc = AlgTool::finalize(); 
+  return sc;
 }
 
 //==================================================================================================
@@ -83,175 +58,140 @@ StatusCode Trk::TrackSelectionProcessorTool::finalize()
 /** Do actual processing of event. Takes a track container, 
     and then returns the tracks which have been selected*/
 
-TrackCollection*  Trk::TrackSelectionProcessorTool::process(const TrackCollection* tracksCol,
-                                                            Trk::PRDtoTrackMap *prd_to_track_map) const
-{
-  
+TrackCollection*  
+Trk::TrackSelectionProcessorTool::process(const TrackCollection* tracksCol,
+                                          Trk::PRDtoTrackMap *pPrdToTrackMap) const{
   //TODO: make sure the ownership; delete origin tracks from map?
   std::vector<const Track*> tracks;
   tracks.reserve(tracksCol->size());
   for(auto e: *tracksCol){
     tracks.push_back(e);
   }
-
-  using namespace std;
-
   ATH_MSG_DEBUG ("Processing "<<tracks.size()<<" tracks");
-
-  std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map_cleanup;
-  if (!prd_to_track_map) {
-     prd_to_track_map_cleanup = m_assoTool->createPRDtoTrackMap();
+  std::unique_ptr<Trk::PRDtoTrackMap> tmpPrdToTrackMap;
+  if (!pPrdToTrackMap) {
+     tmpPrdToTrackMap = m_assoTool->createPRDtoTrackMap();
      if (!m_assoMapName.key().empty()) {
-        SG::ReadHandle<Trk::PRDtoTrackMap> input_prd_map(m_assoMapName);
-        if (!input_prd_map.isValid()) {
+        SG::ReadHandle<Trk::PRDtoTrackMap> inputPrdMap(m_assoMapName);
+        if (!inputPrdMap.isValid()) {
            ATH_MSG_ERROR("Failed to retrieve prd to track map " << m_assoMapName.key() );
-        }
-        else {
-           *prd_to_track_map_cleanup = *input_prd_map;
+        } else {
+           *tmpPrdToTrackMap = *inputPrdMap;
         }
      }
-     prd_to_track_map = prd_to_track_map_cleanup.get();
+     pPrdToTrackMap = tmpPrdToTrackMap.get();
   }
-
   TrackScoreMap trackScoreTrackMap;
   //put tracks into maps etc
-  addNewTracks(trackScoreTrackMap,*prd_to_track_map, tracks);
- 
+  addNewTracks(trackScoreTrackMap,*pPrdToTrackMap, tracks);
   // going to do simple algorithm for now:
   // - take track with highest score
   // - remove shared hits from all other tracks
   // - take next highest scoring tracks, and repeat 
-
-  std::unique_ptr<TrackCollection> final_tracks(std::make_unique<TrackCollection>(SG::VIEW_ELEMENTS)); //TODO, old or new
-  solveTracks(trackScoreTrackMap, *prd_to_track_map, *final_tracks);
-  
-  if (msgLvl(MSG::DEBUG)) dumpTracks(*final_tracks);
-
-  return final_tracks.release();
+  std::unique_ptr<TrackCollection> result(std::make_unique<TrackCollection>(SG::VIEW_ELEMENTS)); //TODO, old or new
+  solveTracks(trackScoreTrackMap, *pPrdToTrackMap, *result);
+  if (msgLvl(MSG::DEBUG)) dumpTracks(*result);
+  return result.release();
 }
 
 
 //==================================================================================================
-void Trk::TrackSelectionProcessorTool::addNewTracks(TrackScoreMap &trackScoreTrackMap,
-                                                    Trk::PRDtoTrackMap &prd_to_track_map,
-                                                    const std::vector<const Track*> &tracks) const
-{
-  using namespace std;
+void 
+Trk::TrackSelectionProcessorTool::addNewTracks(TrackScoreMap &trackScoreTrackMap,
+                                                    Trk::PRDtoTrackMap &prdToTrackMap,
+                                                    const std::vector<const Track*> &tracks) const{
   ATH_MSG_DEBUG ("Number of tracks at Input: "<<tracks.size());
   PrdSignatureSet prdSigSet;
-
   TrackScore itrack=0;
   for (const Track*a_track : tracks )   {
-
     if(m_disableSorting) {
       // add track to map using ordering provided by the collection
-      trackScoreTrackMap.insert( make_pair(itrack, TrackPtr(a_track)) );
+      trackScoreTrackMap.insert( std::make_pair(itrack, TrackPtr(a_track)) );
       itrack++;
       continue;
     }
-    
     bool reject = false;
-    
     // only fitted tracks get hole search, input is not fitted
     TrackScore score = m_scoringTool->score( *a_track, true );
     // veto tracks with score 0
     if (score==0) { 
       ATH_MSG_DEBUG ("Track score is zero, reject it");
       reject = true;
-
     } else {
-       
       if (m_dropDouble) {
-        std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prd_to_track_map, *a_track);
-	// unfortunately PrepRawDataSet is not a set !
-	PrdSignature prdSig;
-	prdSig.insert( prds.begin(),prds.end() );
-	// we try to insert it into the set, if we fail (pair.second), it then exits already
-	if ( !(prdSigSet.insert(prdSig)).second ) {
-	  ATH_MSG_DEBUG ("Double track, reject it !");
-	  reject = true;
-	} else {
-	  ATH_MSG_DEBUG ("Insert new track in PrdSignatureSet");
-	}
+        const std::vector<const Trk::PrepRawData*> & prds = m_assoTool->getPrdsOnTrack(prdToTrackMap, *a_track);
+        // unfortunately PrepRawDataSet is not a set !
+        PrdSignature prdSig;
+        prdSig.insert( prds.begin(),prds.end() );
+        // we try to insert it into the set, if we fail (pair.second), it then exits already
+        if ( !(prdSigSet.insert(prdSig)).second ) {
+          ATH_MSG_DEBUG ("Double track, reject it !");
+          reject = true;
+        } else {
+          ATH_MSG_DEBUG ("Insert new track in PrdSignatureSet");
+        }
       }
     }
- 
     if (!reject) {
       // add track to map, map is sorted small to big ! set if fitted
       ATH_MSG_VERBOSE ("Track  ("<< a_track <<") has score "<<score);
-      trackScoreTrackMap.insert( make_pair(-score, TrackPtr(a_track) ) );
-
+      trackScoreTrackMap.insert( std::make_pair(-score, TrackPtr(a_track) ) );
     }
   }
-  
   ATH_MSG_DEBUG ("Number of tracks in map:"<<trackScoreTrackMap.size());
 }
 
-void Trk::TrackSelectionProcessorTool::solveTracks(TrackScoreMap &trackScoreTrackMap,
-                                                   Trk::PRDtoTrackMap &prd_to_track_map,
-                                                   TrackCollection &final_tracks) const
-{
-  using namespace std;
-
+void 
+Trk::TrackSelectionProcessorTool::solveTracks(TrackScoreMap &trackScoreTrackMap,
+                                                   Trk::PRDtoTrackMap &prdToTrackMap,
+                                                   TrackCollection &result) const{
   ATH_MSG_VERBOSE ("Starting to solve tracks");
-
   // now loop as long as map is not empty
   while ( !trackScoreTrackMap.empty() ) {
-
     TrackScoreMap::iterator itnext = trackScoreTrackMap.begin();
     TrackPtr atrack( std::move(itnext->second) );
     TrackScore ascore( itnext->first);
     trackScoreTrackMap.erase(itnext);
-
     ATH_MSG_VERBOSE ("--- Trying next track "<<atrack.track()<<"\t with score "<<-ascore);
     std::unique_ptr<Trk::Track> cleanedTrack;
-    auto [cleanedTrack_tmp, keep_orig]  = m_selectionTool->getCleanedOutTrack( atrack.track() , -(ascore), prd_to_track_map);
+    const auto &[cleanedTrack_tmp, keepOriginal]  = m_selectionTool->getCleanedOutTrack( atrack.track() , -(ascore), prdToTrackMap);
     cleanedTrack.reset(cleanedTrack_tmp);
-
-    if (keep_orig ){
+    if (keepOriginal ){
       // track can be kept as identical to the input track
       ATH_MSG_DEBUG ("Accepted track "<<atrack.track()<<"\t has score "<<-(ascore));
       // add track to PRD_AssociationTool
-      StatusCode sc = m_assoTool->addPRDs(prd_to_track_map,*atrack);
-      if (sc.isFailure()) msg(MSG::ERROR) << "addPRDs() failed" << endmsg;
+      StatusCode sc = m_assoTool->addPRDs(prdToTrackMap,*atrack);
+      if (sc.isFailure()) ATH_MSG_ERROR( "addPRDs() failed" );
       // add to output list
-      final_tracks.push_back( const_cast<Track*>(atrack.track()) );
-
-    }else if ( !cleanedTrack ) {
+      result.push_back( const_cast<Track*>(atrack.track()) );
+    } else if ( !cleanedTrack ) {
       // track should be discarded
       ATH_MSG_DEBUG ("Track "<< atrack.track() << " doesn't meet the cuts of the AmbiTrack Selection tool");
-
-    }
-    else  {
-
+    } else  {
       // delete cleaned track
       cleanedTrack.reset();
-
       // stripped down version cannot be handled discarding
       ATH_MSG_DEBUG("Selection tool returned a new track, cannot handle memory management of new track, deleting it. Check you configuration ");
     }
     // don't forget to drop track from map
   }
-
-  ATH_MSG_DEBUG ("Finished, number of track on output: "<<final_tracks.size());
+  ATH_MSG_DEBUG ("Finished, number of track on output: "<<result.size());
 }
 
 //==================================================================================================
 
-void Trk::TrackSelectionProcessorTool::dumpTracks( const TrackCollection& tracks ) const
-{
-
+void 
+Trk::TrackSelectionProcessorTool::dumpTracks( const TrackCollection& tracks ) const{
   ATH_MSG_VERBOSE ("Dumping tracks in collection");
   int num=0;
   TrackScore totalScore = 0;
   TrackCollection::const_iterator it    = tracks.begin();
   TrackCollection::const_iterator itEnd = tracks.end();
-  for (; it != itEnd ; ++it)
-    {
-      // score track:
-      const TrackScore score = m_scoringTool->score( **it, true );
-      ATH_MSG_VERBOSE (num++<<"\tTrack :"<<*it<<"\tScore: "<<score);
-      totalScore+=score;
-    }
+  for (; it != itEnd ; ++it){
+    // score track:
+    const TrackScore score = m_scoringTool->score( **it, true );
+    ATH_MSG_VERBOSE (num++<<"\tTrack :"<<*it<<"\tScore: "<<score);
+    totalScore+=score;
+  }
   ATH_MSG_DEBUG ("Total event score : "<<totalScore);
 }
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.h
index 1ff184ee494f376bce561ddcd8e8569f15db97b8..229b3d322cd711aad1c84ae0b2ada4b6418d690c 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.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 TRACKSELECTIONPROCESSORTOOL_H
@@ -23,7 +23,6 @@
 #include <map>
 #include <set>
 #include <vector>
-#include <functional>
 
 
 namespace Trk {
@@ -51,22 +50,22 @@ namespace Trk {
       virtual StatusCode finalize  () override;
 
       /**Returns a processed TrackCollection from the passed 'tracks' WITHOUT copying or refitting the input tracks.
-	 The pointers of the tracks in the input collection are copied into the output collection which does NOT
-	 own the pointers. Clients must ensure that the Input Collection is not deleted before the output collection
-	 else all pointers in the output collection will be invalid!
+   The pointers of the tracks in the input collection are copied into the output collection which does NOT
+   own the pointers. Clients must ensure that the Input Collection is not deleted before the output collection
+   else all pointers in the output collection will be invalid!
 
-	 @param tracks collection of tracks which will have ambiguities resolved. Will not be
-	 modified.
-         @param prd_to_track_map on optional prd-to-track map being filled by the processor.
+   @param tracks collection of tracks which will have ambiguities resolved. Will not be
+   modified.
+         @param prdToTrackMap on optional prd-to-track map being filled by the processor.
 
-	 @return new collections of tracks, with ambiguities resolved.
-	  The returned track collection is a SG::VIEW_ELEMENTS container, meaning that it should NOT be written to disk.
-	  Ownership of the collection is passed on (i.e. client handles deletion)
+   @return new collections of tracks, with ambiguities resolved.
+    The returned track collection is a SG::VIEW_ELEMENTS container, meaning that it should NOT be written to disk.
+    Ownership of the collection is passed on (i.e. client handles deletion)
 
          If no prd-to-track map is given the processor might create one internally (for internal
          use only, or exported to storegate).
       */
-      virtual TrackCollection*  process(const TrackCollection* tracksCol,Trk::PRDtoTrackMap *prd_to_track_map) const override;
+      virtual TrackCollection*  process(const TrackCollection* tracksCol,Trk::PRDtoTrackMap *prdToTrackMap) const override;
 
       virtual TrackCollection*  process(const TracksScores* /*trackScoreTrackMap*/) const override { return nullptr; }
 
@@ -75,29 +74,29 @@ namespace Trk {
     private:
 
       /**Add passed TrackCollection, and Trk::PrepRawData from tracks to caches
-	 @param tracks the TrackCollection is looped over, 
-	 and each Trk::Track is added to the various caches. 
-	 The Trk::PrepRawData from each Trk::Track are added to the IPRD_AssociationTool*/
-      void addNewTracks(TrackScoreMap &trackScoreTrackMap, Trk::PRDtoTrackMap &prd_to_track_map, const std::vector<const Track*> &tracks ) const;
+   @param tracks the TrackCollection is looped over, 
+   and each Trk::Track is added to the various caches. 
+   The Trk::PrepRawData from each Trk::Track are added to the IPRD_AssociationTool*/
+      void addNewTracks(TrackScoreMap &trackScoreTrackMap, Trk::PRDtoTrackMap &prdToTrackMap, const std::vector<const Track*> &tracks ) const;
 
 
-      void solveTracks(TrackScoreMap &trackScoreTrackMap, Trk::PRDtoTrackMap &prd_to_track_map, TrackCollection &final_tracks) const;
+      void solveTracks(TrackScoreMap &trackScoreTrackMap, Trk::PRDtoTrackMap &prdToTrackMap, TrackCollection &final_tracks) const;
 
       /** print out tracks and their scores for debugging*/
       void dumpTracks(const TrackCollection& tracks) const;
-	
+  
       // private data members
 
       /** by default drop double tracks before refit*/
       bool m_dropDouble;
    
       /**Scoring tool
-	 This tool is used to 'score' the tracks, i.e. to quantify what a good track is.
-	 @todo The actual tool that is used should be configured through job options*/
+   This tool is used to 'score' the tracks, i.e. to quantify what a good track is.
+   @todo The actual tool that is used should be configured through job options*/
       ToolHandle<ITrackScoringTool> m_scoringTool;
 
       /** selection tool - here the decision which hits remain on a track and
-	  which are removed are made
+    which are removed are made
       */
       ToolHandle<IAmbiTrackSelectionTool> m_selectionTool;
 
@@ -109,7 +108,7 @@ namespace Trk {
          {this,"AssociationMapName",""};  ///< the key given to the newly created association map
 
       /** option to disable sorting based on track score and 
-	  use the ordering provided externally*/
+    use the ordering provided externally*/
       bool m_disableSorting;
     };
 
diff --git a/Tracking/TrkTools/TrkParticleCreator/TrkParticleCreator/TrackParticleCreatorTool.h b/Tracking/TrkTools/TrkParticleCreator/TrkParticleCreator/TrackParticleCreatorTool.h
index daf0cc404714034f92f40bb74917c3e5c05ef120..378b9b2b2c264247562c7a6c6017c5b9a2af97cf 100644
--- a/Tracking/TrkTools/TrkParticleCreator/TrkParticleCreator/TrackParticleCreatorTool.h
+++ b/Tracking/TrkTools/TrkParticleCreator/TrkParticleCreator/TrackParticleCreatorTool.h
@@ -190,8 +190,6 @@ private:
                                                           "MuonSummaryTool",
                                                           "Muon::MuonHitSummaryTool/MuonHitSummaryTool" };
 
-  /** to query magnetic field configuration */
-  // ServiceHandle<MagField::IMagFieldSvc>  m_magFieldSvc;
   ServiceHandle<IBLParameterSvc> m_IBLParameterSvc;
 
   SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey{
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h b/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
index 32e0ef07081d9fe81ac08449f6d43bd233668500..13ae226c33b7e95185648a7258621bc50c45529f 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
@@ -240,13 +240,6 @@ private:
   /** switch to deactivate Pixel info init */
   Gaudi::Property<bool> m_pixelExists{ this, "PixelExists", true, "" };
   
-  /** Parameters for the TRT dE/dx compution see @ref ITRT_ToT_dEdx for details.*/
-  /** switch to deactivate Pixel info init */
-  Gaudi::Property<bool> m_TRTdEdx_DivideByL{ this, "TRTdEdx_DivideByL", true, "" };
-  /** Parameters for the TRT dE/dx compution see @ref ITRT_ToT_dEdx for details.*/
-  Gaudi::Property<bool> m_TRTdEdx_useHThits{ this, "TRTdEdx_useHThits", true, "" };
-  /** Parameters for the TRT dE/dx compution see @ref ITRT_ToT_dEdx for details.*/
-  Gaudi::Property<bool> m_TRTdEdx_corrected{ this, "TRTdEdx_corrected", true, "" };
   /** Only compute TRT dE/dx if there are at least this number of TRT hits or outliers.*/
   Gaudi::Property<int> m_minTRThitsForTRTdEdx{ this, "minTRThitsForTRTdEdx", 1, "" };
 
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
index 1f7772b37c85492f71bc024b98ca5cd95ede8479..bcb0783196329b40c6dd85996be83eb786cefa34 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
@@ -292,8 +292,8 @@ Trk::TrackSummaryTool::createSummary( const Track& track,
 
   if (!m_trt_dEdxTool.empty()) {
     if (information[Trk::numberOfTRTHits]+information[Trk::numberOfTRTOutliers]>=m_minTRThitsForTRTdEdx) {
-      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits) );
-      double fvalue = (nhits>0 ? m_trt_dEdxTool->dEdx(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits, m_TRTdEdx_corrected) : 0.0);
+      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track) );
+      double fvalue = (nhits>0 ? m_trt_dEdxTool->dEdx(&track) : 0.0);
       eProbability.push_back(fvalue);
       information[ numberOfTRTHitsUsedFordEdx] = static_cast<uint8_t>(std::max(nhits,0));
     }
@@ -355,8 +355,8 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(const Track& track, const Trk::
 
   if (!m_trt_dEdxTool.empty()) {
     if (summary.get(Trk::numberOfTRTHits)+summary.get(Trk::numberOfTRTOutliers)>=m_minTRThitsForTRTdEdx) {
-      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits) );
-      double fvalue = (nhits>0 ? m_trt_dEdxTool->dEdx(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits, m_TRTdEdx_corrected) : 0.0);
+      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track) );
+      double fvalue = (nhits>0 ? m_trt_dEdxTool->dEdx(&track) : 0.0);
       eProbability.push_back(fvalue);
       if (!summary.update(Trk::numberOfTRTHitsUsedFordEdx, static_cast<uint8_t>(std::max(nhits,0)) )) {
         ATH_MSG_WARNING( "Attempt to update numberOfTRTHitsUsedFordEdx but this summary information is "
diff --git a/Tracking/TrkValidation/TrkValTools/CMakeLists.txt b/Tracking/TrkValidation/TrkValTools/CMakeLists.txt
index 21a199390fbd18a11d7aec92497512889c649bb9..acc3736bdd8723e43d3ef3cfac4995b71770c971 100644
--- a/Tracking/TrkValidation/TrkValTools/CMakeLists.txt
+++ b/Tracking/TrkValidation/TrkValTools/CMakeLists.txt
@@ -59,13 +59,17 @@ find_package( Eigen )
 find_package( XercesC )
 find_package( Boost )
 
+atlas_add_library( TrkValToolsLib
+                   TrkValTools/*.h
+                   INTERFACE
+                   INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS}
+                   PUBLIC_HEADERS TrkValTools
+                   LINK_LIBRARIES GaudiKernel AthenaBaseComps TrkValInterfaces StoreGateLib xAODEventInfo TrkParameters TrkValEvent AtlasHepMCLib TrkEventPrimitives TrkTrack AthContainers )
+
 # Component(s) in the package:
 atlas_add_component( TrkValTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthContainers AthenaKernel xAODTracking GaudiKernel TrkEventPrimitives TrkParameters TrkTrack TrkToolInterfaces TrkValEvent TrkValInterfaces CommissionEvent AtlasDetDescr EventInfo EventPrimitives GeneratorObjects TrkSurfaces TrkCompetingRIOsOnTrack TrkEventUtils TrkMaterialOnTrack TrkMeasurementBase TrkParticleBase TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkExInterfaces TrkFitterUtils xAODTruth xAODJet xAODPFlow xAODCaloEvent xAODCore xAODEventInfo AsgTools AthenaKernel AthenaMonitoringLib)
-
-# Install files from the package:
-atlas_install_headers( TrkValTools )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} TrkValToolsLib AthenaKernel xAODTracking TrkToolInterfaces CommissionEvent AtlasDetDescr EventInfo EventPrimitives GeneratorObjects TrkSurfaces TrkCompetingRIOsOnTrack TrkEventUtils TrkMaterialOnTrack TrkMeasurementBase TrkParticleBase TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkExInterfaces TrkFitterUtils xAODTruth xAODJet xAODPFlow xAODCaloEvent xAODCore AsgTools AthenaKernel AthenaMonitoringLib)
 
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h
index c9dd4ea722f8c75c5e7b9ea7e01ecbdb3ac142a4..76fb09d517dc5d86f73979bcc3e44c58846d9214 100755
--- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h
@@ -6,7 +6,7 @@
 //
 //  Old interface of VKalVrt.
 //  Fully implemented also in Reconstruction/VKalVrt/VKalVrtFitSvc
-//  
+//
 //---------------------------------------------------------------
 #ifndef TRKVKALVRTFITTER_ITRKVKALVRTFITTER_H
 #define TRKVKALVRTFITTER_ITRKVKALVRTFITTER_H
@@ -20,14 +20,11 @@
 //
 #include  "TrkVKalVrtFitter/IVKalState.h"
 #include  "TrkTrack/Track.h"
-#include  "xAODTracking/TrackParticleContainer.h" 
-#include  "xAODTracking/NeutralParticleContainer.h" 
+#include  "xAODTracking/TrackParticleContainer.h"
+#include  "xAODTracking/NeutralParticleContainer.h"
 #include  "xAODTracking/VertexContainer.h"
 
 #include <vector>
-namespace MagField{
-   class IMagFieldSvc;
-}
 
 
 namespace Trk{
@@ -47,7 +44,7 @@ class IExtrapolator;
       * Context aware method
       */
       virtual std::unique_ptr<IVKalState> makeState(const EventContext& ctx) const = 0;
-      
+
      /*
       * For non-migrated clients which should always use the context aware method
       */
@@ -92,7 +89,7 @@ class IExtrapolator;
         double& Chi2,
         IVKalState& istate,
         bool ifCovV0 = false) const = 0;
-     
+
       //------
       virtual StatusCode VKalVrtCvtTool(const Amg::Vector3D& Vertex,
                                         const TLorentzVector& Momentum,
@@ -102,7 +99,7 @@ class IExtrapolator;
                                         std::vector<double>& CovPerigee,
                                         IVKalState& istate) const = 0;
       //.........................................................................................
-   
+
       virtual StatusCode VKalVrtFitFast(const std::vector<const Track*>& list,
                                         Amg::Vector3D& Vertex,
                                         IVKalState& istate) const = 0;
@@ -110,7 +107,7 @@ class IExtrapolator;
         const std::vector<const xAOD::TrackParticle*>& list,
         Amg::Vector3D& Vertex,
         IVKalState& istate) const = 0;
-    
+
       virtual StatusCode VKalVrtFitFast(
         const std::vector<const TrackParameters*>& list,
         Amg::Vector3D& Vertex,
@@ -123,10 +120,10 @@ class IExtrapolator;
 
       virtual StatusCode VKalGetTrkWeights(std::vector<double>& Weights,
                                            const IVKalState& istate) const = 0;
-  
+
       virtual StatusCode VKalGetFullCov(long int, std::vector<double>& CovMtx,
                                         const IVKalState& istate, bool = false) const =0;
-      
+
       virtual StatusCode VKalGetMassError(double& Mass, double& MassError,
                                           const IVKalState& istate) const =0;
 
@@ -137,23 +134,23 @@ class IExtrapolator;
 
       virtual void setMassForConstraint(double, const std::vector<int>&,
                                         IVKalState& istate) const =0;
-    
+
       virtual void setRobustness(int, IVKalState& istate) const =0;
-     
+
       virtual void setRobustScale(double, IVKalState& istate) const =0;
-    
+
       virtual void setCnstType(int, IVKalState& istate) const =0;
-      
+
       virtual void setVertexForConstraint(const xAOD::Vertex &,
                                           IVKalState& istate) const=0;
-      
+
       virtual void setVertexForConstraint(double,double,double,
                                           IVKalState& istate) const =0;
-      
+
       virtual void setCovVrtForConstraint(double,double,double,
                                           double,double,double,
                                           IVKalState& istate) const=0;
-      
+
       virtual void setMassInputParticles( const std::vector<double>&,
                                           IVKalState& istate) const=0;
 //----------------------------------------------------------------------------------------------------
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h
index 1f2d063778a3f87d0e6026380f56dae694a36283..c53c875aeb96547f7b7b2dba85ddca3e85d5dc87 100755
--- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h
@@ -50,13 +50,13 @@ namespace Trk{
     std::vector<int> trkInVrt;            //  list of tracks attached to vertex directly
     VertexID outPointingV;                //  to which vertex  it points
     std::vector<VertexID> inPointingV;    //  which vertices points to it
-    VertexID mergedTO;                    //  merged to another vertex (not separate anymore) 
+    VertexID mergedTO;                    //  merged to another vertex (not separate anymore)
     std::vector<VertexID> mergedIN;       //  vertices attached to current
     int indexInSimpleCascade;
     cascadeV(){ vID=-999; outPointingV=0; mergedTO=0; indexInSimpleCascade=0;};
    ~cascadeV() = default;
   };
-  
+
 
 //------------------------------------------------------------------------
   //Tool should not be used reentrantly or used publically
@@ -70,7 +70,7 @@ namespace Trk{
       // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext
       using Trk::IVertexFitter::fit;
       using Trk::ITrkVKalVrtFitter::makeState;
-      
+
         virtual StatusCode initialize() override final;
         virtual StatusCode finalize() override final;
 
@@ -120,17 +120,17 @@ namespace Trk{
 
         virtual xAOD::Vertex* fit(
           const std::vector<const TrackParameters*>&) const override final;
-       
+
         virtual xAOD::Vertex* fit(
           const std::vector<const TrackParameters*>&,
           const std::vector<const Trk::NeutralParameters*>&) const override final;
 
 
         /*--------------  Additional  xAOD  interfaces -------------*/
-        xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk, 
+        xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
                            const Amg::Vector3D& constraint,
                            IVKalState& istate) const;
-        xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk, 
+        xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk,
                            const xAOD::Vertex& constraint,
                            IVKalState& istate) const;
 //
@@ -181,7 +181,7 @@ namespace Trk{
           double& Chi2,
           IVKalState& istate,
           bool ifCovV0 = false) const override final;
-       
+
         virtual StatusCode VKalVrtFit(
           const std::vector<const Track*>&,
           Amg::Vector3D& Vertex,
@@ -222,7 +222,7 @@ namespace Trk{
           const std::vector<const xAOD::TrackParticle*>&,
           Amg::Vector3D& Vertex,
           IVKalState& istate) const override final;
- 
+
         virtual StatusCode VKalVrtFitFast(
           const std::vector<const TrackParameters*>&,
           Amg::Vector3D& Vertex,
@@ -232,7 +232,7 @@ namespace Trk{
         Trk::Track* CreateTrkTrack(const std::vector<double>& VKPerigee,
                                    const std::vector<double>& VKCov,
                                    const IVKalState& istate) const override final;
-       
+
         virtual StatusCode VKalGetTrkWeights(
           dvect& Weights,
           const IVKalState& istate) const override final;
@@ -251,16 +251,16 @@ namespace Trk{
                                           double Y,
                                           double Z,
                                           IVKalState& istate) const override final;
-      
+
         virtual void setMassForConstraint(double Mass,
                                           IVKalState& istate) const override final;
-       
+
         virtual void setMassForConstraint(double Mass,
                                           const std::vector<int>&,
                                           IVKalState& istate) const override final;
 
         virtual void setRobustness(int, IVKalState& istate) const override final;
- 
+
         virtual void setRobustScale(double, IVKalState& istate) const override final;
 
         virtual void setCnstType(int, IVKalState& istate) const override final;
@@ -283,27 +283,27 @@ namespace Trk{
 
         virtual void setMassInputParticles(const std::vector<double>&,
                                            IVKalState& istate) const override final;
-      
+
         virtual double VKalGetImpact(const xAOD::TrackParticle*,
                                      const Amg::Vector3D& Vertex,
                                      const long int Charge,
                                      dvect& Impact,
                                      dvect& ImpactError,
                                      IVKalState& istate) const override final;
-       
+
         virtual double VKalGetImpact(const Track*,
                                      const Amg::Vector3D& Vertex,
                                      const long int Charge,
                                      dvect& Impact,
                                      dvect& ImpactError,
                                      IVKalState& istate) const override final;
-        
+
         virtual double VKalGetImpact(const xAOD::TrackParticle*,
                                      const Amg::Vector3D& Vertex,
                                      const long int Charge,
                                      dvect& Impact,
                                      dvect& ImpactError) const override final;
-        
+
         virtual double VKalGetImpact(const Track*,
                                      const Amg::Vector3D& Vertex,
                                      const long int Charge,
@@ -327,8 +327,6 @@ namespace Trk{
         std::vector<double> m_c_MassInputParticles;
 
         ToolHandle<IExtrapolator> m_extPropagator; // External propagator
-        ////ServiceHandle<MagField::IMagFieldSvc> m_magFieldAthenaSvc; //Athena
-        ///magnetic field
         // Read handle for conditions object to get the field cache
         SG::ReadCondHandleKey<AtlasFieldCacheCondObj>
           m_fieldCacheCondObjInputKey{ this,
@@ -356,7 +354,7 @@ namespace Trk{
         struct TrkMatControl
         {
           // Track reference point(hit) in global ATLAS frame
-          Amg::Vector3D trkRefGlobPos; 
+          Amg::Vector3D trkRefGlobPos;
           int extrapolationType;
           int TrkID;
           const TrackParameters* TrkPnt;
@@ -452,7 +450,7 @@ namespace Trk{
       int getCascadeNDoF (const CascadeState& cstate) const;
 //----------------------
 //  Control variables
-//    
+//
 
       double m_BMAG;       /* const magnetic field  if needed */
       double m_CNVMAG;     /* Conversion constant */
@@ -464,7 +462,7 @@ namespace Trk{
 //
 //
 
-    
+
 
 //
 //  Private technical functions
@@ -475,7 +473,7 @@ namespace Trk{
         // init of state for backwards compartibility - calls context-aware version. Can be removed
         // when fully migrated to EventContext
         void initState (State& state) const;
-      
+
 //
 //
         void FillMatrixP(AmgSymMatrix(5)& , std::vector<double>& ) const;
@@ -505,22 +503,22 @@ namespace Trk{
         StatusCode CvtTrkTrack(const std::vector<const Track*>& list,
                                int& ntrk,
                                State& state) const;
-      
+
         StatusCode CvtTrackParticle(
           const std::vector<const xAOD::TrackParticle*>& list,
           int& ntrk,
           State& state) const;
-       
+
         StatusCode CvtNeutralParticle(
           const std::vector<const xAOD::NeutralParticle*>& list,
           int& ntrk,
           State& state) const;
-        
+
         StatusCode CvtTrackParameters(
           const std::vector<const TrackParameters*>& InpTrk,
           int& ntrk,
           State& state) const;
-        
+
         StatusCode CvtNeutralParameters(
           const std::vector<const NeutralParameters*>& InpTrk,
           int& ntrk,
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h
index bd46bca5e6805c054d36c9ad32aadecfcb7b5390..dfff9d0de57c4c499687725869db203e839e14a4 100755
--- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h
@@ -8,7 +8,6 @@
 #define TRKVKALVRTFITTER_VKALVRTATLAS_H
 
 // Mag field service
-#include  "MagFieldInterfaces/IMagFieldSvc.h"
 #include  "TrkVKalVrtCore/VKalVrtBMag.h"
 #include "MagFieldElements/AtlasFieldCache.h"
 // External propagator
@@ -16,9 +15,6 @@
 #include "TrkExInterfaces/IExtrapolator.h"
 #include  "TrkVKalVrtFitter/ITrkVKalVrtFitter.h"
 
-namespace MagField{
-   class IMagFieldSvc;
-}
 
 namespace Trk{
 
@@ -27,7 +23,7 @@ class TrkVKalVrtFitter;
 
 //  ATLAS magnetic field access for TrkVKalVrtFitter
 //-----------------------------------------------------
-  class VKalAtlasMagFld : public Trk::baseMagFld 
+  class VKalAtlasMagFld : public Trk::baseMagFld
    {
     public:
 
@@ -39,7 +35,7 @@ class TrkVKalVrtFitter;
        void setAtlasMagRefFrame( double, double, double );
 
     private:
-    
+
        MagField::AtlasFieldCache * m_VKalAthenaField;
        double m_FIXED_ATLAS_FIELD=1.997;
        double m_magFrameX, m_magFrameY, m_magFrameZ ;
@@ -51,7 +47,7 @@ class StraightLineSurface;
 
 //  External propagator access for TrkVKalVrtCore
 //-----------------------------------------------------
-  class VKalExtPropagator : public Trk::basePropagator 
+  class VKalExtPropagator : public Trk::basePropagator
    {
     public:
 
@@ -63,8 +59,8 @@ class StraightLineSurface;
 //   system. Global coordinates are incapsulated inside function
 //
         virtual
-        void Propagate(long int trkID, long int Charge, 
-	               double *ParOld, double *CovOld, double *RefStart, 
+        void Propagate(long int trkID, long int Charge,
+	               double *ParOld, double *CovOld, double *RefStart,
                        double *RefEnd, double *ParNew, double *CovNew,
                        const IVKalState& istate) const override;
         virtual
@@ -74,11 +70,11 @@ class StraightLineSurface;
 
         void setPropagator(const IExtrapolator* );
 
-        const TrackParameters* myExtrapWithMatUpdate(long int TrkID, 
+        const TrackParameters* myExtrapWithMatUpdate(long int TrkID,
                                                      const TrackParameters *inpPer,
                                                      Amg::Vector3D *endPoint,
                                                      const IVKalState& istate) const;
-        const TrackParameters* myExtrapToLine(long int TrkID, 
+        const TrackParameters* myExtrapToLine(long int TrkID,
                                                      const TrackParameters *inpPer,
                                                      Amg::Vector3D * endPoint,
                                                      StraightLineSurface  &lineTarget,
@@ -87,9 +83,9 @@ class StraightLineSurface;
                                                      Amg::Vector3D *endPoint) const;
 
         const Perigee* myxAODFstPntOnTrk(const xAOD::TrackParticle* xprt) const;
-	
+
     private:
-    
+
         const IExtrapolator     *m_extrapolator;       //!< Pointer to Extrapolator AlgTool
         TrkVKalVrtFitter            *m_vkalFitSvc;        //!< Pointer to TrkVKalVrtFitter
 
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx
index 726e3ceb315e72fe36f589a7874e2ac1fe8afa86..1790138ca57c85d5974182edd4c7354453956595 100755
--- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx
@@ -13,7 +13,6 @@
 #include "TrkParticleBase/LinkToTrackParticleBase.h"
 #include "VxVertex/VxTrackAtVertex.h"
 #include "TrkExInterfaces/IExtrapolator.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "GaudiKernel/IChronoStatSvc.h"
 //-------------------------------------------------
 // Other stuff
@@ -23,7 +22,7 @@ namespace Trk{
 
 
 //
-//Constructor-------------------------------------------------------------- 
+//Constructor--------------------------------------------------------------
 TrkVKalVrtFitter:: TrkVKalVrtFitter(const std::string& type,
                                     const std::string& name,
                                     const IInterface* parent):
@@ -53,8 +52,8 @@ TrkVKalVrtFitter:: TrkVKalVrtFitter(const std::string& type,
     declareInterface<IVertexFitter>(this);
     declareInterface<ITrkVKalVrtFitter>(this);
     declareInterface<IVertexCascadeFitter>(this);
-    
-    m_BMAG    = 1.997;      /*constant ATLAS magnetic field if no exact map*/     
+
+    m_BMAG    = 1.997;      /*constant ATLAS magnetic field if no exact map*/
     m_CNVMAG  = 0.29979246;  /* conversion constant for MeV and MM */
 
     m_c_VertexForConstraint.clear();
@@ -87,15 +86,15 @@ TrkVKalVrtFitter:: TrkVKalVrtFitter(const std::string& type,
     declareProperty("useZPointingCnst",       m_useZPointingCnst);
     declareProperty("usePassNearCnst",        m_usePassNear);
     declareProperty("usePassWithTrkErrCnst",  m_usePassWithTrkErr);
-// 
-                               
+//
+
 /*--------------------------------------------------------------------------*/
 /*  New propagator object is created. It's provided to VKalVrtCore.         */
-/*  VKalVrtFitter must set up Core BEFORE any call required propagation!!!  */  
+/*  VKalVrtFitter must set up Core BEFORE any call required propagation!!!  */
 /*  This object is created ONLY if IExtrapolator pointer is provideded.     */
 /*         see VKalExtPropagator.cxx for details                            */
 /*--------------------------------------------------------------------------*/
-    m_fitPropagator = nullptr;       //Pointer to VKalVrtFitter propagator object to supply to VKalVrtCore (specific interface) 
+    m_fitPropagator = nullptr;       //Pointer to VKalVrtFitter propagator object to supply to VKalVrtCore (specific interface)
     m_InDetExtrapolator = nullptr;   //Direct pointer to Athena propagator
 
     m_isAtlasField       = false;   // To allow callback and then field first call only at execute stage
@@ -126,9 +125,9 @@ StatusCode TrkVKalVrtFitter::finalize()
 
 StatusCode TrkVKalVrtFitter::initialize()
 {
-    
+
 // Checking ROBUST algoritms
-    if(m_Robustness<0 || m_Robustness>7 ) m_Robustness=0; 
+    if(m_Robustness<0 || m_Robustness>7 ) m_Robustness=0;
 
 
     if(!m_useFixedField){
@@ -178,8 +177,8 @@ StatusCode TrkVKalVrtFitter::initialize()
        msg(MSG::DEBUG)<< "   ZPointing to other vertex constraint: "<< m_useZPointingCnst <<endmsg;
        msg(MSG::DEBUG)<< "   Comb. particle pass near other vertex:"<< m_usePassNear <<endmsg;
        msg(MSG::DEBUG)<< "   Pass near with comb.particle errors:  "<< m_usePassWithTrkErr <<endmsg;
-       if(m_massForConstraint>0){ 
-         msg(MSG::DEBUG)<< "   Mass constraint M="<< m_massForConstraint <<endmsg; 
+       if(m_massForConstraint>0){
+         msg(MSG::DEBUG)<< "   Mass constraint M="<< m_massForConstraint <<endmsg;
          msg(MSG::DEBUG)<< " with particles M=";
          for(int i=0; i<(int)m_c_MassInputParticles.size(); i++) msg(MSG::DEBUG)<<m_c_MassInputParticles[i]<<", ";
          msg(MSG::DEBUG)<<endmsg; ;
@@ -209,8 +208,8 @@ void TrkVKalVrtFitter::initState (State& state) const
 }
 
 
-void TrkVKalVrtFitter::initState (const EventContext& ctx, State& state) const 
-    
+void TrkVKalVrtFitter::initState (const EventContext& ctx, State& state) const
+
 {
   //----------------------------------------------------------------------
   //  New magnetic field object is created. It's provided to VKalVrtCore.
@@ -405,7 +404,7 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*>
     return tmpVertex;
 }
 
-/** Interface for xAOD::TrackParticle with starting point 
+/** Interface for xAOD::TrackParticle with starting point
  *  Implements the new style (unique_ptr,EventContext)
  * */
 std::unique_ptr<xAOD::Vertex>
@@ -441,7 +440,7 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle
                               Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
     if(sc.isSuccess()) {
        tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
-       dvect fittrkwgt;  
+       dvect fittrkwgt;
        sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
        for(int ii=0; ii<state.m_FitStatus; ii++) {
           ElementLink<xAOD::TrackParticleContainer> TEL;  TEL.setElement( xtpListC[ii] );
@@ -475,7 +474,7 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle
                               Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
     if(sc.isSuccess()) {
        tmpVertex = makeXAODVertex( (int)xtpListN.size(), Vertex, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state );
-       dvect fittrkwgt;  
+       dvect fittrkwgt;
        sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
        for(int ii=0; ii<state.m_FitStatus; ii++) {
           if(ii<(int)xtpListC.size()) {
@@ -535,7 +534,7 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle
                               Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
     if(sc.isSuccess()) {
        tmpVertex = makeXAODVertex( 0, Vertex, ErrorMatrix,Chi2PerTrk, TrkAtVrt, Chi2, state );
-       dvect fittrkwgt;  
+       dvect fittrkwgt;
        sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
        for(int ii=0; ii<state.m_FitStatus; ii++) {
           ElementLink<xAOD::TrackParticleContainer> TEL;  TEL.setElement( xtpListC[ii] );
@@ -580,7 +579,7 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle
                               Vertex, Momentum, Charge, ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2, state, true );
     if(sc.isSuccess()){
        tmpVertex = makeXAODVertex( (int)xtpListN.size(), Vertex, ErrorMatrix,Chi2PerTrk, TrkAtVrt, Chi2, state );
-       dvect fittrkwgt;  
+       dvect fittrkwgt;
        sc=VKalGetTrkWeights(fittrkwgt, state); if(sc.isFailure())fittrkwgt.clear();
        for(int ii=0; ii<state.m_FitStatus; ii++) {
           if(ii<(int)xtpListC.size()) {
@@ -630,7 +629,7 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const  TrackParameters*>
     State state;
     initState (state);
     Amg::Vector3D VertexIni(0.,0.,0.);
-    StatusCode sc=VKalVrtFitFast(perigeeListC, VertexIni, state); 
+    StatusCode sc=VKalVrtFitFast(perigeeListC, VertexIni, state);
     if( sc.isSuccess()) setApproximateVertex(VertexIni.x(),VertexIni.y(),VertexIni.z(),state);
     Amg::Vector3D Vertex;
     TLorentzVector Momentum;
@@ -651,22 +650,22 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const  TrackParameters*>
 
 
 
-/* Filling of 3x3 HepSymMatrix with content of symmetric matrix 
-   in packed form vector<double> (6x6 - 21 elem) 
+/* Filling of 3x3 HepSymMatrix with content of symmetric matrix
+   in packed form vector<double> (6x6 - 21 elem)
             (VxVyVzPxPyPz)                                      */
 
 // Fills 5x5 matrix. Input Matrix is track covariance only.
 void TrkVKalVrtFitter::FillMatrixP(AmgSymMatrix(5)& CovMtx, std::vector<double> & Matrix) const
-{   
+{
     CovMtx.setIdentity();
     if( Matrix.size() < 21) return;
     CovMtx(0,0) =  0;
     CovMtx(1,1) =  0;
     CovMtx(2,2)= Matrix[ 9];
-    CovMtx.fillSymmetric(2,3,Matrix[13]); 
+    CovMtx.fillSymmetric(2,3,Matrix[13]);
     CovMtx(3,3)= Matrix[14];
-    CovMtx.fillSymmetric(2,4,Matrix[18]); 
-    CovMtx.fillSymmetric(3,4,Matrix[19]); 
+    CovMtx.fillSymmetric(2,4,Matrix[18]);
+    CovMtx.fillSymmetric(3,4,Matrix[19]);
     CovMtx(4,4)= Matrix[20];
 }
 
@@ -708,7 +707,7 @@ Amg::MatrixX * TrkVKalVrtFitter::GiveFullMatrix(int NTrk, std::vector<double> &
 
 
 xAOD::Vertex * TrkVKalVrtFitter::makeXAODVertex( int Neutrals,
-        const Amg::Vector3D& Vertex, const std::vector<double> & fitErrorMatrix, 
+        const Amg::Vector3D& Vertex, const std::vector<double> & fitErrorMatrix,
 	const std::vector<double> & Chi2PerTrk,  const std::vector< std::vector<double> >& TrkAtVrt,
                                                  double Chi2,
                                                  const State& state) const
@@ -724,10 +723,10 @@ xAOD::Vertex * TrkVKalVrtFitter::makeXAODVertex( int Neutrals,
     std::vector<VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex();
     tmpVTAV.clear();
     std::vector <double> CovFull;
-    StatusCode sc = VKalGetFullCov( NTrk, CovFull, state); 
+    StatusCode sc = VKalGetFullCov( NTrk, CovFull, state);
     int covarExist=0; if( sc.isSuccess() ) covarExist=1;
 
-    std::vector<float> floatErrMtx; 
+    std::vector<float> floatErrMtx;
     if( m_makeExtendedVertex && covarExist ) {
        floatErrMtx.resize(CovFull.size());
        for(int i=0; i<(int)CovFull.size(); i++) floatErrMtx[i]=CovFull[i];
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py b/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py
index 73381cc599006f2efaa9f3ba95208d305188f42c..45cfd966d7596b352661a27f5505ff3661360daa 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py
+++ b/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py
@@ -50,12 +50,10 @@ def _getHIJetBuildTool(merge_param,
     if not name:
         name = 'TrigAntiKt%dHIJets' % int_merge_param
 
-    EventShapeKey = "HLT_xAOD__HIEventShapeContainer_TrigHIEventShape" #jobproperties.HIGlobalFlags.EventShapeKey() 
-    #EventShapeKey = "HIEventShapeContainer_HIUE" 
-    #EventShapeKey = "TrigHIEventShape" 
+    EventShapeKey = "HLT_xAOD__HIEventShapeContainer_TrigHIEventShape"
     ClusterKey = hicluster_name
 
-    # Plug in directly tools from HIJetTools.py e.g. to avoid PseudoJetGetter which is different at HLT and for other reasons 
+    # Plug in directly tools from HIJetTools.py e.g. to avoid PseudoJetGetter which is different at HLT and for other reasons
     # -------------------------------------------------------------------------------------------------------------------------
 
     #jet filters
@@ -77,14 +75,14 @@ def _getHIJetBuildTool(merge_param,
 #    assoc.AssociationName="HLT_a"+str(int_merge_param)+"HIClDR%dAssoc" % (int(10*DR))
 #    #assoc.AssociationName="GhostTrack"
 #    jtm.add(assoc)
-#    
+#
 #    assoc_name=assoc.AssociationName
 
     #calculate discriminants as moments
     from HIJetRec.HIJetRecConf import HIJetMaxOverMeanTool
     max_over_mean=HIJetMaxOverMeanTool("HLT_a"+str(int_merge_param)+"HIJetMaxOverMean")
     jtm.add(max_over_mean)
-    
+
     #discriminants for jet filtering
     from HIJetRec.HIJetRecConf import HIJetDiscriminatorTool
     discrim=HIJetDiscriminatorTool("HLT_a"+str(int_merge_param)+"HIJetDiscriminator")
@@ -101,7 +99,7 @@ def _getHIJetBuildTool(merge_param,
     mod_tool.EventShapeKey='NULL'
     for n in [2,3,4] : setattr(mod_tool,'DoV%d' % n,False)
     jtm.add(mod_tool)
-    
+
     # subtraction
     from HIJetRec.HIJetRecConf import HIJetCellSubtractorTool
     cell_subtr=HIJetCellSubtractorTool("HLT_a"+str(int_merge_param)+"HIJetSubtractor")
@@ -122,25 +120,23 @@ def _getHIJetBuildTool(merge_param,
     # -------------------------------------------------------------------------------------------------
 
     a2_unsubtracted_name = "TrigAntiKt2HIJets_Unsubtracted_a"+str(int_merge_param)
-    seed_finder = jtm.addJetFinder(a2_unsubtracted_name,  
-                                  "AntiKt", 
-                                  0.2, 
-                                  #gettersin=[_getTriggerHIPseudoJetGetter(hicluster_name)], 
-                                  gettersin=[_getTriggerPseudoJetGetter(cluster_calib)], 
+    seed_finder = jtm.addJetFinder(a2_unsubtracted_name,
+                                  "AntiKt",
+                                  0.2,
+                                  gettersin=[_getTriggerPseudoJetGetter(cluster_calib)],
                                   #modifiersin=[assoc,max_over_mean,jetfil5], # jtm.modifiersMap['HI_Unsubtr'],	# may think about TrigHI_Unsubtracted with just max_over_mean
                                   modifiersin=[max_over_mean,jetfil5], # jtm.modifiersMap['HI_Unsubtr'],	# may think about TrigHI_Unsubtracted with just max_over_mean
                                   #modifiersin=[assoc,max_over_mean,jetfil5,discrim], # jtm.modifiersMap['HI_Unsubtr'],	# may think about TrigHI_Unsubtracted with just max_over_mean
-                                  #consumers=None, ivtxin=None,
-                                  ghostArea=0.0, 
+                                  ghostArea=0.0,
                                   isTrigger=True,
-                                  ptmin = 5000, 
+                                  ptmin = 5000,
                                   ptminFilter= 5000)
 
     seeds0_name = "TrigAntiKt2HIJets_seeds0_a"+str(int_merge_param)
     seeds0=jtm.addJetCopier(seeds0_name,a2_unsubtracted_name,[discrim],isTrigger=True,shallow=False)
     #seeds0 = seed_finder
 
-    
+
 
     #from HIJetRec.HIJetRecConf import HIEventShapeJetIterationHLT
     from TrigHIRec.TrigHIRecConf import TrigHIEventShapeJetIteration
@@ -158,6 +154,8 @@ def _getHIJetBuildTool(merge_param,
     #    jtm.add(cell_subtr)
     #iter0.Subtractor=jtm.HIJetSubtractor
     iter0.Subtractor=cell_subtr
+    from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
+    iter0.EventShapeMapTool=HIEventShapeMapTool()
     jtm.add(iter0)
     jtm.jetrecs += [iter0]
 
@@ -206,11 +204,9 @@ def _getHIJetBuildTool(merge_param,
 
     finder=jtm.addJetFinder(name+"_finder",
                             "AntiKt",
-                            merge_param, 
-                            #gettersin=[_getTriggerHIPseudoJetGetter(hicluster_name)], 
-                            gettersin=[_getTriggerPseudoJetGetter(cluster_calib)], 
+                            merge_param,
+                            gettersin=[_getTriggerPseudoJetGetter(cluster_calib)],
                             modifiersin=[subtr2,calib_tool],
-                            #consumers=None, ivtxin=None,
                             ghostArea=0.0,
                             rndseed=0,
                             isTrigger=True,
@@ -261,7 +257,7 @@ class TrigHLTHIJetRecFromHICluster(TrigHLTJetRecFromCluster):
 
        #TrigHLTJetRecConf.
        TrigHLTJetRecFromCluster.__init__(self, name=name)
- 
+
        hicluster_name = "TrigHIClusterMaker_hijet_ionlcwFS"
 
        doSubtraction = True
@@ -269,7 +265,7 @@ class TrigHLTHIJetRecFromHICluster(TrigHLTJetRecFromCluster):
 
        from  TrigHLTJetRec.TrigHLTJetRecConfig import _getTriggerPseudoJetGetter
 
-       if (doHIClusters) : 
+       if (doHIClusters) :
          #self.pseudoJetGetter = _getTriggerPseudoJetGetter(hicluster_name)
          self.pseudoJetGetter = _getTriggerPseudoJetGetter(cluster_calib)
        else :
@@ -279,14 +275,14 @@ class TrigHLTHIJetRecFromHICluster(TrigHLTJetRecFromCluster):
             hicluster_name = "TrigCaloClusterMaker_topo_ionemFS"
 
        from  TrigHLTJetRec.TrigHLTJetRecConfig import _getPseudoJetSelectorAll		#_getIParticleSelectorAll
-       
+
        #self.iParticleSelector = _getIParticleSelectorAll(
        #    'iParticleSelectorAll')
-       
-       self.iPseudoJetSelector = _getPseudoJetSelectorAll(				
+
+       self.iPseudoJetSelector = _getPseudoJetSelectorAll(
            'iPseudoJetSelectorAll')
 
-       if (doSubtraction) : 
+       if (doSubtraction) :
           jetBuildTool = _getHIJetBuildTool(
              float(int(merge_param))/10.,
              ptmin=ptmin,
@@ -295,7 +291,7 @@ class TrigHLTHIJetRecFromHICluster(TrigHLTJetRecFromCluster):
              hicluster_name=hicluster_name,
              name=name
              )
-          #self.inputTool = inputTool 
+          #self.inputTool = inputTool
           #self.doInputs = False
           self.jetBuildTool = jetBuildTool 
        else :
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.cxx b/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.cxx
index efbc12070a5e20c1abef1c95569f5b76c314ec98..2d0f5bfafe0521bf39df16709fc9d81400b4f8a3 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.cxx
+++ b/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.cxx
@@ -56,17 +56,13 @@ int TrigHIEventShapeJetIteration::execute() const
 
   std::string unaltered_input_event_shape_key = "TrigHIEventShape";
 
-  const HIEventShapeIndex* es_index=HIEventShapeMap::getIndex(unaltered_input_event_shape_key); //m_input_event_shape_key);
+	//Map fully initialized in the beginning
+  const HIEventShapeIndex* es_index=m_eventShapeMapTool->getIndexFromShape( output_shape ); //m_input_event_shape_key);
   if(es_index==nullptr)
   {
-    ATH_MSG(ERROR) << "No HIEventShapeIndex w/ name " << m_input_event_shape_key << endmsg;
+    ATH_MSG_FATAL("TrigHIEventShapeJetIteration:  shape not COMPACT nor TOWER. Corresponding key: " << m_input_event_shape_key );
     return 1;
   }
-  if(!m_isInit)
-  {
-    HIEventShapeMap::getMap()->insert(m_output_event_shape_key,*es_index);
-    m_isInit=true;
-  }
 
   std::set<unsigned int> used_indices;
   std::set<unsigned int> used_eta_bins;
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h b/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h
index 60a7e330eac82821c7c09d6a3e7381ed18dad18b..0d6f3b582c35ead675b5fec0d447dbd914569398 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h
+++ b/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h
@@ -21,6 +21,7 @@ AUTHOR:  martin.spousta@cern.ch
 #include <set>
 #include "JetInterface/IJetExecuteTool.h"
 #include "HIJetRec/IHISubtractorTool.h"
+#include "HIEventUtils/HIEventShapeMapTool.h"
 #include "AsgTools/ToolHandle.h"
 #include "xAODHIEvent/HIEventShapeContainer.h"
 
@@ -41,6 +42,7 @@ public:
 private:
   ToolHandle<IHISubtractorTool> m_subtractor_tool;
   ToolHandle<IHIUEModulatorTool> m_modulator_tool;
+  ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool { this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool"};
 
   /// \brief Name of input cluster container
   std::string m_input_clusters_key;
@@ -69,4 +71,3 @@ private:
 };
 
 #endif
-  
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt
index 8e9152de3d3a71c123f9b4b82319f943ba2e8de2..e565d1558255b6e9adf2aab811dfd5bf93a377f2 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt
@@ -13,7 +13,7 @@ find_package( tdaq-common COMPONENTS MuCalDecode circ_proc )
 atlas_add_library( TrigL2MuonSALib
                    src/*.cxx
                    PUBLIC_HEADERS TrigL2MuonSA
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaMonitoringKernelLib ByteStreamCnvSvcBaseLib CscClusterizationLib GaudiKernel GeoPrimitives Identifier MdtCalibSvcLib MuonCablingData MuonCnvToolInterfacesLib MuonIdHelpersLib MuonPrepRawData MuonRDO MuonRecToolInterfaces MuonTGC_CablingLib RPC_CondCablingLib RegionSelectorLib StoreGateLib TrigInterfacesLib TrigMuonToolInterfaces TrigSteeringEvent TrigT1Interfaces TrigT1RPCRecRoiSvcLib TrigTimeAlgsLib xAODEventInfo xAODTrigMuon xAODTrigger
                    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GSL_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaInterprocess CxxUtils EventInfo GeoModelUtilities MuonCalibEvent MuonReadoutGeometry PathResolver )
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
index 63e6d4c17a0f371566e8a7bcb013206615bdcdb3..ea03a04c4fbf0dd4d7aa57382bf4f2015500ec49 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
@@ -120,7 +120,7 @@ class TrigL2MuonSAMTConfig(MuonSA.MuFastSteering):
 
         self.RpcErrToDebugStream = True
 
-        MuonSA.MuFastSteering.topoRoad = False
+        MuonSA.MuFastSteering.topoRoad = True
         MuonSA.MuFastSteering.dEtasurrRoI = 0.14 # wide enough comparing to L1 RoI in barrel
         MuonSA.MuFastSteering.dPhisurrRoI = 0.14 # wide enough comparing to L1 RoI in barrel
 
@@ -202,7 +202,7 @@ class TrigL2MuonSAConfig(MuonSA.MuFastSteering):
 
         self.RpcErrToDebugStream = True
 
-        MuonSA.MuFastSteering.topoRoad = False
+        MuonSA.MuFastSteering.topoRoad = True
         MuonSA.MuFastSteering.dEtasurrRoI = 0.14
         MuonSA.MuFastSteering.dPhisurrRoI = 0.14
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
index 9b17f0b7a69256b461f0da3bdd4ceb32807d9a35..79fe09ef4faa4c72f632d3a53c2ad6c1dcb7da66 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
@@ -1340,14 +1340,18 @@ bool MuFastSteering::storeMSRoiDescriptor(const TrigRoiDescriptor*
   // store TrigRoiDescriptor
   if (fabs(muonSA->pt()) > ZERO_LIMIT ) {
 
+    // set width of 0.1 so that ID tracking monitoring works
+    const float phiHalfWidth = 0.1;
+    const float etaHalfWidth = 0.1;
+
     TrigRoiDescriptor* MSroiDescriptor = new TrigRoiDescriptor(roids->l1Id(),
                                                                roids->roiId(),
                                                                pattern.etaMap,
-                                                               pattern.etaMap,
-                                                               pattern.etaMap,
-                                                               pattern.phiMS,
+                                                               pattern.etaMap - etaHalfWidth,
+                                                               pattern.etaMap + etaHalfWidth,
                                                                pattern.phiMS,
-                                                               pattern.phiMS);
+                                                               pattern.phiMS - phiHalfWidth,
+                                                               pattern.phiMS + phiHalfWidth);
 
     ATH_MSG_VERBOSE("...TrigRoiDescriptor for MS "
       	    << "pattern.etaMap/pattern.phiMS="
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigSecVtxFinder/ATLAS_CHECK_THREAD_SAFETY
deleted file mode 100644
index 51a8ff02b2bd3df37695b10092d62eb2dbfcfcd0..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/ATLAS_CHECK_THREAD_SAFETY
+++ /dev/null
@@ -1 +0,0 @@
-Trigger/TrigAlgorithms/TrigSecVtxFinder
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigSecVtxFinder/CMakeLists.txt
deleted file mode 100644
index 9857e4598fb64b48169c15e7e6b8030b1e8e6e6a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# Declare the package name:
-atlas_subdir( TrigSecVtxFinder )
-
-# Component(s) in the package:
-atlas_add_component( TrigSecVtxFinder
-                     src/*.cxx
-                     src/components/*.cxx
-                     LINK_LIBRARIES BeamSpotConditionsData CxxUtils GaudiKernel GeoPrimitives TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigSteeringEvent TrigTimeAlgsLib )
-
-# Install files from the package:
-atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/python/TrigSecVtxFinderConfig.py b/Trigger/TrigAlgorithms/TrigSecVtxFinder/python/TrigSecVtxFinderConfig.py
deleted file mode 100644
index 0972d2703875123121f36a506f31d5e3efa9caea..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/python/TrigSecVtxFinderConfig.py
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from TrigSecVtxFinder.TrigSecVtxFinderConf import TrigSecVtxFinder
-
-class L2SecVtxFinder (TrigSecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtxFinder"):
-        super( L2SecVtxFinder, self ).__init__( name )
-        
-        from AthenaCommon.AppMgr import ToolSvc
-        
-        from TrigInDetVxInJetTool.TrigInDetVxInJetToolConf import TrigInDetVxInJetTool        
-        TrigInDetVxInJetTool = TrigInDetVxInJetTool(name             = "TrigInDetVxInJetTool",
-                                                    getNegativeTail  = False, # True for SV0 ; False for SV1
-                                                    )
-        
-        #TrigInDetVxInJetTool.OutputLevel=2
-        
-        ToolSvc += TrigInDetVxInJetTool
-        
-        self.UseBeamSpotFlag   = False
-        self.TrackJetTrkSelExt = False
-        self.UseJetDirection   = 1
-        
-        from TrigSecVtxFinder.TrigSecVtxFinderMonitoring import TrigSecVtxFinderValidationMonitoring, TrigSecVtxFinderOnlineMonitoring
-        validation = TrigSecVtxFinderValidationMonitoring()
-        online     = TrigSecVtxFinderOnlineMonitoring()
-        
-        from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
-        time = TrigTimeHistToolConfig("TimeHistogramForTrigSecVtxFinder")
-        time.TimerHistLimits = [0,10]
-        
-        self.AthenaMonTools = [ time, validation, online ]
-
-
-
-class L2SecVtx (L2SecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtx"):
-        super( L2SecVtx, self ).__init__( name )
-        
-        self.AlgoId = 1
-
-
-
-class L2SecVtx_IDScan (L2SecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtx_IDScan"):
-        super( L2SecVtx_IDScan, self ).__init__( name )
-        
-        self.AlgoId = 2
-
-
-
-class L2SecVtx_JetA (L2SecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtx_JetA"):
-        super( L2SecVtx_JetA, self ).__init__( name )
-        
-        self.AlgoId = 5
-
-
-
-class L2SecVtx_JetB (L2SecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtx_JetB"):
-        super( L2SecVtx_JetB, self ).__init__( name )
-        
-        self.AlgoId = 6
-
-
-
-class L2SecVtx_JetF (L2SecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtx_JetF"):
-        super( L2SecVtx_JetF, self ).__init__( name )
-        
-        self.AlgoId = 8
-
-
-
-class L2SecVtx_JetFR (L2SecVtxFinder):
-    __slots__ = []
-    def __init__(self, name="L2SecVtx_JetFR"):
-        super( L2SecVtx_JetFR, self ).__init__( name )
-       
-        self.AlgoId = 13
-
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/python/TrigSecVtxFinderMonitoring.py b/Trigger/TrigAlgorithms/TrigSecVtxFinder/python/TrigSecVtxFinderMonitoring.py
deleted file mode 100755
index f1dcc0013f15f14cf302064581d39a8116f8815f..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/python/TrigSecVtxFinderMonitoring.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
-
-class TrigSecVtxFinderMonitoring(TrigGenericMonitoringToolConfig):
-    def __init__ (self, name="TrigSecVtxFinderMonitoring"):
-        super(TrigSecVtxFinderMonitoring, self).__init__(name)
-
-        self.Histograms += [ defineHistogram('SecVtx_Num', type='TH1F', title="Number of reconstructed secondary vertices per RoI",
-                                             xbins=2, xmin=0.0, xmax=2.0) ]
-        self.Histograms += [ defineHistogram('SecVtx_Mass', type='TH1F', title="Mass of the reconstructed secondary vertex [MeV]",
-                                             xbins=40, xmin=0.0, xmax=6000.0) ]
-        self.Histograms += [ defineHistogram('SecVtx_TwoTrk', type='TH1F', title="Number of 2-track vertices",
-                                             xbins=15, xmin=0.0, xmax=15.0) ]
-        self.Histograms += [ defineHistogram('SecVtx_NumTrk', type='TH1F', title="Number of tracks associated to the reconstructed secondary vertex",
-                                             xbins=15, xmin=0.0, xmax=15.0) ]
-        self.Histograms += [ defineHistogram('SecVtx_Energy', type='TH1F', title="Energy fraction of the reconstructed secondary vertex E(SecVtx)/E(Jet)",
-                                             xbins=25, xmin=0.0, xmax=1.0) ]
-        self.Histograms += [ defineHistogram('SecVtx_DecayLength', type='TH1F', title="Decay length of the reconstructed secondary vertex [mm]",
-                                             xbins=25, xmin=0.0, xmax=25.0) ]
-        self.Histograms += [ defineHistogram('SecVtx_DecayLengthSig', type='TH1F', title="Decay length significance of the reconstructed secondary vertex",
-                                             xbins=25, xmin=0.0, xmax=25.0) ]        
-
-
-class TrigSecVtxFinderValidationMonitoring(TrigSecVtxFinderMonitoring):
-    def __init__ (self, name="TrigSecVtxFinderValidationMonitoring"):
-        super(TrigSecVtxFinderValidationMonitoring, self).__init__(name)
-
-        self.defineTarget("Validation")
-
-
-class TrigSecVtxFinderOnlineMonitoring(TrigSecVtxFinderMonitoring):
-    def __init__ (self, name="TrigSecVtxFinderOnlineMonitoring"):
-        super(TrigSecVtxFinderOnlineMonitoring, self).__init__(name)
-
-        self.defineTarget("Online")
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/TrigSecVtxFinder.cxx b/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/TrigSecVtxFinder.cxx
deleted file mode 100644
index 901f2869229d91c2f3e364d88d841fcb0bbf4d36..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/TrigSecVtxFinder.cxx
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "TrigSecVtxFinder.h"
-#include "GaudiKernel/MsgStream.h"
-
-#include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "TrigTimeAlgs/TrigTimerSvc.h"
-#include "TrigInDetEvent/TrigVertexCollection.h"
-#include "TrigInDetEvent/TrigInDetTrackCollection.h"
-
-#include "GeoPrimitives/GeoPrimitives.h"
-
-#include <sstream>
-
-ATLAS_NO_CHECK_FILE_THREAD_SAFETY;  // legacy trigger code
-
-TrigSecVtxFinder::TrigSecVtxFinder(const std::string &name, ISvcLocator *pSvcLocator):
-  HLT::FexAlgo(name, pSvcLocator),
-  m_algo(6),
-  m_useBeamSpotFlag(false),
-  m_trackJetTrkSelExt(false),
-  m_secVtx_num(0),
-  m_secVtx_numTrk(0),
-  m_secVtx_twoTrk(0),
-  m_secVtx_mass(0),
-  m_secVtx_energy(0),
-  m_secVtx_dl(0),
-  m_secVtx_dls(0),
-  m_trackJetFinderTool("TrigTrackJetFinderTool",this),
-  m_secvtxFinderTool("TrigInDetVxInJetTool",this)
-{
-  declareProperty ("AlgoId",             m_algo,              "Which track reconstruction algo at L2 to use");
-  declareProperty ("SecVtxTool",         m_secvtxFinderTool);
-  declareProperty ("UseBeamSpotFlag",    m_useBeamSpotFlag   = false);
-  declareProperty ("TrackJetTrkSelExt",  m_trackJetTrkSelExt = false);
-  declareProperty ("UseJetDirection",    m_useJetDirection);
-
-  declareMonitoredVariable("SecVtx_Num",            m_secVtx_num,    AutoClear);
-  declareMonitoredVariable("SecVtx_NumTrk",         m_secVtx_numTrk, AutoClear);
-  declareMonitoredVariable("SecVtx_TwoTrk",         m_secVtx_twoTrk, AutoClear);
-  declareMonitoredVariable("SecVtx_Mass",           m_secVtx_mass,   AutoClear);
-  declareMonitoredVariable("SecVtx_Energy",         m_secVtx_energy, AutoClear);
-  declareMonitoredVariable("SecVtx_DecayLength",    m_secVtx_dl,     AutoClear);
-  declareMonitoredVariable("SecVtx_DecayLengthSig", m_secVtx_dls,    AutoClear);
-}
-  
-TrigSecVtxFinder::~TrigSecVtxFinder() {
-}
-
-HLT::ErrorCode TrigSecVtxFinder::hltInitialize() {
-
-  ATH_MSG_INFO( "TrigSecVtxFinder::initialize()"  );
-
-  //* Retrieve TrigTrackJetFinder tool *//
-  StatusCode sc = m_trackJetFinderTool.retrieve();
-  if(sc.isFailure()) {
-    ATH_MSG_FATAL( "Failed to locate tool " << m_trackJetFinderTool  );
-    return HLT::BAD_JOB_SETUP;
-  } else
-    ATH_MSG_INFO( "Retrieved tool " << m_trackJetFinderTool  );
-
-  sc = m_secvtxFinderTool.retrieve();
-  if ( sc.isFailure() ){
-    ATH_MSG_FATAL( "Unable to retrieve TrigInDetVxInJetTool " << m_secvtxFinderTool  );
-    return HLT::BAD_JOB_SETUP;
-  }
-  else
-    ATH_MSG_INFO( "Retrieved tool " << m_secvtxFinderTool  );
-
-  if(m_beamSpotKey.initialize().isFailure()) return HLT::BAD_JOB_SETUP;
-
-  //* declareProperty overview *//
-  if (msgLvl() <= MSG::DEBUG) {
-    ATH_MSG_DEBUG( "declareProperty review:"  );
-    ATH_MSG_DEBUG( " AlgoId = "              << m_algo  );
-    ATH_MSG_DEBUG( " UseBeamSpotFlag = "     << m_useBeamSpotFlag  );
-    ATH_MSG_DEBUG( " TrackJetTrkSelExt = "   << m_trackJetTrkSelExt  );
-    ATH_MSG_DEBUG( " UseJetDirection = "     << m_useJetDirection  );
-  }
-
-  return HLT::OK;
-}
-
-HLT::ErrorCode TrigSecVtxFinder::hltExecute(const HLT::TriggerElement* inputTE, HLT::TriggerElement* outputTE) {
-
-  // ====== get RoI descriptor =========
-  const TrigRoiDescriptor* roiDescriptor = 0;
-  if ((getFeature(inputTE, roiDescriptor) == HLT::OK) && roiDescriptor) {
-    ATH_MSG_DEBUG( "Using inputTE: " 
-                   << "RoI id " << roiDescriptor->roiId()
-                   << ", Phi = " <<  roiDescriptor->phi()
-                   << ", Eta = " << roiDescriptor->eta()  );
-  } else {
-    ATH_MSG_DEBUG( "No RoI for this Trigger Element"  );
-    
-    return HLT::NAV_ERROR;
-  }
-
-  // ====== get the necessary ingredients =========
-  HLT::ErrorCode sc;
-  Trk::RecVertex prmVtx;
-  if ((sc = getPrmVtxForFit(prmVtx,outputTE)) != HLT::OK) {
-
-    ATH_MSG_DEBUG( "REGTEST:  RoI " << roiDescriptor->roiId() << ", Phi = "   << roiDescriptor->phi() << ", Eta = "   << roiDescriptor->eta()  );
-    ATH_MSG_DEBUG( "REGTEST:  No Secondary vertex reconstructed (primary vertex not available)"  );
-
-    return sc;
-  }
-
-  if(prmVtx.fitQuality().chiSquared() == -9) {
-
-    ATH_MSG_DEBUG( "REGTEST:  RoI " << roiDescriptor->roiId() << ", Phi = "   << roiDescriptor->phi() << ", Eta = "   << roiDescriptor->eta()  );
-    ATH_MSG_DEBUG( "REGTEST:  No Secondary vertex reconstructed (default primary vertex: -200 +/- -200)"  );
-
-    return HLT::OK;
-  }
-
-  if(prmVtx.fitQuality().chiSquared() == -99) {
-
-    ATH_MSG_DEBUG( "REGTEST:  RoI " << roiDescriptor->roiId() << ", Phi = "   << roiDescriptor->phi() << ", Eta = "   << roiDescriptor->eta()  );
-    ATH_MSG_DEBUG( "REGTEST:  No Secondary vertex reconstructed (beam spot status not meeting requirement)"  );
-
-    return HLT::OK;
-  }
-
-  std::vector<const TrigInDetTrack*> tracks;
-  if ((sc = getSelectedTracks(tracks,outputTE)) != HLT::OK) return sc;
-  if (tracks.size() < 2) {
-
-    ATH_MSG_DEBUG( "REGTEST:  RoI " << roiDescriptor->roiId() << ", Phi = "   << roiDescriptor->phi() << ", Eta = "   << roiDescriptor->eta()  );
-    ATH_MSG_DEBUG( "REGTEST:  No Secondary vertex reconstructed (less than 2 tracks)"  );
-
-    return HLT::OK;
-  }
-
-  CLHEP::HepLorentzVector jetDirection;
-  if ((sc = getJetDirection(jetDirection, tracks, prmVtx.position().z(), inputTE)) != HLT::OK) return sc;
-
-  // ====== turn the crank of the algorithm ==========
-  const TrigVertex* secVertex =  m_secvtxFinderTool->findSecVertex(prmVtx,jetDirection,tracks);
- 
-
-  // ====== store the result ==========
-  ATH_MSG_DEBUG( "REGTEST:  RoI " << roiDescriptor->roiId() << ", Phi = " << roiDescriptor->phi() << ", Eta = " << roiDescriptor->eta()  );
-
-  if (!secVertex) {
-    
-    ATH_MSG_DEBUG( "REGTEST:  No sec vtx reconstructed (not found by tool)"  );
-    
-    return HLT::OK;
-
-  } else {
-
-    ATH_MSG_DEBUG( "REGTEST:  Sec vtx reconstructed: mass: " << secVertex->mass() 
-                   << " dl/sigma(dl): " << secVertex->decayLengthSignificance()  );
-    
-    TrackInVertexList* trackInVtx = secVertex->tracks();
-
-    m_secVtx_num++;
-    m_secVtx_mass   = secVertex->mass();
-    m_secVtx_twoTrk = secVertex->nTwoTracksSecVtx();
-    m_secVtx_numTrk = trackInVtx->size();
-    m_secVtx_energy = secVertex->energyFraction();
-    m_secVtx_dl     = secVertex->decayLength();
-    m_secVtx_dls    = secVertex->decayLengthSignificance();
-
-  }
-
-  TrigVertexCollection* secVrtContainer = new TrigVertexCollection(); 
-  secVrtContainer->push_back(const_cast<TrigVertex*>(secVertex));
-
-  if ((sc = attachFeature(outputTE, secVrtContainer, "secVrt")) != HLT::OK)
-  {
-    ATH_MSG_DEBUG( "Cannot attach feature to TE!"  );
-    return sc;
-  }
-  
-  
-  return HLT::OK;
-}
-
-HLT::ErrorCode TrigSecVtxFinder::hltFinalize() {
-
-  ATH_MSG_INFO( "TrigSecVtxFinder::finalize()"  );
-  return HLT::OK;
-}
-
-HLT::ErrorCode TrigSecVtxFinder::getPrmVtxForFit(Trk::RecVertex& vertex,
-                                                 const HLT::TriggerElement* outputTE) {
-  float x, y, z, exx, exy, exz, eyy, eyz, ezz;
-  exy = eyz = exz = 0; // cross-correlation 0 for now
-
-  //* Retrieve primary vertex information *//
-  std::vector<const TrigVertexCollection*> vectorOfL2PrmVtxCollections;
-  const TrigVertexCollection* prmVtxColl = NULL;
-  if (getFeatures(outputTE, vectorOfL2PrmVtxCollections, "") != HLT::OK) {
-    ATH_MSG_ERROR( "Failed to get TrigVertexCollection from the trigger element"  );
-    return HLT::NAV_ERROR;
-  }
-
-  for (int i = 0; i < (int) vectorOfL2PrmVtxCollections.size(); i++)
-  {
-    if (!vectorOfL2PrmVtxCollections[i] || vectorOfL2PrmVtxCollections[i]->size() == 0)
-      continue;
-    if (((m_algo == 1 || m_algo == 6) && vectorOfL2PrmVtxCollections[i]->front()->algorithmId() == 3) || 
-        ((m_algo == 2 || m_algo == 5) && vectorOfL2PrmVtxCollections[i]->front()->algorithmId() == 10) ||
-        ((m_algo == 8) && vectorOfL2PrmVtxCollections[i]->front()->algorithmId() == 19) ||
-	((m_algo == 13) && vectorOfL2PrmVtxCollections[i]->front()->algorithmId() == 23) ) {
-      prmVtxColl = vectorOfL2PrmVtxCollections[i];
-      ATH_MSG_DEBUG( "Retrieved prm vertex collection with algo_id " << prmVtxColl->front()->algorithmId()  );
-      break;
-    }
-  }
-  if (!prmVtxColl || prmVtxColl->size() == 0)
-  {
-    ATH_MSG_ERROR( "Failed to get TrigVertexCollection from the trigger element"  );
-    return HLT::MISSING_FEATURE;
-  }
-  
-  z = prmVtxColl->at(0)->z();
-  ezz = prmVtxColl->at(0)->cov()[5];
-
-  if ( z ==-200 && ezz==-200 ) {
-    vertex = Trk::RecVertex(Amg::Vector3D(0.,0.,0.),0,-9);
-    return HLT::OK;
-  }
-
-  //* Retrieve beamspot information *//
-  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-
-  if (!beamSpotHandle.isValid()) {
-    ATH_MSG_WARNING( "Could not retrieve Beam Conditions Service. "  );
-    return HLT::ERROR;
-  }
-
-  const Amg::Vector3D &beamSpot = beamSpotHandle->beamPos();
-
-  int beamSpotBitMap = beamSpotHandle->beamStatus();
-
-  //* Check if beam spot is from online algorithms *//
-  int beamSpotStatus = ((beamSpotBitMap & 0x4) == 0x4);
-  
-  //* Check if beam spot fit converged *//
-  if (beamSpotStatus)
-    beamSpotStatus = ((beamSpotBitMap & 0x3) == 0x3);
-
-  ATH_MSG_DEBUG( "Beam spot from service: x=" << beamSpot.x() << ", y=" << beamSpot.y() << ", z=" << beamSpot.z() 
-                 << ", tiltXZ=" << beamSpotHandle->beamTilt(0) << ", tiltYZ=" << beamSpotHandle->beamTilt(1) 
-                 << ", sigmaX=" << beamSpotHandle->beamSigma(0) << ", sigmaY=" << beamSpotHandle->beamSigma(1) << ", sigmaZ=" << beamSpotHandle->beamSigma(2) 
-                 << ", status=" << beamSpotStatus  );
-
-  if (m_useBeamSpotFlag && !beamSpotStatus) {
-    ATH_MSG_DEBUG( "Beam spot status not meeting requirement."  );
-    vertex = Trk::RecVertex(Amg::Vector3D(0.,0.,0.),0,-99);
-    return HLT::OK;
-  }
-
-  x = beamSpot.x();
-  y = beamSpot.y();
-
-  //* Apply beam spot correction for tilt *//
-  x = x + tan(beamSpotHandle->beamTilt(0)) * (z - beamSpot.z());
-  y = y + tan(beamSpotHandle->beamTilt(1)) * (z - beamSpot.z());
-
-  exx = beamSpotHandle->beamSigma(0);
-  eyy = beamSpotHandle->beamSigma(1);
-
-  AmgSymMatrix(3) err;  
-  err(1,1) = exx;
-  err(2,2) = eyy;
-  err(3,3) = ezz;
-  err(1,2) = err(2,1) = exy; 
-  err(1,3) = err(3,1) = exz;
-  err(2,3) = err(3,2) = eyz;
-
-  AmgSymMatrix(3) cov = err;
-  vertex = Trk::RecVertex(Amg::Vector3D(x,y,z), cov,
-			  prmVtxColl->at(0)->ndof(), prmVtxColl->at(0)->chi2());
-  return HLT::OK;
-}
-
-HLT::ErrorCode TrigSecVtxFinder::getSelectedTracks(std::vector<const TrigInDetTrack*>& tracks,
-                                                   const HLT::TriggerElement* outputTE) {
-  tracks.clear();
-  std::vector<const TrigInDetTrackCollection*> vectorOfL2TrackCollections;
-  
-  if (getFeatures(outputTE, vectorOfL2TrackCollections, "") != HLT::OK) {
-    ATH_MSG_ERROR( "Failed to get InDetTrackCollection from the trigger element"  );
-  } else
-    ATH_MSG_DEBUG( "Got " << vectorOfL2TrackCollections.size() << " InDetTrackCollection"  );
-
-  std::vector<const TrigInDetTrackCollection*>::iterator trackCollection    = vectorOfL2TrackCollections.begin();
-  std::vector<const TrigInDetTrackCollection*>::iterator lastTrackColl = vectorOfL2TrackCollections.end();
-
-  for ( ; trackCollection != lastTrackColl; trackCollection++) { 
-    if ((*trackCollection)->size() != 0) {
-      if ((*trackCollection)->front()->algorithmId() == m_algo) {
-        if (m_algo == 1) 
-          ATH_MSG_DEBUG( "Selected collection with SiTrack label"  );
-        else if (m_algo == 2) 
-          ATH_MSG_DEBUG( "Selected collection with IdScan label"  );
-	else if (m_algo == 5) 
-	  ATH_MSG_DEBUG( "Selected collection with L2Star label (strategy A)"  );
-	else if (m_algo == 6)
-	  ATH_MSG_DEBUG( "Selected collection with L2Star label (strategy B)"  );
-	else if (m_algo == 8)
-	  ATH_MSG_DEBUG( "Selected collection with L2Star label (strategy F)"  );
-        break;
-      }
-    }
-  } 
-  
-  if (trackCollection == lastTrackColl)
-  {
-    ATH_MSG_DEBUG( "No track collection found or colletion empty"  );
-    return HLT::OK; 
-  }
-  
-  for (int i = 0; i < (int) (*trackCollection)->size(); i++)
-    tracks.push_back((*trackCollection)->at(i));
-
-  // TODO do track selection before calling trackJetFinder?
-  ATH_MSG_DEBUG( "Selected " << tracks.size() << " tracks."  );
-
-  return HLT::OK;
-}
-
-HLT::ErrorCode TrigSecVtxFinder::getJetDirection(CLHEP::HepLorentzVector& jetDirection,
-                                                 std::vector<const TrigInDetTrack*>& tracks,
-                                                 float prmVtx_z,
-                                                 const HLT::TriggerElement* inputTE) {
-
-  float etaRoI=0,    phiRoI=0;
-  float etaJet=0,    phiJet=0;
-  float etaTrkJet=0, phiTrkJet=0;
-
-  //* Get the updated RoI descriptor *//
-  const TrigRoiDescriptor* roiDescriptor = 0;
-  if ((getFeature(inputTE, roiDescriptor) == HLT::OK) && roiDescriptor) {
-    ATH_MSG_DEBUG( "Using inputTE: " << "RoI id " << roiDescriptor->roiId()
-                   << ", Phi = " <<  roiDescriptor->phi() << ", Eta = " << roiDescriptor->eta()  );
-
-    etaJet=roiDescriptor->eta();
-    phiJet=roiDescriptor->phi();
-
-  } else {
-    ATH_MSG_DEBUG( "No RoI for this Trigger Element"  );
-
-    return HLT::NAV_ERROR;
-  }
-
-  //* Get the initial RoI descriptor *//
-  const TrigRoiDescriptor* initialRoI = 0;
-  if (getFeature(inputTE,  initialRoI, "initialRoI") == HLT::OK) {
-    if (initialRoI) {
-      ATH_MSG_DEBUG( "Using initialRoI: " << "RoI id " << initialRoI->roiId()
-                     << ", Phi = " <<  initialRoI->phi() << ", Eta = " << initialRoI->eta()  );
-    } else {
-      initialRoI=roiDescriptor; // L1.5 Jets...
-    }
-
-    etaRoI=initialRoI->eta();
-    phiRoI=initialRoI->phi();
-
-  } else {
-    ATH_MSG_DEBUG( "No RoI for this Trigger Element"  );
-    
-    return HLT::NAV_ERROR;
-  }
-
-  m_trackJetFinderTool->clear();
-  m_trackJetFinderTool->inputPrimaryVertexZ(prmVtx_z);
-
-  ATH_MSG_DEBUG( "getJetDirection() using Ext track sel = " << m_trackJetTrkSelExt  );
-  if(m_trackJetTrkSelExt) m_trackJetFinderTool->setExtTrackSel(true);
-
-  for (unsigned int i = 0; i < (unsigned int) tracks.size(); i++) {
-    const TrigInDetTrack* trk = tracks[i];
-    m_trackJetFinderTool->addTrack(trk,i);
-  }
-
-  std::vector<int> tracksTrackJet;
-
-  m_trackJetFinderTool->findJet(tracksTrackJet, etaTrkJet, phiTrkJet);
-
-  if (etaTrkJet == -99 || phiTrkJet == -99) {
-    etaTrkJet = etaRoI;
-    phiTrkJet = phiRoI;
-  }
-  
-  ATH_MSG_DEBUG( "eta RoI " << etaRoI << " phiRoI " << phiRoI 
-                 << "; eta TrkJet " << etaTrkJet << " phi TrkJet " << phiTrkJet 
-                 << "; eta Jet " << etaJet << " phi Jet " << phiJet  );
-
-  if (m_useJetDirection == 1) {
-
-    ATH_MSG_DEBUG( "Using the LVL2 jet direction as input"  );
-
-    jetDirection.setX(cos(phiJet));
-    jetDirection.setY(sin(phiJet));
-    jetDirection.setZ(sinh(etaJet));
-
-  } else if (m_useJetDirection == 2) {
-
-    ATH_MSG_DEBUG( "Using the LVL2 track-jet direction as input"  );
-
-    jetDirection.setX(cos(phiTrkJet));
-    jetDirection.setY(sin(phiTrkJet));
-    jetDirection.setZ(sinh(etaTrkJet));
-
-  } else if (m_useJetDirection == 3) {
-
-    ATH_MSG_DEBUG( "Using the LVL1 RoI jet direction as input"  );
-
-    jetDirection.setX(cos(phiRoI));
-    jetDirection.setY(sin(phiRoI));
-    jetDirection.setZ(sinh(etaRoI));
-
-  }
-
-  return HLT::OK;
-}
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/TrigSecVtxFinder.h b/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/TrigSecVtxFinder.h
deleted file mode 100644
index 690818ce0da6a1b2fda6872521a74ff51b06e836..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/TrigSecVtxFinder.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ************************************************
-//
-// NAME:     TrigSecVtxFinder.h
-// PACKAGE:  Trigger/TrigAlgorithms/TrigSecVtxFinder
-//
-// AUTHOR:   Xinlu Huang
-// EMAIL:    xinlu.huang@cern.ch
-// 
-// ************************************************
-
-#ifndef TRIGSECVTXFINDER_H
-#define TRIGSECVTXFINDER_H
-
-#include "GaudiKernel/ToolHandle.h"
-#include "TrigTimeAlgs/TrigTimer.h"
-#include "TrigInterfaces/FexAlgo.h"
-
-#include "TrigInDetToolInterfaces/ITrigTrackJetFinderTool.h"
-#include "TrigInDetToolInterfaces/ITrigInDetVxInJetTool.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
-
-#include "CxxUtils/checker_macros.h"
-ATLAS_NO_CHECK_FILE_THREAD_SAFETY;  // legacy trigger code
-
-namespace CLHEP {
-  class HepLorentzVector;
-}
-
-
-class ISecVertexInJetFinder;
-
-class TrigSecVtxFinder: public HLT::FexAlgo {
-
-public:
-  TrigSecVtxFinder(const std::string& name, ISvcLocator* pSvcLocator);
-  virtual ~TrigSecVtxFinder();
-  HLT::ErrorCode hltInitialize();
-  HLT::ErrorCode hltExecute(const HLT::TriggerElement*, HLT::TriggerElement* outputTE);    
-  HLT::ErrorCode hltFinalize();
-
-private:
-
-  int  m_algo;
-  bool m_useBeamSpotFlag;
-  bool m_trackJetTrkSelExt;
-  unsigned int m_useJetDirection;
-
-  unsigned int m_secVtx_num;
-  unsigned int m_secVtx_numTrk;
-  unsigned int m_secVtx_twoTrk;
-  float m_secVtx_mass;
-  float m_secVtx_energy;
-  float m_secVtx_dl;
-  float m_secVtx_dls;
-
-  /** @brief TrigTrackJetFinder tool. */
-  ToolHandle<ITrigTrackJetFinderTool> m_trackJetFinderTool;
-  /** @brief SV algo tool. */
-  ToolHandle<ITrigInDetVxInJetTool> m_secvtxFinderTool;
-
-  HLT::ErrorCode getPrmVtxForFit(Trk::RecVertex&, const HLT::TriggerElement*);
-  HLT::ErrorCode getSelectedTracks(std::vector<const TrigInDetTrack*>&, const HLT::TriggerElement*);
-  HLT::ErrorCode getJetDirection(CLHEP::HepLorentzVector&, std::vector<const TrigInDetTrack*>&, float, const HLT::TriggerElement*);
-  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-
-};
-
-#endif
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/components/TrigSecVtxFinder_entries.cxx b/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/components/TrigSecVtxFinder_entries.cxx
deleted file mode 100644
index 5784170c6fb3dd9ab49b46c131893006e77b48e9..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/src/components/TrigSecVtxFinder_entries.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../TrigSecVtxFinder.h"
-
-DECLARE_COMPONENT( TrigSecVtxFinder )
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt
index 38fcdcf5050143c9182c205a283cc750f337bcb1..ef96d698a84f0e848c053d5aea466699845be281 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt
@@ -5,6 +5,7 @@ atlas_subdir( TrigT2CaloCommon )
 
 # External dependencies:
 find_package( tdaq-common )
+find_package( TBB )
 
 # Component(s) in the package:
 atlas_add_library( TrigT2CaloCommonLib
@@ -37,3 +38,6 @@ endfunction( _add_test )
 
 _add_test( TestService test/test_dataaccess.sh )
 _add_test( TestServiceNewJO test/test_dataaccessNewJO.sh )
+_add_test( caloCf test/test_t2calo_cf_build.sh )
+_add_test( caloOnly  test/test_t2calo_only_build.sh )
+_add_test( caloRinger test/test_t2calo_ringer_only_build.sh )
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
index 7392343118990e3d85a0361c22e527cd55b25e6d..75586fc0e253c84802aac1629392540ff8649b0c 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
@@ -48,7 +48,7 @@ def _algoHLTTopoClusterLC(inputEDM="CellsClusters", OutputLevel=ERROR, algSuffix
    algo.OutputLevel=OutputLevel
    return algo
 
-def _algoL2Egamma(inputEDM="",OutputLevel=ERROR,doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_FastCaloRinger"):
+def _algoL2Egamma(inputEDM="",OutputLevel=ERROR,doRinger=False, ClustersName="HLT_FastCaloEMClusters", RingerKey="HLT_FastCaloRinger"):
     if not inputEDM:
         from L1Decoder.L1DecoderConfig import mapThresholdToL1RoICollection
         inputEDM = mapThresholdToL1RoICollection("EM")
@@ -57,7 +57,7 @@ def _algoL2Egamma(inputEDM="",OutputLevel=ERROR,doRinger=False, ClustersName="HL
     algo=T2CaloEgamma_ReFastAlgo("FastCaloL2EgammaAlg", doRinger=doRinger, RingerKey=RingerKey)
     algo.RoIs=inputEDM
     from TrigEDMConfig.TriggerEDMRun3 import recordable
-    algo.ClustersName=recordable("HLT_L2CaloEMClusters")
+    algo.ClustersName=recordable("HLT_FastCaloEMClusters")
     algo.OutputLevel=OutputLevel
     return algo
 
@@ -66,7 +66,7 @@ def _algoL2Egamma(inputEDM="",OutputLevel=ERROR,doRinger=False, ClustersName="HL
 ##### SEQUENCES
 ####################################
 
-def fastCaloRecoSequence(InViewRoIs, doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_FastCaloRinger"):
+def fastCaloRecoSequence(InViewRoIs, doRinger=False, ClustersName="HLT_FastCaloEMClusters", RingerKey="HLT_FastCaloRinger"):
     fastCaloAlg = _algoL2Egamma(inputEDM=InViewRoIs, doRinger=doRinger, ClustersName=ClustersName, RingerKey=RingerKey)
 
     import AthenaCommon.CfgMgr as CfgMgr
@@ -74,12 +74,6 @@ def fastCaloRecoSequence(InViewRoIs, doRinger=False, ClustersName="HLT_L2CaloEMC
     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)
@@ -97,7 +91,7 @@ def fastCaloEVCreator():
     return (fastCaloViewsMaker, InViewRoIs)
 
 
-def createFastCaloSequence(EMRoIDecisions, doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_FastCaloRinger"):
+def createFastCaloSequence(EMRoIDecisions, doRinger=False, ClustersName="HLT_FastCaloEMClusters", RingerKey="HLT_FastCaloRinger"):
     """Used for standalone testing"""
     (fastCaloViewsMaker, InViewRoIs) = fastCaloEVCreator()
     # connect to RoIs
@@ -151,8 +145,6 @@ def HLTRoITopoRecoSequence(RoIs):
     from AthenaCommon.AlgSequence import AlgSequence
     topSequence = AlgSequence()
     topSequence.SGInputLoader.Load += [( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' )]
-    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
-      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
 
     cellMaker = HLTCellMaker(RoIs, algSuffix="RoI")
     topoClusterMaker = _algoHLTTopoCluster(inputEDM = cellMaker.CellsName, algSuffix="RoI")
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/Calo.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/Calo.py
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/Calo.py
rename to Trigger/TrigAlgorithms/TrigT2CaloCommon/share/Calo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloRinger.py
similarity index 98%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
rename to Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloRinger.py
index 61da85864e13d4b2d26b4a22eea1dc1dccf7ddf3..0c2dce2a06553aecd5183d7a174c20084c777e3a 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloRinger.py
@@ -50,7 +50,7 @@ if TriggerFlags.doCalo:
      filterL1RoIsAlg.Output = ["HLTNav_FilteredEMRoIDecisions"]
      filterL1RoIsAlg.Chains = [ "HLT_EMTestChain" ]
      (fastCaloSequence, sequenceOut) = createFastCaloSequence(filterL1RoIsAlg.Output[0], doRinger=True,
-                                                              ClustersName="HLT_L2CaloEMClusters",
+                                                              ClustersName="HLT_FastCaloEMClusters",
                                                               RingerKey="HLT_FastCaloRinger")
      steps+=stepSeq("finalCaloSequence", filterL1RoIsAlg, [ fastCaloSequence ])
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_cf_build.sh b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_cf_build.sh
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_cf_build.sh
rename to Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_cf_build.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_only_build.sh
similarity index 92%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh
rename to Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_only_build.sh
index ff59ca560c7d486a1f342b98bd2f4902c7042255..7ab73ae454100ac33f7d6ca1e861c557e74d710f 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_only_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/Calo.py"
+export JOBOPTION="TrigT2CaloCommon/Calo.py"
 
 # Skip dumping chain counts because this test doesn't produce the histogram including them
 export SKIP_CHAIN_DUMP=1
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_ringer_only_build.sh
similarity index 90%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh
rename to Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_ringer_only_build.sh
index 48035fac8b11424c737adfd96d78a311241d9d63..1de726f2d480b1e0fb965ac05fae709753098312 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_t2calo_ringer_only_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/CaloRinger.py"
+export JOBOPTION="TrigT2CaloCommon/CaloRinger.py"
 
 # Skip dumping chain counts because this test doesn't produce the histogram including them
 export SKIP_CHAIN_DUMP=1
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
index 698e51705c0a5512c521caf16c0619515f98ee70..f1cd3641d6278e7f5bfc1c7788dba2d852b1c078 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
@@ -404,7 +404,7 @@ class T2CaloEgamma_Ringer (T2CaloEgamma_eGamma):
 
 class T2CaloEgamma_ReFastAlgo (CompFactory.T2CaloEgammaReFastAlgo):
     __slots__ = []
-    def __init__ (self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_L2CaloEMClusters", doRinger=False, RingerKey="HLT_FastCaloRinger"):
+    def __init__ (self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_FastCaloEMClusters", doRinger=False, RingerKey="HLT_FastCaloRinger"):
         super(T2CaloEgamma_ReFastAlgo, self).__init__(name)
         # here put your customizations
         from AthenaCommon.AppMgr import ServiceMgr as svcMgr
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
index d0251cde511cb9fbe9b630715f74995a3410ef8a..64ed98ff296c8b0e15c29e184b17a35f5157b93a 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
@@ -39,7 +39,7 @@ def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False):
 
     alg = CompFactory.T2CaloEgammaReFastAlgo("FastEMCaloAlgo")
     from TrigEDMConfig.TriggerEDMRun3 import recordable
-    alg.ClustersName   = recordable('HLT_L2CaloEMClusters')
+    alg.ClustersName   = recordable('HLT_FastCaloEMClusters')
     alg.RoIs           = roisKey
     alg.EtaWidth       = 0.2
     alg.PhiWidth       = 0.2
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
index 73437391b484062d1bb2fddf7c1f0b684af10a64..12bebf656547b565e9dfe51f2fe66da32e107b95 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
@@ -92,7 +92,7 @@ class RingerReFex : public IReAlgToolCalo
 
     ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool"};
     SG::WriteHandleKey<xAOD::TrigRingerRingsContainer> m_ringerContainerKey {this, "RingerKey", "HLT_FastCaloRinger", "TrigRingerRings container key"};
-    SG::ReadHandleKey<xAOD::TrigEMClusterContainer>    m_clusterContainerKey {this, "ClustersName", "HLT_L2CaloEMClusters", "TrigEMCluster container key"};
+    SG::ReadHandleKey<xAOD::TrigEMClusterContainer>    m_clusterContainerKey {this, "ClustersName", "HLT_FastCaloEMClusters", "TrigEMCluster container key"};
     Gaudi::Property<std::vector<float>>  m_etaBins  {this, "EtaBins", {}, "Eta bins range cover by the ringer reconstruction."};
     Gaudi::Property<bool>  m_global_center  {this, "GlobalCenter", false,  ""};
     Gaudi::Property<bool>  m_useHad  {this, "UseHad", true,  ""};
diff --git a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
index 6f55f80e44dafb32541a3d2fe0cd4e750f4b783c..922cf02c12d7d36a100be257455521b84f95a268 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
@@ -159,13 +159,13 @@ StatusCode TrigTauRecMergedMT::execute(const EventContext& ctx) const
   // Get RoiDescriptor
   SG::ReadHandle< TrigRoiDescriptorCollection > roisHandle = SG::makeHandle( m_roIInputKey, ctx );
   if ( not roisHandle.isValid() ) {
-    calo_errors.push_back(NoROIDescr);
-    return StatusCode::SUCCESS;
+    ATH_MSG_ERROR("No roisHandle found");
+    return StatusCode::FAILURE;
   }
 
   if(roisHandle->size() == 0){
-    ATH_MSG_DEBUG("RoIHandle size = Zero");
-    return StatusCode::SUCCESS;
+    ATH_MSG_ERROR("RoIHandle size = Zero");
+    return StatusCode::FAILURE;
   }
   const TrigRoiDescriptor *roiDescriptor = roisHandle->at(0);
 
@@ -173,9 +173,8 @@ StatusCode TrigTauRecMergedMT::execute(const EventContext& ctx) const
     ATH_MSG_DEBUG(" RoI " << *roiDescriptor);
   }
   else {
-    ATH_MSG_DEBUG("Failed to find RoiDescriptor ");
-    calo_errors.push_back(NoROIDescr);
-    return StatusCode::SUCCESS;
+    ATH_MSG_ERROR("Failed to find RoiDescriptor ");
+    return StatusCode::FAILURE;
   }
 
   // get TauJetContainer from SG
diff --git a/Trigger/TrigAlgorithms/TrigmuComb/src/muComb.h b/Trigger/TrigAlgorithms/TrigmuComb/src/muComb.h
index d62a7d516dae8ef7a6206839bbeb1ffacf316898..0f5f57bdf8ffe219a729e08c13153074d8f62890 100755
--- a/Trigger/TrigAlgorithms/TrigmuComb/src/muComb.h
+++ b/Trigger/TrigAlgorithms/TrigmuComb/src/muComb.h
@@ -3,13 +3,13 @@
 */
 
 // ********************************************************************
-// 
+//
 // NAME:     muComb.h
 // PACKAGE:  Trigger/TrigAlgorithms/TrigmuComb
-// 
+//
 // AUTHORS:   S. Giagu <stefano.giagu@cern.ch>
 //            A, Di Mattia <dimattia@mail.cern.ch>
-// 
+//
 // PURPOSE:  LVL2 Combined Muon FEX Algorithm
 // ********************************************************************
 
@@ -23,7 +23,6 @@
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 //#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h"
 #include "TrkExInterfaces/IExtrapolator.h"
-//#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 
@@ -42,47 +41,45 @@ class muComb : public HLT::FexAlgo
   muComb(const std::string&, ISvcLocator*);
   /** Destructor */
   ~muComb(){};
-   
-  /** hltExecute execute the combined muon FEX. */ 
+
+  /** hltExecute execute the combined muon FEX. */
   HLT::ErrorCode hltExecute(const HLT::TriggerElement*, HLT::TriggerElement*);
   /** hltInitialize. Called by the Steering. */
   HLT::ErrorCode hltInitialize();
   /** hltFinalize. Called by the Steering. */
   HLT::ErrorCode hltFinalize();
-   
-  /** recordFeature. Record on the event record the output xAOD::L2CombinedMuonCOntainer. */ 
+
+  /** recordFeature. Record on the event record the output xAOD::L2CombinedMuonCOntainer. */
   HLT::ErrorCode muCombSeed(HLT::TriggerElement*,xAOD::L2CombinedMuonContainer*);
 
  private:
 
   /** Pointer to Storegate. */
   StoreGateSvc*        m_pStoreGate;
-    
+
   /** Pointer to the ROB data provider */
   //ROBDataProviderSvc*  m_pROBDataProvider;
-      
+
   /** Handle to the G4 backExtrapolator tool */
-  ToolHandle<Trk::IExtrapolator>  m_backExtrapolatorG4;  
+  ToolHandle<Trk::IExtrapolator>  m_backExtrapolatorG4;
 
-  /** Handle to the Magnetic field service */
-  //MagField::IMagFieldSvc* m_MagFieldSvc; 
   SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
 
 
-  /** Pointer to Timer Service */ 
+  /** Pointer to Timer Service */
   ITrigTimerSvc*  m_pTimerService;
 
   std::string m_paramSet;
-    
+
   int    drptMatch(double, double, double,
-                   double, double, double, int, 
+                   double, double, double, int,
 		   double&, double&, double&, double&, double&);
 
-  int    drptMatch(const xAOD::L2StandAloneMuon* feature, 
-                   double, double, double, int, 
+  int    drptMatch(const xAOD::L2StandAloneMuon* feature,
+                   double, double, double, int,
 		   double&, double&, double&, double&, double&);
 
-  int    mfMatch(const xAOD::L2StandAloneMuon* feature, 
+  int    mfMatch(const xAOD::L2StandAloneMuon* feature,
                  double, double, double, double,
 		 double&, double&, double&, double&, double&, int&);
 
diff --git a/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.h b/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.h
index b14f1e01fe5894afc8224429276c96d638e64dfa..0cd11f833d02dafef42eb2cc9233a211fdb1f259 100644
--- a/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.h
+++ b/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.h
@@ -3,12 +3,12 @@
 */
 
 // ********************************************************************
-// 
+//
 // NAME:     muCombMT.h
 // PACKAGE:  Trigger/TrigAlgorithms/TrigmuComb
-// 
+//
 // AUTHORS:   S. Giagu <stefano.giagu@cern.ch>
-// 
+//
 // PURPOSE:  LVL2 Combined Muon FEX Algorithm (MT version)
 // ********************************************************************
 
@@ -17,7 +17,7 @@
 
 // standard stuff
 #include <vector>
-#include <cmath> 
+#include <cmath>
 
 // general athena stuff
 #include "GaudiKernel/IToolSvc.h"
@@ -33,7 +33,6 @@
 #include "StoreGate/WriteHandleKey.h"
 
 #include "TrkExInterfaces/IExtrapolator.h"
-//#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 #include "xAODTrigMuon/L2CombinedMuonContainer.h"
 #include "xAODTracking/TrackParticleContainer.h"
@@ -53,14 +52,14 @@ class muCombMT : public AthAlgorithm
   muCombMT(const std::string&, ISvcLocator*);
   /** Destructor */
   ~muCombMT(){};
-   
+
   /** initialize. Called by the Steering. */
   StatusCode initialize();
   /** finalize. Called by the Steering. */
   StatusCode finalize();
-  /** execute execute the combined muon FEX. */ 
+  /** execute execute the combined muon FEX. */
   StatusCode execute();
-   
+
  private:
 
   SG::ReadHandleKey<xAOD::TrackParticleContainer> m_TrackParticleContainerKey{ this,
@@ -82,27 +81,24 @@ class muCombMT : public AthAlgorithm
   ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
 
   /** Handle to the G4 backExtrapolator tool */
-  //ToolHandle<Trk::IExtrapolator>  m_backExtrapolatorG4;  
+  //ToolHandle<Trk::IExtrapolator>  m_backExtrapolatorG4;
   PublicToolHandle<Trk::IExtrapolator> m_backExtrapolatorG4 {this,
      "AtlasExtrapolator",
      "Trk::Extrapolator/AtlasExtrapolator",
      "Tool to backextrapolate muon from MS to IP (G4 based)"};
 
-  /** Handle to the Magnetic field service */
-  //ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;       //!< helper tool to get the magnetic field
-  //MagField::IMagFieldSvc* m_MagFieldSvc; 
   SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
 
 
   int    drptMatch(double, double, double,
-                   double, double, double, int, 
+                   double, double, double, int,
 		   double&, double&, double&, double&, double&);
 
-  int    drptMatch(const xAOD::L2StandAloneMuon* feature, 
-                   double, double, double, int, 
+  int    drptMatch(const xAOD::L2StandAloneMuon* feature,
+                   double, double, double, int,
 		   double&, double&, double&, double&, double&);
 
-  int    mfMatch(const xAOD::L2StandAloneMuon* feature, 
+  int    mfMatch(const xAOD::L2StandAloneMuon* feature,
                  double, double, double, double,
 		 double&, double&, double&, double&, double&, int&);
 
@@ -180,7 +176,7 @@ class muCombMT : public AthAlgorithm
    Gaudi::Property<double>  m_WeightEta      {this, "WeightEta",            2.0, "matching parameter: LUT-based"};
   /** Scale factor for the Phi matching window in LUT backextrapolator */
    Gaudi::Property<double>  m_WeightPhi      {this, "WeightPhi",            2.0, "matching parameter: LUT-based"};
-                                             
+
    // g4 based backextrapolator
   /** Number of sigmas for the Eta matching window LUT backextrapolator (Barrel) */
    Gaudi::Property<double>  m_WinEta_g4      {this, "WinEtaSigma_g4",       7.0, "matching parameter: G4-based"};
diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx
index f299f0a21a37c3fcb60bfe9a942eb36149d2df6d..49f69d2f63eedc4784f0769b4a7296afa30aab55 100644
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx
@@ -46,9 +46,9 @@ StatusCode TrigEgammaMatchingToolMT::initialize()
   m_keys[ "Photon"]     = "HLT_egamma_Photons" ;
   m_keys[ "Track"]      = "";
   m_keys[ "EFCalo"]     = "HLT_CaloEMClusters" ;
-  m_keys[ "L2Electron"] = "HLT_L2Electrons" ;
-  m_keys[ "L2Photon"]   = "HLT_L2Photons" ;
-  m_keys[ "L2Calo"]     = "HLT_L2CaloEMClusters" ;
+  m_keys[ "L2Electron"] = "HLT_FastElectrons" ;
+  m_keys[ "L2Photon"]   = "HLT_FastPhotons" ;
+  m_keys[ "L2Calo"]     = "HLT_FastCaloEMClusters" ;
   m_keys[ "L1Calo"]     = "LVL1EmTauRoIs" ;
 
   return StatusCode::SUCCESS;
diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx
index f64f79f66beeab713c465665b367eaab27801848..c28e384ea56f2cf2e93515c80d29a69b76b474e2 100644
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/src/TrigEgammaMatchingToolMTTest.cxx
@@ -101,8 +101,8 @@ void TrigEgammaMatchingToolMTTest::inspect(const std::string trigger,const xAOD:
 
       bool passedHLT    =  m_matchTool->ancestorPassed<xAOD::ElectronContainer> (dec, trigger , "HLT_egamma_Electrons");
       bool passedEFCalo =  m_matchTool->ancestorPassed<xAOD::CaloClusterContainer> (dec, trigger , "HLT_CaloEMClusters");
-      bool passedL2     =  m_matchTool->ancestorPassed<xAOD::TrigElectronContainer> (dec, trigger , "HLT_L2Electrons");
-      bool passedL2Calo =  m_matchTool->ancestorPassed<xAOD::TrigEMClusterContainer> (dec, trigger , "HLT_L2CaloEMClusters");
+      bool passedL2     =  m_matchTool->ancestorPassed<xAOD::TrigElectronContainer> (dec, trigger , "HLT_FastElectrons");
+      bool passedL2Calo =  m_matchTool->ancestorPassed<xAOD::TrigEMClusterContainer> (dec, trigger , "HLT_FastCaloEMClusters");
       bool passedL1Calo =  m_matchTool->ancestorPassed<TrigRoiDescriptorCollection> (dec, trigger , "initialRois");
       
       ATH_MSG_INFO( "L1Calo passed : "<< passedL1Calo   );
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx
index 221d5f3bff1a586558882246bc8149234886d581..176d7de22728a327c66321cebe573599c5517844 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx
@@ -1036,12 +1036,13 @@ int main(int argc, char** argv) {
 
   std::cout << "\n" << argv[0] << "\tconfigfile: " << configfile << std::endl;
 
+  bool use_file_config = false;
  
   if ( configfile!="" ) { 
 
     if ( exists(configfile) ) { 
 
-      std::cout << argv[0] << ":\treading histogram configuration from file " << configfile << std::endl; 
+      std::cout << argv[0] << ":\treading configuration file " << configfile << std::endl; 
     
       ReadCards rc(configfile);
 
@@ -1050,6 +1051,10 @@ int main(int argc, char** argv) {
       
       if ( rc.isTagDefined( "histos" ) ) { 
 	
+	std::cout << argv[0] << ":\treading histogram configuration from file " << configfile << std::endl; 
+
+	use_file_config = true;
+
 	std::vector<std::string> raw_input = rc.GetStringVector( "histos" );
 	
 	for ( size_t iraw=0 ; iraw<raw_input.size() ; iraw += 6) {
@@ -1067,6 +1072,10 @@ int main(int argc, char** argv) {
 
       if ( rc.isTagDefined( "panels" ) ) { 
 	
+	std::cout << argv[0] << ":\treading histogram panel configuration from file " << configfile << std::endl; 
+
+	use_file_config = true;
+
 	std::vector<std::string> panel_config = rc.GetStringVector( "panels" );
 	
 	for ( size_t ipanel=panel_config.size() ; ipanel-- ;  ) { 
@@ -1118,7 +1127,8 @@ int main(int argc, char** argv) {
     }
 
   }
-  else { 
+
+  if ( !use_file_config ) {
 
     std::cout << "using default panels" << std::endl;
 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
index 82bb1275dbe797ad02b43ace87409ae712d4d328..4634294863a40b1085bcc31b8afe04b02dea42c4 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
@@ -15,7 +15,9 @@ testChains = {
     "HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_IDTrig", 
  
     "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF",
+    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF:HLT_Roi_TauCore",
     "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF",
+    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso",
     "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_FTF",
     "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig",
 
diff --git a/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref b/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref
index d16c15847b1be726bcc9a3e268e8a5c848eebb77..1d83d06a24abe528e3518fdd8f303e6bdb382e4b 100644
--- a/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref
+++ b/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref
@@ -21,7 +21,6 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
 ClassIDSvc           INFO  getRegistryEntries: read 7027 CLIDRegistry entries for module ALL
-CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
 ApplicationMgr       INFO Application Manager Initialized successfully
diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h
index 4383771e1115e40a2a16e178a511a2e63aeb1e35..40468452f28348b957994e52c30545d0ec3387b3 100644
--- a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h
+++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h
@@ -60,6 +60,9 @@ namespace TrigConf {
       void setData(const ptree & data);
       void setData(ptree && data);
 
+      /** @brief Setting the configuration element name */
+      void setName(const std::string& n);
+
       /** A string that is the name of the class */
       virtual std::string className() const;
 
diff --git a/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx b/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx
index 49b7bbe689727ffd2a5058b4a2f224f37becdca7..0aef851fa6014d3544f82e91202ea553b186a366 100644
--- a/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx
+++ b/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx
@@ -46,6 +46,10 @@ TrigConf::DataStructure::setData(ptree&& data)
    update();
 }
 
+void TrigConf::DataStructure::setName(const std::string& n) {
+  m_name = n;
+}
+
 
 void
 TrigConf::DataStructure::clear()
diff --git a/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx b/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx
index 0a072f3e40e12b3ae0cd2bcb7d0b305ade89b5ed..bfeeab95645159a03d7403900149dc4035367bcb 100644
--- a/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx
+++ b/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx
@@ -19,7 +19,6 @@ TrigConf::Chain::update()
    if(! isInitialized() || empty() ) {
       return;
    }
-   m_name = getAttribute("name");
 }
 
 TrigConf::Chain::~Chain()
diff --git a/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx b/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx
index 817ae1ee6f82ee2f446207aec8c2111c06297532..f75ab64a14ed37c14f13185b42b68294b05ce691 100644
--- a/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx
+++ b/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx
@@ -49,7 +49,7 @@ TrigConf::HLTMenu::setSMK(unsigned int smk) {
 TrigConf::HLTMenu::const_iterator
 TrigConf::HLTMenu::begin() const
 {
-   return {data().get_child("chains"), 0,  [](auto & x){return Chain(x.second);}};
+    return {data().get_child("chains"), 0,  [](auto & x){auto chain = Chain(x.second); chain.setName(x.first); return chain; }};
 }
 
 TrigConf::HLTMenu::const_iterator
diff --git a/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py b/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py
index daed3c4457ba57bd2fb9ecd7e39fc028cd0b99cc..6eff14b80d23fcb0f77f451fabebe32356c35cd7 100644
--- a/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py
+++ b/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py
@@ -20,7 +20,7 @@ class HLTMenuAccess(TriggerConfigAccess):
         self.load()
 
     def chainNames(self):
-        return (x["name"] for x in self)
+        return self["chains"].keys()
 
     def chains(self):
         return iter(self)
@@ -33,11 +33,18 @@ class HLTMenuAccess(TriggerConfigAccess):
 
     def printSummary(self):
         print("HLT menu %s" % self.name())
-        print("Number of chains: %i" % len(self) )
+        print("Number of chains: %i" % len(self.chains()) )
         print("Number of streams: %i" % len(self.streams()) )
         print("Number of sequencers: %i" % len(self.sequencers()) )
 
-
+    def printDetails(self):
+        import pprint
+        print("Chains:")
+        pprint.pprint(list(self.chains()))
+        print("Streams:")
+        pprint.pprint(list(self.streams()))
+        print("Sequencers:")
+        pprint.pprint(list(self.sequencers()))
 
 class HLTPrescalesSetAccess(TriggerConfigAccess):
     """
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py
index a1603a63f1b97239d88cebfcb802a0834be482f6..35c9ac9e5b2e3c15e4269f13b577263e384dbbdc 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcCfg.py
@@ -174,15 +174,12 @@ def getL1ConfigSvc( flags = None ):
     log = logging.getLogger('TrigConfigSvcCfg')
     from AthenaCommon.Logging import log
     from TriggerJobOpts.TriggerFlags import TriggerFlags
-    from AthenaCommon.Configurable import Configurable
-    print("HERE importing as {}".format(Configurable.configurableRun3Behavior))
     # generate menu file
     generatedFile = generateL1Menu( flags=flags )
 
     # configure config svc
-
     TrigConf__LVL1ConfigSvc = CompFactory.getComp("TrigConf::LVL1ConfigSvc")
-    l1ConfigSvc = TrigConf__LVL1ConfigSvc( "LVL1ConfigSvc" )
+    l1ConfigSvc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc")
 
     l1ConfigSvc.ConfigSource = "XML"
     l1XMLFile = TriggerFlags.inputLVL1configFile() if flags is None else flags.Trigger.LVL1ConfigFile
@@ -213,8 +210,8 @@ def getL1ConfigSvc( flags = None ):
 @memoize
 def getHLTConfigSvc( flags = None ):
     log = logging.getLogger('TrigConfigSvcCfg')
-    HLTConfigSvc = CompFactory.getComp("TrigConf::HLTConfigSvc")
-    hltConfigSvc = HLTConfigSvc("HLTConfigSvc")
+    TrigConf__HLTConfigSvc = CompFactory.getComp("TrigConf::HLTConfigSvc")
+    hltConfigSvc = TrigConf__HLTConfigSvc("HLTConfigSvc")
 
     hltXMLFile = "None"
     hltConfigSvc.ConfigSource = "None"
@@ -235,7 +232,7 @@ def getHLTConfigSvc( flags = None ):
 def setupHLTPrescaleCondAlg( flags = None ):
     log = logging.getLogger('TrigConfigSvcCfg')
     TrigConf__HLTPrescaleCondAlg = CompFactory.getComp("TrigConf::HLTPrescaleCondAlg")
-    hltPrescaleCondAlg = TrigConf__HLTPrescaleCondAlg( "HLTPrescaleCondAlg" )
+    hltPrescaleCondAlg = TrigConf__HLTPrescaleCondAlg("HLTPrescaleCondAlg")
 
     tc = getTrigConfigFromFlag( flags )
     hltPrescaleCondAlg.Source = tc["source"]
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.cxx b/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.cxx
index 9668f665bdf2b239a4bdd0598cc0549aa4d517c4..58cbebc361e403ab0feb18ca273d1fc16580b826 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.cxx
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.cxx
@@ -16,7 +16,8 @@
 
 TrigConf::JobOptionsSvc::JobOptionsSvc(const std::string& name, ISvcLocator* pSvcLocator) :
   base_class(name, pSvcLocator),
-  m_josvc("JobOptionsSvc/TrigConfWrapped_JobOptionsSvc", name)
+  m_josvc("JobOptionsSvc/TrigConfWrapped_JobOptionsSvc", name),
+  m_optsvc("JobOptionsSvc/TrigConfWrapped_JobOptionsSvc", name)
 {}
 
 StatusCode TrigConf::JobOptionsSvc::initialize()
@@ -28,6 +29,11 @@ StatusCode TrigConf::JobOptionsSvc::initialize()
   SmartIF<IProperty> joprop = &*m_josvc;
   ATH_CHECK(joprop->setProperty("TYPE", "NONE"));
 
+  //  m_optsvc = serviceLocator()->getOptsSvc();
+  ATH_CHECK(m_optsvc.retrieve());
+  m_optsvc->set( this->name() + ".TYPE" , "NONE" );
+
+  
   if (m_sourceType == "FILE") {
     ATH_MSG_INFO("Reading joboptions from " << m_sourcePath.value());
     ATH_CHECK(readOptions(m_sourcePath));
@@ -94,6 +100,7 @@ StatusCode TrigConf::JobOptionsSvc::readOptions(const std::string& file, const s
   for (const auto& [client, props] : json["properties"].items()) {
     for (const auto& [name, value] : props.items()) {
       ATH_CHECK(addPropertyToCatalogue(client, Gaudi::Property<std::string>(name, value.get<std::string>())));
+      // set(client + "." + name, value.get<std::string>());
     }
   }
 
@@ -114,6 +121,7 @@ StatusCode TrigConf::JobOptionsSvc::readOptionsDB(const std::string& db_server,
       for( const auto & property : client.second ) {
         nProps++;
         ATH_CHECK(addPropertyToCatalogue(client.first, Gaudi::Property<std::string>(property.first, property.second.data())));
+        // set(client.first + "." + property.first, property.second.data());
       }
     }
     ATH_MSG_INFO("Loaded job options from " << nClients << " clients with " << nProps << " in total");
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.h b/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.h
index 7efa1688bdbd6fea573a4bc0a398dc8d03fb8ca0..573b5af122f3e8bee35a73c1b680884fb16645ec 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.h
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/src/TrigConfJobOptionsSvc.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "GaudiKernel/IJobOptionsSvc.h"
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 
 #include "AthenaBaseComps/AthService.h"
@@ -30,7 +31,7 @@ namespace TrigConf {
    *  - `DB`:   Read properties from DB, connection string in `PATH`, see \ref parseDBString
    *
    */
-  class JobOptionsSvc : public extends<AthService, TrigConf::IJobOptionsSvc, ::IJobOptionsSvc> {
+  class JobOptionsSvc : public extends<AthService, TrigConf::IJobOptionsSvc, ::IJobOptionsSvc, Gaudi::Interfaces::IOptionsSvc> {
     using AthService::getProperties;
 
   public:
@@ -39,6 +40,44 @@ namespace TrigConf {
     virtual StatusCode initialize() override;
     virtual StatusCode start() override;
 
+    /// @name IOptionsSvc interface
+    ///@{
+    virtual void set( const std::string& key, const std::string& value ) {
+      return m_optsvc->set(key,value);
+    }
+
+    virtual std::string get( const std::string& key, const std::string& default_ = {} ) const {
+      return m_optsvc->get(key,default_);
+    }
+
+    virtual std::string pop( const std::string& key, const std::string& default_ = {} ) {
+      return m_optsvc->pop(key,default_);
+    }
+    
+    virtual bool has( const std::string& key ) const {
+      return m_optsvc->has(key);
+    }
+    
+    virtual bool isSet( const std::string& key ) const {
+      return m_optsvc->isSet(key);
+    }
+
+    virtual std::vector<std::tuple<std::string, std::string>> items() const {
+      return m_optsvc->items();
+    }
+
+    virtual void bind( const std::string& prefix, Gaudi::Details::PropertyBase* property ) {
+      return m_optsvc->bind(prefix,property);
+    }
+
+    //    using OnlyDefaults = Gaudi::tagged_bool<class OnlyDefaults_tag>;
+    using OnlyDefaults = Gaudi::Interfaces::IOptionsSvc::OnlyDefaults;
+    virtual void broadcast( const std::regex& filter, const std::string& value,
+                            OnlyDefaults defaults = OnlyDefaults{true} ) {
+      return m_optsvc->broadcast(filter, value, defaults);
+    }
+    ///@}
+
     /// @name IJobOptionsSvc interface
     /// Most interfaces are just forwards to the "real" JobOptionsSvc.
     ///@{
@@ -102,6 +141,7 @@ namespace TrigConf {
 
     /// handle to the "real" IJobOptionsSvc
     ServiceHandle<::IJobOptionsSvc> m_josvc;
+    ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_optsvc;
   };
 
 } // namespace TrigConf
diff --git a/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetEventTPCnv_test.txt b/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetEventTPCnv_test.txt
index 7b6025a7cbdc4c4a933d9f56208cc72db38a7ca1..584034897969d1428e564ba6038b678203d11ab7 100644
--- a/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetEventTPCnv_test.txt
+++ b/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetEventTPCnv_test.txt
@@ -1,3 +1,3 @@
-ApplicationMgr.DLLs += { "StoreGate", "CLIDComps" };
+ApplicationMgr.Dlls += { "StoreGate", "CLIDComps" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore" };
 #include "IOVSvc/IOVSvc.txt"
diff --git a/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetTrackCnv_p4_test.ref b/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetTrackCnv_p4_test.ref
index 5429700f587433b203db01f2ba16223850eb2976..c7673adce557606c139394f95cd4b6c6fd867f17 100644
--- a/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetTrackCnv_p4_test.ref
+++ b/Trigger/TrigEvent/TrigInDetEventTPCnv/share/TrigInDetTrackCnv_p4_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/TrigInDetEventTPCnv_test.txt
 JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/TrigInDetEventTPCnv_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "CLIDComps"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "CLIDComps"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/TrigInDetEventTPCnv_test.txt
 ApplicationMgr    SUCCESS 
diff --git a/Trigger/TrigEvent/TrigNavigation/share/HLTNavigation_test.ref b/Trigger/TrigEvent/TrigNavigation/share/HLTNavigation_test.ref
index bad65b3669dce893ce7cccb3c370eca7abb71c2a..7bbf00b0f23152138cfe6ddd7f24ae4501953ee0 100644
--- a/Trigger/TrigEvent/TrigNavigation/share/HLTNavigation_test.ref
+++ b/Trigger/TrigEvent/TrigNavigation/share/HLTNavigation_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/test.txt
-JobOptionsSvc        INFO # (2,1): ApplicationMgr.DLLs += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
+JobOptionsSvc        INFO # (2,1): ApplicationMgr.Dlls += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (3,1): ApplicationMgr.ExtSvc += ["ClassIDSvc"]
 JobOptionsSvc        INFO # (4,1): ApplicationMgr.ExtSvc += ["TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (5,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore"]
diff --git a/Trigger/TrigEvent/TrigNavigation/share/Holder_test.ref b/Trigger/TrigEvent/TrigNavigation/share/Holder_test.ref
index 6a23db15f20ae102c068aa217ffa4e5eaa0ff8a2..8d884ebc690ee175feb2cefe9520d68e86745855 100644
--- a/Trigger/TrigEvent/TrigNavigation/share/Holder_test.ref
+++ b/Trigger/TrigEvent/TrigNavigation/share/Holder_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Trigger/TrigEvent/TrigNavigation/share/../share/test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.DLLs += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
+JobOptionsSvc        INFO # (1,1): ApplicationMgr.Dlls += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (2,1): ApplicationMgr.ExtSvc += ["ClassIDSvc"]
 JobOptionsSvc        INFO # (3,1): ApplicationMgr.ExtSvc += ["TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (4,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore"]
diff --git a/Trigger/TrigEvent/TrigNavigation/share/Ownership_test.ref b/Trigger/TrigEvent/TrigNavigation/share/Ownership_test.ref
index f254588f4a98a2bb4874d4eb96328dc7e4139b70..982e4f5ac69bcdb2360513e331fabd38b2112562 100644
--- a/Trigger/TrigEvent/TrigNavigation/share/Ownership_test.ref
+++ b/Trigger/TrigEvent/TrigNavigation/share/Ownership_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/test.txt
 JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Trigger/TrigEvent/TrigNavigation/share/../share/test.txt
-JobOptionsSvc        INFO # (2,1): ApplicationMgr.DLLs += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
+JobOptionsSvc        INFO # (2,1): ApplicationMgr.Dlls += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (3,1): ApplicationMgr.ExtSvc += ["ClassIDSvc"]
 JobOptionsSvc        INFO # (4,1): ApplicationMgr.ExtSvc += ["TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (5,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore"]
diff --git a/Trigger/TrigEvent/TrigNavigation/share/Registration_test.ref b/Trigger/TrigEvent/TrigNavigation/share/Registration_test.ref
index 7772b5171b3258801bd354f307a2f622c57faa1e..825c1e153e837b35fe76efda515705029ced50b1 100644
--- a/Trigger/TrigEvent/TrigNavigation/share/Registration_test.ref
+++ b/Trigger/TrigEvent/TrigNavigation/share/Registration_test.ref
@@ -2,7 +2,7 @@
 
 Initializing Gaudi ApplicationMgr using job opts ../share/test.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/test.txt
-JobOptionsSvc        INFO # (2,1): ApplicationMgr.DLLs += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
+JobOptionsSvc        INFO # (2,1): ApplicationMgr.Dlls += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (3,1): ApplicationMgr.ExtSvc += ["ClassIDSvc"]
 JobOptionsSvc        INFO # (4,1): ApplicationMgr.ExtSvc += ["TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (5,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore"]
diff --git a/Trigger/TrigEvent/TrigNavigation/share/RoICache_test.ref b/Trigger/TrigEvent/TrigNavigation/share/RoICache_test.ref
index e00b55642409751f1806fa37a7622442232023f5..aaeb356cb88758934b192cc219ac653ae07f5b82 100644
--- a/Trigger/TrigEvent/TrigNavigation/share/RoICache_test.ref
+++ b/Trigger/TrigEvent/TrigNavigation/share/RoICache_test.ref
@@ -4,7 +4,7 @@ RoICache_test        INFO LINE:82 Start of the test: RoIcaching test
 
 Initializing Gaudi ApplicationMgr using job opts ../share/test2.txt
 JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/test2.txt
-JobOptionsSvc        INFO # (2,1): ApplicationMgr.DLLs += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
+JobOptionsSvc        INFO # (2,1): ApplicationMgr.Dlls += ["StoreGate", "TrigNavigation", "TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (3,1): ApplicationMgr.ExtSvc += ["ClassIDSvc"]
 JobOptionsSvc        INFO # (4,1): ApplicationMgr.ExtSvc += ["TrigSerializeCnvSvc"]
 JobOptionsSvc        INFO # (5,1): ApplicationMgr.ExtSvc += ["StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore"]
diff --git a/Trigger/TrigEvent/TrigNavigation/share/test.txt b/Trigger/TrigEvent/TrigNavigation/share/test.txt
index cca4873dc002b5b8d3cb93c05a004e5080d8584f..8116816c7ddd94b95b91a3065c22230f9c3042c6 100644
--- a/Trigger/TrigEvent/TrigNavigation/share/test.txt
+++ b/Trigger/TrigEvent/TrigNavigation/share/test.txt
@@ -1,4 +1,4 @@
-ApplicationMgr.DLLs += { "StoreGate", "TrigNavigation", "TrigSerializeCnvSvc" };
+ApplicationMgr.Dlls += { "StoreGate", "TrigNavigation", "TrigSerializeCnvSvc" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "TrigSerializeCnvSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore" };
@@ -14,7 +14,7 @@ MessageSvc.useColors        = false;
 //YourFolder.ItemList = {"8101", "8107#", "Baricco#*"};
 
 //#include "IOVSvc/IOVSvc.txt"
-//ApplicationMgr.DLLs += { "IOVSvc" };
+//ApplicationMgr.Dlls += { "IOVSvc" };
 
 //ApplicationMgr.ExtSvc += { "IOVSvc" };
 
@@ -22,7 +22,7 @@ MessageSvc.useColors        = false;
 
 // 
 //Navigation.ReferenceAllClasses = 1
-//ApplicationMgr.DLLs += { "TrigCaloEvent" };
+//ApplicationMgr.Dlls += { "TrigCaloEvent" };
 ToolSvc.Navigation.ReferenceAllClasses = 1;
 ToolSvc.Navigation.ClassesToPreregister = {"TestA#EverEmptyButPresent", "TestA#AgainPresentButEmpty", "TestA#","TrigNavTest::TestBContainer#BContainer1", "TrigNavTest::TestBContainer#BContainer2", "TestDContainer#DContainer1"};
 //ToolSvc.Navigation.AuxClasses = {"TestAuxA#EverEmptyButPresent", "TrigNavTest::TestAuxB#BContainer2"};
diff --git a/Trigger/TrigEvent/TrigNavigation/share/test2.txt b/Trigger/TrigEvent/TrigNavigation/share/test2.txt
index 4133eb8d68376acf8f9b27d44b34097688095004..9ba1ed5d31b46b9910f3b530df12b2fe921eea52 100755
--- a/Trigger/TrigEvent/TrigNavigation/share/test2.txt
+++ b/Trigger/TrigEvent/TrigNavigation/share/test2.txt
@@ -1,4 +1,4 @@
-ApplicationMgr.DLLs += { "StoreGate", "TrigNavigation", "TrigSerializeCnvSvc" };
+ApplicationMgr.Dlls += { "StoreGate", "TrigNavigation", "TrigSerializeCnvSvc" };
 ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 ApplicationMgr.ExtSvc += { "TrigSerializeCnvSvc" };
 ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore" };
@@ -14,7 +14,7 @@ MessageSvc.useColors        = false;
 //YourFolder.ItemList = {"8101", "8107#", "Baricco#*"};
 
 //#include "IOVSvc/IOVSvc.txt"
-//ApplicationMgr.DLLs += { "IOVSvc" };
+//ApplicationMgr.Dlls += { "IOVSvc" };
 
 //ApplicationMgr.ExtSvc += { "IOVSvc" };
 
@@ -22,7 +22,7 @@ MessageSvc.useColors        = false;
 
 // 
 //Navigation.ReferenceAllClasses = 1
-//ApplicationMgr.DLLs += { "TrigCaloEvent" };
+//ApplicationMgr.Dlls += { "TrigCaloEvent" };
 ToolSvc.Navigation.ReferenceAllClasses = 1;
 //ToolSvc.Navigation.ClassesToPreregister =
 //{"TestA#EverEmptyButPresent", "TestA#AgainPresentButEmpty",
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetOnlineMonitoringMTConfig.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetOnlineMonitoringMTConfig.py
index e2a2b792ecce8160a0e8d7b1501927abbe39743c..82042b783b8de12bc79f53dc0947ce332f948538 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetOnlineMonitoringMTConfig.py
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetOnlineMonitoringMTConfig.py
@@ -2,6 +2,11 @@
 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
 
 class TrigBjetOnlineMonitoring(GenericMonitoringTool):
+    def make_btag_hists(self, btag_name, btag_opts):
+        self.defineHistogram('btag_'+btag_name+'_pb', title=btag_name+" PB", **btag_opts)
+        self.defineHistogram('btag_'+btag_name+'_pc', title=btag_name+" PC", **btag_opts)
+        self.defineHistogram('btag_'+btag_name+'_pu', title=btag_name+" PU", **btag_opts)
+
     def __init__ (self, name="TrigBjetOnlineMonitoring"):
         super(TrigBjetOnlineMonitoring, self).__init__(name)
         self.name = "TrigBjetOnlineMonitoring"
@@ -33,3 +38,19 @@ class TrigBjetOnlineMonitoring(GenericMonitoringTool):
         self.defineHistogram('jet_phi', title="Jet #phi;#phi", xbins = default_bin_count, xmin=-3.5, xmax=3.5, **TH1F_opts)
         self.defineHistogram('jet_eta,jet_phi', path='EXPERT', type='TH2F', title="Jet #eta vs #phi;#eta;#phi",
                              xbins = default_bin_count, xmin=-5, xmax=5, ybins = default_bin_count, ymin=-4, ymax=4)
+
+
+        # B-Tagging Histograms
+        btag_options=TH1F_opts.copy()
+        btag_options.update({'xbins':default_bin_count, 'xmin':0, 'xmax':1})
+        self.make_btag_hists('IP2D', btag_options)
+        self.make_btag_hists('IP3D', btag_options)
+        self.make_btag_hists('SV1', btag_options)
+        self.make_btag_hists('DL1r', btag_options)
+        self.make_btag_hists('RNNIP', btag_options)
+        self.defineHistogram('btag_MV2c10', title="MV2c10", xbins = default_bin_count, xmin=-1, xmax=1, **TH1F_opts)
+
+        self.defineHistogram('btag_valD0wrtPVofTracks', title="Track d_{0} w/ Respect to PV of Tracks;d_{0} (mm)", xbins = default_bin_count, xmin=-2, xmax=2, **TH1F_opts)
+        self.defineHistogram('btag_sigD0wrtPVofTracks', title="Track d_{0} Significance w/ Respect to PV of Tracks;d_{0} #sigma", xbins = default_bin_count, xmin=-100, xmax=100, **TH1F_opts)
+        self.defineHistogram('btag_valZ0wrtPVofTracks', title="Track z_{0} w/ Respect to PV of Tracks;z_{0} (mm)", xbins = default_bin_count, xmin=-2, xmax=2, **TH1F_opts)
+        self.defineHistogram('btag_sigZ0wrtPVofTracks', title="Track z_{0} Significance w/ Respect to PV of Tracks;z_{0} #sigma", xbins = default_bin_count, xmin=-100, xmax=100, **TH1F_opts)
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.cxx
index f0448c9b4126c9837d83fcaaae2e6516a3acac72..0292bb962e2d5526df1d65dee659a0c85a2637d4 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.cxx
@@ -132,6 +132,15 @@ StatusCode TrigBjetBtagHypoAlgMT::execute( const EventContext& context ) const {
 
     toAdd->setObjectLink< xAOD::BTaggingContainer >( m_bTaggingLink.value(),bTaggingEL.front() );
 
+    // online monitoring for btagging, with a check to ensure the PV is marked
+    ElementLink< xAOD::VertexContainer > vertexEL;
+        CHECK( retrieveObjectFromNavigation(  m_prmVtxLink.value(), vertexEL, prevDecisionContainer->at(index) ) );
+        
+    if ( (*vertexEL)->vertexType() == xAOD::VxType::VertexType::PriVtx ) {
+      CHECK( monitor_btagging( bTaggingEL ) );
+    }
+
+
 
 
     // Add to Decision collection
@@ -255,3 +264,71 @@ StatusCode TrigBjetBtagHypoAlgMT::monitor_tracks( const ElementLinkVector< xAOD:
 }
 
 
+StatusCode TrigBjetBtagHypoAlgMT::monitor_flavor_tag_variable( const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL, const std::string& var_name ) const {
+  auto monitor_pu = Monitored::Collection( "btag_"+var_name+"_pu", bTaggingEL,
+    [var_name](const ElementLink< xAOD::BTaggingContainer >& bTagLink) { 
+      double pu = -1; 
+      (*bTagLink)->pu( var_name, pu );
+      return pu; 
+    } );
+
+  auto monitor_pb = Monitored::Collection( "btag_"+var_name+"_pb", bTaggingEL,
+    [var_name](const ElementLink< xAOD::BTaggingContainer >& bTagLink) { 
+      double pb = -1;
+      (*bTagLink)->pb( var_name, pb );
+      return pb;
+    } );
+
+  auto monitor_pc = Monitored::Collection( "btag_"+var_name+"_pc", bTaggingEL,
+    [var_name](const ElementLink< xAOD::BTaggingContainer >& bTagLink) { 
+      double pc = -1;
+      (*bTagLink)->pc( var_name, pc );
+      return pc;
+    } );
+
+  auto monitor_group_for_flavor_tag_var = Monitored::Group( m_monTool, monitor_pu, monitor_pb, monitor_pc );
+
+  return StatusCode::SUCCESS;
+}
+  
+
+StatusCode TrigBjetBtagHypoAlgMT::monitor_btagging( const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL ) const {
+  // Monitor IP2D, IP3D, SV1, DL1r, RNNIP
+  CHECK( monitor_flavor_tag_variable(bTaggingEL, "IP2D") );
+  CHECK( monitor_flavor_tag_variable(bTaggingEL, "IP3D") );
+  CHECK( monitor_flavor_tag_variable(bTaggingEL, "SV1") );
+  CHECK( monitor_flavor_tag_variable(bTaggingEL, "DL1r") );
+  CHECK( monitor_flavor_tag_variable(bTaggingEL, "RNNIP") );
+
+  // Monitor MV2c10
+  auto monitor_for_MV2c10 = Monitored::Collection( "btag_MV2c10", bTaggingEL,
+    [](const ElementLink< xAOD::BTaggingContainer >& bTagLink) { 
+      double mv2c10_discriminant = -2;
+      (*bTagLink)->MVx_discriminant( "MV2c10", mv2c10_discriminant );
+      return mv2c10_discriminant;
+    } );
+  auto monitor_group_for_btagging = Monitored::Group( m_monTool, monitor_for_MV2c10);
+
+
+  // Monitor tracks used in calculating btagging quantities
+  for ( const ElementLink< xAOD::BTaggingContainer >& bTagLink : bTaggingEL ) {
+    auto monitor_for_btag_valD0wrtPVofTracks = Monitored::Collection( "btag_valD0wrtPVofTracks",
+      (*bTagLink)->auxdata< std::vector<float> >("IP3D_valD0wrtPVofTracks"));
+    auto monitor_for_btag_sigD0wrtPVofTracks = Monitored::Collection( "btag_sigD0wrtPVofTracks",
+      (*bTagLink)->auxdata< std::vector<float> >("IP3D_sigD0wrtPVofTracks"));
+    auto monitor_for_btag_valZ0wrtPVofTracks = Monitored::Collection( "btag_valZ0wrtPVofTracks",
+      (*bTagLink)->auxdata< std::vector<float> >("IP3D_valZ0wrtPVofTracks"));
+    auto monitor_for_btag_sigZ0wrtPVofTracks = Monitored::Collection( "btag_sigZ0wrtPVofTracks",
+      (*bTagLink)->auxdata< std::vector<float> >("IP3D_sigZ0wrtPVofTracks"));
+
+    auto monitor_group_for_btag_track_vars = Monitored::Group( m_monTool,
+      monitor_for_btag_valD0wrtPVofTracks, monitor_for_btag_sigD0wrtPVofTracks,
+      monitor_for_btag_valZ0wrtPVofTracks, monitor_for_btag_sigZ0wrtPVofTracks
+    );
+  }
+
+
+
+  return StatusCode::SUCCESS;
+}
+
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.h
index 60ae9a91fb2ea9a202de19f1f06574a7a2b50269..8a064606bfc989a31d38c1015d2b6cc5491d6dea 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.h
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetBtagHypoAlgMT.h
@@ -37,6 +37,8 @@ class TrigBjetBtagHypoAlgMT : public TrigBjetHypoAlgBaseMT {
   // online monitoring 
   virtual StatusCode monitor_jets( const ElementLinkVector<xAOD::JetContainer >& jetELs ) const ;
   virtual StatusCode monitor_tracks( const ElementLinkVector< xAOD::TrackParticleContainer >& trackELs ) const;
+  virtual StatusCode monitor_flavor_tag_variable( const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL, const std::string& var_name) const;
+  virtual StatusCode monitor_btagging( const ElementLinkVector< xAOD::BTaggingContainer >& bTaggingEL ) const;
   
  private:
   ToolHandleArray< TrigBjetBtagHypoTool > m_hypoTools {this,"HypoTools",{},"Hypo Tools"};
diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/python/TrigMuonHypoMTConfig.py b/Trigger/TrigHypothesis/TrigMuonHypoMT/python/TrigMuonHypoMTConfig.py
index a1e696b3bd3660b242c85862e45383f17b4c4f52..63b946b06ea934fcb32020b7e8887b4f00374511 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypoMT/python/TrigMuonHypoMTConfig.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/python/TrigMuonHypoMTConfig.py
@@ -243,10 +243,7 @@ def getThresholdsFromDict( chainDict ):
 
 def TrigMufastHypoToolFromDict( chainDict ):
 
-    if 'lateMu' in chainDict['chainParts'][0]['chainPartName']:
-       thresholds = ['passthrough']
-    else:
-        thresholds = getThresholdsFromDict( chainDict )
+    thresholds = getThresholdsFromDict( chainDict )
     config = TrigMufastHypoConfig()
     tool = config.ConfigurationHypoTool( chainDict['chainName'], thresholds )
     # Setup MonTool for monitored variables in AthenaMonitoring package
@@ -395,7 +392,7 @@ class TrigL2MuonOverlapRemoverMucombConfig(object):
 
 def TrigmuCombHypoToolFromDict( chainDict ):
 
-    if 'idperf' in chainDict['chainParts'][0]['chainPartName'] or 'lateMu' in chainDict['chainParts'][0]['chainPartName']:
+    if 'idperf' in chainDict['chainParts'][0]['chainPartName']:
        thresholds = ['passthrough']
     else:
        thresholds = getThresholdsFromDict( chainDict )
@@ -684,7 +681,8 @@ class TrigMuonEFTrackIsolationHypoConfig(object) :
 
 def TrigMuonEFInvMassHypoToolFromDict( chainDict ) :
     cparts = [i for i in chainDict['chainParts'] if i['signature']=='Muon']
-    thresholds = cparts[0]['invMassInfo']
+    #The invariant mass is specified at end of chain, so only shows up in the last chainPart
+    thresholds = cparts[-1]['invMassInfo']
     config = TrigMuonEFInvMassHypoConfig()
     tool = config.ConfigurationHypoTool( chainDict['chainName'], thresholds )
     addMonitoring( tool, TrigMuonEFInvMassHypoMonitoring, "TrigMuonEFInvMassHypoTool", chainDict['chainName'] )
@@ -710,8 +708,8 @@ class TrigMuonEFInvMassHypoConfig(object) :
                 log.debug('Setting passthrough')
                 tool.AcceptAll = True
             else:
-                log.error('threshokds = ', thresholds)
-                raise Exception('TrigMuonEFTrackIsolation Hypo Misconfigured')
+                log.error('thresholds = ', thresholds)
+                raise Exception('TrigMuonEFInvMass Hypo Misconfigured')
         return tool
 
 def TrigMuonLateMuRoIHypoToolFromDict( chainDict ) :
diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloRoiUpdaterMT.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloRoiUpdaterMT.cxx
index e65d1cc10cfc6d8d75b4359f75568b6b7e1942de..d051d7e544c55acb89dca8c25890d105bf9dfd9e 100644
--- a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloRoiUpdaterMT.cxx
+++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloRoiUpdaterMT.cxx
@@ -30,6 +30,8 @@ StatusCode TrigTauCaloRoiUpdaterMT::initialize() {
 }
 
 
+
+
 StatusCode TrigTauCaloRoiUpdaterMT::execute() {
 
   ATH_MSG_DEBUG( "Running "<< name() <<" ... " );
@@ -42,17 +44,15 @@ StatusCode TrigTauCaloRoiUpdaterMT::execute() {
   SG::ReadHandle< xAOD::CaloClusterContainer > CCContainerHandle = SG::makeHandle( m_clustersKey,ctx );
   CHECK( CCContainerHandle.isValid() );
   const xAOD::CaloClusterContainer *RoICaloClusterContainer = CCContainerHandle.get();
-  ATH_MSG_DEBUG( "Found " << RoICaloClusterContainer->size() << " caloClusters, updating the corresponding RoI ... " );
 
   if(RoICaloClusterContainer != NULL) {
-    ATH_MSG_DEBUG( "REGTEST: Size of vector CaloCluster container is " << RoICaloClusterContainer->size());
+    ATH_MSG_DEBUG( "Size of vector CaloCluster container is " << RoICaloClusterContainer->size());
     if(RoICaloClusterContainer->size()==0) {
-      ATH_MSG_DEBUG( "Cannot proceed, size of vector CaloCluster container is " << RoICaloClusterContainer->size());
-      return StatusCode::SUCCESS;
+      ATH_MSG_DEBUG( "CaloCluster container has zero size");
     }
   }else {
-    ATH_MSG_DEBUG( "no CaloCluster container found " );
-    return StatusCode::SUCCESS;
+    ATH_MSG_ERROR( "no CaloCluster container found " );
+    return StatusCode::FAILURE;
   }
 
   //get RoI descriptor
@@ -60,15 +60,16 @@ StatusCode TrigTauCaloRoiUpdaterMT::execute() {
   ATH_MSG_DEBUG("Size of roisHandle: "<<roisHandle->size());
   const TrigRoiDescriptor *roiDescriptor = roisHandle->at(0);
 
-  ATH_MSG_DEBUG( "; RoI ID = " << roiDescriptor->roiId()
-       << ": Eta = " << roiDescriptor->eta()
-       << ", Phi = " << roiDescriptor->phi() );
-
   // fill local variables for RoI reference position
   // Preserve the dEta and dPhi requirements from the original RoI
-  float dEta = fabs(roiDescriptor->etaPlus() - roiDescriptor->eta());
-  float dPhi = fabs(CxxUtils::wrapToPi(roiDescriptor->phiPlus()-roiDescriptor->phi()));
+  float eta  = roiDescriptor->eta();
+  float phi  = roiDescriptor->phi();
+  float dEta = fabs(roiDescriptor->etaPlus() - eta);
+  float dPhi = fabs(CxxUtils::wrapToPi(roiDescriptor->phiPlus()-phi));
 
+  ATH_MSG_DEBUG( "; RoI ID = " << roiDescriptor->roiId()
+                 << ": Eta = " << eta
+                 << ", Phi = " << phi );
 
   // Make a minimal effort to speed things up ;)
   TLorentzVector myCluster;
@@ -92,11 +93,15 @@ StatusCode TrigTauCaloRoiUpdaterMT::execute() {
     TauDetectorAxis += myCluster;
   } // end loop on clusters
 
+  //Only update the roi if TauDetectorAxis.Pt() is larger than zero, in other words, if the calo clusters sum makes sense
+  if(TauDetectorAxis.Eta()!=roiDescriptor->eta() && TauDetectorAxis.Pt()>0.) eta = TauDetectorAxis.Eta();
+  if(TauDetectorAxis.Eta()!=roiDescriptor->eta() && TauDetectorAxis.Pt()>0.) phi = TauDetectorAxis.Phi();
+
   // Prepare the new RoI
   TrigRoiDescriptor *outRoi = new TrigRoiDescriptor(roiDescriptor->roiWord(), roiDescriptor->l1Id(), roiDescriptor->roiId(),
-                      TauDetectorAxis.Eta(), TauDetectorAxis.Eta()-dEta, TauDetectorAxis.Eta()+dEta,
-                      TauDetectorAxis.Phi(), CxxUtils::wrapToPi(TauDetectorAxis.Phi()-dPhi), CxxUtils::wrapToPi(TauDetectorAxis.Phi()+dPhi),
-                      roiDescriptor->zed() ,roiDescriptor->zedMinus(), roiDescriptor->zedPlus());
+                                                    eta, eta-dEta, eta+dEta,
+                                                    phi, CxxUtils::wrapToPi(phi-dPhi), CxxUtils::wrapToPi(phi+dPhi),
+                                                    roiDescriptor->zed() ,roiDescriptor->zedMinus(), roiDescriptor->zedPlus());
 
   ATH_MSG_DEBUG("Input RoI " << *roiDescriptor);
   ATH_MSG_DEBUG("Output RoI " << *outRoi);
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitorAlgorithm.py
index 9d047e13bd17f03e87b952f33a44c5e8e0af6d11..9f46002882518f1323a101ff4d0ab00b98e1fe44 100644
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitorAlgorithm.py
@@ -366,7 +366,7 @@ if __name__=='__main__':
     # file to be run w/ doRun2 = False
     # file = '/afs/cern.ch/user/e/ebergeas/work/public/triggermonitoring/nightly_2019-10-20T2130/AOD.pool.root'
     # file = '/afs/cern.ch/work/e/enagy/public/GenerateAOD/Gen_MT_240919/AOD.pool.root'
-    file = '/afs/cern.ch/work/e/enagy/public/ARTfiles/MCtest200520.AOD.pool.root'
+    file = '/afs/cern.ch/work/e/enagy/public/ARTfiles/MCtest010720.AOD.pool.root'
     # file to be run w/ doRun2 = True
     # file = '/afs/cern.ch/work/e/enagy/public/GenerateAOD/Gen_ST_240919/AOD.pool.root'
     # file = '/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2019-09-16T2129/TrigAnalysisTest/test_trigAna_q221_RDOtoAOD_mt1_build/AOD.pool.root'
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx
index 52d4c28860d8a108b9ddc189644892995403afac..06de7c3a82a2f0c1dc8e981c309c989a85400392 100755
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx
@@ -1085,7 +1085,7 @@ StatusCode HLTBjetMonTool::book(){
 	  if (ijet == 0) {
 	    std::string vtxname = m_onlineVertexContainerKey.key();
 	    if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4);
-	    auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120
+	    auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620
 	    ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120
 	    const xAOD::Vertex* vtx = *(vertexLinkInfo.link);
 	    ATH_MSG_DEBUG("        PVz_jet from jet link info: " << vtx->z());
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.h b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.h
index d5ad83573d558d25d9f5c953cf41360bca911be1..532affe7b5dd9a1191c442f792758e5d660aa0d7 100755
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.h
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.h
@@ -70,7 +70,7 @@ class HLTBjetMonTool : public IHLTMonTool {
       "The SG key of the online BJet container from the TriggerEDMRun3"};
 
   SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"};
-  SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"};
+  SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; // MS 290620
   SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"};
 
   ToolHandle<Trig::TrigDecisionTool> m_trigDec; //!
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
index c714e534bcd70b7318be4a0ef16993c80e5d8571..aed70bc5133586888ca19f45bc6b10d93241949f 100644
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
@@ -373,7 +373,7 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
 	      std::string vtxname = m_onlineVertexContainerKey.key();
 	      if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4);
 
-	      auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120
+	      auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620
 	      ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120
 	      const xAOD::Vertex* vtx = *(vertexLinkInfo.link);
 	      NameH = "PVz_jet_"+trigName;
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h
index d23758c0211bd4bbddbf6cf878337b42f2cc5db6..9a2f86dd9a72d0f17ec852f349f9785fa0d39dbf 100644
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h
@@ -31,7 +31,7 @@ class TrigBjetMonitorAlgorithm : public AthMonitorAlgorithm {
   std::vector<std::string> m_allChains;
   SG::ReadHandleKey<xAOD::MuonContainer> m_muonContainerKey;
   SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"};
-  SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"};
+  SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; // MS 290620
   SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"};
 
   ToolHandle<Trig::TrigDecisionTool> m_trigDec; //!
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py
index e0e4f1d958d8c6ef7a10607ab591592e9e646015..6d0b93763288429e61a65c848d22695c31c74b6c 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py
@@ -30,17 +30,17 @@ def TrigCaloMonConfig(inputFlags):
 
 
     ################################
-    #     HLT_L2CaloEMClusters     #
+    #     HLT_FastCaloEMClusters     #
     ################################
 
 
 
     # Add monitor algorithm
     from AthenaConfiguration.ComponentFactory import CompFactory
-    L2CaloEMClustersMonAlg = helper.addAlgorithm(CompFactory.HLTCalo_L2CaloEMClustersMonitor, 'HLT_L2CaloEMClustersMonAlg')
+    L2CaloEMClustersMonAlg = helper.addAlgorithm(CompFactory.HLTCalo_L2CaloEMClustersMonitor, 'HLT_FastCaloEMClustersMonAlg')
 
     # Set properties
-    L2CaloEMClustersMonAlg.HLTContainer = 'HLT_L2CaloEMClusters'
+    L2CaloEMClustersMonAlg.HLTContainer = 'HLT_FastCaloEMClusters'
     L2CaloEMClustersMonAlg.OFFContainer = 'egammaClusters'
     L2CaloEMClustersMonAlg.MonGroupName = 'TrigCaloMonitor'
     L2CaloEMClustersMonAlg.OFFTypes = []
@@ -57,7 +57,7 @@ def TrigCaloMonConfig(inputFlags):
     ########################
 
     # Declare HLT histograms
-    hist_path='HLT_L2CaloEMClusters/HLT_Clusters'
+    hist_path='HLT_FastCaloEMClusters/HLT_Clusters'
     L2CaloEMClustersMonGroup.defineHistogram('HLT_num',title='Number of HLT Clusters; Num Clusters; Entries',
                                 path=hist_path,xbins=51,xmin=-0.5,xmax=50.5)
     L2CaloEMClustersMonGroup.defineHistogram('HLT_eta,HLT_phi',title='Number of HLT Clusters; #eta; #phi; ', type='TH2F',
@@ -94,7 +94,7 @@ def TrigCaloMonConfig(inputFlags):
     ########################
 
     # Declare OFF histograms
-    hist_path='HLT_L2CaloEMClusters/OFF_Clusters'
+    hist_path='HLT_FastCaloEMClusters/OFF_Clusters'
     L2CaloEMClustersMonGroup.defineHistogram('OFF_num',title='Number of OFF Clusters; Num Clusters; Entries',
                                 path=hist_path,xbins=101,xmin=-1.0,xmax=201.0)
     L2CaloEMClustersMonGroup.defineHistogram('OFF_eta,OFF_phi',title='Number of OFF Clusters; #eta; #phi; ', type='TH2F',
@@ -115,7 +115,7 @@ def TrigCaloMonConfig(inputFlags):
     ########################
 
     # Declare HLT matched HLT vs. OFF cluster histograms
-    hist_path='HLT_L2CaloEMClusters/HLT_Matched_to_OFF'
+    hist_path='HLT_FastCaloEMClusters/HLT_Matched_to_OFF'
     L2CaloEMClustersMonGroup.defineHistogram('HLT_matched_fraction',title='Fraction of HLT clusters matched to HLT clusters; Matched fraction; Entries',
                                 path=hist_path,xbins=100,xmin=0.0,xmax=1.0)
     L2CaloEMClustersMonGroup.defineHistogram('HLT_vs_OFF_minimum_delta_r',title='HLT vs OFF Cluster #DeltaR; #DeltaR; Entries',
@@ -170,7 +170,7 @@ def TrigCaloMonConfig(inputFlags):
     ########################
 
     # Declare OFF matched HLT vs. OFF cluster histograms
-    hist_path='HLT_L2CaloEMClusters/OFF_Matched_to_HLT'
+    hist_path='HLT_FastCaloEMClusters/OFF_Matched_to_HLT'
     L2CaloEMClustersMonGroup.defineHistogram('OFF_matched_fraction',title='Fraction of OFF clusters matched to HLT clusters; Matched fraction; Entries',
                                 path=hist_path,xbins=100,xmin=0.0,xmax=1.0)
     L2CaloEMClustersMonGroup.defineHistogram('OFF_vs_HLT_minimum_delta_r',title='HLT vs OFF Cluster #DeltaR; #DeltaR; Entries',
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloESD_xAODTrigEMClusters.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloESD_xAODTrigEMClusters.cxx
index e6495986ab93692fde754e792e923abd06938dd4..bf96bf56d4a1ede40222b2531072f7914bf7fa86 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloESD_xAODTrigEMClusters.cxx
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloESD_xAODTrigEMClusters.cxx
@@ -16,7 +16,7 @@ HLTCaloESD_xAODTrigEMClusters::HLTCaloESD_xAODTrigEMClusters(const std::string &
 //m_ShowerShapeTool("egammaShowerShape/egammashowershape")
 {
   declareProperty("HLTContainerRun2", m_HLT_cont_name_run2 = "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma");
-  declareProperty("HLTContainerRun3", m_HLT_cont_name_run3 = "HLT_L2CaloEMClusters");
+  declareProperty("HLTContainerRun3", m_HLT_cont_name_run3 = "HLT_FastCaloEMClusters");
   declareProperty("OFFContainer", m_OFF_cont_name = "egammaClusters");
   declareProperty("MonGroupName", m_mongroup_name = "");
 
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx
index 95bbce37f1a57dbe498e1ff74f595a3cca13b2a5..89587c4d5958dea50fad9049fe70da258d41ff34 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx
@@ -14,7 +14,7 @@ template <typename T> struct clus_kin {
 HLTCalo_L2CaloEMClustersMonitor::HLTCalo_L2CaloEMClustersMonitor( const std::string& name, ISvcLocator* pSvcLocator )
   : AthMonitorAlgorithm(name,pSvcLocator)
 {
-  declareProperty("HLTContainer", m_HLT_cont_key = "HLT_L2CaloEMClusters");
+  declareProperty("HLTContainer", m_HLT_cont_key = "HLT_FastCaloEMClusters");
   declareProperty("OFFContainer", m_OFF_cont_key = "egammaClusters");
   declareProperty("MonGroupName", m_mongroup_name = "TrigCaloMonitor");
 
diff --git a/Trigger/TrigMonitoring/TrigCostMonitor/CMakeLists.txt b/Trigger/TrigMonitoring/TrigCostMonitor/CMakeLists.txt
index 8316f55af58c7c45a182202b549d2ae2d64236ac..ca2f03988a2b635b727ad34d0a405baba544e2a0 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitor/CMakeLists.txt
+++ b/Trigger/TrigMonitoring/TrigCostMonitor/CMakeLists.txt
@@ -6,7 +6,7 @@ atlas_subdir( TrigCostMonitor )
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel CoolApplication )
 find_package( CORAL COMPONENTS CoralBase CoralKernel )
-find_package( ROOT COMPONENTS Core Tree )
+find_package( ROOT COMPONENTS Core Tree XMLIO XMLParser )
 find_package( tdaq-common COMPONENTS CTPfragment )
 
 # Component(s) in the package:
diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx
index ec025a2ece38cb454e5d8475ef0f60f1fa6d0138..49532041f20309e8a14a3dbfc6bbd6926eed5055 100644
--- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx
@@ -160,19 +160,19 @@ asg::AcceptData TrigEgammaMonitorBaseAlgorithm::setAccept( const TrigCompositeUt
     if(!info.trigL1){ // HLT item get full decision
         ATH_MSG_DEBUG("Check for active features: TrigEMCluster,CaloClusterContainer");
 
-        passedL2Calo = match()->ancestorPassed<xAOD::TrigEMClusterContainer>(dec, trigger, "HLT_L2CaloEMClusters");  
+        passedL2Calo = match()->ancestorPassed<xAOD::TrigEMClusterContainer>(dec, trigger, "HLT_FastCaloEMClusters");  
         passedEFCalo = match()->ancestorPassed<xAOD::CaloClusterContainer>(dec, trigger, "HLT_CaloEMClusters");
 
 
         if(info.trigType == "electron"){
             ATH_MSG_DEBUG("Check for active features: TrigElectron, ElectronContainer, TrackParticleContainer");
-            passedL2    = match()->ancestorPassed<xAOD::TrigElectronContainer>(dec, trigger, "HLT_L2Electrons");
+            passedL2    = match()->ancestorPassed<xAOD::TrigElectronContainer>(dec, trigger, "HLT_FastElectrons");
             passedEF    = match()->ancestorPassed<xAOD::ElectronContainer>(dec, trigger, "HLT_egamma_Electrons");
             passedEFTrk = true; //match()->ancestorPassed<xAOD::TrackParticleContainer>(dec);
         }
         else if(info.trigType == "photon"){
             ATH_MSG_DEBUG("Check for active features: TrigPhoton, PhotonContainer");
-            passedL2 = match()->ancestorPassed<xAOD::TrigPhotonContainer>(dec, trigger, "HLT_L2Photons");
+            passedL2 = match()->ancestorPassed<xAOD::TrigPhotonContainer>(dec, trigger, "HLT_FastPhotons");
             passedEF = match()->ancestorPassed<xAOD::PhotonContainer>(dec, trigger, "HLT_egamma_Photons");
             passedEFTrk=true;// Assume true for photons
         }
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
index d7a0bce9ca4d6512b899638f85288e9070abf790..385550cc37c974db2c1b6f07ea79db373fbad2a1 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
@@ -182,16 +182,11 @@ 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" ),
-  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]",
@@ -206,10 +201,6 @@ ExtraSmallROnlineHists = [
   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",
 ]
@@ -217,6 +208,17 @@ ExtraSmallROnlineHists = [
 ExtraLargeROnlineHists = [
 ]
 
+#Additional online & offline histograms to include kinematics at various jet calibration scales
+OfflineScaleMomenta = [ "ConstitScale", "EMScale", "PileupScale", "EtaJESScale"]
+OnlineScaleMomenta = [ "ConstitScale" ]
+
+for var in [ "pt", "eta", "m" ]:
+  for offlinescale in OfflineScaleMomenta:
+    ExtraOfflineHists.append("Jet"+offlinescale+"Momentum_"+var)
+  for onlinescale in OnlineScaleMomenta:
+    ExtraSmallROnlineHists.append("Jet"+onlinescale+"Momentum_"+var)
+
+
 def jetMonitoringConfig(inputFlags,jetcoll,athenaMT):
    '''Function to configures some algorithms in the monitoring system.'''
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx
index a36468add57c6f9fbd9a4d37468154db3ba77422..1e054c510fcb1a0609dd999da0fc2b5ffad57911 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/CommonMon.cxx
@@ -1409,10 +1409,18 @@ StatusCode HLTMuonMonTool::fillCommonDQA()
   }
 
   std::vector<std::string> vs_ESnoniso;
-  vs_ESnoniso.push_back("HLT_mu8");   // for HI, but HI does not use iso
-  vs_ESnoniso.push_back("HLT_mu14");  // for EnhancedBias
-  vs_ESnoniso.push_back("HLT_mu26");
-  vs_ESnoniso.push_back("HLT_mu24");      
+  if (getTDT()->getNavigationFormat() == "TriggerElement") {
+    vs_ESnoniso.push_back("HLT_mu8");   // for HI, but HI does not use iso
+    vs_ESnoniso.push_back("HLT_mu14");  // for EnhancedBias
+    vs_ESnoniso.push_back("HLT_mu26");
+    vs_ESnoniso.push_back("HLT_mu24");  
+  }
+  else{
+    vs_ESnoniso.push_back("HLT_mu8_L1MU6");   
+    vs_ESnoniso.push_back("HLT_mu14_L1MU10");  
+    vs_ESnoniso.push_back("HLT_mu26_L1MU20");
+    vs_ESnoniso.push_back("HLT_mu24_L1MU20");  
+  }    
       
   std::vector<std::string> vs_EStag;
   //vs_EStag.push_back("HLT_mu24_muCombTag_NoEF_tight"); // pp v4
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx
index 3e8d5c063653c546bf03a78b016b701ad891fee5..affd288ed12d2f32cb9881a15b176294779c819b 100644
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx
@@ -3,6 +3,9 @@
 */
 #include <algorithm>
 #include <regex>
+
+#include<boost/algorithm/string.hpp>
+
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/Property.h"
 #include "AthenaInterprocess/Incidents.h"
@@ -57,15 +60,28 @@ StatusCode TrigSignatureMoniMT::start() {
     }
 
     if( gotL1Menu && !chain.l1item().empty() ) {
+      bool isMultiItemSeeded = chain.l1item().find(',') != std::string::npos;
       try {
-	TrigConf::L1Item item = l1MenuHandle->item(chain.l1item());
-	for ( const std::string & group : item.bunchgroups() ) {
-	  if ( group != "BGRP0" ) {
-	    m_chainIDToBunchMap[HLT::Identifier(chain.name())].insert(group);
-	  }
-	}
-      } catch(...) {
-	ATH_MSG_WARNING("The item " << chain.l1item() << " is not part of the L1 menu" );
+        std::vector<std::string> seedingItems{};
+        if( isMultiItemSeeded ) {
+          boost::split(seedingItems, chain.l1item(), boost::is_any_of(","));
+        } else {
+          seedingItems = { chain.l1item() };
+        }
+        for( const std::string & itemName : seedingItems ) {
+          TrigConf::L1Item item = l1MenuHandle->item(itemName);
+          for ( const std::string & group : item.bunchgroups() ) {
+            if ( group != "BGRP0" ) {
+              m_chainIDToBunchMap[HLT::Identifier(chain.name())].insert(group);
+            }
+          }
+        }
+      } catch(std::exception & ex) {
+        if( isMultiItemSeeded ) {
+          ATH_MSG_INFO("The L1 seed to multi-item-seeded chain " << chain.name() << " could not be completely resolved. This is currently OK. Exception from menu access: " << ex.what());
+        } else {
+          ATH_MSG_WARNING("The L1 seed to chain " << chain.name() << " could not be resolved. Exception from menu access: " << ex.what());
+        }
       }
     }
   }
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h
index 4ed41f5a1df2e076e24607e3043cb404cdba4edc..2a6719055479f6c09b978b58c57897da87112296 100644
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h
@@ -7,6 +7,7 @@
 #include <string>
 #include <mutex>
 #include <memory>
+#include <vector>
 #include <TH2.h>
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
diff --git a/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py b/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py
index 9e55a14576a9a4388e5234bd7cd698631bb0561a..a774de1d5ae7eef2c23ca3bcd2e441a75a70ffff 100644
--- a/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py
+++ b/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py
@@ -127,9 +127,10 @@ class L1Decoder(CompFactory.L1Decoder) :
         ctpUnpacker = CompFactory.CTPUnpackingTool()
 
         self.ctpUnpacker = ctpUnpacker
+        from TrigEDMConfig.TriggerEDMRun3 import recordable
         self.roiUnpackers += [ CompFactory.FSRoIsUnpackingTool("FSRoIsUnpackingTool",
                                                                Decisions=mapThresholdToL1DecisionCollection("FSNOSEED"),
-                                                               OutputTrigRoIs = mapThresholdToL1RoICollection("FSNOSEED") ) ]
+                                                               OutputTrigRoIs = recordable(mapThresholdToL1RoICollection("FSNOSEED") )) ]
         # EM unpacker
         if TriggerFlags.doID() or TriggerFlags.doCalo():
             unpackers, rerunUnpackers = createCaloRoIUnpackers()
@@ -151,7 +152,7 @@ class L1Decoder(CompFactory.L1Decoder) :
         self.L1DecoderSummaryKey = "L1DecoderSummary"
 
 
-def L1DecoderCfg(flags):
+def L1DecoderCfg(flags, seqName = None):
     from AthenaCommon.Configurable import Configurable
     Configurable.configurableRun3Behavior += 1
 
@@ -160,7 +161,7 @@ def L1DecoderCfg(flags):
     #from L1Decoder.L1DecoderConf import L1Decoder, CTPUnpackingTool
     from L1Decoder.L1DecoderMonitoring import CTPUnpackingMonitoring
 
-    acc = ComponentAccumulator()
+    acc = ComponentAccumulator(sequenceName = seqName)
 
     decoderAlg = CompFactory.L1Decoder()
     decoderAlg.RoIBResult = "RoIBResult" if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1Phase1 else ""
@@ -168,18 +169,20 @@ def L1DecoderCfg(flags):
     decoderAlg.L1DecoderSummaryKey = "L1DecoderSummary" # Transient, consumed by DecisionSummaryMakerAlg
     decoderAlg.ctpUnpacker = CompFactory.CTPUnpackingTool( ForceEnableAllChains = flags.Trigger.L1Decoder.forceEnableAllChains,
                                                MonTool = CTPUnpackingMonitoring(512, 200) )
+    #Transient bytestream
+    if flags.Input.Format == "POOL":
+        transTypeKey = ("TransientBSOutType","StoreGateSvc+TransientBSOutKey")
+        decoderAlg.ExtraInputs += [transTypeKey]
 
 
-
-    decoderAlg.roiUnpackers += [ CompFactory.FSRoIsUnpackingTool("FSRoIsUnpackingTool", Decisions=mapThresholdToL1DecisionCollection("FSNOSEED") ) ]
+    from TrigEDMConfig.TriggerEDMRun3 import recordable
+    decoderAlg.roiUnpackers += [ CompFactory.FSRoIsUnpackingTool("FSRoIsUnpackingTool", Decisions=mapThresholdToL1DecisionCollection("FSNOSEED"),
+                                  OutputTrigRoIs = recordable(mapThresholdToL1RoICollection("FSNOSEED")) ) ]
 
     unpackers, rerunUnpackers = createCaloRoIUnpackers()
     decoderAlg.roiUnpackers += unpackers
     decoderAlg.rerunRoiUnpackers += rerunUnpackers
 
-    from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg, TGCCablingConfigCfg
-    acc.merge( TGCCablingConfigCfg( flags ) )
-    acc.merge( RPCCablingConfigCfg( flags ) )
     unpackers, rerunUnpackers = createMuonRoIUnpackers()
     decoderAlg.roiUnpackers += unpackers
     decoderAlg.rerunRoiUnpackers += rerunUnpackers
@@ -188,22 +191,25 @@ def L1DecoderCfg(flags):
     decoderAlg.DoCostMonitoring = flags.Trigger.CostMonitoring.doCostMonitoring
     decoderAlg.CostMonitoringChain = flags.Trigger.CostMonitoring.chain
 
-    from TrigConfigSvc.TrigConfigSvcCfg import TrigConfigSvcCfg, HLTPrescaleCondAlgCfg
-    acc.merge( TrigConfigSvcCfg( flags ) )
-    acc.merge( HLTPrescaleCondAlgCfg( flags ) )
+    acc.addEventAlgo( decoderAlg, sequenceName = seqName )
 
     if flags.Input.Format == "BS":
         # Add the algorithm decoding ByteStream into xAOD (Run-3 L1) and/or RoIBResult (legacy L1)
         from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamDecoderCfg
-        acc.merge( L1TriggerByteStreamDecoderCfg(flags) )
+        acc.merge( L1TriggerByteStreamDecoderCfg(flags), sequenceName = seqName )
 
     # Add the algorithm creating L1TriggerResult which is the input to L1Decoder (Run-3 L1)
     if flags.Trigger.enableL1Phase1:
-        acc.addEventAlgo( getL1TriggerResultMaker() )
+        acc.addEventAlgo( getL1TriggerResultMaker(), sequenceName = seqName )
+
+    from TrigConfigSvc.TrigConfigSvcCfg import TrigConfigSvcCfg, HLTPrescaleCondAlgCfg
+    acc.merge( TrigConfigSvcCfg( flags ) )
+    acc.merge( HLTPrescaleCondAlgCfg( flags ) )
+
 
     Configurable.configurableRun3Behavior -= 1
 
-    return acc,decoderAlg
+    return acc
 
 if __name__ == "__main__":
     from AthenaCommon.Configurable import Configurable
@@ -213,8 +219,11 @@ if __name__ == "__main__":
     ConfigFlags.Trigger.L1Decoder.forceEnableAllChains= True
     ConfigFlags.Input.Files= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1",]
     ConfigFlags.lock()
-    acc, alg = L1DecoderCfg( ConfigFlags )
-    acc.addEventAlgo(alg)
+    acc = L1DecoderCfg( ConfigFlags )
+    from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg, TGCCablingConfigCfg
+    acc.merge( TGCCablingConfigCfg( ConfigFlags ) )
+    acc.merge( RPCCablingConfigCfg( ConfigFlags ) )
+
 
     f=open("L1DecoderConf.pkl","wb")
     acc.store(f)
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h
index fa3fff465c6b4a2b0dc2b9cc85bbcd3a941eb2e4..1f62fa70f4aadd7dad301cbd3bb6f8baaaf0d750 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h
@@ -202,10 +202,10 @@ namespace TrigCompositeUtils {
 
     
   /**
-   * @brief traverses TC links for another TC fufilling the prerequisite specified by the filter
-   * @return matching TC or nullptr
+   * @brief traverses Decision object links for another Decision object fufilling the prerequisite specified by the filter
+   * @return matching Decision object or nullptr
    **/
-  const xAOD::TrigComposite* find(const xAOD::TrigComposite*, const std::function<bool(const xAOD::TrigComposite*)>& filter);
+  const Decision* find(const Decision*, const std::function<bool(const Decision*)>& filter);
 
   /**
    * @brief Prerequisite object usable with @see filter allowing to find TC having a link to an object of name
@@ -220,7 +220,7 @@ namespace TrigCompositeUtils {
      * @brief checks if the arg TC has link of name specified at construction 
      * @warning method for internal consumption within @see find function 
      **/
-    bool operator()(const xAOD::TrigComposite* ) const;
+    bool operator()(const Decision* ) const;
   private:
     std::string m_name;
   };
@@ -235,10 +235,10 @@ namespace TrigCompositeUtils {
      **/
     HasObjectCollection(const std::string& name): m_name(name) {}
     /**
-     * @brief checks if the arg TC has link collection of name specified at construction 
+     * @brief checks if the arg Decision object has link collection of name specified at construction 
      * @warning method for internal consumption within @see find function 
      **/
-    bool operator()(const xAOD::TrigComposite* ) const;
+    bool operator()(const Decision* ) const;
   private:
     std::string m_name;
   };
@@ -286,13 +286,13 @@ namespace TrigCompositeUtils {
   };
 
   /**
-   * @brief Helper to keep the TC & object it has linked together (for convenience)
+   * @brief Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGroup) linked together (for convenience)
    **/
   template<typename T>
   struct LinkInfo {
     LinkInfo()
       : source{0} {}
-    LinkInfo(const xAOD::TrigComposite *s, const ElementLink<T>& l, ActiveState as = ActiveState::UNSET)
+    LinkInfo(const Decision* s, const ElementLink<T>& l, ActiveState as = ActiveState::UNSET)
       : source{s}, link{l}, state{as} {}
 
     bool isValid() const {
@@ -305,7 +305,7 @@ namespace TrigCompositeUtils {
       return (isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
     }
 
-    const xAOD::TrigComposite *source;
+    const Decision* source;
     ElementLink<T> link;
     ActiveState state;
   };
@@ -345,45 +345,60 @@ namespace TrigCompositeUtils {
     const DecisionIDContainer chainIDs = DecisionIDContainer());
 
   /**
-   * @brief search back the TC links for the object of type T linked to the one of TC (recursively).
+   * @brief Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision object 'start' 
    * For the case of multiple links, this function only returns the first one found. @see findLinks
-   * @arg start the TC  from where the link back is to be looked for
-   * @arg linkName the name with which the Link was added to the source TC
-   * @arg suppressMultipleLinksWarning findLink will print a warning if more than one link is found, this can be silenced here
-   * @return pair of link and TC with which it was associated, 
+   * @param[in] start the Decision Object from where recursive search should begin
+   * @param[in] linkName the name of the ElementLink stored inside one or more DecisionObjects.
+   * @param[in] suppressMultipleLinksWarning findLink will print a warning if more than one ElementLink is found, this can be silenced here.
+   * @return LinkInfo A wrapper around an ElementLink and the location in the graph 
    */
   template<typename T>
   LinkInfo<T>
-  findLink(const xAOD::TrigComposite* start, const std::string& linkName, const bool suppressMultipleLinksWarning = false);
+  findLink(const Decision* start, 
+    const std::string& linkName, 
+    const bool suppressMultipleLinksWarning = false);
 
   /**
    * @brief search back the TC links for the object of type T linked to the one of TC (recursively)
-   * Populates provided vector with all located links to T of the corresponding name. 
-   * @arg start the TC  from where the link back is to be looked for
-   * @arg linkName the name with which the Link was added to the source TC
-   * @arg links Reference to vector, this will be populated with the found links. 
+   * Populates provided vector with all located links to T of the corresponding linkName. 
+   * @param[in] start the Decision Object from where recursive search should begin
+   * @param[in] linkName the name of the ElementLink stored inside one or more DecisionObjects.
+   * @param[inout] links Reference to vector, this will be populated with the found links. 
+   * @param[in] behaviour TrigDefs::allFeaturesOfType to explore all branches of the navigation graph all the
+                          way back to the L1 decoder, or TrigDefs::lastFeatureOfType to exit early from each
+                          branch once a link has been located and collected. 
+   * @param[inout] visitedCache Optional cache used by the recursive algorithm to avoid exploring each node multiple times. 
    */
   template<typename T>
   void
-  findLinks(const xAOD::TrigComposite* start, const std::string& linkName, std::vector<LinkInfo<T>>& links, unsigned int behaviour = TrigDefs::allFeaturesOfType);
+  findLinks(const Decision* start, 
+    const std::string& linkName,
+    std::vector<LinkInfo<T>>& links, 
+    unsigned int behaviour = TrigDefs::allFeaturesOfType, 
+    std::set<const xAOD::TrigComposite*>* visitedCache = nullptr);
 
   /**
    * @brief search back the TC links for the object of type T linked to the one of TC (recursively)
    * This version returns a vector rather than requiring that one be passed to it. 
-   * @arg start the TC  from where the link back is to be looked for
-   * @arg linkName the name with which the Link was added to the source TC
+   * @param[in] start the Decision Object from where recursive search should begin
+   * @param[in] linkName the name of the ElementLink stored inside one or more DecisionObjects.
+   * @param[in] behaviour TrigDefs::allFeaturesOfType to explore all branches of the navigation graph all the
+                          way back to the L1 decoder, or TrigDefs::lastFeatureOfType to exit early from each
+                          branch once a link has been located and collected. 
    * @return Vector with the found links. 
    */
   template<typename T>
   std::vector<LinkInfo<T>>
-  findLinks(const xAOD::TrigComposite* start, const std::string& linkName, unsigned int behaviour = TrigDefs::allFeaturesOfType);
+  findLinks(const Decision* start,
+    const std::string& linkName,
+    unsigned int behaviour = TrigDefs::allFeaturesOfType);
 
 
   /**
-   * Prints the TC including the linked seeds
+   * Prints the Decision object including the linked seeds
    * @warnign expensive call
    **/  
-  std::string dump( const xAOD::TrigComposite*  tc, std::function< std::string( const xAOD::TrigComposite* )> printerFnc );
+  std::string dump( const Decision*  tc, std::function< std::string( const Decision* )> printerFnc );
 
 
   
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index 7233c3560bf92bc0c595959e2c4984a07224bb16..87952570993f30e5c47f9f1477c7a0d01eb785a6 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -24,7 +24,7 @@ namespace TrigCompositeUtils {
 
   /**
    * @brief Creates and right away records the Container CONT with the key.
-   * With Aux store.
+   * With Aux store. 
    * Returns the WriteHandle. 
    * If possible provide the context that comes via an argument to execute otherwise it will default to looking it up which is slower.
    **/
@@ -42,8 +42,18 @@ namespace TrigCompositeUtils {
 
   template<typename T>
   void
-  findLinks(const xAOD::TrigComposite* start, const std::string& linkName, std::vector<LinkInfo<T>>& links, unsigned int behaviour) {
+  findLinks(const Decision* start, const std::string& linkName, std::vector<LinkInfo<T>>& links, unsigned int behaviour, std::set<const Decision*>* visitedCache) {
+    if (visitedCache != nullptr) {
+      // We only need to recursivly explore back from each node in the graph once.
+      // We can keep a record of nodes which we have already explored, these we can safely skip over.
+      if (visitedCache->count(start) == 1) {
+        return; // Early exit
+      } else {
+        visitedCache->insert(start);
+      }
+    }
     ElementLinkVector<T> featureLinks;
+    //
     if (start->hasObjectCollectionLinks(linkName, ClassID_traits<T>::ID())) {
       featureLinks = start->objectCollectionLinks<T>(linkName);
     }
@@ -90,16 +100,23 @@ namespace TrigCompositeUtils {
 
   template<typename T>
   std::vector<LinkInfo<T>>
-  findLinks(const xAOD::TrigComposite* start, const std::string& linkName, unsigned int behaviour) {
+  findLinks(const Decision* start, const std::string& linkName, unsigned int behaviour) {
     std::vector<LinkInfo<T>> links;
-    findLinks(start, linkName, links, behaviour);
+    std::set<const Decision*> visitedCache;
+    findLinks(start, linkName, links, behaviour, &visitedCache);
     return links;
   }
 
   template<typename T>
   LinkInfo<T>
-  findLink(const xAOD::TrigComposite* start, const std::string& linkName, const bool suppressMultipleLinksWarning) {
-    std::vector<LinkInfo<T>> links = findLinks<T>(start, linkName);
+  findLink(const Decision* start, const std::string& linkName, const bool suppressMultipleLinksWarning) {
+    // We use findLink in cases where there is only one link to be found, or if there are multiple then we 
+    // only want the most recent.
+    // Hence we can supply TrigDefs::lastFeatureOfType.                                                         /--> parent3(link)
+    // We can still have more then one link found if there is a branch in the navigation. E.g. start --> parent1 --> parent2(link)
+    // If both parent2 and parent3 posessed an admisable ElementLink, then the warning below will trigger, and only one of the
+    // links will be returned (whichever of parent2 or parent3 happened to be the first seed of parent1).
+    std::vector<LinkInfo<T>> links = findLinks<T>(start, linkName, TrigDefs::lastFeatureOfType);
     if (links.size() > 1 && !suppressMultipleLinksWarning) {
       MsgStream(Athena::getMessageSvc(), "TrigCompositeUtils::findLink") << MSG::WARNING
         << links.size() << " links found for " << linkName
diff --git a/Trigger/TrigSteer/TrigOutputHandling/share/test.txt b/Trigger/TrigSteer/TrigOutputHandling/share/test.txt
index eb7583d4f75ca3a9d9c0361a5a9ad4032f02bc34..071e555cf8d367f53df0a59b78d3876f0ee3a118 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/share/test.txt
+++ b/Trigger/TrigSteer/TrigOutputHandling/share/test.txt
@@ -8,7 +8,7 @@ deserialised2.ModuleID=1;
 
 ToolSvc.serialiser.OutputLevel=1;
 ToolSvc.serialiser.CollectionsToSerialize = ["xAOD::TrigEMClusterContainer#EMClusters;0",
-                                        "xAOD::TrigEMClusterAuxContainer#EMClustersAux.viewIndex.testFloat.rawEt.testSmallFloat;0",
+                                        "xAOD::TrigEMClusterAuxContainer#EMClustersAux.viewIndex.testFloat.rawEt.testSmallFloat.testTypedElementLink;0",
 					"xAOD::TrigCompositeContainer_v1#EMClustersDecisions;0,1",
 					"xAOD::TrigCompositeAuxContainer_v2#EMClustersDecisionsAux.detail1.detail2;0,1",
 					"TrigRoiDescriptorCollection_p3#RoIDescriptors;0"];
@@ -20,6 +20,6 @@ ToolSvc.serialiser.TrigSerTPTool.OutputLevel=1;
 ToolSvc.schemaTest.OutputLevel=1;
 ToolSvc.schemaTest.SaveDynamic=0;
 ToolSvc.schemaTest.CollectionsToSerialize = ["xAOD::TrigEMClusterContainer#EMClusters;0",
-                                        "xAOD::TrigEMClusterAuxContainer#EMClustersAux.viewIndex.testFloat.rawEt.testSmallFloat;0",
+                                        "xAOD::TrigEMClusterAuxContainer#EMClustersAux.viewIndex.testFloat.rawEt.testSmallFloat.testTypedElementLink;0",
 					"xAOD::TrigCompositeContainer_v1#EMClustersDecisions;0,1",
 					"xAOD::TrigCompositeAuxContainer_v2#EMClustersDecisionsAux.detail1.detail2;0,1"];
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
index 5e6d421213f59c0ed9d202a08fab7893f2ac8338..c4a9f0f24ebfa3d9ac3303f78ec23e9ea6a28e4d 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
@@ -16,20 +16,20 @@ HLTEDMCreator::HLTEDMCreator( const std::string& type,
 
 template<typename T>
 StatusCode HLTEDMCreator::initHandles( const HandlesGroup<T>&  handles ) {
-  CHECK( handles.out.initialize() );
+  ATH_CHECK( handles.out.initialize() );
   renounceArray( handles.out );
-  CHECK( handles.in.initialize() );
+  ATH_CHECK( handles.in.initialize() );
   renounceArray( handles.in );
-  CHECK( handles.views.initialize() );  
+  ATH_CHECK( handles.views.initialize() );
   renounceArray( handles.views );
 
   // the case w/o reading from views, both views handles and collection in views should be empty
   if ( handles.views.size() == 0 ) {
-    CHECK( handles.in.size() == 0 );
+    ATH_CHECK( handles.in.size() == 0 );
   } else {
     // the case with views, for every output we expect an input View and an input collection inside that View
-    CHECK( handles.out.size() == handles.in.size() );
-    CHECK( handles.in.size()  == handles.views.size() );
+    ATH_CHECK( handles.out.size() == handles.in.size() );
+    ATH_CHECK( handles.in.size()  == handles.views.size() );
   }
   return StatusCode::SUCCESS;
 }
@@ -66,10 +66,10 @@ StatusCode HLTEDMCreator::initialize()
   // this section has to appear after the above initialisation of DecorHandles, else the renounce of TrigComposite does not work as expected
 
 #define INIT(__TYPE) \
-  CHECK( initHandles( HandlesGroup<__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ) ) );
+  ATH_CHECK( initHandles( HandlesGroup<__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ) ) );
 
 #define INIT_XAOD(__TYPE) \
-  CHECK( initHandles( HandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ) ) );
+  ATH_CHECK( initHandles( HandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ) ) );
 
   INIT( TrigRoiDescriptorCollection );
   INIT_XAOD( TrigCompositeContainer );
@@ -95,14 +95,17 @@ StatusCode HLTEDMCreator::initialize()
   INIT_XAOD( TrigBphysContainer );  
   INIT_XAOD( BTaggingContainer );
   INIT_XAOD( BTagVertexContainer );
-
   INIT_XAOD( CaloClusterContainer );
 
 #undef INIT
 #undef INIT_XAOD
 
-
-
+  ATH_CHECK( m_CaloClusterContainerShallowCopy.initialize() );
+  renounceArray( m_CaloClusterContainerShallowCopy );
+  for ( auto k: m_CaloClusterContainerShallowCopy )
+    m_CaloClusterContainerShallowCopyOut.push_back(k.key());
+  ATH_CHECK( m_CaloClusterContainerShallowCopyOut.initialize() );
+  renounceArray( m_CaloClusterContainerShallowCopyOut );
   
   return StatusCode::SUCCESS;
 }
@@ -160,9 +163,9 @@ StatusCode  HLTEDMCreator::viewsMerge( ViewContainer const& views, const SG::Rea
   
   typedef typename T::base_value_type type_in_container;
   StoreGateSvc* sg = evtStore().operator->(); // why the get() method is returing a null ptr is a puzzle, we have to use this ugly call to operator instead of it
-  CHECK( sg != nullptr );
+  ATH_CHECK( sg != nullptr );
   ViewHelper::ViewMerger merger( sg, msg() );
-  CHECK( merger.mergeViewCollection<type_in_container>( views, inViewKey, context, output ) );
+  ATH_CHECK( merger.mergeViewCollection<type_in_container>( views, inViewKey, context, output ) );
 
   return StatusCode::SUCCESS;
 }
@@ -296,14 +299,14 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const Co
       if ( viewsHandle.isValid() ) {
 	SG::ReadHandleKey<T> inViewReadHandleKey = handles.in.at(i);
 	ATH_MSG_DEBUG("Will be merging from " << viewsHandle->size() << " views using in-view key " << inViewReadHandleKey.key() );
-	CHECK( (this->*merger)( *viewsHandle, inViewReadHandleKey , context, *generator.data.get() ) );
+	ATH_CHECK( (this->*merger)( *viewsHandle, inViewReadHandleKey , context, *generator.data.get() ) );
       } else {
 	ATH_MSG_DEBUG("Views " << viewsReadHandleKey.key() << " are missing. Will leave " << writeHandleKey.key() << " output collection empty.");
       }
     }
 
     auto writeHandle = SG::makeHandle( writeHandleKey, context );
-    CHECK( generator.record( writeHandle ) );
+    ATH_CHECK( generator.record( writeHandle ) );
   }
 
   return StatusCode::SUCCESS;
@@ -319,7 +322,7 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
 #define CREATE(__TYPE) \
     {                 \
       plainGenerator<__TYPE> generator;         \
-      CHECK( createIfMissing<__TYPE>( context, ConstHandlesGroup<__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<__TYPE> ) ); \
+      ATH_CHECK( createIfMissing<__TYPE>( context, ConstHandlesGroup<__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<__TYPE> ) ); \
     }
 
   CREATE( TrigRoiDescriptorCollection )
@@ -329,14 +332,14 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
 #define CREATE_XAOD(__TYPE, __STORE_TYPE) \
   { \
     xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE> generator; \
-    CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::viewsMerge<xAOD::__TYPE> )  ); \
+    ATH_CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::viewsMerge<xAOD::__TYPE> )  ); \
   }
 
 
 #define CREATE_XAOD_NO_MERGE(__TYPE, __STORE_TYPE)      \
   { \
     xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE> generator; \
-    CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<xAOD::__TYPE> )  ); \
+    ATH_CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<xAOD::__TYPE> )  ); \
   }
   
   CREATE_XAOD_NO_MERGE( TrigCompositeContainer, TrigCompositeAuxContainer );
@@ -370,6 +373,20 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
 #undef CREATE_XAOD
 #undef CREATE_XAOD_NO_MERGE
 
+  // special cases
+  {
+    for ( size_t index = 0; index < m_CaloClusterContainerShallowCopy.size(); ++index ){
+      auto readHandle = SG::makeHandle<xAOD::CaloClusterContainer> (  m_CaloClusterContainerShallowCopy[index], context );
+      if ( not readHandle.isValid() ) { // collection is missing
+	ATH_MSG_DEBUG( "Creating missing CaloClusterContainerShallowCopy " <<  m_CaloClusterContainerShallowCopy[index].key() );
+	auto writeHandle = SG::makeHandle( m_CaloClusterContainerShallowCopyOut[index], context );
+	ATH_CHECK( writeHandle.record( std::move( std::make_unique<xAOD::CaloClusterContainer>()), std::move(std::make_unique<xAOD::ShallowAuxContainer>()) ));
+      } else {
+	ATH_MSG_DEBUG( "CaloClusterContainerShallowCopy " <<  m_CaloClusterContainerShallowCopyOut[index].key() << " present in the event, done nothing");
+      }
+    }
+  }
+
   if ( m_dumpSGAfter )  
     ATH_MSG_DEBUG( evtStore()->dump() );
 
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
index 0e700a28e6a158f93d55a0269950d9b315984a77..1a11e35a67488cd84973f53e3932446dd65cdd80 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
@@ -17,7 +17,6 @@
 #include "AthViews/View.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
-
 #include "xAODTrigger/TrigCompositeContainer.h"
 #include "xAODTrigger/TrigCompositeAuxContainer.h"
 #include "xAODTrigEgamma/TrigElectronContainer.h"
@@ -32,7 +31,7 @@
 #include "xAODTrigCalo/TrigEMClusterAuxContainer.h"
 #include "xAODTrigCalo/TrigCaloClusterContainer.h"
 #include "xAODTrigCalo/TrigCaloClusterAuxContainer.h"
-// Ringer
+
 #include "xAODTrigRinger/TrigRingerRingsContainer.h"
 #include "xAODTrigRinger/TrigRingerRingsAuxContainer.h"
 
@@ -66,6 +65,7 @@
 
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODTrigCalo/CaloClusterTrigAuxContainer.h"
+#include "xAODCore/ShallowAuxContainer.h"
 
 /**
  * @class HLTEDMCreator
@@ -145,6 +145,11 @@ class HLTEDMCreator: public extends<AthAlgTool, IHLTOutputTool>  {
 #undef DEF_KEY
 #undef DEF_XAOD_KEY
 
+
+  // special cases coded by hand (container not in views
+  SG::ReadHandleKeyArray<xAOD::CaloClusterContainer> m_CaloClusterContainerShallowCopy{ this, "CaloClusterContainerShallowCopy", {}, "Required collections of xAOD::CaloClusterContainer wiht Aux of type ShallowAuxContainer"};
+  SG::WriteHandleKeyArray<xAOD::CaloClusterContainer> m_CaloClusterContainerShallowCopyOut;
+
   template<typename T>
   struct HandlesGroup {
     HandlesGroup(SG::WriteHandleKeyArray<T>& out_,
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMCLIDs.h b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMCLIDs.h
index 044ed571c4aaf23d775394a08e78ae477bba0a82..c8591932244e9bfd6065a4e8a843e5bb2afd16bb 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMCLIDs.h
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMCLIDs.h
@@ -8,13 +8,13 @@
 #include "AthLinks/ElementLink.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
+
 #include "xAODBTagging/BTaggingContainer.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODJet/JetContainer.h"
 #include "xAODTracking/VertexContainer.h"
 #include "xAODBTagging/BTagVertexContainer.h"
 
-
 /**
  * @File TriggerEDMCLIDs.h
  * @brief Declaration of additional types which can be serialised.
@@ -22,6 +22,7 @@
  **/
 
 CLASS_DEF( std::vector<ElementLink<TrigRoiDescriptorCollection> >, 78044011, 1 )
+
 CLASS_DEF( std::vector<ElementLink<xAOD::BTaggingContainer>>, 1289383075, 1 )
 CLASS_DEF( std::vector<std::vector<ElementLink<xAOD::TrackParticleContainer>>>, 1188795373, 1 )
 CLASS_DEF( std::vector<ElementLink<xAOD::JetContainer>>, 1210667800, 1 )
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
index d1f06281dd9647a534cec89cbc1ccc86448461bf..e5f4ed71f450743b658560d647ab847daaa45a3a 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
@@ -147,7 +147,7 @@ StatusCode TriggerEDMDeserialiserAlg::deserialise(   const Payload* dataptr  ) c
       ATH_MSG_ERROR( "Deserialisation of object of CLID " << clid << " and transientTypeName " << transientTypeName << " # " << key << " failed" );
       ATH_CHECK(false);
     }
-    const bool isxAODInterfaceContainer = transientTypeName.find("xAOD")   != std::string::npos and transientTypeName.find("Aux") == std::string::npos;
+    const bool isxAODInterfaceContainer = transientTypeName.find("xAOD")   != std::string::npos and transientTypeName.find("Aux") == std::string::npos and transientTypeName.find("ElementLink") == std::string::npos;
     const bool isxAODAuxContainer       = transientTypeName.find("xAOD")   != std::string::npos and transientTypeName.find("Aux") != std::string::npos;
     const bool isxAODDecoration	        = transientTypeName.find("vector") != std::string::npos;
     const bool isTPContainer	        = persistentTypeName.find("_p")	   != std::string::npos;
@@ -215,7 +215,7 @@ StatusCode TriggerEDMDeserialiserAlg::deserialiseDynAux( const std::string& tran
   SG::AuxTypeRegistry& registry = SG::AuxTypeRegistry::instance();     
   SG::auxid_t id = registry.findAuxID ( decorationName );
   if (id != SG::null_auxid ) {
-    if ( stripStdVec( registry.getVecTypeName(id) ) != stripStdVec(transientTypeName) ) {
+    if ( stripStdVec( registry.getVecTypeName(id) ) != stripStdVec(transientTypeName) and transientTypeName.find("ElementLink") == std::string::npos ) {
       ATH_MSG_INFO( "Schema evolution required for decoration \"" << decorationName << "\" from " << transientTypeName << " to "  <<  registry.getVecTypeName( id ) << " not handled yet"); 
       return StatusCode::SUCCESS;
     }
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
index 0a5bb8896630d5113091787cc94174a59e80aa79..3caf691d7b397c2fc31922ff2b5d0e7116ca9a19 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
@@ -98,7 +98,7 @@ StatusCode TriggerEDMSerialiserTool::addCollectionToSerialise(const std::string&
     ATH_MSG_ERROR( "Can not find CLID for " << transientType << " that is needed for serialisation " << key );
     return StatusCode::FAILURE;
   }
-
+  ATH_MSG_VERBOSE("Decoded transient type: " << transientType << " with the CLID " << clid );
   if ( transientType == configuredType ) {
     std::string realTypeName;
     if( m_clidSvc->getTypeInfoNameOfID( clid, realTypeName ).isFailure() ) {
@@ -106,12 +106,12 @@ StatusCode TriggerEDMSerialiserTool::addCollectionToSerialise(const std::string&
       return StatusCode::FAILURE;
     }
     persistentType = transientType + version( realTypeName );
+    ATH_MSG_VERBOSE(transientType << " = "<< configuredType << " thus obtained real type name from clid svc " << realTypeName << " forming persistent type name "<< persistentType );
   } else {
     persistentType = configuredType;
   }
 
   ATH_MSG_DEBUG( "Persistent type: " << persistentType );
-  ATH_CHECK( persistentType.find("_") != std::string::npos );
 
   RootType classDesc = RootType::ByNameNoQuiet( persistentType );
   if ( ! classDesc.IsComplete() ) {
@@ -205,21 +205,21 @@ StatusCode TriggerEDMSerialiserTool::serialiseDynAux( DataObject* dObj, const Ad
 
   for (SG::auxid_t auxVarID : selected ) {
 
-    const std::string typeName = SG::AuxTypeRegistry::instance().getVecTypeName(auxVarID);
     const std::string decorationName = SG::AuxTypeRegistry::instance().getName(auxVarID);
     const std::type_info* tinfo = auxStoreIO->getIOType (auxVarID);
-
+    const std::string typeName = SG::AuxTypeRegistry::instance().getVecTypeName(auxVarID);
+    const std::string fullTypeName = System::typeinfoName( *tinfo );
 
     ATH_CHECK( tinfo != nullptr );
     TClass* cls = TClass::GetClass (*tinfo);
     ATH_CHECK( cls != nullptr );
     ATH_MSG_DEBUG( "" );
-    ATH_MSG_DEBUG( "Streaming " << decorationName << " of type " << typeName  << " aux ID " << auxVarID << " class " << cls->GetName() );
+    ATH_MSG_DEBUG( "Streaming '" << decorationName << "' of type '" << typeName 
+      << "' fulltype '" << fullTypeName << "' aux ID '" << auxVarID << "' class '" << cls->GetName() );
 
     CLID clid;
-    if ( m_clidSvc->getIDOfTypeName(typeName, clid).isFailure() )  {
-      ATH_MSG_ERROR( "Can not obtain CLID of: " << typeName );
-      return StatusCode::FAILURE;
+    if ( m_clidSvc->getIDOfTypeName(typeName, clid).isFailure() )  { // First try
+      ATH_CHECK( m_clidSvc->getIDOfTypeInfoName(fullTypeName, clid) ); // Second try
     }
     ATH_MSG_DEBUG( "CLID " << clid );
 
@@ -523,5 +523,7 @@ std::string TriggerEDMSerialiserTool::version( const std::string& name ) const {
     size_t start = name.find("_");
     return name.substr( start, name.find(">") - start );
   }
-  return name.substr( name.find("_") );
+  if ( name.find("_") != std::string::npos )
+    return name.substr( name.find("_") );
+  return "";
 }
diff --git a/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx b/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx
index eb33ab78636f11d0c2a16abea058ee3604471869..b7db2dcb7294461545980e367b6a4ec2e74ead3d 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx
@@ -21,6 +21,8 @@
 #include "xAODTrigger/TrigCompositeContainer.h"
 #include "xAODTrigger/TrigCompositeAuxContainer.h"
 
+#include "xAODBTagging/BTaggingContainer.h"
+
 #include "../src/TriggerEDMSerialiserTool.h"
 #include "../src/TriggerEDMDeserialiserAlg.h"
 
@@ -111,6 +113,7 @@ void testTrigEMContainerInsert(StoreGateSvc* pStore) {
   SG::AuxElement::Accessor< int >   viewIndex( "viewIndex" );
   SG::AuxElement::Accessor< float > testFloat( "testFloat" );
   SG::AuxElement::Accessor< float > testSmallFloat( "testSmallFloat" );
+  SG::AuxElement::Accessor< ElementLink<xAOD::BTaggingContainer> > testTypedElementLink( "testTypedElementLink" );
 
 
   auto fill = [&]( double x) {
@@ -136,6 +139,7 @@ void testTrigEMContainerInsert(StoreGateSvc* pStore) {
       viewIndex( *cluster ) = x+1; // for sake of change add 1
       testFloat( *cluster ) = float(x)+0.1; // for sake of change add 0.1
       testSmallFloat( *cluster ) = float(x);
+      testTypedElementLink( *cluster ) = ElementLink<xAOD::BTaggingContainer>(123, 456);
     };
 
 
@@ -165,6 +169,7 @@ void testTrigEMContainerReadAndCheck(StoreGateSvc* pStore) {
   SG::AuxElement::ConstAccessor< int > viewIndexReader( "viewIndex" );
   SG::AuxElement::ConstAccessor< float > testFloatReader( "testFloat" );
   SG::AuxElement::ConstAccessor< float > testSmallFloatReader( "testSmallFloat" );
+  SG::AuxElement::ConstAccessor< ElementLink<xAOD::BTaggingContainer> > testTypedElementLinkReader( "testTypedElementLink" );
 
   VALUE ( emback->size() ) EXPECTED ( 30 ); // as many fills were made
 
@@ -176,12 +181,14 @@ void testTrigEMContainerReadAndCheck(StoreGateSvc* pStore) {
     float fl = testFloatReader( *cl );
     float smallFl = testSmallFloatReader( *cl );
     float rawEt = cl->rawEt();
+    ElementLink<xAOD::BTaggingContainer> el = testTypedElementLinkReader( *cl );
 
     std::cout << vi << " " << fl << " " << rawEt << " ";
     VALUE( vi ) EXPECTED ( i + 1 );
     VALUE( fl ) EXPECTED ( 0.1 + i );
     VALUE( (smallFl - i) < 0.1 ) EXPECTED ( true );  // precision is poor because we decided to reduce space for this variable
     VALUE( rawEt ) EXPECTED ( i - 0.2 );
+    VALUE( el ) EXPECTED ( ElementLink<xAOD::BTaggingContainer>(123, 456) );
   }
   std::cout << std::endl;
 }
diff --git a/Trigger/TrigT1/L1Common/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/L1Common/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..98169f72a7f63a241e27e3f334ef9f06aed98fc0
--- /dev/null
+++ b/Trigger/TrigT1/L1Common/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/L1Common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py b/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py
index 8fc58f1ae4cb90934cd4d12487be30a826644c38..467cfed83f99583070fb77f546f932d968d30e9c 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/share/L1Simulation_topOptions.py
@@ -1,6 +1,5 @@
 include.block ("L1TopoSimulation/L1Simulation_topOptions.py")
 
-svcMgr.CoreDumpSvc.FatalHandler = 438
 import traceback
 
 from AthenaCommon.Logging import logging
diff --git a/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..cef590503543f9f3ab13d2916ae0dba479cd2555
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloCalibAthenaPool
diff --git a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..84108d866a38ea17acf5434e4674aa33a55416a8
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloCalibToolInterfaces
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt
index dea05e30876b4d07b4727f0cf3df81f56a26543e..5c9ff5adc62e1bc85886fef65665c9acba755939 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt
@@ -12,7 +12,7 @@ atlas_add_library( TrigT1CaloCalibToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS TrigT1CaloCalibTools
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AsgTools AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib DerivationFrameworkInterfaces GaudiKernel Identifier LArCablingLib LArElecCalib LArIdentifier LArRawEvent LArRecConditions StoreGateLib TileConditionsLib TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1CaloUtilsLib TrigT1Interfaces xAODTrigL1Calo
+                   LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AsgTools AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib CxxUtils DerivationFrameworkInterfaces GaudiKernel Identifier LArCablingLib LArElecCalib LArIdentifier LArRawEvent LArRecConditions StoreGateLib TileConditionsLib TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1CaloUtilsLib TrigT1Interfaces xAODTrigL1Calo
                    PRIVATE_LINK_LIBRARIES AthenaMonitoringLib EventInfo LWHists )
 
 atlas_add_component( TrigT1CaloCalibTools
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h
index 12b5b5e7575de2ca20da37740723c914cd8e613d..30793d03584dabe8071463b66ef15643b46bf5b3 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.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 _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOCELLS2TRIGGERTOWERS_H_
@@ -8,6 +8,7 @@
 // Athena Includes
 #include "AsgTools/AsgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "CxxUtils/checker_macros.h"
 #include "StoreGate/StoreGateSvc.h"
 
 // Calo includes
@@ -47,7 +48,9 @@
   */
 
 namespace LVL1 {
-class L1CaloCells2TriggerTowers final : virtual public IL1CaloCells2TriggerTowers, public asg::AsgTool
+
+class ATLAS_NOT_THREAD_SAFE   // use of LArCablingBase
+L1CaloCells2TriggerTowers final : virtual public IL1CaloCells2TriggerTowers, public asg::AsgTool
 {
   /// Create a proper constructor for Athena
   ASG_TOOL_CLASS( L1CaloCells2TriggerTowers , LVL1::IL1CaloCells2TriggerTowers )
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h
index 0324a1222bb79718d792a545102b6e7326a0164f..e27c105778b1fa2b27a24a63ae518f7c64962b79 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.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 _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOLARTOWERENERGY_H_
@@ -8,6 +8,7 @@
 // Athena includes
 #include "AsgTools/AsgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "CxxUtils/checker_macros.h"
 #include "StoreGate/StoreGateSvc.h"
 
 #include "Identifier/Identifier.h"
@@ -40,7 +41,8 @@
 
 namespace LVL1 {
 
-class L1CaloLArTowerEnergy : virtual public IL1CaloLArTowerEnergy, public asg::AsgTool
+class ATLAS_NOT_THREAD_SAFE   // use of LArCablingBase
+L1CaloLArTowerEnergy : virtual public IL1CaloLArTowerEnergy, public asg::AsgTool
 {
   /// Create a proper constructor for Athena
   ASG_TOOL_CLASS( L1CaloLArTowerEnergy , LVL1::IL1CaloLArTowerEnergy )
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h
index cb833277f7d5e08b96508f01a9e6b6a63f997e7b..fbf55e5fe6d63d63c4da6f3a4ef8d03f719621f7 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.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
 */
 
 // ********************************************************
@@ -66,6 +66,7 @@
 
 #include "TrigT1CaloMonitoringTools/TrigT1CaloLWHistogramTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "CxxUtils/checker_macros.h"
 
 class TTree;
 class TFile;
@@ -111,7 +112,7 @@ public:
    StatusCode Fill(const L1CaloCoolChannelId& coolId,const unsigned int timeSlice,const unsigned int rodHeaderStep,const int adc);
    StatusCode Fill(const L1CaloCoolChannelId& coolId,const unsigned int rodHeaderStep,const std::vector<int> adc);
    
-   StatusCode Finalize(void);
+   StatusCode Finalize ATLAS_NOT_REENTRANT(void);
    
    TProfile* GetRawSignalShape(const L1CaloCoolChannelId& coolId){return GetMapIterator(coolId)->second->GetRawSignalShape();};
    unsigned int GetRawMaxPeakBin(const L1CaloCoolChannelId& coolId){return GetMapIterator(coolId)->second->GetRawMaxPeakBin();};
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h
index fa709b934a6e37c2fc07b825d7f37fc2d257a2bd..a81603779d53ef6c7ddf67c412a46195bbea5640 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h
@@ -58,11 +58,11 @@ namespace DerivationFramework {
     double m_minRandom;
 
     // Counters
-    mutable unsigned long m_nEventsProcessed;
-    mutable unsigned long m_nEventsAllTriggerTowersKeptByRandom;
-    mutable unsigned long m_nTriggerTowersProcessed;
-    mutable unsigned long m_nTriggerTowersKept;
-    mutable unsigned long m_nTriggerTowersRejected;
+    mutable std::atomic<unsigned long> m_nEventsProcessed;
+    mutable std::atomic<unsigned long> m_nEventsAllTriggerTowersKeptByRandom;
+    mutable std::atomic<unsigned long> m_nTriggerTowersProcessed;
+    mutable std::atomic<unsigned long> m_nTriggerTowersKept;
+    mutable std::atomic<unsigned long> m_nTriggerTowersRejected;
 
     // Tools and random number generator
     TRandom3* m_random;
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx
index a00492c4171f2e5a652a932db9b37c0f7ed6cbf6..0c5f9fdf1c31d4b54fa3891ef72d22d4830b4db3 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.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 "TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h"
@@ -231,7 +231,7 @@ StatusCode L1CaloPprPhos4ShapeCollection::Fill(const L1CaloCoolChannelId& coolId
    return itr->second->Fill(rodHeaderStep, adc);
 }
 
-StatusCode L1CaloPprPhos4ShapeCollection::Finalize(void) {
+StatusCode L1CaloPprPhos4ShapeCollection::Finalize ATLAS_NOT_REENTRANT(void) {
 
    // want to store the profiles and histograms for each cool id into
    // a TTree, which will be output to a file.
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt
index 44651b2ef6596a626ac881719db57ab36f969655..6e5b814fd23a6bc6fc3b18204367168d0409e614 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt
@@ -16,7 +16,7 @@ atlas_add_library( TrigT1CaloCalibUtilsLib
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloIdentifier CaloTriggerToolLib EventInfo GaudiKernel Identifier LArCablingLib LArElecCalib RegistrationServicesLib StoreGateLib TrigConfHLTData TrigConfL1Data TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolsLib TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib xAODTrigL1Calo
+                   LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloIdentifier CaloTriggerToolLib CxxUtils EventInfo GaudiKernel Identifier LArCablingLib LArElecCalib RegistrationServicesLib StoreGateLib TrigConfHLTData TrigConfL1Data TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolsLib TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib xAODTrigL1Calo
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloDetDescrLib CaloEvent TrigT1CaloToolInterfaces TrigT1Interfaces xAODEventInfo )
 
 atlas_add_component( TrigT1CaloCalibUtils
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..03ad5ea50020526e489f574d40168b359fc7810e
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloCalibUtils
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h
index 25f944f7dda793cd577a637cf676c43a1be9d2e4..93e7853e378901141ff0cd1cd10e2c73ca97d7c3 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.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,8 @@
 #include <map>
 
 // Athena includes
-#include "AthenaBaseComps/AthAlgorithm.h"  
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "CxxUtils/checker_macros.h"
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 
@@ -65,11 +66,10 @@ class L1CaloPprPhos4ShapeMaker : public AthAlgorithm
 public:
    // These are the standard Athena public member functions.
    L1CaloPprPhos4ShapeMaker(const std::string& name, ISvcLocator* pSvcLocator);
-   virtual ~L1CaloPprPhos4ShapeMaker(){};
 
-   virtual StatusCode initialize();
-   virtual StatusCode execute();
-   virtual StatusCode finalize();
+   virtual StatusCode initialize() override;
+   virtual StatusCode execute() override;
+   virtual StatusCode finalize ATLAS_NOT_THREAD_SAFE() override;
        
 private:
    // Unless you provide a class with a default constructor, copy constructor and copy asignment operator
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.cxx
index 5d2aafe406920a6c12a826b185de9e8c52c2899e..c4b152758cf81dbc9c16eeae8b8fffd949423726 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.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 "TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h"
@@ -431,7 +431,7 @@ StatusCode L1CaloPprPhos4ShapeMaker::execute(){
    return StatusCode::SUCCESS;
 }
 
-StatusCode L1CaloPprPhos4ShapeMaker::finalize(){
+StatusCode L1CaloPprPhos4ShapeMaker::finalize ATLAS_NOT_THREAD_SAFE(){
    // Place your post-event-loop code here
    ATH_MSG_INFO("In finalize()");
    
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.cxx
index 7aecf0681cdb54e805f14a10bc4e02dd73f1355c..3e852a5f9fce2473082ef64c1d5fab9408c370fc 100755
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.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 "TrigT1CaloCalibUtils/L1CaloRampMaker.h"
@@ -37,8 +37,8 @@
 
 // define Accessors
 namespace {
-xAOD::TriggerTower::ConstAccessor<float> ttCellsEnergy("CaloCellEnergy");
-xAOD::TriggerTower::ConstAccessor<float> ttCellsET("CaloCellET");
+  const xAOD::TriggerTower::ConstAccessor<float> ttCellsEnergy("CaloCellEnergy");
+  const xAOD::TriggerTower::ConstAccessor<float> ttCellsET("CaloCellET");
 }
 
 L1CaloRampMaker::L1CaloRampMaker(const std::string& name, ISvcLocator* pSvcLocator)
diff --git a/Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..b512f3b52a08f5a5f95423d947df0788de64a3bf
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloEvent
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py b/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py
index e45055c60fd38d68c7325a3e925f72e1bf23c6f0..34d39834237ef615cfbaf2d344dfad9d85c8eca5 100644
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py
+++ b/Trigger/TrigT1/TrigT1CaloMonitoring/python/PprMonitorAlgorithm.py
@@ -57,52 +57,72 @@ def PprMonitoringConfig(inputFlags):
     #######################   
     # PPM inputs (LUT-CP) #
     #######################
-    histPath = trigPath+'/LUT-CP'
+    histPath = trigPath+'/LUT-CP/Distributions'
     
     # EM distributions
-    myGroup.defineHistogram('etaTT_EM;h_ppm_em_1d_tt_lutcp_Eta', title='EM LUT-CP: Distribution of peak in #eta; #eta', type='TH1F', path=histPath+'/Distributions', xbins=etabins, cutmask='mask_EM_cpET_0_noPhi')
+    myGroup.defineHistogram('etaTT_EM;h_ppm_em_1d_tt_lutcp_Eta', title='EM LUT-CP: Distribution of peak in #eta; #eta', type='TH1F', path=histPath, xbins=etabins, cutmask='mask_EM_cpET_0_noPhi')
 
-    myGroup.defineHistogram('phiTT_1d_EM;h_ppm_em_1d_tt_lutcp_Phi', title='EM LUT-CP: Distribution of peak in #phi; #phi', type='TH1F', path=histPath+'/Distributions', xbins=phibins, xmin=phimin, xmax=phimax_1d, cutmask='mask_EM_cpET_0_phiBins')
+    myGroup.defineHistogram('phiTT_1d_EM;h_ppm_em_1d_tt_lutcp_Phi', title='EM LUT-CP: Distribution of peak in #phi; #phi', type='TH1F', path=histPath, xbins=phibins, xmin=phimin, xmax=phimax_1d, cutmask='mask_EM_cpET_0_phiBins')
  
-    myGroup.defineHistogram('cpET_EM;h_ppm_em_1d_tt_lutcp_Et', title='EM LUT-CP: Distribution of peak; EM LUT peak [GeV/2]', type='TH1F', path=histPath+'/Distributions', xbins=maxEnergyRange-1, xmin=1, xmax=maxEnergyRange, cutmask='mask_EM_cpET_0_noPhi')
+    myGroup.defineHistogram('cpET_EM;h_ppm_em_1d_tt_lutcp_Et', title='EM LUT-CP: Distribution of peak; EM LUT peak [GeV/2]', type='TH1F', path=histPath, xbins=maxEnergyRange-1, xmin=1, xmax=maxEnergyRange, cutmask='mask_EM_cpET_0_noPhi')
 
+    # HAD distributions
+    myGroup.defineHistogram('etaTT_HAD;h_ppm_had_1d_tt_lutcp_Eta', title='HAD LUT-CP: Distribution of peak in #eta; #eta', type='TH1F', path=histPath, xbins=etabins, cutmask='mask_HAD_cpET_0_noPhi')
+
+    myGroup.defineHistogram('phiTT_1d_HAD;h_ppm_had_1d_tt_lutcp_Phi', title='HAD LUT-CP: Distribution of peak in #phi; #phi', type='TH1F', path=histPath, xbins=phibins, xmin=phimin, xmax=phimax_1d, cutmask='mask_HAD_cpET_0_phiBins')
+ 
+    myGroup.defineHistogram('cpET_HAD;h_ppm_had_1d_tt_lutcp_Et', title='HAD LUT-CP: Distribution of peak; HAD LUT peak [GeV/2]', type='TH1F', path=histPath, xbins=maxEnergyRange-1, xmin=1, xmax=maxEnergyRange, cutmask='mask_HAD_cpET_0_noPhi')
 
     # Eta-phi maps
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_lutcp_AverageEt', title='EM Average LUT-CP Et for Et > 5 GeV/2', type='TH2F', path=histPath+'/EtaPhiMaps', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_cpET_5_phiBins', weight='cpET_EM')
+    histPath = trigPath+'/LUT-CP/EtaPhiMaps'
+
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_lutcp_AverageEt', title='EM Average LUT-CP Et for Et > 5 GeV/2', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_cpET_5_phiBins', weight='cpET_EM')
+    
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_lutcp_AverageEt', title='HAD Average LUT-CP Et for Et > 5 GeV/2', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_cpET_5_phiBins', weight='cpET_HAD')
+
     
- 
     ########################   
     # PPM inputs (LUT-JEP) #
     ########################
-    histPath = trigPath+'/LUT-JEP'
+    histPath = trigPath+'/LUT-JEP/Distributions'
     
     # EM distributions
-    myGroup.defineHistogram('etaTT_EM;h_ppm_em_1d_tt_lutjep_Eta', title='EM LUT-JEP: Distribution of peak in #eta', type='TH1F', path=histPath+'/Distributions', xbins=etabins, cutmask='mask_EM_jepET_0_noPhi')
+    myGroup.defineHistogram('etaTT_EM;h_ppm_em_1d_tt_lutjep_Eta', title='EM LUT-JEP: Distribution of peak in #eta', type='TH1F', path=histPath, xbins=etabins, cutmask='mask_EM_jepET_0_noPhi')
 
-    myGroup.defineHistogram('phiTT_1d_EM;h_ppm_em_1d_tt_lutjep_Phi', title='EM LUT-JEP: Distribution of peak in #phi; #phi', type='TH1F', path=histPath+'/Distributions', xbins=phibins, xmin=phimin, xmax=phimax_1d, cutmask='mask_EM_jepET_0_phiBins')
+    myGroup.defineHistogram('phiTT_1d_EM;h_ppm_em_1d_tt_lutjep_Phi', title='EM LUT-JEP: Distribution of peak in #phi; #phi', type='TH1F', path=histPath, xbins=phibins, xmin=phimin, xmax=phimax_1d, cutmask='mask_EM_jepET_0_phiBins')
 
-    myGroup.defineHistogram('jepET_EM;h_ppm_em_1d_tt_lutjep_Et', title='EM LUT-JEP: Distribution of peak; EM LUT peak [GeV]', type='TH1F', path=histPath+'/Distributions', xbins=maxEnergyRange-1, xmin=1, xmax=maxEnergyRange, cutmask='mask_EM_jepET_0_noPhi')   
+    myGroup.defineHistogram('jepET_EM;h_ppm_em_1d_tt_lutjep_Et', title='EM LUT-JEP: Distribution of peak; EM LUT peak [GeV]', type='TH1F', path=histPath, xbins=maxEnergyRange-1, xmin=1, xmax=maxEnergyRange, cutmask='mask_EM_jepET_0_noPhi')   
+
+    # HAD distributions
+    myGroup.defineHistogram('etaTT_HAD;h_ppm_had_1d_tt_lutjep_Eta', title='HAD LUT-JEP: Distribution of peak in #eta', type='TH1F', path=histPath, xbins=etabins, cutmask='mask_HAD_jepET_0_noPhi')
+
+    myGroup.defineHistogram('phiTT_1d_HAD;h_ppm_had_1d_tt_lutjep_Phi', title='HAD LUT-JEP: Distribution of peak in #phi; #phi', type='TH1F', path=histPath, xbins=phibins, xmin=phimin, xmax=phimax_1d, cutmask='mask_HAD_jepET_0_phiBins')
+
+    myGroup.defineHistogram('jepET_HAD;h_ppm_had_1d_tt_lutjep_Et', title='HAD LUT-JEP: Distribution of peak; HAD LUT peak [GeV]', type='TH1F', path=histPath, xbins=maxEnergyRange-1, xmin=1, xmax=maxEnergyRange, cutmask='mask_HAD_jepET_0_noPhi')   
 
     # Eta-phi maps
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_lutjep_AverageEt', title='EM Average LUT-JEP Et for Et > 5 GeV', type='TH2F', path=histPath+'/EtaPhiMaps', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_jepET_5_phiBins', weight='jepET_EM')
+    histPath = trigPath+'/LUT-JEP/EtaPhiMaps'
+
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_lutjep_AverageEt', title='EM Average LUT-JEP Et for Et > 5 GeV', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_jepET_5_phiBins', weight='jepET_EM')
+
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_lutjep_AverageEt', title='HAD Average LUT-JEP Et for Et > 5 GeV', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_jepET_5_phiBins', weight='jepET_HAD')
 
-    
 
     ####################
     # PPM inputs (ADC) #
     ####################
-    histPath = trigPath+'/ADC'
+    histPath = trigPath+'/ADC/EtaPhiMaps'
     
     # EM tower maps 
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_adc_HitMap', title='#eta - #phi map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath+'/EtaPhiMaps', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice') 
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_adc_HitMap', title='#eta - #phi map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice') 
    
-    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath+'/EtaPhiMaps', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice', weight='emTT_ADC') 
+    myGroup.defineHistogram('etaTT_EM,phiTT_2d_EM;h_ppm_em_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of EM FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_EM_timeslice', weight='emTT_ADC') 
 
  
     # HAD tower maps 
-    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_adc_HitMap', title='#eta - #phi map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath+'/EtaPhiMaps', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice')
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_adc_HitMap', title='#eta - #phi map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice')
  
-    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath+'/EtaPhiMaps', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice', weight='hadTT_ADC')
+    myGroup.defineHistogram('etaTT_HAD,phiTT_2d_HAD;h_ppm_had_2d_etaPhi_tt_adc_ProfileHitMap', title='#eta - #phi profile map of HAD FADC > ' +str(threshADC)+ ' for triggered timeslice; Tower #eta; Tower #phi', type='TH2F', path=histPath, xbins=etabins, ybins=phibins, ymin=phimin, ymax=phimax_2d, cutmask='mask_HAD_timeslice', weight='hadTT_ADC')
  
   
     
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/src/PprMonitorAlgorithm.cxx b/Trigger/TrigT1/TrigT1CaloMonitoring/src/PprMonitorAlgorithm.cxx
index 9ec864201c7db8aa10af47dda8fef25717b3a0be..831506ae818541562945776ef81ac53c7d874a4d 100644
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/src/PprMonitorAlgorithm.cxx
+++ b/Trigger/TrigT1/TrigT1CaloMonitoring/src/PprMonitorAlgorithm.cxx
@@ -98,7 +98,13 @@ StatusCode PprMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
   auto phiTT_1d_HAD = Monitored::Collection("phiTT_1d_HAD", vecMonTT_HAD, []( const auto &hadTower ){return hadTower.phi1d;});
   variables.push_back(phiTT_1d_HAD);
 
-  // Cutmasks
+  auto cpET_HAD = Monitored::Collection("cpET_HAD", vecMonTT_HAD, []( const auto &hadTower ){return hadTower.tower->cpET();});
+  variables.push_back(cpET_HAD);
+
+  auto jepET_HAD = Monitored::Collection("jepET_HAD", vecMonTT_HAD, []( const auto &hadTower ){return hadTower.jepET;});
+  variables.push_back(jepET_HAD);
+
+  // Cutmasks (EM)
   std::vector<int> vec_EM_timeslice = {};
   std::vector<int> vec_EM_cpET_0 = {};             // includes "duplicate" towers for phi maps
   std::vector<int> vec_EM_cpET_0_noDuplicates = {}; // no duplicates: for plots not binned in phi
@@ -115,8 +121,6 @@ StatusCode PprMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
 
   for (auto& emTower : vecMonTT_EM) {
   
-  
-    
     // -------- LUT --------
     int cpET = (emTower.tower)->cpET();
     int jepET = emTower.jepET;
@@ -155,15 +159,41 @@ StatusCode PprMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
    
   } // End loop over vector of EM towers 
 
-  // HAD cutmasks 
+  // Cutmasks (HAD)
   std::vector<int> vec_HAD_timeslice = {};
+  std::vector<int> vec_HAD_cpET_0 = {};             // includes "duplicate" towers for phi maps
+  std::vector<int> vec_HAD_cpET_0_noDuplicates = {}; // no duplicates: for plots not binned in phi
+  std::vector<int> vec_HAD_cpET_5 = {};
+  std::vector<int> vec_HAD_cpET_5_noDuplicates = {};
+  std::vector<int> vec_HAD_jepET_0 = {};
+  std::vector<int> vec_HAD_jepET_0_noDuplicates = {};
+  std::vector<int> vec_HAD_jepET_5 = {};
+  std::vector<int> vec_HAD_jepET_5_noDuplicates = {};
+
 
   // HAD weights 
   std::vector<int> vec_HAD_ADC = {};
 
   for (auto& hadTower : vecMonTT_HAD) {
 
-    // Timeslice 
+    // -------- LUT --------
+    int cpET = (hadTower.tower)->cpET();
+    int jepET = hadTower.jepET;
+    bool isDuplicate = hadTower.isDuplicate;
+
+    if (cpET > 0) ATH_MSG_DEBUG("HAD tower cpET: " << cpET << " jepET: " << jepET);
+
+    // Fill the cutmasks for HAD LUT-CP and LUT-JEP energy distributions 
+    vec_HAD_cpET_0.push_back(cpET > 0);                                  // For phi distributions / maps
+    vec_HAD_cpET_0_noDuplicates.push_back((cpET > 0) && !isDuplicate);   // For plots not binned in phi
+    vec_HAD_cpET_5.push_back(cpET > 5);
+    vec_HAD_cpET_5_noDuplicates.push_back((cpET > 5) && !isDuplicate);
+    vec_HAD_jepET_0.push_back(jepET > 0);
+    vec_HAD_jepET_0_noDuplicates.push_back((jepET > 0) && !isDuplicate);
+    vec_HAD_jepET_5.push_back(jepET > 5);
+    vec_HAD_jepET_5_noDuplicates.push_back((jepET > 5) && !isDuplicate);
+
+    // -------- ADC hitmaps per timeslice -------- 
     unsigned int tslice = (hadTower.tower)->adcPeak();
     unsigned int adcSize = ((hadTower.tower)->adc()).size();
 
@@ -223,6 +253,31 @@ StatusCode PprMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
   auto hadTT_ADC = Monitored::Collection("hadTT_ADC", vec_HAD_ADC);
   variables.push_back(hadTT_ADC);
 
+  auto mask_HAD_cpET_0_phiBins = Monitored::Collection("mask_HAD_cpET_0_phiBins", vec_HAD_cpET_0);
+  variables.push_back(mask_HAD_cpET_0_phiBins);
+
+  auto mask_HAD_cpET_0_noPhi = Monitored::Collection("mask_HAD_cpET_0_noPhi", vec_HAD_cpET_0_noDuplicates);
+  variables.push_back(mask_HAD_cpET_0_noPhi);
+
+  auto mask_HAD_cpET_5_phiBins = Monitored::Collection("mask_HAD_cpET_5_phiBins", vec_HAD_cpET_5);
+  variables.push_back(mask_HAD_cpET_5_phiBins);
+
+  auto mask_HAD_cpET_5_noPhi = Monitored::Collection("mask_HAD_cpET_5_noPhi", vec_HAD_cpET_5_noDuplicates);
+  variables.push_back(mask_HAD_cpET_5_noPhi);
+
+  auto mask_HAD_jepET_0_phiBins = Monitored::Collection("mask_HAD_jepET_0_phiBins", vec_HAD_jepET_0);
+  variables.push_back(mask_HAD_jepET_0_phiBins);
+
+  auto mask_HAD_jepET_0_noPhi = Monitored::Collection("mask_HAD_jepET_0_noPhi", vec_HAD_jepET_0_noDuplicates);
+  variables.push_back(mask_HAD_jepET_0_noPhi);
+
+  auto mask_HAD_jepET_5_phiBins = Monitored::Collection("mask_HAD_jepET_5_phiBins", vec_HAD_jepET_5);
+  variables.push_back(mask_HAD_jepET_5_phiBins);
+
+  auto mask_HAD_jepET_5_noPhi = Monitored::Collection("mask_HAD_jepET_5_noPhi", vec_HAD_jepET_5_noDuplicates);
+  variables.push_back(mask_HAD_jepET_5_noPhi);
+
+
   fill(m_packageName, variables);
   variables.clear();
   return StatusCode::SUCCESS;
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoringTools/TrigT1CaloMonitoringTools/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloMonitoringTools/TrigT1CaloMonitoringTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..53397ca4d1fc16048a7c84294af7555fbeda7791
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloMonitoringTools/TrigT1CaloMonitoringTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloMonitoringTools
diff --git a/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..9429994cf2d9941233b2649c62dfc92ac683c149
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloToolInterfaces
diff --git a/Trigger/TrigT1/TrigT1CaloTools/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..d26ab96957ac884512240eacc110d29051fe3eef
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloTools
diff --git a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..0290e04599e7ffe2e6419068061e363ab9b4ebe8
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1CaloUtils
diff --git a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h
index 3c278b02840dc2913ca5e41acc28323e5af05a87..1f9ebdb98afd083f119b4975eb913c3c0b3f365b 100755
--- a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h
+++ b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.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
 */
 /***************************************************************************
                           BinAndCoord.h  -  description
@@ -37,13 +37,13 @@ class BinAndCoord {
 public:
   BinAndCoord(int phiBin, int etaBin, Coordinate* centralCoords):
 	m_phiBin(phiBin), m_etaBin(etaBin), m_centralCoords(centralCoords){} ;
-  virtual ~BinAndCoord(){ delete m_centralCoords;};
+  ~BinAndCoord(){ delete m_centralCoords;};
 
 	
 public:	
 	int phiBin() const {return m_phiBin;};
 	int etaBin() const {return m_etaBin;};
-	Coordinate* coords() const {return m_centralCoords;};
+	const Coordinate* coords() const {return m_centralCoords;};
 
 private:
  	
diff --git a/Trigger/TrigT1/TrigT1EventTPCnv/TrigT1EventTPCnv/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1EventTPCnv/TrigT1EventTPCnv/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..afad21f4121a5ef41a0cb531a9861e17ff3e30a8
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1EventTPCnv/TrigT1EventTPCnv/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1EventTPCnv
diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..7b2e4fe99288363d76f87b3105408a7ee20fa149
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1Interfaces
diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h
index b3ae7e8a37133be91509edab55f738404f8a9964..31f5a4eb039cba40bf8f520db5b55608e2c779b6 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h
+++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h
@@ -1,8 +1,7 @@
-// Dear emacs, this is -*- c++ -*-
-#ifndef TRIGT1INTERFACES_CTPSLINK_H
 /*
-  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 TRIGT1INTERFACES_CTPSLINK_H
 #define TRIGT1INTERFACES_CTPSLINK_H
 
 // std include(s):
@@ -67,7 +66,7 @@ namespace LVL1CTP {
       unsigned int getSize() const;
 
       //! retrieve CTP version number
-     unsigned int getCTPVersionNumber() const { return m_ctpVersionNumber;}
+      unsigned int getCTPVersionNumber() const { return m_ctpVersionNumber;}
      
       /* access data content */
 
@@ -116,10 +115,10 @@ namespace LVL1CTP {
       unsigned int m_ctpVersionNumber;
       CTPdataformatVersion *  m_ctpVersion;
       
-      mutable unsigned int m_wordsPerHeader;         //!< number of words per header
-      mutable unsigned int m_wordsPerDataElement;    //!< number of words per data element
-      mutable unsigned int m_wordsPerTrailer;        //!< number of words per trailer
-      mutable unsigned int m_wordsPerCTPSLink;       //!< number of words per CTPSLink
+      unsigned int m_wordsPerHeader;         //!< number of words per header
+      unsigned int m_wordsPerDataElement;    //!< number of words per data element
+      unsigned int m_wordsPerTrailer;        //!< number of words per trailer
+      unsigned int m_wordsPerCTPSLink;       //!< number of words per CTPSLink
 
       //! convert data contetn into string (used by dump and print)
       const std::string convert(std::vector<uint32_t> data,
diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TMUtil.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TMUtil.h
deleted file mode 100644
index accd3b0766a870c9ad8ca0e545eb36ec72e0b243..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TMUtil.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Dear emacs, this is -*- c++ -*-
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-#ifndef TRIGT1INTERFACES_TMUTIL_H
-#define TRIGT1INTERFACES_TMUTIL_H
-
-// WARNING This is a legacy class used by many of the old configuration classes.
-// WARNING It will likely be removed soon. Any needed functionality should be put into
-// WARNING other places.
-
-// STL include(s):
-#include <string>
-
-// External include(s):
-#include "xercesc/dom/DOMNode.hpp"
-
-namespace LVL1CTP {
-
-   /**
-    *  @short Legacy class lingering around hopefully unused...
-    *
-    *         TMUtil is a helper class which does things like conversion from
-    *         XML DOM strings to normal strings etc. I want to get rid of that
-    *         class in the long run, and some parts of it are really nastily
-    *         written ....
-    *
-    * @author Thomas Schoerner-Sadenius <thomas.schoerner@cern.ch>
-    *
-    * $Revision: 187728 $
-    * $Date: 2009-05-27 18:18:06 +0200 (Wed, 27 May 2009) $
-    */
-   class TMUtil {
-
-   public:
-      /** Method returning a string representing a bit pattern for a given
-          integer argument. The second argument is the number of bits to use */
-      static std::string intToBits( unsigned int, int );
-
-      /* ???? */
-      static int powerOfInt( const int );
-
-      /** Translates a XML string to an integer */
-      static int DOMToInt( const XMLCh* );
-
-      /** Converts a XML string to a normal std::string */
-      static std::string utilTranscode( const XMLCh * );
-
-      /// comparison between Nodename and string
-      static bool compareNodeNameString( const xercesc::DOMNode*, const std::string& );
-
-      /// get GeV value from a XML string
-      static float getGevValue( const XMLCh* );
-
-      /** Calculates an uint from a string containing only numbers */
-      static unsigned int uintFromString( std::string );
-
-      /* ???? */
-      static int getMuonThresholdMult( const unsigned int, const int, const int );
-      static int getEMThresholdMult( const unsigned int, const int, const int );
-      static int getEnergyThreshold( const unsigned int, const int,
-                                     const int, const int );
-
-   }; // class TMUtil
-
-} // namespace LVL1CTP
-
-#endif // TRIGT1INTERFACES_TMUTIL_H
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx
index 2d3cf57869082cfed6e35a6278fceec932b570d8..83454893b8bf5987714c0624caddfe752e6eb380 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.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 "TrigT1Interfaces/CTPSLink.h"
@@ -12,10 +12,6 @@
 // local LVL1 include(s):
 #include "TrigT1Interfaces/TrigT1CTPDefs.h"
 
-// tdaq-common includes for CTP format definition
-//#include "CTPfragment/CTPdataformat.h"
-
-
 namespace LVL1CTP {
 
   // CTPSLink contains only information of triggered bunch!
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx
index 7c57a93ad4d15654f5070bc38bed553217e0c097..afb88f14dee0fafc8cb628f291ab7778e32aea62 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.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 <iostream>
@@ -49,7 +49,7 @@ namespace LVL1MUONIF {
 								    size_t sectorAddress,
 								    int    bcid             ) const {
 
-    static Lvl1MuBarrelSectorLogicData dummy;
+    static const Lvl1MuBarrelSectorLogicData dummy;
     for( size_t ip=0; ip<m_data[systemAddress].size(); ip++){
       int bc=((m_data[systemAddress]).at(ip)).first;
       if (bc != bcid) continue;
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx
index 1467c3639a123f6677cb0d799dc52168934052af..b93409ace6c438ac83157b0c48a8efeebd4767a9 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.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 <iostream>
 #include <iomanip>
@@ -48,7 +48,7 @@ namespace LVL1MUONIF {
 								    size_t sectorAddress,
 								    int    bcid             ) const {
 
-    static Lvl1MuBarrelSectorLogicDataPhase1 dummy;
+    static const Lvl1MuBarrelSectorLogicDataPhase1 dummy;
     for( size_t ip=0; ip<m_data[systemAddress].size(); ip++){
       int bc=((m_data[systemAddress]).at(ip)).first;
       if (bc != bcid) continue;
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/TMUtil.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/TMUtil.cxx
deleted file mode 100644
index ec4289982d2a6e7db78aaaa03ea1c758aa4a44e7..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Interfaces/src/TMUtil.cxx
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include <sstream>
-#include <cmath>
-
-#include "xercesc/util/XMLString.hpp"
-
-#include "TrigT1Interfaces/TMUtil.h"
-
-namespace LVL1CTP {
-
-  int TMUtil::getEMThresholdMult( const unsigned int word,
-                                        const int threshold, const int length ) {
-
-    int returnValue;
-    const int nbit( 32 );
-    std::string bitPattern( intToBits( word, nbit ) );
-    // bit  01234567890123456789012345678901
-    // info xxxxxxP888777666555444333222111x
-    bitPattern = bitPattern.substr( 7 + ( 8 - threshold ) * length, length );
-    returnValue = static_cast<int>( uintFromString( bitPattern ) );
-    return returnValue;
-
-  }
-
-  int TMUtil::getMuonThresholdMult( const unsigned int word,
-                                          const int threshold, const int length ) {
-
-    int returnValue;
-    const int nbit( 32 );
-    std::string bitPattern( intToBits( word, nbit ) );
-    // bit  01234567890123456789012345678901
-    // info xxxxxxxxxxxxxx666555444333222111
-    bitPattern = bitPattern.substr( 14 + ( 6 - threshold ) * length, length );
-    returnValue = static_cast<int>( uintFromString( bitPattern ) );
-    return returnValue;
-
-  }
-
-  int TMUtil::getEnergyThreshold( const unsigned int word,
-                                        const int threshold, const int offSet,
-                                        const int number ) {
-
-    int returnValue;
-    const int nbit( 32 );
-    std::string bitPattern( intToBits( word, nbit ) );
-    // bit  01234567890123456789012345678901
-    // info xxxxxxP888777666555444333222111x
-    bitPattern = bitPattern.substr( ( offSet + ( number - threshold ) ), 1 );
-    returnValue = static_cast<int>( uintFromString( bitPattern ) );
-    return returnValue;
-
-  }
-
-  //const std::string TMUtil::intToBits(const int i,const int nbit) const
-  std::string TMUtil::intToBits( unsigned int i, int nbit ) {
-
-    std::string bitString = "";
-    std::string ONE = "1";
-    std::string ZERO = "0";
-    if ( i > ( pow( 2, 31 ) - 1 ) ) {
-      bitString += "1";
-      nbit--;
-      i -= static_cast<unsigned int>( pow( 2, 31 ) );
-    }
-    for ( int j = nbit - 1;j >= 0;j-- )
-      if ( pow( 2, j ) <= i ) {
-        i -= ( int ) pow( 2, j );
-        bitString += ONE;
-      } else
-        bitString += ZERO;
-    return bitString;
-
-  }
-
-  int TMUtil::powerOfInt( const int i ) {
-    int out;
-    if ( i < 0 || i > 9 ) {
-      exit( i );
-    } else {
-      out = 1;
-      for ( int j = 0;j < i;j++ )
-        out *= 10;
-    }
-    return out;
-  }
-
-  int TMUtil::DOMToInt( const XMLCh * thisDOMString ) {
-
-    int returnValue( 0 );
-    int sign( 1 );
-    std::string helpString( TMUtil::utilTranscode( thisDOMString ) );
-    if ( helpString.substr( 0, 1 ) == "-" ) {
-      sign = -1;
-      helpString = helpString.substr( 1, std::string::npos );
-    }
-
-    std::istringstream is( helpString );
-    //   istrstream is(helpString.c_str(),helpString.size());
-    // I think this ^^^ is a gcc32 fix. Don't have time to test it now. EJWM.
-    is >> returnValue;
-
-    return sign*returnValue;
-
-  }
-
-  std::string TMUtil::utilTranscode( const XMLCh * t ) {
-
-    char* cstr = xercesc::XMLString::transcode( t );
-    std::string str = cstr;
-    xercesc::XMLString::release( &cstr );
-    return str;
-
-  }
-
-  unsigned int TMUtil::uintFromString( std::string pattern ) {
-
-    int size = pattern.size() - 1;
-    unsigned int result = 0;
-    for ( unsigned int i = 0;i < pattern.size();i++ ) {
-      if ( pattern[ i ] == '1' )
-        result += static_cast<int>( pow( 2, size ) );
-      size--;
-    }
-
-    return result;
-
-  }
-
-  bool TMUtil::compareNodeNameString( const xercesc::DOMNode * domNode, const std::string & string2 ) {
-
-    char* nodename = xercesc::XMLString::transcode( domNode->getNodeName() );
-    bool result = ( 0 == xercesc::XMLString::compareString( nodename, string2.c_str() ) );
-    xercesc::XMLString::release( &nodename );
-    return result;
-
-  }
-
-  float TMUtil::getGevValue( const XMLCh* xmlStr ) {
-
-    // convert XMLCh* to string
-    const std::string str = utilTranscode( xmlStr );
-
-    // look for "GeV"
-    if ( std::string::npos == str.find( "GeV" ) )
-      return 0;
-
-    // look for "*"
-    std::string::size_type idx = str.find( "*" );
-    if ( std::string::npos == idx )
-      return 0;
-
-    // convert to float
-    std::istringstream is( str.substr( 0, idx ) );
-    float ret;
-    is >> ret;
-
-    return ret;
-
-  }
-
-} // namespace LVL1CTP
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..6d251c6ac81e0b7c55c6e92bf5e15906e39e2036
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1MuctpiPhase1
diff --git a/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py b/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py
index b0ab258ac1905b331b9e496018776f20e5831ff6..783e98551bdc720a9534116d8c2b79ca2cb97051 100755
--- a/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py
+++ b/Trigger/TrigT1/TrigT1NSW/share/NSWL1.py
@@ -39,7 +39,9 @@ GeoModelSvc.DetectorTools += [ MuonDetectorTool(HasCSC=MuonGeometryFlags.hasCSC(
 #######################################
 # now the trigger related things
 #######################################
-include('RegionSelector/RegionSelector_jobOptions.py')
+from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
+svcMgr += RegSelSvcDefault()
+
 include('TrigT1NSW/TrigT1NSW_jobOptions.py')
 
 #Switch on and off trigger simulaton components sTGC / MicroMegas
diff --git a/Trigger/TrigT1/TrigT1RPClogic/CMakeLists.txt b/Trigger/TrigT1/TrigT1RPClogic/CMakeLists.txt
index 9f591871a78f8a93fad2ae897a1a9f5c7a356f80..09143e81a29d3937a261ab481896a7d38b522879 100644
--- a/Trigger/TrigT1/TrigT1RPClogic/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1RPClogic/CMakeLists.txt
@@ -7,4 +7,4 @@ atlas_subdir( TrigT1RPClogic )
 atlas_add_library( TrigT1RPClogicLib
                    src/*.cxx
                    PUBLIC_HEADERS TrigT1RPClogic
-                   LINK_LIBRARIES CablingTools GaudiKernel RPC_CondCablingLib RPCcablingInterfaceLib TrigT1RPChardwareLib )
+                   LINK_LIBRARIES MuonCablingTools GaudiKernel RPC_CondCablingLib RPCcablingInterfaceLib TrigT1RPChardwareLib )
diff --git a/Trigger/TrigT1/TrigT1RPClogic/README b/Trigger/TrigT1/TrigT1RPClogic/README
index 3bb0acdac985eeae892f9fcf7c34f6861c672b15..597e49d4cfaf1b280191660cbaae9085b5790f5d 100755
--- a/Trigger/TrigT1/TrigT1RPClogic/README
+++ b/Trigger/TrigT1/TrigT1RPClogic/README
@@ -70,7 +70,7 @@ Use and configuration in ATHENA:
 
     * Load and use the required DLL module with the following command lines:
 
-       ApplicationMgr.DLLs += { "TrigT1RPClogic" };
+       ApplicationMgr.Dlls += { "TrigT1RPClogic" };
 
     * The logic package needs the TrigT1RPChardware package to be built.
 
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/README b/Trigger/TrigT1/TrigT1RPCsteering/README
index 28e03accfe4fd917f6a4ebc648919a1b68ff674a..5f055c69579231f6d35c5ddd6d84c8635105f1c7 100755
--- a/Trigger/TrigT1/TrigT1RPCsteering/README
+++ b/Trigger/TrigT1/TrigT1RPCsteering/README
@@ -15,7 +15,7 @@ Use and configuration in ATHENA:
 
     * Load and use the required DLL module with the following command lines:
 
-       ApplicationMgr.DLLs += { "TrigT1RPCsteering" };
+       ApplicationMgr.Dlls += { "TrigT1RPCsteering" };
        ApplicationMgr.TopAlg = { "TrigT1RPC" };
 
     * The steering needs all the other packages inside the branch TrigT1RPC.
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/share/LVL1RpcRunJobOptions.py b/Trigger/TrigT1/TrigT1RPCsteering/share/LVL1RpcRunJobOptions.py
index e7e91f7ef7ae894a092a7a0f06f09ef9e33169ac..ec9a76b88e678d1d2b2f23c747bbf6c9a035a0a2 100755
--- a/Trigger/TrigT1/TrigT1RPCsteering/share/LVL1RpcRunJobOptions.py
+++ b/Trigger/TrigT1/TrigT1RPCsteering/share/LVL1RpcRunJobOptions.py
@@ -73,7 +73,7 @@ else:
     # Configure the job to access G3 data
     #-----------------------------------------------------------
     include ("AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.py")
-    theApp.DLLs += [ "MuonZebraCnvTest", "MuonDigitZebraCnv" ]
+    theApp.Dlls += [ "MuonZebraCnvTest", "MuonDigitZebraCnv" ]
     
 
     #-----------------------------------------------------------
@@ -92,7 +92,7 @@ else:
         DetDescrCnvSvc.MuonIDFileName  = "IdDictMuonSpectrometer_P.03.xml" 
 
     # Genzkine->HepMc converter
-    theApp.DLLs += [ "GenzModule" ]
+    theApp.Dlls += [ "GenzModule" ]
     theApp.TopAlg += [ "GenzModule" ]
     
 
@@ -103,9 +103,9 @@ include ("AmdcAth/AmdcAth_jobOptions.py")
 
     
 # Configure the LVL1 RPC simulation
-theApp.DLLs += [ "RPCgeometry" ]
-theApp.DLLs += [ "RPCcabling" ]
-theApp.DLLs += [ "TrigT1RPCsteering" ]
+theApp.Dlls += [ "RPCgeometry" ]
+theApp.Dlls += [ "RPCcabling" ]
+theApp.Dlls += [ "TrigT1RPCsteering" ]
 
 theApp.ExtSvc += [ "RPCgeometrySvc" ]
 theApp.ExtSvc += [ "RPCcablingSvc" ]
diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..b7156ae092844b97bba99157eb03966c134f3a7c
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Trigger/TrigT1/TrigT1ResultByteStream
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/LVL1TGCTrigger.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/LVL1TGCTrigger.h
index 65428de780f567d7f3e31d52d32848c745401e4b..078f9ede41aaa0071cd87eae35b1f72690aa2d17 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/LVL1TGCTrigger.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/LVL1TGCTrigger.h
@@ -22,7 +22,7 @@
 #include "Identifier/Identifier.h"
 
 // EIFI-SL connection
-#include "TrigT1TGC/TGCInnerTrackletSlotHolder.hh"
+#include "TrigT1TGC/TGCInnerTrackletSlotHolder.h"
 
 #include "StoreGate/ReadCondHandle.h"
 #include "MuonCondSvc/TGCTriggerData.h"
@@ -32,7 +32,7 @@
 
 #include "MuonDigitContainer/TgcDigit.h"
 
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 #include "MuonDigitContainer/TgcDigitContainer.h"
 
 // Tile-Muon
@@ -157,9 +157,9 @@ namespace LVL1TGCTrigger {
     BooleanProperty   m_USENSW{this,"USENSW",false};     // flag for using NSW
     BooleanProperty   m_useRun3Config{this,"useRun3Config",false}; // flag for using switch between Run3 and Run2 algorithms
     
-    
+    bool              m_firstTime{true};
     uint16_t          m_bctagInProcess;
-    
+
     TGCDatabaseManager *m_db;
     TGCTimingManager *m_TimingManager;
     TGCElectronicsSystem *m_system;
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/NSWTrigOut.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/NSWTrigOut.h
index dd34ccfee9215256596737c3c2a59ea853ea0f38..8dc486aee22c5077661dd1783927b52250d412c9 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/NSWTrigOut.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/NSWTrigOut.h
@@ -10,8 +10,6 @@
 #ifndef NSW_TRIGOUT_H
 #define NSW_TRIGOUT_H
 
-#include "AthenaKernel/MsgStreamMember.h"
-
 #include <vector>
 
 namespace LVL1TGCTrigger {
@@ -26,23 +24,17 @@ namespace LVL1TGCTrigger {
  
 class NSWTrigOut {
 protected:
-  int            m_sideID;     // 0:A-side 1:C-side
+  int                         m_sideID{-1};     // 0:A-side 1:C-side
   std::vector<int>            m_NSWTriggerProcessor;   // 0 ~ 15
   std::vector<int>            m_NSWeta_8bit;     //  0.005
   std::vector<int>            m_NSWphi_6bit;      // 10mrad
   std::vector<int>            m_NSWDtheta_5bit;    // 1mrad
 
 public:
-  NSWTrigOut();
-  NSWTrigOut(int side, std::vector<int> NSWTrigger, std::vector<int> NSWeta, std::vector<int> NSWphi, std::vector<int> NSWDtheta,TGCArguments* tgcargs=0); 
-  NSWTrigOut(int side, std::vector<int> NSWTrigger,TGCArguments* tgcargs=0); 
+  NSWTrigOut() = default;
+  NSWTrigOut(int side, std::vector<int> NSWTrigger, std::vector<int> NSWeta, std::vector<int> NSWphi, std::vector<int> NSWDtheta,TGCArguments* tgcargs=nullptr);
+  NSWTrigOut(int side, std::vector<int> NSWTrigger,TGCArguments* tgcargs=nullptr);
 
-  virtual ~NSWTrigOut() { }
- 
-  NSWTrigOut(const NSWTrigOut& right);
- 
-  const NSWTrigOut& operator=(const NSWTrigOut& right);
-  NSWTrigOut& operator+(const NSWTrigOut& right);
   NSWTrigOut& operator+=(const NSWTrigOut& right);
   bool operator==(const NSWTrigOut& right) const
   {
@@ -55,7 +47,6 @@ public:
   }
 
 
-
   // set functons
   void setSide(int side){ m_sideID = side; }
   void setNSWTriggerProcessor(int NSWTP){ m_NSWTriggerProcessor.push_back(NSWTP); }
@@ -72,25 +63,12 @@ public:
   const std::vector<int>& getNSWDtheta() const {return m_NSWDtheta_5bit; }
 
   // print methods 
-  const MSG::Level defaultMSGLvl = MSG::INFO;
-  bool msgLvl(const MSG::Level lvl) const;
-  MsgStream& msg(const MSG::Level lvl) const;
   void print() const;
 
-
  private:
-  TGCArguments* m_tgcArgs;
-  mutable Athena::MsgStreamMember m_msg;
-
-
+  TGCArguments* m_tgcArgs{nullptr};
 };
 
-inline bool NSWTrigOut::msgLvl(const MSG::Level lvl) const
-{
-  return (m_msg.get().level() <= lvl) ? true : false;
-}
-inline MsgStream& NSWTrigOut::msg(const MSG::Level lvl) const{ return m_msg << lvl; }
-
 } //end of namespace bracket
 
 #endif
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCASDOut.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCASDOut.h
index a3cdec3889f579db409ed78e50bd53ccca0dfa06..6ea04941f2ed3ee7499a64d426cd0669b10cc9a7 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCASDOut.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCASDOut.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
 */
 
 // ====================================================================
@@ -16,7 +16,6 @@
 #ifndef TGC_ASDOUT_H
 #define TGC_ASDOUT_H
 
-//#include "TrigT1TGC/TGCIndex.h"
 #include "TrigT1TGC/TGCReadoutIndex.h"
 
 namespace LVL1TGCTrigger {
@@ -30,24 +29,18 @@ namespace LVL1TGCTrigger {
 class TGCASDOut {
 protected:
   TGCReadoutIndex m_tgcReadoutIndex;
-  TGCSignalType m_signalType;
-  int m_hitID;       // index in a chamber
-  int m_channel;     // index in a ASD board 
-  double m_hitToF;
+  TGCSignalType m_signalType{WIRE};
+  int m_hitID{0};       // index in a chamber
+  int m_channel{0};     // index in a ASD board
+  double m_hitToF{0};
 
 public:
-  TGCASDOut();
+  TGCASDOut() = default;
   TGCASDOut(TGCIndex tgcindex, int ilyr, 
 	    TGCSignalType sigtype=WIREGROUP, int id=-1, double tof=0.);
   TGCASDOut(TGCReadoutIndex tgcrindex, 
 	    TGCSignalType sigtype=WIREGROUP, int id=-1, double tof=0.);
 
-  virtual ~TGCASDOut() { }
- 
-  TGCASDOut(const TGCASDOut& right);
- 
-  TGCASDOut& operator=(const TGCASDOut& right);
- 
   int operator==(const TGCASDOut& right) const
   {
     return (this==&right);
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCArguments.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCArguments.h
similarity index 100%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCArguments.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCArguments.h
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBIDOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBIDOut.h
similarity index 100%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBIDOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBIDOut.h
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBoardConnection.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBoardConnection.h
similarity index 94%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBoardConnection.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBoardConnection.h
index 38c74ee68578e857637e57507d6601ce941532c8..2bbc79b95ffc92831c191d055fcf3d681eae9de3 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBoardConnection.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCBoardConnection.h
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCBoardConnection.hh,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
+//$Id: TGCBoardConnection.h,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
 #ifndef TGCBoardConnection_hh
 #define TGCBoardConnection_hh
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionASDToPP.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionASDToPP.h
similarity index 84%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionASDToPP.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionASDToPP.h
index 19ad22adc75f746ffade754073ceabed602081e7..339481055f89097725d2b6de84271f3a4b12e80b 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionASDToPP.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionASDToPP.h
@@ -1,12 +1,11 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCConnectionASDToPP.hh,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
 #ifndef TGCConnectionASDToPP_hh
 #define TGCConnectionASDToPP_hh
 
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCNumbering.h"
 #include <fstream>
 #include <sstream>
 
@@ -14,7 +13,7 @@ namespace LVL1TGCTrigger {
 
 class TGCConnectionASDToPP {
 public:
-  int getConnection(const int sideId, const int layer, const int chamber, const int line, int* pp, int* connector, int* channel);
+  int getConnection(const int sideId, const int layer, const int chamber, const int line, int* pp, int* connector, int* channel) const;
 
   bool readData(TGCRegionType region, int type, TGCForwardBackwardType forward);  // read database
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionHPBToSL.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionHPBToSL.h
similarity index 96%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionHPBToSL.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionHPBToSL.h
index b0754de2cf6d8dbd53b7e104713d200bf14f007a..2516bbfb3eeb064e684dd23772b909dfaf959715 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionHPBToSL.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionHPBToSL.h
@@ -6,7 +6,7 @@
 #ifndef TGCConnectionHPBToSL_hh
 #define TGCConnectionHPBToSL_hh
 
-#include "TrigT1TGC/TGCBoardConnection.hh"
+#include "TrigT1TGC/TGCBoardConnection.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionInPP.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionInPP.h
similarity index 94%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionInPP.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionInPP.h
index fefd7acf2089371252d21f53dd11aa80969b306e..964a7414142f742c947c1e7e2106ed345eef338e 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionInPP.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionInPP.h
@@ -2,13 +2,13 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCConnectionInPP.hh,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
+//$Id: TGCConnectionInPP.h,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
 //  Table of connection between input channel and output channel
 // of PatchPanel.
 #ifndef TGCConnectionInPP_hh
 #define TGCConnectionInPP_hh
 
-#include "TrigT1TGC/TGCPatchPanel.hh"
+#include "TrigT1TGC/TGCPatchPanel.h"
 #include <iostream>
 #include <vector>
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSB.h
similarity index 97%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSB.h
index 4ba4b969d6155919e6d34b8492883245f3a5c4b7..841e374ec64cdc30476cc123d3d340c637e0d845 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSB.h
@@ -6,7 +6,7 @@
 #ifndef TGCConnectionPPToSB_hh
 #define TGCConnectionPPToSB_hh
 
-#include "TrigT1TGC/TGCBoardConnection.hh"
+#include "TrigT1TGC/TGCBoardConnection.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSL.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSL.h
similarity index 83%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSL.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSL.h
index e6258cd1ebcea056ea3f33f52f9748c130832fa2..2978044f9b704a94da910a3ef286ddd56a34275e 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSL.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionPPToSL.h
@@ -5,10 +5,10 @@
 //  Table of connection between Patch Panel and Sector Logic.
 #ifndef TGCConnectionPPToSL_hh
 #define TGCConnectionPPToSL_hh
-#include "TrigT1TGC/TGCNumbering.hh"
-#include "TrigT1TGC/TGCConnectionPPToSB.hh"
-#include "TrigT1TGC/TGCConnectionSBToHPB.hh"
-#include "TrigT1TGC/TGCConnectionHPBToSL.hh"
+#include "TrigT1TGC/TGCNumbering.h"
+#include "TrigT1TGC/TGCConnectionPPToSB.h"
+#include "TrigT1TGC/TGCConnectionSBToHPB.h"
+#include "TrigT1TGC/TGCConnectionHPBToSL.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionSBToHPB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionSBToHPB.h
similarity index 94%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionSBToHPB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionSBToHPB.h
index dce4e88a5ad4c29512f0d5962747c71746aeeee2..1b56d668881d92faa436b59b5bd982892b8cf35b 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionSBToHPB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCConnectionSBToHPB.h
@@ -6,8 +6,8 @@
 #ifndef TGCConnectionSBToHPB_hh
 #define TGCConnectionSBToHPB_hh
 
-#include "TrigT1TGC/TGCBoardConnection.hh"
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCBoardConnection.h"
+#include "TrigT1TGC/TGCNumbering.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDatabaseManager.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDatabaseManager.h
similarity index 54%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDatabaseManager.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDatabaseManager.h
index 99421858d1074f815ad4ad91228d7402a9eacc73..1bc630385bc2d9259251add781e4326f2f69c68a 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDatabaseManager.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDatabaseManager.h
@@ -5,21 +5,19 @@
 #ifndef TGCDatabaseManager_hh
 #define TGCDatabaseManager_hh
 
-#include "TrigT1TGC/TGCArguments.hh"
-#include "TrigT1TGC/TGCNumbering.hh"
-#include "TrigT1TGC/TGCElectronicsSystem.hh"
-#include "TrigT1TGC/TGCConnectionPPToSB.hh"
+#include "TrigT1TGC/TGCArguments.h"
+#include "TrigT1TGC/TGCNumbering.h"
+#include "TrigT1TGC/TGCElectronicsSystem.h"
+#include "TrigT1TGC/TGCConnectionPPToSB.h"
 
 #include "MuonCondSvc/TGCTriggerData.h"
 #include "StoreGate/ReadCondHandleKey.h"
-#include "AthenaKernel/MsgStreamMember.h"
+#include "AthenaBaseComps/AthMessaging.h"
 
 #include <vector>
 #include <map>
 #include <string>
 
-#include "GaudiKernel/MsgStream.h"
-
 namespace LVL1TGCTrigger {
 
 class TGCConnectionASDToPP;
@@ -31,7 +29,7 @@ class TGCEIFICoincidenceMap;
 class TGCTileMuCoincidenceMap;
 class TGCNSWCoincidenceMap;
 
-class TGCDatabaseManager
+class TGCDatabaseManager : public AthMessaging
 {
   typedef std::vector<int> PatchPanelIDs; 
   typedef std::vector<const TGCPatchPanel*> PatchPanelPointers; 
@@ -46,11 +44,11 @@ class TGCDatabaseManager
   TGCDatabaseManager(const TGCDatabaseManager& right);
   TGCDatabaseManager& operator=(const TGCDatabaseManager& right);
 
-  TGCConnectionPPToSL* getConnectionPPToSL(TGCRegionType type) const;
-  TGCConnectionASDToPP* getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const;
-  TGCRPhiCoincidenceMap* getRPhiCoincidenceMap(int sideId, int octantId) const;
-  TGCEIFICoincidenceMap* getEIFICoincidenceMap(int sideId) const;
-  TGCTileMuCoincidenceMap* getTileMuCoincidenceMap() const;
+  const TGCConnectionPPToSL* getConnectionPPToSL(TGCRegionType type) const;
+  const TGCConnectionASDToPP* getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const;
+  const TGCRPhiCoincidenceMap* getRPhiCoincidenceMap(int sideId, int octantId) const;
+  const TGCEIFICoincidenceMap* getEIFICoincidenceMap(int sideId) const;
+  const TGCTileMuCoincidenceMap* getTileMuCoincidenceMap() const;
   std::shared_ptr<TGCNSWCoincidenceMap> getNSWCoincidenceMap(int sideId, int octantId, int moduleId) const;
 
   TGCConnectionInPP* getConnectionInPP(TGCPatchPanel* patchPanel) const;
@@ -58,19 +56,11 @@ class TGCDatabaseManager
 
   void deleteConnectionPPToSL();
 
-  static const std::string& getFilename(int type); 
+  static std::string getFilename(int type);
   static const std::vector<std::string > splitCW(const std::string& input, char delimiter); 
 
-  TGCArguments* tgcArgs() const;
-
-  /** Declaring the standard message stream
-   *  Returns a reference to the default message stream
-   */
-  MsgStream& msg(const MSG::Level lvl) const;
-  /** Test method to evaluate the verbosity level */
-  bool msgLvl(const MSG::Level lvl) const;
-  /** set message level to propagate from the parent class */
-  void setMessageLevel(const MSG::Level lvl) const;
+  TGCArguments* tgcArgs() { return m_tgcArgs; }
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
 
  private:
   enum {NumberOfModuleInBW=9};
@@ -85,30 +75,22 @@ class TGCDatabaseManager
   std::map<PatchPanelIDs, std::pair<const TGCConnectionInPP, PatchPanelPointers> > m_patchPanelToConnectionInPP;
   
   TGCArguments* m_tgcArgs;
-
-  //Declaring private message stream member.
-  mutable Athena::MsgStreamMember m_msg;
 };
 
-inline
-TGCArguments* TGCDatabaseManager::tgcArgs() const {
-  return m_tgcArgs;
-}
-
 inline 
-TGCRPhiCoincidenceMap* TGCDatabaseManager::getRPhiCoincidenceMap(int sideId, int octantId) const
+const TGCRPhiCoincidenceMap* TGCDatabaseManager::getRPhiCoincidenceMap(int sideId, int octantId) const
 {
   return m_mapRphi[sideId][octantId];
 }
 
 inline 
-TGCEIFICoincidenceMap* TGCDatabaseManager::getEIFICoincidenceMap(int sideId) const
+const TGCEIFICoincidenceMap* TGCDatabaseManager::getEIFICoincidenceMap(int sideId) const
 {
   return m_mapEIFI[sideId];
 }
 
 inline 
-TGCTileMuCoincidenceMap* TGCDatabaseManager::getTileMuCoincidenceMap() const
+const TGCTileMuCoincidenceMap* TGCDatabaseManager::getTileMuCoincidenceMap() const
 {
   return m_mapTileMu;
 }
@@ -120,27 +102,17 @@ std::shared_ptr<TGCNSWCoincidenceMap> TGCDatabaseManager::getNSWCoincidenceMap(i
 }
 
 inline 
- TGCConnectionPPToSL* TGCDatabaseManager::getConnectionPPToSL(TGCRegionType type) const
+ const TGCConnectionPPToSL* TGCDatabaseManager::getConnectionPPToSL(TGCRegionType type) const
 {
   return m_PPToSL[type-1];
 }
 
 inline 
- TGCConnectionASDToPP* TGCDatabaseManager::getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const
+ const TGCConnectionASDToPP* TGCDatabaseManager::getConnectionASDToPP(TGCRegionType region, int type, TGCForwardBackwardType forwardBackward) const
 {
   return m_ASDToPP[region-1][type][forwardBackward];
 }
 
-inline MsgStream& TGCDatabaseManager::msg(const MSG::Level lvl) const { return m_msg << lvl; }
-
-inline bool TGCDatabaseManager::msgLvl(const MSG::Level lvl) const
-{
-  return (m_msg.get().level() <= lvl) ? true : false;
-}
-
-inline void TGCDatabaseManager::setMessageLevel(const MSG::Level lvl) const { m_msg.get().setLevel(lvl); }
-
-
 } //end of namespace bracket
 
 #endif // TGCDatabaseManager_hh
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDoubletSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDoubletSB.h
similarity index 89%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDoubletSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDoubletSB.h
index 44dbb2d062d63100aff10b8e05dfcfc2e42b58a4..35b90cb4d51f00fd5fdb6340145e6acea4724770 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDoubletSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCDoubletSB.h
@@ -1,11 +1,11 @@
 /*
-  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 TGCDoubletSB_hh
 #define TGCDoubletSB_hh
 
-#include "TrigT1TGC/TGCSlaveBoard.hh"
+#include "TrigT1TGC/TGCSlaveBoard.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
@@ -17,7 +17,7 @@ class TGCHitPattern;
 
 class TGCDoubletSB: public TGCSlaveBoard {
 public:
-  TGCDoubletSB( TGCArguments* );
+  TGCDoubletSB( const TGCArguments* );
   virtual ~TGCDoubletSB();
 
 protected:
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEIFICoincidenceMap.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEIFICoincidenceMap.h
index f0c3bf5c7f20f46362f462af6053c159a88a1b2e..b0f51d2eddf7fc5c82213b61ddfbfe86d187a2e3 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEIFICoincidenceMap.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEIFICoincidenceMap.h
@@ -5,27 +5,26 @@
 #ifndef TrigT1TGC_TGCEIFICoincidenceMap_hh
 #define TrigT1TGC_TGCEIFICoincidenceMap_hh
 
-#include "TrigT1TGC/TGCInnerTrackletSlot.hh"
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCInnerTrackletSlot.h"
+#include "TrigT1TGC/TGCArguments.h"
 
 #include "StoreGate/ReadCondHandle.h"
 #include "MuonCondSvc/TGCTriggerData.h"
 
-#include "AthenaKernel/MsgStreamMember.h"
+#include "AthenaBaseComps/AthMessaging.h"
 
 #include <string>
 #include <bitset>
 
 namespace LVL1TGCTrigger {
  
-class TGCEIFICoincidenceMap
+class TGCEIFICoincidenceMap : public AthMessaging
 {
  public:
 
   TGCEIFICoincidenceMap(TGCArguments*, const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey);
   TGCEIFICoincidenceMap(TGCArguments*, const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
                          const std::string& version, int sideId=0);
-  virtual ~TGCEIFICoincidenceMap();
 
   TGCEIFICoincidenceMap(const TGCEIFICoincidenceMap& right);
   TGCEIFICoincidenceMap& operator = (const TGCEIFICoincidenceMap& right);
@@ -49,24 +48,16 @@ class TGCEIFICoincidenceMap
                                             const int bit) const;
   
 
-  const std::string&          getVersion() const;
-  int                         getSideId() const;
-  bool                        isFullCW() const;
-  void                        setFullCW( bool val);
+  const std::string&          getVersion() const { return m_verName; }
+  int                         getSideId() const { return m_side; }
+  bool                        isFullCW() const { return m_fullCW; }
+  void                        setFullCW( bool val) { m_fullCW = val; }
 
   bool readMap();  
   void                        dumpMap() const;
 
-  TGCArguments* tgcArgs() const;
-
-  /** Declaring the standard message stream
-   *  Returns a reference to the default message stream
-   */
-  MsgStream& msg(const MSG::Level lvl) const;
-  /** Test method to evaluate the verbosity level */
-  bool msgLvl(const MSG::Level lvl) const;
-  /** set message level to propagate from the parent class */
-  void setMessageLevel(const MSG::Level lvl) const;
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
+  TGCArguments* tgcArgs() { return m_tgcArgs; }
 
  protected:
   enum {N_EndcapSector=48};
@@ -93,35 +84,8 @@ class TGCEIFICoincidenceMap
   TGCArguments* m_tgcArgs;
 
   const SG::ReadCondHandleKey<TGCTriggerData>& m_readCondKey;
-
-  //Declaring private message stream member.
-  mutable Athena::MsgStreamMember m_msg;
 };
 
-inline TGCArguments* TGCEIFICoincidenceMap::tgcArgs() const
-{
-  return m_tgcArgs;
-}
-
-inline const std::string& TGCEIFICoincidenceMap::getVersion() const
-{
-  return m_verName;
-}
-
-inline int TGCEIFICoincidenceMap::getSideId() const
-{
-  return m_side;
-}
-
-inline bool TGCEIFICoincidenceMap::isFullCW() const
-{
-  return m_fullCW;
-}
-
-inline void TGCEIFICoincidenceMap::setFullCW(bool val)
-{
-  m_fullCW = val;
-}
 
 inline
  const TGCInnerTrackletSlot* TGCEIFICoincidenceMap::getInnerTrackletMask(const int input, 
@@ -135,15 +99,6 @@ inline
   return  &(m_map[input][ssc][sec]);    
 }
 
-inline MsgStream& TGCEIFICoincidenceMap::msg(const MSG::Level lvl) const { return m_msg << lvl; }
-
-inline bool TGCEIFICoincidenceMap::msgLvl(const MSG::Level lvl) const
-{
-  return (m_msg.get().level() <= lvl) ? true : false;
-}
-
-inline void TGCEIFICoincidenceMap::setMessageLevel(const MSG::Level lvl) const { m_msg.get().setLevel(lvl); }
-
 } //end of namespace bracket
 
 #endif
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCElectronicsSystem.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCElectronicsSystem.h
similarity index 86%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCElectronicsSystem.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCElectronicsSystem.h
index 8c2a44c9baf9799bfacf55c4aab262914ddb34b7..b637db03687842cc2abb2778cccbff9f0053baa8 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCElectronicsSystem.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCElectronicsSystem.h
@@ -1,11 +1,11 @@
 /*
-  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 TGCElectronicsSystem_hh
 #define TGCElectronicsSystem_hh
 
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 #include "TrigT1TGC/TGCReadoutIndex.h"
 
 namespace LVL1TGCTrigger {
@@ -40,13 +40,15 @@ public:
     if ( (side<0) || (oct<0) || (mod<0) ) return 0;
     return m_sector[side][oct][mod];
   };
-  TGCTMDB* getTMDB() const {return m_tmdb;}
+  TGCTMDB* getTMDB() {return m_tmdb;}
+  const TGCTMDB* getTMDB() const {return m_tmdb;}
   std::shared_ptr<TGCNSW>  getNSW() const {return m_nsw;}
 
   TGCElectronicsSystem(TGCArguments*, TGCDatabaseManager* database, bool isAtlas=true);
   ~TGCElectronicsSystem();
 
-  TGCArguments* tgcArgs() const { return m_tgcArgs;}
+  TGCArguments* tgcArgs() { return m_tgcArgs;}
+  const TGCArguments* tgcArgs() const { return m_tgcArgs;}
   
 private:
   // hide default/copy constructor and assignment operator
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEvent.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEvent.h
index e2f642f9ba0c5fadb84a19b53a6c2d9a9a702ec0..396780b0f0cef6e7eb6d465adda370ad93a235b7 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEvent.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCEvent.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
 */
 
 // ====================================================================
@@ -81,7 +81,7 @@ public:
     else return m_vecASDOut[index-1];
   }
 
-  std::vector<TGCASDOut*>& GetASDOutVector() const
+  const std::vector<TGCASDOut*>& GetASDOutVector() const
   {
     return (std::vector<TGCASDOut*>&)m_vecASDOut;
   }
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoard.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoard.h
similarity index 97%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoard.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoard.h
index d740a46b2b7603db643fab627a48fe83cb0cca88..caa417601b1b1823aeef222cbb39584f135262cd 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoard.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoard.h
@@ -5,8 +5,8 @@
 #ifndef TGCHighPtBoard_hh
 #define TGCHighPtBoard_hh
 
-#include "TrigT1TGC/TGCSlaveBoard.hh"
-#include "TrigT1TGC/TGCConnectionHPBToSL.hh"
+#include "TrigT1TGC/TGCSlaveBoard.h"
+#include "TrigT1TGC/TGCConnectionHPBToSL.h"
 
 namespace LVL1TGCTrigger {
 class TGCSlaveBoardOut;
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoardOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoardOut.h
similarity index 98%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoardOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoardOut.h
index e5fed3ad8059afade68455643ce4a3451e771e75..2ef91fcd24966c3b14471dc93a638317296524dc 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoardOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtBoardOut.h
@@ -5,7 +5,7 @@
 #ifndef TGCHighPtBoardOut_hh
 #define TGCHighPtBoardOut_hh
 
-#include "TrigT1TGC/TGCHighPtBoard.hh"
+#include "TrigT1TGC/TGCHighPtBoard.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtChipOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtChipOut.h
similarity index 98%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtChipOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtChipOut.h
index d639e6469e6f86f8dccb5fe2eaea2b993515b8d1..09ae8799f3afc9d9372fc4599267e0d813adc2b2 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtChipOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHighPtChipOut.h
@@ -5,7 +5,7 @@
 #ifndef TGCHighPtChipOut_hh
 #define TGCHighPtChipOut_hh
 
-#include "TrigT1TGC/TGCHighPtBoard.hh"
+#include "TrigT1TGC/TGCHighPtBoard.h"
 
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHitPattern.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHitPattern.h
similarity index 92%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHitPattern.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHitPattern.h
index 2bb36af69dfad0d805167ee4e3f71c989c0273cf..c6e65f6abe6a1eed63adf9c934042e403f52ba03 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHitPattern.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCHitPattern.h
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCHitPattern.hh,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
 #ifndef TGCHitPattern_hh
 #define TGCHitPattern_hh
 #include <fstream>
@@ -52,7 +51,7 @@ public:
   void replace(int pos, TGCHitPattern* hp);
   void del(int pos);
   void write(char* buf) const;
-  bool* getPatad(void) const;
+  const bool* getPatad(void) const;
   void reverse(int pos);
   const char* bool2char(void);
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCIndex.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCIndex.h
index c7a8f6c05af1fbc1fdcabfe9008c3edf79e459f3..132e5a407efc30409e5c0166a95dca49d0b5ea28 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCIndex.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCIndex.h
@@ -13,7 +13,7 @@
 #ifndef TGC_INDEX_H
 #define TGC_INDEX_H
 
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCNumbering.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerSB.h
similarity index 70%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerSB.h
index f234f72cee8b7f8e5bf88e5f422b337e8b7f3497..9801c278a40093081ac352dc5ddb40a108e9046c 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerSB.h
@@ -1,11 +1,11 @@
 /*
-  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 TGCInnerSB_hh
 #define TGCInnerSB_hh
 
-#include "TrigT1TGC/TGCSlaveBoard.hh"
+#include "TrigT1TGC/TGCSlaveBoard.h"
 
 namespace LVL1TGCTrigger {
 
@@ -14,7 +14,7 @@ const int NumberOfInnerSBData = 8;
 class TGCInnerSB: public TGCSlaveBoard {
 
 public:
-  TGCInnerSB( TGCArguments* );
+  TGCInnerSB( const TGCArguments* );
   virtual ~TGCInnerSB(){};
 
 protected:
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlot.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlot.h
similarity index 97%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlot.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlot.h
index 03f325a6e7f34458a65eba3222e5595b7ae6552c..0940d5be714173b19235d05d7440d68b75e81590 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlot.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlot.h
@@ -5,7 +5,7 @@
 #ifndef TGCInnerTrackletSlot_hh
 #define TGCInnerTrackletSlot_hh
 
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
   class TGCInnerTrackletSlot {
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlotHolder.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlotHolder.h
similarity index 83%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlotHolder.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlotHolder.h
index 22620501136ddb403a407fdde4a8b460a248a05d..c60abb77e0275b2b9d11544b3d176bd44169246d 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlotHolder.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCInnerTrackletSlotHolder.h
@@ -1,12 +1,12 @@
 /*
-  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 TGCInnerTrackletSlotHolder_hh
 #define TGCInnerTrackletSlotHolder_hh
 
-#include "TrigT1TGC/TGCInnerTrackletSlot.hh"
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCInnerTrackletSlot.h"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
   //  class TGCInnerTrackletSlot;
@@ -37,15 +37,13 @@ namespace LVL1TGCTrigger {
       // slot23, slot24, slot01, slot02 go to A01 phi0/phi1 Endcap SL
     };
 
-    TGCArguments* tgcArgs() const;
+    const TGCArguments* tgcArgs() const { return m_tgcArgs; }
 
   private:
     TGCInnerTrackletSlot m_innerTrackletSlot[NUMBER_OF_SIDES][NUMBER_OF_SLOTS];
     TGCArguments* m_tgcArgs;
   };
-  inline TGCArguments* TGCInnerTrackletSlotHolder::tgcArgs() const {
-    return m_tgcArgs;
-  }
+
 } //end of namespace bracket
 
 #endif // TGCInnerTrackletSlotHolder_hh
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSW.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSW.h
index c8d4f6c311230d41150ea2c8049ad199bc727ca9..53d85d8edc45ef4f5e7ddfd9b06f9e11024ab928 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSW.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSW.h
@@ -13,7 +13,7 @@
 #include <vector>
 #include <memory>
 
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCNumbering.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSWCoincidenceMap.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSWCoincidenceMap.h
index 252ee0d8b3f884071b23cae774edb5e0b9e12955..c8f914b13601611f0307f918943e19f96fe9562a 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSWCoincidenceMap.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNSWCoincidenceMap.h
@@ -6,7 +6,7 @@
 #include <string>
 
 #include "GaudiKernel/ToolHandle.h"
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCNumbering.h"
 
 #include "AthenaKernel/MsgStreamMember.h"
 #include "GaudiKernel/MsgStream.h"
@@ -47,7 +47,8 @@ public:
   TGCNSWCoincidenceMap(const TGCNSWCoincidenceMap& right);
   bool readMap(std::string moduleName, ReadCW_Type cw_type);
   bool readShift();
-  TGCArguments* tgcArgs() const { return m_tgcArgs;}
+  TGCArguments* tgcArgs() { return m_tgcArgs;}
+  const TGCArguments* tgcArgs() const { return m_tgcArgs;}
 
 private:
   std::vector<short int> m_EtaPhi_CW[N_dEta][N_dPhi];
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNumbering.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNumbering.h
similarity index 100%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNumbering.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCNumbering.h
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanel.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanel.h
similarity index 84%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanel.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanel.h
index 62d1668d4901e717e5f5b7c494e5a850d3ed8d8a..bc08ed1145dd75ca97739da2a56cad8ac721941b 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanel.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanel.h
@@ -1,14 +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
 */
 
-//$Id: TGCPatchPanel.hh,v 1.4 2008-08-10 11:36:44 isaya Exp $
 #ifndef TGCPatchPanel_hh
 #define TGCPatchPanel_hh
 
-#include "TrigT1TGC/TGCArguments.hh"
-#include "TrigT1TGC/TGCConnectionPPToSB.hh"
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCArguments.h"
+#include "TrigT1TGC/TGCConnectionPPToSB.h"
+#include "TrigT1TGC/TGCNumbering.h"
 #include <fstream>
 #include <string>
 
@@ -51,7 +50,7 @@ public:
   TGCPatchPanel* getAdjacentPP(int side) const { return m_PPAdj[side]; };
   void setAdjacentPP(int side, TGCPatchPanel* PP);
 
-  void setASDOut(int connector, int ch, TGCASDOut* asdOut);
+  void setASDOut(int connector, int ch, const TGCASDOut* asdOut);
 
   TGCBIDOut* getBIDOut(int ch, int connector, int bunch);
 
@@ -76,8 +75,8 @@ public:
   TGCPatchPanel(const TGCPatchPanel& right);
   TGCPatchPanel& operator=(const TGCPatchPanel& right);
 
-  TGCArguments* tgcArgs() const;
-  
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
+
 private:
   void showResult() const;
   void doBID();
@@ -97,7 +96,7 @@ private:
   int  m_nHit; // 18-Jan-01 Added by KH
 
   TGCPatchPanelOut* m_PPOut[NumberOfPatchPanelOut];
-  TGCASDOut* m_ASDOut[NChOfPPOutputConnector][MaxNumberOfConnector];
+  const TGCASDOut* m_ASDOut[NChOfPPOutputConnector][MaxNumberOfConnector];
   TGCBIDOut* m_BIDOut[NChOfPPOutputConnector][MaxNumberOfConnector][NumberOfBunchKeptInPP];
   TGCPatchPanel* m_PPAdj[2]; // pointer to adjacent board.
   TGCConnectionInPP* m_connectionInPP;
@@ -106,10 +105,6 @@ private:
   
 };
 
-  inline TGCArguments* TGCPatchPanel::tgcArgs() const {
-    return m_tgcArgs;
-  }
-
 } //end of namespace bracket
 
 #endif // TGCPatchPanel_hh
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanelOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanelOut.h
similarity index 90%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanelOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanelOut.h
index c07e9273249c70245286020df7eaf4871a53026d..76818bfe76592980800b0385ec85653938b5915f 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanelOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCPatchPanelOut.h
@@ -2,12 +2,12 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCPatchPanelOut.hh,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
+//$Id: TGCPatchPanelOut.h,v 1.1.1.10 2003-11-03 10:18:17 mishino Exp $
 #ifndef TGCPatchPanelOut_hh
 #define TGCPatchPanelOut_hh
 
-#include "TrigT1TGC/TGCPatchPanel.hh"
-#include "TrigT1TGC/TGCHitPattern.hh"
+#include "TrigT1TGC/TGCPatchPanel.h"
+#include "TrigT1TGC/TGCHitPattern.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
similarity index 95%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
index b5907d869bb1e2041407821d1cf59ee55aed4e47..9f90891a7bc449b37673d40e3ec0dbee47235cf1 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.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 TGCRPhiCoincidenceMap_hh
@@ -12,7 +12,7 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "StoreGate/ReadCondHandleKey.h"
 #include "MuonCondSvc/TGCTriggerData.h"
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
 
@@ -47,7 +47,7 @@ public:
   bool readMap(); // for Run2
   bool readMap_Run3();// for Run3
 
-  TGCArguments* tgcArgs() const;
+  const TGCArguments* tgcArgs() const;
 
 private: // hide default constructor
   TGCRPhiCoincidenceMap() = delete;
@@ -91,7 +91,7 @@ private:
 };
 
 inline 
-TGCArguments* TGCRPhiCoincidenceMap::tgcArgs() const {
+const TGCArguments* TGCRPhiCoincidenceMap::tgcArgs() const {
   return m_tgcArgs;
 }
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMatrix.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMatrix.h
similarity index 72%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMatrix.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMatrix.h
index 382863e3eb31045c3f3de73131a99ec7d7daa4d6..725d79668f85d211426d3653d6146226cd081175 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMatrix.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMatrix.h
@@ -1,13 +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
 */
 
 #ifndef TGCRPhiCoincidenceMatrix_hh
 #define TGCRPhiCoincidenceMatrix_hh
 
-#include "TrigT1TGC/TGCSSCControllerOut.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCSSCControllerOut.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
 
@@ -25,13 +25,13 @@ public:
   void clear();
   TGCRPhiCoincidenceOut* doCoincidence();
 
-  TGCRPhiCoincidenceMatrix(TGCArguments*, const  TGCSectorLogic*  sL=0);
+  TGCRPhiCoincidenceMatrix(const TGCArguments*, const  TGCSectorLogic*  sL=0);
   virtual ~TGCRPhiCoincidenceMatrix();
 
   TGCRPhiCoincidenceMatrix(const TGCRPhiCoincidenceMatrix& right);
   TGCRPhiCoincidenceMatrix& operator=(const TGCRPhiCoincidenceMatrix& right);
   
-  TGCArguments* tgcArgs() const ;
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
   
 private:
 
@@ -51,14 +51,9 @@ private:
   int m_dPhi[MaxNPhiHit];
   int m_ptPhi[MaxNPhiHit];
 
-  TGCArguments* m_tgcArgs;
+  const TGCArguments* m_tgcArgs;
 };
 
-inline
-TGCArguments* TGCRPhiCoincidenceMatrix::tgcArgs() const {
-  return m_tgcArgs;
-}
-
 } //end of namespace bracket
 
 #endif // TGCRPhiCoincidenceMatrix_hh
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceOut.h
similarity index 98%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceOut.h
index 437f58edc8d4ada6a4e4c0274f4b8c0ebfd377db..94a6a4e682b5d3f78483b662d9dee620d17fcf8c 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceOut.h
@@ -4,7 +4,7 @@
 
 #ifndef TGCRPhiCoincidenceOut_hh
 #define TGCRPhiCoincidenceOut_hh
-#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelector.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelector.h
similarity index 94%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelector.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelector.h
index e43dbad57c6c89cbb87a51e5c0c310b7626988de..bdf94a28ec74fa209a5815457d802caa76b4998e 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelector.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelector.h
@@ -6,7 +6,7 @@
 #define TGCSLPreSelector_hh
 
 class TGCSectorLogic;
-#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.h"
 
 namespace LVL1TGCTrigger {
 class TGCRPhiCoincidenceOut;
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelectorOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelectorOut.h
similarity index 98%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelectorOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelectorOut.h
index b4b8a50a82aba3a15637456c51831238eed4d022..b22980599dab9f97107f0bfad4b8689a6f6bb51b 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelectorOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLPreSelectorOut.h
@@ -5,7 +5,7 @@
 #ifndef TGCSLPreSelectorOut_hh
 #define TGCSLPreSelectorOut_hh
 
-#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.h"
 
 namespace LVL1TGCTrigger {
 const int NCandidateInSLPreSelector = 2;
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelector.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelector.h
similarity index 100%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelector.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelector.h
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelectorOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelectorOut.h
similarity index 100%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelectorOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSLSelectorOut.h
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCController.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCController.h
similarity index 69%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCController.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCController.h
index 70c942c312ef5d28e4010bbfab5950cc6e3e8394..aa59e7e5bd286f07591ab61ccfa6880b94406812 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCController.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCController.h
@@ -1,13 +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
 */
 
 #ifndef TGCSSCController_hh
 #define TGCSSCController_hh
 
-#include "TrigT1TGC/TGCHighPtChipOut.hh"
-#include "TrigT1TGC/TGCSSCControllerOut.hh"
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCHighPtChipOut.h"
+#include "TrigT1TGC/TGCSSCControllerOut.h"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
 class TGCSectorLogic;
@@ -16,7 +16,7 @@ class TGCSectorLogic;
 
 class TGCSSCController {
 public:
-  TGCSSCController( TGCArguments*, const TGCSectorLogic* sL=0 );  
+  TGCSSCController( const TGCArguments*, const TGCSectorLogic* sL=0 );
   virtual ~TGCSSCController(){} 
 
   TGCSSCControllerOut* distribute(TGCHighPtChipOut* wire[], TGCHighPtChipOut* strip);
@@ -24,7 +24,7 @@ public:
   int getNumberOfWireHighPtBoard(){return m_NumberOfWireHighPtBoard;};
   void setRegion(TGCRegionType regionIn){ m_region=regionIn;};
 
-  TGCArguments* tgcArgs() const;
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
 
 private:
   const TGCSectorLogic* m_sectorLogic;
@@ -34,11 +34,9 @@ private:
   int getPhiPosInSSC(int chip, int block) const;
   int m_NumberOfWireHighPtBoard;
   TGCRegionType m_region;
-  TGCArguments* m_tgcArgs;
+  const TGCArguments* m_tgcArgs;
 };
-  inline TGCArguments* TGCSSCController::tgcArgs() const {
-    return m_tgcArgs;
-  }
+
 } //end of namespace bracket
 
 #endif
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCControllerOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCControllerOut.h
similarity index 99%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCControllerOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCControllerOut.h
index 02d5616203148d8bc778622b2d90dbb96f20b357..5ca9d898c0860752ee96d1d93c1a5731de883319 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCControllerOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSSCControllerOut.h
@@ -4,7 +4,7 @@
 
 #ifndef TGCSSCControllerOut_hh
 #define TGCSSCControllerOut_hh
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCNumbering.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSector.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSector.h
similarity index 80%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSector.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSector.h
index 233b38f3186c99c847d92c16a1c13f23dc15365d..c70d46e97670e04a74758ad16cf1299036614086 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSector.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSector.h
@@ -1,34 +1,34 @@
 /*
-  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 TGCSector_h
 #define TGCSector_h
 
-#include "TrigT1TGC/TGCArguments.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
-#include "TrigT1TGC/TGCTimingManager.hh"
+#include "TrigT1TGC/TGCArguments.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
+#include "TrigT1TGC/TGCTimingManager.h"
 #include "TrigT1TGC/TGCReadoutIndex.h"
-#include "TrigT1TGC/TGCConnectionInPP.hh"
-#include "TrigT1TGC/TGCConnectionPPToSL.hh"
-#include "TrigT1TGC/TGCConnectionASDToPP.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
+#include "TrigT1TGC/TGCConnectionInPP.h"
+#include "TrigT1TGC/TGCConnectionPPToSL.h"
+#include "TrigT1TGC/TGCConnectionASDToPP.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
 
 
 #include "TrigT1TGC/TGCASDOut.h"
-#include "TrigT1TGC/TGCPatchPanel.hh"
+#include "TrigT1TGC/TGCPatchPanel.h"
 
-#include "TrigT1TGC/TGCWireDoubletSB.hh"
-#include "TrigT1TGC/TGCStripDoubletSB.hh"
-#include "TrigT1TGC/TGCWireTripletSB.hh"
-#include "TrigT1TGC/TGCStripTripletSB.hh"
-#include "TrigT1TGC/TGCInnerSB.hh"
+#include "TrigT1TGC/TGCWireDoubletSB.h"
+#include "TrigT1TGC/TGCStripDoubletSB.h"
+#include "TrigT1TGC/TGCWireTripletSB.h"
+#include "TrigT1TGC/TGCStripTripletSB.h"
+#include "TrigT1TGC/TGCInnerSB.h"
 
 
-#include "TrigT1TGC/TGCWireHighPtBoard.hh"
-#include "TrigT1TGC/TGCStripHighPtBoard.hh"
+#include "TrigT1TGC/TGCWireHighPtBoard.h"
+#include "TrigT1TGC/TGCStripHighPtBoard.h"
 
-#include "TrigT1TGC/TGCSectorLogic.hh"
+#include "TrigT1TGC/TGCSectorLogic.h"
 #include "TrigT1TGC/TGCTMDB.h"
 #include "TrigT1TGC/TGCNSW.h"
 
@@ -65,7 +65,7 @@ public:
   TGCPatchPanel* getPP(int type, int index) const;
   TGCSlaveBoard* getSB(int type, int index) const;
   TGCHighPtBoard* getHPB(int type, int index) const;
-  TGCSectorLogic* getSL() const;
+  TGCSectorLogic* getSL() { return m_SL; }
 
   int getNumberOfPP(int type) const;
   int getNumberOfSB(int type) const;
@@ -79,7 +79,8 @@ public:
   int getOctantId() const { return m_octantId; }
   int getModuleId() const { return m_moduleId; }
 
-  TGCArguments* tgcArgs() const;
+  TGCArguments* tgcArgs() { return m_tgcArgs; }
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
 
 private:
   const TGCTMDB* getTMDB() const { return m_TMDB; }
@@ -113,7 +114,7 @@ private:
   int m_moduleId;
 
   TGCForwardBackwardType m_forwardBackward;
-  TGCConnectionASDToPP* m_ASDToPP[NumberOfPatchPanelType];
+  const TGCConnectionASDToPP* m_ASDToPP[NumberOfPatchPanelType];
 
   int m_numberOfPP[NumberOfPatchPanelType];
   TGCPatchPanel**  m_PP[NumberOfPatchPanelType];
@@ -132,11 +133,6 @@ private:
 
 };
 
-inline
-TGCArguments* TGCSector::tgcArgs() const {
-  return m_tgcArgs;
-}
-
 inline 
  bool TGCSector::hasHit() const
 {
@@ -163,9 +159,6 @@ inline
   if ((type<0) || (index<0)) return 0;
   return m_HPB[type][index];
 }
-inline
- TGCSectorLogic* TGCSector::getSL() const
-{ return m_SL;}
 inline
  int TGCSector::getNumberOfPP(int type) const 
 { 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSectorLogic.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSectorLogic.h
similarity index 86%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSectorLogic.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSectorLogic.h
index 8de4d435ca4dc6570545e3d9690337eb64668e1b..54a8d15c3a26793c60238029f579f4cb813e88ce 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSectorLogic.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSectorLogic.h
@@ -5,22 +5,22 @@
 #ifndef TGGSectorLogic_hh
 #define TGGSectorLogic_hh
 
-#include "TrigT1TGC/TGCArguments.hh"
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCArguments.h"
+#include "TrigT1TGC/TGCNumbering.h"
 #include "TrigT1TGC/TGCEvent.h"
 #include "TrigT1TGC/TGCReadoutIndex.h"
 #include "TrigT1TGC/TGCEIFICoincidenceMap.h"
-#include "TrigT1TGC/TGCTileMuCoincidenceMap.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceOut.hh"
-#include "TrigT1TGC/TGCSSCController.hh"
-#include "TrigT1TGC/TGCSSCControllerOut.hh"
-#include "TrigT1TGC/TGCSLPreSelectorOut.hh"
-#include "TrigT1TGC/TGCSLPreSelector.hh"
-#include "TrigT1TGC/TGCSLSelector.hh"
-#include "TrigT1TGC/TGCSLSelectorOut.hh"
-#include "TrigT1TGC/TGCInnerTrackletSlotHolder.hh"
+#include "TrigT1TGC/TGCTileMuCoincidenceMap.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceOut.h"
+#include "TrigT1TGC/TGCSSCController.h"
+#include "TrigT1TGC/TGCSSCControllerOut.h"
+#include "TrigT1TGC/TGCSLPreSelectorOut.h"
+#include "TrigT1TGC/TGCSLPreSelector.h"
+#include "TrigT1TGC/TGCSLSelector.h"
+#include "TrigT1TGC/TGCSLSelectorOut.h"
+#include "TrigT1TGC/TGCInnerTrackletSlotHolder.h"
 
 //for Run3
 #include "TrigT1TGC/TGCTrackSelector.h"
@@ -47,7 +47,7 @@ class TGCSectorLogic {
 public:
   TGCSectorLogic(const TGCSectorLogic& right);
 
-  TGCSLSelectorOut* getSelectorOutput() const;
+  const TGCSLSelectorOut* getSelectorOutput() const { return m_selectorOut; }
   void getTrackSelectorOutput(std::shared_ptr<TGCTrackSelectorOut> &trackSelectorOut)const ;
 
   int  getTileMuonWord() const;
@@ -92,7 +92,8 @@ public:
 
   void setInnerTrackletSlots(const TGCInnerTrackletSlot* innerTrackletSlots[]);
   
-  TGCArguments* tgcArgs() const;
+  TGCArguments* tgcArgs() { return m_tgcArgs; }
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
 
 protected: 
   enum {MaxNumberOfWireHighPtBoard =2};
@@ -151,11 +152,6 @@ private:
   TGCArguments* m_tgcArgs;
 };
 
-inline
-TGCArguments* TGCSectorLogic::tgcArgs() const {
-  return m_tgcArgs;
-}
-
 inline
  int TGCSectorLogic::getNumberOfSubSectorCluster() const
 {
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoard.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoard.h
similarity index 78%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoard.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoard.h
index dca46e1150387522ff44e399a662557a99fe9425..37a06907a05076e318c5b4886b6506f00231f489 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoard.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoard.h
@@ -1,16 +1,16 @@
 /*
-  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 TGCSlaveBoard_hh
 #define TGCSlaveBoard_hh
 
-#include "TrigT1TGC/TGCArguments.hh"
-#include "TrigT1TGC/TGCSlaveBoardOut.hh"
-#include "TrigT1TGC/TGCPatchPanel.hh"
-#include "TrigT1TGC/TGCPatchPanelOut.hh"
-#include "TrigT1TGC/TGCHitPattern.hh"
-#include "TrigT1TGC/TGCConnectionSBToHPB.hh"
+#include "TrigT1TGC/TGCArguments.h"
+#include "TrigT1TGC/TGCSlaveBoardOut.h"
+#include "TrigT1TGC/TGCPatchPanel.h"
+#include "TrigT1TGC/TGCPatchPanelOut.h"
+#include "TrigT1TGC/TGCHitPattern.h"
+#include "TrigT1TGC/TGCConnectionSBToHPB.h"
 #include <limits.h>
 #include <bitset>
 #include <iostream>
@@ -30,13 +30,13 @@ class TGCSlaveBoard {
 
 public:
 
-  TGCSlaveBoard( TGCArguments* ); 
+  TGCSlaveBoard( const TGCArguments* );
   virtual ~TGCSlaveBoard(); 
   TGCSlaveBoard(const TGCSlaveBoard& right); 
   TGCSlaveBoard& operator=(const TGCSlaveBoard& right); 
 
   void clockIn(int bidIn);
-  TGCSlaveBoardOut* getOutput() const;
+  TGCSlaveBoardOut* getOutput() { return m_slaveBoardOut; }
   void eraseOutput();
 
   int getId() const { return m_id;};
@@ -61,7 +61,7 @@ public:
   void storeSlbIn();
   const std::bitset<200>& GetSlbIn(void) const { return m_slbin; } // for readout
 
-  TGCArguments* tgcArgs() const;
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
   
 protected:
   void collectInput();
@@ -86,15 +86,10 @@ protected:
   TGCPatchPanelOut* m_patchPanelOut;
   std::bitset<200> m_slbin; // store SlaveBoard input for readout
 
-  TGCArguments* m_tgcArgs;
+  const TGCArguments* m_tgcArgs;
   
 };
 
-  inline TGCArguments* TGCSlaveBoard::tgcArgs() const {
-    return m_tgcArgs;
-  }
-
-
 } //end of namespace bracket
 
 #endif // TGCSlaveBoard_hh
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoardOut.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoardOut.h
similarity index 98%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoardOut.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoardOut.h
index 95907b206926da0716f2c0582116ff8a2f51bcdd..b9f088f84cc141973a85fa009346d5a0d28c570c 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoardOut.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCSlaveBoardOut.h
@@ -4,7 +4,7 @@
 
 #ifndef TGCSlaveBoardOut_hh
 #define TGCSlaveBoardOut_hh
-#include "TrigT1TGC/TGCHitPattern.hh"
+#include "TrigT1TGC/TGCHitPattern.h"
 #include <fstream>
 #include <iostream>
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripDoubletSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripDoubletSB.h
similarity index 67%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripDoubletSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripDoubletSB.h
index 8d50b00f46068efe93bb99b6f2f01dcda408e561..8ef6276943319d296df8df32c149ec4b3a80bcc2 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripDoubletSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripDoubletSB.h
@@ -1,17 +1,17 @@
 /*
-  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 TGCStripDoubletSB_hh
 #define TGCStripDoubletSB_hh
 
-#include "TrigT1TGC/TGCDoubletSB.hh"
+#include "TrigT1TGC/TGCDoubletSB.h"
 
 namespace LVL1TGCTrigger {
 
 class TGCStripDoubletSB : public TGCDoubletSB {
 public:
-  TGCStripDoubletSB(TGCArguments* tgcargs):TGCDoubletSB(tgcargs){
+  TGCStripDoubletSB(const TGCArguments* tgcargs):TGCDoubletSB(tgcargs){
     m_maxDev=3;
     m_nChAdj=0;
     m_iChBase=1;
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripHighPtBoard.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripHighPtBoard.h
similarity index 76%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripHighPtBoard.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripHighPtBoard.h
index 27be283a1189fafb8ee3a7d6682b05824c349c63..a7f6cdc821eba79426e1fe6e989955195e8cb623 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripHighPtBoard.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripHighPtBoard.h
@@ -5,12 +5,12 @@
 #ifndef TGCStripHighPtBoard_hh
 #define TGCStripHighPtBoard_hh
 
-#include "TrigT1TGC/TGCHighPtBoard.hh"
-#include "TrigT1TGC/TGCDoubletSB.hh"
-#include "TrigT1TGC/TGCHighPtBoardOut.hh"
-#include "TrigT1TGC/TGCHighPtChipOut.hh"
-#include "TrigT1TGC/TGCStripTripletSB.hh"
-#include "TrigT1TGC/TGCSlaveBoardOut.hh"
+#include "TrigT1TGC/TGCHighPtBoard.h"
+#include "TrigT1TGC/TGCDoubletSB.h"
+#include "TrigT1TGC/TGCHighPtBoardOut.h"
+#include "TrigT1TGC/TGCHighPtChipOut.h"
+#include "TrigT1TGC/TGCStripTripletSB.h"
+#include "TrigT1TGC/TGCSlaveBoardOut.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripTripletSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripTripletSB.h
similarity index 92%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripTripletSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripTripletSB.h
index 17ac0862f0cc8ec85823e26efb280d6012398fc6..86b6fd333ab0c0d30763249d98789348e891a745 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripTripletSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCStripTripletSB.h
@@ -5,7 +5,7 @@
 #ifndef TGCStripTripletSB_hh
 #define TGCStripTripletSB_hh
 
-#include "TrigT1TGC/TGCSlaveBoard.hh"
+#include "TrigT1TGC/TGCSlaveBoard.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTileMuCoincidenceMap.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTileMuCoincidenceMap.h
similarity index 83%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTileMuCoincidenceMap.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTileMuCoincidenceMap.h
index a3702b21de554940662dc43c32b88c6c3cb2f56e..dfa9a5986ebf638ccc32bd0fb51d0558f79c859f 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTileMuCoincidenceMap.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTileMuCoincidenceMap.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 TGCTileMuCoincidenceMap_hh
@@ -12,7 +12,7 @@
 #include "StoreGate/ReadCondHandle.h"
 #include "MuonCondSvc/TGCTriggerData.h"
 
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
  
@@ -51,13 +51,14 @@ public:
 					 const int sec,
 					 const int side )  const;
 
-  const std::string&          getVersion() const;
+  const std::string&          getVersion() const { return m_verName; }
 
   void                        dumpMap() const;
 
   bool readMap();  
 
-  TGCArguments* tgcArgs() const;
+  TGCArguments* tgcArgs() { return m_tgcArgs; }
+  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
   
 protected:
   enum {N_Side=2};
@@ -80,16 +81,6 @@ private:
   const SG::ReadCondHandleKey<TGCTriggerData>& m_readCondKey;
 };
 
-inline TGCArguments* TGCTileMuCoincidenceMap::tgcArgs() const {
-  return m_tgcArgs;
-}
-
-inline  
- const std::string& TGCTileMuCoincidenceMap::getVersion() const
-{
-  return m_verName;
-}
-
 } //end of namespace bracket
 
 #endif // TGCTileMuCoincidenceMap_hh
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTimingManager.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTimingManager.h
similarity index 93%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTimingManager.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTimingManager.h
index 20a806640a778cb8be798c4dae8526d43d3e871a..f8455e5ad0dbc60962db13ada8d995b8575f0600 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTimingManager.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCTimingManager.h
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCTimingManager.hh,v 1.1.1.10 2003-11-03 10:18:18 mishino Exp $
+//$Id: TGCTimingManager.h,v 1.1.1.10 2003-11-03 10:18:18 mishino Exp $
 #ifndef TGCTimingManager_hh
 #define TGCTimingManager_hh
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireDoubletSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireDoubletSB.h
similarity index 67%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireDoubletSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireDoubletSB.h
index d89b8f641998dba8767ccc7f09bb1ee5b6474da5..e7d15e3ad3dd9451df6645496b3c511f9d9cc65f 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireDoubletSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireDoubletSB.h
@@ -1,16 +1,16 @@
 /*
-  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 TGCWireDoubletSB_hh
 #define TGCWireDoubletSB_hh
-#include "TrigT1TGC/TGCDoubletSB.hh"
+#include "TrigT1TGC/TGCDoubletSB.h"
 
 namespace LVL1TGCTrigger {
 
 class TGCWireDoubletSB : public TGCDoubletSB {
 public:
-  TGCWireDoubletSB(TGCArguments* tgcargs):TGCDoubletSB(tgcargs){
+  TGCWireDoubletSB(const TGCArguments* tgcargs):TGCDoubletSB(tgcargs){
     m_maxDev=7;
     m_nChAdj=4;
     m_iChBase=9;
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireHighPtBoard.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireHighPtBoard.h
similarity index 94%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireHighPtBoard.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireHighPtBoard.h
index ab0f0ce392dea86c24701234553da22c6e3b2470..e92347b72f7ae7f69f2b0608d08faa97887787e6 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireHighPtBoard.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireHighPtBoard.h
@@ -5,7 +5,7 @@
 #ifndef TGCWireHighPtBoard_hh
 #define TGCWireHighPtBoard_hh
 
-#include "TrigT1TGC/TGCHighPtBoard.hh"
+#include "TrigT1TGC/TGCHighPtBoard.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireTripletSB.hh b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireTripletSB.h
similarity index 94%
rename from Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireTripletSB.hh
rename to Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireTripletSB.h
index e0fb05c3aa92840bd0988c2bf0419f6b34c08ecf..d39871ac3538aa7e8f3851d1c2afe8027c0c2eee 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireTripletSB.hh
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCWireTripletSB.h
@@ -5,7 +5,7 @@
 #ifndef TGCWireTripletSB_hh
 #define TGCWireTripletSB_hh
 
-#include "TrigT1TGC/TGCSlaveBoard.hh"
+#include "TrigT1TGC/TGCSlaveBoard.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx b/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx
index 8f9325a9968d8d3f041376e87c09e16edc6a5bf3..7c097722af7ec423c1311e7ff616e3a65c0397e6 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx
@@ -12,15 +12,15 @@
 #include "TrigT1TGC/TGCASDOut.h"
 #include "TrigT1TGC/TGCEvent.h"
 #include "TrigT1TGC/TGCReadoutIndex.h"
-#include "TrigT1TGC/TGCSLSelectorOut.hh"// for Run2
-#include "TrigT1TGC/TGCTrackSelectorOut.h"// for Run3
-#include "TrigT1TGC/TGCElectronicsSystem.hh"
-#include "TrigT1TGC/TGCTimingManager.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
-#include "TrigT1TGC/TGCSector.hh"
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCSLSelectorOut.h" // for Run2
+#include "TrigT1TGC/TGCTrackSelectorOut.h" // for Run3
+#include "TrigT1TGC/TGCElectronicsSystem.h"
+#include "TrigT1TGC/TGCTimingManager.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
+#include "TrigT1TGC/TGCSector.h"
+#include "TrigT1TGC/TGCNumbering.h"
 #include "TrigT1TGC/TrigT1TGC_ClassDEF.h"
-#include "TrigT1TGC/TGCNumbering.hh"
+#include "TrigT1TGC/TGCNumbering.h"
 #include "TrigT1TGC/TGCTMDBOut.h"
 #include "TrigT1TGC/TGCNSW.h"
 
@@ -154,11 +154,10 @@ namespace LVL1TGCTrigger {
     // doMaskOperation is performed at the first event
     // It is better to implement callback against
     // MuonTGC_CablingSvc::updateCableASDToPP (Susumu Oda, 2010/10/27)
-    static bool firstTime = true;
-    if(firstTime) {
+    if(m_firstTime) {
       // do mask operation
       if(getMaskedChannel().isFailure()) return StatusCode::FAILURE;
-      firstTime = false;
+      m_firstTime = false;
     }
     
     StatusCode sc = StatusCode::SUCCESS;
@@ -323,7 +322,7 @@ namespace LVL1TGCTrigger {
           if(i==1) subsystem = LVL1MUONIF::Lvl1MuCTPIInput::idSideC();
           if (m_OutputTgcRDO.value()) recordRdoSL(sector, subsystem);
 
-          TGCSLSelectorOut* selectorOut = sector->getSL()->getSelectorOutput();
+          const TGCSLSelectorOut* selectorOut = sector->getSL()->getSelectorOutput();
 	  std::shared_ptr<TGCTrackSelectorOut>  trackSelectorOut;
 	  sector->getSL()->getTrackSelectorOutput(trackSelectorOut); 
 
@@ -620,7 +619,7 @@ namespace LVL1TGCTrigger {
         TGCSlaveBoard * slb = sector->getSB(itype, index);
         if (0==slb) continue;
         id = slb->getId();
-        TGCSlaveBoardOut * out = slb->getOutput();
+        const TGCSlaveBoardOut * out = slb->getOutput();
         if (0==out) continue;
 
         bool isEIFI = (moduleType==TgcRawData::SLB_TYPE_INNER_WIRE ||
@@ -898,7 +897,7 @@ namespace LVL1TGCTrigger {
     
     
     // Tile
-    TGCTMDB* tmdb = m_system->getTMDB();
+    const TGCTMDB* tmdb = m_system->getTMDB();
     int inner_tile = tmdb->getInnerTileBits(sector->getSideId(), sectorId);
     
     if (inner_tile > 0) {
@@ -927,7 +926,7 @@ namespace LVL1TGCTrigger {
   void LVL1TGCTrigger::recordRdoSL(TGCSector * sector, unsigned int subsystem)
   {
     // check if whether trigger exists or not
-    TGCSLSelectorOut* selectorOut = sector->getSL()->getSelectorOutput();
+    const TGCSLSelectorOut* selectorOut = sector->getSL()->getSelectorOutput();
     if (selectorOut ==0) return;
     if (selectorOut->getNCandidate()==0) return;
     
@@ -1151,7 +1150,7 @@ namespace LVL1TGCTrigger {
   }
   
   ////////////////////////////////////////////////
-  // see TGCNumbering.hh 
+  // see TGCNumbering.h 
   int LVL1TGCTrigger::getLPTTypeInRawData(int type)
   {
     switch(type) {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/NSWTrigOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/NSWTrigOut.cxx
index 601b23d636a0ac83555b34297d8acbb2cbfda6a8..2cd83ad65dadd504070307796acaaf0de9f31b5f 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/NSWTrigOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/NSWTrigOut.cxx
@@ -8,114 +8,58 @@
 */
 // ====================================================================
 
+#include "AthenaKernel/getMessageSvc.h"
 #include "TrigT1TGC/NSWTrigOut.h"
-
-#include "TrigT1TGC/TGCArguments.hh"
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
 
-// ====================================================================
-//
-// class description
-//
-// ====================================================================
-
-//////////////////////
-NSWTrigOut::NSWTrigOut()
-  : m_sideID(-1), m_NSWTriggerProcessor(0), m_NSWeta_8bit(0), m_NSWphi_6bit(0), m_NSWDtheta_5bit(0), m_tgcArgs(0)
-//////////////////////
-{
-}
 
 ///////////////////////////////////////////////////////////////
-  NSWTrigOut::NSWTrigOut(int side, std::vector<int> NSWTP, std::vector<int> NSWeta,std::vector<int> NSWphi, std::vector<int> NSWDtheta,TGCArguments* tgcargs)
-    : m_sideID(side), m_NSWTriggerProcessor(NSWTP), m_NSWeta_8bit(NSWeta), m_NSWphi_6bit(NSWphi), m_NSWDtheta_5bit(NSWDtheta),m_tgcArgs(tgcargs)
+NSWTrigOut::NSWTrigOut(int side, std::vector<int> NSWTP, std::vector<int> NSWeta, std::vector<int> NSWphi, std::vector<int> NSWDtheta, TGCArguments* tgcargs)
+  : m_sideID(side), m_NSWTriggerProcessor(NSWTP), m_NSWeta_8bit(NSWeta), m_NSWphi_6bit(NSWphi), m_NSWDtheta_5bit(NSWDtheta), m_tgcArgs(tgcargs)
 ///////////////////////////////////////////////////////////////
 {
-  m_msg = Athena::MsgStreamMember("LVL1TGC::NSWTrigOut");
-  if(m_tgcArgs){
-    m_msg.get().setLevel(m_tgcArgs->MSGLEVEL());
-  }
-  else{
-    m_msg.get().setLevel(defaultMSGLvl);
-  }
-}
-  NSWTrigOut::NSWTrigOut(int side, std::vector<int> NSWTP,TGCArguments* tgcargs)
-    : m_sideID(side), m_NSWTriggerProcessor(NSWTP), m_NSWeta_8bit(0), m_NSWphi_6bit(0), m_NSWDtheta_5bit(0),m_tgcArgs(tgcargs)
-///////////////////////////////////////////////////////////////
-{
-  m_msg = Athena::MsgStreamMember("LVL1TGC::NSWTrigOut");
-  if(m_tgcArgs){
-    m_msg.get().setLevel(m_tgcArgs->MSGLEVEL());
-  }
-  else{
-    m_msg.get().setLevel(defaultMSGLvl);
-  }
 }
 
 ///////////////////////////////////////////////////////////////
-NSWTrigOut::NSWTrigOut(const NSWTrigOut& right)
-/////////////////////////////////////////////////////////////
-    :m_sideID(right.m_sideID), 
-     m_NSWTriggerProcessor(right.m_NSWTriggerProcessor),
-     m_NSWeta_8bit(right.m_NSWeta_8bit),
-     m_NSWphi_6bit(right.m_NSWphi_6bit),
-     m_NSWDtheta_5bit(right.m_NSWDtheta_5bit),
-     m_tgcArgs(right.m_tgcArgs)
+NSWTrigOut::NSWTrigOut(int side, std::vector<int> NSWTP, TGCArguments* tgcargs)
+  : m_sideID(side), m_NSWTriggerProcessor(NSWTP), m_tgcArgs(tgcargs)
+///////////////////////////////////////////////////////////////
 {
-  m_msg = Athena::MsgStreamMember("LVL1TGC::NSWTrigOut");
-  if(m_tgcArgs){
-    m_msg.get().setLevel(m_tgcArgs->MSGLEVEL());
-  }
-  else{
-    m_msg.get().setLevel(defaultMSGLvl);
-  }
 }
 
 
-/////////////////////////////////////////////////////////////
-const NSWTrigOut& NSWTrigOut::operator=(const NSWTrigOut& right)
-/////////////////////////////////////////////////////////////
-{
-  if (this != &right) {
-    m_sideID    = right.m_sideID; 
-    m_NSWTriggerProcessor  = right.m_NSWTriggerProcessor;
-    m_NSWeta_8bit    = right.m_NSWeta_8bit;
-    m_NSWphi_6bit     = right.m_NSWphi_6bit;
-    m_NSWDtheta_5bit     = right.m_NSWDtheta_5bit;
-    m_tgcArgs    =  right.m_tgcArgs; 
-  }
-  return *this;
-}
- 
 ///////////////////////////////////////////////////////////
 NSWTrigOut& NSWTrigOut::operator+=(const NSWTrigOut& right)
 ///////////////////////////////////////////////////////////
 {
   if (this != &right && (m_sideID==right.m_sideID || m_sideID==-1)) {
-   m_NSWTriggerProcessor.insert(m_NSWTriggerProcessor.end(), right.m_NSWTriggerProcessor.begin(), right.m_NSWTriggerProcessor.end());
-   m_NSWeta_8bit.insert(m_NSWeta_8bit.end(), right.m_NSWeta_8bit.begin(), right.m_NSWeta_8bit.end());
-   m_NSWphi_6bit.insert(m_NSWphi_6bit.end(), right.m_NSWphi_6bit.begin(), right.m_NSWphi_6bit.end());
-   m_NSWDtheta_5bit.insert(m_NSWDtheta_5bit.end(), right.m_NSWDtheta_5bit.begin(), right.m_NSWDtheta_5bit.end());
- }
-
- return *this;
-
+    m_NSWTriggerProcessor.insert(m_NSWTriggerProcessor.end(), right.m_NSWTriggerProcessor.begin(), right.m_NSWTriggerProcessor.end());
+    m_NSWeta_8bit.insert(m_NSWeta_8bit.end(), right.m_NSWeta_8bit.begin(), right.m_NSWeta_8bit.end());
+    m_NSWphi_6bit.insert(m_NSWphi_6bit.end(), right.m_NSWphi_6bit.begin(), right.m_NSWphi_6bit.end());
+    m_NSWDtheta_5bit.insert(m_NSWDtheta_5bit.end(), right.m_NSWDtheta_5bit.begin(), right.m_NSWDtheta_5bit.end());
+  }
+  return *this;
 }
 
 /////////////////////////////
 void NSWTrigOut::print() const
 /////////////////////////////
 {
+  MsgStream msg(Athena::getMessageSvc(), "LVL1TGC::NSWTrigOut");
+  if (m_tgcArgs) msg.setLevel(m_tgcArgs->MSGLEVEL());
+
   for(unsigned int i=0;i!=m_NSWTriggerProcessor.size();i++){
-    ATH_MSG_DEBUG("i="<<i<<"\n"
-            <<"Size=="<<m_NSWTriggerProcessor.size()<<"\n"
-            << "Side=" << m_sideID <<"\n"
-            << " :: ModuleID=" << m_NSWTriggerProcessor[i]<<"\n"
-            << " :: eta_8bit=" << m_NSWeta_8bit[i]<<"\n"
-            << " :: phi_6bit=" << m_NSWphi_6bit[i]<<"\n"
-            << " :: Dtheta_5bit=" << m_NSWDtheta_5bit[i]<<"\n");     
+    msg << MSG::DEBUG
+        << "i=" << i<<"\n"
+        <<"Size=="<<m_NSWTriggerProcessor.size()<<"\n"
+        << "Side=" << m_sideID <<"\n"
+        << " :: ModuleID=" << m_NSWTriggerProcessor[i]<<"\n"
+        << " :: eta_8bit=" << m_NSWeta_8bit[i]<<"\n"
+        << " :: phi_6bit=" << m_NSWphi_6bit[i]<<"\n"
+        << " :: Dtheta_5bit=" << m_NSWDtheta_5bit[i]<<"\n"
+        << endmsg;
   }
   
 }
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCASDOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCASDOut.cxx
index c911cda4e3ebf10f94854fcfda233bf2922d0d1d..4f6c9acd59c701fe3378ef325af5015c69466ada 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCASDOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCASDOut.cxx
@@ -23,7 +23,7 @@ namespace LVL1TGCTrigger {
 //
 // ====================================================================
 
-static const char* strsig[3]= { "N/A", "WireGroup", "Strip" };
+const char* const strsig[3]= { "N/A", "WireGroup", "Strip" };
 
 // ====================================================================
 //
@@ -31,19 +31,12 @@ static const char* strsig[3]= { "N/A", "WireGroup", "Strip" };
 //
 // ====================================================================
 
-//////////////////////
-TGCASDOut::TGCASDOut()
-  : m_tgcReadoutIndex(),
-    m_signalType(WIRE), m_hitID(0), m_channel(0), m_hitToF(0.0)
-//////////////////////
-{
-}
 
 ///////////////////////////////////////////////////////////////
 TGCASDOut::TGCASDOut(TGCIndex tgcindex, int ilyr,
 		     TGCSignalType sigtype, int id, double tof)
   : m_tgcReadoutIndex(tgcindex, ilyr),
-    m_signalType(sigtype), m_hitID(id), m_channel(0), m_hitToF(tof)
+    m_signalType(sigtype), m_hitID(id), m_hitToF(tof)
 ///////////////////////////////////////////////////////////////
 {
 }
@@ -52,35 +45,12 @@ TGCASDOut::TGCASDOut(TGCIndex tgcindex, int ilyr,
 TGCASDOut::TGCASDOut(TGCReadoutIndex tgcrindex, 
 		     TGCSignalType sigtype, int id, double tof)
   : m_tgcReadoutIndex(tgcrindex),
-    m_signalType(sigtype), m_hitID(id), m_channel(0), m_hitToF(tof)
-///////////////////////////////////////////////////////////////
-{
-}
-
+    m_signalType(sigtype), m_hitID(id), m_hitToF(tof)
 ///////////////////////////////////////////////////////////////
-TGCASDOut::TGCASDOut(const TGCASDOut& right)
-/////////////////////////////////////////////////////////////
 {
-  *this= right;
 }
 
 
-/////////////////////////////////////////////////////////////
-TGCASDOut& TGCASDOut::operator=(const TGCASDOut& right)
-/////////////////////////////////////////////////////////////
-{
-  if (this != &right) {
-    m_tgcReadoutIndex= right.m_tgcReadoutIndex;
-    m_signalType= right.m_signalType;
-    m_hitID= right.m_hitID;
-    m_channel= right.m_channel;
-    m_hitToF= right.m_hitToF;
-  }
-  return *this;
-}
-
-
-
 ////////////////////////////////////////////////////////////////////////
 void TGCASDOut::SetParams(TGCSignalType signal_type, int id, double tof)
 ////////////////////////////////////////////////////////////////////////
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCArguments.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCArguments.cxx
index 3c7f65000fa99065af9b21dcd4cfcbd8f0a66c47..1556c2e5c7dca88201e884e7812cc34568d48e78 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCArguments.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCArguments.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
   
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCBIDOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCBIDOut.cxx
index 465fb6607de4da946826d8c2d09aa69c8cde3130..0b6fd8446b5dac33267895758db5a4496d8e6817 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCBIDOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCBIDOut.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCBIDOut.hh"
+#include "TrigT1TGC/TGCBIDOut.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCBoardConnection.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCBoardConnection.cxx
index 931554750d358dd297a7d38edab0422071934086..07f775424b4810f72f971cd04a24996e7ee434a8 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCBoardConnection.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCBoardConnection.cxx
@@ -3,7 +3,7 @@
 */
 
 //$Id: TGCBoardConnection.cxx,v 1.3 2009-01-08 10:06:48 isaya Exp $
-#include "TrigT1TGC/TGCBoardConnection.hh"
+#include "TrigT1TGC/TGCBoardConnection.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionASDToPP.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionASDToPP.cxx
index 5420299bb2d78ca856ae1ac1888393937737369b..93548f695ce889111519da7358e6d55483a4391b 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionASDToPP.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionASDToPP.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 <iostream>
@@ -8,9 +8,9 @@
 #include <ctype.h>
 #include <string>
 
-#include "TrigT1TGC/TGCConnectionASDToPP.hh"
-#include "TrigT1TGC/TGCConnectionPPToSB.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCConnectionASDToPP.h"
+#include "TrigT1TGC/TGCConnectionPPToSB.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 
 #include "PathResolver/PathResolver.h"
 
@@ -21,7 +21,7 @@ namespace LVL1TGCTrigger {
 const int TGCConnectionASDToPP::s_forwardLayer[] = {2, 1, 0, 4, 3, 6, 5, 8, 7};
 
 int TGCConnectionASDToPP::getConnection(const int /*sideId*/, const int layer, const int chamber,
-					const int line, int* pp, int* connector, int* channel)
+					const int line, int* pp, int* connector, int* channel) const
 {
   int i;
   for( i=0; i<m_totalNumberOfChannel; i+=1){
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionHPBToSL.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionHPBToSL.cxx
index cce4a1ddbe73754e323224f20285a892d6d2ac30..3c527834156afe90da62025245b4ea5eb2e2b74e 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionHPBToSL.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionHPBToSL.cxx
@@ -3,8 +3,8 @@
 */
 
 //$Id: TGCConnectionHPBToSL.cxx,v 1.2 2006-06-22 00:26:35 nkanaya Exp $
-#include "TrigT1TGC/TGCConnectionHPBToSL.hh"
-#include "TrigT1TGC/TGCBoardConnection.hh"
+#include "TrigT1TGC/TGCConnectionHPBToSL.h"
+#include "TrigT1TGC/TGCBoardConnection.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionInPP.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionInPP.cxx
index 00986f2074670d0f7eb2ee5892763234f12b7bbf..e85a9e168774ad2f0ad742a1cc21541fabc013ab 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionInPP.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionInPP.cxx
@@ -3,9 +3,9 @@
 */
 
 //$Id: TGCConnectionInPP.cxx,v 1.4 2009-03-20 17:48:53 isaya Exp $
-#include "TrigT1TGC/TGCConnectionInPP.hh"
-#include "TrigT1TGC/TGCPatchPanel.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCConnectionInPP.h"
+#include "TrigT1TGC/TGCPatchPanel.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include <iostream>
 #include <fstream>
 #include <sstream>
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSB.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSB.cxx
index 1daeebce971bd821b9f5e53fbe74a09411448752..d6c74cfc0fbaa79368de1a18820b32df4ebc92f3 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSB.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSB.cxx
@@ -3,8 +3,8 @@
 */
 
 //$Id: TGCConnectionPPToSB.cxx,v 1.2 2006-06-22 00:26:35 nkanaya Exp $
-#include "TrigT1TGC/TGCConnectionPPToSB.hh"
-#include "TrigT1TGC/TGCBoardConnection.hh"
+#include "TrigT1TGC/TGCConnectionPPToSB.h"
+#include "TrigT1TGC/TGCBoardConnection.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSL.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSL.cxx
index c59d1abeb00f66c61863be6336e1ea61cb1d2f78..e5171e3bfdc52c70ec6ccd6c19bb5c4f7239f3dd 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSL.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionPPToSL.cxx
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCConnectionPPToSL.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCConnectionPPToSL.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include <iostream>
 #include <fstream>
 #include <sstream>
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionSBToHPB.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionSBToHPB.cxx
index b9533a3affaeb9d90e441f5f619ef146d9bb2233..72aa50f01e2e4758de820f05243374a9b39a7070 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionSBToHPB.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCConnectionSBToHPB.cxx
@@ -3,8 +3,8 @@
 */
 
 //$Id: TGCConnectionSBToHPB.cxx,v 1.3 2009-03-15 18:07:55 isaya Exp $
-#include "TrigT1TGC/TGCConnectionSBToHPB.hh"
-#include "TrigT1TGC/TGCBoardConnection.hh"
+#include "TrigT1TGC/TGCConnectionSBToHPB.h"
+#include "TrigT1TGC/TGCBoardConnection.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCDatabaseManager.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCDatabaseManager.cxx
index c19cec9976342dc2f34113609933fff484c0f8bb..753eabd811cf6673a90133af868e227453f9c61b 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCDatabaseManager.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCDatabaseManager.cxx
@@ -2,15 +2,15 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCDatabaseManager.hh"
-#include "TrigT1TGC/TGCConnectionPPToSL.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
+#include "TrigT1TGC/TGCDatabaseManager.h"
+#include "TrigT1TGC/TGCConnectionPPToSL.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
 #include "TrigT1TGC/TGCEIFICoincidenceMap.h"
-#include "TrigT1TGC/TGCTileMuCoincidenceMap.hh"
+#include "TrigT1TGC/TGCTileMuCoincidenceMap.h"
 #include "TrigT1TGC/TGCNSWCoincidenceMap.h"
-#include "TrigT1TGC/TGCConnectionASDToPP.hh"
-#include "TrigT1TGC/TGCConnectionInPP.hh"
-#include "TrigT1TGC/TGCPatchPanel.hh"
+#include "TrigT1TGC/TGCConnectionASDToPP.h"
+#include "TrigT1TGC/TGCConnectionInPP.h"
+#include "TrigT1TGC/TGCPatchPanel.h"
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
@@ -70,12 +70,11 @@ void TGCDatabaseManager::addConnectionInPP(const TGCPatchPanel* patchPanel,
 }
 
 TGCDatabaseManager::TGCDatabaseManager(TGCArguments* tgcargs)
- : m_mapTileMu(0),
+ : AthMessaging(Athena::getMessageSvc(), "LVL1TGC::TGCDatabaseManager"),
+   m_mapTileMu(0),
    m_tgcArgs(tgcargs)
 {
-  // set message label
-  m_msg = Athena::MsgStreamMember("LVL1TGC::TGCDatabaseManager");
-  m_msg.get().setLevel(tgcArgs()->MSGLEVEL());
+  setLevel(tgcArgs()->MSGLEVEL());
 
   int i,j,k;
   for( j=0; j<NumberOfRegionType; j+=1){
@@ -100,11 +99,10 @@ TGCDatabaseManager::TGCDatabaseManager(TGCArguments* tgcargs)
 TGCDatabaseManager::TGCDatabaseManager(TGCArguments* tgcargs,
 				       const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
 				       const std::string& ver, bool )
- : m_tgcArgs(tgcargs)
+ : AthMessaging(Athena::getMessageSvc(), "LVL1TGC::TGCDatabaseManager"),
+   m_tgcArgs(tgcargs)
 {
-  // set message label
-  m_msg = Athena::MsgStreamMember("LVL1TGC::TGCDatabaseManager");
-  m_msg.get().setLevel(tgcArgs()->MSGLEVEL());
+  setLevel(tgcArgs()->MSGLEVEL());
 
   bool status = true;
 
@@ -209,6 +207,7 @@ TGCDatabaseManager::~TGCDatabaseManager()
 }
 
 TGCDatabaseManager::TGCDatabaseManager(const TGCDatabaseManager& right)
+  : AthMessaging(Athena::getMessageSvc(), "LVL1TGC::TGCDatabaseManager")
 {
   for(int j=0; j<NumberOfRegionType; j+=1){
     for(int i=0; i<NumberOfPatchPanelType; i+=1){
@@ -265,23 +264,17 @@ TGCDatabaseManager::operator=(const TGCDatabaseManager& right)
   return *this;
 }
 
-const std::string& TGCDatabaseManager::getFilename(int type)
+std::string TGCDatabaseManager::getFilename(int type)
 {
-  static std::string fn="";
   switch (type) {
    case 0: //ASD2PP
-    fn = "MuonTGC_Cabling_ASD2PP.db";
-    break; 
+    return "MuonTGC_Cabling_ASD2PP.db";
    case 1: //PP
-    fn = "MuonTGC_Cabling_PP.db";
-    break;
+    return "MuonTGC_Cabling_PP.db";
    case 2: //PP2SL
-    fn = "MuonTGC_Cabling_PP2SL.db";
-    break;
-   default:
-    break;
+    return "MuonTGC_Cabling_PP2SL.db";
   }
-  return fn;
+  return "";
 }
 
 const std::vector<std::string> TGCDatabaseManager::splitCW(const std::string& input, char delimiter)
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCDoubletSB.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCDoubletSB.cxx
index 9c5b381cd4a31332d7857af0f05e5cb54426def7..de682e578bdf0085be3c511f3cd3cbdb7e3a90af 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCDoubletSB.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCDoubletSB.cxx
@@ -1,18 +1,18 @@
 /*
-  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 "TrigT1TGC/TGCDoubletSB.hh"
-#include "TrigT1TGC/TGCSlaveBoard.hh"
-#include "TrigT1TGC/TGCPatchPanelOut.hh"
-#include "TrigT1TGC/TGCHitPattern.hh"
+#include "TrigT1TGC/TGCDoubletSB.h"
+#include "TrigT1TGC/TGCSlaveBoard.h"
+#include "TrigT1TGC/TGCPatchPanelOut.h"
+#include "TrigT1TGC/TGCHitPattern.h"
 #include <iostream>
 #include <cstdlib>
 
 
 namespace LVL1TGCTrigger {
 
-TGCDoubletSB::TGCDoubletSB( TGCArguments* tgcargs)
+TGCDoubletSB::TGCDoubletSB(const TGCArguments* tgcargs)
   :TGCSlaveBoard(tgcargs),
    m_priorSign(1),m_numberOfData(2),m_nChInBlock(32),
    m_maxDev(0),m_posMaxDev(0),m_negMaxDev(0),m_nChAdj(0),m_iChBase(0),
@@ -55,10 +55,6 @@ void TGCDoubletSB::doCoincidence()
 
   if ( m_slaveBoardOut!= 0 ) delete m_slaveBoardOut;
   m_slaveBoardOut = new TGCSlaveBoardOut(this,m_bid);
-  if ( !m_slaveBoardOut ) {
-    std::cerr << "TGCDoubletSB::createSlaveBoardOut: Memory allocation failure.";
-    exit(1);
-  }
   m_slaveBoardOut->clear();
   m_slaveBoardOut->setNumberOfData(NumberOfDoubletSBData);
 
@@ -211,10 +207,6 @@ void TGCDoubletSB::do3outof4Coincedence(TGCHitPattern** LCOut)
   if(((LCOut[0]!=0)||(LCOut[1]!=0))&&((LCOut[2]!=0)||(LCOut[3]!=0))){
     if ( m_coincidenceOut != 0 ) delete m_coincidenceOut;
     m_coincidenceOut = new TGCHitPattern;
-    if ( !m_coincidenceOut ) {
-      std::cerr << "TGCDoubletSB::create coincidenceOut: Memory allocation failure.";
-      exit(1);
-    }
 #ifdef TGCDEBUG
     std::cout << "# DoubletSB [do3outof4Coincedence]" <<std::endl;
     std::cout<<"#SB LCOut[0]: inner 2hit";LCOut[0]->print();
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCEIFICoincidenceMap.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCEIFICoincidenceMap.cxx
index fdf7d1c481427e9077d77b86888c5c53f303038b..3a15c9b10b1b45b19d1b10df6dfde3dda1dfa69f 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCEIFICoincidenceMap.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCEIFICoincidenceMap.cxx
@@ -10,23 +10,22 @@
 #include <string>
 #include <iomanip>
 
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include "PathResolver/PathResolver.h"
-
-#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
 namespace LVL1TGCTrigger {
 
 TGCEIFICoincidenceMap::TGCEIFICoincidenceMap(TGCArguments* tgcargs,
                                              const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey)
-  :m_verName("NA"),
+  :AthMessaging(Athena::getMessageSvc(), "LVL1TGC::TGCEIFICoincidenceMap"),
+   m_verName("NA"),
    m_side(0),
    m_fullCW(false),
    m_tgcArgs(tgcargs),
    m_readCondKey(readCondKey)
 {
-  m_msg = Athena::MsgStreamMember("LVL1TGC::TGCEIFICoincidenceMap");
-  m_msg.get().setLevel(tgcArgs()->MSGLEVEL());
+  setLevel(tgcArgs()->MSGLEVEL());
 
   // intialize map
   ATH_MSG_DEBUG("initialising the map");
@@ -51,14 +50,14 @@ TGCEIFICoincidenceMap::TGCEIFICoincidenceMap(TGCArguments* tgcargs,
 					     const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
                                              const std::string& version,
 					     int   sideID)
- : m_verName(version),
+ : AthMessaging(Athena::getMessageSvc(), "LVL1TGC::TGCEIFICoincidenceMap"),
+   m_verName(version),
    m_side(sideID),
    m_fullCW(false),
    m_tgcArgs(tgcargs),
    m_readCondKey(readCondKey)
 {
-  m_msg = Athena::MsgStreamMember("LVL1TGC::TGCEIFICoincidenceMap");
-  m_msg.get().setLevel(tgcArgs()->MSGLEVEL());
+  setLevel(tgcArgs()->MSGLEVEL());
 
   // initialize map
   ATH_MSG_DEBUG("initialising the map");
@@ -103,12 +102,9 @@ TGCEIFICoincidenceMap::TGCEIFICoincidenceMap(TGCArguments* tgcargs,
 }
 
 
-TGCEIFICoincidenceMap::~TGCEIFICoincidenceMap()
-{
-}
-
 TGCEIFICoincidenceMap::TGCEIFICoincidenceMap(const TGCEIFICoincidenceMap& right)
- : m_readCondKey(right.m_readCondKey)
+ : AthMessaging(Athena::getMessageSvc(), "LVL1TGC::TGCEIFICoincidenceMap"),
+   m_readCondKey(right.m_readCondKey)
 {
   ATH_MSG_DEBUG("copy constructor");
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCElectronicsSystem.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCElectronicsSystem.cxx
index 186e43bb10c735a1ceadb78915b08f6a058a7126..0b3b0bfbeecc38bec0d3ada21afb14b192044c00 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCElectronicsSystem.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCElectronicsSystem.cxx
@@ -1,12 +1,11 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCElectronicsSystem.cxx,v 1.13 2009-05-04 11:39:44 isaya Exp $
-#include "TrigT1TGC/TGCElectronicsSystem.hh"
+#include "TrigT1TGC/TGCElectronicsSystem.h"
 #include "TrigT1TGC/TGCASDOut.h"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
-#include "TrigT1TGC/TGCSector.hh"
+#include "TrigT1TGC/TGCDatabaseManager.h"
+#include "TrigT1TGC/TGCSector.h"
 
 #include <iostream>
 #include <vector>
@@ -15,7 +14,7 @@ namespace LVL1TGCTrigger {
 
 void TGCElectronicsSystem::distributeSignal(LVL1TGCTrigger::TGCEvent* event)
 {
-  std::vector<LVL1TGCTrigger::TGCASDOut*>& vecASDOut= event->GetASDOutVector();
+  const std::vector<LVL1TGCTrigger::TGCASDOut*>& vecASDOut= event->GetASDOutVector();
   event=0;
   size_t i;
   for( i=0; i< vecASDOut.size(); i++) {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoard.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoard.cxx
index fd84c0f7dfaa4f1154cf10e35845fe95646cddda..7ff5abd6e9b5d9716c614b320b18b53a1bd1baf0 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoard.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoard.cxx
@@ -2,9 +2,9 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCHighPtBoardOut.hh"
-#include "TrigT1TGC/TGCHighPtBoard.hh"
-#include "TrigT1TGC/TGCHighPtChipOut.hh"
+#include "TrigT1TGC/TGCHighPtBoardOut.h"
+#include "TrigT1TGC/TGCHighPtBoard.h"
+#include "TrigT1TGC/TGCHighPtChipOut.h"
 #include <iostream>
 #include <cmath>
 #include <cstdlib>
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoardOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoardOut.cxx
index a78fb031c1f2f1473ef57ca651730f1c7231cb16..6cbd9ce9387274b719d18d428f7a96478a3fef1e 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoardOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtBoardOut.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCHighPtBoardOut.hh"
+#include "TrigT1TGC/TGCHighPtBoardOut.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtChipOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtChipOut.cxx
index 5010ea6f685d98a8b269c54abe8fdcb4e598ea36..545110ce5c905562f4bb83e0830c611c219038b0 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtChipOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCHighPtChipOut.cxx
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCHighPtChipOut.hh"
-#include "TrigT1TGC/TGCHighPtBoard.hh"
+#include "TrigT1TGC/TGCHighPtChipOut.h"
+#include "TrigT1TGC/TGCHighPtBoard.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCHitPattern.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCHitPattern.cxx
index 1ce381310d99bc77d66206c5b0c4852c635e8585..d92868c3511e8b9eab2be348c2c9415d2784f709 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCHitPattern.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCHitPattern.cxx
@@ -1,8 +1,8 @@
 /*
-  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 "TrigT1TGC/TGCHitPattern.hh"
+#include "TrigT1TGC/TGCHitPattern.h"
 #include <iostream>
 #include <cstdlib>
 #include <cstring>
@@ -84,10 +84,6 @@ void TGCHitPattern::setLength(int lengthIn)
     if ( m_cPattern !=0) delete [] m_cPattern;
     m_cPattern = 0;
     m_pattern = new bool [m_length];
-    if ( !m_pattern ) {
-      std::cerr << "TGCHitPattern::setLength: Memory allocation failure." << std::endl;
-      exit(1);
-    }
   }
 }
 
@@ -238,10 +234,6 @@ void TGCHitPattern::push_back(TGCHitPattern* hp)
     bool* ptmp;
     ptmp = 0;
     ptmp = new bool [hp->getLength() + m_length];
-    if(!ptmp){
-        std::cerr << "TGCHitPattern::push_back: Memory allocation failure." << std::endl;
-        exit(1);
-    }
     int i;
     for(i=0; i<m_length ; i++){
         ptmp[i] = m_pattern[i];
@@ -262,10 +254,6 @@ void TGCHitPattern::resize(int size)
     if(m_pattern)delete [] m_pattern;
     m_pattern = new bool [size];
     m_length = size;
-    if ( !m_pattern ) {
-      std::cerr << "TGCHitPattern::resize: Memory allocation failure." << std::endl;
-      exit(1);
-    }
   } else {
     m_length = -1;
   }
@@ -280,10 +268,6 @@ void TGCHitPattern::del(int pos)
     bool* ptmp;
     ptmp = 0;
     ptmp = new bool [m_length-1];
-    if(!ptmp){
-        std::cerr << "TGCHitPattern::push_back: Memory allocation failure." << std::endl;
-        exit(1);
-    }
     int i;
     for(i=0; i<pos ; i++){
         ptmp[i] = m_pattern[i];
@@ -419,7 +403,7 @@ void TGCHitPattern::write(char* buf) const
     } 
 } 
 
-bool* TGCHitPattern::getPatad(void) const
+const bool* TGCHitPattern::getPatad(void) const
 {
     return m_pattern; 
 } 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCIndex.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCIndex.cxx
index 7fda07bf40184784c08670521919786b3443eb0c..c9db9016cfd531eb98e62d68e6a5be7636cacc88 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCIndex.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCIndex.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
 */
 
 // ====================================================================
@@ -20,9 +20,9 @@ namespace LVL1TGCTrigger {
 //
 // ====================================================================
 
-static const char* strStation[5]= { "N/A", "T1", "T2", "T3", "TI" };
-static const char* strRegion[3]= { "N/A", "F", "E" };
-static const char* strModule[7]= { "N/A", "A", "B", "C", "D", "E", "F" };
+static const char* const strStation[5]= { "N/A", "T1", "T2", "T3", "TI" };
+static const char* const strRegion[3]= { "N/A", "F", "E" };
+static const char* const strModule[7]= { "N/A", "A", "B", "C", "D", "E", "F" };
 
 
 // ====================================================================
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCInnerSB.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCInnerSB.cxx
index f218004da1b84b0948c2b287df5a6fec5ad934c9..62e6ab126456f918c4acbdcece6addbca71b71d9 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCInnerSB.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCInnerSB.cxx
@@ -1,16 +1,16 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // ref. SOS054V06,SOS053V04
-#include "TrigT1TGC/TGCInnerSB.hh"
+#include "TrigT1TGC/TGCInnerSB.h"
 #include <iostream>
 #include <cstdlib>
 
 
 namespace LVL1TGCTrigger {
 
-TGCInnerSB::TGCInnerSB(TGCArguments* tgcargs):TGCSlaveBoard(tgcargs)
+TGCInnerSB::TGCInnerSB(const TGCArguments* tgcargs):TGCSlaveBoard(tgcargs)
 {}
 
 void TGCInnerSB::createSlaveBoardOut()
@@ -18,10 +18,6 @@ void TGCInnerSB::createSlaveBoardOut()
   if(m_coincidenceOut!=0){
     if ( m_slaveBoardOut!=0 ) delete m_slaveBoardOut;
     m_slaveBoardOut = new  TGCSlaveBoardOut(this, m_bid);
-    if ( !m_slaveBoardOut ) {
-      std::cerr << "TGCInnerSB::createSlaveBoardOut: Memory allocation failure.";
-      exit(1);
-    }
     m_slaveBoardOut->clear();
     m_slaveBoardOut->setNumberOfData(NumberOfInnerSBData);
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlot.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlot.cxx
index ff6679d0a162d1d5da332935abe79cdedba9bacb..9e0bd15a7094d52f9526045b8c4c0804c426c92a 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlot.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlot.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCInnerTrackletSlot.hh"
+#include "TrigT1TGC/TGCInnerTrackletSlot.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlotHolder.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlotHolder.cxx
index ce46293aa6695aacad06740642783340b15c5ae6..d8c1cc31cdd14855f44515ec673ae474eae193ce 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlotHolder.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCInnerTrackletSlotHolder.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCInnerTrackletSlotHolder.hh"
+#include "TrigT1TGC/TGCInnerTrackletSlotHolder.h"
 
 namespace LVL1TGCTrigger {
   /** Constructor */
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCNSWCoincidenceMap.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCNSWCoincidenceMap.cxx
index f5d144eb4db4fa77db7b73f39c28e18f72ae2357..386d7f1bc6168b42a6319fb0ec6b6bb73c9bc25c 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCNSWCoincidenceMap.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCNSWCoincidenceMap.cxx
@@ -11,7 +11,7 @@
 
 #include "TrigT1TGC/TGCNSWCoincidenceMap.h"
 #include "TrigT1TGC/NSWTrigOut.h"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include "PathResolver/PathResolver.h"
 
 #include "MuonCondInterface/ITGCTriggerDbTool.h"
@@ -21,7 +21,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/IMessageSvc.h"
 
-#include "TrigT1TGC/TGCArguments.hh"
+#include "TrigT1TGC/TGCArguments.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanel.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanel.cxx
index 68deef382155a1898ae9946c023a5e6b7e5c8c6b..807f914d9081b2ba0814645426c431f2446cd112 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanel.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanel.cxx
@@ -1,14 +1,14 @@
 /*
-  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 "TrigT1TGC/TGCPatchPanel.hh"
-#include "TrigT1TGC/TGCPatchPanelOut.hh"
-#include "TrigT1TGC/TGCHitPattern.hh"
-#include "TrigT1TGC/TGCConnectionInPP.hh"
-#include "TrigT1TGC/TGCBIDOut.hh"
+#include "TrigT1TGC/TGCPatchPanel.h"
+#include "TrigT1TGC/TGCPatchPanelOut.h"
+#include "TrigT1TGC/TGCHitPattern.h"
+#include "TrigT1TGC/TGCConnectionInPP.h"
+#include "TrigT1TGC/TGCBIDOut.h"
 #include "TrigT1TGC/TGCASDOut.h"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include <iostream>
 #include <string>
 
@@ -467,7 +467,7 @@ void TGCPatchPanel::eraseOutput(int SBId)
       m_PPOut[i]=0;
 }
 
-void TGCPatchPanel::setASDOut(int ch, int connector, TGCASDOut* asdOut)
+void TGCPatchPanel::setASDOut(int ch, int connector, const TGCASDOut* asdOut)
 {
 #ifdef TGCDEBUG
   std::cout << "TGCPatchPanel::setASDOut  "
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanelOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanelOut.cxx
index 41b54decd780f971ee91bdb0036bfb014cde21c6..ad203367522dd36e4472b0655ff67ecf1acb3b7b 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanelOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCPatchPanelOut.cxx
@@ -2,9 +2,9 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCPatchPanelOut.hh"
-#include "TrigT1TGC/TGCPatchPanel.hh"
-#include "TrigT1TGC/TGCHitPattern.hh"
+#include "TrigT1TGC/TGCPatchPanelOut.h"
+#include "TrigT1TGC/TGCPatchPanel.h"
+#include "TrigT1TGC/TGCHitPattern.h"
 #include <cstdlib>
 #include <iostream>
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
index b5d195fa17eba6dee34b70522315aa23e0ec0a9b..63a4104c5654d812b345160e0fddb9a5e97b9d45 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
@@ -8,8 +8,8 @@
 #include <string>
 #include <iomanip>
 
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include "PathResolver/PathResolver.h"
 
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
index b58100e6e773c5ba609c132910f2444b767712eb..eacfe21ae7dc235bc098354b504e73adf9bd3017 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
@@ -2,10 +2,10 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceOut.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
-#include "TrigT1TGC/TGCSectorLogic.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceMatrix.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceOut.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
+#include "TrigT1TGC/TGCSectorLogic.h"
 #include <iostream>
 #include <cstdlib>
 
@@ -150,7 +150,7 @@ void TGCRPhiCoincidenceMatrix::setRPhiMap(const TGCRPhiCoincidenceMap* map)
   this->m_map = map;
 }
 
-TGCRPhiCoincidenceMatrix::TGCRPhiCoincidenceMatrix(TGCArguments* tgcargs,const TGCSectorLogic* sL) 
+TGCRPhiCoincidenceMatrix::TGCRPhiCoincidenceMatrix(const TGCArguments* tgcargs,const TGCSectorLogic* sL)
   : m_sectorLogic(sL),
     m_matrixOut(0), m_map(0),
     m_nPhiHit(0), m_SSCId(0), m_r(0), m_dR(0), m_ptR(0), m_tgcArgs(tgcargs)
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceOut.cxx
index 455678d7bfacd8e32bdcc02d72b50851998b22ac..f9232cd2b24399daf77bb11e4bd5c8661b8a4eb5 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceOut.cxx
@@ -4,7 +4,7 @@
 
 
 //$Id: TGCRPhiCoincidenceOut.cxx,v 1.3 2003-12-13 16:01:32 mishino Exp $
-#include "TrigT1TGC/TGCRPhiCoincidenceOut.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceOut.h"
 #include <iostream>
 #include <assert.h>
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelector.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelector.cxx
index d89b0debbb1a458372fcda3ece7579cf8e246d97..0c3815ab08cb1840e8c6cd72bf8fe407b2031f89 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelector.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelector.cxx
@@ -2,10 +2,10 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSectorLogic.hh"
-#include "TrigT1TGC/TGCSLPreSelector.hh"
-#include "TrigT1TGC/TGCSLPreSelectorOut.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceOut.hh"
+#include "TrigT1TGC/TGCSectorLogic.h"
+#include "TrigT1TGC/TGCSLPreSelector.h"
+#include "TrigT1TGC/TGCSLPreSelectorOut.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceOut.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelectorOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelectorOut.cxx
index 45bcf39e5dc391a3a2191cdbbe6012b104b0a290..19c96712c687d1f43d25101be2eb46fc188c46a1 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelectorOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSLPreSelectorOut.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSLPreSelectorOut.hh"
+#include "TrigT1TGC/TGCSLPreSelectorOut.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelector.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelector.cxx
index 97e44935987a7dd08f3c7e6be4e99729c4137a13..fc60488eab96c79f54f8cf1f55ed0b33167deaa8 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelector.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelector.cxx
@@ -2,10 +2,10 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSLSelector.hh"
-#include "TrigT1TGC/TGCSectorLogic.hh"
-#include "TrigT1TGC/TGCSLSelectorOut.hh"
-#include "TrigT1TGC/TGCSLPreSelectorOut.hh"
+#include "TrigT1TGC/TGCSLSelector.h"
+#include "TrigT1TGC/TGCSectorLogic.h"
+#include "TrigT1TGC/TGCSLSelectorOut.h"
+#include "TrigT1TGC/TGCSLPreSelectorOut.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelectorOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelectorOut.cxx
index 702ed5c63f26e4a4bfceb3f5d32615b8100bf411..c00d3d5ef94daea1fe0616e03bc59e8e9e10859b 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelectorOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSLSelectorOut.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSLSelectorOut.hh"
+#include "TrigT1TGC/TGCSLSelectorOut.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSSCController.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSSCController.cxx
index 8698d7e3c2c7aa39addf0ddaf9e1b5c9121ea56c..5842bed92fabd66b5dbc36007e4c5aafce3a076e 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSSCController.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSSCController.cxx
@@ -1,19 +1,18 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//$Id: TGCSSCController.cxx,v 1.6 2009-03-15 18:07:55 isaya Exp $
-#include "TrigT1TGC/TGCSSCController.hh"
-#include "TrigT1TGC/TGCSSCControllerOut.hh"
-#include "TrigT1TGC/TGCSectorLogic.hh"
-#include "TrigT1TGC/TGCRPhiCoincidenceMap.hh"
-#include "TrigT1TGC/TGCHighPtBoardOut.hh"
+#include "TrigT1TGC/TGCSSCController.h"
+#include "TrigT1TGC/TGCSSCControllerOut.h"
+#include "TrigT1TGC/TGCSectorLogic.h"
+#include "TrigT1TGC/TGCRPhiCoincidenceMap.h"
+#include "TrigT1TGC/TGCHighPtBoardOut.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
   
 //constructor 
-TGCSSCController::TGCSSCController(TGCArguments* tgcargs, const TGCSectorLogic* sL) 
+TGCSSCController::TGCSSCController(const TGCArguments* tgcargs, const TGCSectorLogic* sL)
   :m_sectorLogic(sL), m_NumberOfWireHighPtBoard(0),
    m_region(FORWARD), m_tgcArgs(tgcargs)
 { 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSSCControllerOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSSCControllerOut.cxx
index 6bc8f8a227d10216fbea957da82058ffcd0e44ab..cf6c226ba101b183d62efe0fcbdd2b717afd3f29 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSSCControllerOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSSCControllerOut.cxx
@@ -3,7 +3,7 @@
 */
 
 //$Id: TGCSSCControllerOut.cxx,v 1.5 2005-11-29 08:12:40 nkanaya Exp $
-#include "TrigT1TGC/TGCSSCControllerOut.hh"
+#include "TrigT1TGC/TGCSSCControllerOut.h"
 #include <iostream>
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSector.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSector.cxx
index 25c4fd3c0dc25da23a25000ce7b51c03e143b15e..f21a634ca83e2199c4c595d9bd7e812fcc43e5e6 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSector.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSector.cxx
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSector.hh"
-#include "TrigT1TGC/TGCElectronicsSystem.hh"
+#include "TrigT1TGC/TGCSector.h"
+#include "TrigT1TGC/TGCElectronicsSystem.h"
 #include "TrigT1TGC/TGCReadoutIndex.h"
 #include <iostream>
 
@@ -52,7 +52,7 @@ int TGCSector::distributeSignal(const TGCASDOut* ASDOut)
   } 
 
   if(!notFound){
-    m_PP[PPType][idPP]->setASDOut(chPP,conPP,(TGCASDOut*)ASDOut);
+    m_PP[PPType][idPP]->setASDOut(chPP,conPP,ASDOut);
     m_numberOfHit+=1;
     return 0;
   }
@@ -75,7 +75,7 @@ int TGCSector::getPatchPanelType(TGCSignalType signal, int layer) const
   }
 }
 
-TGCSector::TGCSector( TGCArguments* tgcargs) 
+TGCSector::TGCSector(TGCArguments* tgcargs)
     : m_id(0), m_regionType(FORWARD), m_numberOfHit(0), 
       m_sideId(0), m_octantId(0), m_moduleId(0), 
       m_forwardBackward(ForwardSector), 
@@ -127,7 +127,7 @@ TGCSector::TGCSector( TGCArguments* tgcargs)
     }
   }
   
-  TGCConnectionPPToSL* PPToSL = db->getConnectionPPToSL(m_regionType);
+  const TGCConnectionPPToSL* PPToSL = db->getConnectionPPToSL(m_regionType);
   // make PatchPanel Boards, Slave Boards, HighPt Boards, SectorLogic.
   setModule(PPToSL);
   // dumpModule();
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSectorLogic.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSectorLogic.cxx
index 4fd6096a71e08fc8e851871c5c36d84799d24746..16655c5b6738c01059c09cd2458eb21712a79e77 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSectorLogic.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSectorLogic.cxx
@@ -2,11 +2,11 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSectorLogic.hh"
-#include "TrigT1TGC/TGCElectronicsSystem.hh"
-#include "TrigT1TGC/TGCHighPtBoard.hh"
-#include "TrigT1TGC/TGCHighPtBoardOut.hh"
-#include "TrigT1TGC/TGCHighPtChipOut.hh"
+#include "TrigT1TGC/TGCSectorLogic.h"
+#include "TrigT1TGC/TGCElectronicsSystem.h"
+#include "TrigT1TGC/TGCHighPtBoard.h"
+#include "TrigT1TGC/TGCHighPtBoardOut.h"
+#include "TrigT1TGC/TGCHighPtChipOut.h"
 #include "TrigT1TGC/TGCTMDB.h"
 #include "TrigT1TGC/TGCTMDBOut.h"
 
@@ -123,12 +123,7 @@ void TGCSectorLogic::setStripHighPtBoard(TGCHighPtBoard* highPtBoard)
   m_stripHighPtBoard = highPtBoard;	 
 }
 
-TGCSLSelectorOut* TGCSectorLogic::getSelectorOutput() const
-{
-  return m_selectorOut;
-}
-
-  void TGCSectorLogic::getTrackSelectorOutput(std::shared_ptr<TGCTrackSelectorOut> &trackSelectorOut)const
+void TGCSectorLogic::getTrackSelectorOutput(std::shared_ptr<TGCTrackSelectorOut> &trackSelectorOut)const
 {
   trackSelectorOut=m_trackSelectorOut;
 }
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoard.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoard.cxx
index 59374e8683f5c19598a8064d61d571a320a21412..e29d1d06c8ff45272b6096045fa1bc211c75a305 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoard.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoard.cxx
@@ -1,8 +1,8 @@
 /*
-  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 "TrigT1TGC/TGCSlaveBoard.hh"
+#include "TrigT1TGC/TGCSlaveBoard.h"
 #include <iostream>
 #include <iomanip>
 #include <cstdlib>
@@ -10,7 +10,7 @@
 
 namespace LVL1TGCTrigger {
 
-TGCSlaveBoard::TGCSlaveBoard( TGCArguments* tgcargs )
+TGCSlaveBoard::TGCSlaveBoard( const TGCArguments* tgcargs )
   :m_lengthOfCoincidenceOut(0),m_coincidenceOut(0), 
    m_slaveBoardOut(0), 
    m_id(0), m_bid(-1),m_idHighPtBoard(0),
@@ -225,11 +225,6 @@ void TGCSlaveBoard::doDecluster()
   }
 }
 
-TGCSlaveBoardOut*  TGCSlaveBoard::getOutput() const
-{
-  return m_slaveBoardOut;
-}
-
 void  TGCSlaveBoard::eraseOutput()
 {
   m_slaveBoardOut=0;
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoardOut.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoardOut.cxx
index 3008757562f75ef65ee35b6703c727e1e0e13750..67621c4f209b049835d44c31e7fcb4541b373c1e 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoardOut.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCSlaveBoardOut.cxx
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCSlaveBoardOut.hh"
-#include "TrigT1TGC/TGCSlaveBoard.hh"
+#include "TrigT1TGC/TGCSlaveBoardOut.h"
+#include "TrigT1TGC/TGCSlaveBoard.h"
 
 namespace LVL1TGCTrigger {
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCStripHighPtBoard.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCStripHighPtBoard.cxx
index 307e484c50520b7da6b1d977a69bcde5f9a13758..166a0a188b12f68281ae511b9078bc0a1ce6649e 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCStripHighPtBoard.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCStripHighPtBoard.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1TGC/TGCStripHighPtBoard.hh"
+#include "TrigT1TGC/TGCStripHighPtBoard.h"
 #include <iostream>
 #include <cstdlib>
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCStripTripletSB.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCStripTripletSB.cxx
index 369f781ccd3c2a221a25e97c33f294d899e8caff..7eb945aa4e056ebf532115a2fa40b877f511359c 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCStripTripletSB.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCStripTripletSB.cxx
@@ -1,8 +1,8 @@
 /*
-  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 "TrigT1TGC/TGCStripTripletSB.hh"
+#include "TrigT1TGC/TGCStripTripletSB.h"
 #include <iostream>
 #include <cstdlib>
 
@@ -20,10 +20,6 @@ void TGCStripTripletSB::createSlaveBoardOut()
 
   if(m_coincidenceOut!=0){
     m_slaveBoardOut = new  TGCSlaveBoardOut(this, m_bid);
-    if ( !m_slaveBoardOut ) {
-      std::cerr << "TGCStripTripletSB::createSlaveBoardOut: Memory allocation failure.";
-      exit(1);
-    }
     m_slaveBoardOut->clear();
     m_slaveBoardOut->setNumberOfData(NumberOfStripTripletSBData);
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCTileMuCoincidenceMap.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCTileMuCoincidenceMap.cxx
index 7ae0e49add24e594647c41e12a6fdd01f0de7abe..e1e4395e7c201b75ed4aa838fda20cb42ccfeeaf 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCTileMuCoincidenceMap.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCTileMuCoincidenceMap.cxx
@@ -8,8 +8,8 @@
 #include <string>
 #include <iomanip>
 
-#include "TrigT1TGC/TGCTileMuCoincidenceMap.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCTileMuCoincidenceMap.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 #include "PathResolver/PathResolver.h"
 
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCTimingManager.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCTimingManager.cxx
index e5427dca3b981870ec06320d428570979cf3e5e2..c64c2bb49a92bcbd43950f5d09bbf9d42980d8be 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCTimingManager.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCTimingManager.cxx
@@ -4,17 +4,17 @@
 
 //$Id: TGCTimingManager.cxx,v 1.4 2009-05-13 02:53:51 isaya Exp $
 
-#include "TrigT1TGC/TGCSector.hh"
-#include "TrigT1TGC/TGCPatchPanel.hh"
-#include "TrigT1TGC/TGCSlaveBoard.hh"
-#include "TrigT1TGC/TGCDoubletSB.hh"
-#include "TrigT1TGC/TGCWireTripletSB.hh"
-#include "TrigT1TGC/TGCStripTripletSB.hh"
-#include "TrigT1TGC/TGCHighPtBoard.hh"
-#include "TrigT1TGC/TGCWireHighPtBoard.hh"
-#include "TrigT1TGC/TGCStripHighPtBoard.hh"
-#include "TrigT1TGC/TGCSectorLogic.hh"
-#include "TrigT1TGC/TGCDatabaseManager.hh"
+#include "TrigT1TGC/TGCSector.h"
+#include "TrigT1TGC/TGCPatchPanel.h"
+#include "TrigT1TGC/TGCSlaveBoard.h"
+#include "TrigT1TGC/TGCDoubletSB.h"
+#include "TrigT1TGC/TGCWireTripletSB.h"
+#include "TrigT1TGC/TGCStripTripletSB.h"
+#include "TrigT1TGC/TGCHighPtBoard.h"
+#include "TrigT1TGC/TGCWireHighPtBoard.h"
+#include "TrigT1TGC/TGCStripHighPtBoard.h"
+#include "TrigT1TGC/TGCSectorLogic.h"
+#include "TrigT1TGC/TGCDatabaseManager.h"
 
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/Bootstrap.h"
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCTrackSelector.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCTrackSelector.cxx
index f3ea1bc956bb926f2b80ccddc47af41c71f4ba95..89ced345cb60b511abe46c10e2127fd4597c1d3f 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCTrackSelector.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCTrackSelector.cxx
@@ -3,9 +3,9 @@
 */
 
 #include "TrigT1TGC/TGCTrackSelector.h"
-#include "TrigT1TGC/TGCSectorLogic.hh"
+#include "TrigT1TGC/TGCSectorLogic.h"
 #include "TrigT1TGC/TGCTrackSelectorOut.h"
-#include "TrigT1TGC/TGCRPhiCoincidenceOut.hh"
+#include "TrigT1TGC/TGCRPhiCoincidenceOut.h"
 
 
 namespace LVL1TGCTrigger {
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCWireHighPtBoard.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCWireHighPtBoard.cxx
index f5917a7574df58fa54537444766ff25b45594702..665ac6405d6baa5df99b739f7065bfa0bc327d3f 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCWireHighPtBoard.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCWireHighPtBoard.cxx
@@ -3,8 +3,8 @@
 */
 
 // ref. SOS063V07,S0S061V04 
-#include "TrigT1TGC/TGCWireHighPtBoard.hh"
-#include "TrigT1TGC/TGCHighPtBoardOut.hh"
+#include "TrigT1TGC/TGCWireHighPtBoard.h"
+#include "TrigT1TGC/TGCHighPtBoardOut.h"
 
 #include <iostream>
 #include <cstdlib>
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCWireTripletSB.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCWireTripletSB.cxx
index a3f690287dd34b15b9093d46668c78e8198e626b..a355233eb3b4f2e105d1d0333152d459c7146e8d 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCWireTripletSB.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCWireTripletSB.cxx
@@ -1,9 +1,9 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // ref. SOS051V07,S0S052V06 
-#include "TrigT1TGC/TGCWireTripletSB.hh"
+#include "TrigT1TGC/TGCWireTripletSB.h"
 #include <iostream>
 #include <cstdlib>
 
@@ -17,10 +17,6 @@ void TGCWireTripletSB::createSlaveBoardOut()
   if(m_coincidenceOut!=0){
     if ( m_slaveBoardOut != 0 ) delete m_slaveBoardOut;
     m_slaveBoardOut = new  TGCSlaveBoardOut(this, m_bid);
-    if ( !m_slaveBoardOut ) {
-      std::cerr << "TGCWireTripletSB::createSlaveBoardOut: Memory allocation failure."<<std::endl;
-      exit(1);
-    }
     m_slaveBoardOut->clear();
     m_slaveBoardOut->setNumberOfData(NumberOfWireTripletSBData);
 
@@ -148,10 +144,6 @@ TGCWireTripletSB& TGCWireTripletSB::operator=(const TGCWireTripletSB& right)
     if ( m_lengthOfCoincidenceOut > 0) { 
       if ( m_coincidenceOut ) delete  m_coincidenceOut; 
       m_coincidenceOut = new TGCHitPattern (m_lengthOfCoincidenceOut);
-      if ( !m_coincidenceOut ) {
-        std::cerr << "TGCWireTripletSB::TGCWireTripletSB: Memory allocation failure." << std::endl;
-        exit(1);
-      }
     }
   }
   return *this;
diff --git a/Trigger/TrigTools/TrigInDetToolInterfaces/TrigInDetToolInterfaces/ITrigInDetVxInJetTool.h b/Trigger/TrigTools/TrigInDetToolInterfaces/TrigInDetToolInterfaces/ITrigInDetVxInJetTool.h
deleted file mode 100755
index e6f7fa08df9730ff6f4ffd57a47137fc71cba3fc..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetToolInterfaces/TrigInDetToolInterfaces/ITrigInDetVxInJetTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-// **************************************************
-//
-// NAME:     ITrigInDetVxInJetTool.h
-//
-// AUTHOR:   Andrea Coccaro
-// MAIL:     Andrea.Coccaro AT cern.ch
-//
-// **************************************************
-
-#ifndef ITRIGINDETVXINJETTOOL_H
-#define ITRIGINDETVXINJETTOOL_H
-
-#include "GaudiKernel/IAlgTool.h"
-
-
-
-class TrigInDetTrack;
-class TrigVertex;
-namespace CLHEP { class HepLorentzVector; }
-namespace Trk   { class RecVertex; }
-
-
-static const InterfaceID IID_ITrigInDetVxInJetTool("ITrigInDetVxInJetTool", 1, 0);
-
-class ITrigInDetVxInJetTool : virtual public IAlgTool {
-
- public:
-
-  static const InterfaceID& interfaceID() { return IID_ITrigInDetVxInJetTool;}
-
-  virtual const TrigVertex* findSecVertex(const Trk::RecVertex&, 
-					  const CLHEP::HepLorentzVector&, 
-					  const std::vector<const TrigInDetTrack*>&) =0;
-
-};
-
-#endif
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigTools/TrigInDetVxInJetTool/ATLAS_CHECK_THREAD_SAFETY
deleted file mode 100644
index fbcc2841acc0428825fb554926c5453e2aa001f2..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/ATLAS_CHECK_THREAD_SAFETY
+++ /dev/null
@@ -1 +0,0 @@
-Trigger/TrigTools/TrigInDetVxInJetTool
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/CMakeLists.txt b/Trigger/TrigTools/TrigInDetVxInJetTool/CMakeLists.txt
deleted file mode 100644
index 0a7d573ac343ac94f1fc7f11dceac4f06ace45d0..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# Declare the package name:
-atlas_subdir( TrigInDetVxInJetTool )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core MathCore Hist )
-
-# Component(s) in the package:
-atlas_add_component( TrigInDetVxInJetTool
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AnalysisUtilsLib AthenaBaseComps GaudiKernel GeoPrimitives TrigInDetEvent TrigInDetToolInterfacesLib TrigInterfacesLib TrigVKalFitterLib VxVertex )
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/src/CutTrk.cxx b/Trigger/TrigTools/TrigInDetVxInJetTool/src/CutTrk.cxx
deleted file mode 100755
index 677ae61f76d164e4ed21cd9e53a5d282daa9ca6a..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/src/CutTrk.cxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigInDetVxInJetTool.h"
-#include "TrigInDetEvent/TrigInDetTrack.h"
-#include "AnalysisUtils/AnalysisMisc.h"
-#include <iostream>
-#include "TMath.h"
-
-
-int  TrigInDetVxInJetTool::SelGoodTrigTrack( const std::vector<const TrigInDetTrack*>& InpTrk,
-                                             const Trk::RecVertex                    & PrimVrt,
-                                             const CLHEP::HepLorentzVector                  & JetDir,
-                                             std::vector<const TrigInDetTrack*>& SelectedTracks) {
-  
-  std::vector<const TrigInDetTrack*>::const_iterator i_ntrk = InpTrk.begin();
-  const TrigInDetTrackFitPar* mPer=0;
-  std::vector<double> Impact,ImpactError;
-  double ImpactSignif=0;
-  int NPrimTrk=0;
-
-  for (unsigned int j=0; i_ntrk < InpTrk.end(); ++i_ntrk, ++j) {
-
-    mPer=(*i_ntrk)->param();
-
-    if (mPer->ea0() > m_A0TrkErrorCut) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: ea0=" << mPer->ea0() << " > " << m_A0TrkErrorCut << endmsg; 
-      continue;
-    }
-
-    if (mPer->ez0() > m_ZTrkErrorCut) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: ez0=" << mPer->ez0() << " > " << m_ZTrkErrorCut << endmsg; 
-      continue;
-    }
-
-    double  adeta = JetDir.pseudoRapidity() - mPer->eta();
-    double  adphi = fabs(JetDir.phi() - mPer->phi0());
-
-    if (adphi < -TMath::Pi()) adphi += 2*TMath::Pi();
-    if (adphi >  TMath::Pi()) adphi -= 2*TMath::Pi();
-
-    double dist = sqrt(adphi*adphi + adeta*adeta);
- 
-    if(dist > m_ConeForTag) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: jetDistance=" << dist << " > " << m_ConeForTag << endmsg; 
-      continue;
-    }
-
-    long int PixelHits     = 3;
-    long int SctHits       = 9; 
-    long int SharedHits    = 0; //Always 0 now
-    long int BLayHits      = 1;
-
-    PixelHits = (long int)(*i_ntrk)->NPixelSpacePoints();
-    SctHits   = (long int)(*i_ntrk)->NSCT_SpacePoints();
-    BLayHits = 0;
-    if ((*i_ntrk)->HitPattern()) BLayHits = ((*i_ntrk)->HitPattern() & 0x1) ? 1 : 0;
-    if(PixelHits < 0 ) PixelHits=0; 
-    if(SctHits   < 0 ) SctHits=0; 
-    //if(BLayHits  < 0 ) BLayHits=0;
-    ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), PrimVrt.position(), 1, Impact, ImpactError);
-    if (ImpactSignif == -9999.0) continue;
-    double ImpactA0=Impact[0];  
-    double ImpactZ=Impact[1];   
-
-    //Using CutChi2Ndof instead of CutProbChi2
-    //double trkProbChi2=TMath::Prob((*i_ntrk)->chi2(),(PixelHits+SctHits)*3-5);
-    double Dof = ((PixelHits+SctHits)*3-5)==0?-0.1:(PixelHits+SctHits)*3-5;
-    double trkChi2Ndof = (*i_ntrk)->chi2()/Dof;
-
-    double ThetaVert = 2.0*atan(exp(-mPer->eta())); 
-    if( !std::isfinite(ThetaVert) ) continue;
-
-    if(fabs(mPer->pT()) < m_CutPt) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: pT=" << mPer->pT() << " < " << m_CutPt << endmsg; 
-      continue;
-    }
-    if(fabs(ImpactZ) > m_CutZVrt/sin(ThetaVert)) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: impactZ=" << fabs(ImpactZ) << " > " << m_CutZVrt/sin(ThetaVert) << endmsg; 
-      continue;
-    }
-    if(trkChi2Ndof > m_CutChi2Ndof) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: Chi2/Ndof=" << trkChi2Ndof << " > " << m_CutChi2Ndof << endmsg; 
-      continue;
-    }
-    if(fabs(ImpactA0) > m_CutA0) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: impactA0=" << fabs(ImpactA0) << " > " << m_CutA0 << endmsg; 
-      continue;
-    }
-    if(PixelHits < m_CutPixelHits) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: pixelHits=" << PixelHits << " < " << m_CutPixelHits << endmsg; 
-      continue;
-    }
-    if(SctHits < m_CutSctHits) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: sctHits=" << SctHits << " < " << m_CutSctHits << endmsg; 
-      continue;
-    }
-    if((PixelHits+SctHits) < m_CutSiHits) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: siHits=" << PixelHits+SctHits << " < " << m_CutSiHits << endmsg; 
-      continue;
-    }
-    if(BLayHits < m_CutBLayHits) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: bLayer=" << BLayHits << " < " << m_CutBLayHits << endmsg; 
-      continue;
-    }
-    if(SharedHits > m_CutSharedHits) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " not selected: sharedHits=" << SharedHits << " < " << m_CutSharedHits << endmsg; 
-      continue;
-    }
-    
-    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "  track # " << j+1 << " selected" << endmsg; 
-					  
-    if(ImpactSignif < 3.)NPrimTrk += 1;
-    SelectedTracks.push_back(*i_ntrk);
-  }
-  return NPrimTrk;
-}
- 
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigInDetVxInJetTool.cxx b/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigInDetVxInJetTool.cxx
deleted file mode 100755
index b1481edb802afab9204280f71574bf5fc7f20971..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigInDetVxInJetTool.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "VxVertex/RecVertex.h"
-#include "TrigInDetVxInJetTool.h"
-#include "TrigInDetEvent/TrigInDetTrack.h"
-#include "TrigInDetEvent/TrigVertex.h"
-#include "TMath.h"
-
-
-#include<iostream>
-
-#include "TrigInterfaces/Algo.h"
-
-//
-//Constructor-------------------------------------------------------------- 
-TrigInDetVxInJetTool::TrigInDetVxInJetTool(const std::string& type,
-                                           const std::string& name,
-                                           const IInterface* parent):
-  AthAlgTool(type,name,parent),
-  m_CutSctHits(0),   // was 4
-  m_CutPixelHits(2), // was 1
-  m_CutSiHits(4),    // was 7
-  m_CutBLayHits(1),  // was 0
-  m_CutSharedHits(1),
-  m_CutPt(1000.),
-  m_CutZVrt(25.),
-  m_CutA0(5.),
-  m_CutProbChi2(0.001),
-  m_CutChi2Ndof(0.2),
-  m_SecTrkChi2Cut(10.),
-  m_ConeForTag(0.4),
-  m_Sel2VrtChi2Cut(4.5),
-  m_Sel2VrtSigCut(3.0),
-  m_TrkSigCut(2.0), 
-  m_TrkSigSumCut(2.), 
-  m_A0TrkErrorCut(1.0),
-  m_ZTrkErrorCut(5.0),
-  m_AntiPileupSigRCut(2.0),
-  m_AntiPileupSigZCut(6.0),
-  m_AntiFake2trVrtCut(0.5),
-  m_RobustFit(5),
-  m_Xbeampipe (0.),
-  m_Ybeampipe (0.),
-  m_XlayerB (0.),
-  m_YlayerB (0.),
-  m_Xlayer1 (0.),
-  m_Ylayer1 (0.),
-  m_Xlayer2 (0.),
-  m_Ylayer2 (0.),
-  m_Rbeampipe (29.4),
-  m_RlayerB (50.5),
-  m_Rlayer1 (88.0),
-  m_Rlayer2 (123.0),
-  m_getNegativeTail(true),
-  m_getNegativeTag(false),
-  m_doTrackSelection(true),
-  m_fitSvc("TrigVKalFitter/VertexFitterTool",this)
-{
-
-  declareInterface< ITrigInDetVxInJetTool >(this);
-
-  declareProperty("CutSctHits",        m_CutSctHits ,       "Remove track is it has less SCT hits" );
-  declareProperty("CutPixelHits",      m_CutPixelHits,      "Remove track is it has less Pixel hits");
-  declareProperty("CutSiHits",         m_CutSiHits,         "Remove track is it has less Pixel+SCT hits"  );
-  declareProperty("CutBLayHits",       m_CutBLayHits,       "Remove track is it has less B-layer hits"   );
-  declareProperty("CutSharedHits",     m_CutSharedHits,     "Reject final 2tr vertices if tracks have shared hits" );
-
-  declareProperty("CutPt",             m_CutPt,             "Track Pt selection cut"  );
-  declareProperty("CutA0",             m_CutA0,             "Track A0 selection cut"  );
-  declareProperty("CutZVrt",           m_CutZVrt,           "Track Z impact selection cut"   );
-  declareProperty("ConeForTag",        m_ConeForTag,        "Cone around jet direction for track selection"  );
-  declareProperty("CutProbChi2",       m_CutProbChi2,       "Track Chi2 probability selection cut" );
-  declareProperty("CutChi2Ndof",       m_CutChi2Ndof,       "Track Chi2/Ndof selection cut" );
-  declareProperty("TrkSigCut",         m_TrkSigCut,         "Track 3D impact significance w/r primary vertex" );
-  declareProperty("TrkSigSumCut",      m_TrkSigSumCut,      "Sum of 3D track significances cut for 2tr vertex search" );
-  declareProperty("SecTrkChi2Cut",     m_SecTrkChi2Cut,     "Track - common secondary vertex association cut. Single Vertex Finder only" );
-
-  declareProperty("A0TrkErrorCut",     m_A0TrkErrorCut,     "Track A0 error cut" );
-  declareProperty("ZTrkErrorCut",      m_ZTrkErrorCut,      "Track Z impact error cut" );
-
-  declareProperty("Sel2VrtChi2Cut",    m_Sel2VrtChi2Cut,    "Cut on Chi2 of 2-track vertex for initial selection"  );
-  declareProperty("Sel2VrtSigCut",     m_Sel2VrtSigCut,     "Cut on significance of 3D distance between initial 2-track vertex and PV"  );
-  declareProperty("AntiPileupSigRCut", m_AntiPileupSigRCut, "Remove tracks with low Rphi and big Z impacts presumably coming from pileup"  );
-  declareProperty("AntiPileupSigZCut", m_AntiPileupSigZCut, "Remove tracks with low Rphi and big Z impacts presumably coming from pileup"  );
-  declareProperty("AntiFake2trVrtCut", m_AntiFake2trVrtCut, "Cut to reduce fake 2-track vertices contribution.Single Vertex Finder only"  );
-
-  declareProperty("RobustFit",  m_RobustFit, "Use vertex fit with RobustFit functional(VKalVrt) for common secondary vertex fit" );
-
-  declareProperty("Xbeampipe", m_Xbeampipe);
-  declareProperty("Ybeampipe", m_Ybeampipe);
-  declareProperty("XlayerB",   m_XlayerB  );
-  declareProperty("YlayerB",   m_YlayerB  );
-  declareProperty("Xlayer1",   m_Xlayer1  );
-  declareProperty("Ylayer1",   m_Ylayer1  );
-  declareProperty("Xlayer2",   m_Xlayer2  );
-  declareProperty("Ylayer2",   m_Ylayer2  );
-  declareProperty("Rbeampipe", m_Rbeampipe);
-  declareProperty("RlayerB",   m_RlayerB  );
-  declareProperty("Rlayer1",   m_Rlayer1  );
-  declareProperty("Rlayer2",   m_Rlayer2  );
-
-  declareProperty("getNegativeTail", m_getNegativeTail, "Allow secondary vertex behind the primary one (negative) w/r jet direction (not for multivertex!)" );
-  declareProperty("getNegativeTag",  m_getNegativeTag,  "Return ONLY negative secondary vertices (not for multivertex!)"   );
-
-  declareProperty("VertexFitterTool", m_fitSvc);
-
-  m_massPi  = 139.5702 ;
-  m_massP   = 938.272  ;
-  m_massE   =   0.511  ;
-  m_massK0  = 497.648  ;
-  m_massLam =1115.683  ;
-}
-
-//Destructor---------------------------------------------------------------
-TrigInDetVxInJetTool::~TrigInDetVxInJetTool(){
-  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "TrigInDetVxInJetTool destructor called" << endmsg;
-}
-
-//Initialize---------------------------------------------------------------
-StatusCode TrigInDetVxInJetTool::initialize(){
-  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "TrigInDetVxInJetTool initialize() called" << endmsg;
-
-  if (m_fitSvc.retrieve().isFailure()) {
-    if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Could not find Trk::TrkVKalVrtFitter" << endmsg;
-    return StatusCode::SUCCESS;
-  } else {
-    if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "TrigInDetVxInJetTool TrkVKalVrtFitter found" << endmsg;
-  }
-
-  if(m_getNegativeTag){
-    if(msgLvl(MSG::INFO))msg(MSG::INFO) << " Negative TAG is requested! " << endmsg;
-    if(msgLvl(MSG::INFO))msg(MSG::INFO) << "Not compatible with negativeTAIL option, so getNegativeTail is set to FALSE." << endmsg;
-    m_getNegativeTail=false;
-  }
-
-  for(int ntv=2; ntv<=10; ntv++) m_chiScale[ntv]=TMath::ChisquareQuantile(0.9,2.*ntv-3.)/ntv;
-  m_chiScale[0]=m_chiScale[2];
-  for(int ntv=2; ntv<=10; ntv++) m_chiScale[ntv]/=m_chiScale[0];
-
-  if(m_RobustFit>7)m_RobustFit=7;
-  if(m_RobustFit<0)m_RobustFit=0;
-  
-  return StatusCode::SUCCESS;
-
-}
-
-
-StatusCode TrigInDetVxInJetTool::finalize() {
-  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"TrigInDetVxInJetTool finalize()" << endmsg;
-  return StatusCode::SUCCESS; 
-}
-
-
-const TrigVertex* TrigInDetVxInJetTool::findSecVertex(const Trk::RecVertex & PrimVrt,
-                                                      const CLHEP::HepLorentzVector & JetDir,
-                                                      const std::vector<const TrigInDetTrack*> & InpTrk) {
-
-  std::vector<double> Results;
-  std::vector<const TrigInDetTrack*> SelSecTrk;
-  std::vector< std::vector<const TrigInDetTrack*> > SelSecTrkPerVrt;
-  std::vector<const TrigInDetTrack*> TrkFromV0;
-
-  TrigVertex* secVrt = GetVrtSec(InpTrk, PrimVrt, JetDir, Results, SelSecTrk, TrkFromV0);
-  //m_fitSvc->clearMemory();
-  return secVrt;
-
-}
-
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigInDetVxInJetTool.h b/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigInDetVxInJetTool.h
deleted file mode 100644
index e52908ea088ee618dfa1bd70cfc75eebbb71dec4..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigInDetVxInJetTool.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-//
-// TrigInDetVxInJetTool.h - Description
-//
-/*
-  Tool for secondary vertex inside jet reconstruction.
-  It returns a pointer to TrigVertex object which contains
-  information about the reconstructed vertex.
-  In case of failure pointer to TrigVertex is 0.
-   
-
-  Author: Vadim Kostyukhin
-  e-mail: vadim.kostyukhin@cern.ch
-
-  -----------------------------------------------------------------------------*/
-
-
-
-#ifndef _VKalVrt_TrigInDetVxInJetTool_H
-#define _VKalVrt_TrigInDetVxInJetTool_H
-// Normal STL and physical vectors
-#include <vector>
-#include "GeoPrimitives/GeoPrimitives.h"
-// Gaudi includes
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-
-#include "TrigInDetToolInterfaces/ITrigInDetVxInJetTool.h"
-
-#include "TrigVKalFitter/TrigVKalFitter.h"
-
-#include "GaudiKernel/ServiceHandle.h"
-
-#include "TH1D.h"
-#include "TH2D.h"
-
-class TrigInDetTrack;
-class TrigVertex;
-
-namespace Trk{ class RecVertex; }
-
-
-typedef std::vector<double> dvect;
-
-
-//------------------------------------------------------------------------
-
-class TrigInDetVxInJetTool : public AthAlgTool, virtual public ITrigInDetVxInJetTool {
-
-
-public:
-
-  TrigInDetVxInJetTool(const std::string& type, const std::string& name, const IInterface* parent);
-  virtual ~TrigInDetVxInJetTool();
-
-  StatusCode initialize();
-  StatusCode finalize();
-
-    
-  const TrigVertex* findSecVertex(const Trk::RecVertex &,
-                                  const CLHEP::HepLorentzVector &,
-                                  const std::vector<const TrigInDetTrack*> &);
-
-private:
-
-  int m_CutSctHits;
-  int m_CutPixelHits;
-  int m_CutSiHits;
-  int m_CutBLayHits;
-  int m_CutSharedHits;
-  float m_CutPt;
-  float m_CutZVrt;
-  float m_CutA0;
-  float m_CutProbChi2;
-  float m_CutChi2Ndof;
-  float m_SecTrkChi2Cut;
-  float m_ConeForTag;
-  float m_Sel2VrtChi2Cut;
-  float m_Sel2VrtSigCut;
-  float m_TrkSigCut;
-  float m_TrkSigSumCut;
-  float m_A0TrkErrorCut;
-  float m_ZTrkErrorCut;
-  float m_AntiPileupSigRCut;
-  float m_AntiPileupSigZCut;
-  float m_AntiFake2trVrtCut;
-
-  long int m_RobustFit;
-
-  float m_Xbeampipe;
-  float m_Ybeampipe;
-  float m_XlayerB;
-  float m_YlayerB;
-  float m_Xlayer1;
-  float m_Ylayer1;
-  float m_Xlayer2;
-  float m_Ylayer2;
-  float m_Rbeampipe;
-
-  float m_RlayerB;
-  float m_Rlayer1;
-  float m_Rlayer2;
-
-  bool     m_getNegativeTail;
-  bool     m_getNegativeTag;
-
-  TrigVertex*  GetVrtSec(const std::vector<const TrigInDetTrack*> & InpTrk,
-                         const Trk::RecVertex                     & PrimVrt,
-                         const CLHEP::HepLorentzVector            & JetDir,
-                         std::vector<double>                      & Results,
-                         std::vector<const TrigInDetTrack*>       & SelSecTrk,
-                         std::vector<const TrigInDetTrack*>       & TrkFromV0);
-
-  bool m_doTrackSelection;
-
-  /** @brief for monitoring purposes. */
-  std::vector<float> m_cutFlowTrkSel;
-  std::vector<float> m_cutFlowTwoTrkVtxSel;
-
-  ToolHandle < ITrigVKalFitter > m_fitSvc;
-
-  double m_massPi ;
-  double m_massP ;
-  double m_massE;
-  double m_massK0;
-  double m_massLam;
-
-  // For multivertex version only
-
-  float m_chiScale[11];
-
-  // Gives correct mass assignment in case of nonequal masses
-  double massV0( std::vector< std::vector<double> >& TrkAtVrt, double massP, double massPi ) const;
-  int FindMax( std::vector<double>& Chi2PerTrk) const;
-
-
-  CLHEP::HepLorentzVector TotalMom(const std::vector<const TrigInDetTrack*>& InpTrk) const; 
-  double                  pTvsDir(const Amg::Vector3D &Dir, const std::vector<double>& InpTrk) const; 
-
-
-  double VrtVrtDist(const Trk::RecVertex & PrimVrt, const Amg::Vector3D & SecVrt, 
-                    const std::vector<double> VrtErr,double& Signif ) const;
-  double VrtVrtDist(const Trk::RecVertex & PrimVrt, const Amg::Vector3D & SecVrt, 
-                    const std::vector<double> SecVrtErr, const CLHEP::HepLorentzVector & JetDir) const;
-  double VrtVrtDist(const Amg::Vector3D & Vrt1, const std::vector<double>& VrtErr1,
-                    const Amg::Vector3D & Vrt2, const std::vector<double>& VrtErr2) const;
-					  
-  double ProjPos(const Amg::Vector3D & Vrt,const CLHEP::HepLorentzVector & JetDir) const;
-  static bool sortbyPtPredicate(const TrigInDetTrack* t1, const TrigInDetTrack* t2);
-
-  template <class Track>
-  double FitCommonVrt(std::vector<const Track*>& ListSecondTracks,
-                      const Trk::RecVertex & PrimVrt,
-                      std::vector<double>  & InpMass, 
-                      Amg::Vector3D        & FitVertex,
-                      std::vector<double>  & ErrorMatrix,
-                      CLHEP::HepLorentzVector     & Momentum,
-                      std::vector< std::vector<double> >  & TrkAtVrt);
-
-  void RemoveEntryInList(std::vector<const TrigInDetTrack*>& , int) const;
-
-  int SelGoodTrigTrack(const std::vector<const TrigInDetTrack*>& InpPart,
-		       const Trk::RecVertex                    & PrimVrt,
-		       const CLHEP::HepLorentzVector                  & JetDir,
-		       std::vector<const TrigInDetTrack*>      & SelPart);
-
-  template <class Track>
-  void Select2TrVrt(std::vector<const Track*>  & SelectedTracks,
-                    std::vector<const Track*>  & TracksForFit,
-                    const Trk::RecVertex       & PrimVrt,
-                    const CLHEP::HepLorentzVector     & JetDir,
-                    std::vector<double>        & InpMass, 
-                    std::vector<const Track*>  & TrkFromV0,
-                    std::vector<const Track*>  & ListSecondTracks);
-
-  StatusCode VKalVrtFitFastBase(const std::vector<const TrigInDetTrack*>& listPart,Amg::Vector3D& Vertex);
-    
-  StatusCode VKalVrtFitBase(const std::vector<const TrigInDetTrack*> & listPart,
-                            Amg::Vector3D                            & Vertex,
-                            CLHEP::HepLorentzVector                  & Momentum,
-                            long int                                 & Charge,
-                            std::vector<double>                      & ErrorMatrix,
-                            std::vector<double>                      & Chi2PerTrk,
-                            std::vector< std::vector<double> >       & TrkAtVrt,
-                            double                                   & Chi2 );
-
-};
-
-
-#endif
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigVrtSec.cxx b/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigVrtSec.cxx
deleted file mode 100755
index b822833f7911172c8c92cf0c92362b7e53a1ea52..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/src/TrigVrtSec.cxx
+++ /dev/null
@@ -1,715 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigInDetVxInJetTool.h"
-//-------------------------------------------------
-// Other stuff
-#include  "AnalysisUtils/AnalysisMisc.h"
-#include  "TrigInDetEvent/TrigInDetTrack.h"
-#include  "TrigInDetEvent/TrigVertex.h"
-#include  "VxVertex/RecVertex.h"
-#include  "TMath.h"
-
-#include<iostream>
-
-
-//----------------------------------------------------------------------------------------
-//  GetVrtSec resurns the vector Results with the following
-//   0) Vertex mass
-//   1) Vertex/jet energy fraction
-//   2) Number of initially selected 2tr vertices
-//   3) Number of selected for vertexing tracks in jet 
-//   4) Number of track in secondary vertex
-//   5) 3D SV-PV significance with sign
-//   6) Maximal track Pt with respect to jet axis
-//   7) Jet energy used in (2) calculation 
-//---------------------------------------------------------------------------------------- 
-
-
-TrigVertex* TrigInDetVxInJetTool::GetVrtSec(const std::vector<const TrigInDetTrack*>& InpTrk,
-                                            const Trk::RecVertex                    & PrimVrt,
-                                            const CLHEP::HepLorentzVector           & JetDir,
-                                            std::vector<double>                     & Results,
-                                            std::vector<const TrigInDetTrack*>      & ListSecondTracks,
-                                            std::vector<const TrigInDetTrack*>      & TrkFromV0) {
-  
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "GetVrtSec() called # tracks = " << InpTrk.size() << endmsg;
-   
-  std::vector<const TrigInDetTrack*> SelectedTracks;
-  SelectedTracks.clear();
-  ListSecondTracks.clear();
-  Results.clear();        
-
-  //* Reason "# ini trks = 0,1" *//
-  if( InpTrk.size() < 2 ) { 
-    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason '# ini trks = 0,1'" << endmsg;
-    m_cutFlowTrkSel.push_back(1); return 0; 
-  }
-
-  int NPVParticle = 0;
-  if (m_doTrackSelection)
-    NPVParticle = SelGoodTrigTrack( InpTrk, PrimVrt, JetDir, SelectedTracks);
-  else
-    SelectedTracks = InpTrk;
-
-  long int NTracks = (int) (SelectedTracks.size());
-      
-  //* Reason "# sel trks = 0,1" *//
-  if( NTracks < 2 ) {
-    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason '# sel trks = 0,1'" << endmsg; 
-    m_cutFlowTrkSel.push_back(1); return 0; 
-  }
-
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Number of selected tracks inside jet = " << NTracks << endmsg;
-      
-  CLHEP::HepLorentzVector MomentumJet = TotalMom(SelectedTracks);
-
-
-  //--------------------------------------------------------------------------------------------	 
-  //                    Initial TrigInDetTrack list ready
-
-  std::vector<const TrigInDetTrack*>  TracksForFit;
-  std::vector<double> InpMass; 
-  for(int i=0; i<NTracks; i++){InpMass.push_back(m_massPi);}
-
-  Select2TrVrt(SelectedTracks, TracksForFit, PrimVrt, JetDir, InpMass, TrkFromV0, ListSecondTracks);
-
-  //
-  //--- Cleaning
-  // 
-  std::vector<const TrigInDetTrack*>::iterator   TransfEnd ;
-  if( TrkFromV0.size() > 1) {
-    sort(TrkFromV0.begin(),TrkFromV0.end());
-    TransfEnd =  unique(TrkFromV0.begin(),TrkFromV0.end());
-    TrkFromV0.erase( TransfEnd, TrkFromV0.end());
-    // sort(TrkFromV0.begin(),TrkFromV0.end(),TrigInDetVxInJetTool::sortbyPtPredicate); TODO: is it needed?
-  }
-
-  double Vrt2TrackNumber = (double) ListSecondTracks.size()/2.;
-  sort(ListSecondTracks.begin(),ListSecondTracks.end());
-  TransfEnd =  unique(ListSecondTracks.begin(),ListSecondTracks.end());
-  ListSecondTracks.erase( TransfEnd, ListSecondTracks.end());
-  // sort(ListSecondTracks.begin(),ListSecondTracks.end(),TrigInDetVxInJetTool::sortbyPtPredicate); TODO: is it needed?
-
-  if(msgLvl(MSG::DEBUG))
-    msg(MSG::DEBUG) << "Found different tracks in pairs = "<< ListSecondTracks.size() << endmsg;
-
-  //* Reason "# 2vrt trk = 0,1" *//
-  if(ListSecondTracks.size() < 2) { 
-    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason '# 2vrt trk = 0,1'" << endmsg; 
-    m_cutFlowTrkSel.push_back(2); return 0;
-  }
-
-  //
-  //-----------------------------------------------------------------------------------------------------
-  //            Secondary track list is ready
-  //            Now common vertex fit
-  //
-  std::vector<const TrigInDetTrack*>::const_iterator   i_ntrk, i_found;
-  Amg::Vector3D FitVertex;
-  std::vector<double> ErrorMatrix;
-  std::vector< std::vector<double> > TrkAtVrt; 
-  CLHEP::HepLorentzVector Momentum;
-  double Dist3D=0, Signif3D=0, Signif3DP=0, Signif3DS=0;
-  std::vector<double> Impact,ImpactError;
-
-  double Chi2 =  FitCommonVrt( ListSecondTracks, PrimVrt, InpMass, FitVertex, ErrorMatrix, Momentum, TrkAtVrt);
-
-  //* Reason "vtx not reconstr." *//
-  if( Chi2 < 0) {
-    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'vtx not reconstr.'" << endmsg; 
-    m_cutFlowTrkSel.push_back(3); return 0; 
-  }
-
-  // Check jet tracks not in secondary vertex
-  std::vector<const TrigInDetTrack*> AdditionalTracks;
-  std::vector<const TrigInDetTrack*> AdditionalTracksNotSelected;
-  VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
-
-  if(Signif3D>8.){
-    for (i_ntrk = SelectedTracks.begin(); i_ntrk < SelectedTracks.end(); ++i_ntrk) {
-      i_found = find( ListSecondTracks.begin(), ListSecondTracks.end(), (*i_ntrk));
-      if( i_found != ListSecondTracks.end() ) continue;
-      Signif3DS = m_fitSvc->VKalGetImpact((*i_ntrk), FitVertex         , 1, Impact, ImpactError);
-      if( Signif3DS > 10.) {AdditionalTracksNotSelected.push_back(*i_ntrk); continue;}
-      Signif3DP = m_fitSvc->VKalGetImpact((*i_ntrk), PrimVrt.position(), 1, Impact, ImpactError);
-      //if(m_FillHist){ m_hb_diffPS->Fill( Signif3DP-Signif3DS, w_1); }
-      if(Signif3DP-Signif3DS>1.0) AdditionalTracks.push_back((*i_ntrk));
-      else AdditionalTracksNotSelected.push_back((*i_ntrk));
-    }
-  }
-
-  //* Reason "vtx not reconstr." *//
-  if( Chi2 < 0) {
-    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'vtx not reconstr.'" << endmsg;  
-    m_cutFlowTrkSel.push_back(3); return 0;
-  }
-
-  // Find highest track Pt with respect to jet direction
-  // double trackPt;
-  double trackPtMax=0.;
-  // for (int tr=0; tr<(int)ListSecondTracks.size(); tr++) {
-    // trackPt=pTvsDir(JetDir.vect() , TrkAtVrt[tr]); if(trackPt>trackPtMax)trackPtMax=trackPt;
-  // }
-
-  // OFF for now; this gives gain in rejection at expense of lowering starting b-jet efficiency
-  // (just use the commented line instead to enable)
-  if( ListSecondTracks.size()==0 ) { 
-  // if( ListSecondTracks.size()==2 ) {         // If there are 2 only tracks
-
-    int Charge=0, tCnt=0;
-    int blTrk[2]={0,0}; 
-    int l1Trk[2]={0,0}; 
-    int l2Trk[2]={0,0}; 
-    int BLshared=0;
-    int PXshared=0;
-
-    std::vector<const TrigInDetTrack*>::const_iterator   i_ntrk;
-    for (i_ntrk = ListSecondTracks.begin(); i_ntrk < ListSecondTracks.end(); ++i_ntrk) {
-
-      if (!((*i_ntrk)->HitPattern())) continue;
-
-      Charge += (*i_ntrk)->param()->pT()>0 ? 1 : -1;
-
-      blTrk[tCnt] = ((*i_ntrk)->HitPattern() & 0x1) ? 1 : 0;
-      l1Trk[tCnt] = ((*i_ntrk)->HitPattern() & 0x2) ? 1 : 0;
-      l2Trk[tCnt] = ((*i_ntrk)->HitPattern() & 0x4) ? 1 : 0;
-      
-      tCnt++;
-    }
-
-    double xDif=FitVertex.x()-m_XlayerB, yDif=FitVertex.y()-m_YlayerB ; 
-    double Dist2D=sqrt(xDif*xDif+yDif*yDif);
-
-    if (Dist2D < m_RlayerB) {
-
-      //* Reason "inside bl but no bl hits" *//
-      if( blTrk[0]==0 || blTrk[1]==0 ) {
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'inside bl but no bl hits'" << endmsg;   
-	m_cutFlowTrkSel.push_back(4); return 0;
-      }
-
-      if(BLshared>m_CutSharedHits) return 0;
-    } else {
-
-      //* Reason "outside bl but no bl hits" *//
-      if( blTrk[0]==1 || blTrk[1]==1 ) {
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'inside bl but no bl hits'" << endmsg;   
-	m_cutFlowTrkSel.push_back(5); return 0;
-      }
-
-      if(PXshared>m_CutSharedHits) return 0;
-    }
-
-    // Only if vertex is in acceptance
-    if(fabs(FitVertex.z())<400.) { 
-
-      xDif=FitVertex.x()-m_Xlayer1, yDif=FitVertex.y()-m_Ylayer1 ; 
-      Dist2D=sqrt(xDif*xDif+yDif*yDif);
-
-      //* Reason "inside l1 but no l1 hits" *//
-      if (Dist2D < m_Rlayer1) {  
-	if( l1Trk[0]==0 || l1Trk[1]==0 ) { 
-	  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'inside l1 but no l1 hits'" << endmsg;   
-	  m_cutFlowTrkSel.push_back(6); return 0;
-	}
-      } else {  
-
-	//* Reason "outside l1 but has l1 hits" *//
-	if( l1Trk[0]==1 || l1Trk[1]==1 ) { 
-	  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'inside l1 but no l1 hits'" << endmsg;   
-	  m_cutFlowTrkSel.push_back(7); return 0;
-	}
-      }  // Outside 1st-layer
-
-      xDif=FitVertex.x()-m_Xlayer2, yDif=FitVertex.y()-m_Ylayer2 ; 
-      Dist2D=sqrt(xDif*xDif+yDif*yDif);
-
-      //* Reason "inside l2 but no l2 hits" *//
-      if (Dist2D < m_Rlayer2) {  
-	if( l2Trk[0]==0 || l2Trk[1]==0 ) {
-	  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'inside l2 but no l2 hits'" << endmsg;   
-	  m_cutFlowTrkSel.push_back(8); return 0;
-	}
-      } else {
-
-	//* Reason "outside l2 but has l2 hits" *//
-	if( l2Trk[0]==1 || l2Trk[1]==1 ) {
-	  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'inside l2 but no l2 hits'" << endmsg;   
-	  m_cutFlowTrkSel.push_back(9); return 0;
-	}
-      }
-    }
-
-    // Final rejection of K0
-    if( !Charge && fabs(Momentum.m()-m_massK0)<15. ) {
-	  TrkFromV0.push_back(ListSecondTracks[0]);
-	  TrkFromV0.push_back(ListSecondTracks[1]);
-      if( TrkFromV0.size() > 2) {
-        sort(TrkFromV0.begin(),TrkFromV0.end());
-        TransfEnd =  unique(TrkFromV0.begin(),TrkFromV0.end());
-        TrkFromV0.erase( TransfEnd, TrkFromV0.end());
-        // sort(ListSecondTracks.begin(),ListSecondTracks.end(),TrigInDetVxInJetTool::sortbyPtPredicate);
-      }
-
-      //* Reason "K0 rejection" *//
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'K0 rejection'" << endmsg;   
-      m_cutFlowTrkSel.push_back(10); return 0;
-    }
-
-    //-- Protection against fake vertices far from interaction point 
-    if(NPVParticle<1)NPVParticle=1;
-    double vvdist3D=VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
-    double t3Dimp1= m_fitSvc->VKalGetImpact(ListSecondTracks[0], PrimVrt.position(), 1, Impact, ImpactError)/fabs(TrkAtVrt[0][2]);
-    double t3Dimp2= m_fitSvc->VKalGetImpact(ListSecondTracks[1], PrimVrt.position(), 1, Impact, ImpactError)/fabs(TrkAtVrt[1][2]);
-    double selVar=(t3Dimp1<t3Dimp2 ? t3Dimp1 : t3Dimp2)/sqrt((double)NPVParticle)/vvdist3D/500.;
-
-    //* Reason "AntiFake2trVrtCut" *//
-    if(selVar<m_AntiFake2trVrtCut) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'AntiFake2trVrtCut'" << endmsg;   
-      m_cutFlowTrkSel.push_back(11); return 0;
-    }
-  }
-
-
-  double JetVrtDir =
-    JetDir.px()*(FitVertex.x()-PrimVrt.position().x())
-    + JetDir.py()*(FitVertex.y()-PrimVrt.position().y())
-    + JetDir.pz()*(FitVertex.z()-PrimVrt.position().z());
-
-  if(  m_getNegativeTag ) {
-
-    //* Reason "getNegTag but pos. sig." *//
-    if( JetVrtDir>0. ) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'getNegTag but pos. sig.'" << endmsg;   
-      m_cutFlowTrkSel.push_back(11); return 0;
-    }
-
-  } else if( m_getNegativeTail ) { 
-    ;
-  } else { 
-
-    //* Reason "not NegTail but neg. sig." *//
-    if( JetVrtDir<0. ) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Stop SV fitting routine. Reason 'not NegTail but neg. sig.'" << endmsg;   
-      m_cutFlowTrkSel.push_back(11); return 0; 
-    }
-  } 
-
-  Results.push_back(Momentum.m());
-
-  double eRatio = Momentum.e()/MomentumJet.e(); 
-  Results.push_back(eRatio<0.99999 ? eRatio : 0.99999);        //1st
-  Results.push_back(Vrt2TrackNumber);                          //2nd
-  Results.push_back((double)NTracks);                          //3rd
-  Results.push_back((double)ListSecondTracks.size());          //4th
-  Dist3D=VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D);
-  if(JetVrtDir < 0) Signif3D = -Signif3D;
-  Results.push_back(Signif3D);                                 //5th
-  Results.push_back(trackPtMax);                               //6th
-  Results.push_back(MomentumJet.e());                          //7th
-
-  double covVrt[6]={ErrorMatrix[0],ErrorMatrix[1],ErrorMatrix[2],ErrorMatrix[3],ErrorMatrix[4],ErrorMatrix[5]};
-  TrackInVertexList* tmpTrkInVrt = new TrackInVertexList();
-  for(int tt=0; tt<(int)ListSecondTracks.size(); tt++)
-    tmpTrkInVrt->push_back(ListSecondTracks[tt]);
-
-  TrigVertex * tmpVx=new TrigVertex(FitVertex.x(),FitVertex.y(),FitVertex.z(),
-                                    covVrt, Chi2, (int)(ListSecondTracks.size()*2-3), tmpTrkInVrt,
-                                    Results[0], /* mass */
-                                    Results[1], /* energy fraction */
-                                    (int)Vrt2TrackNumber,
-                                    Dist3D,
-                                    Signif3D,
-                                    TrigVertex::BJETSECVTXID);
-  //===================================================
-
-  return tmpVx;
-}
-
-
-
-//
-//--------------------------------------------------------
-//  Routine for global secondary vertex fitting
-//
-
-template <class Track>
-double TrigInDetVxInJetTool::FitCommonVrt(std::vector<const Track*>          & ListSecondTracks,
-                                          const Trk::RecVertex               & PrimVrt,
-                                          std::vector<double>                & InpMass, 
-                                          Amg::Vector3D                      & FitVertex,
-                                          std::vector<double>                & ErrorMatrix,
-                                          CLHEP::HepLorentzVector            & Momentum,
-                                          std::vector< std::vector<double> > & TrkAtVrt)
-{
-
-  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "FitCommonVrt() called " <<ListSecondTracks.size()<< endmsg;
-  //preparation
-  StatusCode sc;
-  std::vector<double> Chi2PerTrk;
-  long int           Charge;
-  double             Chi2 = 0.;
-  ;
-  int Outlier=1, i=0;
-  //
-  // Start of fit
-  //
-  m_fitSvc->setDefault();
-  m_fitSvc->setMassInputParticles( InpMass );            // Use pions masses
-  m_fitSvc->setMomCovCalc(1);  /* Total momentum and its covariance matrix are calculated*/
-  sc=VKalVrtFitFastBase(ListSecondTracks,FitVertex);          /* Fast crude estimation */
-  if(sc.isFailure() || FitVertex.perp() > m_Rlayer2*2. ) {    /* No initial estimation */ 
-    m_fitSvc->setApproximateVertex(PrimVrt.position().x(),   /* Use as starting point */
-                                   PrimVrt.position().y(),
-                                   PrimVrt.position().z()); 
-  } else {
-    m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); /*Use as starting point*/
-  }
-  if(m_RobustFit)m_fitSvc->setRobustness(m_RobustFit);
-  //fit itself
-  int NTracksVrt = ListSecondTracks.size(); double FitProb=0.;
-  for (i=0; i < NTracksVrt-1; i++) {
-    sc=VKalVrtFitBase(ListSecondTracks,FitVertex, Momentum,Charge,
-                      ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
-    if(sc.isFailure() ||  Chi2 > 1000000. ) { return -10000.;}    // No fit
-    Outlier = FindMax( Chi2PerTrk ); 
-    FitProb=TMath::Prob( Chi2, 2*ListSecondTracks.size()-3);
-    if(ListSecondTracks.size() == 2 )                break;         // Only 2 tracks left
-    if( Momentum.m() <6000. && FitProb > 0.001) {
-      if( Chi2PerTrk[Outlier] < m_SecTrkChi2Cut*m_chiScale[ListSecondTracks.size()<10?ListSecondTracks.size():10])  break;  // Solution found
-    }
-    RemoveEntryInList(ListSecondTracks,Outlier);
-    m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); /*Use as starting point*/
-  }
-  //--
-  if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" SecVrt fit converged="<< ListSecondTracks.size()<<", "
-                                       <<Chi2<<", "<<Chi2PerTrk[Outlier]<<" Mass="<<Momentum.m()<<endmsg;
-  //--
-  if( ListSecondTracks.size()==2 ){
-    if( Momentum.m() > 6000. || FitProb < 0.001 || Chi2PerTrk[Outlier] > m_SecTrkChi2Cut) { return -10000.;  }  
-  } 
-  //
-  //-- To kill remnants of conversion
-  double Dist2D=sqrt(FitVertex.x()*FitVertex.x()+FitVertex.y()*FitVertex.y());
-  if( ListSecondTracks.size()==2  && (Dist2D > 20.) && Charge==0 ) {      
-    double mass_EE   =  massV0( TrkAtVrt,m_massE,m_massE);
-    //if(m_FillHist){m_hb_totmassEE->Fill( mass_EE, w_1); }
-    if( mass_EE < 100. ) return -40.;
-  }
-  return Chi2;
-}
-
-
-
-//
-//
-//--------------------------------------------------------
-//   Template routine for 2track secondary vertices selection
-//
-
-template <class Track>
-void TrigInDetVxInJetTool::Select2TrVrt(std::vector<const Track*>     & SelectedTracks,
-                                        std::vector<const Track*>     & TracksForFit,
-                                        const Trk::RecVertex          & PrimVrt,
-                                        const CLHEP::HepLorentzVector & JetDir,
-                                        std::vector<double>           & InpMass, 
-                                        std::vector<const Track*>     & TrkFromV0,
-                                        std::vector<const Track*>     & ListSecondTracks) {
-
-  StatusCode sc;
-  sc.setChecked();
-  Amg::Vector3D FitVertex, vDist;
-  std::vector<double> ErrorMatrix,Chi2PerTrk,VKPerigee,CovPerigee;
-  std::vector< std::vector<double> > TrkAtVrt; 
-  CLHEP::HepLorentzVector Momentum;
-  std::vector<double> Impact,ImpactError;
-  double ImpactSignif=0;
-  double             Chi2=0, Signif3D=0, Dist2D=0, JetVrtDir=0;
-  long int           Charge;
-  int i,j;
-  //
-  long int NTracks = (int) (SelectedTracks.size());
-
-  //
-  //  Impact parameters with sign calculations
-  //
-  double SignifR,SignifZ;
-  std::vector<double> TrackSignif,TrackPt;
-  int NPrimTrk=0, NSecTrk=0;
-  for (i=0; i<NTracks; i++) {
-    ImpactSignif = m_fitSvc->VKalGetImpact(SelectedTracks[i], PrimVrt.position(), 1, Impact, ImpactError);
-
-    const TrigInDetTrackFitPar * tmpPerigee = SelectedTracks[i]->param(); 
-    if( sin(tmpPerigee->phi0() - JetDir.phi())*Impact[0] < 0 ){ Impact[0] = -fabs(Impact[0]);}
-    else{ Impact[0] =  fabs(Impact[0]);}
-    double tTheta= 2.0*atan(exp(-(tmpPerigee->eta()))); 
-    if(  (tTheta-JetDir.theta())*Impact[1] < 0 ){ Impact[1] = -fabs(Impact[1]);}
-    else{ Impact[1] =  fabs(Impact[1]);}
-    SignifR = Impact[0]/ sqrt(ImpactError[0]);
-    SignifZ = Impact[1]/ sqrt(ImpactError[2]);
-    //if(m_FillHist){
-    //  m_hb_impactR->Fill( SignifR, w_1); 
-    //  m_hb_impactZ->Fill( SignifZ, w_1); 
-    //  m_hb_impactRZ->Fill(SignifR, SignifZ, w_1); 
-    //}
-    if(ImpactSignif < 3.) { NPrimTrk += 1;}
-    else{NSecTrk += 1;}
-    if(m_getNegativeTail){
-      ImpactSignif = sqrt( SignifR*SignifR + SignifZ*SignifZ);
-    }else if(m_getNegativeTag){
-      ImpactSignif = sqrt(  (SignifR-0.6)*(SignifR-0.6)
-  	                        + (SignifZ-0.6)*(SignifZ-0.6) );
-    }else{
-      ImpactSignif = sqrt(  (SignifR+0.6)*(SignifR+0.6)
-  	                        + (SignifZ+0.6)*(SignifZ+0.6) );
-    } 
-    if(fabs(SignifR) < m_AntiPileupSigRCut) {   // cut against tracks from pileup vertices  
-      if(SignifZ >  m_AntiPileupSigZCut ) ImpactSignif=0.;  
-      if(SignifZ < -m_AntiPileupSigZCut ) ImpactSignif=0.;  
-    }
-      
-    TrackSignif.push_back(ImpactSignif); TrackPt.push_back( fabs(tmpPerigee->pT()) ) ;
-    //if(m_FillHist){m_hb_impact->Fill( ImpactSignif, w_1);}
-  }
-
-  int NTrDiff = NPrimTrk-NSecTrk; if(NTrDiff < 1) NTrDiff=1;
-  double SelLim = m_TrkSigCut;
-
-  m_fitSvc->setDefault();
-  m_fitSvc->setMassInputParticles( InpMass );     // Use pion masses for fit
-  m_fitSvc->setMomCovCalc(1);                     // Total momentum and its covariance matrix are calculated
-  for (i=0; i<NTracks-1; i++) {
-    double adp1=TrackPt[i]/64000.; if(adp1<0.)adp1=0;if(adp1>1.)adp1=1.;adp1=sqrt(adp1)/2.;
-  
-    for (j=i+1; j<NTracks; j++) {
-
-      double adp2=TrackPt[j]/64000.; if(adp2<0.)adp2=0;if(adp2>1.)adp2=1.;adp2=sqrt(adp2)/2.;
-
-      //* Reason "trk_{1} dca/#sigma(dca) - adp <" *//
-      if(TrackSignif[i] < SelLim+adp1) { m_cutFlowTwoTrkVtxSel.push_back(1); continue; }
-
-      //* Reason "trk_{2} dca/#sigma(dca) - adp <" *//
-      if(TrackSignif[j] < SelLim+adp2) { m_cutFlowTwoTrkVtxSel.push_back(2); continue; }
-
-      //* Reason "#Sigma(dca/#sigma(dca))- #Sigma(adp) <" *//
-      if(TrackSignif[i]+TrackSignif[j] < (2.*SelLim+m_TrkSigSumCut+adp1+adp2)) { m_cutFlowTwoTrkVtxSel.push_back(3); continue; }
-
-      int BadTracks = 0;                                       //Bad tracks identification }
-      TracksForFit.clear();
-      m_fitSvc->setDefault();                          //Reset VKalVrt settings
-      m_fitSvc->setMomCovCalc(1);                     // Total momentum and its covariance matrix are calculated
-      TracksForFit.push_back( SelectedTracks[i] );
-      TracksForFit.push_back( SelectedTracks[j] );
-
-      sc=VKalVrtFitFastBase(TracksForFit,FitVertex);              /* Fast crude estimation*/
-      
-      if( sc.isFailure() || FitVertex.perp() > m_Rlayer2*2. ) {   /* No initial estimation */ 
-        m_fitSvc->setApproximateVertex(PrimVrt.position().x(),   /*Use as starting point*/
-				       PrimVrt.position().y(),
-                                       PrimVrt.position().z()); 
-      } else {
-        vDist=FitVertex-PrimVrt.position();
-        JetVrtDir = JetDir.px()*vDist.x() + JetDir.py()*vDist.y() + JetDir.pz()*vDist.z();
-        if( JetVrtDir>0. ) {                           /* Good initial estimation */ 
-          m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); /*Use as starting point*/
-        }else{
-          m_fitSvc->setApproximateVertex(PrimVrt.position().x(), PrimVrt.position().y(), PrimVrt.position().z()); 
-        }
-      }
-
-      sc=VKalVrtFitBase(TracksForFit,FitVertex, Momentum,Charge,
-                        ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
-
-      //* Reason "2vrt fit failed" *//
-      if(sc.isFailure()) { m_cutFlowTwoTrkVtxSel.push_back(4); continue; }
-      
-      //* Reason "2vrt fit #chi^{2} >" *//
-      if(Chi2 > m_Sel2VrtChi2Cut) { m_cutFlowTwoTrkVtxSel.push_back(5); continue; }
-
-      vDist=FitVertex-PrimVrt.position();
-      JetVrtDir = JetDir.px()*vDist.x() + JetDir.py()*vDist.y() + JetDir.pz()*vDist.z();
-      double vPos=(vDist.x()*Momentum.px()+vDist.y()*Momentum.py()+vDist.z()*Momentum.pz())/Momentum.rho();
- 
-      //* Reason "2vrt behind p.v." *//
-      if((!m_getNegativeTail) && (!m_getNegativeTag) && (JetVrtDir<0.) ) { m_cutFlowTwoTrkVtxSel.push_back(6); continue; }
-
-      /* secondary vertex behind primary*/
-
-      //* Reason "2vrt too far behind p.v." *//
-      if(vPos<-150.) { m_cutFlowTwoTrkVtxSel.push_back(7); continue; }
-      
-      //
-      // Check pixel hit - vertex position. If Rv>Rlayer->tracks must not have given layer hits
-      int blTrk[2]={0,0};
-      int l1Trk[2]={0,0};
-      int l2Trk[2]={0,0};
-
-      for (int tr = 0; tr < (int) TracksForFit.size(); tr++) {
-	
-        if (!(TracksForFit[tr]->HitPattern())) continue;
-	
-	blTrk[tr] = (TracksForFit[tr]->HitPattern() & 0x1) ? 1 : 0;
-	l1Trk[tr] = (TracksForFit[tr]->HitPattern() & 0x2) ? 1 : 0;
-	l2Trk[tr] = (TracksForFit[tr]->HitPattern() & 0x4) ? 1 : 0;
-
-      }
-
-      double xdf=FitVertex.x()-m_XlayerB;
-      double ydf=FitVertex.y()-m_YlayerB;
-
-      //* Reason "si hits pattern not compatible with 2vrt radius" *//
-      m_cutFlowTwoTrkVtxSel.push_back(8); 
-
-      if( sqrt(xdf*xdf+ydf*ydf) > (m_RlayerB+4.)  && (blTrk[0] || blTrk[1])) continue;
-      if(fabs(FitVertex.z())<400.){ //Only if vertex is in acceptance
-        xdf=FitVertex.x()-m_Xlayer1;
-        ydf=FitVertex.y()-m_Ylayer1;
-        if( sqrt(xdf*xdf+ydf*ydf) > (m_Rlayer1+4.)  && (l1Trk[0] || l1Trk[1])) continue;
-        xdf=FitVertex.x()-m_Xlayer2;
-        ydf=FitVertex.y()-m_Ylayer2;
-        if( sqrt(xdf*xdf+ydf*ydf) > (m_Rlayer2+4.)  && (l2Trk[0] || l2Trk[1])) continue;
-      }
-
-      Dist2D=sqrt(FitVertex.x()*FitVertex.x()+FitVertex.y()*FitVertex.y()); 
-      double Signif3Dproj=VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, JetDir);
-      double mass_PiPi =  Momentum.m();  
-
-      //* Reason "2vrt mass > 6000" - can't be from B decay *//
-      if(mass_PiPi > 6000.) { m_cutFlowTwoTrkVtxSel.push_back(9); continue; }
-
-      //* Reason "2vrt radius > 180" - can't be from B decay *//
-      if(Dist2D > 180.) { m_cutFlowTwoTrkVtxSel.push_back(10); continue; } 
-
-      //if(m_FillHist)m_hb_massPiPi2->Fill( mass_PiPi, w_1);
-
-      //Check if V0 or material interaction on Pixel layer is present
-
-      if( Charge == 0 && Signif3D>8. && mass_PiPi<900.) {
-
-        double mass_PPi  =  massV0( TrkAtVrt,m_massP,m_massPi);
-        double mass_EE   =  massV0( TrkAtVrt,m_massE,m_massE);
-
-        //if(m_FillHist){m_hb_massEE->Fill( mass_EE, w_1);}
-
-        if(       mass_EE <  40.)  { 
-          BadTracks = 3;
-        }else{
-
-          //if(m_FillHist){m_hb_massPiPi->Fill( mass_PiPi, w_1);}     /* Total mass with input particles masses*/
-          //if(m_FillHist){m_hb_massPPi->Fill( mass_PPi, w_1);} 
-
-          if( fabs(mass_PiPi-m_massK0) < 22. )  BadTracks = 1;
-          if( fabs(mass_PPi-m_massLam) <  8. )  BadTracks = 2;
-        }
-        //
-        //  Creation on V0 tracks
-        //
-        if(BadTracks){
-          std::vector<double> inpMass;
-          m_fitSvc->setDefault();                     //Reset VKalVrt settings
-          m_fitSvc->setMomCovCalc(1);                 //Total momentum and its covariance 
-		                                              //matrix are calculated
-		  if( BadTracks == 1 ) {  // K0 case
-		    inpMass.push_back(m_massPi);inpMass.push_back(m_massPi);
-            m_fitSvc->setMassInputParticles( inpMass );
-            m_fitSvc->setMassForConstraint(m_massK0);
-            m_fitSvc->setCnstType(1);       // Set mass  constraint
-          }
-		  if( BadTracks == 2 ) {  // Lambda case
-            if( fabs(1./TrkAtVrt[0][2]) > fabs(1./TrkAtVrt[1][2]) ) {
-              inpMass.push_back(m_massP);inpMass.push_back(m_massPi);
-            }else{  inpMass.push_back(m_massPi);inpMass.push_back(m_massP); }
-            m_fitSvc->setMassInputParticles( inpMass );
-            m_fitSvc->setMassForConstraint(m_massLam);
-            m_fitSvc->setCnstType(1);       // Set mass  constraint
-          }
-		  if( BadTracks == 3 ) {  // Gamma case
-		    inpMass.push_back(m_massE);inpMass.push_back(m_massE);
-            m_fitSvc->setMassInputParticles( inpMass );
-            m_fitSvc->setCnstType(12);       // Set 3d angular constraint
-          }
-          m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z()); 
-          sc=VKalVrtFitBase(TracksForFit,FitVertex, Momentum,Charge,
-                            ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2);
-          if(sc.isSuccess()) {
-            sc=m_fitSvc->VKalVrtCvtTool(FitVertex,Momentum,ErrorMatrix,0,VKPerigee,CovPerigee);
-            if(sc.isSuccess()) {
-              const TrigInDetTrack* TT = m_fitSvc->CreateTrigTrack(VKPerigee,CovPerigee); 
-              ImpactSignif=m_fitSvc->VKalGetImpact(TT, PrimVrt.position(), 0, Impact, ImpactError);
-              //if(m_FillHist){m_hb_impV0->Fill( ImpactSignif, w_1); }
-              if(ImpactSignif>5.) BadTracks=0;
-		      delete TT;
-            } else { BadTracks=0;}
-          } 
-        }
-      }
-      
-      //
-      //  Check interactions on pixel layers
-      //
-      double xvt=FitVertex.x();
-      double yvt=FitVertex.y();
-      Dist2D=sqrt( (xvt-m_Xbeampipe)*(xvt-m_Xbeampipe) + (yvt-m_Ybeampipe)*(yvt-m_Ybeampipe) );
-
-      if( fabs(Dist2D-m_Rbeampipe)< 1.5) BadTracks = 4;           // Beam Pipe removal
-      //Dist2D=sqrt(pow(xvt-m_XlayerB,2.)+pow(yvt-m_YlayerB,2.)); 
-      Dist2D=sqrt( (xvt-m_XlayerB)*(xvt-m_XlayerB) + (yvt-m_YlayerB)*(yvt-m_YlayerB) ); 
-      if( fabs(Dist2D-m_RlayerB) < 3.5)  BadTracks = 4;
-      //Dist2D=sqrt(pow(xvt-m_Xlayer1,2.)+pow(yvt-m_Ylayer1,2.)); 
-      Dist2D=sqrt( (xvt-m_Xlayer1)*(xvt-m_Xlayer1) + (yvt-m_Ylayer1)*(yvt-m_Ylayer1) );
-      if( fabs(Dist2D-m_Rlayer1) < 4.0)  BadTracks = 4;
-      Dist2D=sqrt( (xvt-m_Xlayer2)*(xvt-m_Xlayer2) + (yvt-m_Ylayer2)*(yvt-m_Ylayer2) );
-      if( fabs(Dist2D-m_Rlayer2) < 5.0)  BadTracks = 4;
-
-      //* Reason "interaction with pixel layers" *//
-      if (BadTracks == 4) m_cutFlowTwoTrkVtxSel.push_back(11); 
-      //* Reason "matches K^{0}_{S},#Lambda^{0},#gamma" *//
-      else if (BadTracks > 0) m_cutFlowTwoTrkVtxSel.push_back(12); 
-                                
-      //
-      //  Creation of tracks from V0 list
-      //
-      if( BadTracks ){
-        TrkFromV0.push_back(SelectedTracks[i]);
-        TrkFromV0.push_back(SelectedTracks[j]);
-        continue;
-      }
-
-      Dist2D=sqrt( (xvt-m_XlayerB)*(xvt-m_XlayerB) + (yvt-m_YlayerB)*(yvt-m_YlayerB) );
-
-      int hBL1 = (TracksForFit[0]->HitPattern() & 0x1) ? 1 : 0;
-      int hBL2 = (TracksForFit[1]->HitPattern() & 0x1) ? 1 : 0;
-
-      if( Dist2D > (m_RlayerB+5.) &&  ( hBL1 || hBL2 ) ) continue;
-      if( Dist2D < (m_RlayerB-5.) ) {
-        if( hBL1==0 && hBL2==0  ) continue;
-        if( Signif3D <10. && (hBL1*hBL2)==0)continue;
-      }
-      
-      double JetVrtDir =
-        JetDir.px()*(FitVertex.x()-PrimVrt.position().x())
-        + JetDir.py()*(FitVertex.y()-PrimVrt.position().y())
-        + JetDir.pz()*(FitVertex.z()-PrimVrt.position().z());
-      if(m_getNegativeTail) JetVrtDir=fabs(JetVrtDir);  // For negative TAIL
-      // accepts also negative track pairs
-      if(m_getNegativeTag) JetVrtDir=-JetVrtDir;        // For negative TAG
-      // accepts only negative track pairs
-
-      if( (Signif3D>m_Sel2VrtSigCut) && (JetVrtDir>0) ) {
-
-	//* Reason "L/#sigma(L)_{proj} <" *//
-        if(Signif3Dproj<m_Sel2VrtSigCut) { m_cutFlowTwoTrkVtxSel.push_back(13); continue; }
-
-        ListSecondTracks.push_back(SelectedTracks[i]);
-        ListSecondTracks.push_back(SelectedTracks[j]);
-      }
-    }
-  }
-}
-
-
-
-
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/src/Utilities.cxx b/Trigger/TrigTools/TrigInDetVxInJetTool/src/Utilities.cxx
deleted file mode 100755
index 1477503e7b31bca0c319330256579ef284dca6d9..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/src/Utilities.cxx
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigInDetVxInJetTool.h"
-#include "VxVertex/RecVertex.h"
-#include "TrigInDetEvent/TrigInDetTrack.h"
-//-------------------------------------------------
-// Other stuff
-#include<iostream>
-
-
-
-               /*  Technicalities */
-bool TrigInDetVxInJetTool::sortbyPtPredicate(const TrigInDetTrack* t1, const TrigInDetTrack* t2)
-{
-  return fabs(t1->param()->pT()) < fabs(t2->param()->pT());
-}
-double TrigInDetVxInJetTool::ProjPos(const Amg::Vector3D & Vrt,const CLHEP::HepLorentzVector & JetDir)
-  const
-{
-  double Denom = JetDir.px()*JetDir.px() + JetDir.py()*JetDir.py() + JetDir.pz()*JetDir.pz();
-  return (Vrt.x()*JetDir.px() + Vrt.y()*JetDir.py() + Vrt.z()*JetDir.pz())/Denom;
-}
-
-
-
-double TrigInDetVxInJetTool::VrtVrtDist(const Trk::RecVertex & PrimVrt, const Amg::Vector3D & SecVrt, 
-                                        const std::vector<double> SecVrtErr, double& Signif)
-  const
-{
-  double distx =  PrimVrt.position().x()- SecVrt.x();
-  double disty =  PrimVrt.position().y()- SecVrt.y();
-  double distz =  PrimVrt.position().z()- SecVrt.z();
-
-  Amg::MatrixX  PrimCovMtx=PrimVrt.covariancePosition();
-  PrimCovMtx(0,0) += SecVrtErr[0];
-  PrimCovMtx(0,1) += SecVrtErr[1];
-  PrimCovMtx(1,0) += SecVrtErr[1];
-  PrimCovMtx(1,1) += SecVrtErr[2];
-  PrimCovMtx(0,2) += SecVrtErr[3];
-  PrimCovMtx(2,0) += SecVrtErr[3];
-  PrimCovMtx(1,2) += SecVrtErr[4];
-  PrimCovMtx(2,1) += SecVrtErr[4];
-  PrimCovMtx(2,2) += SecVrtErr[5];
-  
-  Amg::MatrixX  WgtMtx = PrimCovMtx.inverse();
-
-  Signif = distx*WgtMtx(0,0)*distx
-          +disty*WgtMtx(1,1)*disty
-          +distz*WgtMtx(2,2)*distz
-       +2.*distx*WgtMtx(0,1)*disty
-       +2.*distx*WgtMtx(0,2)*distz
-       +2.*disty*WgtMtx(1,2)*distz;
-
-  Signif=sqrt(Signif);
-  if( Signif!=Signif ) Signif = 0.;
-
-  return sqrt(distx*distx+disty*disty+distz*distz);
-}
-  
-//--------------------------------------------------
-// Significance along jet direction
-//--------------------------------------------------
-double TrigInDetVxInJetTool::VrtVrtDist(const Trk::RecVertex & PrimVrt, const Amg::Vector3D & SecVrt, 
-                                        const std::vector<double> SecVrtErr, const CLHEP::HepLorentzVector & JetDir)
-  const
-{
-  Amg::Vector3D jetDir(JetDir.vect().unit().x(), JetDir.vect().unit().y(), JetDir.vect().unit().z());
-  double projDist=(PrimVrt.position()-SecVrt).dot(jetDir);
-  double distx =  jetDir.x()*projDist;
-  double disty =  jetDir.y()*projDist;
-  double distz =  jetDir.z()*projDist;
-  
-  Amg::MatrixX  PrimCovMtx=PrimVrt.covariancePosition();
-  PrimCovMtx(0,0) += SecVrtErr[0];
-  PrimCovMtx(0,1) += SecVrtErr[1];
-  PrimCovMtx(1,0) += SecVrtErr[1];
-  PrimCovMtx(1,1) += SecVrtErr[2];
-  PrimCovMtx(0,2) += SecVrtErr[3];
-  PrimCovMtx(2,0) += SecVrtErr[3];
-  PrimCovMtx(1,2) += SecVrtErr[4];
-  PrimCovMtx(2,1) += SecVrtErr[4];
-  PrimCovMtx(2,2) += SecVrtErr[5];
- 
-  Amg::MatrixX  WgtMtx = PrimCovMtx.inverse();
- 
-  double Signif = distx*WgtMtx(0,0)*distx
-                 +disty*WgtMtx(1,1)*disty
-                 +distz*WgtMtx(2,2)*distz
-              +2.*distx*WgtMtx(0,1)*disty
-              +2.*distx*WgtMtx(0,2)*distz
-              +2.*disty*WgtMtx(1,2)*distz;
-
-  Signif=sqrt(Signif);
-  if( Signif!=Signif ) Signif = 0.;
-
-  return Signif;
-}
-
-
-double TrigInDetVxInJetTool::VrtVrtDist(const Amg::Vector3D & Vrt1, const std::vector<double>  & VrtErr1,
-                                        const Amg::Vector3D & Vrt2, const std::vector<double>  & VrtErr2)
-  const
-{
-   double Signif;
-   double distx =  Vrt1.x()- Vrt2.x();
-   double disty =  Vrt1.y()- Vrt2.y();
-   double distz =  Vrt1.z()- Vrt2.z();
-   
-   AmgSymMatrix(3)  PrimCovMtx;
-   PrimCovMtx(0,0) =                   VrtErr1[0]+VrtErr2[0];
-   PrimCovMtx(0,1) = PrimCovMtx(1,0) = VrtErr1[1]+VrtErr2[1];
-   PrimCovMtx(1,1) =                   VrtErr1[2]+VrtErr2[2];
-   PrimCovMtx(0,2) = PrimCovMtx(2,0) = VrtErr1[3]+VrtErr2[3];
-   PrimCovMtx(1,2) = PrimCovMtx(2,1) = VrtErr1[4]+VrtErr2[4];
-   PrimCovMtx(2,2) =                   VrtErr1[5]+VrtErr2[5];
-   
-   AmgSymMatrix(3)  WgtMtx = PrimCovMtx.inverse();
- 
-   Signif = distx*WgtMtx(0,0)*distx
-           +disty*WgtMtx(1,1)*disty
-           +distz*WgtMtx(2,2)*distz
-        +2.*distx*WgtMtx(0,1)*disty
-        +2.*distx*WgtMtx(0,2)*distz
-        +2.*disty*WgtMtx(1,2)*distz;
-
-   Signif=sqrt(Signif);
-   if(Signif != Signif)  Signif = 0.;
-   
-   return Signif;
-}
-
-
-/* Invariant mass calculation for V0 decays*/
-/* Gives correct mass assignment in case of nonequal masses*/
-
-
-double TrigInDetVxInJetTool::massV0(std::vector< std::vector<double> >& TrkAtVrt,
-                                    double massP, double massPi )
-  const
-{
-  double p1=fabs(TrkAtVrt[0][2]); double p2=fabs(TrkAtVrt[1][2]);
-  double px = cos(TrkAtVrt[0][0])*sin(TrkAtVrt[0][1])/p1 
-    + cos(TrkAtVrt[1][0])*sin(TrkAtVrt[1][1])/p2;
-  double py = sin(TrkAtVrt[0][0])*sin(TrkAtVrt[0][1])/p1 
-    + sin(TrkAtVrt[1][0])*sin(TrkAtVrt[1][1])/p2;
-  double pz =                     cos(TrkAtVrt[0][1])/p1 
-    +                     cos(TrkAtVrt[1][1])/p2;
-  double ee= (1./p1 > 1./p2) ? 
-    (sqrt(1./p1/p1+massP*massP)+sqrt(1./p2/p2+massPi*massPi)):
-    (sqrt(1./p2/p2+massP*massP)+sqrt(1./p1/p1+massPi*massPi));
-  double test=(ee-pz)*(ee+pz)-px*px-py*py;
-  return test>0 ? sqrt(test) : 0.; 
-}
-
-
-
-int TrigInDetVxInJetTool::FindMax( std::vector<double>& Chi2PerTrk)
-  const
-{ 
-  double Chi2Ref=0.;
-  int Position=0;
-  if( Chi2PerTrk.size() < 1 ) return Position ;
-  for (int i=0; i< (int)Chi2PerTrk.size(); i++){
-    if( Chi2PerTrk[i] > Chi2Ref) { Chi2Ref=Chi2PerTrk[i]; Position=i;}
-  }
-
-  return Position;
-}      
-  
- 
-
-//  Function returns a transverse momentum of track w/r some direction
-//
-double TrigInDetVxInJetTool::pTvsDir(const Amg::Vector3D &Dir, const std::vector< double >& InpTrk) 
-  const
-{
-  double Norm=sqrt(Dir.x()*Dir.x() + Dir.y()*Dir.y() + Dir.z()*Dir.z());
-  double sx=Dir.x()/Norm; double sy=Dir.y()/Norm; double sz=Dir.z()/Norm;
-
-  double px=0.,py=0.,pz=0.; double scale;
-  px = cos ( InpTrk[0]) * sin(InpTrk[1])/fabs(InpTrk[2]);
-  py = sin ( InpTrk[0]) * sin(InpTrk[1])/fabs(InpTrk[2]);
-  pz =                    cos(InpTrk[1])/fabs(InpTrk[2]);
-  scale = px*sx + py*sy + pz*sz;
-  px -= sx*scale;
-  py -= sy*scale; 
-  pz -= sz*scale;
-  return sqrt( px*px +py*py + pz*pz );
-}
-
-CLHEP::HepLorentzVector TrigInDetVxInJetTool::TotalMom(const std::vector<const TrigInDetTrack*>& InpTrk) 
-  const
-{
-  double px=0.,py=0.,pz=0.,ee=0.;
-  double Pt=0;
-  for (int i = 0; i < (int)InpTrk.size(); ++i) {
-    if( InpTrk[i] == NULL ){ continue; } 
-    const TrigInDetTrackFitPar* Per=InpTrk[i]->param();
-    Pt= fabs(Per->pT());
-    px += cos ( Per->phi0()) * Pt;
-    py += sin ( Per->phi0()) * Pt;
-    double Theta = 2.0*atan(exp(-Per->eta())); 
-    pz += Pt/tan(Theta);
-    ee += sqrt(  Pt*Pt + pz*pz + m_massPi*m_massPi);
-  }
-  return CLHEP::HepLorentzVector(px,py,pz,ee); 
-}
-
-
-
-
-void TrigInDetVxInJetTool::RemoveEntryInList(std::vector<const TrigInDetTrack*>& ListTracks, int Outlier)
-  const
-{
-  if(Outlier < 0 ) return;
-  if(Outlier >= (int)ListTracks.size() ) return;
-  std::vector<const TrigInDetTrack*>::iterator   TransfEnd;
-  TransfEnd = remove( ListTracks.begin(), ListTracks.end(), ListTracks[Outlier]);
-  ListTracks.erase( TransfEnd,ListTracks.end());
-}     
-
-
-
-
-
-//
-//  For possible templating....
-//
-
-StatusCode TrigInDetVxInJetTool::VKalVrtFitFastBase(const std::vector<const TrigInDetTrack*>& listPart,
-                                                    Amg::Vector3D  & FitVertex)
-{  
-  return m_fitSvc->VKalVrtFitFast(listPart,FitVertex);    /* Fast crude estimation */
-}
-
-StatusCode TrigInDetVxInJetTool::VKalVrtFitBase(const std::vector<const TrigInDetTrack*> & listPart,
-                                                Amg::Vector3D&                             Vertex,
-                                                CLHEP::HepLorentzVector&                   Momentum,
-                                                long int&                                  Charge,
-                                                std::vector<double>&                       ErrorMatrix,
-                                                std::vector<double>&                       Chi2PerTrk,
-                                                std::vector< std::vector<double> >&        TrkAtVrt,
-                                                double& Chi2 )
-{
-  return m_fitSvc->VKalVrtFit( listPart, Vertex, Momentum, Charge,
-                               ErrorMatrix, Chi2PerTrk, TrkAtVrt, Chi2);
-
-}
-
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/src/components/TrigInDetVxInJetTool_entries.cxx b/Trigger/TrigTools/TrigInDetVxInJetTool/src/components/TrigInDetVxInJetTool_entries.cxx
deleted file mode 100644
index a6161be2529c3f2be866ef0666dca718f73f9b72..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/src/components/TrigInDetVxInJetTool_entries.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../TrigInDetVxInJetTool.h"
-
-DECLARE_COMPONENT( TrigInDetVxInJetTool )
diff --git a/Trigger/TrigTools/TrigTimeAlgs/share/test.txt b/Trigger/TrigTools/TrigTimeAlgs/share/test.txt
index bc44ffabc9cbaf06c4f081145d801f90cf84f137..4f319d2b552c2596e463ccf259873aeae006e8ef 100755
--- a/Trigger/TrigTools/TrigTimeAlgs/share/test.txt
+++ b/Trigger/TrigTools/TrigTimeAlgs/share/test.txt
@@ -1,4 +1,4 @@
-ApplicationMgr.DLLs += { "TrigTimeAlgs" };
+ApplicationMgr.Dlls += { "TrigTimeAlgs" };
 //ApplicationMgr.ExtSvc += { "ClassIDSvc" };
 //ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore" };
 //ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
diff --git a/Trigger/TrigTools/TrigVKalFitter/CMakeLists.txt b/Trigger/TrigTools/TrigVKalFitter/CMakeLists.txt
deleted file mode 100644
index d7e35e04144d2ae47395092134947acea4f0e672..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# Declare the package name:
-atlas_subdir( TrigVKalFitter )
-
-# External dependencies:
-find_package( CLHEP )
-
-# Component(s) in the package:
-atlas_add_library( TrigVKalFitterLib
-                   src/*.cxx
-                   PUBLIC_HEADERS TrigVKalFitter
-                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps EventPrimitives GaudiKernel GeoPrimitives MagFieldInterfaces TrkVKalVrtCore
-                   PRIVATE_LINK_LIBRARIES TrigInDetEvent )
-
-atlas_add_component( TrigVKalFitter
-                     src/components/*.cxx
-                     LINK_LIBRARIES TrigVKalFitterLib )
diff --git a/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/ATLAS_CHECK_THREAD_SAFETY
deleted file mode 100644
index db2371d6f89ae9f3869910acdf7f1e42644b2c02..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/ATLAS_CHECK_THREAD_SAFETY
+++ /dev/null
@@ -1 +0,0 @@
-Trigger/TrigTools/TrigVKalFitter
diff --git a/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/TrigVKalFitter.h b/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/TrigVKalFitter.h
deleted file mode 100755
index 87ddf48a4ae27a5137cce47725d5f3793977f114..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/TrigVKalFitter.h
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// TrigVKalFittter.h
-//
-#ifndef TRIGVKALFITTER_TRIGVKALFITTER_H
-#define TRIGVKALFITTER_TRIGVKALFITTER_H
-#include "EventPrimitives/EventPrimitives.h"
-#include "GeoPrimitives/GeoPrimitives.h"
-// Normal STL and physical vectors
-#include <vector>
-#include "CLHEP/Vector/LorentzVector.h"
-// Gaudi includes
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-//
-#include "TrkVKalVrtCore/ForCFT.h"
-
-namespace {
-static const int NTRMAXTRIG=300;
-}
-
-namespace Trk {
- class VKalVrtControl;
-}
-
-
-typedef std::vector<double> dvect;
-class VTrack;
-class TrigAtlasMagFld;
-
-class TrigInDetTrack;
-
-
-//------------------------------------------------------------------------
-static const InterfaceID IID_ITrigVKalFitter("ITrigVKalFitter", 1, 0);
-
-class ITrigVKalFitter : virtual public IAlgTool {
-public:
-   static const InterfaceID& interfaceID() { return IID_ITrigVKalFitter;}
-   //---------------------------------------------------------------------------
-   //Interface itself
-   virtual StatusCode VKalVrtFit(const std::vector<const TrigInDetTrack*>     & list,
-                                 dvect&         FitResult) =0;
-   
-   
-   
-   virtual StatusCode VKalVrtFit(const std::vector<const TrigInDetTrack*> & list,
-                                 Amg::Vector3D&        Vertex,
-                                 CLHEP::HepLorentzVector&   Momentum,
-                                 long int&           Charge,
-                                 dvect&              ErrorMatrix,
-                                 dvect&              Chi2PerTrk,
-                                 std::vector< std::vector<double> >& TrkAtVrt,
-                                 double& Chi2 ) =0;
-
-
-
-   virtual StatusCode VKalVrtCvtTool(const Amg::Vector3D& Vertex,
-                                     const CLHEP::HepLorentzVector& Momentum,
-                                     const dvect& CovVrtMom,
-                                     const long int& Charge,
-                                     dvect& Perigee,
-                                     dvect& CovPerigee) =0;
-   virtual TrigInDetTrack* CreateTrigTrack( const std::vector<double>& VKPerigee,
-                                            const std::vector<double>& VKCov) =0;
-
-
-   //.........................................................................................
-   virtual StatusCode VKalVrtFitFast(const std::vector<const TrigInDetTrack*>& list,
-                                     Amg::Vector3D& Vertex) =0;
-
-   //.........................................................................................
-
-   virtual StatusCode VKalGetTrkCov(const long int, const long int,
-                                    dvect& CovMtx) =0;
-   virtual StatusCode VKalGetMassError( std::vector<int> ListOfTracks , 
-                                        double& Mass, double& MassError) =0;
-
-   virtual void setApproximateVertex(double,double,double)=0;
-   virtual void setMassForConstraint(double)=0;
-   virtual void setMassForConstraint(double,std::vector<int>)=0;
-   virtual void setRobustness(int)=0;
-   virtual void setCnstType(int)=0;
-   virtual void setMomCovCalc(int)=0;
-   virtual void setIterations(int, double)=0;
-   virtual void setVertexForConstraint(double,double,double)=0;
-   virtual void setCovVrtForConstraint(double,double,double,
-                                       double,double,double)=0;
-   virtual void setMassInputParticles( std::vector<double>& )=0;
-   virtual void setDefault() =0;
-   virtual void setZeroCharge(int)=0;
-   virtual void setAthenaField(MagField::IMagFieldSvc*)=0;
-   //----
-   virtual double VKalGetImpact(const TrigInDetTrack*,const Amg::Vector3D& Vertex, const long int Charge,
-                                std::vector<double>& Impact, std::vector<double>& ImpactError)  = 0;
-};
-
-
-//------------------------------------------------------------------------
-class TrigVKalFitter : public AthAlgTool, virtual public ITrigVKalFitter {
-public:
-   /* Constructor */
-   TrigVKalFitter(const std::string& type, const std::string& name, 
-                  const IInterface* parent);
-   /* Destructor */
-   virtual ~TrigVKalFitter();
-
-   StatusCode VKalVrtFit(const std::vector<const TrigInDetTrack*>    &, dvect&  FitResult );
-
-
-
-   StatusCode VKalVrtFit(const std::vector<const TrigInDetTrack*>&,
-                         Amg::Vector3D&         Vertex,
-                         CLHEP::HepLorentzVector&   Momentum,
-                         long int&           Charge,
-                         dvect&              ErrorMatrix,
-                         dvect&              Chi2PerTrk,
-                         std::vector< std::vector<double> >& TrkAtVrt,
-                         double& Chi2 );
- 
- 
-
-   StatusCode VKalVrtCvtTool(const Amg::Vector3D& Vertex,
-                             const CLHEP::HepLorentzVector& Momentum,
-                             const dvect& CovVrtMom,
-                             const long int& Charge,
-                             dvect& Perigee,
-                             dvect& CovPerigee) ;
-
-   TrigInDetTrack* CreateTrigTrack( const std::vector<double>& VKPerigee,
-                                    const std::vector<double>& VKCov);
-
-   //............................................................................
-   StatusCode VKalVrtFitFast(const std::vector<const TrigInDetTrack*>&,
-                             Amg::Vector3D& Vertex);
-   //............................................................................
-
-   double VKalGetImpact( const TrigInDetTrack*,const Amg::Vector3D& Vertex, const long int Charge,
-                         std::vector<double>& Impact, std::vector<double>& ImpactError);
-
-   StatusCode VKalGetTrkCov(const long int, const long int,dvect& CovMtx);
-
-   StatusCode VKalGetMassError( std::vector<int> ListOfTracks , 
-                                double& Mass, double& MassError);
-      
-   void setApproximateVertex(double,double,double);
-   void setMassForConstraint(double);
-   void setMassForConstraint(double,std::vector<int>);
-   void setRobustness(int);
-   void setCnstType(int);
-   void setIterations(int, double);
-   void setVertexForConstraint(double,double,double);
-   void setCovVrtForConstraint(double,double,double,
-                               double,double,double);
-   void setMassInputParticles( std::vector<double>& );
-   void setMomCovCalc(int);
-   void setDefault();
-   void setZeroCharge(int);
-   void setAthenaField(MagField::IMagFieldSvc *);
-   void setAthenaField(const double);
-
-   //
-   //  Public functions not in interface
-   // 
-
-private:
-
-   int m_FitStatus;    /* Fit Status flag*/
-   /* =0 - no fit. All "after fit" routines fail*/
-   /* >1 - good fit. "After fit" routines work*/
-
-   int m_PropagatorType; /* type of propagator used for fit. VKalVrtCore definition */
-   /* =0 - constant field propagator from VKalVrtCore         */
-   /* =1 - Runge-Kutta propagator from VKalVrtCore            */
-   /* =3 - external propagator accessed via VKalExtPropagator (not used)*/
-
-
-   double m_BMAG;       /* Magnetic field*/
-   double m_CNVMAG;     /* conversion constant for MeV and MM */
-   long int m_ifcovv0;
-   long int m_iflag;
-
-   SimpleProperty<int>    m_Robustness;
-   SimpleProperty<int>    m_Constraint;
-   SimpleProperty<int>    m_CalcMomCovariance;
-   SimpleProperty<double> m_MassForConstraint;
-   SimpleProperty<int>    m_IterationNumber;
-   SimpleProperty<double> m_IterationPrecision;
-   SimpleProperty< std::vector< double > > m_CovVrtForConstraintProp;
-   SimpleProperty< std::vector< double > > m_MassInputParticlesProp;
-   SimpleProperty< std::vector< double > > m_ApproximateVertexProp;
-
-
-   ServiceHandle<MagField::IMagFieldSvc> m_magFieldAthenaSvc;                //Athena magnetic field 
- 
-
-   std::vector<double>    m_MassInputParticles;
-   std::vector<double>    m_VertexForConstraint;
-   std::vector<double>    m_CovVrtForConstraint;
-   std::vector<double>    m_ApproximateVertex;
-   std::vector<int>       m_TrackCharge;
-   std::vector<double>    m_PartMassCnst;
-   std::vector< std::vector<int> >    m_PartMassCnstTrk;
-   //
-   // Arrays needed for fitting kernel
-   //
-   long int m_ich[NTRMAXTRIG];
-   double m_chi2tr[NTRMAXTRIG];
-   double m_par0[NTRMAXTRIG][3];
-   double m_apar[NTRMAXTRIG][5];
-   double m_awgt[NTRMAXTRIG][15];
-   double m_parfs[NTRMAXTRIG][3];
-   double m_wm[NTRMAXTRIG];
-   double m_VrtCst[3];
-   double m_CovVrtCst[6];
-   //
-   //  Very local variables
-   //
-   //      double m_loc_xyzfit[3];
-   //      double m_loc_ptot[4];
-   //      double m_loc_covf[21];
-   //      double m_loc_chi2f;
-
-
-   TrigAtlasMagFld *  m_fitField;
-   Trk::VKalVrtControl  *  m_vkalFitControl;
-   Trk::ForCFT      m_coreFit;
-   //      
-   // Private functions (technicalities)
-   //
-   StatusCode CvtTrigTrack(const std::vector<const TrigInDetTrack*>& list,
-                           long int& ntrk);
-
-   void    VKalVrtSetOptions(long int NInputTracks);
-
-   void    VKalToTrkTrack( double  , double  , double ,
-                           double& , double& , double& );
-
-   long int VKalVrtFit3( long int ntrk, Amg::Vector3D& Vertex, CLHEP::HepLorentzVector&   Momentum,
-                         long int& Charge, dvect& ErrorMatrix, dvect& Chi2PerTrk, 
-                         std::vector< std::vector<double> >& TrkAtVrt, double& Chi2 );
-
-   long int VKalVrtFit2(long int ntrk, Amg::Vector3D& Vertex, dvect& ErrorMatrix,double& Chi2 );
-
-   long int VKalVrtFit1(long int ntrk, dvect& FitResult); 
-
-public:
-   virtual StatusCode initialize();
-
-//
-// Array for full error matrix
-//
-   double * m_ErrMtx;
-
-};
-
-#endif
diff --git a/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/VKalVrtAtlas.h b/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/VKalVrtAtlas.h
deleted file mode 100755
index 34b6ed27bcc430ca5e5df4af3419959b4be3ed30..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/TrigVKalFitter/VKalVrtAtlas.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// VKalVrtAtlas.h
-//
-#ifndef _TrigVKalAthena_TrigVKalAtlas_H
-#define _TrigVKalAthena_TrigVKalAtlas_H
-
-// Mag field service
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include  "TrkVKalVrtCore/VKalVrtBMag.h"
-// External propagator
-#include "TrkVKalVrtCore/Propagator.h"
-//#include "TrkExInterfaces/IExtrapolator.h"
-
-//  ATLAS magnetic field access for TrkVKalVrtCore
-//-------------------------------------------------
-
-  class TrigAtlasMagFld : public Trk::baseMagFld  {
-    public:
-
-       TrigAtlasMagFld();
-      ~TrigAtlasMagFld();
-       void getMagFld(const double,const double,const double,double&,double&,double&) const;
-       void setAtlasMag( MagField::IMagFieldSvc * );
-       void setAtlasMag(const double );
-
-    private:
-    
-       //MagFieldAthena* m_VKalAthenaField;                 //VK Old field
-       MagField::IMagFieldSvc*  m_VKalAthenaField;
-       double m_FIXED_ATLAS_FIELD;
-   
-   };
-
-
-#endif
diff --git a/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h b/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h
deleted file mode 100644
index 6eaf0b6266a3ceade9f5401c0ac2b8c40a943080..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-/**
-@page TrigVKalFitter_page TrigVKalFitter Package
-
-Collection of trigger related interfaces to VKalVrt core. 
-
-@author Vadim.Kostyukhin@cern.ch
-
-@section TrigVKalFitter_TrigVKalFitterIntro Introduction
-
-This package contains  interfaces to VKalVrt. 
-
-@section TrigVKalFitter_TrigVKalFitterOverview Class Overview
-
-  
- Some description of algorithms may be found in http://kostyuk.home.cern.ch/kostyuk/vertex/ and
- references inside.
- Software related issues may be viewed in
- https://twiki.cern.ch/twiki/bin/view/Atlas/VKalVrt .
-  
-
-
-*/
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/CvtTrigTrack.cxx b/Trigger/TrigTools/TrigVKalFitter/src/CvtTrigTrack.cxx
deleted file mode 100755
index 87c1f90240c0577830409a810b1cce0a629a2e7c..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/CvtTrigTrack.cxx
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigVKalFitter/TrigVKalFitter.h"
-#include "TrigInDetEvent/TrigInDetTrack.h"
-#include "TrigInDetEvent/TrigInDetTrackFitPar.h"
-//-------------------------------------------------
-#include <iostream> 
-#include <cmath>
-
-//--------------------------------------------------------------------
-//  Extract TrigInDetTrack
-//
-
- StatusCode TrigVKalFitter::CvtTrigTrack(const std::vector<const TrigInDetTrack*>& InpTrk,
-        long int& ntrk) {
-
-    std::vector<const TrigInDetTrack*>::const_iterator   i_ntrk;
-    int i,j,ipnt,ii,jj;
-    const TrigInDetTrackFitPar* mPer;
-    double CovI[5][5];
-    double A0Vert,ZVert,PhiVert,ThetaVert,PtVert,EtaVert,ct;
-    const std::vector<double>* TrigTrkErr;
-    double Deriv[5][5] ={{0.,0.,0.,0.,0.},{0.,0.,0.,0.,0.},{0.,0.,0.,0.,0.},
-                                          {0.,0.,0.,0.,0.},{0.,0.,0.,0.,0.}};
-//std::cout.setf( std::ios::scientific); std::cout.precision(6);
-
-    for (i_ntrk = InpTrk.begin(); i_ntrk < InpTrk.end(); ++i_ntrk) {
-//
-//-- MeasuredPerigee in TrigInDetTrack
-//
-       mPer = (*i_ntrk)->param();
-       if( mPer == 0 ){ continue; } 
-       TrigTrkErr = mPer->cov(); 
-//
-
-       A0Vert    = mPer->a0() ;
-       if( !std::isfinite(A0Vert) )     return StatusCode::FAILURE;
-       ZVert     = mPer->z0() ;
-       if( !std::isfinite(ZVert) )      return StatusCode::FAILURE;
-       PhiVert   = mPer->phi0();
-       if( !std::isfinite(PhiVert) )    return StatusCode::FAILURE;
-       if(PhiVert>3.14159265358979) PhiVert-=2.*3.14159265358979;
-       EtaVert   = mPer->eta(); 
-       if( !std::isfinite(EtaVert) )    return StatusCode::FAILURE;
-       ThetaVert = 2.0*atan(exp(-EtaVert)); 
-       PtVert    = mPer->pT();
-       if( !std::isfinite(PtVert) )     return StatusCode::FAILURE;
-
-//std::cout<<" A0="<<A0Vert<<", ZV="<<ZVert<<", Phi="<<PhiVert<<", Eta="<<EtaVert<<"  Pt="<<PtVert<<'\n';
-
-       m_apar[ntrk][0]= -A0Vert;
-       m_apar[ntrk][1]=  ZVert;
-       m_apar[ntrk][2]=  ThetaVert;
-       m_apar[ntrk][3]=  PhiVert;
-       m_apar[ntrk][4]= -m_CNVMAG*m_BMAG/PtVert;
-       m_ich[ntrk]    =  PtVert > 0 ? -1 : 1;
-
-                    /* a0,phi,Z,eta,pt - order */
-/* Order of matrix element in vector: 00,01,02,03,04,11,12,13,14,22,23,24,33,34,44 */
-/*                                     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 */ 
-	
-       if( TrigTrkErr != 0) {
-         CovI[0][0] =              (*TrigTrkErr)[0];
-
-         CovI[1][0] = CovI[0][1] = (*TrigTrkErr)[1];
-         CovI[1][1] =              (*TrigTrkErr)[5];
-
-         CovI[0][2] = CovI[2][0] = (*TrigTrkErr)[2];
-         CovI[1][2] = CovI[2][1] = (*TrigTrkErr)[6];
-         CovI[2][2] =              (*TrigTrkErr)[9]; 
-
-         CovI[0][3] = CovI[3][0] = (*TrigTrkErr)[3];
-         CovI[1][3] = CovI[3][1] = (*TrigTrkErr)[7];
-         CovI[2][3] = CovI[3][2] = (*TrigTrkErr)[10]; 
-         CovI[3][3] =              (*TrigTrkErr)[12]; 
-
-         CovI[0][4] = CovI[4][0] = (*TrigTrkErr)[4];
-         CovI[1][4] = CovI[4][1] = (*TrigTrkErr)[8];
-         CovI[2][4] = CovI[4][2] = (*TrigTrkErr)[11];
-         CovI[3][4] = CovI[4][3] = (*TrigTrkErr)[13];
-         CovI[4][4] =              (*TrigTrkErr)[14];
-       } else {
-         CovI[0][0] =               mPer->ea0()*mPer->ea0();
-
-         CovI[1][0] = CovI[0][1] =  0.;
-         CovI[1][1] =               mPer->ephi0()*mPer->ephi0();
-
-         CovI[0][2] = CovI[2][0] =  0.;
-         CovI[1][2] = CovI[2][1] =  0.;
-         CovI[2][2] =               mPer->ez0()*mPer->ez0();
-
-         CovI[0][3] = CovI[3][0] =  0.;
-         CovI[1][3] = CovI[3][1] =  0.;
-         CovI[2][3] = CovI[3][2] =  0.; 
-         CovI[3][3] =               mPer->eeta()*mPer->eeta(); 
-
-         CovI[0][4] = CovI[4][0] =  0.;
-         CovI[1][4] = CovI[4][1] =  0.;
-         CovI[2][4] = CovI[4][2] =  0.;
-         CovI[3][4] = CovI[4][3] =  0.;
-         CovI[4][4] =               mPer->epT()*mPer->epT();
-       }
-
-       for(i=0; i<5; i++){ for(j=0; j<=i; j++){  if ( !std::isfinite(CovI[i][j]) ) return StatusCode::FAILURE;}}
-
-//std::cout<<CovI[0][0]<<", "<<CovI[1][0]<<", "<<CovI[1][1]<<", "<<TrigTrkErr<<'\n';
-//std::cout<<mPer->ephi0()<<", "<<mPer->ephi0()<<", "<<mPer->ea0()<<", "<<mPer->ez0()<<'\n';
-       if(CovI[0][0] < 1.e-30) CovI[0][0] = 1.0e-4;                 // 100mkm   A0
-       if(CovI[1][1] < 1.e-30) CovI[2][2] = 3.0e-4;                 // 1deg   phi
-       if(CovI[2][2] < 1.e-30) CovI[1][1] = 4.0e-4;                 // 200mkm   Z
-       if(CovI[3][3] < 1.e-30) CovI[3][3] = 1.0e-4;                 // 0.01   eta
-       if(CovI[4][4] < 1.e-30) CovI[4][4] = 1.0e-4*std::pow(PtVert,4);   // 0.01*Pt²  Pt error
-
-           /* D(new)/D(old) */
-
-       Deriv[0][0] = -1.;
-       Deriv[1][2] =  1.;
-       Deriv[2][3] = -2.* exp(-EtaVert)/(exp(-2.*EtaVert)+1.);
-       Deriv[3][1] =  1.; 
-       Deriv[4][4] = -m_CNVMAG*m_BMAG/PtVert/PtVert;
-
-       ipnt=0;
-       for(i=0;i<5;i++){ for(j=0;j<=i;j++){
-         ct=0.;
-         for(ii=0;ii<5;ii++){
-	   if(Deriv[i][ii] == 0.) continue;
-           for(jj=0;jj<5;jj++){ 
-	     if(Deriv[j][jj] == 0.) continue;
-	     ct += CovI[ii][jj]*Deriv[i][ii]*Deriv[j][jj];};};
-         m_awgt[ntrk][ipnt++]=ct;
-       };}
-
-//
-       ntrk++; if(ntrk>=NTRMAXTRIG) return StatusCode::FAILURE;
-    }
-    return StatusCode::SUCCESS;
-  }
-
-
-  TrigInDetTrack* TrigVKalFitter::CreateTrigTrack( const std::vector<double>& VKPerigee,
-                                               const std::vector<double>& VKCov)
-   {
-     double TrkP0, TrkP1, TrkP2, TrkP3, TrkP4, Theta;
-     TrkP0=-VKPerigee[0];           /*!!!! Change of sign !!!!*/
-     TrkP1= VKPerigee[1];
-     TrkP2= VKPerigee[3];                               /* phi */
-     Theta= VKPerigee[2];
-     TrkP3=-log(tan(Theta/2));
-     TrkP4= (m_CNVMAG*m_BMAG)/ VKPerigee[4];       /* Pt */
-     TrkP4=-TrkP4;                      /*!!!! Change of sign of charge!!!!*/
-
- 
-     double Deriv[5][5],CovMtxOld[5][5],CovMtx[5][5];
-     int i,j,ik,jk;
-     for(i=0;i<5;i++){ for(j=0;j<5;j++) {Deriv[i][j]=0.; CovMtxOld[i][j]=0.;}}
-     Deriv[0][0]=-1.;
-     Deriv[1][3]= 1.;
-     Deriv[2][1]= 1.;
-     Deriv[3][2]=-1./sin(Theta);
-     Deriv[4][4]= (m_CNVMAG*m_BMAG) / (VKPerigee[4]*VKPerigee[4]);
- 
-     CovMtxOld[0][0]                =VKCov[0];
-     CovMtxOld[0][1]=CovMtxOld[1][0]=VKCov[1];
-     CovMtxOld[1][1]                =VKCov[2];
-     CovMtxOld[0][2]=CovMtxOld[2][0]=VKCov[3];
-     CovMtxOld[1][2]=CovMtxOld[2][1]=VKCov[4];
-     CovMtxOld[2][2]                =VKCov[5];
-     CovMtxOld[0][3]=CovMtxOld[3][0]=VKCov[6];
-     CovMtxOld[1][3]=CovMtxOld[3][1]=VKCov[7];
-     CovMtxOld[2][3]=CovMtxOld[3][2]=VKCov[8];
-     CovMtxOld[3][3]                =VKCov[9];
-     CovMtxOld[0][4]=CovMtxOld[4][0]=VKCov[10];
-     CovMtxOld[1][4]=CovMtxOld[4][1]=VKCov[11];
-     CovMtxOld[2][4]=CovMtxOld[4][2]=VKCov[12];
-     CovMtxOld[3][4]=CovMtxOld[4][3]=VKCov[13];
-     CovMtxOld[4][4]                =VKCov[14];
- 
-     for(i=0;i<5;i++){
-      for(j=i;j<5;j++){
-        CovMtx[i][j]=0.;
-        for(ik=0;ik<5;ik++){
-         for(jk=0;jk<5;jk++){
-            CovMtx[i][j] += Deriv[i][ik]*CovMtxOld[ik][jk]*Deriv[j][jk];
-        }}
-     }}
- 
-     std::vector<double>* Ncov = new std::vector<double>;
-     (*Ncov).clear();
-     (*Ncov).push_back(CovMtx[0][0]);
-     (*Ncov).push_back(CovMtx[0][1]);
-     (*Ncov).push_back(CovMtx[1][1]);
-     (*Ncov).push_back(CovMtx[0][2]);
-     (*Ncov).push_back(CovMtx[1][2]);
-     (*Ncov).push_back(CovMtx[2][2]);
-     (*Ncov).push_back(CovMtx[0][3]);
-     (*Ncov).push_back(CovMtx[1][3]);
-     (*Ncov).push_back(CovMtx[2][3]);
-     (*Ncov).push_back(CovMtx[3][3]);
-     (*Ncov).push_back(CovMtx[0][4]);
-     (*Ncov).push_back(CovMtx[1][4]);
-     (*Ncov).push_back(CovMtx[2][4]);
-     (*Ncov).push_back(CovMtx[3][4]);
-     (*Ncov).push_back(CovMtx[4][4]);
-
-
-      TrigInDetTrackFitPar* NewTrackPar =new TrigInDetTrackFitPar(TrkP0, TrkP2, TrkP1, TrkP3, TrkP4,  Ncov);
-      TrigInDetTrackFitPar* NewTrackParEnd =0; 
-
-      return new TrigInDetTrack( NewTrackPar, NewTrackParEnd, 10.); 
-   }
-   
-   
-   
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/SetFitOptions.cxx b/Trigger/TrigTools/TrigVKalFitter/src/SetFitOptions.cxx
deleted file mode 100755
index b456ca4b250be7763635abe7ba894d8aa9d703df..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/SetFitOptions.cxx
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigVKalFitter/TrigVKalFitter.h"
-//-------------------------------------------------
-#include "GaudiKernel/MsgStream.h"
-#include<iostream>
-
-
-//
-// Option setting for VKalVrt core
-//
-void TrigVKalFitter::VKalVrtSetOptions(long int ntrk)
-{ 
-
-   m_FitStatus = 0;     // Drop all previous fit results
-
-   double MFit    = (double) (m_MassForConstraint);
-   long int Rob  = (long int) m_Robustness;
-   //---
-   int i,j;
-   double SumMass = 0;
-   for(i=0; i<ntrk; i++){
-      if(i<(int)m_MassInputParticles.size()){
-         m_wm[i]  = (double)(m_MassInputParticles[i]);
-         SumMass +=   m_wm[i];      
-      }
-      else {m_wm[i]=(double)(139.5702);}
-   }
-   if ( MFit>0 && MFit < SumMass ) MFit=SumMass+1.e-4;
-   //---
-   if(m_VertexForConstraint.size() >= 3){
-      for(i=0; i<3; i++){m_VrtCst[i]    =(double)(m_VertexForConstraint[i]);}
-   }else{
-      for(i=0; i<3; i++){m_VrtCst[i]    = 0;}
-   }
-   //---
-   if(m_CovVrtForConstraint.size() >= 6){
-      for(i=0; i<6; i++){m_CovVrtCst[i] =(double)(m_CovVrtForConstraint[i]);}
-   }else{
-      for(i=0; i<6; i++){m_CovVrtCst[i] = 0.;}
-   }
-   //---
-   if(m_TrackCharge.size() > 0){
-      for(i=0; i<(int)m_TrackCharge.size(); i++){ 
-         if(m_TrackCharge[i] < 1   )    continue;
-         if(m_TrackCharge[i] > ntrk)    continue;
-         j=m_TrackCharge[i]-1;
-         //   std::cout<<" Set charge "<<i<<", "<<m_apar[j][4]<<'\n';
-         m_ich[j]=0;
-         if(m_apar[j][4]<0){ m_apar[j][4] =-m_apar[j][4];      // Charge=0 is always equal to Charge=+1
-            m_awgt[j][10]=-m_awgt[j][10];
-            m_awgt[j][11]=-m_awgt[j][11];
-            m_awgt[j][12]=-m_awgt[j][12];
-            m_awgt[j][13]=-m_awgt[j][13]; }
-      }
-      m_TrackCharge.clear();
-   }
-   //---
-   m_coreFit.prcfit(&ntrk,m_wm,&MFit,&m_BMAG,m_VrtCst,m_CovVrtCst);
-   //---
-   //   Additional change of settings 
-   //---
-   long int Index[NTRMAXTRIG];
-   if(m_PartMassCnst.size() > 0) {
-      for(int ic=0; ic<(int)m_PartMassCnst.size(); ic++){ 
-         long int NTrk=m_PartMassCnstTrk[ic].size();
-         for(int it=0; it<NTrk; it++) Index[it]=m_PartMassCnstTrk[ic][it];
-         double CnstMass= (double) m_PartMassCnst[ic];
-         m_coreFit.setmasscnst_(&NTrk,Index,&CnstMass);
-      }
-   }
-   //---
-   if(m_IterationNumber > 0) {
-      m_coreFit.vksetIterationNum(int(m_IterationNumber));
-   }
-   //---
-   if(m_IterationPrecision > 0.) {
-      m_coreFit.vksetIterationPrec(double(m_IterationPrecision));
-   }
-   //---
-   if(m_Robustness > 0) m_coreFit.vksetRobustness( Rob );
-
-}
-
-
-
-void TrigVKalFitter::setApproximateVertex(double X,double Y,double Z)
-{  m_ApproximateVertex.clear();
-   m_ApproximateVertex.push_back(X);
-   m_ApproximateVertex.push_back(Y);
-   m_ApproximateVertex.push_back(Z);
-}
-
-void TrigVKalFitter::setRobustness(int IROB)
-{ m_Robustness = IROB;}
-
-void TrigVKalFitter::setCnstType(int TYPE)
-{ m_iflag = TYPE;
-   if(m_iflag<0)m_iflag=0;
-   if(m_iflag>8)m_iflag=0;
-}
-
-void TrigVKalFitter::setMassForConstraint(double MASS)
-{ m_MassForConstraint = MASS;}
-
-void TrigVKalFitter::setMassForConstraint(double MASS, std::vector<int> TrkIndex)
-{  
-   m_PartMassCnst.push_back(MASS);
-   m_PartMassCnstTrk.push_back(std::move(TrkIndex));
-}
-
-void TrigVKalFitter::setMomCovCalc(int TYPE)
-{ m_ifcovv0 = abs(TYPE);}
-
-void TrigVKalFitter::setIterations(int Num, double Prec)
-{
-   m_IterationNumber    = Num;
-   m_IterationPrecision = Prec;
-}
-
-void TrigVKalFitter::setVertexForConstraint(double X,double Y,double Z)
-{
-   m_VertexForConstraint.clear();
-   m_VertexForConstraint.push_back(X);
-   m_VertexForConstraint.push_back(Y);
-   m_VertexForConstraint.push_back(Z);
-}
-
-void TrigVKalFitter::setCovVrtForConstraint(double XX,double XY,double YY,
-                                            double XZ,double YZ,double ZZ)
-{
-   m_CovVrtForConstraint.clear();
-   m_CovVrtForConstraint.push_back(XX);			  
-   m_CovVrtForConstraint.push_back(XY);			  
-   m_CovVrtForConstraint.push_back(YY);			  
-   m_CovVrtForConstraint.push_back(XZ);			  
-   m_CovVrtForConstraint.push_back(YZ);			  
-   m_CovVrtForConstraint.push_back(ZZ);
-}			  
-
-void TrigVKalFitter::setMassInputParticles( std::vector<double>& mass)
-{
-   m_MassInputParticles.clear();
-   for(int i=0; i<(int)mass.size(); i++) m_MassInputParticles.push_back(fabs(mass[i]));
-}
-
-void TrigVKalFitter::setZeroCharge(int Track)
-{
-   m_TrackCharge.push_back(Track);
-}
-
-
-void TrigVKalFitter::setDefault()
-{
-   //   std::cout<<" In"<<'\n';
-   setApproximateVertex(0.,0.,0.);
-   setRobustness(0);
-   setMassForConstraint(0.);
-   setVertexForConstraint(0.,0.,0.);
-   setCovVrtForConstraint(1.e6,0.,1.e6,0.,0.,1.e6);
-   m_MassInputParticles.clear();
-   setCnstType(0);
-   setMomCovCalc(0);
-   m_TrackCharge.clear();
-   m_PartMassCnst.clear();
-   m_PartMassCnstTrk.clear();
-   m_IterationNumber = 0;
-   m_IterationPrecision = 0.;
-}
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/TVKalFitter.cxx b/Trigger/TrigTools/TrigVKalFitter/src/TVKalFitter.cxx
deleted file mode 100755
index 89c8aa1e7ae22b22eb056f75ce97ad4016fa6d45..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/TVKalFitter.cxx
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigVKalFitter/TrigVKalFitter.h"
-#include "TrigVKalFitter/VKalVrtAtlas.h"
-#include "TrkVKalVrtCore/TrkVKalVrtCore.h"
-//-------------------------------------------------
-// Other stuff
-#include "GaudiKernel/MsgStream.h"
-//
-#include<iostream>
-
-
-namespace Trk {
-
-extern void cfpest( int ntrk, double *vrt, long int *Charge, double (*part)[5], double (*par0)[3]);
-extern void xyztrp( long int* Charge, double* vrt, double* Mom, double* CovVrtMom, double BMAG, double* Perig, double* CovPerig);
-
-extern int CFit(VKalVrtControl *FitCONTROL, int ifCovV0, int NTRK, 
-	      long int *ich, double xyz0[3], double (*par0)[3],
-	      double (*inp_Trk5)[5], double (*inp_CovTrk5)[15], 
-	      double xyzfit[3], double (*parfs)[3], double ptot[4],
-              double covf[21], double & chi2, double *chi2tr);
-  // extern   int CFit(long int iflag, long int ifCovV0, long int NTRK, 
-  //          long int *ich, double *xyz0, double *par0,
-  //          double *inp_Trk5, double *inp_CovTrk5, 
-  //          double *xyzfit, double *parfs, double *ptot,
-  //          double *covf, double *chi2, double *chi2tr);
-  //
-  // extern void cfpest( long int* ntrk, double* vrt, long int* Charge,double* part, double* par0);
-  // extern void xyztrp( long int* Charge, double* Vertex, double* Mom,
-  //              double* CovVrtMom, double* Perig, double* CovPerig);
-
-}
-
-//
-//Constructor-------------------------------------------------------------- 
-TrigVKalFitter:: TrigVKalFitter(const std::string& type,
-                                const std::string& name,
-                                const IInterface* parent):
-   AthAlgTool(type,name,parent),
-   m_Robustness(0),
-   m_Constraint(0),
-   m_CalcMomCovariance(0),
-   m_MassForConstraint(0.),
-   m_magFieldAthenaSvc("AtlasDefault", name), m_coreFit()            //Athena magnetic field
-{
-   //
-   // Declare additional interface
-   //
-   declareInterface<ITrigVKalFitter>(this);
-   //
-   // Properties
-   //
-   m_BMAG=1.997;      /*ATLAS magnetic field*/
-   m_CNVMAG  = 0.29979246;  /* conversion constant for CLHEP::MeV and MM */
-
-   m_VertexForConstraint.clear();
-   for( int i=0; i<3; i++){m_VertexForConstraint.push_back(0.);}
-   m_CovVrtForConstraint.clear();
-   for( int i=0; i<6; i++){m_CovVrtForConstraint.push_back(0.);}
-   m_MassInputParticles.clear();
-   m_ApproximateVertex.clear();
-   m_TrackCharge.clear();
-
-   declareProperty("baseMagField", m_BMAG);
-   declareProperty("Robustness",   m_Robustness);
-   declareProperty("Constraint",   m_Constraint);
-   declareProperty("MomentumCovariance",   m_CalcMomCovariance);
-   declareProperty("MassForConstraint",    m_MassForConstraint);
-   declareProperty("IterationNumber",      m_IterationNumber);
-   declareProperty("IterationPrecision",   m_IterationPrecision);
-   declareProperty("VertexForConstraint",  m_VertexForConstraint);
-   declareProperty("CovVrtForConstraint",  m_CovVrtForConstraintProp);
-   declareProperty("InputParticleMasses",  m_MassInputParticlesProp);
-   declareProperty("ApproximateVertex",    m_ApproximateVertexProp);
-   declareProperty("ZeroChgTracks",        m_TrackCharge);
-   declareProperty("AtlasMagFieldSvc",     m_magFieldAthenaSvc, "Name of existing mag.field service. If wrong or non-existing - fixed filed is used");  
-   //
-   //
-   m_iflag=0;
-   m_ifcovv0=0;
-   m_FitStatus=0;
-   m_IterationNumber=0;
-   m_IterationPrecision=0.;
-   VKalVrtSetOptions( 2 );    //Needed for initialisation of the fitting kernel
-
-
-   m_fitField = new TrigAtlasMagFld(); 
-}
-
-
-//Destructor---------------------------------------------------------------
-TrigVKalFitter::~TrigVKalFitter(){
-   ATH_MSG_DEBUG("TrigVKalFitter destructor called");
-   delete m_fitField;
-}
-
-
-StatusCode
-TrigVKalFitter::initialize() {
-   const std::vector< double > &  prop = m_CovVrtForConstraintProp.value();
-   m_CovVrtForConstraint.clear();
-   for( unsigned int i=0; i<prop.size(); i++) {
-      m_CovVrtForConstraint.push_back(prop[i]);
-   }
-
-   const std::vector< double > &  prop2 = m_MassInputParticlesProp.value();
-   m_MassInputParticles.clear();
-   for( unsigned int i=0; i<prop2.size(); i++) {
-      m_MassInputParticles.push_back(prop2[i]);
-   }
-
-   const std::vector< double > &  prop3 = m_ApproximateVertexProp.value();
-   m_ApproximateVertex.clear();
-   for( unsigned int i=0; i<prop3.size(); i++) {
-      m_ApproximateVertex.push_back(prop3[i]);
-   }
-
-   StatusCode sc=m_magFieldAthenaSvc.retrieve(); 
-   if (sc.isFailure() ){ 
-      ATH_MSG_DEBUG("Could not find a valid ATHENA field service.");
-      ATH_MSG_DEBUG("Default constant field is used. B="<<m_BMAG<<" Tesla");
-   }else{ 
-      ATH_MSG_DEBUG("Valid ATHENA field service is retrieved");
-      setAthenaField( &(*m_magFieldAthenaSvc) );  
-   }
-    
-   m_vkalFitControl = new Trk::VKalVrtControl(Trk::VKalVrtControlBase(m_fitField,0,0,0));  // Create main control object
-   
-   return StatusCode::SUCCESS;
-}
-
-
-
-//__________________________________________________________________________
-//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-//                        Interface
-//
-StatusCode TrigVKalFitter::VKalVrtFit(const std::vector<const TrigInDetTrack*>& InpTrk,
-                                      dvect& FitResult) 
-{
-   //
-   //  extract information about selected tracks
-   //
-   long int ntrk=0;  
-   StatusCode sc=CvtTrigTrack(InpTrk,ntrk);
-   if(sc.isFailure())return StatusCode::FAILURE;
-
-   long int ierr = VKalVrtFit1( ntrk, FitResult); 
- 
-   if (ierr) return StatusCode::FAILURE;
-   return StatusCode::SUCCESS;
-}
-
-//
-//     Main code
-//
-long int TrigVKalFitter::VKalVrtFit1(long int ntrk, dvect& FitResult) 
-{
-   //
-   // Variables and arrays needed for fitting kernel
-   //
-   long int ierr;
-   double xyz0[3],xyzfit[3],ptot[4],covf[21],chi2;
-   ptot[0]=ptot[1]=ptot[2]=ptot[3]=0.;
-   xyzfit[0]=xyzfit[1]=xyzfit[2]=0.;
-   //
-   //------  Fit option setting
-   //
-   VKalVrtSetOptions( ntrk );
-   //
-   //------  Fit itself
-   //
-   if(m_ApproximateVertex.size()==3){
-      xyz0[0]=(double)m_ApproximateVertex[0];
-      xyz0[1]=(double)m_ApproximateVertex[1];
-      xyz0[2]=(double)m_ApproximateVertex[2];
-   } else {
-      xyz0[0]=xyz0[1]=xyz0[2]=0.;
-   }
-
-   //Trk::cfpest( &ntrk, xyz0, m_ich, &m_apar[0][0], &m_par0[0][0]);
-   //ierr=Trk::CFit( m_iflag, m_ifcovv0, ntrk,
-   //                m_ich, xyz0, &m_par0[0][0], &m_apar[0][0], &m_awgt[0][0],
-   //	             xyzfit, &m_parfs[0][0], ptot, covf, &chi2, m_chi2tr); 
-
-   Trk::cfpest( ntrk, xyz0, m_ich, m_apar, m_par0);
-   ierr=Trk::CFit( m_vkalFitControl, m_ifcovv0, ntrk, m_ich, xyz0, m_par0, m_apar, m_awgt,
-                    xyzfit, m_parfs, ptot, covf, chi2, m_chi2tr); 
-
-
-
-   FitResult.clear();
-   if(ierr)return ierr;
-    
-   m_FitStatus=ntrk;
-    
-   FitResult.push_back( (double) chi2);
-   FitResult.push_back( (double) xyzfit[0]);
-   FitResult.push_back( (double) xyzfit[1]);
-   FitResult.push_back( (double) xyzfit[2]);
-   FitResult.push_back( (double) covf[0]);
-   FitResult.push_back( (double) covf[1]);
-   FitResult.push_back( (double) covf[2]);
-   FitResult.push_back( (double) covf[3]);
-   FitResult.push_back( (double) covf[4]);
-   FitResult.push_back( (double) covf[5]);
-   return 0;
-}
-
-
-//__________________________________________________________________________
-//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-//                        Interface
-//
-StatusCode TrigVKalFitter::VKalVrtFit(const std::vector<const TrigInDetTrack*>& InpTrk,
-                                      Amg::Vector3D& Vertex,
-                                      CLHEP::HepLorentzVector&   Momentum,
-                                      long int& Charge,
-                                      dvect& ErrorMatrix, 
-                                      dvect& Chi2PerTrk, 
-                                      std::vector< std::vector<double> >& TrkAtVrt,
-                                      double& Chi2 ) 
-{
-   //
-   //------  extract information about selected tracks
-   //
-   long int ntrk=0;
-   StatusCode sc=CvtTrigTrack(InpTrk,ntrk);
-   if(sc.isFailure())return StatusCode::FAILURE;
-
-   long int ierr = VKalVrtFit3( ntrk, Vertex, Momentum, Charge, ErrorMatrix, 
-                                Chi2PerTrk, TrkAtVrt,Chi2 ) ;
-   if (ierr) return StatusCode::FAILURE;
-   return StatusCode::SUCCESS;
-}
-
-
-
-
-//--------------------------------------------------------------------------------------------------
-//  Main code
-//
-long int TrigVKalFitter::VKalVrtFit3( long int ntrk,
-                                      Amg::Vector3D& Vertex,
-                                      CLHEP::HepLorentzVector&   Momentum,
-                                      long int& Charge,
-                                      dvect& ErrorMatrix, 
-                                      dvect& Chi2PerTrk, 
-                                      std::vector< std::vector<double> >& TrkAtVrt,
-                                      double& Chi2 )
-{
-   //
-   //------ Variables and arrays needed for fitting kernel
-   //
-   long int ierr;
-   int i;
-   double xyz0[3],xyzfit[3],ptot[4],covf[21],chi2f;
-   ptot[0]=ptot[1]=ptot[2]=ptot[3]=0.;
-   xyzfit[0]=xyzfit[1]=xyzfit[2]=0.;
-   //
-   //------  Fit option setting
-   //
-   VKalVrtSetOptions( ntrk );
-   //
-   //------  Fit itself
-   //
-   if(m_ApproximateVertex.size()==3){
-      xyz0[0]=(double)m_ApproximateVertex[0];
-      xyz0[1]=(double)m_ApproximateVertex[1];
-      xyz0[2]=(double)m_ApproximateVertex[2];
-   } else {
-      xyz0[0]=xyz0[1]=xyz0[2]=0.;
-   }
-
-   //Trk::cfpest( &ntrk, xyz0, m_ich, &m_apar[0][0], &m_par0[0][0]);
-   //ierr=Trk::CFit( m_iflag, m_ifcovv0, ntrk,
-   //                m_ich, xyz0, &m_par0[0][0], &m_apar[0][0], &m_awgt[0][0],
-   //	               xyzfit, &m_parfs[0][0], ptot, covf, &chi2f, m_chi2tr); 
-   Trk::cfpest( ntrk, xyz0, m_ich, m_apar, m_par0);
-   ierr=Trk::CFit( m_vkalFitControl, m_ifcovv0, ntrk, m_ich, xyz0, m_par0, m_apar, m_awgt,
-                    xyzfit, m_parfs, ptot, covf, chi2f, m_chi2tr); 
-
-   Chi2 = 100000000.;
-   if(ierr)return ierr;
-  
-   m_FitStatus=ntrk;
- 
-   Chi2 = (double) chi2f;
-
-   Vertex << xyzfit[0], xyzfit[1], xyzfit[2];
-   double Px,Py,Pz,Ee,Pt; double pmom[4]; pmom[0]=pmom[1]=pmom[2]=pmom[3]=0;
-   for ( i=0; i<ntrk; i++){
-      Pt = m_CNVMAG*m_BMAG/fabs((double)m_parfs[i][2]);
-      Px = Pt*cos((double)m_parfs[i][1]);
-      Py = Pt*sin((double)m_parfs[i][1]);
-      Pz = Pt/tan((double)m_parfs[i][0]);
-      Ee = sqrt(Px*Px+Py*Py+Pz*Pz+m_wm[i]*m_wm[i]);
-      pmom[0] += Px; pmom[1] += Py; pmom[2] += Pz; pmom[3] += Ee;
-   }
-   //  std::cout<<" M1="<<m_wm[0]<<", "<<m_wm[1]<<'\n';
-   //  std::cout<<" Pmom="<<pmom[0]<<", "<<pmom[1]<<", "<<pmom[2]<<", "<<pmom[3]<<'\n';
-
-   Charge=0; for(i=0; i<ntrk; i++){Charge+=m_ich[i];}
-
-   Momentum.setPx( pmom[0] );
-   Momentum.setPy( pmom[1] );
-   Momentum.setPz( pmom[2] );
-   Momentum.setE(  pmom[3] );
-
-   ErrorMatrix.clear();
-   ErrorMatrix.push_back( (double)  covf[0]);
-   ErrorMatrix.push_back( (double)  covf[1]);
-   ErrorMatrix.push_back( (double)  covf[2]);
-   ErrorMatrix.push_back( (double)  covf[3]);
-   ErrorMatrix.push_back( (double)  covf[4]);
-   ErrorMatrix.push_back( (double)  covf[5]);
-
-   ErrorMatrix.push_back( (double)  covf[6]);
-   ErrorMatrix.push_back( (double)  covf[7]);
-   ErrorMatrix.push_back( (double)  covf[8]);
-   ErrorMatrix.push_back( (double)  covf[9]);
-
-   ErrorMatrix.push_back( (double) covf[10]);
-   ErrorMatrix.push_back( (double) covf[11]);
-   ErrorMatrix.push_back( (double) covf[12]);
-   ErrorMatrix.push_back( (double) covf[13]);
-   ErrorMatrix.push_back( (double) covf[14]);
-
-   ErrorMatrix.push_back( (double) covf[15]);
-   ErrorMatrix.push_back( (double) covf[16]);
-   ErrorMatrix.push_back( (double) covf[17]);
-   ErrorMatrix.push_back( (double) covf[18]);
-   ErrorMatrix.push_back( (double) covf[19]);
-   ErrorMatrix.push_back( (double) covf[20]);
-
-   Chi2PerTrk.clear();
-   for(i=0; i<ntrk; i++){Chi2PerTrk.push_back( (double) m_chi2tr[i]); }
-
-   TrkAtVrt.clear();
-   for(i=0; i<ntrk; i++){
-      std::vector<double> TrkPar(3);
-      VKalToTrkTrack((double)m_parfs[i][0],(double)m_parfs[i][1],(double) m_parfs[i][2],
-                     TrkPar[0],TrkPar[1],TrkPar[2]);
-      TrkAtVrt.push_back( TrkPar );
-   }
-   return 0;
-}
-
-
-
-
-
-
-
-StatusCode TrigVKalFitter::VKalVrtCvtTool(const Amg::Vector3D& Vertex,
-                                          const CLHEP::HepLorentzVector& Momentum,
-                                          const dvect& CovVrtMom,
-                                          const long int& Charge,
-                                          dvect& Perigee,
-                                          dvect& CovPerigee)
-{
-   int i,j,ij;				      
-   double Vrt[3],PMom[4],Cov0[21],Per[5],CovPer[15];
-
-   for(i=0; i<3;  i++) Vrt[i]=Vertex[i];
-   for(i=0; i<3;  i++) PMom[i]=Momentum[i];
-   for(ij=i=0; i<6; i++){
-      for(j=0; j<=i; j++){
-         Cov0[ij]=CovVrtMom[ij];
-         ij++;
-      }
-   }
-
-   long int vkCharge=Charge;
-   Trk::xyztrp( &vkCharge, Vrt, PMom, Cov0, m_BMAG, Per, CovPer);
-
-   Perigee.clear();
-   CovPerigee.clear();
-    
-
-   for(i=0; i<5;  i++) Perigee.push_back((double)Per[i]);
-   for(i=0; i<15; i++) CovPerigee.push_back((double)CovPer[i]);
-
-   //std::cout<<"Perigee V0"<<Per[0]<<", "<<Per[1]<<", "<<Per[2]<<", "<<Per[3]<<", "<<Per[4]<<'\n';
-   //std::cout<<"CovPeri V0"<<CovPer[10]<<", "<<CovPer[11]<<", "<<CovPer[12]<<", "<<CovPer[13]<<", "<<CovPer[14]<<'\n';
-
-   return StatusCode::SUCCESS;
-}
-
-
-void TrigVKalFitter::VKalToTrkTrack( double  vp1, double  vp2, double  vp3,
-                                     double& tp1, double& tp2, double& tp3)
-{
-   tp1= vp2;
-   tp2= vp1;      
-   tp3= vp3 * sin( vp1 ) /(m_CNVMAG*m_BMAG)  ;
-} 
-
-
-StatusCode TrigVKalFitter::VKalGetTrkCov(const long int iTrk,const long int NTrk,
-                                         dvect& CovVrtTrk)
-{
-   if(iTrk<1)       return StatusCode::FAILURE;
-   if(iTrk>NTrk)    return StatusCode::FAILURE;
-   if(!m_FitStatus) return StatusCode::FAILURE;
-
-   int i,j,ik,jk;
-   double ErrMtx[ (3*NTRMAXTRIG+3)*(3*NTRMAXTRIG+4)/2 ] = {0};
-   double CovMtxOld[6][6];
-   double CovMtx   [6][6];
-
-   //long int vkNTrk = NTrk;
-   //int IERR = Trk::fiterm(vkNTrk,ErrMtx); //Real error matrix after fit
-   //if(IERR)       return StatusCode::FAILURE;
-
-   CovVrtTrk.clear();
-
-   CovMtxOld[0][0] =                   ErrMtx[0];
-   CovMtxOld[1][0] = CovMtxOld[0][1] = ErrMtx[1];
-   CovMtxOld[1][1] =                   ErrMtx[2];
-   CovMtxOld[2][0] = CovMtxOld[0][2] = ErrMtx[3];
-   CovMtxOld[2][1] = CovMtxOld[1][2] = ErrMtx[4];
-   CovMtxOld[2][2] =                   ErrMtx[5];
-
-   int pnt = (iTrk*3+1)*iTrk*3/2;
-   CovMtxOld[3][0] = CovMtxOld[0][3] = ErrMtx[pnt];
-   CovMtxOld[3][1] = CovMtxOld[1][3] = ErrMtx[pnt+1];
-   CovMtxOld[3][2] = CovMtxOld[2][3] = ErrMtx[pnt+2];
-   CovMtxOld[3][3] =                   ErrMtx[pnt+iTrk*3];
-   pnt = (iTrk*3+1+1)*(iTrk*3+1)/2;
-   CovMtxOld[4][0] = CovMtxOld[0][4] = ErrMtx[pnt];
-   CovMtxOld[4][1] = CovMtxOld[1][4] = ErrMtx[pnt+1];
-   CovMtxOld[4][2] = CovMtxOld[2][4] = ErrMtx[pnt+2];
-   CovMtxOld[4][3] = CovMtxOld[3][4] = ErrMtx[pnt+iTrk*3];
-   CovMtxOld[4][4] =                   ErrMtx[pnt+iTrk*3+1];
-   pnt = (iTrk*3+2+1)*(iTrk*3+2)/2;
-   CovMtxOld[5][0] = CovMtxOld[0][5] = ErrMtx[pnt];
-   CovMtxOld[5][1] = CovMtxOld[1][5] = ErrMtx[pnt+1];
-   CovMtxOld[5][2] = CovMtxOld[2][5] = ErrMtx[pnt+2];
-   CovMtxOld[5][3] = CovMtxOld[3][5] = ErrMtx[pnt+iTrk*3];
-   CovMtxOld[5][4] = CovMtxOld[4][5] = ErrMtx[pnt+iTrk*3+1];
-   CovMtxOld[5][5] =                   ErrMtx[pnt+iTrk*3+2];
-  
- 
-   double Theta=m_parfs[iTrk-1][0];
-   double Phi  =m_parfs[iTrk-1][1];
-   double invR =m_parfs[iTrk-1][2];
-   double pt=(m_CNVMAG*m_BMAG)/fabs(invR);
-   double px=pt*cos(Phi);
-   double py=pt*sin(Phi);
-   double pz=pt/tan(Theta);
-    
-   //    std::cout<<"Phi="<<Phi<<", Theta="<<Theta<<'\n';
-   
-   double Deriv[6][6];
-   for(i=0;i<6;i++){ for(j=0;j<6;j++) {Deriv[i][j]=0.;}}
-   Deriv[0][0]= 1.;
-   Deriv[1][1]= 1.;
-   Deriv[2][2]= 1.;
-
-   Deriv[3][3]=   0;                           //dPx/dTheta
-   Deriv[3][4]= -py;                           //dPx/dPhi
-   Deriv[3][5]= -px/invR;                      //dPx/dinvR
-
-   Deriv[4][3]=   0;                           //dPy/dTheta
-   Deriv[4][4]=  px;                           //dPy/dPhi
-   Deriv[4][5]= -py/invR;                      //dPy/dinvR
-
-   Deriv[5][3]= -pt/sin(Theta)/sin(Theta);     //dPz/dTheta
-   Deriv[5][4]=   0;                           //dPz/dPhi
-   Deriv[5][5]= -pz/invR;                      //dPz/dinvR
-   //----------
-   for(i=0;i<6;i++){
-      for(j=i;j<6;j++){
-         CovMtx[i][j]=0.;
-         for(ik=0;ik<6;ik++){
-            for(jk=0;jk<6;jk++){
-               CovMtx[i][j] += Deriv[i][ik]*CovMtxOld[ik][jk]*Deriv[j][jk];
-            }}
-      }}
-
-   CovVrtTrk.push_back(CovMtx[0]  [0]);
-   CovVrtTrk.push_back(CovMtx[0]  [1]);
-   CovVrtTrk.push_back(CovMtx[1]  [1]);
-   CovVrtTrk.push_back(CovMtx[0]  [2]);
-   CovVrtTrk.push_back(CovMtx[1]  [2]);
-   CovVrtTrk.push_back(CovMtx[2]  [2]);
-   CovVrtTrk.push_back(CovMtx[0]  [3]);
-   CovVrtTrk.push_back(CovMtx[1]  [3]);
-   CovVrtTrk.push_back(CovMtx[2]  [3]);
-   CovVrtTrk.push_back(CovMtx[3]  [3]);
-   CovVrtTrk.push_back(CovMtx[0]  [4]);
-   CovVrtTrk.push_back(CovMtx[1]  [4]);
-   CovVrtTrk.push_back(CovMtx[2]  [4]);
-   CovVrtTrk.push_back(CovMtx[3]  [4]);
-   CovVrtTrk.push_back(CovMtx[4]  [4]);
-   CovVrtTrk.push_back(CovMtx[0]  [5]);
-   CovVrtTrk.push_back(CovMtx[1]  [5]);
-   CovVrtTrk.push_back(CovMtx[2]  [5]);
-   CovVrtTrk.push_back(CovMtx[3]  [5]);
-   CovVrtTrk.push_back(CovMtx[4]  [5]);
-   CovVrtTrk.push_back(CovMtx[5]  [5]);
-
-   return StatusCode::SUCCESS;
-
-}
-
-StatusCode TrigVKalFitter::VKalGetMassError( std::vector<int> ListOfTracks , double& dM, double& MassError)
-{    
-   if(!m_FitStatus) return StatusCode::FAILURE;
-   if((int) ListOfTracks.size() != m_FitStatus) return StatusCode::FAILURE;
-
-   dM        = m_vkalFitControl->getVertexMass();
-   MassError = m_vkalFitControl->getVrtMassError();
-
-   return StatusCode::SUCCESS;
-}
-  
-  
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/TVKalFitterFast.cxx b/Trigger/TrigTools/TrigVKalFitter/src/TVKalFitterFast.cxx
deleted file mode 100755
index 25f0044ce8e0df04aa9fa0eba50bacbe8f873c4f..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/TVKalFitterFast.cxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigVKalFitter/TrigVKalFitter.h"
-//-------------------------------------------------
-//
-#include<iostream>
-#include<list>
-namespace Trk {
- extern void vkvfast_( double* , double* , double* , double*);
-}
-//
-//__________________________________________________________________________
-
-  StatusCode TrigVKalFitter::VKalVrtFitFast(const std::vector<const  TrigInDetTrack*>& InpTrk,
-                                            Amg::Vector3D& Vertex) {
-//
-//------ Variables and arrays needed for fitting kernel
-//
-    double out[3];
-    int i,j;
-    std::list<double> xx,yy,zz;
-    Vertex<<0.,0.,0.;
-//
-//------  extract information about selected tracks
-//
-    long int ntrk=0; 
-    StatusCode sc = CvtTrigTrack(InpTrk,ntrk);
-    if(sc.isFailure()) return StatusCode::FAILURE; 
-    if(ntrk<1)         return StatusCode::FAILURE;
-    if(ntrk==2){	 
-    Trk::vkvfast_(&m_apar[0][0],&m_apar[1][0],&m_BMAG,out);
-    } else {
-      for( i=0;      i<ntrk-1; i++){
-	 for( j=i+1; j<ntrk;   j++){
-            Trk::vkvfast_(&m_apar[i][0],&m_apar[j][0],&m_BMAG,out);
-	    xx.push_back(out[0]);
-	    yy.push_back(out[1]);
-	    zz.push_back(out[2]);
-	  }
-	}
-	int n=xx.size();
-	xx.sort(); yy.sort(); zz.sort();
-
-	std::list<double>::iterator it1,it2;
-	it1=it2=xx.begin();
-	for(i=0; i<((n+1)/2); i++,it1++){}; for(i=0; i<(n/2+1);i++,it2++){};
-	out[0]=0.5*( (*it1) + (*it2) );
-		
-	it1=it2=yy.begin();
-	for(i=0; i<((n+1)/2); i++,it1++){}; for(i=0; i<(n/2+1);i++,it2++){};
-	out[1]=0.5*( (*it1) + (*it2) );
-
-	it1=it2=zz.begin();
-	for(i=0; i<((n+1)/2); i++,it1++){}; for(i=0; i<(n/2+1);i++,it2++){};
-	out[2]=0.5*( (*it1) + (*it2) );
-
-    }
-    Vertex<< out[0], out[1], out[2];
-
-
-    return StatusCode::SUCCESS;
-  }
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/TVKalGetImpact.cxx b/Trigger/TrigTools/TrigVKalFitter/src/TVKalGetImpact.cxx
deleted file mode 100755
index fead70b5c65b760a010b6b44f4cc5b13214c1adb..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/TVKalGetImpact.cxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigVKalFitter/TrigVKalFitter.h"
-#include "TrigVKalFitter/VKalVrtAtlas.h"
-#include "TrkVKalVrtCore/TrkVKalVrtCore.h"
-//-------------------------------------------------
-//
-#include<iostream>
-
-namespace Trk {
- //extern   
- // void cfimp(long int TrkID, long int  ICH, long int IFL, double* PAR, double* ERR,
- //             double* VRT, double* VCOV,
- //	      double* RIMP, double* RCOV, double*  SIGN);
- extern   
-  void cfimp(long int TrkID, long int  ICH, int IFL, double* PAR, double* ERR,
-              double* VRT, double* VCOV,
-	      double* RIMP, double* RCOV, double*  SIGN, const VKalVrtControlBase * FitCONTROL );
-}
-//
-//__________________________________________________________________________
-//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-
-
-
-  double TrigVKalFitter::VKalGetImpact(const TrigInDetTrack* InpTrk,const Amg::Vector3D& Vertex, const long int Charge,
-                                  std::vector<double>& Impact, std::vector<double>& ImpactError){
-//
-//------ Variables and arrays needed for fitting kernel
-//
-    double VrtInp[3]={Vertex.x(),Vertex.y(),Vertex.z()}; 
-    double VrtCov[6]={0.,0.,0.,0.,0.,0.};
-    double RIMP[5],RCOV[3];
-    double SIGNIF=0.;
-    std::vector<const TrigInDetTrack*> InpTrkList;
-    InpTrkList.push_back(InpTrk);
-//
-//--Preparation
-    Impact.clear(); ImpactError.clear(); 
-//
-//------  extract information about selected tracks
-//
-    long int ntrk=0; 
-    StatusCode sc = CvtTrigTrack(InpTrkList,ntrk);
-    if(sc.isFailure() ) return -9999.0;         //Something is wrong in conversion
-    if(ntrk != 1)       return -9999.0;         //Something is wrong in conversion
-//
-
-    long int vkCharge=Charge;
-    Trk::cfimp( 0, vkCharge, 0, &m_apar[0][0], &m_awgt[0][0], &VrtInp[0], &VrtCov[0], &RIMP[0], &RCOV[0], &SIGNIF,m_vkalFitControl);
-
-    Impact.push_back(RIMP[0]);
-    Impact.push_back(RIMP[1]);
-    Impact.push_back(RIMP[2]);
-    Impact.push_back(RIMP[3]);
-    Impact.push_back(RIMP[4]);
-    ImpactError.push_back(RCOV[0]);
-    ImpactError.push_back(RCOV[1]);
-    ImpactError.push_back(RCOV[2]);
-    return SIGNIF;
-
-  }
-
-
-
-
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/TVKalMagFld.cxx b/Trigger/TrigTools/TrigVKalFitter/src/TVKalMagFld.cxx
deleted file mode 100755
index 9b4720aa2d25636dc1046e6106892b4fd139294d..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/TVKalMagFld.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Header include
-#include "TrigVKalFitter/TrigVKalFitter.h"
-#include "TrigVKalFitter/VKalVrtAtlas.h"
-#include "TrkVKalVrtCore/TrkVKalVrtCore.h"
-//-------------------------------------------------
-#include "CLHEP/Units/SystemOfUnits.h"
-#include<iostream>
-
-
-//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-//                  ATLAS magnetic field access
-  TrigAtlasMagFld::TrigAtlasMagFld(){
-     m_VKalAthenaField=0;
-     m_FIXED_ATLAS_FIELD=1.997;
-  }
-  TrigAtlasMagFld::~TrigAtlasMagFld(){}
-  void TrigAtlasMagFld::setAtlasMag( MagField::IMagFieldSvc *  pnt)
-  {
-     m_VKalAthenaField = pnt; 
-  }
-  void TrigAtlasMagFld::setAtlasMag(const double  field)
-  {   m_FIXED_ATLAS_FIELD = field; }
-  
-  void TrigAtlasMagFld::getMagFld(const double x, const double y, const double z, 
-                                    double &bx, double &by, double &bz) const
-  {   
-      double fieldXYZ[3];  double BField[3];
-      fieldXYZ[0]=x;
-      fieldXYZ[1]=y;
-      fieldXYZ[2]=z;
-      if( m_VKalAthenaField != 0) {
-         m_VKalAthenaField->getField(fieldXYZ,BField); 
-         bx = BField[0]/CLHEP::tesla;
-         by = BField[1]/CLHEP::tesla;   // Field in TESLA!!!!
-         bz = BField[2]/CLHEP::tesla;
-//std::cout<<" Exact mag"<<'\n';
-      }else{
-         bx = 0.;
-         by = 0.;
-         bz = m_FIXED_ATLAS_FIELD;
-//std::cout<<" Fix mag"<<'\n';
-       }
-   }
-//--------------------------------------------------------------------------
-//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-//  Setting interface
-  void TrigVKalFitter::setAthenaField(MagField::IMagFieldSvc*  pnt)
-  {
-     m_fitField->setAtlasMag(pnt);
-     double Bx,By,Bz;
-     m_fitField->getMagFld(0.,0.,0.,Bx,By,Bz);
-     m_fitField->setAtlasMag(Bz);
-  }
-
-  void TrigVKalFitter::setAthenaField(const double  Field)
-  {
-     m_fitField->setAtlasMag( Field );
-  }
diff --git a/Trigger/TrigTools/TrigVKalFitter/src/components/TrigVKalFitter_entries.cxx b/Trigger/TrigTools/TrigVKalFitter/src/components/TrigVKalFitter_entries.cxx
deleted file mode 100644
index cc9f5b8b71e9b2d10d40f5c659dd895966f7907d..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/src/components/TrigVKalFitter_entries.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "TrigVKalFitter/TrigVKalFitter.h"
-
-DECLARE_COMPONENT( TrigVKalFitter )
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
index 9b8991fec9d67eb540cdd28f8b91ba538287f4c3..d4fe1cbdc793a36680455f0b1daec9cd23424e32 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
@@ -1,702 +1,758 @@
-TrigSignatureMoniMT                                INFO HLT_2e17_etcut_L12EM15VH #3136730292
-TrigSignatureMoniMT                                INFO -- #3136730292 Events         2          2          2          2          2          -          -          -          2
-TrigSignatureMoniMT                                INFO -- #3136730292 Features                             12         294        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          -          -
-TrigSignatureMoniMT                                INFO HLT_2e3_etcut_L12EM3 #2613484113
-TrigSignatureMoniMT                                INFO -- #2613484113 Events         20         20         20         20         20         -          -          -          20
-TrigSignatureMoniMT                                INFO -- #2613484113 Features                             342        3682       780        -          -          -
-TrigSignatureMoniMT                                INFO HLT_2g20_tight_L12EM15VH #3837353071
-TrigSignatureMoniMT                                INFO -- #3837353071 Events         2          2          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #3837353071 Features                             0          0          0          0          -          -
-TrigSignatureMoniMT                                INFO HLT_2g35_etcut_L12EM20VH #58053304
-TrigSignatureMoniMT                                INFO -- #58053304 Events           2          2          1          1          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #58053304 Features                               4          4          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_2g35_medium_L12EM20VH #3965466087
-TrigSignatureMoniMT                                INFO -- #3965466087 Events         2          2          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #3965466087 Features                             0          0          0          0          -          -
-TrigSignatureMoniMT                                INFO HLT_2j330_a10t_lcw_jes_35smcINF_L1J100 #1295975955
-TrigSignatureMoniMT                                INFO -- #1295975955 Events         3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1295975955 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_2j60_L1J15 #927735533
-TrigSignatureMoniMT                                INFO -- #927735533 Events          20         20         10         -          -          -          -          -          10
-TrigSignatureMoniMT                                INFO -- #927735533 Features                              28         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu10_bJpsimumu_L12MU10 #3498558358
-TrigSignatureMoniMT                                INFO -- #3498558358 Events         3          3          3          3          3          2          -          -          0
-TrigSignatureMoniMT                                INFO -- #3498558358 Features                             12         12         16         4          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu10_bUpsimumu_L12MU10 #234102568
-TrigSignatureMoniMT                                INFO -- #234102568 Events          3          3          3          3          3          2          -          -          0
-TrigSignatureMoniMT                                INFO -- #234102568 Features                              12         12         16         4          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu14_L12MU10 #2619091790
-TrigSignatureMoniMT                                INFO -- #2619091790 Events         3          3          3          1          1          1          -          -          1
-TrigSignatureMoniMT                                INFO -- #2619091790 Features                             12         4          4          4          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu15_L12MU10 #557204938
-TrigSignatureMoniMT                                INFO -- #557204938 Events          3          3          3          1          1          1          -          -          1
-TrigSignatureMoniMT                                INFO -- #557204938 Features                              12         4          4          4          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu4_bDimu_L12MU4 #1730084172
-TrigSignatureMoniMT                                INFO -- #1730084172 Events         4          4          4          4          4          4          -          -          0
-TrigSignatureMoniMT                                INFO -- #1730084172 Features                             16         16         24         18         -          -
-TrigSignatureMoniMT                                INFO HLT_2mu4_bJpsimumu_L12MU4 #4276347155
-TrigSignatureMoniMT                                INFO -- #4276347155 Events         4          4          4          4          4          4          -          -          0
-TrigSignatureMoniMT                                INFO -- #4276347155 Features                             16         16         24         18         -          -
-TrigSignatureMoniMT                                INFO HLT_2mu4_bUpsimumu_L12MU4 #4008168535
-TrigSignatureMoniMT                                INFO -- #4008168535 Events         4          4          4          4          4          4          -          -          0
-TrigSignatureMoniMT                                INFO -- #4008168535 Features                             16         16         24         18         -          -
-TrigSignatureMoniMT                                INFO HLT_2mu4_muonqual_L12MU4 #1584776935
-TrigSignatureMoniMT                                INFO -- #1584776935 Events         4          4          4          4          4          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1584776935 Features                             16         16         24         36         -          -
-TrigSignatureMoniMT                                INFO HLT_2mu6Comb_L12MU6 #2046267508
-TrigSignatureMoniMT                                INFO -- #2046267508 Events         4          4          4          3          -          -          -          -          3
-TrigSignatureMoniMT                                INFO -- #2046267508 Features                             16         12         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu6_10invm70_L1MU6 #1316992871
-TrigSignatureMoniMT                                INFO -- #1316992871 Events         10         10         4          3          3          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #1316992871 Features                             16         12         18         28         -          -
-TrigSignatureMoniMT                                INFO HLT_2mu6_Dr_L12MU4 #3304584056
-TrigSignatureMoniMT                                INFO -- #3304584056 Events         4          4          4          3          -          -          -          -          3
-TrigSignatureMoniMT                                INFO -- #3304584056 Features                             16         12         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_2mu6_L12MU6 #1747073535
-TrigSignatureMoniMT                                INFO -- #1747073535 Events         4          4          4          3          3          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #1747073535 Features                             16         12         18         28         -          -
-TrigSignatureMoniMT                                INFO HLT_2mu6_muonqual_L12MU6 #2398136098
-TrigSignatureMoniMT                                INFO -- #2398136098 Events         4          4          4          3          3          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #2398136098 Features                             16         12         18         28         -          -
-TrigSignatureMoniMT                                INFO HLT_3j200_L1J100 #2199422919
-TrigSignatureMoniMT                                INFO -- #2199422919 Events         3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2199422919 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_3j200_L1J20 #493765146
-TrigSignatureMoniMT                                INFO -- #493765146 Events          19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #493765146 Features                              0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_3mu6_L13MU6 #1832399408
-TrigSignatureMoniMT                                INFO -- #1832399408 Events         0          0          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #1832399408 Features                             0          0          0          0          -          -
-TrigSignatureMoniMT                                INFO HLT_3mu6_msonly_L13MU6 #1199773318
-TrigSignatureMoniMT                                INFO -- #1199773318 Events         0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1199773318 Features                             0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_3mu8_msonly_L13MU6 #424835335
-TrigSignatureMoniMT                                INFO -- #424835335 Events          0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #424835335 Features                              0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_4mu4_L14MU4 #1834383636
-TrigSignatureMoniMT                                INFO -- #1834383636 Events         0          0          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #1834383636 Features                             0          0          0          0          -          -
-TrigSignatureMoniMT                                INFO HLT_5j70_0eta240_L14J20 #1175391812
-TrigSignatureMoniMT                                INFO -- #1175391812 Events         7          7          1          -          -          -          -          -          1
-TrigSignatureMoniMT                                INFO -- #1175391812 Features                             5          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_beamspot_allTE_trkfast_BeamSpotPEB_L1J15 #3989372080
-TrigSignatureMoniMT                                INFO -- #3989372080 Events         20         20         20         20         -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #3989372080 Features                             20         20         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_beamspot_trkFS_trkfast_BeamSpotPEB_L1J15 #628534730
-TrigSignatureMoniMT                                INFO -- #628534730 Events          20         20         20         20         -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #628534730 Features                              20         20         -          -          -          -
-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_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          45         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          78         10         5          -          -
-TrigSignatureMoniMT                                INFO HLT_e26_etcut_L1EM22VHI #1703681121
-TrigSignatureMoniMT                                INFO -- #1703681121 Events         6          6          6          6          6          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #1703681121 Features                             7          133        7          -          -          -
-TrigSignatureMoniMT                                INFO HLT_e26_lhtight_L1EM22VHI #1995263521
-TrigSignatureMoniMT                                INFO -- #1995263521 Events         6          6          5          5          5          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1995263521 Features                             5          64         8          4          -          -
-TrigSignatureMoniMT                                INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520
-TrigSignatureMoniMT                                INFO -- #939763520 Events          6          6          5          5          5          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #939763520 Features                              5          64         8          4          -          -
-TrigSignatureMoniMT                                INFO HLT_e26_lhtight_nod0_L1EM24VHI #4227411116
-TrigSignatureMoniMT                                INFO -- #4227411116 Events         6          6          5          5          5          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #4227411116 Features                             5          64         8          4          -          -
-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          3          1          1          1          -          -          1
-TrigSignatureMoniMT                                INFO -- #2209076666 Features                             3          1          1          1          -          -
-TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_mu6fast_L1EM8I_MU10 #2086577378
-TrigSignatureMoniMT                                INFO -- #2086577378 Events         5          5          3          -          -          -          -          -          3
-TrigSignatureMoniMT                                INFO -- #2086577378 Features                             3          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3 #683953566
-TrigSignatureMoniMT                                INFO -- #683953566 Events          20         20         20         20         20         -          -          -          20
-TrigSignatureMoniMT                                INFO -- #683953566 Features                              171        1841       390        -          -          -
-TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3 #324908483
-TrigSignatureMoniMT                                INFO -- #324908483 Events          20         20         20         20         20         -          -          -          20
-TrigSignatureMoniMT                                INFO -- #324908483 Features                              137        1651       190        -          -          -
-TrigSignatureMoniMT                                INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
-TrigSignatureMoniMT                                INFO -- #1053337356 Events         20         20         17         17         17         4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1053337356 Features                             56         653        116        5          -          -
-TrigSignatureMoniMT                                INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
-TrigSignatureMoniMT                                INFO -- #176627878 Events          20         20         16         16         16         4          -          -          4
-TrigSignatureMoniMT                                INFO -- #176627878 Features                              48         533        93         5          -          -
-TrigSignatureMoniMT                                INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
-TrigSignatureMoniMT                                INFO -- #2758326765 Events         20         20         16         16         16         4          -          -          4
-TrigSignatureMoniMT                                INFO -- #2758326765 Features                             45         515        84         5          -          -
-TrigSignatureMoniMT                                INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
-TrigSignatureMoniMT                                INFO -- #1690619419 Events         20         20         16         16         16         4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1690619419 Features                             45         515        84         5          -          -
-TrigSignatureMoniMT                                INFO HLT_e60_lhmedium_L1EM22VHI #298591874
-TrigSignatureMoniMT                                INFO -- #298591874 Events          6          6          2          2          2          2          -          -          2
-TrigSignatureMoniMT                                INFO -- #298591874 Features                              2          33         4          2          -          -
-TrigSignatureMoniMT                                INFO HLT_e60_lhmedium_nod0_L1EM22VHI #4115486024
-TrigSignatureMoniMT                                INFO -- #4115486024 Events         6          6          2          2          2          2          -          -          2
-TrigSignatureMoniMT                                INFO -- #4115486024 Features                             2          33         4          2          -          -
-TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3 #1959043579
-TrigSignatureMoniMT                                INFO -- #1959043579 Events         20         20         20         20         20         -          -          -          20
-TrigSignatureMoniMT                                INFO -- #1959043579 Features                             89         1130       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          71         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_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_loose_L1EM15VH #531040386
-TrigSignatureMoniMT                                INFO -- #531040386 Events          8          8          7          7          7          6          -          -          6
-TrigSignatureMoniMT                                INFO -- #531040386 Features                              9          9          18         7          -          -
-TrigSignatureMoniMT                                INFO HLT_g25_medium_L1EM15VH #3776886359
-TrigSignatureMoniMT                                INFO -- #3776886359 Events         8          8          7          7          7          6          -          -          6
-TrigSignatureMoniMT                                INFO -- #3776886359 Features                             7          7          13         6          -          -
-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_g25_tight_L1EM15VH #3691147775
-TrigSignatureMoniMT                                INFO -- #3691147775 Events         8          8          7          7          7          5          -          -          5
-TrigSignatureMoniMT                                INFO -- #3691147775 Features                             7          7          13         5          -          -
-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          -          -
-TrigSignatureMoniMT                                INFO HLT_g5_etcut_L1EM3 #471243435
-TrigSignatureMoniMT                                INFO -- #471243435 Events          20         20         20         20         20         -          -          -          20
-TrigSignatureMoniMT                                INFO -- #471243435 Features                              137        137        190        -          -          -
-TrigSignatureMoniMT                                INFO HLT_g5_etcut_LArPEB_L1EM3 #3486231698
-TrigSignatureMoniMT                                INFO -- #3486231698 Events         20         20         20         20         20         20         -          -          20
-TrigSignatureMoniMT                                INFO -- #3486231698 Features                             137        137        190        118        -          -
-TrigSignatureMoniMT                                INFO HLT_g5_loose_L1EM3 #3230088967
-TrigSignatureMoniMT                                INFO -- #3230088967 Events         20         20         17         17         17         9          -          -          9
-TrigSignatureMoniMT                                INFO -- #3230088967 Features                             56         56         116        12         -          -
-TrigSignatureMoniMT                                INFO HLT_g5_medium_L1EM3 #385248610
-TrigSignatureMoniMT                                INFO -- #385248610 Events          20         20         16         16         16         9          -          -          9
-TrigSignatureMoniMT                                INFO -- #385248610 Features                              48         48         93         12         -          -
-TrigSignatureMoniMT                                INFO HLT_g5_tight_L1EM3 #3280865118
-TrigSignatureMoniMT                                INFO -- #3280865118 Events         20         20         16         16         16         9          -          -          9
-TrigSignatureMoniMT                                INFO -- #3280865118 Features                             45         45         84         9          -          -
-TrigSignatureMoniMT                                INFO HLT_j0_perf_L1J12_EMPTY #1341875780
-TrigSignatureMoniMT                                INFO -- #1341875780 Events         0          0          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1341875780 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20 #4034799151
-TrigSignatureMoniMT                                INFO -- #4034799151 Events         19         19         15         -          -          -          -          -          15
-TrigSignatureMoniMT                                INFO -- #4034799151 Features                             425        -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j225_ftf_subjesgscIS_bmv2c1040_split_L1J100 #3992507557
-TrigSignatureMoniMT                                INFO -- #3992507557 Events         3          3          0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3992507557 Features                             0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j260_320eta490_L1J20 #3084792704
-TrigSignatureMoniMT                                INFO -- #3084792704 Events         19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3084792704 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j260_320eta490_L1J75_31ETA49 #3769257182
-TrigSignatureMoniMT                                INFO -- #3769257182 Events         2          2          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3769257182 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j275_ftf_subjesgscIS_bmv2c1060_split_L1J100 #1211559599
-TrigSignatureMoniMT                                INFO -- #1211559599 Events         3          3          0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1211559599 Features                             0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j300_ftf_subjesgscIS_bmv2c1070_split_L1J100 #3706723666
-TrigSignatureMoniMT                                INFO -- #3706723666 Events         3          3          0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3706723666 Features                             0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j360_ftf_subjesgscIS_bmv2c1077_split_L1J100 #1837565816
-TrigSignatureMoniMT                                INFO -- #1837565816 Events         3          3          0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1837565816 Features                             0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j420_L1J100 #2659902019
-TrigSignatureMoniMT                                INFO -- #2659902019 Events         3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2659902019 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j420_L1J20 #2205518067
-TrigSignatureMoniMT                                INFO -- #2205518067 Events         19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2205518067 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j420_ftf_subjesgscIS_L1J20 #4179085188
-TrigSignatureMoniMT                                INFO -- #4179085188 Events         19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #4179085188 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_L1J15 #1364976160
-TrigSignatureMoniMT                                INFO -- #1364976160 Events         20         20         19         -          -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #1364976160 Features                             50         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_cssktc_nojcalib_L1J20 #3295122398
-TrigSignatureMoniMT                                INFO -- #3295122398 Events         19         19         15         -          -          -          -          -          15
-TrigSignatureMoniMT                                INFO -- #3295122398 Features                             27         -          -          -          -          -
-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         15         -          -          -          -          -          15
-TrigSignatureMoniMT                                INFO -- #3533281867 Features                             25         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_pf_L1J20 #1335156103
-TrigSignatureMoniMT                                INFO -- #1335156103 Events         19         19         16         -          -          -          -          -          16
-TrigSignatureMoniMT                                INFO -- #1335156103 Features                             31         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_pf_nojcalib_L1J20 #3658890913
-TrigSignatureMoniMT                                INFO -- #3658890913 Events         19         19         15         -          -          -          -          -          15
-TrigSignatureMoniMT                                INFO -- #3658890913 Features                             29         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_011jvt_L1J15 #2857031468
-TrigSignatureMoniMT                                INFO -- #2857031468 Events         20         20         12         -          -          -          -          -          12
-TrigSignatureMoniMT                                INFO -- #2857031468 Features                             20         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_015jvt_L1J15 #2938374624
-TrigSignatureMoniMT                                INFO -- #2938374624 Events         20         20         12         -          -          -          -          -          12
-TrigSignatureMoniMT                                INFO -- #2938374624 Features                             19         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_059jvt_L1J15 #1593009344
-TrigSignatureMoniMT                                INFO -- #1593009344 Events         20         20         12         -          -          -          -          -          12
-TrigSignatureMoniMT                                INFO -- #1593009344 Features                             18         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_L1J15 #3341539267
-TrigSignatureMoniMT                                INFO -- #3341539267 Events         20         20         19         -          -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #3341539267 Features                             51         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_bmv2c1070_split_L1J20 #991419339
-TrigSignatureMoniMT                                INFO -- #991419339 Events          19         19         19         4          -          -          -          -          4
-TrigSignatureMoniMT                                INFO -- #991419339 Features                              50         8          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20 #1961149049
-TrigSignatureMoniMT                                INFO -- #1961149049 Events         19         19         19         19         -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #1961149049 Features                             50         50         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subjesgscIS_pf_L1J20 #761060030
-TrigSignatureMoniMT                                INFO -- #761060030 Events          19         19         16         -          -          -          -          -          16
-TrigSignatureMoniMT                                INFO -- #761060030 Features                              31         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subresjesgscIS_L1J15 #1509925407
-TrigSignatureMoniMT                                INFO -- #1509925407 Events         20         20         18         -          -          -          -          -          18
-TrigSignatureMoniMT                                INFO -- #1509925407 Features                             44         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_ftf_subresjesgscIS_pf_L1J20 #4012311417
-TrigSignatureMoniMT                                INFO -- #4012311417 Events         19         19         16         -          -          -          -          -          16
-TrigSignatureMoniMT                                INFO -- #4012311417 Features                             31         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_nojcalib_L1J20 #2042444294
-TrigSignatureMoniMT                                INFO -- #2042444294 Events         19         19         17         -          -          -          -          -          17
-TrigSignatureMoniMT                                INFO -- #2042444294 Features                             39         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j45_sktc_nojcalib_L1J20 #1542468090
-TrigSignatureMoniMT                                INFO -- #1542468090 Events         19         19         15         -          -          -          -          -          15
-TrigSignatureMoniMT                                INFO -- #1542468090 Features                             26         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j460_a10_lcw_subjes_L1J100 #3327656707
-TrigSignatureMoniMT                                INFO -- #3327656707 Events         3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3327656707 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j460_a10_lcw_subjes_L1J20 #215408633
-TrigSignatureMoniMT                                INFO -- #215408633 Events          19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #215408633 Features                              0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j460_a10r_L1J100 #1151767619
-TrigSignatureMoniMT                                INFO -- #1151767619 Events         3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1151767619 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j460_a10r_L1J20 #3875082669
-TrigSignatureMoniMT                                INFO -- #3875082669 Events         19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3875082669 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j460_a10t_lcw_jes_30smcINF_L1J100 #2296827117
-TrigSignatureMoniMT                                INFO -- #2296827117 Events         3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2296827117 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j460_a10t_lcw_jes_L1J100 #436385969
-TrigSignatureMoniMT                                INFO -- #436385969 Events          3          3          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #436385969 Features                              0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20 #3634067472
-TrigSignatureMoniMT                                INFO -- #3634067472 Events         19         19         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3634067472 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j80_L1J15 #2440872308
-TrigSignatureMoniMT                                INFO -- #2440872308 Events         20         20         13         -          -          -          -          -          13
-TrigSignatureMoniMT                                INFO -- #2440872308 Features                             23         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j80_j60_L1J15 #582699527
-TrigSignatureMoniMT                                INFO -- #582699527 Events          20         20         8          -          -          -          -          -          8
-TrigSignatureMoniMT                                INFO -- #582699527 Features                              23         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j85_L1J20 #510475538
-TrigSignatureMoniMT                                INFO -- #510475538 Events          19         19         13         -          -          -          -          -          13
-TrigSignatureMoniMT                                INFO -- #510475538 Features                              21         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j85_ftf_L1J20 #877042532
-TrigSignatureMoniMT                                INFO -- #877042532 Events          19         19         13         -          -          -          -          -          13
-TrigSignatureMoniMT                                INFO -- #877042532 Features                              21         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_j85_ftf_pf_L1J20 #1538535401
-TrigSignatureMoniMT                                INFO -- #1538535401 Events         19         19         8          -          -          -          -          -          8
-TrigSignatureMoniMT                                INFO -- #1538535401 Features                             13         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mb_sptrk_L1RD0_FILLED #4097312640
-TrigSignatureMoniMT                                INFO -- #4097312640 Events         20         20         20         20         -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #4097312640 Features                             20         20         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu0_muoncalib_L1MU20 #997163309
-TrigSignatureMoniMT                                INFO -- #997163309 Events          8          8          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #997163309 Features                              0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu0_muoncalib_L1MU4_EMPTY #782182242
-TrigSignatureMoniMT                                INFO -- #782182242 Events          0          0          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #782182242 Features                              0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu10_lateMu_L1MU10 #48780310
-TrigSignatureMoniMT                                INFO -- #48780310 Events           10         10         0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #48780310 Features                               0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu11_mu6_bJpsimumu_L1MU11_2MU6 #2504965945
-TrigSignatureMoniMT                                INFO -- #2504965945 Events         4          4          4          0          3          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #2504965945 Features                             8          0          6          0          -          -
-TrigSignatureMoniMT                                INFO HLT_mu11_mu6_bUpsimumu_L1MU11_2MU6 #1171632195
-TrigSignatureMoniMT                                INFO -- #1171632195 Events         4          4          4          0          3          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #1171632195 Features                             8          0          6          0          -          -
-TrigSignatureMoniMT                                INFO HLT_mu14_L1MU10 #1696906927
-TrigSignatureMoniMT                                INFO -- #1696906927 Events         10         10         10         7          7          7          -          -          7
-TrigSignatureMoniMT                                INFO -- #1696906927 Features                             13         8          8          8          -          -
-TrigSignatureMoniMT                                INFO HLT_mu20_ivar_L1MU6 #2083734526
-TrigSignatureMoniMT                                INFO -- #2083734526 Events         10         10         10         5          5          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #2083734526 Features                             14         6          5          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu24_L1MU20 #417425162
-TrigSignatureMoniMT                                INFO -- #417425162 Events          8          8          8          5          5          5          -          -          5
-TrigSignatureMoniMT                                INFO -- #417425162 Features                              10         6          6          6          -          -
-TrigSignatureMoniMT                                INFO HLT_mu24_idperf_L1MU20 #677658909
-TrigSignatureMoniMT                                INFO -- #677658909 Events          8          8          6          6          6          6          -          -          6
-TrigSignatureMoniMT                                INFO -- #677658909 Features                              7          7          7          7          -          -
-TrigSignatureMoniMT                                INFO HLT_mu26_L1MU20 #311138376
-TrigSignatureMoniMT                                INFO -- #311138376 Events          8          8          8          5          4          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #311138376 Features                              10         6          5          4          -          -
-TrigSignatureMoniMT                                INFO HLT_mu26_ivarmedium_L1MU20 #3411723090
-TrigSignatureMoniMT                                INFO -- #3411723090 Events         8          8          8          5          4          3          2          -          2
-TrigSignatureMoniMT                                INFO -- #3411723090 Features                             10         6          5          4          2          -
-TrigSignatureMoniMT                                INFO HLT_mu28_ivarmedium_L1MU20 #1963262787
-TrigSignatureMoniMT                                INFO -- #1963262787 Events         8          8          8          5          4          3          2          -          2
-TrigSignatureMoniMT                                INFO -- #1963262787 Features                             10         6          5          3          2          -
-TrigSignatureMoniMT                                INFO HLT_mu35_ivarmedium_L1MU20 #597064890
-TrigSignatureMoniMT                                INFO -- #597064890 Events          8          8          8          5          3          2          1          -          1
-TrigSignatureMoniMT                                INFO -- #597064890 Features                              10         6          4          2          1          -
-TrigSignatureMoniMT                                INFO HLT_mu50_L1MU20 #3657158931
-TrigSignatureMoniMT                                INFO -- #3657158931 Events         8          8          8          5          1          1          -          -          1
-TrigSignatureMoniMT                                INFO -- #3657158931 Features                             10         6          1          1          -          -
-TrigSignatureMoniMT                                INFO HLT_mu50_RPCPEBSecondaryReadout_L1MU20 #827327262
-TrigSignatureMoniMT                                INFO -- #827327262 Events          8          8          8          5          1          1          1          -          1
-TrigSignatureMoniMT                                INFO -- #827327262 Features                              10         6          1          1          1          -
-TrigSignatureMoniMT                                INFO HLT_mu60_0eta105_msonly_L1MU20 #1642591450
-TrigSignatureMoniMT                                INFO -- #1642591450 Events         8          8          1          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1642591450 Features                             2          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu6Comb_L1MU6 #996392590
-TrigSignatureMoniMT                                INFO -- #996392590 Events          10         10         10         10         -          -          -          -          10
-TrigSignatureMoniMT                                INFO -- #996392590 Features                              14         13         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu6_L1MU6 #2560542253
-TrigSignatureMoniMT                                INFO -- #2560542253 Events         10         10         10         10         10         10         -          -          10
-TrigSignatureMoniMT                                INFO -- #2560542253 Features                             14         13         16         21         -          -
-TrigSignatureMoniMT                                INFO HLT_mu6_idperf_L1MU6 #934918532
-TrigSignatureMoniMT                                INFO -- #934918532 Events          10         10         10         10         10         10         -          -          10
-TrigSignatureMoniMT                                INFO -- #934918532 Features                              14         14         17         27         -          -
-TrigSignatureMoniMT                                INFO HLT_mu6_ivarmedium_L1MU6 #1012713062
-TrigSignatureMoniMT                                INFO -- #1012713062 Events         10         10         10         10         10         10         6          -          6
-TrigSignatureMoniMT                                INFO -- #1012713062 Features                             14         13         16         21         6          -
-TrigSignatureMoniMT                                INFO HLT_mu6_msonly_L1MU6 #3895421032
-TrigSignatureMoniMT                                INFO -- #3895421032 Events         10         10         10         0          10         -          -          -          10
-TrigSignatureMoniMT                                INFO -- #3895421032 Features                             14         0          17         -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu6_mu4_L12MU4 #1713982776
-TrigSignatureMoniMT                                INFO -- #1713982776 Events         4          4          4          4          4          4          -          -          4
-TrigSignatureMoniMT                                INFO -- #1713982776 Features                             8          8          12         18         -          -
-TrigSignatureMoniMT                                INFO HLT_mu6_mu6noL1_L1MU6 #451489897
-TrigSignatureMoniMT                                INFO -- #451489897 Events          10         10         10         10         10         10         5          4          4
-TrigSignatureMoniMT                                INFO -- #451489897 Features                              14         13         16         21         8          7
-TrigSignatureMoniMT                                INFO HLT_mu6fast_L1MU6 #3518031697
-TrigSignatureMoniMT                                INFO -- #3518031697 Events         10         10         10         -          -          -          -          -          10
-TrigSignatureMoniMT                                INFO -- #3518031697 Features                             14         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu80_msonly_3layersEC_L1MU20 #761101109
-TrigSignatureMoniMT                                INFO -- #761101109 Events          8          8          8          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #761101109 Features                              10         0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_mu8_L1MU6 #1467711434
-TrigSignatureMoniMT                                INFO -- #1467711434 Events         10         10         10         10         10         10         -          -          10
-TrigSignatureMoniMT                                INFO -- #1467711434 Features                             14         13         15         19         -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM10VH #314199913
-TrigSignatureMoniMT                                INFO -- #314199913 Events          11         11         -          -          -          -          -          -          11
-TrigSignatureMoniMT                                INFO -- #314199913 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM12 #3885916609
-TrigSignatureMoniMT                                INFO -- #3885916609 Events         16         16         -          -          -          -          -          -          16
-TrigSignatureMoniMT                                INFO -- #3885916609 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM15 #480733925
-TrigSignatureMoniMT                                INFO -- #480733925 Events          14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #480733925 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM15VH #2374865899
-TrigSignatureMoniMT                                INFO -- #2374865899 Events         8          8          -          -          -          -          -          -          8
-TrigSignatureMoniMT                                INFO -- #2374865899 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM20VH #3719542824
-TrigSignatureMoniMT                                INFO -- #3719542824 Events         7          7          -          -          -          -          -          -          7
-TrigSignatureMoniMT                                INFO -- #3719542824 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM22VHI #1723589313
-TrigSignatureMoniMT                                INFO -- #1723589313 Events         6          6          -          -          -          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #1723589313 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM3 #4169267792
-TrigSignatureMoniMT                                INFO -- #4169267792 Events         20         20         -          -          -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #4169267792 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM7 #3226970354
-TrigSignatureMoniMT                                INFO -- #3226970354 Events         20         20         -          -          -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #3226970354 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1EM8VH #4065285611
-TrigSignatureMoniMT                                INFO -- #4065285611 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #4065285611 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J100 #1026959128
-TrigSignatureMoniMT                                INFO -- #1026959128 Events         3          3          -          -          -          -          -          -          3
-TrigSignatureMoniMT                                INFO -- #1026959128 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J12 #2640820608
-TrigSignatureMoniMT                                INFO -- #2640820608 Events         20         20         -          -          -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #2640820608 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J120 #2116228652
-TrigSignatureMoniMT                                INFO -- #2116228652 Events         1          1          -          -          -          -          -          -          1
-TrigSignatureMoniMT                                INFO -- #2116228652 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J15 #1976430774
-TrigSignatureMoniMT                                INFO -- #1976430774 Events         20         20         -          -          -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #1976430774 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J20 #2241112369
-TrigSignatureMoniMT                                INFO -- #2241112369 Events         19         19         -          -          -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #2241112369 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J25 #39428635
-TrigSignatureMoniMT                                INFO -- #39428635 Events           17         17         -          -          -          -          -          -          17
-TrigSignatureMoniMT                                INFO -- #39428635 Features                               -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J30 #3523994129
-TrigSignatureMoniMT                                INFO -- #3523994129 Events         17         17         -          -          -          -          -          -          17
-TrigSignatureMoniMT                                INFO -- #3523994129 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J40 #1497591431
-TrigSignatureMoniMT                                INFO -- #1497591431 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #1497591431 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J400 #2494874701
-TrigSignatureMoniMT                                INFO -- #2494874701 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2494874701 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J50 #3346352675
-TrigSignatureMoniMT                                INFO -- #3346352675 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #3346352675 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J75 #1651897827
-TrigSignatureMoniMT                                INFO -- #1651897827 Events         6          6          -          -          -          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #1651897827 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1J85 #166231461
-TrigSignatureMoniMT                                INFO -- #166231461 Events          5          5          -          -          -          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #166231461 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1RD0_EMPTY #914660695
-TrigSignatureMoniMT                                INFO -- #914660695 Events          0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #914660695 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1RD0_FILLED #211699639
-TrigSignatureMoniMT                                INFO -- #211699639 Events          20         20         -          -          -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #211699639 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU12 #4248050338
-TrigSignatureMoniMT                                INFO -- #4248050338 Events         18         18         -          -          -          -          -          -          18
-TrigSignatureMoniMT                                INFO -- #4248050338 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU12IM #357557968
-TrigSignatureMoniMT                                INFO -- #357557968 Events          14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #357557968 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU20 #3602376876
-TrigSignatureMoniMT                                INFO -- #3602376876 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #3602376876 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU20IM #1931583332
-TrigSignatureMoniMT                                INFO -- #1931583332 Events         10         10         -          -          -          -          -          -          10
-TrigSignatureMoniMT                                INFO -- #1931583332 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU30 #1944789678
-TrigSignatureMoniMT                                INFO -- #1944789678 Events         13         13         -          -          -          -          -          -          13
-TrigSignatureMoniMT                                INFO -- #1944789678 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU40 #1394621652
-TrigSignatureMoniMT                                INFO -- #1394621652 Events         7          7          -          -          -          -          -          -          7
-TrigSignatureMoniMT                                INFO -- #1394621652 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU60 #3332424451
-TrigSignatureMoniMT                                INFO -- #3332424451 Events         5          5          -          -          -          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #3332424451 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1TAU8 #3165115874
-TrigSignatureMoniMT                                INFO -- #3165115874 Events         19         19         -          -          -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #3165115874 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE10 #1583053368
-TrigSignatureMoniMT                                INFO -- #1583053368 Events         19         19         -          -          -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #1583053368 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE30 #2047368922
-TrigSignatureMoniMT                                INFO -- #2047368922 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #2047368922 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE300 #1315853555
-TrigSignatureMoniMT                                INFO -- #1315853555 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1315853555 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE35 #2313039014
-TrigSignatureMoniMT                                INFO -- #2313039014 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #2313039014 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE40 #4293469116
-TrigSignatureMoniMT                                INFO -- #4293469116 Events         14         14         -          -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #4293469116 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE45 #2365048177
-TrigSignatureMoniMT                                INFO -- #2365048177 Events         13         13         -          -          -          -          -          -          13
-TrigSignatureMoniMT                                INFO -- #2365048177 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE50 #1168752081
-TrigSignatureMoniMT                                INFO -- #1168752081 Events         10         10         -          -          -          -          -          -          10
-TrigSignatureMoniMT                                INFO -- #1168752081 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE55 #268928384
-TrigSignatureMoniMT                                INFO -- #268928384 Events          8          8          -          -          -          -          -          -          8
-TrigSignatureMoniMT                                INFO -- #268928384 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE60 #4154240531
-TrigSignatureMoniMT                                INFO -- #4154240531 Events         8          8          -          -          -          -          -          -          8
-TrigSignatureMoniMT                                INFO -- #4154240531 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE70 #3765216228
-TrigSignatureMoniMT                                INFO -- #3765216228 Events         4          4          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                INFO -- #3765216228 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_L1XE80 #2742079961
-TrigSignatureMoniMT                                INFO -- #2742079961 Events         3          3          -          -          -          -          -          -          3
-TrigSignatureMoniMT                                INFO -- #2742079961 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1EM3_EMPTY #2458124284
-TrigSignatureMoniMT                                INFO -- #2458124284 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2458124284 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1EM7_EMPTY #299938202
-TrigSignatureMoniMT                                INFO -- #299938202 Events          0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #299938202 Features                              -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1J12_EMPTY #3144024902
-TrigSignatureMoniMT                                INFO -- #3144024902 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3144024902 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1J12_FIRSTEMPTY #3840098930
-TrigSignatureMoniMT                                INFO -- #3840098930 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3840098930 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1J30_31ETA49_EMPTY #4143623058
-TrigSignatureMoniMT                                INFO -- #4143623058 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #4143623058 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1J30_EMPTY #2991490897
-TrigSignatureMoniMT                                INFO -- #2991490897 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2991490897 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1J30_FIRSTEMPTY #2214697960
-TrigSignatureMoniMT                                INFO -- #2214697960 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2214697960 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1RD1_BGRP10 #48519027
-TrigSignatureMoniMT                                INFO -- #48519027 Events           0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #48519027 Features                               -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_cosmiccalo_L1RD1_EMPTY #3925252528
-TrigSignatureMoniMT                                INFO -- #3925252528 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3925252528 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_idmon_L1RD0_EMPTY #56818284
-TrigSignatureMoniMT                                INFO -- #56818284 Events           0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #56818284 Features                               -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_idmon_L1RD0_FILLED #1198298874
-TrigSignatureMoniMT                                INFO -- #1198298874 Events         20         20         -          -          -          -          -          -          20
-TrigSignatureMoniMT                                INFO -- #1198298874 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_idmon_L1RD0_UNPAIRED_ISO #2536676873
-TrigSignatureMoniMT                                INFO -- #2536676873 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2536676873 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_mb_L1RD2_EMPTY #3788962163
-TrigSignatureMoniMT                                INFO -- #3788962163 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3788962163 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_noalg_zb_L1ZB #1289992951
-TrigSignatureMoniMT                                INFO -- #1289992951 Events         0          0          -          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1289992951 Features                             -          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_sct_noise_SCTPEB_L1RD0_EMPTY #3024203296
-TrigSignatureMoniMT                                INFO -- #3024203296 Events         0          0          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3024203296 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau0_perf_ptonly_L1TAU100 #2342716369
-TrigSignatureMoniMT                                INFO -- #2342716369 Events         0          0          0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2342716369 Features                             0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau0_perf_ptonly_L1TAU12 #372992233
-TrigSignatureMoniMT                                INFO -- #372992233 Events          18         18         18         18         -          -          -          -          18
-TrigSignatureMoniMT                                INFO -- #372992233 Features                              42         42         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau0_perf_ptonly_L1TAU60 #1376650121
-TrigSignatureMoniMT                                INFO -- #1376650121 Events         5          5          5          5          -          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #1376650121 Features                             6          6          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau160_idperf_track_L1TAU100 #714660857
-TrigSignatureMoniMT                                INFO -- #714660857 Events          0          0          0          0          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #714660857 Features                              0          0          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau160_idperf_tracktwoMVA_L1TAU100 #2725693236
-TrigSignatureMoniMT                                INFO -- #2725693236 Events         0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2725693236 Features                             0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau160_idperf_tracktwo_L1TAU100 #886074432
-TrigSignatureMoniMT                                INFO -- #886074432 Events          0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #886074432 Features                              0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100 #1747754287
-TrigSignatureMoniMT                                INFO -- #1747754287 Events         0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1747754287 Features                             0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau160_perf_tracktwoMVA_L1TAU100 #2334140248
-TrigSignatureMoniMT                                INFO -- #2334140248 Events         0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2334140248 Features                             0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau160_perf_tracktwo_L1TAU100 #1799096347
-TrigSignatureMoniMT                                INFO -- #1799096347 Events         0          0          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1799096347 Features                             0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_idperf_track_L1TAU12IM #554271976
-TrigSignatureMoniMT                                INFO -- #554271976 Events          14         14         14         14         -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #554271976 Features                              24         24         -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_idperf_tracktwoMVA_L1TAU12IM #988149859
-TrigSignatureMoniMT                                INFO -- #988149859 Events          14         14         14         13         13         -          -          -          13
-TrigSignatureMoniMT                                INFO -- #988149859 Features                              24         17         17         -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_idperf_tracktwo_L1TAU12IM #3346942453
-TrigSignatureMoniMT                                INFO -- #3346942453 Events         14         14         14         13         13         -          -          -          13
-TrigSignatureMoniMT                                INFO -- #3346942453 Features                             24         17         17         -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_looseRNN_tracktwoMVA_L1TAU12IM #169452969
-TrigSignatureMoniMT                                INFO -- #169452969 Events          14         14         12         11         10         -          -          -          10
-TrigSignatureMoniMT                                INFO -- #169452969 Features                              22         15         13         -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_looseRNN_tracktwo_L1TAU12IM #2490017573
-TrigSignatureMoniMT                                INFO -- #2490017573 Events         14         14         12         11         0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #2490017573 Features                             22         15         0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_medium1_tracktwoEF_L1TAU12IM #506456080
-TrigSignatureMoniMT                                INFO -- #506456080 Events          14         14         12         11         0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #506456080 Features                              22         15         0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_medium1_tracktwoMVA_L1TAU12IM #4055280067
-TrigSignatureMoniMT                                INFO -- #4055280067 Events         14         14         12         11         0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #4055280067 Features                             22         15         0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_medium1_tracktwo_L1TAU12IM #1433975745
-TrigSignatureMoniMT                                INFO -- #1433975745 Events         14         14         12         11         7          -          -          -          7
-TrigSignatureMoniMT                                INFO -- #1433975745 Features                             22         15         7          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_mediumRNN_tracktwoMVA_L1TAU12IM #2222894847
-TrigSignatureMoniMT                                INFO -- #2222894847 Events         14         14         12         11         7          -          -          -          7
-TrigSignatureMoniMT                                INFO -- #2222894847 Features                             22         15         9          -          -          -
-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          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_perf_tracktwoMVA_L1TAU12IM #112814536
-TrigSignatureMoniMT                                INFO -- #112814536 Events          14         14         14         13         13         -          -          -          13
-TrigSignatureMoniMT                                INFO -- #112814536 Features                              24         17         17         -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_perf_tracktwo_L1TAU12IM #1129072492
-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         6          -          -          -
-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          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_verylooseRNN_tracktwoMVA_L1TAU12IM #2992830434
-TrigSignatureMoniMT                                INFO -- #2992830434 Events         14         14         12         11         10         -          -          -          10
-TrigSignatureMoniMT                                INFO -- #2992830434 Features                             22         15         14         -          -          -
-TrigSignatureMoniMT                                INFO HLT_tau25_verylooseRNN_tracktwo_L1TAU12IM #1275052132
-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         6          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #2456480859 Features                             20         14         8          -          -          -
-TrigSignatureMoniMT                                INFO HLT_tilecalib_laser_TilePEB_L1CALREQ2 #1063154655
-TrigSignatureMoniMT                                INFO -- #1063154655 Events         0          0          0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #1063154655 Features                             0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_timeburner_L1All #819160059
-TrigSignatureMoniMT                                INFO -- #819160059 Events          20         20         0          -          -          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #819160059 Features                              0          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe100_mht_L1XE50 #532175988
-TrigSignatureMoniMT                                INFO -- #532175988 Events          10         10         6          -          -          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #532175988 Features                              6          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe100_pfsum_L1XE50 #1890237897
-TrigSignatureMoniMT                                INFO -- #1890237897 Events         10         10         2          -          -          -          -          -          2
-TrigSignatureMoniMT                                INFO -- #1890237897 Features                             2          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe100_tcpufit_L1XE50 #2803198799
-TrigSignatureMoniMT                                INFO -- #2803198799 Events         10         10         6          -          -          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #2803198799 Features                             6          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe100_trkmht_L1XE50 #1055916731
-TrigSignatureMoniMT                                INFO -- #1055916731 Events         10         10         5          -          -          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #1055916731 Features                             5          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe110_mht_L1XE50 #3030733259
-TrigSignatureMoniMT                                INFO -- #3030733259 Events         10         10         6          -          -          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #3030733259 Features                             6          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe110_tc_em_L1XE50 #607113828
-TrigSignatureMoniMT                                INFO -- #607113828 Events          10         10         5          -          -          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #607113828 Features                              5          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe110_tcpufit_L1XE50 #892853397
-TrigSignatureMoniMT                                INFO -- #892853397 Events          10         10         6          -          -          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #892853397 Features                              6          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe30_cell_L1XE10 #1649696554
-TrigSignatureMoniMT                                INFO -- #1649696554 Events         19         19         17         -          -          -          -          -          17
-TrigSignatureMoniMT                                INFO -- #1649696554 Features                             17         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe30_cell_xe30_tcpufit_L1XE10 #3768353779
-TrigSignatureMoniMT                                INFO -- #3768353779 Events         19         19         14         -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #3768353779 Features                             14         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe30_mht_L1XE10 #3626903018
-TrigSignatureMoniMT                                INFO -- #3626903018 Events         19         19         19         -          -          -          -          -          19
-TrigSignatureMoniMT                                INFO -- #3626903018 Features                             19         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe30_pfsum_L1XE10 #998713382
-TrigSignatureMoniMT                                INFO -- #998713382 Events          19         19         14         -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #998713382 Features                              14         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe30_tcpufit_L1XE10 #1583719916
-TrigSignatureMoniMT                                INFO -- #1583719916 Events         19         19         14         -          -          -          -          -          14
-TrigSignatureMoniMT                                INFO -- #1583719916 Features                             14         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe30_trkmht_L1XE10 #2468872349
-TrigSignatureMoniMT                                INFO -- #2468872349 Events         19         19         17         -          -          -          -          -          17
-TrigSignatureMoniMT                                INFO -- #2468872349 Features                             17         -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe65_cell_L1XE50 #531141817
-TrigSignatureMoniMT                                INFO -- #531141817 Events          10         10         7          -          -          -          -          -          7
-TrigSignatureMoniMT                                INFO -- #531141817 Features                              7          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_xe65_cell_xe110_tcpufit_L1XE50 #115518400
-TrigSignatureMoniMT                                INFO -- #115518400 Events          10         10         5          -          -          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #115518400 Features                              5          -          -          -          -          -
+TrigSignatureMoniMT                            0    INFO The L1 seed to multi-item-seeded chain HLT_noalg_L1Standby could not be completely resolved. This is currently OK. Exception from menu access: L1Item L1_2EM13VH does not exist in the menu
+TrigSignatureMoniMT                            0    INFO The L1 seed to multi-item-seeded chain HLT_noalg_L1Calo could not be completely resolved. This is currently OK. Exception from menu access: L1Item L1_2EM13VH does not exist in the menu
+TrigSignatureMoniMT                                 INFO HLT_2e17_etcut_L12EM15VH #3136730292
+TrigSignatureMoniMT                                 INFO -- #3136730292 Events         2          2          2          2          2          -          -          -          2
+TrigSignatureMoniMT                                 INFO -- #3136730292 Features                             12         296        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          -          -
+TrigSignatureMoniMT                                 INFO HLT_2e3_etcut_L12EM3 #2613484113
+TrigSignatureMoniMT                                 INFO -- #2613484113 Events         20         20         20         20         20         -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3686       780        -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2g20_tight_L12EM15VH #3837353071
+TrigSignatureMoniMT                                 INFO -- #3837353071 Events         2          2          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3837353071 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_2g35_etcut_L12EM20VH #58053304
+TrigSignatureMoniMT                                 INFO -- #58053304 Events           2          2          1          1          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #58053304 Features                               4          4          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2g35_medium_L12EM20VH #3965466087
+TrigSignatureMoniMT                                 INFO -- #3965466087 Events         2          2          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3965466087 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_2j330_a10t_lcw_jes_35smcINF_L1J100 #1295975955
+TrigSignatureMoniMT                                 INFO -- #1295975955 Events         3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1295975955 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2j60_L1J15 #927735533
+TrigSignatureMoniMT                                 INFO -- #927735533 Events          20         20         10         -          -          -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #927735533 Features                              28         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu10_bJpsimumu_L12MU10 #3498558358
+TrigSignatureMoniMT                                 INFO -- #3498558358 Events         3          3          3          3          3          2          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3498558358 Features                             12         12         16         4          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu10_bUpsimumu_L12MU10 #234102568
+TrigSignatureMoniMT                                 INFO -- #234102568 Events          3          3          3          3          3          2          -          -          0
+TrigSignatureMoniMT                                 INFO -- #234102568 Features                              12         12         16         4          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu14_L12MU10 #2619091790
+TrigSignatureMoniMT                                 INFO -- #2619091790 Events         3          3          3          1          1          1          -          -          1
+TrigSignatureMoniMT                                 INFO -- #2619091790 Features                             12         4          4          4          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu15_L12MU10 #557204938
+TrigSignatureMoniMT                                 INFO -- #557204938 Events          3          3          3          1          1          1          -          -          1
+TrigSignatureMoniMT                                 INFO -- #557204938 Features                              12         4          4          4          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu4_L12MU4 #2999632714
+TrigSignatureMoniMT                                 INFO -- #2999632714 Events         4          4          4          4          4          4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #2999632714 Features                             16         16         24         36         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu4_bDimu_L12MU4 #1730084172
+TrigSignatureMoniMT                                 INFO -- #1730084172 Events         4          4          4          4          4          4          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1730084172 Features                             16         16         24         18         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu4_bJpsimumu_L12MU4 #4276347155
+TrigSignatureMoniMT                                 INFO -- #4276347155 Events         4          4          4          4          4          4          -          -          0
+TrigSignatureMoniMT                                 INFO -- #4276347155 Features                             16         16         24         18         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu4_bUpsimumu_L12MU4 #4008168535
+TrigSignatureMoniMT                                 INFO -- #4008168535 Events         4          4          4          4          4          4          -          -          0
+TrigSignatureMoniMT                                 INFO -- #4008168535 Features                             16         16         24         18         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu4_muonqual_L12MU4 #1584776935
+TrigSignatureMoniMT                                 INFO -- #1584776935 Events         4          4          4          4          4          4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #1584776935 Features                             16         16         24         36         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu6Comb_L12MU6 #2046267508
+TrigSignatureMoniMT                                 INFO -- #2046267508 Events         4          4          4          3          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #2046267508 Features                             16         12         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu6_10invm70_L1MU6 #1316992871
+TrigSignatureMoniMT                                 INFO -- #1316992871 Events         10         10         4          3          3          3          -          -          3
+TrigSignatureMoniMT                                 INFO -- #1316992871 Features                             16         12         18         28         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu6_Dr_L12MU4 #3304584056
+TrigSignatureMoniMT                                 INFO -- #3304584056 Events         4          4          4          3          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #3304584056 Features                             16         12         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu6_L12MU6 #1747073535
+TrigSignatureMoniMT                                 INFO -- #1747073535 Events         4          4          4          3          3          3          -          -          3
+TrigSignatureMoniMT                                 INFO -- #1747073535 Features                             16         12         18         28         -          -
+TrigSignatureMoniMT                                 INFO HLT_2mu6_muonqual_L12MU6 #2398136098
+TrigSignatureMoniMT                                 INFO -- #2398136098 Events         4          4          4          3          3          3          -          -          3
+TrigSignatureMoniMT                                 INFO -- #2398136098 Features                             16         12         18         28         -          -
+TrigSignatureMoniMT                                 INFO HLT_3j200_L1J100 #2199422919
+TrigSignatureMoniMT                                 INFO -- #2199422919 Events         3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2199422919 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_3j200_L1J20 #493765146
+TrigSignatureMoniMT                                 INFO -- #493765146 Events          19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #493765146 Features                              0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_3mu6_L13MU6 #1832399408
+TrigSignatureMoniMT                                 INFO -- #1832399408 Events         0          0          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1832399408 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_3mu6_msonly_L13MU6 #1199773318
+TrigSignatureMoniMT                                 INFO -- #1199773318 Events         0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1199773318 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_3mu8_msonly_L13MU6 #424835335
+TrigSignatureMoniMT                                 INFO -- #424835335 Events          0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #424835335 Features                              0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_4mu4_L14MU4 #1834383636
+TrigSignatureMoniMT                                 INFO -- #1834383636 Events         0          0          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1834383636 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_5j70_0eta240_L14J20 #1175391812
+TrigSignatureMoniMT                                 INFO -- #1175391812 Events         7          7          1          -          -          -          -          -          1
+TrigSignatureMoniMT                                 INFO -- #1175391812 Features                             5          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_beamspot_allTE_trkfast_BeamSpotPEB_L1J15 #3989372080
+TrigSignatureMoniMT                                 INFO -- #3989372080 Events         20         20         20         20         -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #3989372080 Features                             20         20         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_beamspot_trkFS_trkfast_BeamSpotPEB_L1J15 #628534730
+TrigSignatureMoniMT                                 INFO -- #628534730 Events          20         20         20         20         -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #628534730 Features                              20         20         -          -          -          -
+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_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          45         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          78         10         5          -          -
+TrigSignatureMoniMT                                 INFO HLT_e26_etcut_L1EM22VHI #1703681121
+TrigSignatureMoniMT                                 INFO -- #1703681121 Events         6          6          6          6          6          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #1703681121 Features                             7          133        7          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_L1EM22VHI #1995263521
+TrigSignatureMoniMT                                 INFO -- #1995263521 Events         6          6          5          5          5          4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #1995263521 Features                             5          64         8          4          -          -
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520
+TrigSignatureMoniMT                                 INFO -- #939763520 Events          6          6          5          5          5          4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #939763520 Features                              5          64         8          4          -          -
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_nod0_L1EM24VHI #4227411116
+TrigSignatureMoniMT                                 INFO -- #4227411116 Events         6          6          5          5          5          4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #4227411116 Features                             5          64         8          4          -          -
+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          3          1          1          1          -          -          1
+TrigSignatureMoniMT                                 INFO -- #2209076666 Features                             3          1          1          1          -          -
+TrigSignatureMoniMT                                 INFO HLT_e3_etcut1step_mu6fast_L1EM8I_MU10 #2086577378
+TrigSignatureMoniMT                                 INFO -- #2086577378 Events         5          5          3          -          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #2086577378 Features                             3          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_e3_etcut_L1EM3 #683953566
+TrigSignatureMoniMT                                 INFO -- #683953566 Events          20         20         20         20         20         -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1843       390        -          -          -
+TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324908483
+TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         20         20         20         -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #324908483 Features                              137        1654       190        -          -          -
+TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
+TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         17         17         17         4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         651        116        5          -          -
+TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
+TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         16         16         16         4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         531        93         5          -          -
+TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
+TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         16         16         16         4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         513        84         5          -          -
+TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
+TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         16         16         16         4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         513        84         5          -          -
+TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
+TrigSignatureMoniMT                                 INFO -- #298591874 Events          6          6          2          2          2          2          -          -          2
+TrigSignatureMoniMT                                 INFO -- #298591874 Features                              2          33         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          33         4          2          -          -
+TrigSignatureMoniMT                                 INFO HLT_e7_etcut_L1EM3 #1959043579
+TrigSignatureMoniMT                                 INFO -- #1959043579 Events         20         20         20         20         20         -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #1959043579 Features                             89         1135       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_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_loose_L1EM15VH #531040386
+TrigSignatureMoniMT                                 INFO -- #531040386 Events          8          8          7          7          7          6          -          -          6
+TrigSignatureMoniMT                                 INFO -- #531040386 Features                              9          9          18         7          -          -
+TrigSignatureMoniMT                                 INFO HLT_g25_medium_L1EM15VH #3776886359
+TrigSignatureMoniMT                                 INFO -- #3776886359 Events         8          8          7          7          7          6          -          -          6
+TrigSignatureMoniMT                                 INFO -- #3776886359 Features                             7          7          13         6          -          -
+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_g25_tight_L1EM15VH #3691147775
+TrigSignatureMoniMT                                 INFO -- #3691147775 Events         8          8          7          7          7          5          -          -          5
+TrigSignatureMoniMT                                 INFO -- #3691147775 Features                             7          7          13         5          -          -
+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          -          -
+TrigSignatureMoniMT                                 INFO HLT_g5_etcut_L1EM3 #471243435
+TrigSignatureMoniMT                                 INFO -- #471243435 Events          20         20         20         20         20         -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #471243435 Features                              137        137        190        -          -          -
+TrigSignatureMoniMT                                 INFO HLT_g5_etcut_LArPEB_L1EM3 #3486231698
+TrigSignatureMoniMT                                 INFO -- #3486231698 Events         20         20         20         20         20         20         -          -          20
+TrigSignatureMoniMT                                 INFO -- #3486231698 Features                             137        137        190        118        -          -
+TrigSignatureMoniMT                                 INFO HLT_g5_loose_L1EM3 #3230088967
+TrigSignatureMoniMT                                 INFO -- #3230088967 Events         20         20         17         17         17         9          -          -          9
+TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             56         56         116        12         -          -
+TrigSignatureMoniMT                                 INFO HLT_g5_medium_L1EM3 #385248610
+TrigSignatureMoniMT                                 INFO -- #385248610 Events          20         20         16         16         16         9          -          -          9
+TrigSignatureMoniMT                                 INFO -- #385248610 Features                              48         48         93         12         -          -
+TrigSignatureMoniMT                                 INFO HLT_g5_tight_L1EM3 #3280865118
+TrigSignatureMoniMT                                 INFO -- #3280865118 Events         20         20         16         16         16         9          -          -          9
+TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             45         45         84         9          -          -
+TrigSignatureMoniMT                                 INFO HLT_j0_perf_L1J12_EMPTY #1341875780
+TrigSignatureMoniMT                                 INFO -- #1341875780 Events         0          0          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1341875780 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20 #4034799151
+TrigSignatureMoniMT                                 INFO -- #4034799151 Events         19         19         15         -          -          -          -          -          15
+TrigSignatureMoniMT                                 INFO -- #4034799151 Features                             425        -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j225_ftf_subjesgscIS_bmv2c1040_split_L1J100 #3992507557
+TrigSignatureMoniMT                                 INFO -- #3992507557 Events         3          3          0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3992507557 Features                             0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j260_320eta490_L1J20 #3084792704
+TrigSignatureMoniMT                                 INFO -- #3084792704 Events         19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3084792704 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j260_320eta490_L1J75_31ETA49 #3769257182
+TrigSignatureMoniMT                                 INFO -- #3769257182 Events         2          2          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3769257182 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j275_ftf_subjesgscIS_bmv2c1060_split_L1J100 #1211559599
+TrigSignatureMoniMT                                 INFO -- #1211559599 Events         3          3          0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1211559599 Features                             0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j300_ftf_subjesgscIS_bmv2c1070_split_L1J100 #3706723666
+TrigSignatureMoniMT                                 INFO -- #3706723666 Events         3          3          0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3706723666 Features                             0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j360_ftf_subjesgscIS_bmv2c1077_split_L1J100 #1837565816
+TrigSignatureMoniMT                                 INFO -- #1837565816 Events         3          3          0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1837565816 Features                             0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j420_L1J100 #2659902019
+TrigSignatureMoniMT                                 INFO -- #2659902019 Events         3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2659902019 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j420_L1J20 #2205518067
+TrigSignatureMoniMT                                 INFO -- #2205518067 Events         19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2205518067 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j420_ftf_subjesgscIS_L1J20 #4179085188
+TrigSignatureMoniMT                                 INFO -- #4179085188 Events         19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #4179085188 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_L1J15 #1364976160
+TrigSignatureMoniMT                                 INFO -- #1364976160 Events         20         20         19         -          -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #1364976160 Features                             50         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_cssktc_nojcalib_L1J20 #3295122398
+TrigSignatureMoniMT                                 INFO -- #3295122398 Events         19         19         15         -          -          -          -          -          15
+TrigSignatureMoniMT                                 INFO -- #3295122398 Features                             27         -          -          -          -          -
+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         15         -          -          -          -          -          15
+TrigSignatureMoniMT                                 INFO -- #3533281867 Features                             25         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_pf_L1J20 #1335156103
+TrigSignatureMoniMT                                 INFO -- #1335156103 Events         19         19         16         -          -          -          -          -          16
+TrigSignatureMoniMT                                 INFO -- #1335156103 Features                             31         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_pf_nojcalib_L1J20 #3658890913
+TrigSignatureMoniMT                                 INFO -- #3658890913 Events         19         19         15         -          -          -          -          -          15
+TrigSignatureMoniMT                                 INFO -- #3658890913 Features                             29         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_011jvt_L1J15 #2857031468
+TrigSignatureMoniMT                                 INFO -- #2857031468 Events         20         20         12         -          -          -          -          -          12
+TrigSignatureMoniMT                                 INFO -- #2857031468 Features                             20         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_015jvt_L1J15 #2938374624
+TrigSignatureMoniMT                                 INFO -- #2938374624 Events         20         20         12         -          -          -          -          -          12
+TrigSignatureMoniMT                                 INFO -- #2938374624 Features                             19         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_059jvt_L1J15 #1593009344
+TrigSignatureMoniMT                                 INFO -- #1593009344 Events         20         20         12         -          -          -          -          -          12
+TrigSignatureMoniMT                                 INFO -- #1593009344 Features                             19         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_L1J15 #3341539267
+TrigSignatureMoniMT                                 INFO -- #3341539267 Events         20         20         19         -          -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #3341539267 Features                             51         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_bmv2c1070_split_L1J20 #991419339
+TrigSignatureMoniMT                                 INFO -- #991419339 Events          19         19         19         4          -          -          -          -          4
+TrigSignatureMoniMT                                 INFO -- #991419339 Features                              50         8          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20 #1961149049
+TrigSignatureMoniMT                                 INFO -- #1961149049 Events         19         19         19         19         -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #1961149049 Features                             50         50         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subjesgscIS_pf_L1J20 #761060030
+TrigSignatureMoniMT                                 INFO -- #761060030 Events          19         19         16         -          -          -          -          -          16
+TrigSignatureMoniMT                                 INFO -- #761060030 Features                              31         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subresjesgscIS_L1J15 #1509925407
+TrigSignatureMoniMT                                 INFO -- #1509925407 Events         20         20         18         -          -          -          -          -          18
+TrigSignatureMoniMT                                 INFO -- #1509925407 Features                             44         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_subresjesgscIS_pf_L1J20 #4012311417
+TrigSignatureMoniMT                                 INFO -- #4012311417 Events         19         19         16         -          -          -          -          -          16
+TrigSignatureMoniMT                                 INFO -- #4012311417 Features                             31         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_nojcalib_L1J20 #2042444294
+TrigSignatureMoniMT                                 INFO -- #2042444294 Events         19         19         17         -          -          -          -          -          17
+TrigSignatureMoniMT                                 INFO -- #2042444294 Features                             39         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j45_sktc_nojcalib_L1J20 #1542468090
+TrigSignatureMoniMT                                 INFO -- #1542468090 Events         19         19         15         -          -          -          -          -          15
+TrigSignatureMoniMT                                 INFO -- #1542468090 Features                             26         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j460_a10_lcw_subjes_L1J100 #3327656707
+TrigSignatureMoniMT                                 INFO -- #3327656707 Events         3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3327656707 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j460_a10_lcw_subjes_L1J20 #215408633
+TrigSignatureMoniMT                                 INFO -- #215408633 Events          19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #215408633 Features                              0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j460_a10r_L1J100 #1151767619
+TrigSignatureMoniMT                                 INFO -- #1151767619 Events         3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1151767619 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j460_a10r_L1J20 #3875082669
+TrigSignatureMoniMT                                 INFO -- #3875082669 Events         19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3875082669 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j460_a10t_lcw_jes_30smcINF_L1J100 #2296827117
+TrigSignatureMoniMT                                 INFO -- #2296827117 Events         3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2296827117 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j460_a10t_lcw_jes_L1J100 #436385969
+TrigSignatureMoniMT                                 INFO -- #436385969 Events          3          3          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #436385969 Features                              0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20 #3634067472
+TrigSignatureMoniMT                                 INFO -- #3634067472 Events         19         19         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3634067472 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j80_L1J15 #2440872308
+TrigSignatureMoniMT                                 INFO -- #2440872308 Events         20         20         13         -          -          -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #2440872308 Features                             23         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j80_j60_L1J15 #582699527
+TrigSignatureMoniMT                                 INFO -- #582699527 Events          20         20         8          -          -          -          -          -          8
+TrigSignatureMoniMT                                 INFO -- #582699527 Features                              23         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j85_L1J20 #510475538
+TrigSignatureMoniMT                                 INFO -- #510475538 Events          19         19         13         -          -          -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #510475538 Features                              21         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j85_ftf_L1J20 #877042532
+TrigSignatureMoniMT                                 INFO -- #877042532 Events          19         19         13         -          -          -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #877042532 Features                              21         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_j85_ftf_pf_L1J20 #1538535401
+TrigSignatureMoniMT                                 INFO -- #1538535401 Events         19         19         8          -          -          -          -          -          8
+TrigSignatureMoniMT                                 INFO -- #1538535401 Features                             13         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mb_sptrk_L1RD0_FILLED #4097312640
+TrigSignatureMoniMT                                 INFO -- #4097312640 Events         20         20         20         20         -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #4097312640 Features                             20         20         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu0_muoncalib_L1MU20 #997163309
+TrigSignatureMoniMT                                 INFO -- #997163309 Events          8          8          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #997163309 Features                              0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu0_muoncalib_L1MU4_EMPTY #782182242
+TrigSignatureMoniMT                                 INFO -- #782182242 Events          0          0          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #782182242 Features                              0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu10_L1MU10 #209090273
+TrigSignatureMoniMT                                 INFO -- #209090273 Events          10         10         10         10         10         9          -          -          9
+TrigSignatureMoniMT                                 INFO -- #209090273 Features                              13         12         13         11         -          -
+TrigSignatureMoniMT                                 INFO HLT_mu10_ivarmedium_mu10_10invm70_L12MU10 #2386882549
+TrigSignatureMoniMT                                 INFO -- #2386882549 Events         3          3          3          2          2          2          2          -          2
+TrigSignatureMoniMT                                 INFO -- #2386882549 Features                             6          4          4          4          2          -
+TrigSignatureMoniMT                                 INFO HLT_mu10_lateMu_L1MU10 #48780310
+TrigSignatureMoniMT                                 INFO -- #48780310 Events           10         10         0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #48780310 Features                               0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu11_mu6_bJpsimumu_L1MU11_2MU6 #2504965945
+TrigSignatureMoniMT                                 INFO -- #2504965945 Events         4          4          4          0          3          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2504965945 Features                             8          0          6          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu11_mu6_bUpsimumu_L1MU11_2MU6 #1171632195
+TrigSignatureMoniMT                                 INFO -- #1171632195 Events         4          4          4          0          3          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1171632195 Features                             8          0          6          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu14_L1MU10 #1696906927
+TrigSignatureMoniMT                                 INFO -- #1696906927 Events         10         10         10         7          7          7          -          -          7
+TrigSignatureMoniMT                                 INFO -- #1696906927 Features                             13         8          8          8          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu20_2mu4noL1_L1MU20 #1029128679
+TrigSignatureMoniMT                                 INFO -- #1029128679 Events         8          8          8          5          5          5          1          1          1
+TrigSignatureMoniMT                                 INFO -- #1029128679 Features                             10         6          6          6          2          2
+TrigSignatureMoniMT                                 INFO HLT_mu20_ivar_L1MU6 #2083734526
+TrigSignatureMoniMT                                 INFO -- #2083734526 Events         10         10         10         5          5          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #2083734526 Features                             14         6          5          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu22_2mu4noL1_L1MU20 #3427670100
+TrigSignatureMoniMT                                 INFO -- #3427670100 Events         8          8          8          5          5          5          1          1          1
+TrigSignatureMoniMT                                 INFO -- #3427670100 Features                             10         6          6          6          2          2
+TrigSignatureMoniMT                                 INFO HLT_mu22_mu8noL1_L1MU20 #3165652409
+TrigSignatureMoniMT                                 INFO -- #3165652409 Events         8          8          8          5          5          5          2          2          2
+TrigSignatureMoniMT                                 INFO -- #3165652409 Features                             10         6          6          6          3          3
+TrigSignatureMoniMT                                 INFO HLT_mu24_2mu4noL1_L1MU20 #3233544630
+TrigSignatureMoniMT                                 INFO -- #3233544630 Events         8          8          8          5          5          5          1          1          1
+TrigSignatureMoniMT                                 INFO -- #3233544630 Features                             10         6          6          6          2          2
+TrigSignatureMoniMT                                 INFO HLT_mu24_L1MU20 #417425162
+TrigSignatureMoniMT                                 INFO -- #417425162 Events          8          8          8          5          5          5          -          -          5
+TrigSignatureMoniMT                                 INFO -- #417425162 Features                              10         6          6          6          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu24_idperf_L1MU20 #677658909
+TrigSignatureMoniMT                                 INFO -- #677658909 Events          8          8          6          6          6          6          -          -          6
+TrigSignatureMoniMT                                 INFO -- #677658909 Features                              7          7          7          7          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu24_mu10noL1_L1MU20 #2563354236
+TrigSignatureMoniMT                                 INFO -- #2563354236 Events         8          8          8          5          5          5          2          2          2
+TrigSignatureMoniMT                                 INFO -- #2563354236 Features                             10         6          6          6          3          3
+TrigSignatureMoniMT                                 INFO HLT_mu26_L1MU20 #311138376
+TrigSignatureMoniMT                                 INFO -- #311138376 Events          8          8          8          5          4          3          -          -          3
+TrigSignatureMoniMT                                 INFO -- #311138376 Features                              10         6          5          4          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu26_ivarmedium_L1MU20 #3411723090
+TrigSignatureMoniMT                                 INFO -- #3411723090 Events         8          8          8          5          4          3          2          -          2
+TrigSignatureMoniMT                                 INFO -- #3411723090 Features                             10         6          5          4          2          -
+TrigSignatureMoniMT                                 INFO HLT_mu26_mu10noL1_L1MU20 #2318302287
+TrigSignatureMoniMT                                 INFO -- #2318302287 Events         8          8          8          5          4          3          1          1          1
+TrigSignatureMoniMT                                 INFO -- #2318302287 Features                             10         6          5          4          2          2
+TrigSignatureMoniMT                                 INFO HLT_mu26_mu8noL1_L1MU20 #2233067926
+TrigSignatureMoniMT                                 INFO -- #2233067926 Events         8          8          8          5          4          3          1          1          1
+TrigSignatureMoniMT                                 INFO -- #2233067926 Features                             10         6          5          4          2          2
+TrigSignatureMoniMT                                 INFO HLT_mu28_ivarmedium_L1MU20 #1963262787
+TrigSignatureMoniMT                                 INFO -- #1963262787 Events         8          8          8          5          4          3          2          -          2
+TrigSignatureMoniMT                                 INFO -- #1963262787 Features                             10         6          5          3          2          -
+TrigSignatureMoniMT                                 INFO HLT_mu28_mu8noL1_L1MU20 #86648125
+TrigSignatureMoniMT                                 INFO -- #86648125 Events           8          8          8          5          4          3          1          1          1
+TrigSignatureMoniMT                                 INFO -- #86648125 Features                               10         6          5          3          1          1
+TrigSignatureMoniMT                                 INFO HLT_mu35_ivarmedium_L1MU20 #597064890
+TrigSignatureMoniMT                                 INFO -- #597064890 Events          8          8          8          5          3          2          1          -          1
+TrigSignatureMoniMT                                 INFO -- #597064890 Features                              10         6          4          2          1          -
+TrigSignatureMoniMT                                 INFO HLT_mu50_L1MU20 #3657158931
+TrigSignatureMoniMT                                 INFO -- #3657158931 Events         8          8          8          5          1          1          -          -          1
+TrigSignatureMoniMT                                 INFO -- #3657158931 Features                             10         6          1          1          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu50_RPCPEBSecondaryReadout_L1MU20 #827327262
+TrigSignatureMoniMT                                 INFO -- #827327262 Events          8          8          8          5          1          1          1          -          1
+TrigSignatureMoniMT                                 INFO -- #827327262 Features                              10         6          1          1          1          -
+TrigSignatureMoniMT                                 INFO HLT_mu60_0eta105_msonly_L1MU20 #1642591450
+TrigSignatureMoniMT                                 INFO -- #1642591450 Events         8          8          1          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1642591450 Features                             2          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu60_L1MU20 #2871837722
+TrigSignatureMoniMT                                 INFO -- #2871837722 Events         8          8          8          5          1          1          -          -          1
+TrigSignatureMoniMT                                 INFO -- #2871837722 Features                             10         6          1          1          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu6Comb_L1MU6 #996392590
+TrigSignatureMoniMT                                 INFO -- #996392590 Events          10         10         10         10         -          -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #996392590 Features                              14         13         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu6_L1MU6 #2560542253
+TrigSignatureMoniMT                                 INFO -- #2560542253 Events         10         10         10         10         10         10         -          -          10
+TrigSignatureMoniMT                                 INFO -- #2560542253 Features                             14         13         16         21         -          -
+TrigSignatureMoniMT                                 INFO HLT_mu6_idperf_L1MU6 #934918532
+TrigSignatureMoniMT                                 INFO -- #934918532 Events          10         10         10         10         10         10         -          -          10
+TrigSignatureMoniMT                                 INFO -- #934918532 Features                              14         14         17         27         -          -
+TrigSignatureMoniMT                                 INFO HLT_mu6_ivarmedium_L1MU6 #1012713062
+TrigSignatureMoniMT                                 INFO -- #1012713062 Events         10         10         10         10         10         10         6          -          6
+TrigSignatureMoniMT                                 INFO -- #1012713062 Features                             14         13         16         21         6          -
+TrigSignatureMoniMT                                 INFO HLT_mu6_msonly_L1MU6 #3895421032
+TrigSignatureMoniMT                                 INFO -- #3895421032 Events         10         10         10         0          10         -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #3895421032 Features                             14         0          17         -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu6_mu4_L12MU4 #1713982776
+TrigSignatureMoniMT                                 INFO -- #1713982776 Events         4          4          4          4          4          4          -          -          4
+TrigSignatureMoniMT                                 INFO -- #1713982776 Features                             8          8          12         18         -          -
+TrigSignatureMoniMT                                 INFO HLT_mu6_mu6noL1_L1MU6 #451489897
+TrigSignatureMoniMT                                 INFO -- #451489897 Events          10         10         10         10         10         10         6          4          4
+TrigSignatureMoniMT                                 INFO -- #451489897 Features                              14         13         16         21         9          7
+TrigSignatureMoniMT                                 INFO HLT_mu6fast_L1MU6 #3518031697
+TrigSignatureMoniMT                                 INFO -- #3518031697 Events         10         10         10         -          -          -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #3518031697 Features                             14         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu80_L1MU20 #387900377
+TrigSignatureMoniMT                                 INFO -- #387900377 Events          8          8          8          5          0          0          -          -          0
+TrigSignatureMoniMT                                 INFO -- #387900377 Features                              10         6          0          0          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu80_msonly_3layersEC_L1MU20 #761101109
+TrigSignatureMoniMT                                 INFO -- #761101109 Events          8          8          8          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #761101109 Features                              10         0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_mu8_L1MU6 #1467711434
+TrigSignatureMoniMT                                 INFO -- #1467711434 Events         10         10         10         10         10         10         -          -          10
+TrigSignatureMoniMT                                 INFO -- #1467711434 Features                             14         13         15         19         -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1Calo #355689512
+TrigSignatureMoniMT                                 INFO -- #355689512 Events          20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #355689512 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1Calo_EMPTY #3717801557
+TrigSignatureMoniMT                                 INFO -- #3717801557 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3717801557 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM10VH #314199913
+TrigSignatureMoniMT                                 INFO -- #314199913 Events          11         11         -          -          -          -          -          -          11
+TrigSignatureMoniMT                                 INFO -- #314199913 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM12 #3885916609
+TrigSignatureMoniMT                                 INFO -- #3885916609 Events         16         16         -          -          -          -          -          -          16
+TrigSignatureMoniMT                                 INFO -- #3885916609 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM15 #480733925
+TrigSignatureMoniMT                                 INFO -- #480733925 Events          14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #480733925 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM15VH #2374865899
+TrigSignatureMoniMT                                 INFO -- #2374865899 Events         8          8          -          -          -          -          -          -          8
+TrigSignatureMoniMT                                 INFO -- #2374865899 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM20VH #3719542824
+TrigSignatureMoniMT                                 INFO -- #3719542824 Events         7          7          -          -          -          -          -          -          7
+TrigSignatureMoniMT                                 INFO -- #3719542824 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM22VHI #1723589313
+TrigSignatureMoniMT                                 INFO -- #1723589313 Events         6          6          -          -          -          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #1723589313 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM3 #4169267792
+TrigSignatureMoniMT                                 INFO -- #4169267792 Events         20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #4169267792 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM7 #3226970354
+TrigSignatureMoniMT                                 INFO -- #3226970354 Events         20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #3226970354 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM8VH #4065285611
+TrigSignatureMoniMT                                 INFO -- #4065285611 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #4065285611 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J100 #1026959128
+TrigSignatureMoniMT                                 INFO -- #1026959128 Events         3          3          -          -          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #1026959128 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J12 #2640820608
+TrigSignatureMoniMT                                 INFO -- #2640820608 Events         20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #2640820608 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J120 #2116228652
+TrigSignatureMoniMT                                 INFO -- #2116228652 Events         1          1          -          -          -          -          -          -          1
+TrigSignatureMoniMT                                 INFO -- #2116228652 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J15 #1976430774
+TrigSignatureMoniMT                                 INFO -- #1976430774 Events         20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #1976430774 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J20 #2241112369
+TrigSignatureMoniMT                                 INFO -- #2241112369 Events         19         19         -          -          -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #2241112369 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J25 #39428635
+TrigSignatureMoniMT                                 INFO -- #39428635 Events           17         17         -          -          -          -          -          -          17
+TrigSignatureMoniMT                                 INFO -- #39428635 Features                               -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J30 #3523994129
+TrigSignatureMoniMT                                 INFO -- #3523994129 Events         17         17         -          -          -          -          -          -          17
+TrigSignatureMoniMT                                 INFO -- #3523994129 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J40 #1497591431
+TrigSignatureMoniMT                                 INFO -- #1497591431 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #1497591431 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J400 #2494874701
+TrigSignatureMoniMT                                 INFO -- #2494874701 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2494874701 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J50 #3346352675
+TrigSignatureMoniMT                                 INFO -- #3346352675 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #3346352675 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J75 #1651897827
+TrigSignatureMoniMT                                 INFO -- #1651897827 Events         6          6          -          -          -          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #1651897827 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1J85 #166231461
+TrigSignatureMoniMT                                 INFO -- #166231461 Events          5          5          -          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #166231461 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1RD0_EMPTY #914660695
+TrigSignatureMoniMT                                 INFO -- #914660695 Events          0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #914660695 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1RD0_FILLED #211699639
+TrigSignatureMoniMT                                 INFO -- #211699639 Events          20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #211699639 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1Standby #420861540
+TrigSignatureMoniMT                                 INFO -- #420861540 Events          20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #420861540 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU12 #4248050338
+TrigSignatureMoniMT                                 INFO -- #4248050338 Events         18         18         -          -          -          -          -          -          18
+TrigSignatureMoniMT                                 INFO -- #4248050338 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU12IM #357557968
+TrigSignatureMoniMT                                 INFO -- #357557968 Events          14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #357557968 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU20 #3602376876
+TrigSignatureMoniMT                                 INFO -- #3602376876 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #3602376876 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU20IM #1931583332
+TrigSignatureMoniMT                                 INFO -- #1931583332 Events         10         10         -          -          -          -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #1931583332 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU30 #1944789678
+TrigSignatureMoniMT                                 INFO -- #1944789678 Events         13         13         -          -          -          -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #1944789678 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU40 #1394621652
+TrigSignatureMoniMT                                 INFO -- #1394621652 Events         7          7          -          -          -          -          -          -          7
+TrigSignatureMoniMT                                 INFO -- #1394621652 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU60 #3332424451
+TrigSignatureMoniMT                                 INFO -- #3332424451 Events         5          5          -          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #3332424451 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU8 #3165115874
+TrigSignatureMoniMT                                 INFO -- #3165115874 Events         19         19         -          -          -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #3165115874 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE10 #1583053368
+TrigSignatureMoniMT                                 INFO -- #1583053368 Events         19         19         -          -          -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #1583053368 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE30 #2047368922
+TrigSignatureMoniMT                                 INFO -- #2047368922 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #2047368922 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE300 #1315853555
+TrigSignatureMoniMT                                 INFO -- #1315853555 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1315853555 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE35 #2313039014
+TrigSignatureMoniMT                                 INFO -- #2313039014 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #2313039014 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE40 #4293469116
+TrigSignatureMoniMT                                 INFO -- #4293469116 Events         14         14         -          -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #4293469116 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE45 #2365048177
+TrigSignatureMoniMT                                 INFO -- #2365048177 Events         13         13         -          -          -          -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #2365048177 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE50 #1168752081
+TrigSignatureMoniMT                                 INFO -- #1168752081 Events         10         10         -          -          -          -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #1168752081 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE55 #268928384
+TrigSignatureMoniMT                                 INFO -- #268928384 Events          8          8          -          -          -          -          -          -          8
+TrigSignatureMoniMT                                 INFO -- #268928384 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE60 #4154240531
+TrigSignatureMoniMT                                 INFO -- #4154240531 Events         8          8          -          -          -          -          -          -          8
+TrigSignatureMoniMT                                 INFO -- #4154240531 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE70 #3765216228
+TrigSignatureMoniMT                                 INFO -- #3765216228 Events         4          4          -          -          -          -          -          -          4
+TrigSignatureMoniMT                                 INFO -- #3765216228 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE80 #2742079961
+TrigSignatureMoniMT                                 INFO -- #2742079961 Events         3          3          -          -          -          -          -          -          3
+TrigSignatureMoniMT                                 INFO -- #2742079961 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_bkg_L1Bkg #2032528907
+TrigSignatureMoniMT                                 INFO -- #2032528907 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2032528907 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1EM3_EMPTY #2458124284
+TrigSignatureMoniMT                                 INFO -- #2458124284 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2458124284 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1EM7_EMPTY #299938202
+TrigSignatureMoniMT                                 INFO -- #299938202 Events          0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #299938202 Features                              -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J12_EMPTY #3144024902
+TrigSignatureMoniMT                                 INFO -- #3144024902 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3144024902 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J12_FIRSTEMPTY #3840098930
+TrigSignatureMoniMT                                 INFO -- #3840098930 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3840098930 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J30_31ETA49_EMPTY #4143623058
+TrigSignatureMoniMT                                 INFO -- #4143623058 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #4143623058 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J30_EMPTY #2991490897
+TrigSignatureMoniMT                                 INFO -- #2991490897 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2991490897 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J30_FIRSTEMPTY #2214697960
+TrigSignatureMoniMT                                 INFO -- #2214697960 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2214697960 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1RD1_BGRP10 #48519027
+TrigSignatureMoniMT                                 INFO -- #48519027 Events           0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #48519027 Features                               -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1RD1_EMPTY #3925252528
+TrigSignatureMoniMT                                 INFO -- #3925252528 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3925252528 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_idmon_L1RD0_EMPTY #56818284
+TrigSignatureMoniMT                                 INFO -- #56818284 Events           0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #56818284 Features                               -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_idmon_L1RD0_FILLED #1198298874
+TrigSignatureMoniMT                                 INFO -- #1198298874 Events         20         20         -          -          -          -          -          -          20
+TrigSignatureMoniMT                                 INFO -- #1198298874 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_idmon_L1RD0_UNPAIRED_ISO #2536676873
+TrigSignatureMoniMT                                 INFO -- #2536676873 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2536676873 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_l1calo_L1J400 #1694511185
+TrigSignatureMoniMT                                 INFO -- #1694511185 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1694511185 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_mb_L1RD2_EMPTY #3788962163
+TrigSignatureMoniMT                                 INFO -- #3788962163 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3788962163 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_noalg_zb_L1ZB #1289992951
+TrigSignatureMoniMT                                 INFO -- #1289992951 Events         0          0          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1289992951 Features                             -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_sct_noise_SCTPEB_L1RD0_EMPTY #3024203296
+TrigSignatureMoniMT                                 INFO -- #3024203296 Events         0          0          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #3024203296 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau0_perf_ptonly_L1TAU100 #2342716369
+TrigSignatureMoniMT                                 INFO -- #2342716369 Events         0          0          0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2342716369 Features                             0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau0_perf_ptonly_L1TAU12 #372992233
+TrigSignatureMoniMT                                 INFO -- #372992233 Events          18         18         18         18         -          -          -          -          18
+TrigSignatureMoniMT                                 INFO -- #372992233 Features                              42         42         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau0_perf_ptonly_L1TAU60 #1376650121
+TrigSignatureMoniMT                                 INFO -- #1376650121 Events         5          5          5          5          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #1376650121 Features                             6          6          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau160_idperf_track_L1TAU100 #714660857
+TrigSignatureMoniMT                                 INFO -- #714660857 Events          0          0          0          0          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #714660857 Features                              0          0          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau160_idperf_tracktwoMVA_L1TAU100 #2725693236
+TrigSignatureMoniMT                                 INFO -- #2725693236 Events         0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2725693236 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau160_idperf_tracktwo_L1TAU100 #886074432
+TrigSignatureMoniMT                                 INFO -- #886074432 Events          0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #886074432 Features                              0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100 #1747754287
+TrigSignatureMoniMT                                 INFO -- #1747754287 Events         0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1747754287 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau160_perf_tracktwoMVA_L1TAU100 #2334140248
+TrigSignatureMoniMT                                 INFO -- #2334140248 Events         0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2334140248 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau160_perf_tracktwo_L1TAU100 #1799096347
+TrigSignatureMoniMT                                 INFO -- #1799096347 Events         0          0          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1799096347 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_idperf_track_L1TAU12IM #554271976
+TrigSignatureMoniMT                                 INFO -- #554271976 Events          14         14         14         14         -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #554271976 Features                              24         24         -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_idperf_tracktwoMVA_L1TAU12IM #988149859
+TrigSignatureMoniMT                                 INFO -- #988149859 Events          14         14         14         13         13         -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #988149859 Features                              24         17         17         -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_idperf_tracktwo_L1TAU12IM #3346942453
+TrigSignatureMoniMT                                 INFO -- #3346942453 Events         14         14         14         13         13         -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #3346942453 Features                             24         17         17         -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_looseRNN_tracktwoMVA_L1TAU12IM #169452969
+TrigSignatureMoniMT                                 INFO -- #169452969 Events          14         14         12         11         10         -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #169452969 Features                              22         15         13         -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_looseRNN_tracktwo_L1TAU12IM #2490017573
+TrigSignatureMoniMT                                 INFO -- #2490017573 Events         14         14         12         11         0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2490017573 Features                             22         15         0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_medium1_tracktwoEF_L1TAU12IM #506456080
+TrigSignatureMoniMT                                 INFO -- #506456080 Events          14         14         12         11         0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #506456080 Features                              22         15         0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_medium1_tracktwoMVA_L1TAU12IM #4055280067
+TrigSignatureMoniMT                                 INFO -- #4055280067 Events         14         14         12         11         0          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #4055280067 Features                             22         15         0          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_medium1_tracktwo_L1TAU12IM #1433975745
+TrigSignatureMoniMT                                 INFO -- #1433975745 Events         14         14         12         11         7          -          -          -          7
+TrigSignatureMoniMT                                 INFO -- #1433975745 Features                             22         15         7          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_mediumRNN_tracktwoMVA_L1TAU12IM #2222894847
+TrigSignatureMoniMT                                 INFO -- #2222894847 Events         14         14         12         11         7          -          -          -          7
+TrigSignatureMoniMT                                 INFO -- #2222894847 Features                             22         15         9          -          -          -
+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          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_perf_tracktwoMVA_L1TAU12IM #112814536
+TrigSignatureMoniMT                                 INFO -- #112814536 Events          14         14         14         13         13         -          -          -          13
+TrigSignatureMoniMT                                 INFO -- #112814536 Features                              24         17         17         -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_perf_tracktwo_L1TAU12IM #1129072492
+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         6          -          -          -
+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          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_verylooseRNN_tracktwoMVA_L1TAU12IM #2992830434
+TrigSignatureMoniMT                                 INFO -- #2992830434 Events         14         14         12         11         10         -          -          -          10
+TrigSignatureMoniMT                                 INFO -- #2992830434 Features                             22         15         14         -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tau25_verylooseRNN_tracktwo_L1TAU12IM #1275052132
+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         6          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #2456480859 Features                             20         14         8          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_tilecalib_laser_TilePEB_L1CALREQ2 #1063154655
+TrigSignatureMoniMT                                 INFO -- #1063154655 Events         0          0          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1063154655 Features                             0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_timeburner_L1All #819160059
+TrigSignatureMoniMT                                 INFO -- #819160059 Events          20         20         0          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #819160059 Features                              0          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe100_mht_L1XE50 #532175988
+TrigSignatureMoniMT                                 INFO -- #532175988 Events          10         10         6          -          -          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #532175988 Features                              6          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe100_pfsum_L1XE50 #1890237897
+TrigSignatureMoniMT                                 INFO -- #1890237897 Events         10         10         2          -          -          -          -          -          2
+TrigSignatureMoniMT                                 INFO -- #1890237897 Features                             2          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe100_tcpufit_L1XE50 #2803198799
+TrigSignatureMoniMT                                 INFO -- #2803198799 Events         10         10         6          -          -          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #2803198799 Features                             6          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe100_trkmht_L1XE50 #1055916731
+TrigSignatureMoniMT                                 INFO -- #1055916731 Events         10         10         4          -          -          -          -          -          4
+TrigSignatureMoniMT                                 INFO -- #1055916731 Features                             4          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe110_mht_L1XE50 #3030733259
+TrigSignatureMoniMT                                 INFO -- #3030733259 Events         10         10         6          -          -          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #3030733259 Features                             6          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe110_tc_em_L1XE50 #607113828
+TrigSignatureMoniMT                                 INFO -- #607113828 Events          10         10         5          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #607113828 Features                              5          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe110_tcpufit_L1XE50 #892853397
+TrigSignatureMoniMT                                 INFO -- #892853397 Events          10         10         6          -          -          -          -          -          6
+TrigSignatureMoniMT                                 INFO -- #892853397 Features                              6          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe30_cell_L1XE10 #1649696554
+TrigSignatureMoniMT                                 INFO -- #1649696554 Events         19         19         17         -          -          -          -          -          17
+TrigSignatureMoniMT                                 INFO -- #1649696554 Features                             17         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe30_cell_xe30_tcpufit_L1XE10 #3768353779
+TrigSignatureMoniMT                                 INFO -- #3768353779 Events         19         19         14         -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #3768353779 Features                             14         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe30_mht_L1XE10 #3626903018
+TrigSignatureMoniMT                                 INFO -- #3626903018 Events         19         19         19         -          -          -          -          -          19
+TrigSignatureMoniMT                                 INFO -- #3626903018 Features                             19         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe30_pfsum_L1XE10 #998713382
+TrigSignatureMoniMT                                 INFO -- #998713382 Events          19         19         14         -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #998713382 Features                              14         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe30_tcpufit_L1XE10 #1583719916
+TrigSignatureMoniMT                                 INFO -- #1583719916 Events         19         19         14         -          -          -          -          -          14
+TrigSignatureMoniMT                                 INFO -- #1583719916 Features                             14         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe30_trkmht_L1XE10 #2468872349
+TrigSignatureMoniMT                                 INFO -- #2468872349 Events         19         19         17         -          -          -          -          -          17
+TrigSignatureMoniMT                                 INFO -- #2468872349 Features                             17         -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe65_cell_L1XE50 #531141817
+TrigSignatureMoniMT                                 INFO -- #531141817 Events          10         10         7          -          -          -          -          -          7
+TrigSignatureMoniMT                                 INFO -- #531141817 Features                              7          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_xe65_cell_xe110_tcpufit_L1XE50 #115518400
+TrigSignatureMoniMT                                 INFO -- #115518400 Events          10         10         5          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #115518400 Features                              5          -          -          -          -          -
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py
index cdccd5e14d484967ec637fa9e52794fa7246a10f..e1fc8bfc1ec8d174de2a0648a60e48e2a56158d1 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py
@@ -162,8 +162,8 @@ if ( True ) :
 
     "HLT_tau.*_idperf.*:HLT_IDTrack_TauCore_FTF",
     "HLT_tau.*_idperf.*:HLT_IDTrack_TauIso_FTF",
-    "HLT_tau.*_idperf.*:HLT_IDTrack_TauCore_FTF:HLT_Roi_TauCore",
-    "HLT_tau.*_idperf.*:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso",
+    "HLT_tau.*_idperf.*:HLT_IDTrack_TauCore_FTF:roi=HLT_Roi_TauCore",
+    "HLT_tau.*_idperf.*:HLT_IDTrack_TauIso_FTF:roi=HLT_Roi_TauIso",
     "HLT_tau.*_idperf.*:HLT_IDTrack_Tau_IDTrig",
     "HLT_tau.*_idperf.*:HLT_IDTrack_Tau_FTF"
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_grid.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
similarity index 91%
rename from Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_grid.py
rename to Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
index dcbb230d96a5fe191589e8c1e5bb4445b247d7e8..3745db15c4ee8dc671b62cbc13a2f4d010386961 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_grid.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
@@ -123,29 +123,29 @@ if ((not exclude) or postproc ):
  
 # Now the comparitor steps
 comp=TrigInDetCompStep('CompareStep1')
-comp.chains = 'HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF'
-comp.output_dir = 'HLT-plots-muon-FTF'
+comp.chains = 'HLT_mu24_idperf_L1MU20:HLT_IDTrack_Muon_FTF'
+comp.output_dir = 'HLTL2-plots-muon'
 test.check_steps.append(comp)
  
  
 comp2=TrigInDetCompStep('CompareStep2')
-comp2.chains='HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_IDTrig'
-comp2.output_dir = 'HLT-plots-muon-IDTrig'
+comp2.chains='HLT_mu24_idperf_L1MU20:HLT_IDTrack_Muon_FTF  HLT_mu24_idperf_L1MU20:HLT_IDTrack_Muon_IDTrig'
+comp2.output_dir = 'HLTEF-plots-muon'
 test.check_steps.append(comp2)
 
 comp3=TrigInDetCompStep('CompareStep3')
 comp3.chains='HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig'
-comp3.output_dir = 'HLT-plots-bjet-IDTrig'
+comp3.output_dir = 'HLTEF-plots-bjet'
 test.check_steps.append(comp3)
 
 comp4=TrigInDetCompStep('CompareStep4')
 comp4.chains='HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_FTF HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_IDTrig'
-comp4.output_dir = 'HLT-plots-el-IDTrig'
+comp4.output_dir = 'HLTEF-plots-electron'
 test.check_steps.append(comp4)
 
 comp5=TrigInDetCompStep('CompareStep5')
 comp5.chains='HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig'
-comp4.output_dir = 'HLT-plots-tau-IDTrig'
+comp5.output_dir = 'HLTEF-plots-tau'
 test.check_steps.append(comp5)
 
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt_grid.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
similarity index 71%
rename from Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt_grid.py
rename to Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
index 56571d8086a90c9d2b5199e799886458bdb125b0..dbf9b1d6b19b22dd1f42e101f016bdcb4d721c1c 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt_grid.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
@@ -27,7 +27,7 @@
 
 
 from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep
+from TrigInDetValidation.TrigInDetArtSteps import TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
 
 
 import sys,getopt
@@ -113,16 +113,40 @@ test.check_steps.append(TrigInDetdictStep())
  
 # Now the comparitor steps
 comp=TrigInDetCompStep('CompareStep1')
-comp.chains = 'HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF'
-comp.output_dir = 'HLT-plots-FTF'
+comp.chains = 'HLT_mu24_idperf_L1MU20:HLT_IDTrack_Muon_FTF'
+comp.output_dir = 'HLTL2-plots-muon'
 test.check_steps.append(comp)
  
  
 comp2=TrigInDetCompStep('CompareStep2')
-comp2.chains='HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_IDTrig'
-comp2.output_dir = 'HLT-plots-IDTrig'
+comp2.chains='HLT_mu24_idperf_L1MU20:HLT_IDTrack_Muon_FTF  HLT_mu24_idperf_L1MU20:HLT_IDTrack_Muon_IDTrig'
+comp2.output_dir = 'HLTEF-plots-muon'
 test.check_steps.append(comp2)
 
+comp3=TrigInDetCompStep('CompareStep3')
+comp3.chains='HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig'
+comp3.output_dir = 'HLTEF-plots-bjet'
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('CompareStep4')
+comp4.chains='HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_FTF HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_IDTrig'
+comp4.output_dir = 'HLTEF-plots-electron'
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('CompareStep5')
+comp5.chains='HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig'
+comp5.output_dir = 'HLTEF-plots-tau'
+test.check_steps.append(comp5)
+
+
+cpucost=TrigInDetCpuCostStep('CpuCostStep1')
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+cpucost2.args += '  -p FastTrack'
+cpucost2.output_dir = 'times-FTF' 
+test.check_steps.append(cpucost2)
+
 
 import sys
 sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py
new file mode 100755
index 0000000000000000000000000000000000000000..f7dfc28ec536dae2ca32de47755857892a46b7f4
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+
+# art-description: art job for all_ttbar_pu80_grid
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
+from TrigInDetValidation.TrigInDetArtSteps import TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+chains = [
+    'HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20'
+]
+
+preexec_trig = ';'.join([
+    'doEmptyMenu=True',
+    'doBjetSlice=True',
+    'selectChains='+str(chains)
+])
+
+
+preexec_reco = ';'.join([
+    'from RecExConfig.RecFlags import rec',
+    'rec.doForwardDet=False',
+    'rec.doEgamma=False',
+    'rec.doMuonCombined=False',
+    'rec.doJetMissingETTag=False',
+    'rec.doTau=False'
+])
+
+preexec_aod = ';'.join([
+     preexec_reco,
+     '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)'
+])
+
+
+
+preexec_all = ';'.join([
+    'from TriggerJobOpts.TriggerFlags import TriggerFlags',
+    'TriggerFlags.AODEDMSet.set_Value_and_Lock(\\\"AODFULL\\\")',
+])
+
+rdo2aod = ExecStep.ExecStep()
+rdo2aod.type = 'Reco_tf'
+rdo2aod.max_events = 1000 # TODO: 2000 events
+rdo2aod.threads = 1 # TODO: change to 4
+rdo2aod.concurrent_events = 1 # TODO: change to 4
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG" '
+rdo2aod.input = 'ttbar'   
+
+rdo2aod.args += ' --preExec "RDOtoRDOTrigger:{:s};" "all:{:s};" "RAWtoESD:{:s};" "ESDtoAOD:{:s};"'.format(
+    preexec_trig, preexec_all, preexec_reco, preexec_aod)
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat  -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp1=TrigInDetCompStep('CompareStep1')
+comp1.chains='HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig'
+comp1.output_dir = 'HLTEF-plots-bjet'
+test.check_steps.append(comp1)
+
+
+
+cpucost=TrigInDetCpuCostStep('CpuCostStep1')
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+cpucost2.args += '  -p FastTrack'
+cpucost2.output_dir = 'times-FTF' 
+test.check_steps.append(cpucost2)
+
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_test_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_test_pu40.py
new file mode 100755
index 0000000000000000000000000000000000000000..fa70d6ec4291a7f638eec5e4e5199172044c7ebb
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_test_pu40.py
@@ -0,0 +1,136 @@
+#!/usr/bin/env python
+
+# art-description: art job for all_ttbar_pu80_grid
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
+from TrigInDetValidation.TrigInDetArtSteps import TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+chains = [
+    'HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20'
+]
+
+preexec_trig = ';'.join([
+    'doEmptyMenu=True',
+    'doBjetSlice=True',
+    'selectChains='+str(chains),
+    'from TrigBjetHypo.TrigSuperRoiBuilderAllTEConfig import getSuperRoiBuilderAllTEInstance as super; super.EtaHalfWidth = 0.2; super.PhiHalfWidth = 0.2'
+])
+
+
+preexec_reco = ';'.join([
+    'from RecExConfig.RecFlags import rec',
+    'rec.doForwardDet=False',
+    'rec.doEgamma=False',
+    'rec.doMuonCombined=False',
+    'rec.doJetMissingETTag=False',
+    'rec.doTau=False'
+])
+
+preexec_aod = ';'.join([
+     preexec_reco,
+     '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)'
+])
+
+
+
+preexec_all = ';'.join([
+    'from TriggerJobOpts.TriggerFlags import TriggerFlags',
+    'TriggerFlags.AODEDMSet.set_Value_and_Lock(\\\"AODFULL\\\")',
+])
+
+rdo2aod = ExecStep.ExecStep()
+rdo2aod.type = 'Reco_tf'
+rdo2aod.max_events = 1000 # TODO: 2000 events
+rdo2aod.threads = 1 # TODO: change to 4
+rdo2aod.concurrent_events = 1 # TODO: change to 4
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG" '
+rdo2aod.input = 'ttbar'   
+
+rdo2aod.args += ' --preExec "RDOtoRDOTrigger:{:s};" "all:{:s};" "RAWtoESD:{:s};" "ESDtoAOD:{:s};"'.format(
+    preexec_trig, preexec_all, preexec_reco, preexec_aod)
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat  -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp1=TrigInDetCompStep('CompareStep1')
+comp1.chains='HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig'
+comp1.output_dir = 'HLTEF-plots-bjet'
+test.check_steps.append(comp1)
+
+
+
+cpucost=TrigInDetCpuCostStep('CpuCostStep1')
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+cpucost2.args += '  -p FastTrack'
+cpucost2.output_dir = 'times-FTF' 
+test.check_steps.append(cpucost2)
+
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_grid.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py
similarity index 93%
rename from Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_grid.py
rename to Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py
index f725eeab71541be73fd43b775abc34d48648e5d7..0ca7281291a1187ffb173beca3ef6d00bc823223 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_grid.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py
@@ -123,14 +123,14 @@ if ((not exclude) or postproc ):
  
 # Now the comparitor steps
 comp=TrigInDetCompStep('CompareStep1')
-comp.chains = 'HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF'
-comp.output_dir = 'HLT-plots-FTF'
+comp.chains = 'HLT_mu24_idperf:HLT_IDTrack_Muon_FTF'
+comp.output_dir = 'HLTL2-plots-muon'
 test.check_steps.append(comp)
  
  
 comp2=TrigInDetCompStep('CompareStep2')
-comp2.chains='HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_IDTrig'
-comp2.output_dir = 'HLT-plots-IDTrig'
+comp2.chains='HLT_mu24_idperf:HLT_IDTrack_Muon_FTF HLT_mu24_idperf:HLT_IDTrack_Muon_IDTrig'
+comp2.output_dir = 'HLTEF-plots-muon'
 test.check_steps.append(comp2)
 
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py
index 46b519195f92cb7a4a9fc1b45f38fbbed56d1e06..04186e37888ff54d0de8cc233c8a4c2e6ae9d86f 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py
@@ -88,14 +88,14 @@ if ((not exclude) or postproc ):
 
 # Now the comparitor steps
 comp=TrigInDetCompStep('CompareStep1')
-comp.chains = 'HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF'
-comp.output_dir = 'HLT-plots-FTF'
+comp.chains = 'HLT_mu24_idperf:HLT_IDTrack_Muon_FTF'
+comp.output_dir = 'HLTL2-plots-muon'
 test.check_steps.append(comp)
  
  
 comp2=TrigInDetCompStep('CompareStep2')
-comp2.chains='HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_FTF HLT_mu24_idperf_InDetTrigTrackingxAODCnv_Muon_IDTrig'
-comp2.output_dir = 'HLT-plots-IDTrig'
+comp2.chains='HLT_mu24_idperf:HLT_IDTrack_Muon_FTF HLT_mu24_idperf:HLT_IDTrack_Muon_IDTrig'
+comp2.output_dir = 'HLTEF-plots-muon'
 test.check_steps.append(comp2)
 
 cpucost=TrigInDetCpuCostStep('CpuCostStep1')
diff --git a/Trigger/TrigValidation/TrigP1Test/CMakeLists.txt b/Trigger/TrigValidation/TrigP1Test/CMakeLists.txt
index f3d41bf2b516c6a135f16ffc6d07c62605337eb6..ad965b2259c76ad0124fa91d00ae0c19548b71cc 100644
--- a/Trigger/TrigValidation/TrigP1Test/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigP1Test/CMakeLists.txt
@@ -1,26 +1,17 @@
-################################################################################
-# Package: TrigP1Test
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigP1Test )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Trigger/TrigValidation/TrigValTools )
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( bin/*.py test/test*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( bin/*.sh test/test*.sh )
 atlas_install_joboptions( share/*.py )
 atlas_install_data( share/*.ref )
 atlas_install_runtime( Testing/*.trans Testing/*.conf )
-atlas_install_scripts( bin/*.py bin/*.sh test/test*.sh test/test*.py)
 
 # Unit tests:
-atlas_add_test( flake8_test_dir
-                SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/test
-                POST_EXEC_SCRIPT nopost.sh )
-
 atlas_add_test( TrigValSteeringUT
                 SCRIPT trigvalsteering-unit-tester.py ${CMAKE_CURRENT_SOURCE_DIR}/test
                 PROPERTIES TIMEOUT 300
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_build.py
index a7bcf00bd1307c2a83b7b7664b8e8f0b10c06cc0..68f5bb00d0466224f53018e519c79ed2a8ec50c1 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Test running on ALFACalib data with ALFA ROB Monitor enabled
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_forkAndMT_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_forkAndMT_build.py
index 423434064b1d68b8d894ff083704343f2bcb33ce..37bc980259ab05bfa31f3b0f6fdea3c4beab9e84 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_forkAndMT_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_ALFA_forkAndMT_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Test running on ALFACalib data with ALFA ROB Monitor enabled, 2 forks, 3 slots, 6 threads
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_BeamSpot_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_BeamSpot_build.py
index c284f534bde1e29846e7355feb6a0eb0ca039219..6db723a9fdba9d3accfe03007d317f297ddda760 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_BeamSpot_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_BeamSpot_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # art-description: BeamSpot update test using athenaHLT
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_build.py
index 5b0ccc15fa8935fe89b64af71769e7acc6ad8736..ef2f68566deffbaa2515677c9bce71ca6f6b2367 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Events processed by hardcoded chains with data requests, accepted randomly and sent to Full Event build, PEB and DS streams in athenaHLT
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_build.py
index 1043e78e28ab4d911a7bc5ab21b1af96ddfa5be5..bcdf27af205c7adb93fb1105801b6910e2c89b9a 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: CalibPeb test where chains are executed in parallel doing concurrent ROB requests
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_grid.py
index ffa5df4a1f53077aac4b6e1e59e042773b01ecda..4a009eb72b442b3374d971472e4c6525f133c8d5 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_concurrent_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: CalibPeb test where chains are executed in parallel doing concurrent ROB requests
 # art-type: grid
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_highForkAndMT_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_highForkAndMT_build.py
index 37815facdd13cbc37d5a958ec83567c69f264813..772cec10d016a8696185c86dd07cd5a1e0e02d69 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_highForkAndMT_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_CalibPeb_highForkAndMT_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: CalibPeb test with forks=4, threads=6, concurrent_events=3
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py
index 2f5ef52bb2e4e014a95396b4e71b878243c4822a..9395ca795e52da007a0b404ca4df6136a94669d7 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Same as empty_menu test from TrigUpgradeTest, but with athenaHLT
 # art-type: build                                                                  
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py
index 05063ed8a018a7a12365934d51e7fc07e0dbd89a..c4b661afc69c9d80d1b7cce696662c50d3647f8f 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: EmptyMenu test with forks=2, threads=2, concurrent_events=2
 # art-type: build                                                                  
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_OHMonitoring_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_OHMonitoring_build.py
index ae8a5a6cf96a4302e86a1a524d9a52f8d3f743dc..9b9c52b2d91b4bc51da5ee6976c4abcefb3a342d 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_OHMonitoring_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_OHMonitoring_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: HelloWorld in athenaHLT with OH monitoring
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_build.py
index 784570e52783f4cee9d9a9a4da57dff21af458a9..fbf9e99b5dba5e6b99e3055ef3beae39a70018cb 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: HelloWorld in athenaHLT
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_forkAndMT_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_forkAndMT_build.py
index de7ca294faf0f3d24ae5d1988c6039d32970e392..0d034bd2bc654e77b646eb8c97f58f6d2ba1a389 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_forkAndMT_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_forkAndMT_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: HelloWorld test with forks=2, threads=2, concurrent_events=2
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py
index b6a0761e32da4b4f2f17ab198769d4f434a20b98..3fe241d111b2b91bbc6f53749056f2e6f57227e4 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: HelloWorld test with start/stop/start transition
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_PEB_DS_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_PEB_DS_build.py
index 680afeaccb335d4c468ee484eac395f48f665ecb..354111f995759a98351c065c3ff521ca37237547 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_PEB_DS_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_PEB_DS_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of partial event building and data scouting
 # art-type: build                                                                  
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_timeout_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_timeout_build.py
index afe5645fac6f479fac17f0863e6153a6092d35cf..027e3ce34abdc79581ab0e7f26bb15bb07d748d4 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_timeout_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_timeout_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of timeout handling
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py
index 932a2cb0181ca0d7bb6ba279adc40e4fe4cf5660..ba8e9591fe2967b9d2b0b97b3236f1af13b86adf 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger athenaHLT test of the Cosmic_run3_v1 menu on physics_IDCosmic stream from a cosmic run
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py
index ea41f1ea2cd58925e41c7a938a680c068e08a540..92b63a80980ffe545a4df7ed09b93801c5d5cb7c 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger athenaHLT test of the Cosmic_run3_v1 menu on physics_Main stream from a cosmic run
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py
index da9d465200d2f9b904b710912e0353d9609475e7..9f049ba31deaffa37c104e24dcc71cc936b9323f 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger athenaHLT test of the Cosmic_run3_v1 menu on physics_CosmicMuons stream from a cosmic run
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_build.py
index 776d92bb742c25c61424fc2ce6d8bce39dea0c8a..1754feb1a225a9fa88cbad7f6cb791e4f8cfb04b 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of the Dev_pp_run3_v1 menu
 # art-type: build                                                                  
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py
index 92fc4e3b767d224807a2314dcec2b0020a659000..76a5355a30c1ae8da641f268474f5968165e9aba 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Compare athenaHLT configuration with Dev_pp_run3_v1 menu and different threads/slots/forks settings
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py
index 4489ac5f200d902814ee32f89e10680c43b3adf8..f197cf8f7c2964109eabafcca04adab8e80d41bc 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Runs athenaHLT writing BS output and then runs BS decoding
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py
index f1f9c485be53f41892452b7e7227b04da1c24932..d8fab1bab1d981238f9d574913ddd3ae3f2e5e34 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Runs athenaHLT writing BS output and then runs BS decoding
 # art-type: grid
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_dumpConfig_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_dumpConfig_build.py
index cce0421fa70e1dfd72f8c1a89a9553e369a8f159..3dd78793426f92f625c31a054a6157511cc90660 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_dumpConfig_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_dumpConfig_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of the Dev_pp_run3_v1 menu only dumping options for SMK generation
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_fork_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_fork_build.py
index 7083b85e8135db65135f9b513832b21f29af666d..fa8e5a4a3355a1591d93dba5a637c35fe50ad89f 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_fork_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_fork_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of the Dev_pp_run3_v1 menu with multiple forks
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_grid.py
index 0089fd134682767be0cacb88f2291036dba84847..14b4dbf01e78e8c39d07484bf7d4e4167d9bca1e 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of the Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_missingROBs_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_missingROBs_build.py
index b29909a313c50c9e34d3dd0966fec0e28ea26f9a..5445f3cf2fdbb04bd69491ddd39331e924885efe 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_missingROBs_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_missingROBs_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: athenaHLT test of the Dev_pp_run3_v1 menu with detector ROBs removed
 # art-type: build                                                                  
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_preload_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_preload_build.py
index b4e2ff566477775fa0a608c00a788d3ddac78be9..77d05c959d5a26dce593b330554eaba85def3b71 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_preload_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_preload_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # art-description: athenaHLT test of the Dev_pp_run3_v1 menu imitating partition with preloaded data at P1
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py
index 04016eb6d239cdefdb0fb5d4f407be6cc307101e..a854bae5cc8e33dd618065737605d573d972aee8 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0MonTrf_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: transform test of BSRDOtoRAW + T0Reco + T0Mon, using v1PhysP1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py
index 3476762f7c1a24450a89928c689ead41825518ba..b0c9cd512790df0ffe9cc2595aa6ac490dab6143 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Test of P1+Tier0 workflow, runs athenaHLT with PhysicsP1_pp_run3_v1 menu followed by offline reco and monitoring
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py
index 8f25ae29f4c88d262db246eb7a62ae8868a7c3f8..f45e1fb9c5734bb51f1dcbbf92c21cab9aa67a70 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Test of P1+Tier0 workflow, runs athenaHLT with PhysicsP1_pp_run3_v1 menu followed by offline reco and monitoring
 # art-type: grid
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py
index 913e30b28de19069682b1a4c1d15b66b57273685..65786fd79c09f080b01c260230941170f937e5b2 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger athenaHLT test of the PhysicsP1_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_dumpConfig_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_dumpConfig_build.py
index 7dc69273f86447b5b70d051f238756f3108f8fc0..45c3acf50a01d320c26ff16572c9a540ad31ad3e 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_dumpConfig_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_dumpConfig_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: PhysicsP1_pp_run3_v1 menu test only dumping options for SMK generation
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py
index 6ab24f94c87e401baa6e8532964a5eb684c3a822..fd50eeff1f39e57d1ed419d403e73e2e0e9d51da 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger athenaHLT test of the PhysicsP1_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_magFieldToggle_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_magFieldToggle_build.py
index 4b0cc5549acf1c94bba4f2f9c21da4c65e52457e..30ab6489c34f1149fa61e907e489fac30e145c06 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_magFieldToggle_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_magFieldToggle_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: magnetic field toggle (on->off->on) test with PhysicsP1_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_preload_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_preload_build.py
index 1a95bd463b308ac5712569cbc1060a7d4ca8d4d4..ec9ac29df002450a510d64d11f7771d005e0b684 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_preload_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_preload_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # art-description: PhysicsP1_pp_run3_v1 menu athenaHLT test imitating partition with preloaded data at P1
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runRuleBook_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runRuleBook_build.py
index 18eaf7c648903b8fbfcc5cd7c4bd8ec188cd58e1..c42195589743bb1ab277b8d24168ae67fab02621 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runRuleBook_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runRuleBook_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: PhysicsP1_pp_run3_v1 menu test only dumping options for SMK generation and running RuleBook to create prescales
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py
index e587b630172fcfa1884c79a4a7500ef8a5a38b04..e8d225401a358d699b6fbc7153108c45ca8fcc26 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: start/stop/start transition test with PhysicsP1_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py
index 0498ee8d70a124e013fbc2992507f8023e0fd92a..f16bee8fc7983e3e0a128156b1225eb59781d731 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger athenaHLT test for ROS rates estimate with the Physics_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt b/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt
index cba79126cc85dc215bac8fc380a87a0ad0ea0cb8..9d6605ad7fa14de35c8ef9700bc15a1360568630 100644
--- a/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt
@@ -3,15 +3,11 @@
 # Declare the package name:
 atlas_subdir( TrigValAlgs )
 
-# External dependencies:
-find_package( XercesC )
-
 # Component(s) in the package:
 atlas_add_component( TrigValAlgs
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${XERCESC_LIBRARIES} AnalysisTriggerEvent AthAnalysisBaseCompsLib AthContainers AthViews AthenaBaseComps AthenaKernel CxxUtils EventInfo GaudiKernel MuonCombinedToolInterfaces Particle StoreGateLib TrigCaloEvent TrigCompositeUtilsLib TrigConfHLTData TrigConfInterfaces TrigDecisionEvent TrigDecisionToolLib TrigInDetEvent TrigInDetTruthEvent TrigMissingEtEvent TrigMuonEvent TrigNavStructure TrigNavToolsLib TrigNavigationLib TrigParticle TrigRoiConversionLib TrigSteeringEvent TrigT1Interfaces VxSecVertex tauEvent xAODBTagging xAODCore xAODEgamma xAODJet xAODMuon xAODTau xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigEgamma xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODTrigger )
+                     LINK_LIBRARIES AnalysisTriggerEvent AthAnalysisBaseCompsLib AthContainers AthViews AthenaBaseComps AthenaKernel CxxUtils EventInfo GaudiKernel MuonCombinedToolInterfaces Particle StoreGateLib TrigCaloEvent TrigCompositeUtilsLib TrigConfHLTData TrigConfInterfaces TrigDecisionToolLib TrigInDetEvent TrigInDetTruthEvent TrigMissingEtEvent TrigMuonEvent TrigNavStructure TrigNavigationLib TrigParticle TrigRoiConversionLib TrigSteeringEvent TrigT1Interfaces VxSecVertex tauEvent xAODBTagging xAODCore xAODEgamma xAODJet xAODMuon xAODTau xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigEgamma xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODTrigger )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
index 9c80d6d8d48eb3bc2ec9c375d504a14d948251ad..96600fad8d35bb6f43580560faeb628b17abc2ac 100755
--- a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
+++ b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
@@ -1,17 +1,9 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from TrigValAlgs.TrigValAlgsConf import TrigCountDumper
 from TrigValAlgs.TrigValAlgsConf import TrigDecisionChecker
 from TrigValAlgs.TrigValAlgsConf import TrigEDMChecker
-from TrigValAlgs.TrigValAlgsConf import TrigSlimValAlg
 from TrigValAlgs.TrigValAlgsConf import TrigEDMAuxChecker
 import six
-# TrigCountDumper configurable
-# Run with TrigCountDumper configured from AOD header
-class TrigCountDumper ( TrigCountDumper ):
-  __slots__ = []
-  def __init__(self, name="TrigCountDumper"):
-    super( TrigCountDumper, self ).__init__( name )
 
 # TrigDecisionChecker configurable
 # Run with TrigDecisionTool configured from AOD header
@@ -71,19 +63,6 @@ class TrigEDMChecker ( TrigEDMChecker ):
         super( TrigEDMChecker, self ).__init__( name )
 
 
-# TrigSlimValAlg configurable
-class TrigSlimValAlg ( TrigSlimValAlg ):
-  __slots__ = []
-  def __init__(self, name="TrigSlimValAlg"):
-    super( TrigSlimValAlg, self ).__init__( name )
-
-  def setDefaults(self, handle):
-
-    self.TrigDecisionTool = "Trig::TrigDecisionTool/TrigDecisionTool"
-    self.Navigation = "HLT::Navigation/Navigation"
-    self.SlimmingTool = "HLT::TrigNavigationSlimmingTool/TrigNavigationSlimmingTool"
-
-
 def getEDMAuxList():
     from TrigEDMConfig.TriggerEDM import getTriggerObjList,TriggerHLTList
     tlist=getTriggerObjList('AODFULL',[TriggerHLTList])
diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigCountDumper.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigCountDumper.cxx
deleted file mode 100644
index 337d131aa872983f59ddd1694fa7297b22ae1069..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValAlgs/src/TrigCountDumper.cxx
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-/*
- * File:    TrigCountDumper.cxx
- * Author:  Roger Moore <rwmoore@ualberta.ca>
- * Created: 5/11/11 (Guy Fawkes Day!)
- * Description:
- *    Source code for the methods of the TrigCountDumper Athena algorithm.
- */
-
-// System includes
-#include <cmath>
-#include <algorithm>
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <sstream>
-
-// Xerces C++ includes
-#include "xercesc/util/PlatformUtils.hpp"
-#include "xercesc/framework/StdOutFormatTarget.hpp"
-#include "xercesc/framework/LocalFileFormatTarget.hpp"
-	
-// Gaudi includes
-#include "CxxUtils/crc64.h"
-
-// ATLAS Includes
-#include "AthenaKernel/errorcheck.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-#include "TrigCountDumper.h"
-#include "TrigSteeringEvent/Lvl1Item.h"
-
-using namespace xercesc;
-using namespace trigcount;
-
-// Helper class in a local namespace to convert normal strings into
-// XML compatible unicode strings
-namespace {
-  class XStr {
-    public:
-      /** Constructor taking a templated argument type.
-       This constructor takes a single argument of a given type. First
-       it uses a string stream to convert the type into a string and
-       then it transcodes the string into an XML unicode string which
-       is stored inside the class.
-       @param toTranscode data to transcode into XML unicode
-      */
-      template<typename T> XStr(T toTranscode);
-      /** Constructor taking a const character pointer.
-       This constructor will transcode the string given by the pointer.
-       As a non-template constructor this should always take precedence over
-       the templated constructor.
-       @param toTranscode pointer to the string to stranscode
-      */
-      XStr(const char *toTranscode);
-      ~XStr() {
-        xercesc::XMLString::release(&m_unicode);
-      }
-      const XMLCh *unicode(void) const {
-        return m_unicode;
-      }
-      /** Cast operator to allow this class to act as an XMLCh pointer.
-       This cast operator means that a class instance can be used as a
-       XMLCh pointer. This allows an instance to be passed as an argument
-       to Xerces function which require a const XMLCh pointer argument. Since
-       the class has a templated constructor using a string stream this means
-       that simple strings, integers or floats can be passed as arguments
-       very simply.
-       @return XMLCh pointer with the transcoded string
-      */
-      operator const XMLCh *(void) const;
-    private :
-      XMLCh *m_unicode;
-  };
-
-  // Templated constructor
-  template<typename T> inline XStr::XStr(T toTranscode) {
-    std::stringstream ss;
-    ss << toTranscode;
-    m_unicode=xercesc::XMLString::transcode(ss.str().c_str());
-  }
-
-  // Constructor for const char pointers
-  inline XStr::XStr(const char *toTranscode) {
-    m_unicode=xercesc::XMLString::transcode(toTranscode);
-  }
-  
-  inline XStr::operator const XMLCh *(void) const {
-    return m_unicode;
-  }
-}
-// Use a pre-processor macro to define the conversion function because a
-// function call would cause the XStr class to go out of scope
-// when it returned which would release the converted string data!
-//#define X(str) XStr(str).unicode()	
-
-namespace trigcount {
-
-  // Method implementations for the TriggerCount class
-  DOMElement *TriggerCount::xml(DOMDocument *doc) const {
-    // Create the trigger element to contain the data
-    DOMElement *top=doc->createElement(XStr("count"));
-    // Add the trigger name as an attribute
-    top->setAttribute(XStr("trigger"), XStr(m_name));
-    // Add the prescale as an attribute
-    top->setAttribute(XStr("prescale"), XStr(m_prescale));
-    // Add the passthrough as an attribute
-    top->setAttribute(XStr("passthrough"), XStr(m_passthrough));
-    // Add the lower chain name as an attribute
-    top->setAttribute(XStr("lowerchain"), XStr(m_lower));
-    // Create the trigger element to contain the raw count and put the
-    // value attribute to the number of counts
-    DOMElement *raw=doc->createElement(XStr("raw"));
-    raw->setAttribute(XStr("value"),XStr(m_raw));
-    // Add the raw count to the top element
-    top->appendChild(raw);
-    // Create the trigger element to contain the actual count and put the
-    // value attribute to the number of counts
-    DOMElement *actual=doc->createElement(XStr("actual"));
-    actual->setAttribute(XStr("value"),XStr(m_count));
-    // Add the actual count to the top element
-    top->appendChild(actual);
-    return top;
-  }
-  
-  std::iostream &TriggerCount::operator<<(std::iostream &ostr) const {
-    ostr << "<count trigger=\"" << m_name << "\" count=\"" 
-    << m_count << "\" prescale=\"" << m_prescale << "\"/>" << std::endl;
-    return ostr;
-  }
-
-  
-  // Method implementations for the TriggerMenu class
-
-  DOMElement *TriggerMenu::xml(DOMDocument *doc) const {
-    // Create the menu element to contain the triggers
-    DOMElement *top=doc->createElement(XStr("menu"));
-    // Add the super master key, event count and mean pileup
-    // as attributes to the top level element
-    top->setAttribute(XStr("smk"), XStr(m_smk));
-    top->setAttribute(XStr("nevents"), XStr(m_count));
-    top->setAttribute(XStr("mu"), XStr(mu()));
-    // Loop over all the triggers in the menu and add elements
-    // for then as children of the menu element
-    for(TriggerMenu::const_iterator i=this->begin();i!=this->end();++i) {
-      top->appendChild(i->second.xml(doc));
-    }
-    return top;
-  }
-  
-  std::iostream &TriggerMenu::operator<<(std::iostream &ostr) const {
-    ostr << "<menu smk=\"" << m_smk << "\" nevents=\"" 
-    << m_count << "\" mu=\"" << mu() << "\">" << std::endl;
-    for(TriggerMenu::const_iterator i=begin();i!=end();++i) {
-      ostr << "  "; //<< i->second;
-    }
-    ostr << "</menu>" << std::endl;
-    return ostr;
-  }
-  
-} // end trigcount namespace
-
-
-TrigCountDumper::TrigCountDumper(const std::string &name, ISvcLocator *pSvcLocator)
-  : AthAlgorithm(name, pSvcLocator),
-    m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
-    m_configSvc( "TrigConf::TrigConfigSvc/TrigConfigSvc", name) {
-  declareProperty("OutputFile",m_ofname="trigger_counts.xml","Name of the output file");
-  declareProperty("Release",m_release="","Release version");
-  declareProperty("Dataset",m_dataset="","Dataset name");
-  declareProperty("Labels",m_labels,"Dataset labels");
-  declareProperty("EventInfoName",m_eventInfoName="","The name of the EventInfo container" );
-}
-
-StatusCode TrigCountDumper::initialize(void) {
-  ATH_MSG_INFO("Initializing Trigger Count dump algorithm");
-  ATH_MSG_INFO("Outputfile : " << m_ofname);
-  // Get the handle to the trigger configuration service
-  CHECK(m_configSvc.retrieve());
-  // Get the handle to the trigger decision tool
-  CHECK(m_trigDec.retrieve());
-  // Enable the expert methods for the trigger decision tool
-  m_trigDec->ExperimentalAndExpertMethods()->enable();
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode TrigCountDumper::finalize() {
-  ATH_MSG_INFO("TrigCountDumper: Generating XML document");
-  // Try to initialize the Xerces XML library. Details about this come
-  // from the Xerces C++ documentation at http://xerces.apache.org/xerces-c/
-  // The basic code framework to create and fill the document was taken from
-  // the Xerces sample code CreateDOMDocument available here:
-  // http://svn.apache.org/viewvc/xerces/c/trunk/samples/src/CreateDOMDocument/
-  try {
-    // Initialize the library. Must call terminate function once we are done
-    XMLPlatformUtils::Initialize();
-  } catch (const XMLException& toCatch) {
-    // The library failed to initialize so generate an error message and exit
-    ATH_MSG_ERROR("TrigCountDumper: Failed to initialize Xerces XML library");
-    return StatusCode::FAILURE;
-  }
-  // Get a pointer to the Xerces DOM implementation. DOM is an API to access XML
-  // documents in memory and so is the API suitable for generating a new XML
-  // document from scratch. DOM = Document Object Model
-  DOMImplementation *dom=DOMImplementationRegistry::getDOMImplementation(XStr("Core"));
-  if(!dom) {
-    // There was no DOM implementation found in Xerces so print an error message
-    // and then exit
-    ATH_MSG_ERROR("Unable to find a DOM XML implementation in Xerces");
-    XMLPlatformUtils::Terminate();
-    return StatusCode::FAILURE;
-  }
-  // Create a new XML document which we will fill with the trigger counts
-  DOMDocument *doc=dom->createDocument(0,                     // root element namespace URI
-                                       XStr("TriggerCounts"), // root element name
-                                       0);                    // document type object (DTD).
-  // Get the root element of the document
-  DOMElement *rootElem=doc->getDocumentElement();
-  // Create the dataset element
-  DOMElement *ds=doc->createElement(XStr("dataset"));
-  // Add a name attribute to the dataset element
-  ds->setAttribute(XStr("name"),XStr(m_dataset));
-  // Add a release attribute to the dataset element
-  ds->setAttribute(XStr("release"),XStr(m_release));
-  // Loop over the configured labels and add these to the dataset
-  for(std::vector<std::string>::const_iterator i=m_labels.begin();
-      i!=m_labels.end();++i) {
-    // Create an element for the label
-    DOMElement *label=doc->createElement(XStr("label"));
-    // Create a text node containing the label text
-    DOMText *labtext=doc->createTextNode(XStr(*i));
-    // Add the text node to the label
-    label->appendChild(labtext);
-    // Add the label to the dataset
-    ds->appendChild(label);
-  }
-  // Add the dataset element to the root
-  rootElem->appendChild(ds);
-  // Loop over all the menus found in the data so they can be added to the document
-  for(MenuMap_t::const_iterator i=m_menu.begin();i!=m_menu.end();++i) {
-    rootElem->appendChild(i->second.xml(doc));
-  }
-  // At this point we have all the data stored in the XML document so now we
-  // write it out to a file...which is somewhat of an involved process!
-  // First we have to create a serializer from the DOM implementation
-  DOMLSSerializer *serializer=static_cast<DOMImplementationLS *>(dom)->createLSSerializer();
-  // Make the output more human readable by inserting line feeds.
-  if (serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true))
-    serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true);
-  // The end-of-line sequence of characters to be used in the XML being written out (UNIX standard)
-  serializer->setNewLine(XStr("\n"));
-  // Create the output target
-  XMLFormatTarget *target;
-  if(!m_ofname.empty())
-    target=new LocalFileFormatTarget(XStr(m_ofname));
-  else
-    target=new StdOutFormatTarget();
-  // Create a new empty output destination object
-  DOMLSOutput *output=static_cast<DOMImplementationLS *>(dom)->createLSOutput();
-  // Tell the output stream to use the given file, or stdout, target
-  output->setByteStream(target);
-  // Tell everyone that we are about to write the XML data out
-  ATH_MSG_INFO("TrigCountDumper: Writing output to " << m_ofname);
-  // Write the document to the output using the serializer
-  serializer->write(doc,output);
-  // Cleanup.
-  serializer->release();
-  delete target;
-  output->release();
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode TrigCountDumper::execute(void) {
-  // Get a reference to the expert interface
-  Trig::ExpertMethods &expert=*m_trigDec->ExperimentalAndExpertMethods();
-  // Get the super master and pre-scale keys from the configuration service.
-  // It is not clear that we will use the prescale keys but we'll retreive
-  // them in case we need them in the future.
-  uint32_t smk    = m_configSvc->masterKey();
-  uint32_t l1psk  = m_configSvc->lvl1PrescaleKey();
-  uint32_t hltpsk = m_configSvc->hltPrescaleKey();
-  // If the keys returned by the configuration service don't seem to make sense,
-  // use something else as the SMK. (Needed mostly for MC test jobs.)
-  if(((smk==0) && (l1psk==0) && (hltpsk==0)) || (static_cast<int>(smk) < 0 ) ||
-     (static_cast<int>(l1psk) < 0 ) || (static_cast<int>(hltpsk) < 0 ) ) {
-    smk    = CxxUtils::crc64(m_configSvc->configurationSource()) & 0xffff;
-    l1psk  = 0;
-    hltpsk = 0;
-  }
-
-  // At this point we now have a super master key so check whether this is one we have
-  // already seen or whether we need to create a new menu to count it
-  if(m_menu.find(smk)==m_menu.end()) {
-    ATH_MSG_INFO("Found new trigger menu with SMK=" << smk);
-    // This super master key was not found so create a new menu entry
-    // Note: this is inefficient in that it creates and then copies the trigger
-    // menu into the map. However this should only ever be performed once or twice
-    // per run so the overhead is minimal and it avoids have to worry about memory
-    // management (so call me lazy!).
-    m_menu[smk]=trigcount::TriggerMenu(smk);
-    // Get a list of all the L1 triggers in this menu configuration
-    std::vector<std::string> trigs=m_trigDec->getListOfTriggers("L1_.*");
-    // Loop over all the L1 triggers and add them to the count menu
-    for(std::vector<std::string>::const_iterator i=trigs.begin();i!=trigs.end();++i) {
-      ATH_MSG_DEBUG("Adding L1 trigger " << *i);
-      const LVL1CTP::Lvl1Item *l1=expert.getItemDetails(*i);
-      // Check that there is a valid L1 item pointer, if not then raise an error
-      if(!l1) {
-        ATH_MSG_ERROR("No Lvl1Item class found for " << *i << ", set prescale to -1");
-        m_menu[smk].addTrigger(trigcount::TriggerCount(*i,-1.,0.));
-      } else {
-        m_menu[smk].addTrigger(trigcount::TriggerCount(*i,l1->prescaleFactor(),0.));
-      }
-    }
-    // Get a list of all the HLT triggers in this menu configuration
-    trigs=m_trigDec->getListOfTriggers("HLT_.*");
-    // Loop over all the triggers and add them to the count menu
-    for(std::vector<std::string>::const_iterator i=trigs.begin();i!=trigs.end();++i) {
-      ATH_MSG_DEBUG("Adding HLT trigger " << *i 
-                    << " with prescale " << m_trigDec->getPrescale(*i));
-      const TrigConf::HLTChain *ch=expert.getChainConfigurationDetails(*i);
-      // Check for the expert chain interface
-      if(!ch) {
-        ATH_MSG_ERROR("No Chain class found for " << *i << ", set passthrough to -1");
-        m_menu[smk].addTrigger(trigcount::TriggerCount(*i,m_trigDec->getPrescale(*i),-1.));
-      } else {
-        m_menu[smk].addTrigger(trigcount::TriggerCount(*i,ch->prescale(),ch->pass_through()));
-        m_menu[smk][*i].setLower(ch->lower_chain_name());
-      }
-    }
-    ATH_MSG_DEBUG("Trigger menu configured");
-  }
-  
-  // Now that we know we have a trigger menu for this event get a reference to it.
-  // This avoids having to look it up in the map everytime we access it.
-  trigcount::TriggerMenu &menu=m_menu[smk];
-  // Extract the event info object from store gate
-  const EventInfo *eventInfo;
-  StatusCode  sc;
-  if (m_eventInfoName == "") {
-    sc=evtStore()->retrieve(eventInfo);
-  } else {
-    sc=evtStore()->retrieve(eventInfo ,m_eventInfoName);
-  }
-  // Check for a null point or failure code because the call can succeed but not
-  // find a valid event info object pointer
-  if(sc.isFailure() || !eventInfo) {
-    ATH_MSG_INFO("EventInfo container '" << m_eventInfoName
-                 << "' could not be retrieved from StoreGate!");
-    return StatusCode::SUCCESS;
-  }
-  
-  // Add an event to the menu with the given number of interactions
-  menu.addEvent(eventInfo->actualInteractionsPerCrossing());
-  
-  // Loop over all the HLT triggers to find which ones passed
-  std::vector<std::string> trigs=m_trigDec->getListOfTriggers("HLT_.*");
-  for(std::vector<std::string>::const_iterator i=trigs.begin();i!=trigs.end();++i) {
-    // Check to see if the trigger passed regardless of any prescale value. If it does then
-    // add this event to the count
-    if(m_trigDec->isPassed(*i,TrigDefs::allowResurrectedDecision|TrigDefs::requireDecision)) {
-      // Access the actual pass value, with prescale implemented. If this is true then the
-      // actual count will be incremented as well as the raw count
-      menu[*i].addEvent(m_trigDec->isPassed(*i));
-    }
-  }
-
-  // Loop over all the L1 triggers to find which ones passed
-  trigs=m_trigDec->getListOfTriggers("L1_.*");
-  for(std::vector<std::string>::const_iterator i=trigs.begin();i!=trigs.end();++i) {
-    const LVL1CTP::Lvl1Item *l1=expert.getItemDetails(*i);
-    // Check that there is a valid L1 item pointer, if not then raise an error
-    if(!l1) {
-      ATH_MSG_ERROR("No Lvl1Item class found for " << *i << ", using TrigDecision data only");
-      if(m_trigDec->isPassed(*i,TrigDefs::allowResurrectedDecision|TrigDefs::requireDecision)) {
-        // Access the actual pass value, with prescale implemented. If this is true then the
-        // actual count will be incremented as well as the raw count
-        menu[*i].addEvent(m_trigDec->isPassed(*i));
-      }
-    } else {
-      // We have a Lvl1Item class so we use this to get the raw and prescaled counts
-      if(l1->isPassedBeforePrescale()) {
-        menu[*i].addEvent(l1->isPassed());
-      }
-    }
-  } // end loop over L1 triggers
-  return StatusCode::SUCCESS;
-}
diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigCountDumper.h b/Trigger/TrigValidation/TrigValAlgs/src/TrigCountDumper.h
deleted file mode 100644
index 4b51218f11c22af9760169679d57cb7cdead76ef..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValAlgs/src/TrigCountDumper.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-/** 
- Athena processor which will dump the trigger counts either to an XML file or standard out.
- @author: R. Moore <rwmoore@ualberta.ca>
- */
-
-#ifndef TRIGVALALGS_TRIGCOUNTDUMPER_H
-#define TRIGVALALGS_TRIGCOUNTDUMPER_H
-
-// std stuff
-#include <string>
-#include <map>
-#include <iostream>
-
-// Xerces C++ Includes
-#include "xercesc/util/XMLString.hpp"
-#include "xercesc/dom/DOM.hpp"
-
-// Core ATLAS includes
-#include "AthenaBaseComps/AthAlgorithm.h"
-
-// Trigger includes
-#include "TrigDecisionTool/TrigDecisionTool.h"
-#include "TrigConfInterfaces/ITrigConfigSvc.h"
-
-namespace trigcount {
-  
-  /**
-   * @class TriggerCount
-   * Helper class which will store the data for a single trigger count
-   */
-  class TriggerCount {
-  public:
-    /** Constructs the count for a given trigger.
-     @param name name of the trigger being counted
-     @param prescale prescale value for the trigger
-     */
-    TriggerCount(const std::string &name="",float prescale=1.0,float passthrough=0.);
-    /** Increments the raw and actual counts for this trigger.
-     Every call of this method will increment the raw counts for this
-     trigger. The actual count will only be increased if the argument
-     'actual' is set to true.
-     @param actual flag to indicate that the actual count should be increased
-    */
-    void addEvent(bool actual);
-    /// Returns the raw trigger count
-    uint32_t raw(void) const;
-    /// Returns the actual trigger count
-    uint32_t actual(void) const;
-    /// Returns the prescale factor
-    float prescale(void) const;
-    /// Returns the pass-through factor
-    float passthrough(void) const;
-    /** Returns the projected count based on the raw and prescale values.
-     This method will project an actual count number based on the number of
-     raw counts and the given prescale factor.
-     @return projected number of trigger counts
-    */
-    float projected(void) const;
-    /** Fills an XML element structure with the count data.
-     This method will create an XML element structure using the given XML
-     document and then returns the top element of the structure. It is then up
-     to the calling code to attach this structure to the document in a suitable
-     location.
-     @param doc pointer to the Xerces DOM document
-     @return pointer to the top level element of the XML representation
-     */
-    xercesc::DOMElement *xml(xercesc::DOMDocument *doc) const;
-    /// Outputs the count to a stream
-    std::iostream &operator<<(std::iostream &ostr) const;
-    /** Returns the name of the trigger.
-     @return name of the trigger being counted
-    */
-    const std::string &name(void) const;
-    /** Returns the name of the lower chain name.
-      @return name of the lower chain name of this trigger
-    */
-    const std::string &lower(void) const;
-    /** Sets the name of the lower chain name.
-     @param lower the name of the lower chain name of this trigger
-    */
-    void setLower(const std::string &lower);
-  private:
-    /// Name of the trigger
-    std::string m_name;
-    /// Actual counts for this trigger
-    uint32_t m_count;
-    /// Raw counts for this trigger
-    uint32_t m_raw;
-    /// Prescale factor for this trigger
-    float m_prescale;
-    /// Passthrough factor for this trigger
-    float m_passthrough;
-    /// Lower chain name this trigger
-    std::string m_lower;
-  };
-  
-  inline TriggerCount::TriggerCount(const std::string &name,float prescale,float passthrough) : 
-    m_name(name), m_count(0), m_raw(0), m_prescale(prescale), m_passthrough(passthrough), m_lower("") {
-  }
-  
-  inline void TriggerCount::addEvent(bool actual) {
-    // Increase the raw event count
-    ++m_raw;
-    // Only increase the actual event count if the flag is set
-    if(actual) ++m_count;
-  }
-  
-  inline float TriggerCount::projected(void) const {
-    if(m_prescale!=0.) {
-      return static_cast<float>(m_raw)/m_prescale+static_cast<float>(m_raw)*m_passthrough
-      -static_cast<float>(m_raw)*(m_passthrough/m_prescale);
-    } else {
-      return static_cast<float>(m_raw)*m_passthrough;
-    }
-  }
-
-  inline uint32_t TriggerCount::raw(void) const {
-    return m_raw;
-  }
-  
-  inline uint32_t TriggerCount::actual(void) const {
-    return m_count;
-  }
-  
-  inline float TriggerCount::prescale(void) const {
-    return m_prescale;
-  }
-  
-  inline float TriggerCount::passthrough(void) const {
-    return m_passthrough;
-  }
-  
-  inline const std::string &TriggerCount::name(void) const {
-    return m_name;
-  }
-  
-  inline const std::string &TriggerCount::lower(void) const {
-    return m_lower;
-  }
-  
-  inline void TriggerCount::setLower(const std::string &lower) {
-    m_lower=lower;
-  }
-  
-
-  class TriggerMenu : public std::map<std::string,TriggerCount> {
-  public:
-    /** Constructs a new trigger menu class to contain counts.
-     @param smk super master key of the trigger list
-     */
-    TriggerMenu(uint32_t smk=0);
-    /// Copy constructor
-    /** Adds an event with the given number of interactions to those the menu has seen.
-     This increments the number of events which have been triggered by this menu by
-     one and increases the number of interactions by the number of interactions in
-     the event.
-     @param nint number of interactions in the event, defaults to 1
-     */
-    void addEvent(uint32_t nint=1);
-    /** Adds a new trigger count to the menu.
-     @param tcount trigger count to add
-    */
-    void addTrigger(const TriggerCount &tcount);
-    /** Returns the average number of interactions per event.
-     This calculates the average number of interactions in events which were triggered
-     by this menu.
-     @return the average number of interactions per event.
-     */
-    float mu(void) const;
-    /** Fills an XML element structure with the menu data.
-     This method will create an XML element structure using the given XML
-     document and then returns the top element of the structure. It is then up
-     to the calling code to attach this structure to the document in a suitable
-     location.
-     @param doc pointer to the Xerces DOM document
-     @return pointer to the top level element of the XML representation
-    */
-    xercesc::DOMElement *xml(xercesc::DOMDocument *doc) const;
-    /// Outputs the menu to a stream
-    std::iostream &operator<<(std::iostream &ostr) const;
-  private:
-    /// Super master key associated with this trigger list
-    uint32_t m_smk;
-    /// Number of events which have been run with this trigger menu
-    uint32_t m_count;
-    /// Number of interactions in this menu's events: used to calculate mu
-    uint32_t m_ninteractions;
-  };
-  
-  inline TriggerMenu::TriggerMenu(uint32_t smk) : 
-    std::map<std::string,TriggerCount>(), m_smk(smk), m_count(0), m_ninteractions(0) {
-  }
-  
-  inline void TriggerMenu::addEvent(uint32_t nint) {
-    m_count++;             // Increment the number of events
-    m_ninteractions+=nint; // Add the number of interactions
-  }
-
-  inline void TriggerMenu::addTrigger(const TriggerCount &tcount) {
-    (*this)[tcount.name()]=tcount;
-  }
-
-  inline float TriggerMenu::mu(void) const {
-    return static_cast<float>(m_ninteractions)/static_cast<float>(m_count);
-  }
-  
-} // end namespace
-
-
-/**
- * @class TrigCountDumper
- * Simple Athena algorithm which will dump the trigger counts into suitable formats.
- *
- * @author Roger Moore     <rwmoore@ualberta.ca>     - University of Alberta, Canada
- */
-class TrigCountDumper : public AthAlgorithm {
- public:
-  /** Standard algorithm constructor.
-  */
-  TrigCountDumper(const std::string &name, ISvcLocator *pSvcLocator);
-  /** Standard algorithm destructor.
-  */
-  ~TrigCountDumper(void);
-  /** Initializes the count dump algoritm from the job options.
-      This method sets up the configuration options of the dump algorithm, such as the
-      type of output to generate and the file to store it in etc.
-   */
-  StatusCode initialize(void);
-  /** Called by Athena once per event to execute the dumper on the current event.
-      This method is called once per event and collects the trigger counts for that single
-      event. These are then stored within the class instance.
-  */
-  StatusCode execute();
-  /** Called by Athena once all the events have been processed to output the stored counts.
-      This method is executed at the end of a run and will write out the stored counts using the
-      configured format to the configured location.
-   */
-  StatusCode finalize();
- private:
-  /// Handle to access the trigger decision tool
-  ToolHandle<Trig::TrigDecisionTool> m_trigDec;
-  /// The trigger configuration service to get the information from
-  ServiceHandle< TrigConf::ITrigConfigSvc > m_configSvc;
-  /// Type definition for the menu map
-  typedef std::map<uint32_t,trigcount::TriggerMenu> MenuMap_t;
-  /// Map of super master keys to trigger menus
-  MenuMap_t m_menu;
-  /// Name of output file
-  std::string m_ofname;
-  /// Name of event info
-  std::string m_eventInfoName;
-  /// Release name
-  std::string m_release;
-  /// Dataset name
-  std::string m_dataset;
-  /// Dataset labels
-  std::vector<std::string> m_labels;
-};
-
-inline TrigCountDumper::~TrigCountDumper(void) {
-}
-
-#endif
diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx
deleted file mode 100644
index 258d116d900e9571be793c9a0ffd44ea38dc6dee..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "TrigNavigation/Navigation.h"
-
-#include "TrigSlimValAlg.h"
-#include "TrigNavTools/getFeatureOccurrences.h"
-
-TrigSlimValAlg::TrigSlimValAlg(const std::string& name, ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator),
-  m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"),
-  m_eventSeen(0)
-{
-
-  declareProperty("TrigDecisionTool", m_trigDecisionTool);
-
-}
-
-StatusCode TrigSlimValAlg::initialize() {
-
-  // load the trig decision tool
-  if( !m_trigDecisionTool.empty() ) {
-    ATH_CHECK( m_trigDecisionTool.retrieve() );
-  }
-  else {
-    ATH_MSG_ERROR ("Could not retrive the TrigDecisionTool as it was not specified!" );
-    return StatusCode::FAILURE;
-  }
-  
-  return StatusCode::SUCCESS;
-
-}
-
-StatusCode TrigSlimValAlg::clear() {
-
-  return StatusCode::SUCCESS;
-
-}
-
-StatusCode TrigSlimValAlg::execute() {
-
-  if(!m_eventSeen) {
-    // cache groups and streams
-    m_configuredGroups = m_trigDecisionTool->getListOfGroups();
-    m_configuredStreams = m_trigDecisionTool->getListOfStreams();
-    m_eventSeen = 1;
-  }
-  
-  // grab the navigation
-  Trig::ExpertMethods *navAccess = m_trigDecisionTool->ExperimentalAndExpertMethods();
-  navAccess->enable();
-  const HLT::NavigationCore *cnav = navAccess->getNavigation();
-  HLT::NavigationCore *navigation = const_cast<HLT::NavigationCore*>(cnav);
-
-  if(navigation == 0) {
-    ATH_MSG_WARNING ("Could not get navigation from Trigger Decision Tool" );
-    ATH_MSG_WARNING ("Navigation will not be slimmed in this event" );
-    return StatusCode::SUCCESS;
-  }
-
-  // print the TrigSlimValidation header
-  ATH_MSG_INFO ("REGTEST  " << "======== START of TrigSlimValidation DUMP ========" );
-
-  // store some needed information from the navigation structure
-  std::map<std::string, int> featureOccurrences = HLT::TrigNavTools::getFeatureOccurrences(navigation);
-  TrigSlimValAlg::elementSet *allTriggerElements = this->getAllTriggerElements(navigation);
-
-  // Print the aggregate navigation structure information
-
-  // build the counters
-  NumberCounter *numberCounter = new NumberCounter(navigation);
-  IntermediateCounter *intermediateCounter = new IntermediateCounter(navigation);
-  FeaturelessCounter *featurelessCounter = new FeaturelessCounter(navigation);
-  GhostCounter *ghostCounter = new GhostCounter(navigation);
-  RoICounter *roICounter = new RoICounter(navigation);
-  SeedsRelationCounter *seedsRelationCounter = new SeedsRelationCounter(navigation);
-  SeededByRelationCounter *seededByRelationCounter = new SeededByRelationCounter(navigation);
-  SameRoIRelationCounter *sameRoIRelationCounter = new SameRoIRelationCounter(navigation);
-  FeatureCounter *featureCounter = new FeatureCounter(navigation);
-
-  // build the updaters
-  SumUpdate *sumUpdate = new SumUpdate();
-  MaxUpdate *maxUpdate = new MaxUpdate();
-  MinUpdate *minUpdate = new MinUpdate();
-
-  ATH_MSG_INFO ("REGTEST  " << "Number of trigger elements: " 
-                << recursiveCount( navigation, numberCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of distinct features: "
-                << featureOccurrences.size() );
-  ATH_MSG_INFO ("REGTEST  " << "Number of intermediate trigger elements: " 
-                << recursiveCount( navigation, intermediateCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of featureless trigger elements: " 
-                << recursiveCount( navigation, featurelessCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of ghost trigger elements: " 
-                << recursiveCount( navigation, ghostCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of RoIs: " 
-                << recursiveCount( navigation, roICounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Longest chain: " 
-                << recursiveCount( navigation, numberCounter, maxUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Shortest chain: " 
-                << recursiveCount( navigation, numberCounter, minUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of feature links: " 
-                << recursiveCount( navigation, featureCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of seeds relations: " 
-                << recursiveCount( navigation, seedsRelationCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of seeded by relations: " 
-                << recursiveCount( navigation, seededByRelationCounter, sumUpdate ) );
-  ATH_MSG_INFO ("REGTEST  " << "Number of same RoI relations: " 
-                << recursiveCount( navigation, sameRoIRelationCounter, sumUpdate ) );
-
-  // delete counters
-  delete numberCounter; numberCounter = 0;
-  delete intermediateCounter; intermediateCounter = 0;
-  delete featurelessCounter; featurelessCounter = 0;
-  delete ghostCounter; ghostCounter = 0;
-  delete roICounter; roICounter = 0;
-  delete seedsRelationCounter; seedsRelationCounter = 0;
-  delete seededByRelationCounter; seededByRelationCounter = 0;
-  delete sameRoIRelationCounter; sameRoIRelationCounter = 0;
-
-  // delete the updaters
-  delete sumUpdate; sumUpdate = 0;
-  delete maxUpdate; maxUpdate = 0;
-  delete minUpdate; minUpdate = 0;
-
-
-  // print the feature information
-  for(std::map<std::string, int>::const_iterator iter = featureOccurrences.begin();
-      iter != featureOccurrences.end(); ++iter)
-    ATH_MSG_INFO ("REGTEST  " << "Occurrences of feature " << (*iter).first
-                  << ": " << (*iter).second );
-
-  // print the stream information
- 
-  // store elements unassociated with any stream.  Note that by changing
-  // the TriggerElementLessThan class in the headerfile, we can change
-  // exactly what we mean by "unassociated"
-  TrigSlimValAlg::elementSet associatedElements;
-  for(std::vector<std::string>::const_iterator streamIter = m_configuredStreams.begin();
-      streamIter != m_configuredStreams.end(); ++streamIter) {
-    // collect all the elements associated with the stream
-    TrigSlimValAlg::elementSet *streamElements = 
-      this->getTEsFromChainGroup(m_trigDecisionTool->getChainGroup(std::string("STREAM_") + *streamIter));
-    associatedElements.insert(streamElements->begin(), streamElements->end());
-
-    ATH_MSG_INFO ("REGTEST  " << "Elements associated with stream " << *streamIter 
-                  << ": " << streamElements->size() );
-
-    delete streamElements;
-
-  }
-
-  ATH_MSG_INFO ("REGTEST  " << "Elements unassociated with any stream: "
-                << allTriggerElements->size() - associatedElements.size() );
-
-  // print the group information
-  // store elements unassociated with any group.  Note that by changing
-  // the TriggerElementLessThan class in the headerfile, we can change
-  // exactly what we mean by "unassociated"
-  associatedElements.clear();
-  for(std::vector<std::string>::const_iterator groupIter = m_configuredGroups.begin();
-      groupIter != m_configuredGroups.end(); ++groupIter) {
-    // collect all the elements associated with the group
-    TrigSlimValAlg::elementSet *groupElements = 
-      this->getTEsFromChainGroup(m_trigDecisionTool->getChainGroup(std::string("GROUP_") + *groupIter));
-    associatedElements.insert(groupElements->begin(), groupElements->end());
-
-    ATH_MSG_INFO ("REGTEST  " << "Elements associated with group " << (*groupIter)
-                  << ": " << groupElements->size() );
-
-    delete groupElements;
-
-  }
-
-  ATH_MSG_INFO ("REGTEST  " << "Elements unassociated with any group: "
-                << allTriggerElements->size() - associatedElements.size() );
-  
-  // clean up and finish
-  delete allTriggerElements; allTriggerElements = 0;
-  
-  // print the TrigSlimValidation footer
-  ATH_MSG_INFO ("REGTEST  " << "======== END of TrigSlimValidation DUMP ========" );
-
-  return StatusCode::SUCCESS;
-
-}
-
-StatusCode TrigSlimValAlg::finalize() {
-
-  return StatusCode::SUCCESS;
-
-}
-
-int TrigSlimValAlg::recursiveCount(HLT::NavigationCore *navigation,
-                                   TrigSlimValAlg::ElementCounter *ec, 
-                                   TrigSlimValAlg::CountUpdate    *cu,
-                                   HLT::TriggerElement            *te) {
-
-  if(!ec)
-    return 0;
-
-  if(!cu)
-    return 0;
-
-  if(!navigation)
-    return 0;
-
-  if(!te)
-    te = navigation->getInitialNode();
-
-  if(!te)
-    return 0;
-
-  int count = -1;
-  for(std::vector<HLT::TriggerElement*>::const_iterator iter = 
-      te->getRelated(HLT::TriggerElement::seedsRelation).begin();
-      iter != te->getRelated(HLT::TriggerElement::seedsRelation).end(); ++iter) {
-    // note we have to be clever to avoid double counting as a node can have more
-    // than one seeded by relation.  To avoid this, ignore the daughter node unless
-    // you are the first mother node
-    std::vector<HLT::TriggerElement*> mothers = (*iter)->getRelated(HLT::TriggerElement::seededByRelation);
-    if(mothers.size() > 0 && mothers[0] == te)
-      count = cu->update(count, this->recursiveCount( navigation, ec, cu, *iter ));
-  }
-
-  if(count < 0)
-    count = 0;
-
-  return count + ec->count(te);
-
-}
-
-TrigSlimValAlg::elementSet *TrigSlimValAlg::getAllTriggerElements(HLT::NavigationCore *navigation, HLT::TriggerElement *te) {
-
-  if(!navigation)
-    return 0;
-
-  if(!te)
-    te = navigation->getInitialNode();
-
-  if(!te)
-    return 0;
-
-
-  TrigSlimValAlg::elementSet *tes = new TrigSlimValAlg::elementSet;
-
-  tes->insert(te);
-
-  std::vector<HLT::TriggerElement*> children = te->getRelated(HLT::TriggerElement::seedsRelation);
-  std::vector<HLT::TriggerElement*>::iterator iter;
-  for(iter = children.begin(); iter != children.end(); ++iter) {
-    TrigSlimValAlg::elementSet* tesChildren = this->getAllTriggerElements( navigation, *iter );
-    if(!tesChildren)
-      continue;
-    // merge the sets
-    TrigSlimValAlg::elementSet temp;
-    std::set_union(tes->begin(), tes->end(), 
-                   tesChildren->begin(), tesChildren->end(),
-                   std::inserter(temp, temp.begin()));
-    tes->swap(temp);
-                    
-    delete tesChildren; tesChildren = 0;
-  }
-
-  return tes;
-
-}
-
-TrigSlimValAlg::elementSet *TrigSlimValAlg::getTEsFromChainGroup(const Trig::ChainGroup *cg) {
-  
-  TrigSlimValAlg::elementSet *tes = new TrigSlimValAlg::elementSet;
-
-  std::vector<Trig::Combination> combinations = m_trigDecisionTool->features(cg).getCombinations();
-
-  for(std::vector<Trig::Combination>::const_iterator iter = combinations.begin();
-      iter != combinations.end(); ++iter) {
-    std::vector<const HLT::TriggerElement*> combTEs = iter->tes();
-    tes->insert(combTEs.begin(), combTEs.end());
-  }
-
-  return tes;
-
-}
-
diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.h b/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.h
deleted file mode 100644
index 32504f99fe77adbe3fb3564f5b93e790bcb61f22..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CLASS_TRIG_SLIM_VALIDATION_H
-#define CLASS_TRIG_SLIM_VALIDATION_H
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h"
-
-#include "TrigDecisionTool/TrigDecisionTool.h"
-#include "TrigNavigation/TriggerElement.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include <iostream>
-
-/**
-  * @brief The TrigSlimValAlg is used in validating the TrigNavigationSlimming
-  *        tools.
-  * @author Ben Smith <bcsmith@fas.harvard.edu> - Harvard University
-  *
-  * This algorithm allows validation of the trigger navigation slimming tools
-  * in the TrigEvent/TrigNavTools package.  The basic idea is to print many of
-  * the aggregate prorperties of the navigation structure, and compare them to
-  * the expected results before and after slimming.  For example, when removing
-  * a feature, the other features should be remain unchanged.
-  *
-  * In practice, the log files are parsed by a python script: trigslimval.py which
-  * can be found in the TrigValTools package in the bin directory
-  */
-
-class TrigSlimValAlg : public AthAlgorithm {
-
-  public:
-    TrigSlimValAlg(const std::string& name, ISvcLocator *pSvcLocator);
-    ~TrigSlimValAlg() { ; };
-
-    StatusCode initialize();
-    StatusCode clear();
-    StatusCode execute();
-    StatusCode finalize();
-
-    /** 
-      *  @brief Abstract base class for TriggerElement function objects.
-      *         These are used to count various attributes of the trigger elements
-      *         in the navigation structure
-      */
-    class ElementCounter {
-      public:
-        ElementCounter(HLT::NavigationCore* nav) { m_nav = nav; };
-        virtual ~ElementCounter() {;};
-        virtual int count(const HLT::TriggerElement* /* te */) const = 0;
-      protected:
-        HLT::NavigationCore* m_nav;
-    };
-
-    /**
-      * @brief Simply counts the number of elements in the tree
-      */
-    class NumberCounter : public ElementCounter {
-      public:
-        NumberCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        virtual int count(const HLT::TriggerElement* /* te */) const { return 1; };
-    };
-
-    /**
-      * @brief Counts only intermediate (non-RoI, terminal, or inital) elements
-      */
-    class IntermediateCounter : public ElementCounter {
-      public:
-        IntermediateCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        virtual int count(const HLT::TriggerElement *te) const { 
-          return ( te && m_nav ? !(m_nav->isInitialNode(te) || 
-                m_nav->isRoINode(te) || m_nav->isTerminalNode(te)) : 0 );
-        }
-      
-    };
-
-    /**
-      * @brief Counts only elements with no feature links
-      */
-    class FeaturelessCounter : public ElementCounter {
-      public:
-        FeaturelessCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te ? te->getFeatureAccessHelpers().size() == 0 : 0 );
-        }
-    };
-
-    /**
-      * @brief Counts only elements which are marked as ghosts
-      */
-    class GhostCounter : public ElementCounter {
-      public:
-        GhostCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te ? te->ghost() : 0 );
-        }
-    };
-
-    /**
-      * @brief Counts only elements which are RoI elements
-      */
-    class RoICounter : public ElementCounter {
-      public:
-        RoICounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te && m_nav ? m_nav->isRoINode(te) : 0 );
-        }
-    };
-
-    /**
-      * @brief Counts the number of seeds relations in all the elements
-      */
-    class SeedsRelationCounter : public ElementCounter {
-      public:
-        SeedsRelationCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te ? te->getRelated( HLT::TriggerElement::seedsRelation ).size() : 0 );
-        }
-    };
-          
-    /**
-      * @brief Counts the number of seededBy relations in all the elements
-      */
-    class SeededByRelationCounter : public ElementCounter {
-      public:
-        SeededByRelationCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te ? te->getRelated( HLT::TriggerElement::seededByRelation ).size() : 0 );
-        }
-    };
-    
-    /**
-      * @brief Counts the number of same RoI relations in all the elements
-      */
-    class SameRoIRelationCounter : public ElementCounter {
-      public:
-        SameRoIRelationCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te ? te->getRelated( HLT::TriggerElement::sameRoIRelation ).size() : 0 );
-        }
-    };
-
-    /**
-      * @brief Counts the number of feature links in all the elements
-      */
-    class FeatureCounter : public ElementCounter {
-      public:
-        FeatureCounter(HLT::NavigationCore* nav) : ElementCounter(nav) {;};
-        int count(const HLT::TriggerElement *te) const {
-          return ( te ? te->getFeatureAccessHelpers().size() : 0 );
-        }
-    };
-
-    /** 
-     * @brief Update function objects - used by the recursive counting program.  By cominging
-     *         these with the ElementCounter objects, you can count whatever you want in the tree
-     */
-    class CountUpdate {
-      public:
-        CountUpdate() {;};
-        virtual ~CountUpdate() {;};
-        virtual int update(const int orig, const int val) const = 0;
-    };
-
-    /**
-      * @brief The SumUpdate class is used when you wish to compile the sum of all occurrences.
-      *        For example: when counting all the trigger elements in the structure.
-      */
-    class SumUpdate : public CountUpdate {
-      public:
-        SumUpdate() : CountUpdate() {;};
-        int update(const int orig, const int val) const {
-          return ( orig < 0 ? val : orig + val );
-        }
-    };
-
-    /**
-      * @brief The MinUpdate class is used when you wish to find the minimum value of something
-      *        in the tree. For example, when generating the shrtest branch.
-      */
-    class MinUpdate : public CountUpdate {
-      public:
-        MinUpdate() : CountUpdate() {;};
-        int update(const int orig, const int val) const {
-          return ( orig <= 0 || val < orig ? val : orig );
-        }
-    };
-
-    /**
-      * @brief The MaxUpdate class is used when you wish to find the maximum value of something
-      *        in the tree. For example, when generating the longest branch.
-      */
-    class MaxUpdate : public CountUpdate {
-      public:
-        MaxUpdate() : CountUpdate() {;};
-        int update(const int orig, const int val) const {
-          return ( val > orig ? val : orig );
-        }
-    };
-
-    /**
-      * @brief Defines equivalence of Trigger Elements.  When they have the same id, they
-      *        represent the same threshold in the trigger decision chain (but possibly in
-      *        different RoI's, etc.)
-      */
-    class TriggerElementCompare {
-      public:
-        TriggerElementCompare(unsigned int id) : m_id(id) { ; };
-        bool operator()(const HLT::TriggerElement *te) {
-          return te && te->getId() == m_id;
-        }
-      private:
-        unsigned int m_id;
-    };
-
-    /**
-      * @brief defines ordering of Trigger Elements to be used for set ordering.
-      */
-    class TriggerElementLessThan {
-      public:
-        TriggerElementLessThan() {;};
-        bool operator()(const HLT::TriggerElement *te1, const HLT::TriggerElement *te2) const {
-          return te1 < te2;
-        }
-    };
-
-    typedef std::set< const HLT::TriggerElement*, TrigSlimValAlg::TriggerElementLessThan > elementSet;
-
-  private:
-
-    // private functions
-    /**
-      * @brief Basic counting function.  This recursively searches the tree and computes
-      *        the value of the Elementcount on each trigger element in the tree.  To combine
-      *        two values, it uses the CountUpdate function object.
-      */
-    int recursiveCount(HLT::NavigationCore *nav, ElementCounter *ec, CountUpdate *cu, HLT::TriggerElement *te = 0);
-
-    /**
-      * @brief Returns a set of all the trigger elements in the navigation structure.
-      */
-    TrigSlimValAlg::elementSet *getAllTriggerElements(HLT::NavigationCore* nav, HLT::TriggerElement *te = 0);
-
-    /**
-      * @brief Returns a set of the trigger elements associated with the chain group
-      */
-    TrigSlimValAlg::elementSet *getTEsFromChainGroup(const Trig::ChainGroup* cg);
-
-    // tools
-    ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool; //<! TrigDecisionTool
-    
-    // internal data
-    std::vector<std::string> m_configuredGroups; //<! cache group->chain map
-    std::vector<std::string> m_configuredStreams;//<! cache stream->chain map
-    int m_eventSeen; //<! used to initialize variables that need to have an event loaded
-};
-
-#endif
diff --git a/Trigger/TrigValidation/TrigValAlgs/src/components/TrigValAlgs_entries.cxx b/Trigger/TrigValidation/TrigValAlgs/src/components/TrigValAlgs_entries.cxx
index d7cf34d443b3ba87369145d53332b31cb0eea89f..60fc95a701431fec54299a21f72a1e7ee82ab288 100644
--- a/Trigger/TrigValidation/TrigValAlgs/src/components/TrigValAlgs_entries.cxx
+++ b/Trigger/TrigValidation/TrigValAlgs/src/components/TrigValAlgs_entries.cxx
@@ -1,11 +1,7 @@
-#include "../TrigCountDumper.h"
 #include "../TrigDecisionChecker.h"
 #include "../TrigEDMChecker.h"
 #include "../TrigEDMAuxChecker.h"
-#include "../TrigSlimValAlg.h"
 
-DECLARE_COMPONENT( TrigCountDumper )
 DECLARE_COMPONENT( TrigDecisionChecker )
 DECLARE_COMPONENT( TrigEDMChecker )
 DECLARE_COMPONENT( TrigEDMAuxChecker )
-DECLARE_COMPONENT( TrigSlimValAlg )
diff --git a/Trigger/TrigValidation/TrigValTools/CMakeLists.txt b/Trigger/TrigValidation/TrigValTools/CMakeLists.txt
index f49eff884a76c1a30ddff94a14d819dbabc236da..81fe27447d39a72dfa3298da4c4c6374f6116ce5 100644
--- a/Trigger/TrigValidation/TrigValTools/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigValTools/CMakeLists.txt
@@ -1,44 +1,36 @@
-################################################################################
-# Package: TrigValTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigValTools )
 
 # External dependencies:
-find_package( ROOT COMPONENTS Hist Graf Gpad RIO Core Tree MathCore pthread Graf3d Html Postscript Gui GX11TTF GX11 )
-
-include_directories(src)
+find_package( ROOT COMPONENTS Hist Graf Gpad RIO Core MathCore Postscript )
 
 # Component(s) in the package:
 atlas_add_library( TrigValTools
                    src/*.cxx
                    PUBLIC_HEADERS TrigValTools
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( TrigValToolsDict
                       TrigValTools/TrigValToolsDict.h
                       TrigValTools/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} TrigValTools )
+                      LINK_LIBRARIES TrigValTools )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py python/TrigValSteering bin/chainDump.py )
+atlas_install_python_modules( python/*.py python/TrigValSteering bin/chainDump.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( bin/*.py test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( bin/*.pl bin/*.sh )
 atlas_install_data( share/*.json share/*.conf )
-atlas_install_runtime( bin/chainDump.py )
-atlas_install_scripts( bin/*.py bin/*.pl bin/*.sh test/*.py )
-atlas_install_generic( html/root2html/*.html
-                       DESTINATION share/TrigValTools/root2html
-                       EXECUTABLE )
 
 # Unit tests:
-atlas_add_test( TrigValSteering_flake8
-                SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/python/TrigValSteering
-                POST_EXEC_SCRIPT nopost.sh )
-
 atlas_add_test( TrigValSteering_unit_test
                 SCRIPT test_unit_trigvalsteering.py
                 PROPERTIES TIMEOUT 300
                 POST_EXEC_SCRIPT nopost.sh )
 
+atlas_add_test( rootcomp
+                SCRIPT test/test_rootcomp.sh ${CMAKE_CURRENT_SOURCE_DIR}/test/test_rootcomp.C
+                PROPERTIES TIMEOUT 450
+                POST_EXEC_SCRIPT nopost.sh )
diff --git a/Trigger/TrigValidation/TrigValTools/TrigValTools/TRoot2Html.h b/Trigger/TrigValidation/TrigValTools/TrigValTools/TRoot2Html.h
deleted file mode 100644
index 10c5dd2b9caacf7f7d4760d2f2a955dd55e6462a..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/TrigValTools/TRoot2Html.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef TRIGVALTOOLS_TROOT2HTML_H
-#define TRIGVALTOOLS_TROOT2HTML_H
-
-/**
- * @file   TRoot2Html.h
- * @brief  TRoot2Html class
- * @author Frank Winklmeier
- *
- * $Id: TRoot2Html.h 702373 2015-10-22 13:55:56Z fwinkl $
- */
-
-#include <fstream>
-#include <vector>
-
-#include "TMultiFileLooper.h"
-#include "TDirectory.h"
-#include "TString.h"
-#include "TH1.h"
-
-class TPRegexp;
-
-/**
- * @class  TRoot2Html
- * @brief  Create a (static) web page from ROOT histograms
- * @author Frank Winklmeier
- *
- * Create images from histograms in root files and assemble them in
- * a web page with a tree like naviation structure.
- */
-class TRoot2Html : public TMultiFileLooper {
- public:
-
-  /// C'tor
-  TRoot2Html();
-  /// D'tor
-  virtual ~TRoot2Html() {}
-  /// Copy C'tor (needed for Reflex dictionary generation)
-  TRoot2Html(const TRoot2Html& other);
-
-  /// \name Processing hooks
-  //@{
-  virtual void beginJob();
-  virtual void endJob();
-  virtual void beforeFile();
-  virtual void afterFile();
-  virtual void beforeDir();
-  virtual void afterDir();
-  virtual void processKey(TDirectory& dir, TKey& key);
-  //@}
-  
-  /// Output directory for HTML pages
-  void setOutputDir(const char* dir) {m_outDir = dir;}
-
-  /// Set image size
-  void setImageSize(Int_t width, Int_t height) {m_imgWidth = width; m_imgHeight = height;}
-
-  /// Add draw options for images (selected by regular expression on name)
-  void addDrawOptions(const char* regexp, const char* options);
-
-  /// Add draw options for images (selected by regular expression on class name)
-  void addClassDrawOptions(const char* regexp, const char* options);
-    
-  /// Show full file name in tree
-  void showFullFileName(Bool_t show = kTRUE) {m_showFullFileName = show;}
-  
- private:
-  TString m_fileList;
-  TString m_outDir;
-  Int_t m_imgHeight, m_imgWidth;
-  std::ofstream m_xml;
-  Int_t m_nodeId;
-  
-  Bool_t m_showFullFileName;
-  std::vector< std::pair<TPRegexp*,TString> > m_drawOptions;
-  std::vector< std::pair<TPRegexp*,TString> > m_classDrawOptions;
-    
-  TString hist2Png(TDirectory& dir, const TString& name);
-  TString getDrawOptions(const TH1& h);
-    
-  TString xmlTreeItem(const char* text);
-  TString xmlTreeItemClose();
-  TString xmlUserData(const char* name, const char* data);
-
-  // Not copyable due to the ofstream.
-  TRoot2Html& operator= (const TRoot2Html&);
-};
-
-#endif
diff --git a/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h b/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h
index 28064c1311102e7c58d25f36df8dce2660585121..f95c08a5c7e74a28d2da1c60e45d2da41f7c43e0 100644
--- a/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h
+++ b/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h
@@ -1,10 +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
 */
 
 #include "TrigValTools/TRootCompare.h"
 #include "TrigValTools/TFileLooper.h"
 #include "TrigValTools/TMultiFileLooper.h"
-#include "TrigValTools/TRoot2Html.h"
 
 #include "TPRegexp.h"
diff --git a/Trigger/TrigValidation/TrigValTools/TrigValTools/selection.xml b/Trigger/TrigValidation/TrigValTools/TrigValTools/selection.xml
index 512c99894514910c44d5c663988914aa57fce28b..2102ba54f93d5003f5d202303c9794f2e432e34f 100644
--- a/Trigger/TrigValidation/TrigValTools/TrigValTools/selection.xml
+++ b/Trigger/TrigValidation/TrigValTools/TrigValTools/selection.xml
@@ -2,5 +2,4 @@
   <class name="TRootCompare" />
   <class name="TFileLooper" />
   <class name="TMultiFileLooper" />
-  <class name="TRoot2Html" />
-</lcgdict>
\ No newline at end of file
+</lcgdict>
diff --git a/Trigger/TrigValidation/TrigValTools/bin/COOLRates.py b/Trigger/TrigValidation/TrigValTools/bin/COOLRates.py
index 1f1d37e5cc4678992b25099fdd4f62bd62794005..4afea908be084d155972fcba32a80db4505621b2 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/COOLRates.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/COOLRates.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #====================================================================================================================
 
@@ -13,8 +13,6 @@ __doc__     = "Fast Rate plotter from COOL database"
 from PyCool import cool
 from multiprocessing import Queue, cpu_count, Process
 from time import sleep
-import random
-import copy
 import argparse,sys,logging,time,os
 from math import log10
 import signal
@@ -45,7 +43,7 @@ if __name__=='__main__':
 	parser.add_argument('-m','--processes',dest='PROCESSES',default=2,type=int,help='Sets number of processes for multiprocessing retrieval of COOL data')	
 	args = parser.parse_args()
 
-from ROOT import gDirectory, TDatime, TProfile, TH1F, TCanvas, TLegend, TGaxis, gROOT, gStyle, SetOwnership, TColor, TLatex
+from ROOT import TDatime, TProfile, TCanvas, TLegend, TGaxis, gROOT, SetOwnership, TColor, TLatex
 
 #====================================================================================================================
 
@@ -145,7 +143,7 @@ class COOLQueryWorker():
 					break
 				resultBundle = self.processQuery(queryBundle)
 				queueOut.put(resultBundle)
-		except Exception,exception:
+		except Exception as exception:
 			logger.critical(exception)
 		
 		self.close()
@@ -265,7 +263,7 @@ class QueryBundle():
 		self.IoVEnd = IoVEnd
 		for request in payloadRequests:
 			if not len(request)==3:
-				print payloadRequests
+				print(payloadRequests)
 				sys.exit(0)
 		self.payloadRequests = payloadRequests
 		self.payloadRequirements = payloadRequirements
@@ -315,7 +313,7 @@ def rateNameInfo(runLbRanges,mySignal,numProc=1):
 			except Empty:
 				sleep(.001)
 				continue
-			if run == True:
+			if run is True:
 				break
 			runLbStart=run<<32
 			runLbEnd=runLbStart+1
@@ -400,7 +398,7 @@ def rateNameInfo(runLbRanges,mySignal,numProc=1):
 			except Empty:
 				time.sleep(.001)
 				continue
-			if result == True:
+			if result is True:
 				finished+=1
 				if finished==numProc: break
 				continue
@@ -561,7 +559,7 @@ def timeRangeToRunLbRange(timeRange):
 	try:
 		timeStart = time.strptime(timeStart,'%Y-%m-%d:%H:%M:%S')
 		timeEnd = time.strptime(timeEnd,'%Y-%m-%d:%H:%M:%S')
-	except:
+	except Exception:
 		logger.critical('Time range "{0}" does not match YYYY-MM-DD:HH:mm:ss;YYYY-MM-DD:HH:mm:ss'.format(timeRange))
 		sys.exit(0)
 
@@ -600,7 +598,6 @@ def nanoTimeRangesToRunLbRanges(nanoTimeRanges):
 #====================================================================================================================
 
 def fillNumberToRunLbRange(fillNumbers):
-	runLbRanges = []
 	minFill = min(fillNumbers)-1
 	worker = COOLQueryWorker()
 	result = {}
@@ -874,7 +871,7 @@ def getNiceCanvas(name,aliases,textSize=25):
 	canvas.SetBorderSize(0)
 	canvas.SetFrameFillColor(0)
 	#Stretch width and add subpad for legend
-	width = int(max([len(name) for name in aliases])*textSize*.50)+70
+	width = int(max([len(nm) for nm in aliases])*textSize*.50)+70
 	oldWidth = canvas.GetWindowWidth()
 	newWidth = oldWidth+width
 	canvas.SetCanvasSize(newWidth,canvas.GetWindowHeight())
diff --git a/Trigger/TrigValidation/TrigValTools/bin/check_log.py b/Trigger/TrigValidation/TrigValTools/bin/check_log.py
index 9c4271afa98dc28bf0587aa95b2dde0d2b2af467..75e21bf84d8bbbe2ced1d34782396805173a55e5 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/check_log.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/check_log.py
@@ -15,24 +15,24 @@ If no config file is provided, all errors will be shown.'
 
 # Error keywords
 errorRegex = [
-    '^ERROR ', ' ERROR ', ' FATAL ', 'CRITICAL ', 'ABORT_CHAIN',
-    '^Exception\:',
-    '^Caught signal',
-    '^Core dump',
-    'inconsistent use of tabs and spaces in indentation',
-    'glibc detected',
-    'tcmalloc\: allocation failed',
-    'athenaHLT.py\: error',
-    'HLTMPPU.*Child Issue',
-    'HLTMPPU.*Configuration Issue',
-    'There was a crash',
-    'illegal instruction',
-    'failure loading library',
-    'Cannot allocate memory',
-    'in state: CONTROLREADY$',
-    '^\s*missing data: ',
-    '^\s*can be produced by alg(s): ',
-    'pure virtual method called'
+    r'^ERROR ', ' ERROR ', ' FATAL ', 'CRITICAL ', 'ABORT_CHAIN',
+    r'^Exception\:',
+    r'^Caught signal',
+    r'^Core dump',
+    r'inconsistent use of tabs and spaces in indentation',
+    r'glibc detected',
+    r'tcmalloc\: allocation failed',
+    r'athenaHLT.py\: error',
+    r'HLTMPPU.*Child Issue',
+    r'HLTMPPU.*Configuration Issue',
+    r'There was a crash',
+    r'illegal instruction',
+    r'failure loading library',
+    r'Cannot allocate memory',
+    r'in state: CONTROLREADY$',
+    r'^\s*missing data: ',
+    r'^\s*can be produced by alg(s): ',
+    r'pure virtual method called'
 ]
 
 # Add list of all builtin Python errors
@@ -42,11 +42,11 @@ errorRegex.extend(builtinErrors)
 
 # Traceback keywords
 traceback = [
-    'Traceback',
-    'Shortened traceback',
-    'stack trace',
-    '^Algorithm stack',
-    '^#\d+\s*0x\w+ in '
+    r'Traceback',
+    r'Shortened traceback',
+    r'stack trace',
+    r'^Algorithm stack',
+    r'^#\d+\s*0x\w+ in '
 ]
 errorRegex.extend(traceback)
 
@@ -113,7 +113,7 @@ def parseConfig():
                       line = line[1:-1]
                   ignorePattern.append(line)
         noConfig = False
-    except:
+    except Exception:
       print('No config file, all warnings/errors will be printed')
       noConfig = True
 
@@ -124,9 +124,9 @@ def scanLogfile():
     tPattern = re.compile('|'.join(traceback))
     global msgLevels
     global logFileAddress
-    if args.warnings == True:
+    if args.warnings is True:
         pattern = warningRegex
-    if args.errors == True:
+    if args.errors is True:
         pattern = errorRegex
     msgLevels = re.compile('|'.join(pattern))
     igLevels = re.compile('|'.join(ignorePattern))
@@ -136,7 +136,7 @@ def scanLogfile():
         tracing = False
         for line in logFile:
             #Tracing only makes sense for errors
-            if args.errors == True and re.search(tPattern,line):
+            if args.errors is True and re.search(tPattern,line):
                 tracing = True
             elif line =='\n':
                 tracing = False
diff --git a/Trigger/TrigValidation/TrigValTools/bin/histSizes.py b/Trigger/TrigValidation/TrigValTools/bin/histSizes.py
index 4ea3c2d3d37fa9c8d83adc8886b21f857c10828f..10d30e3bd526ec1106f74948beb427da70d68eed 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/histSizes.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/histSizes.py
@@ -13,11 +13,11 @@ def filledBins(h):
     return sum([1 for i in range(N) if h.At(i)!=0])
 
 def hasLabels(h):
-    return (h.GetXaxis().GetLabels()!=None)
+    return (h.GetXaxis().GetLabels() is not None)
 
 def missingLabels(h):
     l = h.GetXaxis().GetLabels()    
-    return (l!=None and h.GetXaxis().GetNbins()!=l.GetSize())
+    return (l is not None and h.GetXaxis().GetNbins()!=l.GetSize())
             
 def addDirList(dir,path,hists):
     list=dir.GetListOfKeys()
@@ -29,9 +29,9 @@ def addDirList(dir,path,hists):
         else:
             h = key.ReadObj()
             if not h.InheritsFrom('TH1'): continue
-            if opts.labeled==True and not hasLabels(h): continue
-            if opts.misslabel==True and not missingLabels(h): continue
-            if opts.empty==True and h.GetEntries()>0: continue
+            if opts.labeled is True and not hasLabels(h): continue
+            if opts.misslabel is True and not missingLabels(h): continue
+            if opts.empty is True and h.GetEntries()>0: continue
             b = filledBins(h) if opts.filled else h.GetSize()
             hists[path+name]=(cname,b)
         
@@ -58,8 +58,7 @@ def byName(hists, nameFunc):
     return algs
 
 def byAlg(hists):
-    f = lambda h : h.split('/',2)[1]
-    return byName(hists, f)
+    return byName(hists, lambda h : h.split('/',2)[1])
 
 
 def main():    
@@ -108,11 +107,11 @@ def main():
 
    if not opts.byAlg: opts.byName = True
 
-   if opts.byName==True:
+   if opts.byName is True:
        for h,v in sorted(hists.items(), key=sortKey):
            print('%-80s %10s %10s' % (h,v[0],v[1]))
 
-   if opts.byAlg==True:
+   if opts.byAlg is True:
        algs = byAlg(hists)
        for h,v in sorted(algs.items(), key=sortKey):
            print('%-80s %10s %10s' % (h,v[0],v[1]))
diff --git a/Trigger/TrigValidation/TrigValTools/bin/regtest.py b/Trigger/TrigValidation/TrigValTools/bin/regtest.py
index e13ea5aceca581ed7e2bd6c9f9c001a916a48703..84d6aa0d859f4391daf49b617d15a23a67c3b32b 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/regtest.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/regtest.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
 
 import re
 import argparse
@@ -18,7 +20,7 @@ def progErrorExit(message, exitcode):
         failkey
     except NameError:
         failkey = 'FAILURE'
-    print 'regtest.py:', failkey, message  
+    print('regtest.py: %s %s' % (failkey, message))
     sys.exit(exitcode)
         
 def commandLine():
@@ -66,12 +68,12 @@ def commandLine():
                         )
     global args
     args = parser.parse_args()
-    if help == True: 
+    if help is True:
         usage()
         progErrorExit('usage', -1)
 
 def usage():
-    print'''
+    print('''
  Usage: regtest.py [options] 
 
   Testing tool for comparing marked lines in a log file against a reference
@@ -95,7 +97,7 @@ def usage():
   Technical info:
 
   Lines which match the regular expression
-  '''
+  ''')
 
 def regtest():
     with open(args.inputfile,'r') as inpfile:
@@ -105,29 +107,29 @@ def regtest():
                 matchline += 1
    
     if matchline == 0:
-        print '=== Alert!', failkey, 'no lines matching', linematch, 'in LOG'
+        print('=== Alert!', failkey, 'no lines matching', linematch, 'in LOG')
         result = True
         exit()
 
-    if debug == True:
-       print 'regtest.py,: debug: diff -b', args.inputfile, args.reffile
+    if debug is True:
+       print('regtest.py,: debug: diff -b', args.inputfile, args.reffile)
   
     command = 'diff -b ' +  args.inputfile + ' ' +  args.reffile
     rc = os.system(command)
-    if rc == False:
-       print '=== Output is the same as reference.'
+    if rc is False:
+       print('=== Output is the same as reference.')
 #       result = False
        result = 0
     else:
-        print '''=== Alert!''', failkey, '''input file (<) differs from reference (>)
-    If this change is understood, to update the reference file please type:
-    cp ''', args.inputfile, args.reffile
-#        result = True
+        print('''=== Alert!''', failkey, '''input file (<) differs from reference (>)
+        If this change is understood, to update the reference file please type:
+        cp ''', args.inputfile, args.reffile)
+        #        result = True
         result = 1
 
 
-    if debug == True:
-        print 'regtest.py  debug: returning result', result   
+    if debug is True:
+        print('regtest.py  debug: returning result', result)
     return result
 
 if __name__ == '__main__':
diff --git a/Trigger/TrigValidation/TrigValTools/bin/root2html.py b/Trigger/TrigValidation/TrigValTools/bin/root2html.py
index 2e7fbaeeb7833515866861b8f51bcd68aaf20ccb..0fbd03e0d8c0ecaed5f6aff27f862d43af3b90a7 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/root2html.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/root2html.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # @file:    root2html.py
 # @purpose: Generate the index.htm for a list of root files
 # @author:  Will Buttinger
@@ -27,8 +27,6 @@ html_template = """
 
 
 import sys
-import os
-from AthenaCommon.Utils.unixtools import FindFile
 
 def main():
          
@@ -48,7 +46,7 @@ def main():
    o_html.writelines(html_template%d)
    o_html.flush()
    o_html.close()
-   print "Wrote index.htm file"
+   print("Wrote index.htm file")
 
    return 0
 
diff --git a/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py b/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py
index 56e0221bfa870f1df7fac36a47300560ef563be4..f09355a0d2be4ab91cafc9021fb86ec800f66ed1 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py
@@ -9,44 +9,6 @@ from __future__ import print_function
 import sys
 import os
 import os.path
-from TrigValTools.TrigRootUtils import lsroot
-
-
-def diffFiles(ref,file,opts):
-   """Compare the keys in both files"""
-
-   import ROOT   
-   tref = ROOT.TFile(ref)
-   tfile = ROOT.TFile(file)
-   if tref.IsZombie() or tfile.IsZombie(): return
-   
-   lsref = lsroot(tref.GetDirectory(opts.refBaseDir))
-   lsfile = lsroot(tfile.GetDirectory(opts.fileBaseDir))
-   tref.Close()
-   tfile.Close()
-   del tref
-   del tfile
-
-   diff = list(set(lsref).difference(set(lsfile)))
-
-   import re
-   selection = lambda x: True
-
-   # Only show diffs that are not on the skip list ...
-   if len(opts.skip)>0:
-      selection = lambda x : not reduce(lambda a,b:a|b,[re.search(pat,x)!=None for pat in opts.skip])
-   # ... or pass the selection
-   elif len(opts.select)>0:
-      selection = lambda x : reduce(lambda a,b:a|b,[re.search(pat,x)!=None for pat in opts.select])
-      
-   refonly = filter(selection,filter(lambda s:s[0]=='-',diff))
-
-   if len(refonly)>0:
-      print("\nHistograms only found in reference:")
-      for s in refonly: print(s)
-
-   return
-
 
 def main():
       
@@ -163,6 +125,7 @@ def main():
       opts.skip += ["HltEDMSizes:Events_Without_Truncation"]        # ATR-14330
       opts.skip += ["Trig.*CaloCellMaker.*/TCRec_"] # timing histograms in TrigCaloCellMaker
       opts.skip += ["HLTFramework/ROBDataProviderSvc"] # RDP histograms differ in MT due to caching
+      opts.skip += ["HLTFramework/ByteStreamCnvSvc/ResultSizeByStream"] # ROOT bug, see ATR-21755, ROOT-10944 
 
    # Default thresholds
    if not opts.threshold:
@@ -184,12 +147,12 @@ def main():
 
 
    # Now import ROOT
-   import cppyy
+   import cppyy  # noqa: F401
    try:
       from PerfMonAna import PyRootLib
       ROOT = PyRootLib.importRoot( batch=True )
    except ImportError:
-      import ROOT
+      import ROOT   # noqa: F401
 
    sys.stdout.flush()
    sys.stderr.flush()
@@ -247,9 +210,6 @@ def main():
       print("GZipping postscript file -> %s.ps.gz" % opts.outFile)
       os.system("gzip -f %s.ps" % (opts.outFile))
 
-   # List histograms that are only found in reference
-   #diffFiles(args[0],args[1],opts)  # this is quite slow, disable it
-
    if rc != 0:
       result = 255
    elif valid.totalHist()>0:
diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigDumpTimers.py b/Trigger/TrigValidation/TrigValTools/bin/trigDumpTimers.py
index 7affe68bfe7641e1ad007c3550515ec793bd7ccb..6f1ba6fee5f22446fe6e7fe9e56322b05a9144bb 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/trigDumpTimers.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/trigDumpTimers.py
@@ -1,14 +1,12 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-# @file:    dumpTimes.py
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# @file:    trigDumpTimers.py
 # @purpose: Script to dump the timing histograms from expert-monitoring.root/TIMERS
 # @author:  Stewart Martin-Haugh
 
-import argparse
 import ROOT
 from optparse import OptionParser
-import os
 import re
 from TrigValTools.TrigRootUtils import lsroot
 
@@ -31,7 +29,7 @@ def get_matches(pattern, exclude, myFile):
   if exclude:
     regex_exclude = re.compile(".*" + exclude + ".*")
   for name in names:
-    if not "TIME" in name:
+    if "TIME" not in name:
       continue
     if not regex.match(name):
       continue
@@ -44,18 +42,18 @@ def get_matches(pattern, exclude, myFile):
 def main():
   parser = OptionParser()
   parser.add_option("-p", "--pattern", dest="pattern", type = "string", default = None,
-                                                                      help="Pattern to match histogram to")
+                    help="Pattern to match histogram to")
   parser.add_option("-x", "--exclude", dest="exclude", type = "string", default = None,
-                                                                      help="Pattern to exclude histogram from matching")
+                    help="Pattern to exclude histogram from matching")
   (options, args) = parser.parse_args()        
-  print(options, args)
+
   for arg in args:
     print(arg)
     myFile = ROOT.TFile(arg)
     pattern = ".*"
     if (options.pattern):
       pattern = options.pattern
-    get_matches(options.pattern, options.exclude, myFile)
+    get_matches(pattern, options.exclude, myFile)
 
     
 if __name__ == "__main__":
diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigslimval.py b/Trigger/TrigValidation/TrigValTools/bin/trigslimval.py
deleted file mode 100755
index a022377a035dcdd5f9fe9a4788f6b26d888aa7e8..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/bin/trigslimval.py
+++ /dev/null
@@ -1,540 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file   TrigSlimVal.py
-# @brief  Checks the output of TrigSlimValidation run logs
-# @author Ben Smith <bcsmith@fas.harvard.edu>
-
-import os
-import sys
-from sets import Set
-
-# Global variables
-variables = Set()
-failures = list()
-testsRun = 0
-
-# variable class
-class Variable:
-  name = ""
-  string = ""
-
-  def __init__(self, name, string):
-    self.name = name
-    self.string = string
-  def __repr__(self):
-    return 'Variable \'' + self.name + '\' from string \'' + self.string + '\''
-
-# comparison class
-class Comparison:
-  name = "Comparison"
-  string = ""
-
-  def __init__(self, name, string):
-    self.name = name
-    self.string = string
-  def __repr__(self):
-    return 'Comparison \'' + self.name + '\' with definition \'' + self.string + '\''
-
-  def passes(self, test, event):
-    # replace words with variable values
-    words = self.string.split(' ')
-    comparison = '='
-    currside = 0
-    leftVal = 0
-    rightVal = 0
-    operation = '+'
-    allVals = list()
-    for word in words:
-      # check if its an operation
-      if len(word) == 1 and not word.isdigit():
-        if word == '+':
-          operation = '+'
-          allVals.append('+')
-        elif word == '-':
-          operation = '-'
-          allVals.append('-')
-        elif word == '=':
-          operation = '+'
-          comparison = '='
-          allVals.append('=')
-          currside = 1
-        elif word == '<':
-          operation = '+'
-          comparison = '<'
-          allVals.append('<')
-          currside = 1
-        elif word == '>':
-          operation = '+'
-          comparison = '>'
-          allVals.append('>')
-          currside = 1
-        else:
-          return 'Error: cannot parse word ' + word + ' from comparison ' + self.string
-        continue
-      # replace the word with variable value
-      val = ''
-      if word.startswith('BASE.'):
-        val = test.getBaseVal(word.replace('BASE.', ''), event)
-      elif word.startswith('MOD.'):
-        val = test.getModifiedVal(word.replace('MOD.', ''), event)
-      elif word.isdigit():
-        val = int(word)
-      if isinstance(val, basestring) and val.count('not defined in') > 0:
-        val = 0
-      if not isinstance(val, int):
-        return 'ERROR: Cannot parse word ' + word + ' from comparison ' + self.string
-      
-      allVals.append('%d' % val)
-      if operation == '-':
-        val = val * -1
-      if currside == 0:
-        leftVal += val
-      else:
-        rightVal += val
-    
-    if leftVal == 0 and rightVal == 0:
-      return 'PASSED'
-    if comparison == '=' and leftVal == rightVal:
-      return 'PASSED'
-    if comparison == '<' and leftVal < rightVal:
-      return 'PASSED'
-    if comparison == '>' and leftVal > rightVal:
-      return 'PASSED'
-      
-    message = 'FAILED comparison \'' + self.name +'\': ' + self.string
-    message += ' ( '
-    for x in allVals:
-      message += x + ' '
-    message += ')'
-    message += ' Event: %d' % event
-    return message
-
-# test class
-class Test:
-  name = "TestClass"
-  alterableVariables = Set()
-  comparisons = Set()
-  baseValDictArray = list()
-  modifiedValDictArray = list()
-
-  def __init__(self, name):
-    self.name = name
-  def __repr__(self):
-    str = 'Test ' + self.name
-    str += '\n\tAlterableVariables: ' + self.alterableVariables.__repr__()
-    str += '\n\tComparisons: ' + self.comparisons.__repr__()
-    str += '\n\tBase value dictionary array: ' + self.baseValDictArray.__repr__()
-    str += '\n\tModified value dictionary array: ' + self.modifiedValDictArray.__repr__()
-    return str
-
-  def getBaseVal(self, name, event):
-    if not len(self.baseValDictArray) > event:
-      return 'No entries in the base value dictionary for event %d' % event
-    baseValDict = self.baseValDictArray[event];
-    v = getVariable(name)
-    if not isinstance(v, Variable):
-      return v
-    if not v in baseValDict:
-      return 'Variable ' + name + ' not defined in the base value dictionary'
-    return baseValDict[v]
-
-  def getModifiedVal(self, name, event):
-    if not len(self.modifiedValDictArray) > event:
-      return 'No entries in the modified value dictionary for event %d' % event
-    modifiedValDict = self.modifiedValDictArray[event];
-    v = getVariable(name)
-    if not isinstance(v, Variable):
-      return v
-    if not v in modifiedValDict:
-      return 'Variable ' + name + ' not defined in the modified value dictionary'
-    return modifiedValDict[v]
-
-  def runTests(self):
-    global testsRun
-    global failures
-    
-    testsRun = testsRun + 1
-    # loop through events and check each one
-    if not len(self.baseValDictArray) == len(self.modifiedValDictArray):
-      return 'Initialization error: base and modified value dictionary arrays have different sizes'
-    i = 0
-    for i in range(0, len(self.baseValDictArray)):
-      # check that the non-alterable variables have not changed
-      for v in variables.difference(map(getVariable, self.alterableVariables)):
-        if isinstance(self.getBaseVal(v.name, i),basestring):
-          continue
-        c = Comparison('UnalterableVariable: ' + v.name, 'BASE.' + v.name + ' = ' + 'MOD.' + v.name)
-        val = c.passes(self, i)
-        if not val == 'PASSED':
-          failures.append(self.name + ': ' + val)
-          return val
-      # check that the comparisons pass
-      for c in self.comparisons:
-        val = c.passes(self, i)
-        if not val == 'PASSED':
-          failures.append(self.name + ': ' + val)
-          return val
-    # if we made it this far, then we passed!
-    return 'PASSED'
-
-# variable functions
-def getVariable(name):
-  for v in variables:
-    if v.name == name:
-      return v
-  return 'Variable ' + name + ' not found'
-
-def addVariable(name, string):
-  if isinstance(getVariable(name), Variable):
-    return 'Could not add variable ' + name + '... Variable already exists'
-  v = Variable(name, string)
-  variables.add(v)
-  return v
-
-# parsing functions
-def matchLine(line, valDict):
-  # ignore blank lines
-  if len(line) == 0:
-    return ''
-  # check if any of the variable strings appear in the line
-  for v in variables:
-    if line.count(v.string) > 0:
-      if v in valDict: 
-        return 'Wanted to assign line ' + line + ' to var ' + v.name + ' but ' + v.name + ' is already assigned!'
-      # split the line by the colon
-      words = line.split(':')
-      if not len(words) == 2:
-        message = 'Wanted to assign line ' + line + ' to var ' + v.name
-        message = message + ' but line has wrong num (' + words.length() + ') of words'
-        return messsage
-      val = int(words[1].replace(' ', '').replace('\n', ''))
-      valDict[v] = val
-      return ''
-  return 'Unable to match line ' + line
-  
-def parseEvent(log, valDict):
-  for line in log:
-    errorVal = matchLine(line, valDict)
-    if not errorVal == '': 
-      return errorVal 
-  return '' 
-
-def parseLog(logFile, valDictArray):
-  if not os.path.exists(logFile):
-    return 'File ' + logFile + ' does not exist'
-  file = open(logFile, 'r')
-
-  # split the log file by event by looking for the lines
-  startBlock = 'START of TrigSlimValidation DUMP'
-  endBlock = 'END of TrigSlimValidation DUMP'
-  log = list()
-  inBlock = False
-  eventNum = 1
-
-  for line in file.readlines():
-    # if we see a start block, prepare to read an event
-    if line.count(startBlock) > 0:
-      if inBlock:
-        return 'Wanted to start event %d, but event %d never closed' % (eventNum, eventNum - 1)
-      inBlock = True
-      log[:] = []
-      continue
-    if line.count(endBlock) > 0:
-    # if we see an end block, close event and parse it
-      if not inBlock:
-        return 'Wanted to end event %d, but event was never opened!' % (eventNum)
-      valDict = dict()
-      errorVal = parseEvent(log, valDict)
-      valDictArray.append(valDict)
-      if not errorVal == '':
-        return errorVal
-      inBlock = False
-      eventNum = eventNum + 1
-      continue
-    # if we're in an event block, add the log line
-    # otherwise, just ignore the line
-    if inBlock:
-      log.append(line)
-  file.close()
-
-  return ''
-
-def setupTest(test, baseLog, modifiedLog):
-  test.baseValDictArray = list()
-  errorVal = parseLog(baseLog, test.baseValDictArray)
-  if not errorVal == '':
-    print '\nParsing the base log ' +  baseLog + ' for test',
-    print test.name + ' failed with the following error:'
-    print errorVal
-    print 'This is unrecoverable... exiting!\n'
-    exit()
-  test.modifiedValDictArray = list()
-  errorVal = parseLog(modifiedLog, test.modifiedValDictArray)
-  if not errorVal == '':
-    print '\nParsing the modified log ' +  modifiedLog + ' for test',
-    print test.name + ' failed with the following error:'
-    print errorVal
-    print 'This is unrecoverable... exiting!\n'
-    exit()
-
-
-############## TrigSlimValidation specific code #################
-def buildObjectList(log, key):
-  s = Set()
-
-  if not os.path.exists(log):
-    return 'File ' + log + ' does not exist'
-  file = open(log, 'r')
-  for line in file.readlines():
-    if line.count(key) > 0:
-      for word in line.split(' '):
-        if word.count(':') > 0:
-          s.add(word.replace(':', ''))
-          break
-  return s
-
-def buildStreamRemovedTest(stream, baseLog, modLog, features):
-  RSTest = Test('RS' + stream)
-  setupTest(RSTest, baseLog, modLog)
-  RSTest.alterableVariables = Set(['elements', 'intermediates', 'stream'+stream, 'links', 'features', 'featureless', 'ghosts', 'seeds', 'seededBy', 'sameRoI','longest', 'unassociated'])
-  RSTest.alterableVariables.add('unassociatedgroup')
-  # All features can change, as entire streams are removed
-  for f in features:
-    RSTest.alterableVariables.add('feature'+f)
-  RSTest.comparisons = Set([Comparison('StreamRemoved', 'MOD.stream' + stream + ' < BASE.stream' + stream)])
-  return RSTest
-
-def buildFeatureRemovedTest(feature, baseLog, modLog):
-  RFTest = Test('RF'+feature)
-  setupTest(RFTest, baseLog, modLog)
-  RFTest.alterableVariables = Set(['features','featureless','links','feature'+feature])
-  RFTest.comparisons = Set([Comparison('DistinctFeatures', 'BASE.features = MOD.features + 1'),
-                        Comparison('FeatureLinks', 'BASE.links < 1 + MOD.links + BASE.feature'+feature),
-                        Comparison('FeatureRemoved', 'MOD.feature'+feature+' = 0')])
-  return RFTest
-  
-def buildSqueezeTest(baseLog, modLog, streams, features):
-  SqueezeTest = Test('Squeeze')
-  setupTest(SqueezeTest, baseLog, modLog)
-  SqueezeTest.alterableVariables = Set(['intermediates', 'seeds', 'seededBy', 'sameRoI', 'elements', 'unassociated', 'longest', 'shortest', 'links','unassociatedgroup'])
-  for s in streams:
-    SqueezeTest.alterableVariables.add('stream'+s)
-  SqueezeTest.comparisons = Set([Comparison('IntermeidateElements','MOD.intermediates = 0'),
-                             Comparison('Elements', 'MOD.elements + BASE.intermediates = BASE.elements'),
-                             Comparison('LongestChain', 'MOD.longest = 3'),
-                             Comparison('ShortestChain', 'MOD.shortest < 4')])
-  # When you squeeze, you can actually increase the number of occurrences of a given feature
-  # if you remove a node with multiple children.  Thus, we need to check that the number
-  # of occurrences of each feature is the same or larger
-  for f in features:
-    SqueezeTest.alterableVariables.add('feature'+f)
-    SqueezeTest.comparisons.add(Comparison('FeatureIncrease'+f, 'MOD.feature'+f+' + 1 > BASE.feature' + f)) 
-  return SqueezeTest
-
-def buildNoSlimTest(baseLog, modLog):
-  # No Slim Test
-  # Nothing changes, so this is super easy!
-  NoSlimTest = Test("NoSlimTest")
-  setupTest(NoSlimTest, baseLog, m)
-  return NoSlimTest
-
-def buildCombinedTest(test1, test2):
-  test = Test(test1.name + test2.name)
-  test.alterableVariables = test1.alterableVariables.union(test2.alterableVariables)
-  test.comparisons = test1.comparisons.union(test2.comparisons)
-  test.baseValDictArray = test1.baseValDictArray
-  test.modifiedValDictArray = test1.modifiedValDictArray
-  # There are some special rules for combining RF and squeeze tests
-  # Basically, squeeze tests require that the number of occurrences of a feature
-  # stays the same or increases.  We need to remove this required when we combine
-  # with an RF test, but only for the feature that was removed
-  toRemove = Set()
-  if test1.name.count('RF') > 0:
-    feature = test1.name.replace('RF', '')
-    for c in test.comparisons:
-      if c.name.startswith('FeatureIncrease') and c.name.count(feature) > 0:
-        toRemove.add(c)
-  if test2.name.count('RF') > 0:
-    feature = test2.name.replace('RF', '')
-    for c in test.comparisons:
-      if c.name.startswith('FeatureIncrease') and c.name.count(feature) > 0:
-        toRemove.add(c)
-  test.comparisons = test.comparisons.difference(toRemove)
-  return test
-  
-# Begin main
-
-def main():
-
-  # read command line options
-  from optparse import OptionParser
-  parser = OptionParser(usage = "usage: %prog [options]",
-                       description = "Compares output of TrigSlimValAlg on slimmed and unslimmed AODs to validate TrigNavigationSlimming.")
-  parser.add_option("-b", "--base", action = "store", dest = "baseLog", default = "TrigSlimValidation_Base.log", help = "Base log file")
-  parser.add_option("-m", "--modified", action = "append", dest = "modifiedLog", default = list(), help = "Modified log file")
-  parser.add_option("-t", "--test", action = "append", dest = "testType", default = list(), help = "Test to run")
-  parser.add_option("-f", "--feature", action = "append", dest = "removedFeature", default = list(), help = "Removed feature (if needed by test)")
-  parser.add_option("-s", "--stream", action = "append", dest = "removedStream", default = list(), help = "Removed stream (if needed by test)")
-
-  (opts, args) = parser.parse_args()
-
-  if len(args) > 0:
-    print
-    print 'Unable to parse option: ' + args[0]
-    print 'This is unrecoverable... exiting!\n'
-    print
-    exit()
-
-  # Populate all variables
-  baseLog = opts.baseLog
-  modifiedLogs = opts.modifiedLog
-  testTypes = opts.testType
-  removedFeatures = opts.removedFeature
-  removedStreams = opts.removedStream
-  if len(modifiedLogs) == 0 and len(testTypes) == 0:
-    print
-    print 'You must specify either a modified log (with -m) or a test type (with -t)'
-    print
-    exit()
-  if len(modifiedLogs) == 0:
-    for t in testTypes:
-      modifiedLog = 'TrigSlimValidation_' + t + '.log'
-      print
-      print 'Assuming modified log file at ' + modifiedLog + ' based upon test type ' + t
-      print
-      modifiedLogs.append(modifiedLog)
-  if len(testTypes) == 0:
-    for l in modifiedLogs:
-      frontRemoved = l.split('_')
-      if not len(frontRemoved) == 2:
-        print
-        print 'Unable to determine implicit test type from modified log', 
-        print l + '... you should supply it explicity with -t'
-        print
-        exit()
-      backRemoved = frontRemoved[1].split('.')
-      if not len(backRemoved) == 2:
-        print
-        print 'Unable to determine implicit test type from modified log', 
-        print l + '... you should supply it explicity with -t'
-        print
-        exit()
-      t = backRemoved[0]
-      print
-      print 'Assuming test type ' + t + ' based upon modified log file ' + l
-      print
-      testTypes.append(t)
-
-  # Build feature, stream, and group lists
-  features = buildObjectList(baseLog, 'Occurrences of feature')
-  if not isinstance(features, Set):
-    print
-    print 'Unable to build feature list due to the following error:'
-    print features
-    print 'This is unrecoverable... exiting!\n'
-    exit()
-  streams = buildObjectList(baseLog, 'Elements associated with stream')
-  if not isinstance(streams, Set):
-    print
-    print 'Unable to build stream list due to the following error:'
-    print streams
-    print 'This is unrecoverable... exiting!\n'
-    exit()
-  groups = buildObjectList(baseLog, 'Elements associated with group')
-  if not isinstance(groups, Set):
-    print
-    print 'Unable to build group list due to the following error:'
-    print groups
-    print 'This is unrecoverable... exiting!\n'
-    exit()
-
-  # Define needed variables
-  addVariable('elements', 'Number of trigger elements:')
-  addVariable('features', 'Number of distinct features:')
-  addVariable('intermediates', 'Number of intermediate trigger elements:')
-  addVariable('featureless', 'Number of featureless trigger elements:')
-  addVariable('ghosts', 'Number of ghost trigger elements:')
-  addVariable('RoIs', 'Number of RoIs:')
-  addVariable('longest', 'Longest chain:')
-  addVariable('shortest', 'Shortest chain:')
-  addVariable('links', 'Number of feature links:')
-  addVariable('seeds', 'Number of seeds relations:')
-  addVariable('seededBy', 'Number of seeded by relations:')
-  addVariable('sameRoI', 'Number of same RoI relations:')
-
-  # add feature, stream, and group variables
-  for f in features:
-    addVariable('feature'+f, 'Occurrences of feature ' + f + ':')
-  for s in streams:
-    addVariable('stream'+s, 'Elements associated with stream ' + s + ':')
-  for g in groups:
-    addVariable('group'+g, 'Elements associated with group ' + g + ':')
-  addVariable('unassociated', 'Elements unassociated with any stream:')
-  addVariable('unassociatedgroup', 'Elements unassociated with any group:')
-
-  # Define some useful tests
-  AllTests = list()
-
-  for t,m in zip(testTypes,modifiedLogs):
-    if t == 'NoSlim':
-      AllTests.append(buildNoSlimTest(baseLog, m))
-    if t == 'RF':
-      if len(removedFeatures) == 0:
-        print
-        print "Could not find feature to remove for test " + t + ' with modified log file ' + m
-        print
-        exit()
-      AllTests.append(buildFeatureRemovedTest(removedFeatures.pop(0), baseLog, m))
-    if t == 'RS':
-      if len(removedStreams) == 0:
-        print
-        print "Could not find stream to remove for test " + t + ' with modified log file ' + m
-        print
-        exit()
-      AllTests.append(buildStreamRemovedTest(removedStreams.pop(0), baseLog, m, features))
-    if t == 'Squeeze':
-      AllTests.append(buildSqueezeTest(baseLog, m, streams, features)) 
-    if t == 'SqueezeRF':
-      if len(removedFeatures) == 0:
-        print
-        print "Could not find feature to remove for test " + t + ' with modified log file ' + m
-        print
-        exit()
-      SqueezeTest = buildSqueezeTest(baseLog, m, streams, features)
-      RFTest = buildFeatureRemovedTest(removedFeatures.pop(0), baseLog, m)
-      AllTests.append(buildCombinedTest(SqueezeTest, RFTest))
-
-  # Check the tests
-  print
-  print 'Running tests...'
-  print
-
-  for t in AllTests:
-    print t.name + ': ' + t.runTests()
-
-  print
-  print 'Tests complete!'
-  print
-
-  # Print the final report
-  print
-  print 'Final report:'
-  print 'Tests passed: %d/%d' % (testsRun - len(failures), testsRun)
-  print 'Tests failed: %d/%d' % (len(failures), testsRun)
-  print
-
-  if len(failures) > 0:
-    print
-    print "trigslimval.py ERROR: Failures found"
-    print
-    print 'Failures:'
-    for f in failures:
-      print f
-    print
-    print
-
-if __name__ == "__main__":
-   sys.exit(main())
-
diff --git a/Trigger/TrigValidation/TrigValTools/html/root2html/index.html b/Trigger/TrigValidation/TrigValTools/html/root2html/index.html
deleted file mode 100644
index faa2a8df09bd598e5283efb9338d3a7af250e975..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/html/root2html/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- Main html file for root2html --!>
-
-<html>
-  <head>
-    <title>HLT monitoring histograms</title>
-  </head>
-  <frameset cols="320,*" border="0">
-    <frame src="tree.html" name="tree"></frame>
-    <frame src="" name="img"></frame>
-  </frameset>
-</html>
diff --git a/Trigger/TrigValidation/TrigValTools/html/root2html/tree.html b/Trigger/TrigValidation/TrigValTools/html/root2html/tree.html
deleted file mode 100644
index fc7a2ea9109347529edb1f890a399db05793e115..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/html/root2html/tree.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- Tree navigation for root2html -->
-  
-<html>
-  <body>
-    <link rel="STYLESHEET" type="text/css" href="http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/dhtmlxTree/css/dhtmlXTree.css">
-      <script src="http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/dhtmlxTree/js/dhtmlXCommon.js"></script>
-      <script src="http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/dhtmlxTree/js/dhtmlXTree.js"></script>
-      
-      <input type="button" name="draw" value="Show selected" onClick="drawSelected()"></input>
-      <input type="button" name="clear" value="ClearAll" onClick="clearAll()"></input>
-      <p><font size="-2">
-          To show histograms, click on single leaf or select multiple and click on "Show selected".
-          (Please be patient while the tree loads...)
-      </font></p>
-      <div id="naviTree" style="width:300"></div>
-      <div id="footer"><font size="-2">Created by root2html<br>(C) Frank Winklmeier<br>powered by <a href="http://www.scbr.com/docs/products/dhtmlxTree/" target="new">dhtmlXTree</a></font></div>
-      <script language="JavaScript">
-        tree = new dhtmlXTreeObject('naviTree',"100%","80%",0);
-        tree.setImagePath("http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/dhtmlxTree/imgs/");
-        tree.enableCheckBoxes(true);
-        tree.enableThreeStateCheckboxes(true);
-        tree.loadXML("tree.xml");
-        tree.setOnClickHandler(doOnClick);
-
-        // onClick event handler
-        // Load image path on click
-        function doOnClick(nodeId) {
-          var imgPath = tree.getUserData(nodeId,"img");
-          if (imgPath != undefined) parent["img"].location.href = imgPath;
-        }
-
-        // show all selected plots
-        function drawSelected() {
-          var doc = parent["img"].document;
-          doc.open();
-          doc.write("<html><body>");
-
-          // get list of all selected elements
-          var ids = tree.getAllChecked().split(',');
-          // loop over all elements and write <img> tag into frame
-          for (var i in ids) {
-            var imgPath = tree.getUserData(ids[i],"img");
-            if (imgPath != undefined) {
-              doc.write('<img src="');
-              doc.write(imgPath);
-              doc.write('"');
-            }
-          }
-          doc.write("</body></html>");
-          doc.close()              
-        }
-
-        // clear all selected items
-        function clearAll() {
-          for (var i in tree.getAllChecked().split(',')) {
-            tree.setCheck(i,false);
-          }
-        }
-      </script>
-
-  </body>
-</html>
diff --git a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
index 56e9eda2d1e4e1f95284db68c2b67b6cc5253f13..62710f0657c12fb0901c6b6d5acbf7230dcb1aeb 100644
--- a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
+++ b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
@@ -662,7 +662,7 @@ class MessageCountStep(Step):
         ret, cmd = super(MessageCountStep, self).run(dry_run)
         self.auto_report_result = auto_report
         if ret != 0:
-            self.log.error('%s failed')
+            self.log.error('%s failed', self.name)
             self.result = 1
             if self.auto_report_result:
                 self.report_result()
@@ -742,12 +742,12 @@ def default_check_steps(test):
         log_to_zip = check_steps[-1].merged_name
 
     # Reco_tf log merging
-    reco_tf_steps = [step for step in test.exec_steps if step.type=='Reco_tf']
+    reco_tf_steps = [step for step in test.exec_steps if step.type in ['Reco_tf', 'Trig_reco_tf']]
     if len(reco_tf_steps) > 0:
         reco_tf_logmerge = LogMergeStep('LogMerge_Reco_tf')
         reco_tf_logmerge.warn_if_missing = False
         tf_names = ['HITtoRDO', 'RDOtoRDOTrigger', 'RAWtoESD', 'ESDtoAOD',
-                    'PhysicsValidation', 'RAWtoALL']
+                    'PhysicsValidation', 'RAWtoALL', 'BSRDOtoRAW']
         reco_tf_logmerge.log_files = ['log.'+tf_name for tf_name in tf_names]
         if not get_step_from_list('LogMerge', check_steps):
             for step in reco_tf_steps:
diff --git a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
index 370d8ba36c54eb5b66fb136a1fe4de75b3faa872..a0c441349b541a04e1d80f7e873df8e2d19bcf54 100644
--- a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
+++ b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json
@@ -6,6 +6,13 @@
             "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.merge.RAW._lb0151._SFO-1._0001.1"
         ]
     },
+    "data_Main": {
+        "source": "data",
+        "format": "BS",
+        "paths": [
+            "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_Main.daq.RAW._lb0100._SFO-1._0001.data"
+        ]
+    },
     "data_run1": {
         "source": "data",
         "format": "BS",
diff --git a/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx b/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx
deleted file mode 100644
index 93d24229bec67448e8868a90acab6977175e5fc6..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file   TRoot2Html.cxx
- * @brief  TRoot2Html implementation
- * @author Frank Winklmeier
- *
- * $Id: TRoot2Html.cxx,v 1.1 2008-07-28 11:02:00 fwinkl Exp $
- */
-
-#include "TrigValTools/TRoot2Html.h"
-
-#include <iostream>
-#include <sstream>
-#include "TError.h"
-#include "TClass.h"
-#include "TH1.h"
-#include "TFile.h"
-#include "TCanvas.h"
-#include "TSystem.h"
-#include "TKey.h"
-#include "TPRegexp.h"
-
-using namespace std;
-
-TRoot2Html::TRoot2Html() :
-  m_nodeId(1),
-  m_showFullFileName(kFALSE)
-{
-  setOutputDir("./");
-  setImageSize(400,400);
-}
-
-TRoot2Html::TRoot2Html(const TRoot2Html& other):
-  TMultiFileLooper(other),
-  m_imgHeight(other.m_imgHeight),
-  m_imgWidth(other.m_imgWidth),
-  m_nodeId(other.m_nodeId),
-  m_showFullFileName(other.m_showFullFileName)
-{
-}
-
-void TRoot2Html::beginJob()
-{  
-   m_xml.open(m_outDir+"/tree.xml");
-  if (!m_xml) {
-    cout << "Cannot write to directory " << m_outDir << endl;
-    return;
-  }
-  
-  m_xml << "<?_xml version='1.0' encoding='iso-8859-1'?>" << endl;
-  m_xml << "<!-- This file was auto generated by root2html -->" << endl;
-  m_xml << "<!-- Use it with the dhtmlxTree component (http://www.scbr.com/docs/products/dhtmlxTree) -->" << endl;
-  m_xml << "<tree id=\"0\">" << endl;
-  m_nodeId = 1;
-}
-
-void TRoot2Html::endJob()
-{
-  m_xml << "</tree>" << endl;
-  m_xml.close();
-}
-
-
-void TRoot2Html::beforeFile()
-{
-  TString treeNodeName;
-  if (m_showFullFileName) treeNodeName = file()->GetName();
-  else treeNodeName = gSystem->BaseName(file()->GetName());
-  
-  m_xml << "<!-- Start of " << treeNodeName << " -->" << endl;
-  m_xml << xmlTreeItem(treeNodeName).Data() << endl;
-  
-  // Create output directory
-  gSystem->mkdir(m_outDir+"/img", true);
-}
-
-void TRoot2Html::afterFile()
-{
-  m_xml << xmlTreeItemClose().Data() << endl;
-}
-
-
-void TRoot2Html::beforeDir()
-{
-  TString s(getPathFromDir(*gDirectory));
-  TString imgDir = TString(m_outDir) + "/img/" + s;
-  gSystem->mkdir(imgDir, true);
-
-  m_xml << xmlTreeItem(gDirectory->GetName()).Data() << endl;
-}
-
-void TRoot2Html::afterDir()
-{
-  m_xml << xmlTreeItemClose().Data() << endl;
-}
-
-
-void TRoot2Html::processKey(TDirectory& dir, TKey& key)
-{
-  dir.cd();
-  
-  TObject* obj = key.ReadObj();
-  if (obj->IsA()->InheritsFrom("TH1")) {
-    m_xml << xmlTreeItem(key.GetName()).Data() << endl;
-    TString imgPath = hist2Png(*gDirectory, key.GetName());
-    if (imgPath!="") {
-      m_xml << xmlUserData("img",imgPath).Data() << endl;
-    }
-    m_xml << xmlTreeItemClose().Data() << endl;
-  }
-}
-
-
-// Save histogram 'name' from 'dir' in 'm_outDir/img'
-// Return "" on error otherwise image path relative to m_outDir
-TString TRoot2Html::hist2Png(TDirectory& dir, const TString& name)
-{  
-  TH1* h = (TH1*)dir.Get(name);
-  if (h==0) {
-    cout << "hist2Png: Cannot load histogram " << name << endl;
-    return "";
-  }
-  
-  TCanvas c("c","c",m_imgWidth,m_imgHeight);
-  TString options(getDrawOptions(*h));
-  if (m_verbose) cout << "Drawing histogram " << h->GetName()
-                      << " (" << h->ClassName() << ") with options '"
-                      << options << "'" << endl;
-  h->Draw(options);
-  TString s(getPathFromDir(dir));
-  TString pngName = "img/" + s + "/" + name + ".png";
-
-  // Suppress the info message when saving file
-  Int_t oldIgnoreLevel = gErrorIgnoreLevel;
-  if (!m_verbose) gErrorIgnoreLevel = kWarning;
-  c.SaveAs(m_outDir+"/"+pngName);
-
-  gErrorIgnoreLevel = oldIgnoreLevel;
-  
-  return pngName;
-}
-
-
-// Set draw options for all histograms matching re
-void TRoot2Html::addDrawOptions(const char* regexp, const char* options)
-{
-  if (regexp && options) {
-    TPRegexp* re = new TPRegexp(regexp);
-    if (re) m_drawOptions.push_back(std::pair<TPRegexp*,TString>(re,options));
-  }
-}
-
-void TRoot2Html::addClassDrawOptions(const char* regexp, const char* options)
-{
-  if (regexp && options) {
-    TPRegexp* re = new TPRegexp(regexp);
-    if (re) m_classDrawOptions.push_back(std::pair<TPRegexp*,TString>(re,options));
-  }
-}
-
-
-// return draw options for specified histogram
-TString TRoot2Html::getDrawOptions(const TH1& h)
-{
-  TString options("");
-  
-  // First check if we have class wide draw options for this histogram
-  vector< pair<TPRegexp*,TString> >::iterator iter;
-  for (iter=m_classDrawOptions.begin(); iter!=m_classDrawOptions.end(); iter++) {
-    if (iter->first->Match(h.ClassName())>0) {
-      options = iter->second;
-      break;
-    }
-  }
-  
-  // Check if any regexp matches the histogram name
-  for (iter=m_drawOptions.begin(); iter!=m_drawOptions.end(); iter++) {
-    if (iter->first->Match(h.GetName())>0) {
-      options = iter->second;
-      break;
-    }
-  }
-  
-  return options;
-}
-
-// Tree node with text and id
-TString TRoot2Html::xmlTreeItem(const char* text)
-{
-  TString s;
-  s.Form("<item text=\"%s\" id=\"%d\">",text,m_nodeId);
-  m_nodeId++;
-  return s;
-}
-
-// Tree node close
-TString TRoot2Html::xmlTreeItemClose()
-{
-  return "</item>";
-}
-
-// User data for tree node
-TString TRoot2Html::xmlUserData(const char* name, const char* data)
-{
-  TString s;
-  s.Form("<userdata name=\"%s\">%s</userdata>",name,data);
-  return s;
-}
diff --git a/Trigger/TrigValidation/TrigValTools/test/test_rootcomp.C b/Trigger/TrigValidation/TrigValTools/test/test_rootcomp.C
new file mode 100644
index 0000000000000000000000000000000000000000..bd3266216a70822353c0e9da92fc1afcad215daf
--- /dev/null
+++ b/Trigger/TrigValidation/TrigValTools/test/test_rootcomp.C
@@ -0,0 +1,36 @@
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+// Create two ROOT files with histograms used in test_rootcomp.sh
+{
+  // Histogram for both files:
+  TH1D h1("h1", "", 10, 0, 10);
+  h1.Fill(5);
+  {
+    TFile f("hist1.root", "RECREATE");
+    h1.Write();
+
+    TH1D hr("hrandom", "", 10, 0, 10);
+    hr.FillRandom("gaus", 1000);
+
+    TH1D hl("hlabel", "", 5, 0, 5);
+    hl.Fill("a", 1);
+    hl.Fill("b", 2);
+
+    TH1D h2("hextra", "", 10, 0, 10);
+
+    f.Write();
+  }
+
+  {
+    TFile f("hist2.root", "RECREATE");
+    h1.Write();
+
+    TH1D hr("hrandom", "", 10, 0, 10);
+    hr.FillRandom("gaus", 1000);
+
+    TH1D hl("hlabel", "", 4, 0, 4);   // one less (empty) bin than above
+    hl.Fill("b", 2);
+    hl.Fill("a", 1);
+
+    f.Write();
+  }
+}
diff --git a/Trigger/TrigValidation/TrigValTools/test/test_rootcomp.sh b/Trigger/TrigValidation/TrigValTools/test/test_rootcomp.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9ee20934588ad0d322c8fc5687147f30f2865456
--- /dev/null
+++ b/Trigger/TrigValidation/TrigValTools/test/test_rootcomp.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# Unit test for rootcomp.py
+
+if [ -z "$1" ]; then
+    echo "Usage: $0 root.C"
+    exit 1
+fi
+
+# Helpers:
+assert_pass() {
+    eval $@ || exit 1
+}
+
+assert_fail() {
+    eval $@ && exit 1
+}
+
+# Create histogram files:
+assert_pass root -l -b -n -q $1
+
+# Check default options:
+assert_pass rootcomp.py hist1.root hist1.root
+assert_pass test -f rootcomp.root
+assert_pass test -f rootcomp.ps
+
+# Default options for the following specific tests:
+opts="--noSkipList --noPS --noRoot"
+
+# Check regular histogram:
+assert_pass rootcomp.py hist1.root hist2.root $opts --select h1
+
+# Check label sorting:
+assert_pass rootcomp.py hist1.root hist2.root $opts --skip hrandom --sortLabels
+
+# Check failure for random histogram:
+assert_fail rootcomp.py hist1.root hist2.root $opts --sortLabels
+
+# Missing references:
+assert_fail rootcomp.py hist2.root hist1.root $opts --skip hrandom --sortLabels
+assert_pass rootcomp.py hist2.root hist1.root $opts --skip hrandom --sortLabels --ignoreMissingRef
+
+# If we get here all tests succeeded:
+exit 0
diff --git a/Trigger/TrigValidation/TrigValTools/test/test_unit_trigvalsteering.py b/Trigger/TrigValidation/TrigValTools/test/test_unit_trigvalsteering.py
index 8d8958e2b9c6d162ba73dba9d634f7139cefbc86..b77f263e9cfaa970f25fcb606a385a5c3d1c6015 100755
--- a/Trigger/TrigValidation/TrigValTools/test/test_unit_trigvalsteering.py
+++ b/Trigger/TrigValidation/TrigValTools/test/test_unit_trigvalsteering.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
-
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
 # This is not an ART test. This is a unit test of the framework used for
 # steering Trigger ART tests.
 
diff --git a/Trigger/TrigValidation/TriggerTest/CMakeLists.txt b/Trigger/TrigValidation/TriggerTest/CMakeLists.txt
index 0413d4b6df2eac13bb5079864eff6d01e179ca04..247e21f06c0ae9505188ba45749daf82014ff18b 100644
--- a/Trigger/TrigValidation/TriggerTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TriggerTest/CMakeLists.txt
@@ -1,21 +1,16 @@
-################################################################################
-# Package: TriggerTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TriggerTest )
 
 # Install files from the package:
-atlas_install_joboptions( share/*.py )
-atlas_install_runtime( share/*.cxx Testing/*.conf )
+atlas_install_scripts( test/test*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( test/exec*.sh test/test*.sh test/test*.py )
+atlas_install_joboptions( share/*.py )
+atlas_install_runtime( share/*.conf )
 atlas_install_data( share/*.ref )
 
 # Unit tests:
-atlas_add_test( flake8_test_dir
-                SCRIPT flake8 --select=ATL,F,E7,E9,W6 --enable-extension=ATL900,ATL901 ${CMAKE_CURRENT_SOURCE_DIR}/test
-                POST_EXEC_SCRIPT nopost.sh )
-
 atlas_add_test( TrigValSteeringUT
                 SCRIPT trigvalsteering-unit-tester.py ${CMAKE_CURRENT_SOURCE_DIR}/test
                 PROPERTIES TIMEOUT 300
diff --git a/Trigger/TrigValidation/TriggerTest/Testing/checklogTriggerTest.conf b/Trigger/TrigValidation/TriggerTest/share/checklogTriggerTest.conf
similarity index 100%
rename from Trigger/TrigValidation/TriggerTest/Testing/checklogTriggerTest.conf
rename to Trigger/TrigValidation/TriggerTest/share/checklogTriggerTest.conf
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index aefe8df858b8bebf7d5017226054045e3d231ef7..f2155d1a1bde7b6348713ab212c5d0a13e3aa6e2 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -1,3 +1,5 @@
+TrigSignatureMoniMT                            0    INFO The L1 seed to multi-item-seeded chain HLT_noalg_L1Standby could not be completely resolved. This is currently OK. Exception from menu access: L1Item L1_2EM13VH does not exist in the menu
+TrigSignatureMoniMT                            0    INFO The L1 seed to multi-item-seeded chain HLT_noalg_L1Calo could not be completely resolved. This is currently OK. Exception from menu access: L1Item L1_2EM13VH does not exist in the menu
 TrigSignatureMoniMT                                 INFO HLT_2e17_etcut_L12EM15VH #3136730292
 TrigSignatureMoniMT                                 INFO -- #3136730292 Events         20         20         0          0          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3136730292 Features                             0          0          0          -          -          -          
@@ -37,6 +39,9 @@ TrigSignatureMoniMT                                 INFO -- #2619091790 Features
 TrigSignatureMoniMT                                 INFO HLT_2mu15_L12MU10 #557204938
 TrigSignatureMoniMT                                 INFO -- #557204938 Events          20         20         0          0          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #557204938 Features                              0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_2mu4_L12MU4 #2999632714
+TrigSignatureMoniMT                                 INFO -- #2999632714 Events         20         20         1          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2999632714 Features                             4          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2mu4_bDimu_L12MU4 #1730084172
 TrigSignatureMoniMT                                 INFO -- #1730084172 Events         20         20         1          1          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1730084172 Features                             4          2          0          0          -          -          
@@ -328,6 +333,12 @@ TrigSignatureMoniMT                                 INFO -- #997163309 Features
 TrigSignatureMoniMT                                 INFO HLT_mu0_muoncalib_L1MU4_EMPTY #782182242
 TrigSignatureMoniMT                                 INFO -- #782182242 Events          20         20         0          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #782182242 Features                              0          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu10_L1MU10 #209090273
+TrigSignatureMoniMT                                 INFO -- #209090273 Events          20         20         1          1          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #209090273 Features                              1          1          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu10_ivarmedium_mu10_10invm70_L12MU10 #2386882549
+TrigSignatureMoniMT                                 INFO -- #2386882549 Events         20         20         0          0          0          0          0          -          0          
+TrigSignatureMoniMT                                 INFO -- #2386882549 Features                             0          0          0          0          0          -          
 TrigSignatureMoniMT                                 INFO HLT_mu10_lateMu_L1MU10 #48780310
 TrigSignatureMoniMT                                 INFO -- #48780310 Events           20         20         0          0          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #48780310 Features                               0          0          -          -          -          -          
@@ -340,24 +351,48 @@ TrigSignatureMoniMT                                 INFO -- #1171632195 Features
 TrigSignatureMoniMT                                 INFO HLT_mu14_L1MU10 #1696906927
 TrigSignatureMoniMT                                 INFO -- #1696906927 Events         20         20         1          1          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1696906927 Features                             1          1          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu20_2mu4noL1_L1MU20 #1029128679
+TrigSignatureMoniMT                                 INFO -- #1029128679 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #1029128679 Features                             1          1          0          0          0          0          
 TrigSignatureMoniMT                                 INFO HLT_mu20_ivar_L1MU6 #2083734526
 TrigSignatureMoniMT                                 INFO -- #2083734526 Events         20         20         1          1          1          -          -          -          1          
 TrigSignatureMoniMT                                 INFO -- #2083734526 Features                             1          1          1          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu22_2mu4noL1_L1MU20 #3427670100
+TrigSignatureMoniMT                                 INFO -- #3427670100 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #3427670100 Features                             1          1          0          0          0          0          
+TrigSignatureMoniMT                                 INFO HLT_mu22_mu8noL1_L1MU20 #3165652409
+TrigSignatureMoniMT                                 INFO -- #3165652409 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #3165652409 Features                             1          1          0          0          0          0          
+TrigSignatureMoniMT                                 INFO HLT_mu24_2mu4noL1_L1MU20 #3233544630
+TrigSignatureMoniMT                                 INFO -- #3233544630 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #3233544630 Features                             1          1          0          0          0          0          
 TrigSignatureMoniMT                                 INFO HLT_mu24_L1MU20 #417425162
 TrigSignatureMoniMT                                 INFO -- #417425162 Events          20         20         1          1          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #417425162 Features                              1          1          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_mu24_idperf_L1MU20 #677658909
 TrigSignatureMoniMT                                 INFO -- #677658909 Events          20         20         1          1          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #677658909 Features                              1          1          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu24_mu10noL1_L1MU20 #2563354236
+TrigSignatureMoniMT                                 INFO -- #2563354236 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #2563354236 Features                             1          1          0          0          0          0          
 TrigSignatureMoniMT                                 INFO HLT_mu26_L1MU20 #311138376
 TrigSignatureMoniMT                                 INFO -- #311138376 Events          20         20         1          1          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #311138376 Features                              1          1          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_mu26_ivarmedium_L1MU20 #3411723090
 TrigSignatureMoniMT                                 INFO -- #3411723090 Events         20         20         1          1          0          0          0          -          0          
 TrigSignatureMoniMT                                 INFO -- #3411723090 Features                             1          1          0          0          0          -          
+TrigSignatureMoniMT                                 INFO HLT_mu26_mu10noL1_L1MU20 #2318302287
+TrigSignatureMoniMT                                 INFO -- #2318302287 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #2318302287 Features                             1          1          0          0          0          0          
+TrigSignatureMoniMT                                 INFO HLT_mu26_mu8noL1_L1MU20 #2233067926
+TrigSignatureMoniMT                                 INFO -- #2233067926 Events         20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #2233067926 Features                             1          1          0          0          0          0          
 TrigSignatureMoniMT                                 INFO HLT_mu28_ivarmedium_L1MU20 #1963262787
 TrigSignatureMoniMT                                 INFO -- #1963262787 Events         20         20         1          1          0          0          0          -          0          
 TrigSignatureMoniMT                                 INFO -- #1963262787 Features                             1          1          0          0          0          -          
+TrigSignatureMoniMT                                 INFO HLT_mu28_mu8noL1_L1MU20 #86648125
+TrigSignatureMoniMT                                 INFO -- #86648125 Events           20         20         1          1          0          0          0          0          0          
+TrigSignatureMoniMT                                 INFO -- #86648125 Features                               1          1          0          0          0          0          
 TrigSignatureMoniMT                                 INFO HLT_mu35_ivarmedium_L1MU20 #597064890
 TrigSignatureMoniMT                                 INFO -- #597064890 Events          20         20         1          1          0          0          0          -          0          
 TrigSignatureMoniMT                                 INFO -- #597064890 Features                              1          1          0          0          0          -          
@@ -370,6 +405,9 @@ TrigSignatureMoniMT                                 INFO -- #827327262 Features
 TrigSignatureMoniMT                                 INFO HLT_mu60_0eta105_msonly_L1MU20 #1642591450
 TrigSignatureMoniMT                                 INFO -- #1642591450 Events         20         20         0          0          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1642591450 Features                             0          0          0          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu60_L1MU20 #2871837722
+TrigSignatureMoniMT                                 INFO -- #2871837722 Events         20         20         1          1          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2871837722 Features                             1          1          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_mu6Comb_L1MU6 #996392590
 TrigSignatureMoniMT                                 INFO -- #996392590 Events          20         20         1          1          -          -          -          -          1          
 TrigSignatureMoniMT                                 INFO -- #996392590 Features                              1          1          -          -          -          -          
@@ -394,12 +432,21 @@ TrigSignatureMoniMT                                 INFO -- #451489897 Features
 TrigSignatureMoniMT                                 INFO HLT_mu6fast_L1MU6 #3518031697
 TrigSignatureMoniMT                                 INFO -- #3518031697 Events         20         20         1          -          -          -          -          -          1          
 TrigSignatureMoniMT                                 INFO -- #3518031697 Features                             1          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_mu80_L1MU20 #387900377
+TrigSignatureMoniMT                                 INFO -- #387900377 Events          20         20         1          1          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #387900377 Features                              1          1          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_mu80_msonly_3layersEC_L1MU20 #761101109
 TrigSignatureMoniMT                                 INFO -- #761101109 Events          20         20         1          0          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #761101109 Features                              1          0          0          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_mu8_L1MU6 #1467711434
 TrigSignatureMoniMT                                 INFO -- #1467711434 Events         20         20         1          1          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1467711434 Features                             1          1          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1Calo #355689512
+TrigSignatureMoniMT                                 INFO -- #355689512 Events          20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #355689512 Features                              -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1Calo_EMPTY #3717801557
+TrigSignatureMoniMT                                 INFO -- #3717801557 Events         20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #3717801557 Features                             -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_noalg_L1EM10VH #314199913
 TrigSignatureMoniMT                                 INFO -- #314199913 Events          20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #314199913 Features                              -          -          -          -          -          -          
@@ -469,6 +516,9 @@ TrigSignatureMoniMT                                 INFO -- #914660695 Features
 TrigSignatureMoniMT                                 INFO HLT_noalg_L1RD0_FILLED #211699639
 TrigSignatureMoniMT                                 INFO -- #211699639 Events          20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #211699639 Features                              -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_L1Standby #420861540
+TrigSignatureMoniMT                                 INFO -- #420861540 Events          20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #420861540 Features                              -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_noalg_L1TAU12 #4248050338
 TrigSignatureMoniMT                                 INFO -- #4248050338 Events         20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #4248050338 Features                             -          -          -          -          -          -          
@@ -526,6 +576,9 @@ TrigSignatureMoniMT                                 INFO -- #3765216228 Features
 TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE80 #2742079961
 TrigSignatureMoniMT                                 INFO -- #2742079961 Events         20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #2742079961 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_bkg_L1Bkg #2032528907
+TrigSignatureMoniMT                                 INFO -- #2032528907 Events         20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #2032528907 Features                             -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1EM3_EMPTY #2458124284
 TrigSignatureMoniMT                                 INFO -- #2458124284 Events         20         20         -          -          -          -          -          -          15         
 TrigSignatureMoniMT                                 INFO -- #2458124284 Features                             -          -          -          -          -          -          
@@ -562,6 +615,9 @@ TrigSignatureMoniMT                                 INFO -- #1198298874 Features
 TrigSignatureMoniMT                                 INFO HLT_noalg_idmon_L1RD0_UNPAIRED_ISO #2536676873
 TrigSignatureMoniMT                                 INFO -- #2536676873 Events         20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #2536676873 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_l1calo_L1J400 #1694511185
+TrigSignatureMoniMT                                 INFO -- #1694511185 Events         20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #1694511185 Features                             -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_noalg_mb_L1RD2_EMPTY #3788962163
 TrigSignatureMoniMT                                 INFO -- #3788962163 Events         20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #3788962163 Features                             -          -          -          -          -          -          
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py
index 0b927d288a02ce1cb6e624e945f85671457be6eb..4d36210cf52b17683ab12dc6f359d8cd2a2f4b19 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger AthenaMT test running new-style job options
 # art-type: build
@@ -6,7 +7,7 @@
 # Skipping art-output which has no effect for build tests.
 # If you create a grid version, check art-output in existing grid tests.
 
-from TrigValTools.TrigValSteering import Test, Step, ExecStep #, CheckSteps
+from TrigValTools.TrigValSteering import Test, Step, ExecStep, CheckSteps
 
 # Copy the job options to the working directory
 copy_jo = ExecStep.ExecStep('CopyJO')
@@ -39,7 +40,9 @@ test.art_type = 'build'
 #test.exec_steps = [copy_jo, pickle, run_athena]
 #test.check_steps = CheckSteps.default_check_steps(test)
 test.exec_steps = [copy_jo, pickle]
-test.check_steps = [] 
+check_log = CheckSteps.CheckLogStep('CheckLog')
+check_log.log_file = pickle.get_log_file_name()
+test.check_steps = [check_log]
 
 # Change RegTest pattern
 #regtest = test.get_step('RegTest')
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py
index 33cd7d2f28369fbfb0290ef5da77251a4841f4f9..d4ecb7b42384c59e3dbcc61cb81041fc1552cb29 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the Cosmic_run3_v1 menu on physics_Main stream from a cosmic run
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py
index 0722a3d5e3b9a76a336c1bd2ffd99cd2c9e477b8..a2dc68ddfabeb604c07ced2ed7cf1a3f3d630f20 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the Cosmic_run3_v1 menu on physics_Main stream from a cosmic run
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_MT_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_MT_build.py
index 7aaeba65e3b4b9d852656b9edb14c8928ba48803..ca120bbcdcce0f50ee4a3af92e834e5471eb4831 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_MT_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_MT_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
index 294ddd653436181de53b553d95a3cca80e18d3ea..04ba3739ca88c8bd104be6a124134530eda0dca6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_emptyMenu_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_emptyMenu_build.py
index 6615674ef96580bba7a484061c097906797f28f5..23b89521676dddb85f8bb7d037497311000bc3ce 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_emptyMenu_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_emptyMenu_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test without any HLT chains
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py
index 67ddf05b75de8c17952b189d210f4583998dd2aa..4db9cb3fe555233819f39a4ef4a2260187a8cda7 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_reverseViews_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_reverseViews_build.py
index 107fea469e8f6b189de45c63abff0f895b3ddc36..5742c5c1662849d3ec7c3bf5a0ae02a1b3c43cfd 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_reverseViews_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_reverseViews_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Test with reversed order of views to check their independence
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bjet_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bjet_build.py
index 345f6483cb3304191b99c3d878902096ee5cd5ea..6e4de93aa195a95bf0abc76f486d058adc84ba09 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bjet_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bjet_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-jet slice in Dev_pp_run3_v1 menu, data input
 # art-type: build
@@ -11,7 +12,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
 ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
-ex.input = 'data'
+ex.input = 'data_Main'
 ex.max_events = 500
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bphysics_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bphysics_build.py
index bdec531622905123f4d95ab33a3fa3252a2805f1..fb7a226be31f53146872bfe14e20b62196fd09d2 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bphysics_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_bphysics_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-physics slice in Dev_pp_run3_v1 menu (data input)
 # art-type: build
@@ -11,11 +12,11 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
 ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
-ex.input = 'data'
-ex.max_events = 500
+ex.input = 'data_Main'
+ex.max_events = 1000
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
-ex.args = '-c "setMenu=\'LS2_v1\';doEmptyMenu=True;doBphysicsSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"'
+ex.args = '-c "setMenu=\'LS2_v1\';doEmptyMenu=True;doBphysicsSlice=True;forceEnableAllChains=True;doWriteBS=False;doWriteRDOTrigger=True;"'
 
 test = Test.Test()
 test.art_type = 'build'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_egamma_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_egamma_build.py
index e8e023dd237b25e14e2e5a805023c1bf5ddf2a20..80895d00b2e521fb3ab85e745b8390fb16c4e14c 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_egamma_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_egamma_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the egamma slice in Dev_pp_run3_v1 menu, data input
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_jet_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_jet_build.py
index 7147773b19ba6cda44668b87e7ed57bc0069bc4e..3b71e790574abda314e9a5cb5511eb7338e47ed3 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_jet_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_jet_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the jet slice in Dev_pp_run3_v1 menu, data input
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_met_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_met_build.py
index b7c22402aab3e947b3705c57abed54f83fc59b0d..7f30c9970cd72489742ea55c2b86e1ac414a91f5 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_met_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_met_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the MET slice in Dev_pp_run3_v1 menu, data input
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_muon_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_muon_build.py
index 297e391b43ec80ed3055b228c9100328ee443f8f..923e2f4eed51209073497d56c88b90397d8e2fce 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_muon_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_muon_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the muon slice in Dev_pp_run3_v1 menu, data input
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_tau_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_tau_build.py
index aa96db56ab5ba9319e1ec883c4eee5c693734754..b256e2aa2bd9fa86c0d7dc410851698a449d76c4 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_tau_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_slice_tau_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the tau slice in Dev_pp_run3_v1 menu, data input
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py
index c121c72fa44ed768d9b28bc1da68ca47d887e170..c300374251cea421e7a3f662efda4ec1dbd9af45 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->BS athena test of the Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py
index a680494e22dc66d6dab5ac3beebb82ab379e6a02..9ab96a83a24d9ed416ff804b55b3de779832f5fb 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->BS athena test of the Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_build.py
index 4e6af7145922cee37439f159c8b45c80e96173b0..b75978ececb7e669be1ed6e0e587710116576f22 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the MC_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_grid.py
index d0966c5dacf0fee02708a605d0f0fa30f94408a5..38848c12a6a8dbd431edf7ab882b8dc6beb4ca24 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1MC_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger BS->RDO_TRIG athena test of the MC_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_build.py
index 49a68912b96c07c056aa00ae56fadadba6748c9d..aaacfd118017d95672b8e3aaaef891cad70506b7 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on data with v7 primaries menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_grid.py
index 018769d95c5b447763cbba4388a7f0251c970b33..769b57c5fdf3938b1d36b3d090e9c86463c2f154 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v7Primaries_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on data with v7 primaries menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_build.py
index cf69dce44b749a1b221fc019230e870b1cec056d..153b62c5ea692c1ff00c2e16f7ceb7686b38b375 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with MC_HI_v4 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_grid.py
index 03753b3ce789f0c7fd2e621f8fbc177d91c0a9a5..d0fa95b998df8d113ffd0d998a4d6ebae9244ae7 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4MC_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with MC_HI_v4 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_build.py
index aa88b2d26b2c1c81e4504c8d51ddfd1978675eca..82d433952bbece7791875debbf421a77c1721bed 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with Physics_HI_v4 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_grid.py
index 1dc33451874cee7a9a1b05d399879d300cfdc29a..9713e31b029767034a231335b4da68f3d7151c50 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_hi_v4Phys_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with Physics_HI_v4 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py
index 1559309e94b36ba385a81e433821b63c289260eb..c399233717038374a579a1f7b884ebe39af57048 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Cosmic_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py
index 21bc55c94bdb91567c75f066874eb54159716244..5a6e11c536107e829831c041544962dfda823498 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Cosmic_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_build.py
index d83dfb3691d50e6c6af7ffc06cea274591181adf..9c2ab05e84710cea23bfe5dfa58435963d2169a5 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test with L1 simulation but without any HLT chains
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_phase1_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_phase1_build.py
index 5a54df9da1dd239b38052053495ad799d4bee595..6acd4e74a860c6ad85027efe9afff8750660b57d 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_phase1_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_L1SimOnly_phase1_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test with L1 simulation with Phase-I path enabled but without any HLT chains
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_MT_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_MT_build.py
index a9c95bb8d9cf5285edd00ccd7b8b7c2889bd1229..4ba4e1c25419b62a99e66e2f259f4b155b5a36c6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_MT_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_MT_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with 2 slots and 2 threads
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py
index 92d4f2b0bec1f18b53240c033f24a9066194d249..0f15010d82564259e4d4ce6f9e831d2a4c400a86 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_deps_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_deps_build.py
index 2075544fbae5e465f6dd3560f9b9341d10224916..7e12a14d96b5c204bfbe34bf7d78cdb9645ff7f9 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_deps_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_deps_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Test with SGInputLoader.FailIfNoProxy=True to check for unmet data dependencies
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py
index 75b567c2cf6524a9041de9ab322d28e10dcce23d..09ef8b0814b55ab9f882eae755b31d8efce79b64 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py
index a37a863fde448db3e9cfa82c70313879f49105ce..e13bc174a6d6b8cc8ce01f03a53a12a255fb25e2 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with pileup80 ttbar sample
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py
index d303cf558c6b7c25fe5fefe4eb4a99f9cefee60a..5c23d0b3f2584b26e97cfe8c6686ea798c8ff167 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with pileup80 ttbar sample
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py
index d6fca0ae3d6b753707e98e6068e809b2740700d5..92c6ac2d7657b6a0f41f56f74e88f8a90c51d420 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-jet slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py
index 0001a04c178f2bb20e6bb38d22f10881fef3050a..763b49ffd07697e29a960af50131977dcd3e97c5 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-jet slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py
index 93c54b07d4cd3853a80ae56d8860d63b3fbd16a6..53608efaad3497d1e05c489760656066430f8ceb 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-physics slice in Dev_pp_run3_v1 menu (Jpsimu6mu6 input)
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py
index 582191dfe897be4803492ffeb582058f5317503b..19500b94eb819e16e3d0ff0802a03a9d2050aa86 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-physics slice in Dev_pp_run3_v1 menu (Jpsimu6mu6 input)
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py
index 7773d8ae810253b6054af2bc2ffe6ecb6fc5a732..2046b7f6156646d02725e468ae6a6b972e76052f 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-physics slice in Dev_pp_run3_v1 menu (Wtaunu_3mu input)
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py
index 53b504576d24f933267d2cd2059aa12bc4e94741..7c54eed39c3dd46c63641cc65761056807295bda 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-physics slice in Dev_pp_run3_v1 menu (Wtaunu_3mu input)
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py
index 2e3e91888e5cd59fae3788eb86ae2d4970563657..4378d00c93c78e9e1e5eb86137d32e897ba05084 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the egamma slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py
index 8bc82cd63d888e68b12bc769ed532fd6038890cf..1731aef42d2307db11045bdfa1a8bfbc51600e0a 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the egamma slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py
index a55912a125ccf7e48295ddb9baf7ee55f37244e8..e93cf030840be350199378fa7b81c8db462442d1 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the jet slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py
index ee300d17b55d898da6e97fa9772aba570f41388b..0e9ca17a8bc04311dd03a94e927caf547eec38f6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the jet slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py
index ce79b125d92eebdf73ed6fb9226c2e4d5eb2a9e1..81b7626e7eeb7b8fd9dd1ef018fceb7950d9095d 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the MET slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py
index 0efaa639aa63b256ec8a51243dd998ce5d09c35f..b43b20cfc03dce334b353a6ac90dd4a2078f562b 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the MET slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_build.py
index 44926072ee5f5959cbed60d9e9b985f9c3a5f014..5c107f173f51dcff96ec72e7caa2857900699e64 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the minbias slice in Dev_pp_run3_v1 menu (minbias input)
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_grid.py
index 2f888dcfb97a7916486994e0089ddd29bb56ed49..0338530846dc0c9a771c6408d684657dec922006 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_minbias_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the b-physics slice in Dev_pp_run3_v1 menu (Jpsimu6mu6 input)
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_build.py
index 08a9b826af05951ec293b76511e94ed883398e22..75208ad4195538bfe93ef93871dcc6cacaf92577 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the muon slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_grid.py
index 8a323d77cd440e3629b6d9db5946a9af57d45cf4..3427e2366d628c8c1943f5685ed6bdc14b1c36bc 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muonNSW_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the muon slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py
index 7579bdf128673182082988030aa9b71fcc79b97f..6856903ba54eae06c9df6e05ad21fdff34f6989d 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the muon slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py
index f6fbd04348cfdafee6bcf77f926349e24c368697..2756dc38efbf5abd63a1698b380197c4d71eee89 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the muon slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py
index bb591f83fd224095d610048a84f113b9cfe17436..9c71a5e7bec1c353e7e7ecd8e31e1de1dd274c09 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Compares results of a slice chains when running in full menu and when running alone
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py
index 6903a4818a012a1ec2150e6bd6b5795936eb7105..58e91c287d6c703c5db46c29094e1819c76e89e0 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the tau slice in Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py
index 55e2533abd0b7ba330891a63b8e68f7049cc9c63..f87107fb8390f54011f1ba9d872389a4e7dd2b4b 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the tau slice in Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py
index ddadc08033a13bcf0e4d550fbd14f38a91e6be86..43207e7b4cc1765895e5335a044b756d19081318 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->BS athena test of the Dev_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py
index a80afdf45ecb7ec569bea8f4e1ffb065f12c3952..c8b478b740bd15390523121b547ae1d36b151ef9 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->BS athena test of the Dev_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py
index 5f49e42321cbf1f6b2786d9a7997911d1becd5bb..8507a24f53f17a91eedc25d562940188dc11e963 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the MC_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py
index a90597ef126b34f61a1365619c326e953870e1d9..07af8bc468f483cee70105a1f33553f41be3ae03 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the MC_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py
index fa358776cca395fa960a718c3ae3bbcf8965723b..8d2841e78f6e25e551eba3f3de3017c274539e31 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the PhysicsP1_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py
index 22214f3facf10baa6e8e8e9df6d78b3e739d480b..a950aa8984a180b93a700136d08bd3333f8db3e1 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the PhysicsP1_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py
index 0ab72dab23925a3aa827e7a4f07bafc67319b9e0..f5b081e4f82bba7b5105a3c2e7610a6d771a16e6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Physics_pp_run3_v1 menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py
index dae59693a6628b46d6031265f69a3adeb5d22d5b..732a19a4b137723cf5aad1ba54f0dc3e950a34b2 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Trigger RDO->RDO_TRIG athena test of the Physics_pp_run3_v1 menu
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_aod_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_aod_grid.py
index 8375b464b8394345873596e132372a2610951810..68b67f182368f1997f1aa1896ea0f1024caac966 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_aod_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_aod_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with v7 primaries menu producing AOD
 # art-type: grid
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_build.py
index 62525e427685387e1270be69f64d0cccba3599f0..4a9469b8ec0688edf27c5444fd2fe639274663be 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_build.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with v7 primaries menu
 # art-type: build
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_grid.py
index 5e7bcff73833241263da16837582a58c23bbc872..673bff72c043b5d5115ef1d49a824787abc1693a 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v7Primaries_grid.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # art-description: Legacy trigger test on MC with v7 primaries menu
 # art-type: grid
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index 7f82370ada6039395891664540b406cd83cc9777..45852ae263f8c3bf8a7672904c74d9eee4ef9ff4 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -109,15 +109,15 @@ TriggerHLTListRun3 = [
 
 
     # Egamma
-    ('xAOD::TrigEMClusterContainer#HLT_L2CaloEMClusters',           'BS ESD AODFULL', 'Egamma', 'inViews:EMCaloViews'), # last arg specifies in which view container the fragments are, look into the proprty of View maker alg for it
-    ('xAOD::TrigEMClusterAuxContainer#HLT_L2CaloEMClustersAux.',    'BS ESD AODFULL', 'Egamma'),
+    ('xAOD::TrigEMClusterContainer#HLT_FastCaloEMClusters',           'BS ESD AODFULL', 'Egamma', 'inViews:EMCaloViews'), # last arg specifies in which view container the fragments are, look into the proprty of View maker alg for it
+    ('xAOD::TrigEMClusterAuxContainer#HLT_FastCaloEMClustersAux.',    'BS ESD AODFULL', 'Egamma'),
     ('xAOD::TrigRingerRingsContainer#HLT_FastCaloRinger',             'BS ESD AODFULL', 'Egamma', 'inViews:EMCaloViews'), #Ringer
     ('xAOD::TrigRingerRingsAuxContainer#HLT_FastCaloRingerAux.',      'BS ESD AODFULL', 'Egamma'), #Ringer
 
-    ('xAOD::TrigPhotonContainer#HLT_L2Photons',                     'BS ESD AODFULL', 'Egamma', 'inViews:EMPhotonViews'),
-    ('xAOD::TrigPhotonAuxContainer#HLT_L2PhotonsAux.',              'BS ESD AODFULL', 'Egamma'),
-    ('xAOD::TrigElectronContainer#HLT_L2Electrons',                 'BS ESD AODFULL', 'Egamma', 'inViews:EMElectronViews'),
-    ('xAOD::TrigElectronAuxContainer#HLT_L2ElectronsAux.',          'BS ESD AODFULL', 'Egamma'),
+    ('xAOD::TrigPhotonContainer#HLT_FastPhotons',                     'BS ESD AODFULL', 'Egamma', 'inViews:EMPhotonViews'),
+    ('xAOD::TrigPhotonAuxContainer#HLT_FastPhotonsAux.',              'BS ESD AODFULL', 'Egamma'),
+    ('xAOD::TrigElectronContainer#HLT_FastElectrons',                 'BS ESD AODFULL', 'Egamma', 'inViews:EMElectronViews'),
+    ('xAOD::TrigElectronAuxContainer#HLT_FastElectronsAux.',          'BS ESD AODFULL', 'Egamma'),
 
     ('xAOD::TrackParticleContainer#HLT_IDTrack_Electron_FTF',        'BS ESD AODFULL', 'Egamma', 'inViews:EMElectronViews'),
     ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Electron_FTFAux.', 'BS ESD AODFULL', 'Egamma'),
@@ -130,9 +130,12 @@ TriggerHLTListRun3 = [
     ('xAOD::CaloClusterContainer#HLT_CaloEMClusters',               'BS ESD AODFULL', 'Egamma', 'inViews:precisionCaloViews'),
     ('xAOD::CaloClusterTrigAuxContainer#HLT_CaloEMClustersAux.',    'BS ESD AODFULL', 'Egamma'),
 
-    # This varient needed by TrigUpgradeTest/egammaRinger.py
+    # This variant needed by TrigUpgradeTest/egammaRinger.py
     ('xAOD::CaloClusterContainer#HLT_TopoCaloClusters',             'BS ESD AODFULL', 'Egamma'),
     ('xAOD::CaloClusterTrigAuxContainer#HLT_TopoCaloClustersAux.',  'BS ESD AODFULL', 'Egamma'),
+    #
+    ('xAOD::CaloClusterContainer#HLT_TopoCaloClustersLCFS',                               'BS ESD AODFULL', 'Jet', 'alias:CaloClusterContainerShallowCopy'), # special argument indicating that this collection has a different Aux
+    ('xAOD::ShallowAuxContainer#HLT_TopoCaloClustersLCFSAux.calE.calEta.calPhi',         'BS ESD AODFULL', 'Jet'),
 
     # Not sure we need these two...
     ('xAOD::CaloClusterContainer#HLT_TopoCaloClustersRoI',          'BS ESD AODFULL', 'Egamma', 'inViews:precisionCaloViews'),
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py
index 6794393247cb09762dded97b37abc6c358f9cb6f..d8193e398fed470a9c34a618eb849d6f9afc3164 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py
@@ -27,7 +27,7 @@ def Lvl1SimulationSequence( flags = None ):
     TriggerFlags.outputLVL1configFile = None
     log.info("setting up LVL1ConfigSvc, including the menu generation")
     from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc
-    svcMgr += conf2toConfigurable(getL1ConfigSvc())
+    svcMgr += conf2toConfigurable(getL1ConfigSvc(flags))
 
     ##################################################
     # Calo
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
index d42131d6d2e45f91a8be712418b90d88edd9b893..1386aed88deaf5b9dbe741cc7c54db16d00dc8cb 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
@@ -383,7 +383,7 @@ def triggerBSOutputCfg(flags, decObj, decObjHypoOut, summaryAlg, offline=False):
 
 
 def triggerPOOLOutputCfg(flags, decObj, decObjHypoOut, edmSet):
-    # Get the list from TriggerEDM
+    # Get the list of output collections from TriggerEDM
     from TrigEDMConfig.TriggerEDM import getTriggerEDMList
     edmList = getTriggerEDMList(edmSet, flags.Trigger.EDMDecodingVersion)
 
@@ -400,6 +400,10 @@ def triggerPOOLOutputCfg(flags, decObj, decObjHypoOut, edmSet):
         itemsToRecord.append('xAOD::TrigCompositeContainer#{:s}'.format(item))
         itemsToRecord.append('xAOD::TrigCompositeAuxContainer#{:s}Aux{:s}'.format(item, dynamic))
 
+    # Add EventInfo
+    itemsToRecord.append('xAOD::EventInfo#EventInfo')
+    itemsToRecord.append('xAOD::EventAuxInfo#EventInfoAux.')
+
     # Create OutputStream
     outputType = ''
     if flags.Output.doWriteRDO:
@@ -410,19 +414,15 @@ def triggerPOOLOutputCfg(flags, decObj, decObjHypoOut, edmSet):
         outputType = 'AOD'
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
     acc = OutputStreamCfg(flags, outputType, ItemList=itemsToRecord, disableEventTag=True)
-
-    # OutputStream has a data dependency on xTrigDecision
     streamAlg = acc.getEventAlgo("OutputStream"+outputType)
-    streamAlg.ExtraInputs = [
-      ("xAOD::TrigDecision", "xTrigDecision"),
-      ("xAOD::TrigConfKeys", "TrigConfKeys")]
 
-    # Produce the trigger bits
-    #from TrigOutputHandling.TrigOutputHandlingConfig import TriggerBitsMakerToolCfg
-    #from TrigDecisionMaker.TrigDecisionMakerConfig import TrigDecisionMakerMT
+    # Keep input RDO objects in the output RDO_TRIG file
+    if flags.Output.doWriteRDO:
+        streamAlg.TakeItemsFromInput = True
+
+    # Produce trigger bits
     bitsmaker = CompFactory.TriggerBitsMakerTool()
     decmaker = CompFactory.getComp("TrigDec::TrigDecisionMakerMT")("TrigDecMakerMT", BitsMakerTool = bitsmaker)
-
     acc.addEventAlgo( decmaker )
 
     # Produce trigger metadata
@@ -431,6 +431,21 @@ def triggerPOOLOutputCfg(flags, decObj, decObjHypoOut, edmSet):
     menuwriter.IsL1JSONConfig = True
     acc.addEventAlgo( menuwriter )
 
+    # Add metadata to the output stream
+    streamAlg.MetadataItemList += [ "xAOD::TriggerMenuContainer#*", "xAOD::TriggerMenuAuxContainer#*" ]
+
+    # Ensure OutputStream runs after TrigDecisionMakerMT and xAODMenuWriterMT
+    streamAlg.ExtraInputs += [
+        ("xAOD::TrigDecision", decmaker.TrigDecisionKey),
+        ("xAOD::TrigConfKeys", menuwriter.EventObjectName)]
+
+    # Produce xAOD L1 RoIs from RoIBResult
+    from AnalysisTriggerAlgs.AnalysisTriggerAlgsCAConfig import RoIBResultToxAODCfg
+    xRoIBResultAcc, xRoIBResultOutputs = RoIBResultToxAODCfg(flags, acc.getSequence().name)
+    acc.merge(xRoIBResultAcc)
+    # Ensure outputs are produced before streamAlg runs
+    streamAlg.ExtraInputs += xRoIBResultOutputs
+
     return acc
 
 
@@ -458,6 +473,7 @@ def triggerMergeViewsAndAddMissingEDMCfg( edmSet, hypos, viewMakers, decObj, dec
             attrInView.append( collName )
             attrName.append( collName )
             #
+
             setattr(mergingTool, collType+"Views", attrView )
             setattr(mergingTool, collType+"InViews", attrInView )
             setattr(mergingTool, collType, attrName )
@@ -484,6 +500,15 @@ def triggerMergeViewsAndAddMissingEDMCfg( edmSet, hypos, viewMakers, decObj, dec
             collType, collName = el[0].split("#")
             if "Aux" in collType: # the GapFiller crates appropriate Aux obejcts
                 continue
+            if len(el) >= 4: # see if there is an alias
+                aliases = [ x for x in el[3:]  if "alias:" in x ] # assume that the description can be: (.... , [alias:Blah | inViews:XYZ | inViews:XYZ, alias:Blah])
+                if len(aliases) == 1:
+                    alias = aliases[0].split(":")[1]
+                    __log.info("GapFiller configuration found an aliased type '{}' for '{}'".format( alias, collType))
+                    collType = alias
+                elif len(aliases) > 1:
+                    __log.error("GapFiller configuration found inconsistent '{}' (to many aliases?)".format(el[3:]))
+
             groupedByType[collType].append( collName )
 
         for collType, collNameList in six.iteritems (groupedByType):
@@ -526,11 +551,9 @@ def triggerRunCfg( flags, seqName = None, menu=None ):
     acc.merge( triggerIDCCacheCreatorsCfg( flags, seqName="AthAlgSeq" ), sequenceName="HLTBeginSeq" )
 
     from L1Decoder.L1DecoderConfig import L1DecoderCfg
-    l1DecoderAcc, l1DecoderAlg = L1DecoderCfg( flags )
+    l1DecoderAcc = L1DecoderCfg( flags, seqName =  "HLTBeginSeq")
     # TODO, once moved to newJO the algorithm can be added to l1DecoderAcc and merging will be sufficient here
-    acc.merge( l1DecoderAcc, sequenceName="HLTBeginSeq" )
-    acc.addEventAlgo( l1DecoderAlg, sequenceName="HLTBeginSeq")
-
+    acc.merge( l1DecoderAcc )
 
     # detour to the menu here, (missing now, instead a temporary hack)
     if menu:
@@ -550,6 +573,7 @@ def triggerRunCfg( flags, seqName = None, menu=None ):
     acc.addEventAlgo( summaryAlg, sequenceName="HLTFinalizeSeq" )
 
     #once menu is included we should configure monitoring here as below
+    l1DecoderAlg = l1DecoderAcc.getEventAlgo("L1Decoder")
 
     monitoringAcc, monitoringAlg = triggerMonitoringCfg( flags, hypos, filters, l1DecoderAlg )
     acc.merge( monitoringAcc, sequenceName="HLTEndSeq" )
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
index 46cfe3dd8f634e2866a827f4e4fb2a8ef2e3b988..7b4f3765a754a53b6bfbc32260c439155d30729b 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
@@ -92,7 +92,7 @@ def createTriggerFlags():
                 version = 2
             elif "HLTNav_Summary" in flags.Input.Collections:
                 version = 3
-            elif flags.Input.Format == "RDO":
+            elif flags.Input.Format == "POOL":
                 # If running Trigger on RDO input (without previous trigger result), choose Run-3
                 version = 3
         log.info("Determined EDMDecodingVersion to be {}.".format({1:"Run 1", 2:"Run 2", 3:"AthenaMT"}[version]))
@@ -249,7 +249,7 @@ def createTriggerFlags():
     def __muon():
         from MuonConfig.MuonConfigFlags import createMuonConfigFlags
         return createMuonConfigFlags()
-    flags.addFlagsCategory('Trigger.Offline', __muon)
+    flags.addFlagsCategory('Trigger.Offline', __muon, prefix=True)
 
 
     from TriggerJobOpts.MenuConfigFlags import createMenuFlags
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
index f84b0849ca2c494c704a16e92513778109c1dffd..08064a737568a4eafd3eea7091fdb2566ad4ec5f 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
@@ -45,6 +45,7 @@ default_true_flags = [
 ]
 
 default_false_flags = [
+    "readLVL1FromJSON", # the authoritative L1 menu (xml or json) - this flag will be removed after the transition to json has been completed
     "readLVL1Calo", # read LVL1 Calo info from pool or BS """
     "readLVL1Muon", # read LVL1 Muon in from Pool or BS """
     "fakeLVL1", # create fake RoI from KINE info  """
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/decodeBS.py b/Trigger/TriggerCommon/TriggerJobOpts/share/decodeBS.py
index dbcd0275982f8d342a28660db28c63eec7533398..1478eb45848f6df0ba64b2fb74c0582fab9bb515 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/decodeBS.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/decodeBS.py
@@ -76,15 +76,3 @@ if len(ItemList) == 0:
     ItemList += [ 'xAOD::TrigCompositeAuxContainer#*' ]
 StreamESD.ItemList = list(set(ItemList))
 outSequence += StreamESD
-
-# Set up a temporary workaround for ROOT-10940 / ATR-21753.
-from AthenaCommon.AppMgr import theApp, ServiceMgr as svcMgr
-from xAODCoreCnv.xAODCoreCnvConf import xAODMaker__ROOTHeaderLoaderSvc
-svcMgr += xAODMaker__ROOTHeaderLoaderSvc( 'ROOTHeaderLoaderSvc',
-            HeaderNames = [ 'xAODEgamma/PhotonContainer.h',
-                            'xAODTrigEgamma/TrigPhotonContainer.h',
-                            'xAODMuon/MuonContainer.h',
-                            'xAODTrigMuon/L2StandAloneMuonContainer.h',
-                            'xAODJet/JetContainer.h',
-                            'xAODTau/TauJetContainer.h' ] )
-theApp.CreateSvc += [ 'xAODMaker::ROOTHeaderLoaderSvc/ROOTHeaderLoaderSvc' ]
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
index 90c6ec6935797664d56cb5a1d7a0d865d07255f7..3af59c670234c906b2404e5b9e724611c0783260 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
@@ -160,6 +160,8 @@ else:   # athenaHLT
     rec.RunNumber =_run_number
     del _run_number
 
+ConfigFlags.Input.Format = 'BS' if globalflags.InputFormat=='bytestream' else 'POOL'
+
 
 # Set final Cond/Geo tag based on input file, command line or default
 globalflags.DetDescrVersion = opt.setDetDescr or TriggerFlags.OnlineGeoTag()
@@ -425,17 +427,6 @@ elif globalflags.InputFormat.is_bytestream() and not ConfigFlags.Trigger.Online.
     from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
     CAtoGlobalWrapper(ByteStreamReadCfg, ConfigFlags)
 
-# Set up a temporary workaround for ROOT-10940 / ATR-21753.
-from xAODCoreCnv.xAODCoreCnvConf import xAODMaker__ROOTHeaderLoaderSvc
-svcMgr += xAODMaker__ROOTHeaderLoaderSvc( 'ROOTHeaderLoaderSvc',
-            HeaderNames = [ 'xAODEgamma/PhotonContainer.h',
-                            'xAODTrigEgamma/TrigPhotonContainer.h',
-                            'xAODMuon/MuonContainer.h',
-                            'xAODTrigMuon/L2StandAloneMuonContainer.h',
-                            'xAODJet/JetContainer.h',
-                            'xAODTau/TauJetContainer.h' ] )
-theApp.CreateSvc += [ 'xAODMaker::ROOTHeaderLoaderSvc/ROOTHeaderLoaderSvc' ]
-
 # ---------------------------------------------------------------
 # Trigger config
 # ---------------------------------------------------------------
@@ -444,11 +435,11 @@ TriggerFlags.readLVL1configFromXML = True
 TriggerFlags.outputLVL1configFile = None
 
 from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu, createL1PrescalesFileFromMenu
-generateL1Menu()
-createL1PrescalesFileFromMenu()
+generateL1Menu(ConfigFlags)
+createL1PrescalesFileFromMenu(ConfigFlags)
 
 from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
-CAtoGlobalWrapper(L1ConfigSvcCfg,None)
+CAtoGlobalWrapper(L1ConfigSvcCfg,ConfigFlags)
 
 # ---------------------------------------------------------------
 # HLT prep: RoIBResult and L1Decoder
@@ -459,34 +450,17 @@ from AthenaCommon.CFElements import seqOR,parOR
 hltTop = seqOR("HLTTop")
 hltBeginSeq = parOR("HLTBeginSeq")
 hltTop += hltBeginSeq
+topSequence += hltTop
 
-l1decoder = None
 if opt.doL1Unpacking:
-    if globalflags.InputFormat.is_bytestream():
-        # Create inputs for L1Decoder from ByteStream
-        from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
-        L1ByteStreamDecodersRecExSetup()
     if globalflags.InputFormat.is_bytestream() or opt.doL1Sim:
-        # TODO: replace with L1DecoderCfg
-        from L1Decoder.L1DecoderConfig import L1Decoder
-        l1decoder = L1Decoder("L1Decoder")
-        l1decoder.ctpUnpacker.ForceEnableAllChains = opt.forceEnableAllChains
-        l1decoder.RoIBResult = "RoIBResult" if opt.enableL1CaloLegacy or not opt.enableL1Phase1 else ""
-        l1decoder.L1TriggerResult = "L1TriggerResult" if opt.enableL1Phase1 else ""
-        if opt.enableL1Phase1:
-            from L1Decoder.L1DecoderConfig import getL1TriggerResultMaker
-            hltBeginSeq += conf2toConfigurable(getL1TriggerResultMaker())
-        if TriggerFlags.doTransientByteStream():
-            transTypeKey = ("TransientBSOutType","StoreGateSvc+TransientBSOutKey")
-            l1decoder.ExtraInputs += [transTypeKey]
-
-        hltBeginSeq += conf2toConfigurable(l1decoder)
+        ConfigFlags.Trigger.L1Decoder.forceEnableAllChains = opt.forceEnableAllChains
+        from L1Decoder.L1DecoderConfig import L1DecoderCfg
+        CAtoGlobalWrapper(L1DecoderCfg, ConfigFlags, seqName="HLTBeginSeq")
     else:
         from TrigUpgradeTest.TestUtils import L1EmulationTest
         hltBeginSeq += L1EmulationTest()
 
-topSequence += hltTop
-
 # ---------------------------------------------------------------
 # Level 1 simulation
 # ---------------------------------------------------------------
@@ -530,9 +504,8 @@ svcMgr.MessageSvc.infoLimit=10000
 
 
 
-from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc, setupHLTPrescaleCondAlg
+from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc
 svcMgr += conf2toConfigurable( getHLTConfigSvc() )
-setupHLTPrescaleCondAlg()
 
 if not opt.createHLTMenuExternally:
     # the generation of the prescale set file from the menu (with all prescales set to 1)
@@ -575,7 +548,8 @@ if opt.doWriteRDOTrigger:
         theApp.exit(1)
     rec.doWriteRDO = False  # RecExCommon flag
     ConfigFlags.Output.doWriteRDO = True  # new JO flag
-    ConfigFlags.Output.RDOFileName = 'RDO_TRIG.pool.root'  # new JO flag
+    if not ConfigFlags.Output.RDOFileName:
+        ConfigFlags.Output.RDOFileName = 'RDO_TRIG.pool.root'  # new JO flag
 if opt.doWriteBS:
     rec.doWriteBS = True  # RecExCommon flag
     TriggerFlags.writeBS = True  # RecExCommon flag
@@ -606,8 +580,7 @@ if opt.doWriteBS or opt.doWriteRDOTrigger:
     filters = collectFilters(findSubSequence(topSequence, "HLTAllSteps"))
 
     summaryMakerAlg = findAlgorithm(topSequence, "DecisionSummaryMakerAlg")
-    if not summaryMakerAlg:
-        log.warning("Failed to find DecisionSummaryMakerAlg")
+    l1decoder = findAlgorithm(topSequence, "L1Decoder")
 
     if l1decoder and summaryMakerAlg:
         decObj = collectDecisionObjects( hypos, filters, l1decoder, summaryMakerAlg )
@@ -615,7 +588,7 @@ if opt.doWriteBS or opt.doWriteRDOTrigger:
         log.debug("Decision Objects to write to output [hack method - should be replaced with triggerRunCfg()]")
         log.debug(decObj)
     else:
-        log.warning("Failed to find L1Decoder or DecisionSummaryMakerAlg, cannot determine Decision names for output configuration")
+        log.error("Failed to find L1Decoder or DecisionSummaryMakerAlg, cannot determine Decision names for output configuration")
         decObj = []
         decObjHypoOut = []
     CAtoGlobalWrapper( triggerOutputCfg, ConfigFlags, decObj=decObj, decObjHypoOut=decObjHypoOut, summaryAlg=summaryMakerAlg)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/SequenceTree.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/SequenceTree.py
index 7b7c21a11d68ccdbc5feed47cbc06bb58739b16c..4d9f98a4bfa8358f05d873f179968ce7cfe8388d 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/SequenceTree.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/SequenceTree.py
@@ -1,7 +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
 
 from collections import defaultdict
 from .Sequence import Sequence
+import binascii
 
 # def _update_if_diagnostic_sequence(sequence):
 #     # diagnostic sequences monitor sequences. Ensure diagnostic
@@ -94,13 +95,18 @@ class SequenceTree(object):
             # sequence. Keep this for human readers
             toks = alias.split('_')
             # hash the rest to get a shorter name
-            ah = hash(alias)
+            # Don't use the builtin hash().  With py3, that changes run-to-run,
+            # which ultimately implies that the HLTResult objects
+            # we write will also vary from run to run.
+            ah = binascii.crc32 (alias.encode())
             alias = '%s_%d' % (toks[0], ah)
             
             
         if te_in:
             # te_out = te_in + '__' + alglist.alias
-            hash_in = ('%s' % hash(te_in)).replace('-', '_')
+            # Similarly, don't use builtin hash() here.
+            h = binascii.crc32 (te_in.encode())
+            hash_in = ('%s' % h).replace('-', '_')
             te_out = '%s_%s' % (hash_in, alias)
         else:
             te_out = alias
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt
index 1772c38bdca29466955d561a8f4ac9a1e49e5d4b..37fe3d314a380332fc038fc87b41c3739345aef5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt
+++ b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt
@@ -117,6 +117,7 @@ atlas_install_scripts( scripts/generateLVL1MenuMT.py )
 atlas_install_scripts( scripts/generateL1TopoMenuMT.py )
 atlas_install_scripts( scripts/test_HLTmenu.sh )
 atlas_install_scripts( scripts/generateL1MenuRun3.py )
+atlas_install_scripts( scripts/trigCompareOldandNewL1Menus.py )
 atlas_install_scripts( scripts/verify_menu_config.py )
 
 atlas_install_xmls( data/*.dtd data/*.xml )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateBeamspotChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateBeamspotChainDefs.py
index 78d8905d443885f16f521050ad04a563bc417573..72234e1d743a84dab6308dfefa8aff87d33009b1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateBeamspotChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateBeamspotChainDefs.py
@@ -17,7 +17,7 @@ def generateChainConfigs( chainDict ):
     log.debug('dictionary is: %s\n', pprint.pformat(chainDict))
 
     listOfChainDicts = splitChainDict(chainDict)
-    log.debug("Will generate Config for streamer: ",chainDict['chainName'])
+    log.debug("Will generate Config for streamer: %s", chainDict['chainName'])
 
     listOfChainDefs = []
         
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py
index bc324550b3253a8dc9dda96df5d230df60cfc6c5..42067d9f2ed237eb67b3774c392401e646b5a885 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py
@@ -14,7 +14,7 @@ log.info("Importing %s",__name__)
 def generateChainConfigs( chainDict ):
 
     listOfChainDicts = splitChainDict(chainDict)
-    log.debug("Will generate Config for streamer: ",chainDict['chainName'])
+    log.debug("Will generate Config for streamer: %s", chainDict['chainName'])
 
     listOfChainDefs = []
         
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateStreamingChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateStreamingChainDefs.py
index 547a8f43e4a8ca106b2579606db1b8531c401973..e4121d18631bfe0d21a725fad763c70d19592396 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateStreamingChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateStreamingChainDefs.py
@@ -14,7 +14,7 @@ log.info("Importing %s",__name__)
 def generateChainConfigs( chainDict ):
 
     listOfChainDicts = splitChainDict(chainDict)
-    log.debug("Will generate Config for streamer: ",chainDict['chainName'])
+    log.debug("Will generate Config for streamer: %s", chainDict['chainName'])
 
     listOfChainDefs = []
         
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py
index 3a99da4be12d9e320b668a050d0723ccc2909487..0b47542aaf456a1b0ed8f083cf4be66579afb1d2 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py
@@ -9,7 +9,7 @@ from TrigEDMConfig.TriggerEDMRun3 import recordable
 class CaloMenuDefs(object):
       """Static Class to collect all string manipulations in Calo sequences """
       from TrigEDMConfig.TriggerEDMRun3 import recordable
-      L2CaloClusters= recordable("HLT_L2CaloEMClusters")
+      L2CaloClusters= recordable("HLT_FastCaloEMClusters")
 
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index ba95dae7fbeab2cbbba94228631e3527f0451133..5c05433350f4a8a1202d877939474eb7391ccc9a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -43,7 +43,7 @@ def fastElectronSequence(ConfigFlags):
     theElectronFex= EgammaFastElectronFex_1()
     theElectronFex.TrigEMClusterName = CaloMenuDefs.L2CaloClusters
     theElectronFex.TrackParticlesName = TrackParticlesName
-    theElectronFex.ElectronsName=recordable("HLT_L2Electrons")
+    theElectronFex.ElectronsName=recordable("HLT_FastElectrons")
 
     # EVCreator:
     l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron")
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
index e6345aa497f6c0888d8a75229277a8c1a1d03eab..b26abbfc3d37ce4949721b304a3908a259a25bdb 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
@@ -24,7 +24,7 @@ def fastPhotonMenuSequence():
     from TrigEgammaHypo.TrigEgammaFastPhotonFexMTConfig import EgammaFastPhotonFex_1
     thePhotonFex= EgammaFastPhotonFex_1()
     thePhotonFex.TrigEMClusterName = CaloMenuDefs.L2CaloClusters
-    thePhotonFex.PhotonsName=recordable("HLT_L2Photons")
+    thePhotonFex.PhotonsName=recordable("HLT_FastPhotons")
     #thePhotonFex.RoIs="EMIDRoIs"
 
     l2PhotonViewsMaker = EventViewCreatorAlgorithm("IMl2Photon")
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
index d07c0346fe6b9ef843efb11b4c4443fedbb635e4..afd53e4600dd1589728efe8f0dd5eb59cc7bb179 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py
@@ -32,7 +32,7 @@ def generateChains( flags,  chainDict ):
     accCalo.merge( LumiBlockMuWriterCfg(flags) )
 
     l2CaloHypo =  l2CaloHypoCfg( flags, name = 'L2ElectronCaloHypo',
-                                 CaloClusters = recordable('HLT_L2CaloEMClusters'))
+                                 CaloClusters = recordable('HLT_FastCaloEMClusters'))
 
 
     accCalo.addEventAlgo(l2CaloHypo, sequenceName=stepView.getName())
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
index 9edd076d045650f6098e7d0b81df3700de9cb5c6..dd8227c24b0d3499db66fec55509f5eded8610ad 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
@@ -143,12 +143,23 @@ def jetRecoSequence( dummyFlags, dataSource, RoIs = 'FSJETRoI', **jetRecoDict):
             jetDef = JetRecoConfiguration.defineJets(jetRecoDict,clustersKey=clustersKey)
         useConstitMods = ["sktc","cssktc", "pf", "csskpf"]
         doConstitMods = jetRecoDict["dataType"] in useConstitMods
+
+        # chosen jet collection
+        jetsFullName = jetNamePrefix+jetDef.basename+"Jets_"+jetRecoDict["jetCalib"]
+        if jetRecoDict["trkopt"] != "notrk":
+            jetsFullName += "_{}".format(jetRecoDict["trkopt"])
+        sequenceOut = recordable(jetsFullName)
+
         if doConstitMods:
+            # Get online monitoring jet rec tool
+            from JetRecTools import OnlineMon                                                  
+            monJetRecTool = OnlineMon.getMonTool_Algorithm("HLTJets/"+jetsFullName+"/")
+
             from JetRecConfig.ConstModHelpers import getConstitModAlg
             if jetRecoDict["trkopt"] == "notrk":
-                recoSeq += getConstitModAlg(jetDef.inputdef,"HLT")
+                recoSeq += getConstitModAlg(jetDef.inputdef,suffix="HLT",tvaKey="JetTrackVtxAssoc",vtxKey="PrimaryVertices",monTool=monJetRecTool)
             else:
-                recoSeq += getConstitModAlg(jetDef.inputdef,"HLT",tvaKey=trkcolls["TVA"],vtxKey=trkcolls["Vertices"])
+                recoSeq += getConstitModAlg(jetDef.inputdef,suffix="HLT",tvaKey=trkcolls["TVA"],vtxKey=trkcolls["Vertices"],monTool=monJetRecTool)
 
         # Add the PseudoJetGetter alg to the sequence
         constitPJAlg = getConstitPJGAlg( jetDef.inputdef )
@@ -159,12 +170,6 @@ def jetRecoSequence( dummyFlags, dataSource, RoIs = 'FSJETRoI', **jetRecoDict):
         pjs = [constitPJKey]
         if trkcolls:
             pjs.append(trkcolls["GhostTracks"])
-        
-        # chosen jet collection
-        jetsFullName = jetNamePrefix+jetDef.basename+"Jets_"+jetRecoDict["jetCalib"]
-        if jetRecoDict["trkopt"] != "notrk":
-            jetsFullName += "_{}".format(jetRecoDict["trkopt"])
-        sequenceOut = recordable(jetsFullName)
 
         from JetRecConfig import JetRecConfig
         jetModList = []
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
index cf91f5c6ff61d10e44636f1a817c94cb64472ee8..5134fa01517d9646c28a1a0c5011e33784dd1b72 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
@@ -52,11 +52,10 @@ def mergeParallel(chainDefList, offset):
         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 =[]
-    log.debug("len(myOrderedSteps): %d", len(myOrderedSteps))
-    for step_index, steps in enumerate(myOrderedSteps):        
+    log.debug("len(orderedSteps): %d", len(orderedSteps))
+    for step_index, steps in enumerate(orderedSteps):
         mySteps = list(steps)
         log.debug("Merging step counter %d", step_index+1)
         combStep = makeCombinedStep(mySteps, step_index+1, chainDefList)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py
index bd60349da4cda741d750c1d0ede885a6cffd4990..ba67d57d90669fb183d037cf33d8cf3796b5266f 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py
@@ -23,6 +23,11 @@ def getOverallL1item(chainName):
     There are though more complicated names like ...._L1...._L1..._L1... in such cases the L1 seed item is the last one
     """
     assert '_L1' in chainName, 'ERROR IN CHAIN {}, missing L1 seed at the end i.e. _L1...' .format(chainName)
+
+    from TriggerMenuMT.LVL1MenuConfig.LVL1Menu.L1Seeds import getSpecificL1Seeds
+    from TrigConfIO.L1TriggerConfigAccess import L1MenuAccess
+    from TrigConfigSvc.TrigConfigSvcCfg import getL1MenuFileName
+
     # this assumes that the last string of a chain name is the overall L1 item
     cNameParts = chainName.split("_L1")
     l1seed = 'L1_' + cNameParts[-1]
@@ -32,6 +37,29 @@ def getOverallL1item(chainName):
         return ''
     if l1seed == 'L1_test': #Multiseeded chains are build like this
         return 'L1_EM24VHI,L1_MU20'
+    if l1seed == 'L1_Bkg' or l1seed == 'L1_Standby' or l1seed == 'L1_Calo' or l1seed == 'L1_Calo_EMPTY':
+        # For these item seed specifications we need to derive the precise list of item names from the L1Menu.
+        # During the transition period to the new menu format it is important to pick the correct kind based
+        # on the temporary TriggerFlag readLVL1FromJSON.
+        from TriggerJobOpts.TriggerFlags import TriggerFlags
+        if TriggerFlags.readLVL1FromJSON():
+            lvl1name = getL1MenuFileName()
+            lvl1access = L1MenuAccess(lvl1name)
+            itemsDict = lvl1access.items(includeKeys = ['name','ctpid','triggerType'])
+        else:
+            from TriggerMenuMT.LVL1MenuConfig.LVL1.XMLReader import L1MenuXMLReader
+            fileName = TriggerFlags.inputLVL1configFile()
+            l1menu = L1MenuXMLReader(fileName)
+            l1items = l1menu.getL1Items()
+            itemsDict = {}
+            for item in l1items:
+                itemsDict[item['name']] = {
+                    'name' : item['name'],
+                    'ctpid' : item['ctpid'],
+                    'triggerType' : item['trigger_type'],
+                }
+        l1seedlist = getSpecificL1Seeds(l1seed, itemsDict)
+        return l1seedlist
 
     return l1seed
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
index e1378a67088129ca74ca5403f17f64734532760c..1d39d07b34b3256d827d232c9ab449c8a957c8ea 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
@@ -127,9 +127,8 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
 
 
     # find main HLT top sequence (already set up in runHLT_standalone)
-    from AthenaCommon.CFElements import findSubSequence
-    hltBeginSeq = findSubSequence(topSequence, "HLTBeginSeq")
-    l1decoder = [ d for d in hltBeginSeq.getChildren() if d.getType() == "L1Decoder" ]
+    from AthenaCommon.CFElements import findSubSequence,findAlgorithm
+    l1decoder = findAlgorithm(topSequence, "L1Decoder")
 
     # add the HLT steps Node
     steps = seqAND("HLTAllSteps")
@@ -141,9 +140,6 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
 
     hltFinalizeSeq = seqAND("HLTFinalizeSeq")
 
-    # TODO - this is not currently used, but can host any algs which need to run conditional on the HLT accepting the event
-    hltAcceptedEventAlgsSeq = parOR("HLTAcceptedEventAlgsSeq")
-
     # make DF and CF tree from chains
     finalDecisions = decisionTreeFromChains(steps, triggerConfigHLT.configsList(), triggerConfigHLT.dictsList(), newJO)
 
@@ -175,14 +171,14 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
     appendCAtoAthena( summaryAcc )
 
     # B) Then (if true), we run the accepted event algorithms.
-    hltFinalizeSeq += hltAcceptedEventAlgsSeq
+    # Add any required algs to hltFinalizeSeq here
 
     # More collections required to configure the algs below
-    decObj = collectDecisionObjects( hypos, filters, l1decoder[0], summaryAlg )
+    decObj = collectDecisionObjects( hypos, filters, l1decoder, summaryAlg )
     decObjHypoOut = collectHypoDecisionObjects(hypos, inputs=False, outputs=True)
 
     Configurable.configurableRun3Behavior=1
-    monAcc, monAlg = triggerMonitoringCfg( ConfigFlags, hypos, filters, l1decoder[0] )
+    monAcc, monAlg = triggerMonitoringCfg( ConfigFlags, hypos, filters, l1decoder )
     Configurable.configurableRun3Behavior=0
     hltEndSeq += conf2toConfigurable( monAlg )
     appendCAtoAthena( monAcc )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
index e936754bc87aff643c94f210fea5162098e8337b..4a8fa7f68983d7793361bea0f79cb0167ccfaf7a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py
@@ -4,7 +4,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming
 from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT
-from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import isInputMakerBase, isHypoBase
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import isInputMakerBase, isHypoBase, isComboHypoAlg
 from AthenaCommon.CFElements import parOR, seqAND, findAllAlgorithms
 from AthenaCommon.Logging import logging
 log = logging.getLogger( __name__ )
@@ -93,6 +93,20 @@ def generateDecisionTree(chains):
                 return alg
         raise Exception("No input maker in seq "+seq.name)
 
+    @memoize
+    def findAllInputMakers( stepCounter, stepName ):
+        seq = getSingleMenuSeq( stepCounter, stepName )
+        algs = findAllAlgorithms( seq )
+        result = []
+        for alg in algs:
+            if isInputMakerBase(alg):
+                result.append(alg)
+
+        if result:
+            return result
+        else:
+            raise Exception("No input maker in seq "+seq.name)
+
     @memoize
     def findHypoAlg( stepCounter, stepName ):
         seq = getSingleMenuSeq( stepCounter, stepName )
@@ -102,6 +116,29 @@ def generateDecisionTree(chains):
                 return alg
         raise Exception("No hypo alg in seq "+seq.name)
 
+    @memoize
+    def findAllHypoAlgs( stepCounter, stepName ):
+        seq = getSingleMenuSeq( stepCounter, stepName )
+        algs = findAllAlgorithms( seq )
+        result = []
+        for alg in algs:
+            if isHypoBase(alg):
+                result.append(alg)
+
+        if result:
+            return result
+        else:
+            raise Exception("No hypo alg in seq "+seq.name)
+
+    @memoize
+    def findComboHypoAlg( stepCounter, stepName ):
+        seq = getSingleMenuSeq( stepCounter, stepName )
+        algs = findAllAlgorithms( seq )
+        for alg in algs:
+            if isComboHypoAlg(alg):
+                return alg
+        raise Exception("No combo hypo alg in seq "+seq.name)
+
     def addAndAssureUniqness( prop, toadd, context="" ):
         if toadd not in prop:
             log.info("{} value {} not there".format(context, toadd))
@@ -120,13 +157,44 @@ def generateDecisionTree(chains):
             raise Exception("{}, when setting property found conflicting values, existing {} and new {}".format(context, prop, toadd))
 
 
-    #create all sequences and filter algs, merge CAs from signatures (decision CF)
+    # create all sequences and filter algs, merge CAs from signatures (decision CF)
     for chain in chains:
         for stepCounter, step in enumerate( chain.steps, 1 ):
-            for sequence in step.sequences:
-                getFilterAlg( stepCounter, step.name )
-                recoSeqName = getSingleMenuSeq( stepCounter, step.name ).name
-                acc.merge( sequence.ca, sequenceName=recoSeqName )
+            getFilterAlg( stepCounter, step.name )
+            recoSeqName = getSingleMenuSeq( stepCounter, step.name ).name
+
+            if step.isCombo:
+                # add merged reco sequence
+                stepRecoName = step.name + CFNaming.RECO_POSTFIX
+                stepViewName = step.name + CFNaming.VIEW_POSTFIX
+
+                acc.addSequence( seqAND(stepViewName), parentName=recoSeqName )
+                acc.addSequence( parOR(stepRecoName), parentName=stepViewName )
+
+                for sequence in step.sequences:
+                    for stepView in sequence.ca.getSequence().Members:
+                        for viewMember in stepView.Members:
+                            if isHypoBase(viewMember):
+                                # add hypo alg to view sequence
+                                acc.addEventAlgo( viewMember, sequenceName=stepViewName )
+                            else:
+                                # add reco sequence to merged _reco
+                                for recoAlg in viewMember.Members:
+                                    acc.addSequence( recoAlg, parentName=stepRecoName )
+
+                    # elements from ca were moved above to the appropriate sequences
+                    # so sequence and algorithms are considered as merged
+                    sequence.ca._algorithms = {}
+                    sequence.ca._sequence.Members = []
+                    acc.merge(sequence.ca, sequenceName=recoSeqName)
+
+                # create combo hypo
+                comboHypo = CompFactory.ComboHypo( step.combo.Alg.getName() )
+                acc.addEventAlgo( comboHypo, sequenceName=stepViewName )
+
+            else:
+                acc.merge( step.sequences[0].ca, sequenceName=recoSeqName )
+
 
     # cleanup settings made by Chain & related objects (can be removed in the future)
     for chain in chains:
@@ -135,13 +203,22 @@ def generateDecisionTree(chains):
             filterAlg.Input = []
             filterAlg.Output = []
 
-            imAlg = findInputMaker( stepCounter, step.name )
-            imAlg.InputMakerInputDecisions = []
-            imAlg.InputMakerOutputDecisions = ""
+            imAlgs = findAllInputMakers( stepCounter, step.name )
+            for imAlg in imAlgs:
+                imAlg.InputMakerInputDecisions = []
+                imAlg.InputMakerOutputDecisions = ""
+
+            hypoAlgs = findAllHypoAlgs( stepCounter, step.name )
+            for hypoAlg in hypoAlgs:
+                hypoAlg.HypoInputDecisions  = ""
+                hypoAlg.HypoOutputDecisions = ""
+
+            if step.isCombo:
+                comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
+                comboHypoAlg.MultiplicitiesMap = {}
+                comboHypoAlg.HypoInputDecisions = []
+                comboHypoAlg.HypoOutputDecisions = []
 
-            hypoAlg = findHypoAlg( stepCounter, step.name )
-            hypoAlg.HypoInputDecisions  = ""
-            hypoAlg.HypoOutputDecisions = ""
 
     # connect all outputs (decision DF)
     for chain in chains:
@@ -150,7 +227,11 @@ def generateDecisionTree(chains):
 
                 # Filters linking
                 filterAlg = getFilterAlg( stepCounter, step.name )
-                filterAlg.Chains = addAndAssureUniqness( filterAlg.Chains, chain.name, "{} filter alg chains".format( filterAlg.name ) )
+                if step.isCombo:
+                    chainDictLegs = ' '.join(map(str, [dic['chainName'] for dic in step.chainDicts]))
+                    filterAlg.Chains = addAndAssureUniqness( filterAlg.Chains, chainDictLegs, "{} filter alg chains".format( filterAlg.name ) )
+                else:
+                    filterAlg.Chains = addAndAssureUniqness( filterAlg.Chains, chain.name, "{} filter alg chains".format( filterAlg.name ) )
 
                 if stepCounter == 1:
                     filterAlg.Input = addAndAssureUniqness( filterAlg.Input, chain.L1decisions[0], "{} L1 input".format( filterAlg.name ) )
@@ -159,7 +240,7 @@ def generateDecisionTree(chains):
                     filterAlg.Input = addAndAssureUniqness( filterAlg.Input, hypoOutput, "{} input".format( filterAlg.name ) )
 
                 # Input Maker linking
-                im = findInputMaker( stepCounter, step.name )
+                im = findAllInputMakers( stepCounter, step.name )[seqCounter]
                 for i in filterAlg.Input:
                     filterOutputName = CFNaming.filterOutName( filterAlg.name, i )
                     filterAlg.Output = addAndAssureUniqness( filterAlg.Output, filterOutputName, "{} output".format( filterAlg.name ) )
@@ -167,8 +248,9 @@ def generateDecisionTree(chains):
 
                 imOutputName = CFNaming.inputMakerOutName( im.name )
                 im.InputMakerOutputDecisions = assureUnsetOrTheSame( im.InputMakerOutputDecisions, imOutputName, "{} IM output".format( im.name ) )
+                
                 # Hypo linking
-                hypoAlg = findHypoAlg( stepCounter, step.name )
+                hypoAlg = findAllHypoAlgs( stepCounter, step.name )[seqCounter]
                 hypoAlg.HypoInputDecisions = assureUnsetOrTheSame( hypoAlg.HypoInputDecisions, im.InputMakerOutputDecisions,
                     "{} hypo input".format( hypoAlg.name ) )
                 hypoOutName = CFNaming.hypoAlgOutName( hypoAlg.name )
@@ -186,6 +268,24 @@ def generateDecisionTree(chains):
                 else:
                     hypoAlg.HypoTools.append( sequence._hypoToolConf.confAndCreate( TriggerConfigHLT.getChainDictFromChainName( chain.name ) ) )
 
+            # Combo Hypo linking
+            if step.isCombo:
+                comboHypoAlg = findComboHypoAlg( stepCounter, step.name )
+                comboHypoAlg.MultiplicitiesMap[chain.name] = step.multiplicity
+
+                comboInputList = findAllHypoAlgs( stepCounter, step.name )
+                for comboInput in comboInputList:
+                    comboHypoAlg.HypoInputDecisions = addAndAssureUniqness( comboHypoAlg.HypoInputDecisions, comboInput.name, 
+                        "{} comboHypo input".format( comboHypoAlg.name ) )
+                    
+                    comboOutName = CFNaming.comboHypoOutputName( comboHypoAlg.name, comboInput.name )
+                    comboHypoAlg.HypoOutputDecisions = addAndAssureUniqness( comboHypoAlg.HypoOutputDecisions, comboOutName, 
+                        "{} comboHypo output".format( comboHypoAlg.name ) )
+
+                # Combo Hypo Tools
+                for comboToolConf in step.comboToolConfs:
+                    comboHypoAlg.ComboHypoTools.append( comboToolConf.confAndCreate( TriggerConfigHLT.getChainDictFromChainName( chain.name ) ) )
+
 
     for chain in chains:
         for stepCounter, step in enumerate( chain.steps, 1 ):
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py
index 8e34146f6d1dff33b35141a03cb2fe0c9eaad2fd..dba04e5537aaec87019e30822a24a9e3c41c1558 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py
@@ -109,7 +109,6 @@ def __generateJSON( chainDicts, chainConfigs, HLTAllSteps, menuName, fileName ):
         chainName = chain["chainName"]
         menuDict["chains"][chainName] = odict([
             ("counter", chain["chainCounter"]),
-            ("name", chainName),
             ("nameHash", chain["chainNameHash"]),
             ("l1item", chain["L1item"]),
             ("l1thresholds", l1Thresholds),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 5b3ac669de1671c4e54579effb4ff22142079237..0fdbdb8ba949b608f186600a6bc18463322fe6e2 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -31,12 +31,17 @@ def setupMenu():
 
 
     TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [
-        #ART-19985
+        #ATR-19985
         ChainProp(name='HLT_mu6_idperf_L1MU6', groups=SingleMuonGroup),
         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_mu22_mu8noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu20_2mu4noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu10_ivarmedium_mu10_10invm70_L12MU10', groups=MultiMuonGroup),
+
+        #test chains
         ChainProp(name='HLT_mu6fast_L1MU6', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu6Comb_L1MU6', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu6_L1MU6',     groups=SingleMuonGroup),
@@ -58,11 +63,21 @@ def setupMenu():
         # ATR-20049
         ChainProp(name='HLT_mu6_mu4_L12MU4',  l1SeedThresholds=['MU4']*2, groups=MultiMuonGroup),
 
-        # Additional intermediate thresholds for validation comparisons
+        # Additional intermediate thresholds for validation comparisons to match with Physics_pp_v7_primaries menu
         ChainProp(name='HLT_mu28_ivarmedium_L1MU20', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu35_ivarmedium_L1MU20', groups=SingleMuonGroup),
         ChainProp(name='HLT_2mu15_L12MU10', groups=SingleMuonGroup),
         ChainProp(name='HLT_3mu8_msonly_L13MU6', groups=SingleMuonGroup),
+        ChainProp(name='HLT_mu80_L1MU20', groups=SingleMuonGroup),
+        ChainProp(name='HLT_mu60_L1MU20', groups=SingleMuonGroup),
+        ChainProp(name='HLT_mu24_mu10noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu26_mu8noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu26_mu10noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu28_mu8noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu22_2mu4noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name='HLT_mu24_2mu4noL1_L1MU20', l1SeedThresholds=['MU20','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
+        ChainProp(name="HLT_mu10_L1MU10", groups=SingleMuonGroup),
+        ChainProp(name='HLT_2mu4_L12MU4',  groups=MultiMuonGroup),
 
        # ATR-19452
         ChainProp(name='HLT_2mu4_muonqual_L12MU4',  groups=MultiMuonGroup),
@@ -253,6 +268,13 @@ def setupMenu():
     ]
 
     TriggerFlags.StreamingSlice.signatures = TriggerFlags.StreamingSlice.signatures() + [
+        # L1 calo streamers
+        ChainProp(name='HLT_noalg_bkg_L1Bkg',      l1SeedThresholds=['FSNOSEED'], stream=['Background'], groups=['RATE:SeededStreamers', 'BW:Other']),
+        ChainProp(name='HLT_noalg_L1Standby',      l1SeedThresholds=['FSNOSEED'], stream=['Standby'], groups=['RATE:SeededStreamers', 'BW:Other']),
+        ChainProp(name='HLT_noalg_L1Calo',      l1SeedThresholds=['FSNOSEED'], stream=['L1Calo'], groups=['RATE:SeededStreamers', 'BW:Other']),
+        ChainProp(name='HLT_noalg_L1Calo_EMPTY',      l1SeedThresholds=['FSNOSEED'], stream=['L1Calo'], groups=['RATE:SeededStreamers', 'BW:Other']),
+        ChainProp(name='HLT_noalg_l1calo_L1J400',      l1SeedThresholds=['FSNOSEED'], stream=['L1Calo'], groups=['RATE:SeededStreamers', 'BW:Other']),
+
         ChainProp(name='HLT_noalg_mb_L1RD2_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['MinBias'], groups=MinBiasGroup),
         ChainProp(name='HLT_noalg_zb_L1ZB', l1SeedThresholds=['FSNOSEED'], stream=['ZeroBias'], groups=ZeroBiasGroup),
     ]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
index a729b66262cf3bca0108d729ae90d29d2b9d8ced..24f9c763c64d311622e145ab523c2e512e0a5199 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py
@@ -61,8 +61,7 @@ def setupMenu(flags):
     ]
 
     flags.Trigger.menu.combined = [
-#        ChainProp(name='HLT_e7_mu10_L1EM7_MU10', groups=SingleElectronGroup),
-#        ChainProp(name='HLT_e5_mu5_L1EM7_MU10', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e7_mu10_L1EM7_MU10', groups=SingleElectronGroup)
     ]
 
 if __name__ == "__main__":
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index f2255c33a509e1ae5590c5d5feece20b57cb10c4..7668d2ebc2a20d595d6cb3efda23ef55926d0734 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -883,7 +883,16 @@ class ChainStep(object):
         if not self.isCombo:
             return "--- ChainStep %s ---\n , multiplicity = %d  ChainDict = %s \n + MenuSequences = %s "%(self.name,  sum(self.multiplicity), ' '.join(map(str, [dic['chainName'] for dic in self.chainDicts])), ' '.join(map(str, [seq.name for seq in self.sequences]) ))
         else:
-            return "--- ChainStep %s ---\n + isCombo, multiplicity = %d  ChainDict = %s \n + MenuSequences = %s  \n + ComboHypo = %s,  ComboHypoTools = %s"%(self.name,  sum(self.multiplicity), ' '.join(map(str, [dic['chainName'] for dic in self.chainDicts])), ' '.join(map(str, [seq.name for seq in self.sequences]) ), self.combo.Alg.name(),  ' '.join(map(str, [tool.__name__ for tool in self.comboToolConfs]))) 
+            if self.combo:
+                calg = self.combo.Alg.name()
+            else:
+                calg = 'NONE'
+            return "--- ChainStep %s ---\n + isCombo, multiplicity = %d  ChainDict = %s \n + MenuSequences = %s  \n + ComboHypo = %s,  ComboHypoTools = %s" %\
+                   (self.name,  sum(self.multiplicity),
+                    ' '.join(map(str, [dic['chainName'] for dic in self.chainDicts])),
+                    ' '.join(map(str, [seq.name for seq in self.sequences]) ),
+                    calg,
+                    ' '.join(map(str, [tool.__name__ for tool in self.comboToolConfs])))
 
 
 def createComboAlg(dummyFlags, name, multiplicity, comboHypoCfg):
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 73f9826eae5e03891ade609ab3300d8f93b917f3..a099c413c9bc11717cc1a0ea624716803469dd66 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
@@ -64,9 +64,9 @@ def addP1Signatures():
         ChainProp(name='HLT_tilecalib_laser_TilePEB_L1CALREQ2', l1SeedThresholds=['FSNOSEED'], stream=['Tile'], groups=['RATE:TileCalibration','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
-       ChainProp(name='HLT_noalg_idmon_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['IDMonitoring','express'],groups=['RATE:Monitoring','BW:Detector']),
+        ChainProp(name='HLT_noalg_L1RD0_EMPTY',  l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup), 
+        ChainProp(name='HLT_noalg_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=MinBiasGroup),  
+        ChainProp(name='HLT_noalg_idmon_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['IDMonitoring','express'],groups=['RATE:Monitoring','BW:Detector']),
         ChainProp(name='HLT_noalg_idmon_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['IDMonitoring'],groups=['RATE:Monitoring','BW:Detector']),
         ChainProp(name='HLT_noalg_idmon_L1RD0_UNPAIRED_ISO', l1SeedThresholds=['FSNOSEED'], stream=['IDMonitoring'],groups=['RATE:Monitoring','BW:Detector']),
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
index f275bb3bbfecb92f496e70ff86b7a49b1e51a075..c7365ef4c5ffe53cc0825c54402f0feddaafe5f4 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
@@ -1,26 +1,32 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from six.moves import UserList
-
 from AthenaCommon.Logging import logging
 log = logging.getLogger( __name__ )
 
 
-class StreamInfo(UserList):
+class StreamInfo(object):
     def __init__(self, name, streamType, obeysLumiBlock, forceFullEventBuilding):
-        self.data = [name, streamType, obeysLumiBlock, forceFullEventBuilding]
+        assert type(name) == str, "name has to be str"
+        assert type(streamType) == str, "streamType has to be str"
+        assert type(obeysLumiBlock) == bool, "obeysLumiBlock has to be bool"
+        assert type(forceFullEventBuilding) == bool, "forceFullEventBuilding has to be bool"
+        self.__data = [name, streamType, obeysLumiBlock, forceFullEventBuilding]
+
+    def __str__(self):
+        return '({}, obeysLumiBlock={}, forceFullEventBuilding={})'.format(
+            self.typeName(), self.obeysLumiBlock(), self.forceFullEventBuilding())
 
     def name(self):
-        return self.data[0]
+        return self.__data[0]
 
     def type(self):
-        return self.data[1]
+        return self.__data[1]
 
     def obeysLumiBlock(self):
-        return self.data[2]
+        return self.__data[2]
 
     def forceFullEventBuilding(self):
-        return self.data[3]
+        return self.__data[3]
 
     def typeName(self):
         return '{:s}_{:s}'.format(self.type(), self.name())
@@ -29,27 +35,31 @@ class StreamInfo(UserList):
 _all_streams = [
     # PHYSICS STREAMS
     StreamInfo('Main', 'physics', True, True),
-    StreamInfo('CosmicMuons','physics',True,True),
-    StreamInfo('CosmicCalo','physics',True,True),
-    StreamInfo('IDCosmic','physics',True,True),
+    StreamInfo('CosmicMuons', 'physics', True, True),
+    StreamInfo('CosmicCalo', 'physics', True, True),
+    StreamInfo('IDCosmic', 'physics', True, True),
+    StreamInfo('ZeroBias', 'physics', True, True),
+    StreamInfo('Background', 'physics', True, True),
+    StreamInfo('Standby', 'physics', True, True),
+    StreamInfo('L1Calo', 'physics', True, True),
     # EXPRESS STREAM
     StreamInfo('express', 'express', True, True),
-    # MONITORING STREAM
-    StreamInfo('IDMonitoring','monitoring', True, True),
+    # MONITORING STREAMS
+    StreamInfo('IDMonitoring', 'monitoring', True, True),
     # CALIBRATION STREAMS
     StreamInfo('BeamSpot', 'calibration', True, False),
     StreamInfo('LArCells', 'calibration', False, False),
     StreamInfo('RPCSecondaryReadout', 'calibration', False, False),
-    StreamInfo('CostMonitoring','calibration', False, False),
-    StreamInfo('SCTNoise','calibration',False,False),
-    StreamInfo('Tile','calibration',False,False),
-    StreamInfo('ALFACalib','calibration',False,False),
+    StreamInfo('CostMonitoring', 'calibration', False, False),
+    StreamInfo('SCTNoise', 'calibration', False, False),
+    StreamInfo('Tile', 'calibration', False, False),
+    StreamInfo('ALFACalib', 'calibration', False, False),
     # HI STREAMS
     StreamInfo('HardProbes', 'physics', True, True),
     StreamInfo('MinBias', 'physics', True, True),
     # Special stream to be used only for special chains rejecting all events like timeburner
-    StreamInfo('DISCARD', 'unknown', False, False),
-    StreamInfo('ZeroBias', 'physics', True, True)
+    StreamInfo('DISCARD', 'unknown', False, False)
+    # Add new streams grouped by type as above, not at the end of the list
 ]
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
index 9434ac72914f8b71e0aecab4ea1bcce5051e5ad8..e3b0f4093020fe0b36bd5e45841e7620fc169fb6 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
@@ -35,17 +35,11 @@ def MuFastViewDataVerifier():
     alg = CompFactory.AthViews.ViewDataVerifier( name = "VDVMuFast",
                                                  DataObjects = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
                                                                 ( 'RpcPad_Cache' , 'StoreGateSvc+RpcRdoCache' ),
-                                                                ( 'RpcPadContainer' , 'StoreGateSvc+RPCPAD' ),
                                                                 ( 'RpcCoinDataCollection_Cache' , 'StoreGateSvc+RpcCoinCache' ),
                                                                 ( 'RpcPrepDataCollection_Cache' , 'StoreGateSvc+RpcPrdCache' ),
                                                                 ( 'TgcRdo_Cache' , 'StoreGateSvc+TgcRdoCache' ),
-                                                                ( 'TgcRdoContainer' , 'StoreGateSvc+TGCRDO' ),
                                                                 ( 'MdtCsm_Cache' , 'StoreGateSvc+MdtCsmRdoCache' ),
-                                                                ( 'MdtCsmContainer' , 'StoreGateSvc+MDTCSM' ),
                                                                 ( 'CscRawDataCollection_Cache' , 'StoreGateSvc+CscRdoCache' ),
-                                                                ( 'CscRawDataContainer' , 'StoreGateSvc+CSCRDO' ),
-                                                                ( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ),
-                                                                ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ),
                                                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+L2MuFastRecoRoIs' ),
                                                                 ( 'DataVector< LVL1::RecMuonRoI >' , 'StoreGateSvc+HLT_RecMURoIs' )
                                                                ]  )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
index 434dc6e1e500cdbedb979a7cd5c7675bb8bd89b4..efc54c001babceceed00d6955b6b8092692e23eb 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
@@ -84,8 +84,8 @@ def l2PhotonAlgCfg( flags ):
 
     photonFex= CompFactory.TrigEgammaFastPhotonFexMT("EgammaFastPhotonFex_1")
     #photonFex= L2PhotonFex_1()
-    photonFex.TrigEMClusterName = recordable("HLT_L2CaloEMClusters")
-    photonFex.PhotonsName = recordable("HLT_L2Photons")
+    photonFex.TrigEMClusterName = recordable("HLT_FastCaloEMClusters")
+    photonFex.PhotonsName = recordable("HLT_FastPhotons")
     photonFex.RoIs = "L2PhotonRecoRoIs"
 
     return acc, photonFex
@@ -94,7 +94,7 @@ def l2PhotonAlgCfg( flags ):
 def photonViewDataVerifierCfg():
     from AthenaConfiguration.ComponentFactory import CompFactory
     moveClusters = CompFactory.AthViews.ViewDataVerifier("VDVFastPhoton")
-    moveClusters.DataObjects = [ ('xAOD::TrigEMClusterContainer','StoreGateSvc+HLT_L2CaloEMClusters'),
+    moveClusters.DataObjects = [ ('xAOD::TrigEMClusterContainer','StoreGateSvc+HLT_FastCaloEMClusters'),
                                  ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+L2PhotonRecoRoIs' )]
 
     result = ComponentAccumulator()
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py
index dcc6728f660e63934fec76cb793dc37c672ac043..cc0af567ee5c948b1e3611d81a1cd01aa8e3470e 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py
@@ -31,7 +31,7 @@ def generateChains(flags, chainDict):
 
     l2CaloHypo = l2CaloHypoCfg( flags,
                                 name = 'L2PhotonCaloHypo',
-                                CaloClusters = recordable('HLT_L2CaloEMClusters') )
+                                CaloClusters = recordable('HLT_FastCaloEMClusters') )
 
     accCalo.addEventAlgo(l2CaloHypo, sequenceName=stepView.getName())
 
@@ -54,7 +54,7 @@ def generateChains(flags, chainDict):
     accPhoton.merge(l2PhotonReco, sequenceName=stepReco.getName())
 
     l2PhotonHypo = l2PhotonHypoCfg( flags,
-                                    Photons = 'HLT_L2Photons',
+                                    Photons = 'HLT_FastPhotons',
                                     RunInView = True )
 
     accPhoton.addEventAlgo(l2PhotonHypo, sequenceName=stepView.getName())
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
index ad14be735ea895377909749fba7d8841a72589c8..b452f12dea085dc203cf86b37487d803d0b0c7ab 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
@@ -152,8 +152,6 @@ def tauCaloSequence(ConfigFlags):
     from AthenaCommon.AlgSequence import AlgSequence
     topSequence = AlgSequence()
     topSequence.SGInputLoader.Load += [( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' )]
-    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
-      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
 
     tauCaloSequence = seqAND("tauCaloSequence", [tauCaloViewsMaker, tauCaloInViewSequence ])
     return (tauCaloSequence, tauCaloViewsMaker, sequenceOut)    
@@ -186,8 +184,6 @@ def tauCaloMVASequence(ConfigFlags):
     from AthenaCommon.AlgSequence import AlgSequence
     topSequence = AlgSequence()
     topSequence.SGInputLoader.Load += [( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' )]
-    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
-      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
 
     tauCaloMVASequence = seqAND("tauCaloMVASequence", [tauCaloMVAViewsMaker, tauCaloMVAInViewSequence ])
     return (tauCaloMVASequence, tauCaloMVAViewsMaker, sequenceOut)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py
index be4d7604f3d74a695e6a4eade2e7b09787c1ed90..5b5dbf7b3b5459f22189690bd6631d3c5160435a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py
@@ -1,13 +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
 
 from TriggerMenuMT.HLTMenuConfig.Menu.CFValidation import findViewAlgs, checkVDV
 from AthenaCommon.AlgSequence import AlgSequence
 from AthenaCommon.CFElements import seqOR
 import AthenaCommon.CfgMgr as CfgMgr
+import six
 
 import unittest
 
 class ViewCFTest( unittest.TestCase ):
+    if six.PY2:
+        assertRaisesRegex = unittest.TestCase.assertRaisesRegexp        
+
     def runTest( self ):
 
         topSequence = AlgSequence()
@@ -47,10 +51,10 @@ class ViewCFTest( unittest.TestCase ):
         # Check misconfigured EVCA
         evca1.ViewNodeName = "aFakeNode"
 
-        with self.assertRaisesRegexp( RuntimeError, "no corresponding upstream EventViewCreatorAlgorithm" ):
+        with self.assertRaisesRegex( RuntimeError, "no corresponding upstream EventViewCreatorAlgorithm" ):
             checkVDV( topSequence, [topSequence.name()], {} )
         evca1.ViewNodeName = "viewSequence"
-        with self.assertRaisesRegexp( RuntimeError, "no external data" ):
+        with self.assertRaisesRegex( RuntimeError, "no external data" ):
             checkVDV( topSequence, [topSequence.name()], {} )
         evca1.RequireParentView = True
         checkVDV( topSequence, [topSequence.name()], {} )
@@ -65,6 +69,6 @@ class ViewCFTest( unittest.TestCase ):
         topSequence.makeViewSequence += evca2
         checkVDV( topSequence, [topSequence.name()], {} )
         evca2.ViewNodeName = "viewSequence"
-        with self.assertRaisesRegexp( RuntimeError, "Found duplicate view node name" ):
+        with self.assertRaisesRegex( RuntimeError, "Found duplicate view node name" ):
             checkVDV( topSequence, [topSequence.name()], {} )
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/L1Seeds.py b/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/L1Seeds.py
index e0b9ff63e96f9ff06defe8ff2cb59951d41fca76..b6ec67e952d4264938926475e8fb2b92231ae571 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/L1Seeds.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/L1Seeds.py
@@ -32,20 +32,21 @@ calo_exceptions = set([])
 # obtain the l1 items according to the the trigger type
 # function taken originally from TriggerPythonConfig
 #######################################################
-def Lvl1ItemByTriggerType(l1object, triggertypebit, triggertypebitmask):
-    """For a triggertypebit between 0 and 7, returns a list of names of
-    those Lvl1 items that have that bit set in the triggertype"""
-    if triggertypebit<0 or triggertypebit>0xFF:
-        raise RuntimeError('TriggerPythonConfig.Lvl1ItemByTriggerType(triggertypebit,triggertypebitmask) needs to be called with 0<=triggertypebit<=0xFF, ' + \
-                               + 'but is called with triggertypebit=%i' % triggertypebit)
-    if triggertypebitmask<0 or triggertypebitmask>0xFF:
-        raise RuntimeError('TriggerPythonConfig.Lvl1ItemByTriggerType(triggertypebit,triggertypebitmask) needs to be called with 0<=triggertypebitmask<=0xFF, ' + \
-                               + 'but is called with triggertypebitmask=%i' % triggertypebitmask)
-    
-    itemsForMenu = [item for item in l1object if item.ctpid != -1]    
+def Lvl1ItemByTriggerType(l1object, triggertype_pattern, triggertype_bitmask):
+    """
+    The function returns those items where the items triggertype, after applying the mask, matches the pattern.
+    With this one can also select items where a certain bit is disabled
+    """
+    if triggertype_pattern<0 or triggertype_pattern>0xFF:
+        raise RuntimeError('TriggerPythonConfig.Lvl1ItemByTriggerType(triggertype_pattern,triggertype_bitmask) needs to be called with 0<=triggertype_pattern<=0xFF, ' + \
+                               + 'but is called with triggertype_pattern=%i' % triggertype_pattern)
+    if triggertype_bitmask<0 or triggertype_bitmask>0xFF:
+        raise RuntimeError('TriggerPythonConfig.Lvl1ItemByTriggerType(triggertype_pattern,triggertype_bitmask) needs to be called with 0<=triggertype_bitmask<=0xFF, ' + \
+                               + 'but is called with triggertype_bitmask=%i' % triggertype_bitmask)
+    itemsForMenu = [item for item in l1object if l1object[item]['ctpid'] != -1]
     if not itemsForMenu:
         log.error('No item defined for the L1 Menu, the TriggerConfL1 object does not contain items')
-    res = [item.name for item in itemsForMenu if (triggertypebitmask & item.trigger_type)==triggertypebit ]
+    res = [item for item in itemsForMenu if ( (triggertype_bitmask & int(l1object[item]['triggerType'],2)) == triggertype_pattern)]
     return res
 
 ##############################
@@ -303,7 +304,7 @@ def getL1LowLumi(l1seed):
 # assigned the seeds to the L1 names
 #####################################
 def getSpecificL1Seeds(l1seedname, l1itemobject):
-    l1items = [i.name for i in l1itemobject]
+    l1items = l1itemobject.keys()
     L1Seed = ''
     if l1seedname == 'L1_J':
         L1Seed = getL1JetBS()
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
index b744da8dbc666d61ddbb921767d136d3ab705998..04ae8bc1e243e1a54d9bd051551547b7c042fb81 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
@@ -34,7 +34,7 @@ class UniqueChainNames(MenuVerification):
             description="Chain names are unique")
 
     def run(self, config):
-        names = [chain["name"] for chain in config["chains"].values()]
+        names = config["chains"].keys()
         counts = Counter(names)
         self.failures = [chain for chain, count
                          in counts.items() if count > 1]
@@ -80,7 +80,7 @@ class StructuredChainNames(MenuVerification):
 
     def run(self, config):
         if self._trigger_level == TriggerLevel.HLT:
-            names = [chain["name"] for chain in config["chains"].values()]
+            names = config["chains"].keys()
             self.failures = [n for n in names
                              if not self._name_matches_hlt_convention(n)]
         elif self._trigger_level == TriggerLevel.L1:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/trigCompareOldandNewL1Menus.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/trigCompareOldandNewL1Menus.py
new file mode 100755
index 0000000000000000000000000000000000000000..504777a3e7129f9cde374ad6da33d56755efb8f1
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/trigCompareOldandNewL1Menus.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+
+# this script is to help find differences between the old (xml) and new (json) L1 menus
+# it also checks inputs of to the HLT and if they are available in L1
+
+# this helps with the consistent transition from old to new L1 menu. It should be 
+# deleted once we have concluded this transition
+
+import sys
+
+from AthenaCommon.Logging import log
+from TriggerMenuMT.LVL1MenuConfig.LVL1.XMLReader import L1MenuXMLReader
+from TrigConfIO.L1TriggerConfigAccess import L1MenuAccess
+from TrigConfIO.HLTTriggerConfigAccess import HLTMenuAccess
+
+def compareBothL1Menus(l1items_xml, l1items_json):
+    # legacyCaloItems = [ k for k,v in l1items_json.items() if 'legacy' in v  ]
+
+    itemNames_xml = [x['name'] for x in l1items_xml]
+    itemNames_json = l1items_json.keys()
+    ids_xml = dict([ (x['name'],int(x['ctpid'])) for x in l1items_xml])
+    ids_json = dict([ (x['name'],x['ctpid']) for x in l1items_json.values()])
+
+    if l1items_xml and l1items_json:
+        itemsOnlyInJson =  list( set(itemNames_json) - set(itemNames_xml)  )
+        itemsOnlyInXML =  list( set(itemNames_xml) - set(itemNames_json)  )
+        log.info("These %i items are new in the json version" , len(itemsOnlyInJson))
+        log.info(itemsOnlyInJson)
+        log.info("\nThese %i items have disappeared in the json version" , len(itemsOnlyInXML))
+        log.info(itemsOnlyInXML)
+
+    inboth = set(itemNames_json).intersection(set(itemNames_xml))
+    noMatchId = []
+    for name in sorted(inboth):
+        if ids_xml[name] != ids_json[name]:
+            noMatchId += [(name, ids_xml[name], ids_json[name])]
+    
+    log.info("\nFrom %i items that are in both, these %i have non-matching CTP id's" , len(inboth),len(noMatchId))
+    log.info("Name, CTPID in xml, CTPID in json")
+    for x in noMatchId:
+        log.info(x)
+
+
+
+
+
+
+def main():
+    
+    l1items_xml = None
+    l1items_json = None
+    hltinput = None
+
+    if len(sys.argv) <3:
+        log.info("Please specify at least two menu files (L1Menu.xml, L1Menu.json, HLTMenu.json)")
+
+    for fileName in sys.argv[1:]:
+        if fileName.endswith(".json"):
+            if fileName.startswith("L1"):
+                l1menu = L1MenuAccess(fileName)
+                l1items_json = l1menu.items()
+            else:
+                hltmenu = HLTMenuAccess(fileName)
+                hltinput = hltmenu.chains()
+        elif fileName.endswith(".xml"):
+            l1menu = L1MenuXMLReader(fileName)
+            l1items_xml = l1menu.getL1Items()
+
+
+    if l1items_xml and l1items_json:
+        compareBothL1Menus(l1items_xml, l1items_json)
+
+    if l1items_json and hltinput:
+        pass # check not yet implemented
+
+
+    return 0
+    
+if __name__ == "__main__":
+    sys.exit(main())
diff --git a/graphics/EventDisplaysOnline/python/OnlineEventDisplaysSvc.py b/graphics/EventDisplaysOnline/python/OnlineEventDisplaysSvc.py
index b71b92204834b2bbc897a8de466142debe4c7407..cc346df573366f256eed74623953f4f94e1fd7c0 100644
--- a/graphics/EventDisplaysOnline/python/OnlineEventDisplaysSvc.py
+++ b/graphics/EventDisplaysOnline/python/OnlineEventDisplaysSvc.py
@@ -33,9 +33,6 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
 		self.StreamToFileTool = None
 		self.StreamToServerTool = None
 		self.VP1EventProducer = None
-		self.TrigBSExtraction = None
-		self.TrigDecMaker = None 
-		self.TrigDecTool = None
 
 		self.run = 0
 		self.event = 0
@@ -74,33 +71,19 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
 		if not (self.StreamToFileTool and self.StreamToServerTool and self.VP1EventProducer):
 			self.getJobOptions()
 
-		if not self.TrigDecTool:
-			try:
-				self.TrigBSExtraction = PyAthena.py_alg('TrigBSExtraction')
-				self.TrigDecMaker = PyAthena.py_alg('TrigDecMaker')
-				self.TrigDecTool = PyAthena.py_tool('Trig::TrigDecisionTool/TrigDecisionTool', iface='Trig::TrigDecisionTool')
-				self.msg.info("TrigDecTool: %s" % self.TrigDecTool)
-			except Exception as err:
-				self.msg.warning("Coult not retrieve TrigDecisionTool: %s" % err)
-
 		try:
-			eventInfo = PyEventTools.getEventInfo('')
+			eventInfo = PyEventTools.getEventInfo('EventInfo')
 		except LookupError as err:
 			self.msg.error("Could not retrieve EventInfo: %s" % err)
 			return StatusCode.Recoverable
 
 		try:
 			# Read event info
-			eventID = eventInfo.event_ID()
-			self.run = eventID.run_number()
-			self.event = eventID.event_number()
+			self.run = eventInfo.runNumber()
+			self.event = eventInfo.eventNumber()
 
 			# Retrieve trigger info
-			triggerInfo = eventInfo.trigger_info()
-			if triggerInfo:
-				streamTags = triggerInfo.streamTags()
-			else:
-				streamTags = []
+			streamTags = eventInfo.streamTags()
 		except Exception as err:
 			self.msg.error("Exception occured while reading event/trigger info: %s" % err)
 			return StatusCode.Recoverable
@@ -119,32 +102,18 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
 			if tag.type() == 'physics' and tag.name():
 				streams += [tag.type()+'_'+tag.name()]
 
-		# Add special streams to the list (JetTriggers, Public)
-		try:
-			if self.TrigDecTool:
-				self.TrigBSExtraction.execute()
-				self.TrigDecMaker.execute()
-
-				if self.TrigDecTool.isPassed('L1_J5') or self.TrigDecTool.isPassed('L1_J10') or self.TrigDecTool.isPassed('L1_J15'):
-					streams += ['JetTriggers']
-				#if self.TrigDecTool.isPassed('L1_MBTS_1_1'):
-				#	streams += ['MinBias']
-				#if self.TrigDecTool.isPassed('L1_MU0') or self.TrigDecTool.isPassed('L1_MU6') or self.TrigDecTool.isPassed('L1_MU10'):
-				#	streams += ['Muons']
-		except Exception as err:
-			self.msg.error("Exception occured while using TrigDecTool: %s" % err)
-
+		# Add special streams to the list Public
 		try:
 			for stream in streams:
 				if stream in self.public:
 					ready4physics = ISInfoAny()
 					self.dict.getValue('RunParams.Ready4Physics', ready4physics)
-					print ("Ready for physics: %s " % ready4physics.get())
+					print("Ready for physics: %s " % ready4physics.get())
 					runparams = ISObject(self.partition, 'RunParams.RunParams','RunParams')
 					runparams.checkout()
 					physicsReady = ISObject(self.partition, 'RunParams.Ready4Physics','Ready4PhysicsInfo')
 					physicsReady.checkout()
-					print ("Ready for physics: %r" % (physicsReady.ready4physics))
+					print("Ready for physics: %r" % (physicsReady.ready4physics))
 					#if ready4physics.get() and physicsReady.ready4physics and runparams.T0_project_tag in self.projecttags:
 					if physicsReady.ready4physics and runparams.T0_project_tag in self.projecttags:
 						streams += ['Public']
@@ -197,7 +166,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
 			self.StreamToFileTool.getProperty('FileNamePrefix').setValue("%s/JiveXML" % self.directory)
 
 			# And also for the VP1 event producer algorithm
-			self.VP1EventProducer.getProperty('DestinationDirectory').setValue(self.directory)
+			#self.VP1EventProducer.getProperty('DestinationDirectory').setValue(self.directory) # lshi June 22 2020
 		except Exception as err:
 			self.msg.error("Exception occured while setting job options: %s" % err)
 			return StatusCode.Failure
@@ -222,7 +191,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
 		self.msg.verbose("Received incident %s from %s" % (incident.type(), incident.source()))
 
 		# Event and trigger info present, decide stream
-		if incident.type() == 'BeginEvent' and incident.source() == 'AthenaEventLoopMgr':
+		if incident.type() == 'BeginEvent' and incident.source() == 'BeginIncFiringAlg':
 			self.beginEvent()
 
 		# VP1 writes its file at EndEvent, so we can do cleanup at StoreCleared
diff --git a/graphics/EventDisplaysOnline/share/EventDisplay_jobOptions.py b/graphics/EventDisplaysOnline/share/EventDisplay_jobOptions.py
index 0234aeca01704fc90398fadd5dfb9af0f6189795..cb1eb0864003fcbe8cfe98cfc358610eb1ab2179 100644
--- a/graphics/EventDisplaysOnline/share/EventDisplay_jobOptions.py
+++ b/graphics/EventDisplaysOnline/share/EventDisplay_jobOptions.py
@@ -32,8 +32,7 @@ useAtlantisEmon   = False
 
 ## ------------------------------------------- flags set in: RecExOnline_emonsvc.py (from RecExOnline_jobOptions.py)                    
 partitionName   = 'ATLAS'
-#Current test partition looping through 2015 data if you want to test when no run is ongoing.
-#partitionName   = 'GMTestPartition_lshi_tdaq6'
+#partitionName   = 'GMTestPartition' #Test partition serving events from a raw data file if you want to test when no run is ongoing.
 publishName     = 'EventDisplays'
 
 if (partitionName == 'ATLAS'):
@@ -51,12 +50,12 @@ pickleconfigfile  = './ami_recotrf.pickle'
 DataSource        = 'data'
 InputFormat       = 'bytestream'
 fileName          = './0.data'
+beamType          = 'collisions'
 #beamType          = 'cosmics'
-#beamType          = 'collisions'
 
 #COND tag and GEO are needed for running over a test partition online
 #Previous COND tag
-ConditionsTag     = 'CONDBR2-HLTP-2017-03' #Removed 07/04
+ConditionsTag     = 'CONDBR2-HLTP-2018-01'
 #Swapped to this following AMI tag for current reco. Swap back if not in release
 #ConditionsTag     = 'CONDBR2-ES1PA-2016-01' #Different
 #Current DetDesc
@@ -125,9 +124,9 @@ jobproperties.CaloCellFlags.doLArHVCorr=False
 jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr.set_Value_and_Lock(False)
 jobproperties.CaloCellFlags.doLArCreateMissingCells=False
 
-#Work around to stop crash in pixel cluster splitting 
+#Work around to stop crash in pixel cluster splitting (Updated by lshi 23 July 2020, ATLASRECTS-5496)
 from InDetRecExample.InDetJobProperties import InDetFlags#All OK
-InDetFlags.doInnerDetectorCommissioning.set_Value_and_Lock(True)
+InDetFlags.doPixelClusterSplitting.set_Value_and_Lock(False)
 
 from JetRec.JetRecFlags import jetFlags
 jetFlags.useTracks.set_Value_and_Lock(False)