From 10a09b58d1a82802e20052a880fc0b0a2fe9021b Mon Sep 17 00:00:00 2001
From: mrezaeie <mohsen.rezaei.estabragh@cern.ch>
Date: Mon, 15 Apr 2019 18:11:39 +0200
Subject: [PATCH 001/129] Replacing MemoryMonitor with prmon (only in master
 branch) (ATLASJT-394)

This branch replaces the MemoryMonitor tool with prmon, which has added
functionality.
---
 Tools/PyJobTransforms/python/trfExe.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index 8603812e4ca0..a6b1d284ba55 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -660,8 +660,8 @@ class scriptExecutor(transformExecutor):
             p = subprocess.Popen(self._cmd, shell = False, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, bufsize = 1)
             if self._memMonitor:
                 try:
-                    self._memSummaryFile = 'mem.summary.' + self._name + '.json'
-                    memMonitorCommand = ['MemoryMonitor', '--pid', str(p.pid), '--filename', 'mem.full.' + self._name, 
+                    self._memSummaryFile = 'prmon.summary.' + self._name + '.json'
+                    memMonitorCommand = ['prmon', '--pid', str(p.pid), '--filename', 'prmon.full.' + self._name, 
                                          '--json-summary', self._memSummaryFile, '--interval', '30']
                     mem_proc = subprocess.Popen(memMonitorCommand, shell = False, close_fds=True)
                     # TODO - link mem.full.current to mem.full.SUBSTEP
-- 
GitLab


From 9efea99ccbe8795d75ee5216707c8b21ad00f1f0 Mon Sep 17 00:00:00 2001
From: Pascal Boeschoten <pascal.boeschoten@cern.ch>
Date: Tue, 16 Apr 2019 17:18:39 +0200
Subject: [PATCH 002/129] Change tools to private

---
 .../TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx  |  6 +++---
 Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx    | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx b/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
index 80791777ae29..e3c71a6aecef 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
@@ -39,9 +39,9 @@ namespace Trk
                                         const std::string& name,
                                         const IInterface* parent)
     :   AthAlgTool(type, name, parent),
-    m_extrapolator("Trk::Extrapolator/AtlasExtrapolator"),
-    m_intersector("Trk::RungeKuttaIntersector/RungeKuttaIntersector"),
-    m_spectrometerExtrapolator("Trk::Extrapolator/AtlasExtrapolator"),
+    m_extrapolator("Trk::Extrapolator/AtlasExtrapolator", this),
+    m_intersector("Trk::RungeKuttaIntersector/RungeKuttaIntersector", this),
+    m_spectrometerExtrapolator("Trk::Extrapolator/AtlasExtrapolator", this),
     m_trackingGeometrySvc("TrackingGeometrySvc/AtlasTrackingGeometrySvc", name),
     m_trackingVolumesSvc("Trk::TrackingVolumesSvc/TrackingVolumesSvc", name),
     m_aggregateMaterial(true),
diff --git a/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx b/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx
index ac136da5064a..06aa95a9e0ed 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitter/src/iPatFitter.cxx
@@ -59,11 +59,11 @@ namespace Trk
     m_fullCombinedFit(true),
     m_lineFit(false),
     m_lineMomentum(100. * Gaudi::Units::GeV),
-    m_materialAllocator("Trk::MaterialAllocator/MaterialAllocator"),
-    m_rungeKuttaIntersector("Trk::RungeKuttaIntersector/RungeKuttaIntersector"),
-    m_solenoidalIntersector("Trk::SolenoidalIntersector/SolenoidalIntersector"),
-    m_stepPropagator("Trk::STEP_Propagator/AtlasSTEP_Propagator"),
-    m_straightLineIntersector("Trk::StraightLineIntersector/StraightLineIntersector"),
+    m_materialAllocator("Trk::MaterialAllocator/MaterialAllocator", this),
+    m_rungeKuttaIntersector("Trk::RungeKuttaIntersector/RungeKuttaIntersector", this),
+    m_solenoidalIntersector("Trk::SolenoidalIntersector/SolenoidalIntersector", this),
+    m_stepPropagator("Trk::STEP_Propagator/AtlasSTEP_Propagator", this),
+    m_straightLineIntersector("Trk::StraightLineIntersector/StraightLineIntersector", this),
     m_trackingVolumesSvc("TrackingVolumesSvc/TrackingVolumesSvc", name),
     m_orderingTolerance(1. * Gaudi::Units::mm),
     m_maxWarnings(10),
-- 
GitLab


From ec9a3b5e77eea7ac5ae7215e573abe4c1280e29e Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Thu, 18 Apr 2019 14:31:47 +0200
Subject: [PATCH 003/129] Improve EventInfoOverlay tests

---
 .../share/ConfiguredOverlayMT_jobOptions.py   | 10 ++--
 .../OverlayCommonAlgs/CMakeLists.txt          | 12 ++++
 .../python/EventInfoOverlayConfig.py          |  9 ++-
 .../share/EventInfoOverlayLegacyTest.py       | 16 +++--
 .../share/EventInfoOverlayTest.py             | 16 +++--
 .../test/EventInfoOverlay_test.py             | 59 +++++++++++++++++++
 6 files changed, 109 insertions(+), 13 deletions(-)
 create mode 100755 Event/EventOverlay/OverlayCommonAlgs/test/EventInfoOverlay_test.py

diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py
index 56ef2d9540a1..9ab9fa3e6364 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlayMT_jobOptions.py
@@ -40,18 +40,20 @@ job += CfgGetter.getAlgorithm("CopyTimings")
 import AthenaPoolCnvSvc.ReadAthenaPoolDouble
 from AthenaCommon.AppMgr import ServiceMgr
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from AthenaCommon.ConcurrencyFlags import jobproperties as jp
 OverlayEventSelector = ServiceMgr.DoubleEventSelector
 OverlayEventSelector.PrimaryInputCollections = athenaCommonFlags.PoolRDOInput()
 OverlayEventSelector.SecondaryaryInputCollections = athenaCommonFlags.PoolHitsInput()
 OverlayEventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 
 # Properly generate event context
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
 nThreads = jp.ConcurrencyFlags.NumThreads()
 if nThreads > 0:
-    svcMgr.AthenaHiveEventLoopMgr.UseSecondaryEventNumber = True
-elif hasattr(svcMgr, "AthenaHiveEventLoopMgr"):
-    svcMgr.AthenaEventLoopMgr.UseSecondaryEventNumber = True
+    EventLoop = Service("AthenaHiveEventLoopMgr")
+else:
+    EventLoop = Service("AthenaEventLoopMgr")
+EventLoop.UseSecondaryEventNumber = True
+svcMgr += EventLoop
 
 
 #-------------------------
diff --git a/Event/EventOverlay/OverlayCommonAlgs/CMakeLists.txt b/Event/EventOverlay/OverlayCommonAlgs/CMakeLists.txt
index 5bc9e4d06197..8c6783dd27d9 100644
--- a/Event/EventOverlay/OverlayCommonAlgs/CMakeLists.txt
+++ b/Event/EventOverlay/OverlayCommonAlgs/CMakeLists.txt
@@ -30,10 +30,22 @@ atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
 # Setup and run tests
+atlas_add_test( EventInfoOverlayConfigTest
+                SCRIPT test/EventInfoOverlay_test.py
+                PROPERTIES TIMEOUT 300 )
+
 atlas_add_test( EventInfoOverlayLegacyConfigTest
                 SCRIPT test/EventInfoOverlayLegacy_test.py
                 PROPERTIES TIMEOUT 300 )
 
+atlas_add_test( EventInfoOverlayTest
+                SCRIPT athena.py OverlayCommonAlgs/EventInfoOverlayTest.py
+                PROPERTIES TIMEOUT 300 )
+
+atlas_add_test( EventInfoOverlayTestMT
+                SCRIPT athena.py OverlayCommonAlgs/EventInfoOverlayTest.py --threads=3
+                PROPERTIES TIMEOUT 300 )
+
 atlas_add_test( EventInfoOverlayLegacyTest
                 SCRIPT athena.py OverlayCommonAlgs/EventInfoOverlayLegacyTest.py
                 PROPERTIES TIMEOUT 300 )
diff --git a/Event/EventOverlay/OverlayCommonAlgs/python/EventInfoOverlayConfig.py b/Event/EventOverlay/OverlayCommonAlgs/python/EventInfoOverlayConfig.py
index f4fbf43c9551..ff83639ea922 100644
--- a/Event/EventOverlay/OverlayCommonAlgs/python/EventInfoOverlayConfig.py
+++ b/Event/EventOverlay/OverlayCommonAlgs/python/EventInfoOverlayConfig.py
@@ -3,7 +3,6 @@
 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from AthenaCommon import Logging
 
 
 def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", **kwargs):
@@ -30,8 +29,16 @@ def EventInfoOverlayCfg(flags, name="EventInfoOverlay", **kwargs):
 
     kwargs.setdefault("DataOverlay", flags.Overlay.DataOverlay)
 
+    # Do the xAOD::EventInfo overlay
     from OverlayCommonAlgs.OverlayCommonAlgsConf import EventInfoOverlay
     alg = EventInfoOverlay(name, **kwargs)
     acc.addEventAlgo(alg)
 
+    # Re-map signal address
+    from SGComps.AddressRemappingConfig import AddressRemappingCfg
+    acc.merge(AddressRemappingCfg([
+        "xAOD::EventInfo#EventInfo->" + flags.Overlay.SigPrefix + "EventInfo",
+        "xAOD::EventAuxInfo#EventInfoAux.->" + flags.Overlay.SigPrefix + "EventInfoAux.",
+    ]))
+
     return acc
diff --git a/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayLegacyTest.py b/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayLegacyTest.py
index bcd32dc2595f..ecf15c4ee058 100644
--- a/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayLegacyTest.py
+++ b/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayLegacyTest.py
@@ -67,10 +67,6 @@ AddressRemappingSvc.addInputRename("EventInfo", "McEventInfo", "Sig_McEventInfo"
 # Event related parameters
 #--------------------------------------------------------------
 theApp.EvtMax = 10
-if hasattr(svcMgr, "AthenaEventLoopMgr"):
-    svcMgr.AthenaEventLoopMgr.UseSecondaryEventNumber = True
-if hasattr(svcMgr, "AthenaHiveEventLoopMgr"):
-    svcMgr.AthenaHiveEventLoopMgr.UseSecondaryEventNumber = True
 
 #--------------------------------------------------------------
 # Algorithms
@@ -88,6 +84,18 @@ EventInfoOverlay = CfgGetter.getAlgorithm("EventInfoOverlay")
 EventInfoOverlay.OutputLevel = DEBUG
 topSequence += EventInfoOverlay
 
+#--------------------------------------------------------------
+# EventLoop
+#--------------------------------------------------------------
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+if nThreads > 0:
+    EventLoop = Service("AthenaHiveEventLoopMgr")
+else:
+    EventLoop = Service("AthenaEventLoopMgr")
+EventLoop.UseSecondaryEventNumber = True
+svcMgr += EventLoop
+
 #--------------------------------------------------------------
 # Output options
 #--------------------------------------------------------------
diff --git a/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayTest.py b/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayTest.py
index d8b156080b73..084009c649c1 100644
--- a/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayTest.py
+++ b/Event/EventOverlay/OverlayCommonAlgs/share/EventInfoOverlayTest.py
@@ -68,10 +68,6 @@ AddressRemappingSvc.addInputRename("xAOD::EventAuxInfo", "EventInfoAux.", "Sig_E
 # Event related parameters
 #--------------------------------------------------------------
 theApp.EvtMax = 100
-if hasattr(svcMgr, "AthenaEventLoopMgr"):
-    svcMgr.AthenaEventLoopMgr.UseSecondaryEventNumber = True
-if hasattr(svcMgr, "AthenaHiveEventLoopMgr"):
-    svcMgr.AthenaHiveEventLoopMgr.UseSecondaryEventNumber = True
 
 #--------------------------------------------------------------
 # Algorithms
@@ -82,6 +78,18 @@ EventInfoOverlay = CfgGetter.getAlgorithm("EventInfoOverlay")
 EventInfoOverlay.OutputLevel = DEBUG
 topSequence += EventInfoOverlay
 
+#--------------------------------------------------------------
+# EventLoop
+#--------------------------------------------------------------
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+if nThreads > 0:
+    EventLoop = Service("AthenaHiveEventLoopMgr")
+else:
+    EventLoop = Service("AthenaEventLoopMgr")
+EventLoop.UseSecondaryEventNumber = True
+svcMgr += EventLoop
+
 #--------------------------------------------------------------
 # Output options
 #--------------------------------------------------------------
diff --git a/Event/EventOverlay/OverlayCommonAlgs/test/EventInfoOverlay_test.py b/Event/EventOverlay/OverlayCommonAlgs/test/EventInfoOverlay_test.py
new file mode 100755
index 000000000000..f74b8bb7b0aa
--- /dev/null
+++ b/Event/EventOverlay/OverlayCommonAlgs/test/EventInfoOverlay_test.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+"""Run tests on EventInfoOverlayConfig.py
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+import sys
+
+from AthenaCommon.Logging import log
+from AthenaCommon.Constants import DEBUG
+from AthenaCommon.Configurable import Configurable
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+from AthenaConfiguration.TestDefaults import defaultTestFiles
+from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
+from OverlayCommonAlgs.EventInfoOverlayConfig import EventInfoCnvAlgCfg, EventInfoOverlayCfg
+
+# Set up logging and new style config
+log.setLevel(DEBUG)
+Configurable.configurableRun3Behavior = True
+
+# Configure
+# ConfigFlags.join(createDigitizationCfgFlags())
+ConfigFlags.join(createOverlayCfgFlags())
+ConfigFlags.Input.Files = defaultTestFiles.RDO_BKG
+ConfigFlags.Input.SecondaryFiles = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/TestCase_xAODEventInfo.root"]
+ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+ConfigFlags.Concurrency.NumThreads = 0
+ConfigFlags.Overlay.DataOverlay = False
+ConfigFlags.lock()
+
+# Function tests
+accAlg = EventInfoOverlayCfg(ConfigFlags)
+# reset to prevent errors on deletion
+accAlg.__init__()
+
+# Construct our accumulator to run
+acc = MainServicesSerialCfg()
+acc.merge(PoolReadCfg(ConfigFlags))
+
+# Add event info overlay
+acc.merge(EventInfoOverlayCfg(ConfigFlags))
+
+# Add configuration to write HITS pool file
+outConfig = OutputStreamCfg(ConfigFlags, "RDO")
+acc.merge(outConfig)
+
+# Dump config
+acc.getService("StoreGateSvc").Dump = True
+acc.printConfig(withDetails=True)
+ConfigFlags.dump()
+
+# Execute and finish
+sc = acc.run(maxEvents=3)
+
+# Success should be 0
+sys.exit(not sc.isSuccess())
-- 
GitLab


From 8d197badc3524ecdef7a0704587c08a3b33c6fec Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Mon, 29 Apr 2019 15:33:53 +0200
Subject: [PATCH 004/129] better diagnostics of monitoring

---
 .../TrigSteerMonitor/src/DecisionCollectorTool.cxx               | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx
index a3d5eb66447f..50a87528dc1d 100644
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx
@@ -30,6 +30,7 @@ StatusCode DecisionCollectorTool::getDecisions( std::vector<TrigCompositeUtils::
 		       TrigCompositeUtils::decisionIDs( d ).begin(),
 		       TrigCompositeUtils::decisionIDs( d ).end() );
       }
+      ATH_MSG_DEBUG("Collected from decision container " << decisionKey.key() <<  " objects " <<handle.cptr()->size()  << " accumulated decisions " << output.size() );
     }
   }
   return StatusCode::SUCCESS;
-- 
GitLab


From c19e3a6ae426fa6747bf55709e58fc0eaf28bb28 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Mon, 29 Apr 2019 16:05:08 +0200
Subject: [PATCH 005/129] Migrate METCaloRegionsTool to CaloNoise CDO

---
 .../METReconstruction/METCaloRegionsTool.h    | 13 +++++++----
 .../Root/METCaloRegionsTool.cxx               | 22 +++++--------------
 2 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/METCaloRegionsTool.h b/Reconstruction/MET/METReconstruction/METReconstruction/METCaloRegionsTool.h
index 6a56f3a14f2f..e2d3f8af1246 100644
--- a/Reconstruction/MET/METReconstruction/METReconstruction/METCaloRegionsTool.h
+++ b/Reconstruction/MET/METReconstruction/METReconstruction/METCaloRegionsTool.h
@@ -36,10 +36,16 @@
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODCaloEvent/CaloClusterFwd.h"
 
-class ICaloNoiseTool;
-
 class CaloCellContainer;
 
+// MET EDM
+#if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
+#else
+#include "CaloConditions/CaloNoise.h"
+#endif
+
+
+
 namespace met{
 
   class METCaloRegionsTool
@@ -120,8 +126,7 @@ namespace met{
     // Tool handle for CaloNoiseTool
     #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
     #else
-    // FIXME: mutable
-    mutable ToolHandle<ICaloNoiseTool> m_caloNoiseTool;
+    SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
     #endif
   }; 
 
diff --git a/Reconstruction/MET/METReconstruction/Root/METCaloRegionsTool.cxx b/Reconstruction/MET/METReconstruction/Root/METCaloRegionsTool.cxx
index c9428cb7af76..5f2a420521ba 100644
--- a/Reconstruction/MET/METReconstruction/Root/METCaloRegionsTool.cxx
+++ b/Reconstruction/MET/METReconstruction/Root/METCaloRegionsTool.cxx
@@ -19,7 +19,7 @@
 #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
 #else
 #include "CaloEvent/CaloCellContainer.h"
-#include "CaloInterface/ICaloNoiseTool.h"
+#include "CaloConditions/CaloNoise.h"
 #endif
 
 namespace met {
@@ -54,18 +54,10 @@ namespace met {
   ////////////////
   METCaloRegionsTool::METCaloRegionsTool(const std::string& name) : 
     AsgTool(name)
-    #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
-    #else
-    ,m_caloNoiseTool("CaloNoiseToolDefault")
-    #endif
   {
     declareProperty( "InputCollection", m_input_data_key            );
     declareProperty( "UseCells"       , m_calo_useCells      = true );
     declareProperty( "DoTriggerMET"   , m_calo_doTriggerMet  = true );
-    #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
-    #else
-    declareProperty( "CaloNoiseTool"  , m_caloNoiseTool             );
-    #endif
   }
 
   // Destructor
@@ -82,13 +74,7 @@ namespace met {
     StatusCode sc = StatusCode::SUCCESS;
     #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
     #else
-    sc = m_caloNoiseTool.retrieve();
-    if(sc.isFailure()) {
-      ATH_MSG_WARNING("Unable to find tool for CaloNoiseTool");
-    }
-    else {
-      ATH_MSG_INFO("CaloNoiseTool retrieved");
-    }
+    ATH_CHECK( m_noiseCDOKey.initialize() );
     #endif
 
     return sc;
@@ -249,6 +235,8 @@ namespace met {
     #if defined (XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
     ATH_MSG_WARNING("Cell information is only available in athena framework");
     #else
+    SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+    const CaloNoise* noiseCDO=*noiseHdl;
     // Loop over all cells
     for( CaloCellContainer::const_iterator iCell=caloCellContainer->begin();
        iCell!=caloCellContainer->end(); ++iCell ) {
@@ -278,7 +266,7 @@ namespace met {
         #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
         double noise_cell = 0;
         #else
-        double noise_cell = m_caloNoiseTool->totalNoiseRMS((*iCell));
+        double noise_cell = noiseCDO->getNoise((*iCell)->ID(),(*iCell)->gain());
         #endif
         // All cells
         metContainer->at(REGIONS_TOTAL)->add(et_cell*cos(phi_cell),
-- 
GitLab


From 53ac219e495da8b9360ba7990397f23b4bca8b43 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 30 Apr 2019 10:14:45 +0200
Subject: [PATCH 006/129] migrate MuidCaloEnergyMeas and MuonCaloEnergyTool to
 CaloNoise CDO

---
 .../MuidCaloEnergyTools/MuidCaloEnergyMeas.h  |   6 +-
 .../src/MuidCaloEnergyMeas.cxx                | 163 +++++++-----------
 .../python/MuonCombinedFitTools.py            |   7 -
 .../TrackToCalo/src/MuonCaloEnergyTool.cxx    |  14 +-
 .../TrackToCalo/src/MuonCaloEnergyTool.h      |   7 +-
 5 files changed, 75 insertions(+), 122 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/MuidCaloEnergyTools/MuidCaloEnergyMeas.h b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/MuidCaloEnergyTools/MuidCaloEnergyMeas.h
index e9058f2b9373..14e42da91808 100755
--- a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/MuidCaloEnergyTools/MuidCaloEnergyMeas.h
+++ b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/MuidCaloEnergyTools/MuidCaloEnergyMeas.h
@@ -23,11 +23,11 @@
 #include "MuidInterfaces/IMuidCaloEnergyMeas.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "CaloEvent/CaloCellContainer.h"
+#include "CaloConditions/CaloNoise.h"
 
 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
 
 class CaloCellContainer;
-class ICaloNoiseTool;
 class Identifier;
 class LArEM_ID;
 class LArHEC_ID;
@@ -90,8 +90,7 @@ private:
 						     double phi) const;
     
     // helpers, managers, tools
-    // FIXME: mutable
-    mutable ToolHandle<ICaloNoiseTool>		m_caloNoiseTool;
+    SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
     ToolHandle<IMuidCaloEnergyParam>		m_caloParamTool;
 
     const TileID*				m_tileID;
@@ -108,7 +107,6 @@ private:
 
     double			m_sigmasAboveNoise;	// The minimum sigmas above the noise tool rms
     double			m_sigmasAboveNoiseCore;	// The minimum sigmas above the noise tool rms
-    bool			m_useCaloNoiseTool;	// use the CaloNoiseTool?  
 
     mutable int			m_totalCoreCellsEM;
     mutable int			m_totalCoreCellsHEC;
diff --git a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyMeas.cxx b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyMeas.cxx
index 5999e74c0470..d720be7c0894 100755
--- a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyMeas.cxx
+++ b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyMeas.cxx
@@ -20,7 +20,6 @@
 #include "CaloIdentifier/LArEM_ID.h"
 #include "CaloIdentifier/LArHEC_ID.h"
 #include "CaloIdentifier/CaloID.h"
-#include "CaloInterface/ICaloNoiseTool.h"
 #include "CaloUtils/CaloCellList.h"
 #include "MuidCaloEnergyTools/MuidCaloEnergyMeas.h"
 #include "MuidEvent/CaloMeas.h"
@@ -38,14 +37,12 @@ MuidCaloEnergyMeas::MuidCaloEnergyMeas (const std::string&	type,
 					const std::string&	name,
 					const IInterface*	parent)
     :	AthAlgTool		(type, name, parent),
-	m_caloNoiseTool		(""),
 	m_caloParamTool		(""),
 	m_tileID                (0),
 	m_emID                  (0),
 	m_hecID                 (0),
 	m_sigmasAboveNoise	(4.),
 	m_sigmasAboveNoiseCore	(1.5),
-	m_useCaloNoiseTool	(true),
 	m_totalCoreCellsEM	(0),
 	m_totalCoreCellsHEC	(0),
 	m_totalCoreCellsTile	(0),
@@ -54,11 +51,9 @@ MuidCaloEnergyMeas::MuidCaloEnergyMeas (const std::string&	type,
 	m_totalSelectedTile	(0)
 {
     declareInterface<IMuidCaloEnergyMeas>(this);
-    declareProperty ("CaloNoiseTool",		m_caloNoiseTool);
     declareProperty ("CaloParamTool",		m_caloParamTool);
     declareProperty ("NoiseThresInSigmas",	m_sigmasAboveNoise);
     declareProperty ("NoiseThresInSigmasCore",	m_sigmasAboveNoiseCore);
-    declareProperty ("UseCaloNoiseTool",	m_useCaloNoiseTool);
 
     m_measurementConeTile	= 0.15;
     m_measurementConeLArHEC	= 0.15;
@@ -104,35 +99,8 @@ MuidCaloEnergyMeas::initialize()
     }
     ATH_MSG_VERBOSE( "Accessed LArHEC helper" );
 
-    // get the Tools
-    if (m_caloNoiseTool.empty() || ! m_useCaloNoiseTool)
-    {
-	ATH_MSG_FATAL( " caloNoiseTool is now obligatory" );
-	return StatusCode::FAILURE;
-    }
-    else
-    {
-	if (m_caloNoiseTool.retrieve().isFailure())
-	{
-	    ATH_MSG_FATAL( "Failed to retrieve tool " << m_caloNoiseTool );
-	    return StatusCode::FAILURE;
-	}
-	else
-	{
-	    ATH_MSG_INFO( "Retrieved tool " << m_caloNoiseTool );
-	}
-    }
-
-    if (m_caloParamTool.retrieve().isFailure())
-    {
-	ATH_MSG_FATAL( "Failed to retrieve tool " << m_caloParamTool );
-        return StatusCode::FAILURE;
-    }
-    else
-    {
-	ATH_MSG_INFO( "Retrieved tool " << m_caloParamTool );
-    }
 
+    ATH_CHECK(m_noiseCDOKey.initialize());
     ATH_CHECK(m_cellContainerLocation.initialize());
 
     return StatusCode::SUCCESS;
@@ -222,24 +190,22 @@ MuidCaloEnergyMeas::cellCounting(const CaloCellContainer* cellContainer,
 				 double mu_phi) const
 {
     //int isubcalo = 2;
-    double lowest_threshold = 4 * 50.;
+    constexpr double lowest_threshold = 4 * 50.;
+    
+    SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+    const CaloNoise* noiseCDO=*noiseHdl;
 
     CaloCell_ID::SUBCALO iCalo = CaloCell_ID::LAREM;
-    CaloCellList* myList = 0; 
-    myList = new CaloCellList(cellContainer,iCalo);  // Construct the list  
-    myList->select(mu_eta,mu_phi,0.2,0.2);
+    CaloCellList myList(cellContainer,iCalo);  // Construct the list  
+    myList.select(mu_eta,mu_phi,0.2,0.2);
 
-    CaloCellList::list_iterator ilistfirst = myList->begin();
-    CaloCellList::list_iterator ilistlast  = myList->end();
-  
-    int ncells		= myList->ncells();
     int count		= 0;
-    double noise_rms	= 0.;
-
+    CaloCellList::list_iterator ilistfirst = myList.begin();
+    CaloCellList::list_iterator ilistlast  = myList.end();
     for(;ilistfirst!=ilistlast;ilistfirst++)
     {
-	double cellEnergy= (*ilistfirst)->energy();
-	noise_rms = m_caloNoiseTool->totalNoiseRMS(*ilistfirst);
+	const double cellEnergy= (*ilistfirst)->energy();
+	const double noise_rms =noiseCDO->getNoise((*ilistfirst)->ID(),(*ilistfirst)->gain()); 
 
 	if( cellEnergy > lowest_threshold && cellEnergy > noise_rms * m_sigmasAboveNoise )
 	{
@@ -248,8 +214,7 @@ MuidCaloEnergyMeas::cellCounting(const CaloCellContainer* cellContainer,
     }
 
     ATH_MSG_DEBUG( " counted "<< count
-		   << " cells over threshold out of a total of " << ncells << " cells" );
-    delete myList;
+		   << " cells over threshold out of a total of " << myList.ncells() << " cells" );
 
     return count;
 }
@@ -284,7 +249,10 @@ MuidCaloEnergyMeas::energyInCalo (CaloMeas&			caloMeas,
        3 --> Sampling 3
        leadingEnergy is contribution from presampler and first compartment
        -------------------------------------------*/	    
- 		
+
+    SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+    const CaloNoise* noiseCDO=*noiseHdl;
+
     double totalEnergy		= 0.;
     double leadingEnergy	= 0.;
     CaloCellList* myList 	= 0;
@@ -376,7 +344,7 @@ MuidCaloEnergyMeas::energyInCalo (CaloMeas&			caloMeas,
 		    if (sampling != coreSampling) continue;
 		    			
 		    double cellEnergy	= (**cell2).energy();
-		    double noiseRms	= m_caloNoiseTool->totalNoiseRMS(*cell2);
+		    double noiseRms	= noiseCDO->getNoise((**cell2).ID(),(**cell2).gain());
 
 		    // looser selection for core cell where at least mip is expected
 		    bool cellSelected	= cellEnergy > m_sigmasAboveNoise * noiseRms;
@@ -556,6 +524,9 @@ MuidCaloEnergyMeas::isolationEnergy (CaloMeas&			caloMeas,
     double totalEnergy		= 0.;
     CaloCellList* myList 	= 0;
 
+     SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+     const CaloNoise* noiseCDO=*noiseHdl;
+
     if (isubcalo == 0)
     {
 	CaloCell_ID::SUBCALO iCalo = CaloCell_ID::TILE;
@@ -638,8 +609,7 @@ MuidCaloEnergyMeas::isolationEnergy (CaloMeas&			caloMeas,
 		    if (sampling != coreSampling) continue;
 		    			
 		    double cellEnergy	= (**cell2).energy();
-		    double noiseRms	= m_caloNoiseTool->totalNoiseRMS(*cell2);
-
+		    double noiseRms	= noiseCDO->getNoise((**cell2).ID(),(**cell2).gain());
 		    // looser selection for core cell where at least mip is expected
 		    bool cellSelected	= cellEnergy > m_sigmasAboveNoise * noiseRms;
 		    if (*cell2 == coreCell
@@ -683,41 +653,37 @@ MuidCaloEnergyMeas::energyInTile(const CaloCellContainer* cellContainer,
     // 	     3 --> ITC
   
     //int i,j,k;
+
+    SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+    const CaloNoise* noiseCDO=*noiseHdl;
+
     double tileTotalEnergy=0.;
     double tileTestEnergy=0.;	
-	      
-    CaloCellList* myList = 0; 
-    CaloCell_ID::SUBCALO iCalo = CaloCell_ID::TILE;
-    myList = new CaloCellList(cellContainer,iCalo);  // Construct the list  
 
+    CaloCell_ID::SUBCALO iCalo = CaloCell_ID::TILE;	      
+    CaloCellList myList(cellContainer,iCalo);  // Construct the list   
     if(cone == 1)
     {
-	myList->select(mu_eta,mu_phi,0.15,0.15);
+	myList.select(mu_eta,mu_phi,0.15,0.15);
     }
     else if(cone == 2)
     {
-	myList->select(mu_eta,mu_phi,0.3,0.3); 
+	myList.select(mu_eta,mu_phi,0.3,0.3); 
     }
     else
     {
-	myList->select(mu_eta,mu_phi,0.,0.);
+	myList.select(mu_eta,mu_phi,0.,0.);
     }
   
-    CaloCellList::list_iterator ilistfirst = myList->begin();
-    CaloCellList::list_iterator ilistlast  = myList->end();
+    CaloCellList::list_iterator ilistfirst = myList.begin();
+    CaloCellList::list_iterator ilistlast  = myList.end();
   
     int count=0;
-    double noise_rms=0.;
     double lowest_threshold=0.; 
     for(;ilistfirst!=ilistlast;ilistfirst++)
     {
 	double cellEnergy= (*ilistfirst)->energy();
-
-	//double noise_rms=0.;
-	if (m_useCaloNoiseTool)
-	{
-	    noise_rms	= m_caloNoiseTool->totalNoiseRMS(*ilistfirst);
-	}
+	double noise_rms=noiseCDO->getNoise((*ilistfirst)->ID(),(*ilistfirst)->gain()); 
 
 	if( cellEnergy > lowest_threshold && cellEnergy > noise_rms * m_sigmasAboveNoise
 	    && m_tileID->sample((*ilistfirst)->ID()) == sample)
@@ -740,7 +706,6 @@ MuidCaloEnergyMeas::energyInTile(const CaloCellContainer* cellContainer,
     }
     
     ATH_MSG_DEBUG( " counted " << count << " test energy " << tileTestEnergy );
-    delete myList ; // deleting the list
 
     return tileTotalEnergy;
 }
@@ -762,40 +727,37 @@ MuidCaloEnergyMeas::energyInLArHEC(const CaloCellContainer* cellContainer,
     */
 
     //int i,j,k;
+
+    SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+    const CaloNoise* noiseCDO=*noiseHdl;
     double larhecTotal=0.;
   
-    CaloCellList* myList = 0; 
     CaloCell_ID::SUBCALO iCalo = CaloCell_ID::LARHEC;
-    myList = new CaloCellList(cellContainer,iCalo);  // Construct the list  
+    CaloCellList myList(cellContainer,iCalo);  // Construct the list  
     if(cone == 1)
     {
-	myList->select(mu_eta,mu_phi,0.15,0.15);
+	myList.select(mu_eta,mu_phi,0.15,0.15);
     }
     else if(cone == 2)
     {
-	myList->select(mu_eta,mu_phi,0.3,0.3); 
+	myList.select(mu_eta,mu_phi,0.3,0.3); 
     }
     else
     {
-	myList->select(mu_eta,mu_phi,0.,0.);
+	myList.select(mu_eta,mu_phi,0.,0.);
     }
   
-    CaloCellList::list_iterator ilistfirst = myList->begin();
-    CaloCellList::list_iterator ilistlast  = myList->end();
+    CaloCellList::list_iterator ilistfirst = myList.begin();
+    CaloCellList::list_iterator ilistlast  = myList.end();
 
     //std::vector<const CaloCell*> new_cell_list;
     int count=0;
-    double lowest_threshold = 4.*150.;
+    constexpr double lowest_threshold = 4.*150.;
 
     for(;ilistfirst!=ilistlast;ilistfirst++)
     {
 	double cellEnergy= (*ilistfirst)->energy();
-	double noise_rms=0.;
-	if (m_useCaloNoiseTool)
-	{
-	    noise_rms	= m_caloNoiseTool->totalNoiseRMS(*ilistfirst);
-	}
-
+	const double noise_rms =noiseCDO->getNoise((*ilistfirst)->ID(),(*ilistfirst)->gain()); 
 	if (cellEnergy > lowest_threshold
 	    && cellEnergy > noise_rms * m_sigmasAboveNoise
 	    && m_hecID->sampling((*ilistfirst)->ID()) == sample)
@@ -808,14 +770,13 @@ MuidCaloEnergyMeas::energyInLArHEC(const CaloCellContainer* cellContainer,
 			   << "  z  :"		<< (*ilistfirst)->caloDDE()->z()
 			   << "  Eta : "	<< (*ilistfirst)->eta()
 			   << "  Phi : "	<< (*ilistfirst)->phi()	
-			   << " Noise Level : "	<< m_caloNoiseTool->totalNoiseRMS(*ilistfirst));
+			   << " Noise Level : "	<< noise_rms);
 	    
 	    larhecTotal += (*ilistfirst)->energy();
 	}
     }
     
     ATH_MSG_DEBUG( "larhec  counted " << count );
-    delete myList ; // deleting the list
    
     return larhecTotal;
 }
@@ -838,27 +799,30 @@ MuidCaloEnergyMeas::energyInLArEM(const CaloCellContainer* cellContainer,
     */
 
     //int i,j,k;
+
+    SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey};
+    const CaloNoise* noiseCDO=*noiseHdl;
+
     double emTotalEnergy=0.;
-      
-    CaloCellList* myList = 0; 
-    CaloCell_ID::SUBCALO iCalo = CaloCell_ID::LAREM;
-    myList = new CaloCellList(cellContainer,iCalo);  // Construct the list  
+
+    CaloCell_ID::SUBCALO iCalo = CaloCell_ID::LAREM;      
+    CaloCellList myList(cellContainer,iCalo);  // Construct the list  
     if(cone == 1)
     {
-	myList->select(mu_eta,mu_phi,0.075,0.075); // 0.1 0.1
+	myList.select(mu_eta,mu_phi,0.075,0.075); // 0.1 0.1
     }
     else if(cone == 2)
     {
-	myList->select(mu_eta,mu_phi,0.15,0.15); 
+	myList.select(mu_eta,mu_phi,0.15,0.15); 
     }
     else
     {
-	myList->select(mu_eta,mu_phi,0.,0.);
+	myList.select(mu_eta,mu_phi,0.,0.);
     }
-    CaloCellList::list_iterator ilistfirst = myList->begin();
-    CaloCellList::list_iterator ilistlast  = myList->end();
+    CaloCellList::list_iterator ilistfirst = myList.begin();
+    CaloCellList::list_iterator ilistlast  = myList.end();
   
-    std::vector<const CaloCell*> new_cell_list;
+    //std::vector<const CaloCell*> new_cell_list;
     int count=0;
 
     double lowest_threshold = 4.* 50.;
@@ -866,17 +830,13 @@ MuidCaloEnergyMeas::energyInLArEM(const CaloCellContainer* cellContainer,
     for(;ilistfirst!=ilistlast;ilistfirst++)
     {
 	double cellEnergy= (*ilistfirst)->energy();
-	double noise_rms=0.;
-	if (m_useCaloNoiseTool)
-	{
-	    noise_rms	= m_caloNoiseTool->totalNoiseRMS(*ilistfirst);
-	}
+	const double noise_rms =noiseCDO->getNoise((*ilistfirst)->ID(),(*ilistfirst)->gain()); 
 
 	if( cellEnergy > lowest_threshold && cellEnergy > noise_rms * m_sigmasAboveNoise
 	    && m_emID->sampling((*ilistfirst)->ID()) == sample)
 	{
 	    count+=1;
-	    new_cell_list.push_back(*ilistfirst);
+	    //new_cell_list.push_back(*ilistfirst);
 
 	    ATH_MSG_DEBUG( "Energy : "		<< (*ilistfirst)->energy() 
 			   << "  Sampling: "	<< m_emID->sampling((*ilistfirst)->ID())
@@ -884,14 +844,13 @@ MuidCaloEnergyMeas::energyInLArEM(const CaloCellContainer* cellContainer,
 			   << "  z :"		<< (*ilistfirst)->caloDDE()->z()
 			   << "  Eta : "	<< (*ilistfirst)->eta()
 			   << "  Phi : "	<< (*ilistfirst)->phi()
-			   << " Noise Level : "	<< m_caloNoiseTool->totalNoiseRMS(*ilistfirst));
+			   << " Noise Level : "	<< noise_rms);
 	  
 	    emTotalEnergy+=(*ilistfirst)->energy();
 	}
     }
 
     ATH_MSG_DEBUG( "larem counted " << count );
-    delete myList ; // deleting the list
   
     return emTotalEnergy;
 }
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
index 79863eff8b0d..538427960d6a 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
@@ -101,15 +101,8 @@ def MuidCaloEnergyMeas( name='MuidCaloEnergyMeas', **kwargs ):
     kwargs.setdefault("CaloParamTool", getPublicTool("MuidCaloEnergyParam") )
 
     if DetFlags.haveRIO.Calo_on():
-        from AthenaCommon.AppMgr    import ToolSvc
-        import CaloTools.CaloNoiseToolDefault as cntd
-        ToolSvc += cntd.CaloNoiseToolDefault()
-        kwargs.setdefault("CaloNoiseTool", ToolSvc.CaloNoiseToolDefault )
         kwargs.setdefault("CellContainerLocation" , "AllCalo" )
         kwargs.setdefault("NoiseThresInSigmas"    , 4. )
-    else:
-        kwargs.setdefault("CaloNoiseTool", '' )
-        kwargs.setdefault("UseCaloNoiseTool", False )
     return CfgMgr.Rec__MuidCaloEnergyMeas(name,**kwargs)
            
 def MuidCaloEnergyTool( name='MuidCaloEnergyTool', **kwargs ):
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx b/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx
index f2a6d0342a69..06d75c0f9876 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx
+++ b/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx
@@ -28,7 +28,6 @@ namespace Rec {
     m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this),
     m_caloCellAssociationTool("Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool", this),
     m_particleCreator("Trk::TrackParticleCreatorTool/MuonCaloParticleCreator"),
-    m_caloNoiseTool("CaloNoiseToolDefault"),
     m_sigmasAboveNoise(4.),
     m_emEtCut(2.5*Gaudi::Units::GeV),
     m_emF1Cut(0.15),
@@ -40,7 +39,6 @@ namespace Rec {
     declareProperty("ParticleCaloExtensionTool",      m_caloExtensionTool );
     declareProperty("ParticleCaloCellAssociationTool",m_caloCellAssociationTool );
     declareProperty("TrackParticleCreator",           m_particleCreator );
-    declareProperty("CaloNoiseTool",                  m_caloNoiseTool);
 
     //coneSize for including calo cells around track
     declareProperty("SigmasAboveNoise", m_sigmasAboveNoise = 4.);
@@ -56,8 +54,8 @@ namespace Rec {
     ATH_CHECK(m_caloExtensionTool.retrieve());
     ATH_CHECK(m_caloCellAssociationTool.retrieve());
     ATH_CHECK(m_particleCreator.retrieve());
-    ATH_CHECK(m_caloNoiseTool.retrieve());
 
+    ATH_CHECK(m_caloNoiseCDOKey.initialize());
     ATH_CHECK(m_indetTrackParticleLocation.initialize());
     ATH_CHECK(m_muonTrackParticleLocation.initialize());
 
@@ -275,6 +273,11 @@ namespace Rec {
 
     // measured and expected energies 
 
+    //Get Calo-Noise CDO:
+    SG::ReadCondHandle<CaloNoise> caloNoiseHdl{m_caloNoiseCDOKey};
+    const CaloNoise* caloNoise=*caloNoiseHdl;
+
+
     double E_em1  = 0.;
     double E_em   = 0.;
     double E_em_expected = 0.;
@@ -320,9 +323,8 @@ namespace Rec {
 
 //      if(f_exp<0.1) f_exp = 0.1;
 
-//    cellnoisedb = m_caloNoiseTool->getNoise(cell,ICalorimeterNoiseTool::ELECTRONICNOISE);
-      double sigma_Noise = m_caloNoiseTool->getEffectiveSigma(curr_cell,ICalorimeterNoiseTool::MAXSYMMETRYHANDLING,ICalorimeterNoiseTool::ELECTRONICNOISE);
-//      double sigma_NoiseA  = m_caloNoiseTool->totalNoiseRMS(curr_cell);
+      double sigma_Noise = caloNoise->getEffectiveSigma(id,curr_cell->gain(),cellEn);
+
       double thetaCell = atan2(sqrt(curr_cell->x()*curr_cell->x()+curr_cell->y()*curr_cell->y()),curr_cell->z());
       double phiCell = atan2(curr_cell->y(),curr_cell->x());
 
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.h b/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.h
index 61fb54704616..b8068c1ec5c6 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.h
+++ b/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.h
@@ -20,15 +20,15 @@ authors : Niels van Eldik (CERN PH-ATC)
 
 #include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
 #include "RecoToolInterfaces/IParticleCaloCellAssociationTool.h"
-#include "CaloInterface/ICaloNoiseTool.h"
+
 
 #include "TrkToolInterfaces/ITrackParticleCreatorTool.h"
 
 #include "PathLengthUtils.h"
 
 #include "StoreGate/ReadHandleKey.h"
+#include "CaloConditions/CaloNoise.h"
 
-class ICaloNoiseTool;
 
 namespace Rec {
   class IParticleCaloCellAssociationTool;
@@ -67,7 +67,8 @@ namespace Rec {
     ToolHandle< Trk::ITrackParticleCreatorTool >       m_particleCreator;     /**< The CB Particle Creator Tool */
     
     // FIXME: mutable
-    mutable ToolHandle <ICaloNoiseTool>  m_caloNoiseTool; //!< Tool to quantify electronic noise in calorimeter
+    SG::ReadCondHandleKey<CaloNoise> m_caloNoiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
+
 
     // DATA MEMBERS
     double m_sigmasAboveNoise; // 4.
-- 
GitLab


From 05716c2a732cf277c52cbfb1ea5d39115fc5f519 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 30 Apr 2019 10:15:29 +0200
Subject: [PATCH 007/129] TrigCaloMonitoringConfig: Fix config bug, CaloNoise
 tool no longer configured upstream

---
 .../TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py      | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py
index eeb80428536a..a13e202c0a5d 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitoringConfig.py
@@ -54,6 +54,9 @@ def HLTCaloMonitoringTool():
                          roifcalhadcellcontmaker,
                          RoITileCellContMaker()]
     HLTCaloFEB.sigma = 3
+
+    HLTCaloFEB.NoiseTool=theCaloNoiseTool
+
 #
     # Add Region Selector if there is none
     from AthenaCommon.AppMgr import ServiceMgr
-- 
GitLab


From f5a4a33bc1446d285c9255cf9e9b654ad1735428 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 30 Apr 2019 10:56:05 +0200
Subject: [PATCH 008/129] AthenaMonitoring: Add check for supported online
 histogram types

For online running not all histogram types are currently supported due
to restrictions in OH. Add a check in Python and also skip empty
histogram definitions in C++.
---
 Control/AthenaMonitoring/python/GenericMonitoringTool.py | 5 +++++
 Control/AthenaMonitoring/src/GenericMonitoringTool.cxx   | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Control/AthenaMonitoring/python/GenericMonitoringTool.py b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
index e453becd62ef..cab4d02d7575 100644
--- a/Control/AthenaMonitoring/python/GenericMonitoringTool.py
+++ b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
@@ -3,6 +3,7 @@
 #
 
 from AthenaCommon.Logging import logging
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 from AthenaMonitoring.AthenaMonitoringConf import GenericMonitoringTool as _GenericMonitoringTool
 
 log = logging.getLogger(__name__)
@@ -37,6 +38,10 @@ def defineHistogram(varname, type='TH1F', path=None,
     if title is None:
         title = varname
 
+    if athenaCommonFlags.isOnline() and type in ['TEfficiency']:
+        log.warning('Histogram %s of type %s is not supported for online running and will not be added', varname, type)
+        return ""
+
     coded = "%s, %s, %s, %s, %d, %f, %f" % (path, type, varname, title, xbins, xmin, xmax)
     if ybins is not None:
         coded += ", %d, %f, %f" % (ybins, ymin, ymax)
diff --git a/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
index 6b80c4d38ca2..1d1b48a23b74 100644
--- a/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
+++ b/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
@@ -53,6 +53,10 @@ StatusCode GenericMonitoringTool::book() {
 
   m_fillers.reserve(m_histograms.size());
   for (const std::string& item : m_histograms) {
+    if (item.empty()) {
+      ATH_MSG_DEBUG( "Skipping empty histogram definition" );
+      continue;
+    }
     ATH_MSG_DEBUG( "Configuring monitoring for: " << item );
     HistogramDef def = HistogramDef::parse(item);
 
@@ -113,4 +117,4 @@ std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogra
 
 uint32_t GenericMonitoringTool::lumiBlock() {
   return Gaudi::Hive::currentContext().eventID().lumi_block();
-}
\ No newline at end of file
+}
-- 
GitLab


From bfd40bf0d928ff2e8d18cb24ad67d19a8ed6582c Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Mon, 29 Apr 2019 10:33:43 +0200
Subject: [PATCH 009/129] Cleanup overlay ART configuration and add MT tests

---
 .../Tests/OverlayTests}/CMakeLists.txt        |  7 ++---
 .../Tests/OverlayTests}/test/test_BSFilter.sh |  2 --
 .../test/test_DataOverlay_MC16_Zmumu.sh       |  2 --
 .../test_MCOverlay_MC16_singlemu_notrig.sh    |  7 ++---
 .../test/test_MCOverlay_MC16_ttbar_L1Calo.sh  |  7 ++---
 .../test_MCOverlay_MC16_ttbar_fullchain.sh    | 26 ++++++++++++++++++
 .../test/test_MCOverlay_MT_ttbar_1thread.sh   | 23 +++++-----------
 .../test/test_MCOverlay_MT_ttbar_4threads.sh  | 24 +++++++++++++++++
 .../test_MCOverlay_MT_ttbar_sequential.sh     | 27 +++++++++++++++++++
 9 files changed, 89 insertions(+), 36 deletions(-)
 rename {Event/EventOverlay/OverlayMonitoringRTT => Simulation/Tests/OverlayTests}/CMakeLists.txt (66%)
 rename {Event/EventOverlay/OverlayMonitoringRTT => Simulation/Tests/OverlayTests}/test/test_BSFilter.sh (94%)
 rename Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh => Simulation/Tests/OverlayTests/test/test_DataOverlay_MC16_Zmumu.sh (97%)
 rename Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh => Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_singlemu_notrig.sh (89%)
 rename Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar_L1Calo.sh => Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_L1Calo.sh (82%)
 create mode 100755 Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_fullchain.sh
 rename Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh => Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_1thread.sh (50%)
 create mode 100755 Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_4threads.sh
 create mode 100755 Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_sequential.sh

diff --git a/Event/EventOverlay/OverlayMonitoringRTT/CMakeLists.txt b/Simulation/Tests/OverlayTests/CMakeLists.txt
similarity index 66%
rename from Event/EventOverlay/OverlayMonitoringRTT/CMakeLists.txt
rename to Simulation/Tests/OverlayTests/CMakeLists.txt
index 45f2888d617a..a7119fb7bb06 100644
--- a/Event/EventOverlay/OverlayMonitoringRTT/CMakeLists.txt
+++ b/Simulation/Tests/OverlayTests/CMakeLists.txt
@@ -1,13 +1,10 @@
 ################################################################################
-# Package: OverlayMonitoringRTT
+# Package: OverlayTests
 ################################################################################
 
 # Declare the package name:
-atlas_subdir( OverlayMonitoringRTT )
+atlas_subdir( OverlayTests )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PRIVATE
                           TestPolicy )
-
-# Install files from the package:
-atlas_install_headers( OverlayMonitoringRTT )
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh b/Simulation/Tests/OverlayTests/test/test_BSFilter.sh
similarity index 94%
rename from Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
rename to Simulation/Tests/OverlayTests/test/test_BSFilter.sh
index 657894e6f323..c7117d1af35f 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
+++ b/Simulation/Tests/OverlayTests/test/test_BSFilter.sh
@@ -2,8 +2,6 @@
 
 # art-description: BSOverlayFilter_tf legacy test
 # art-type: grid
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
 # art-include: master/Athena
 
 # art-output: trigs_tar.txt
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_MC16_Zmumu.sh
similarity index 97%
rename from Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
rename to Simulation/Tests/OverlayTests/test/test_DataOverlay_MC16_Zmumu.sh
index 591f5cf5b442..06837679eb3c 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_MC16_Zmumu.sh
@@ -2,8 +2,6 @@
 
 # art-description: OverlayChain+Reco test for data16.
 # art-type: grid
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
 # art-include: master/Athena
 
 # art-output: *.root
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_singlemu_notrig.sh
similarity index 89%
rename from Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh
rename to Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_singlemu_notrig.sh
index 536db5cc079a..6fa888d96401 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_singlemu_notrig.sh
@@ -1,9 +1,7 @@
 #!/bin/sh
 
-# art-description: MC+MC Overlay for MC16, single mu, no trigger
+# art-description: MC+MC Overlay with reco for MC16, single mu, no trigger
 # art-type: grid
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
 # art-include: master/Athena
 
 # art-output: *.root
@@ -14,13 +12,12 @@
 
 OverlayPool_tf.py \
 --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.424000.ParticleGun_single_mu_Pt100.simul.HITS.e3580_s3126/HITS.11330296._000376.pool.root.1 \
---inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/RDO.merged-pileup.100events.pool.root \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v1/RDO.merged-pileup.100events.pool.root \
 --outputRDOFile MC_plus_MC.RDO.pool.root \
 --maxEvents 20 --skipEvents 10  --digiSeedOffset1 511 --digiSeedOffset2 727 \
 --conditionsTag OFLCOND-MC16-SDR-20 \
 --geometryVersion ATLAS-R2-2016-01-00-01 \
 --triggerConfig 'OverlayPool=NONE' \
---postExec 'ServiceMgr.TGCcablingServerSvc.forcedUse=True' \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
 --imf False
 echo "art-result: $? overlaypool"
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar_L1Calo.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_L1Calo.sh
similarity index 82%
rename from Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar_L1Calo.sh
rename to Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_L1Calo.sh
index 50dfc929fe52..56bcc7bd3a01 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar_L1Calo.sh
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_L1Calo.sh
@@ -1,9 +1,7 @@
 #!/bin/sh
 
-# art-description: MC+MC Overlay for MC16, ttbar, with L1Calo, no reco
+# art-description: MC+MC Overlay without reco for MC16, ttbar, with L1Calo
 # art-type: grid
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
 # art-include: master/Athena
 
 # art-output: *.root
@@ -14,12 +12,11 @@
 
 OverlayPool_tf.py \
 --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
---inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/RDO.merged-pileup.100events.pool.root \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v1/RDO.merged-pileup.100events.pool.root \
 --outputRDOFile MC_plus_MC.RDO.pool.root \
 --maxEvents 20 --skipEvents 10 --digiSeedOffset1 511 --digiSeedOffset2 727 \
 --conditionsTag OFLCOND-MC16-SDR-20 \
 --geometryVersion ATLAS-R2-2016-01-00-01 \
---postExec 'ServiceMgr.TGCcablingServerSvc.forcedUse=True' \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
 --imf False
 echo "art-result: $? overlaypool"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_fullchain.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_fullchain.sh
new file mode 100755
index 000000000000..228bd6a46c46
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MC16_ttbar_fullchain.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# art-description: MC+MC Overlay chain for MC16, ttbar, full reco chain
+# art-type: grid
+
+# art-output: *.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+
+Reco_tf.py \
+--AMIConfig r11326 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v1/RDO.merged-pileup.100events.pool.root \
+--outputRDOFile MC_plus_MC.RDO.pool.root \
+--outputESDFile MC_plus_MC.ESD.pool.root \
+--outputAODFile MC_plus_MC.AOD.pool.root \
+--maxEvents 10 --skipEvents 10 --digiSeedOffset1 511 --digiSeedOffset2 727 \
+--imf False
+echo "art-result: $? reco"
+
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $? regression"
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_1thread.sh
similarity index 50%
rename from Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh
rename to Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_1thread.sh
index 362042e0327a..e23a8a9dde0d 100755
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_1thread.sh
@@ -1,9 +1,8 @@
 #!/bin/sh
 
-# art-description: MC+MC Overlay for MC16, ttbar, no trigger
+# art-description: MC+MC Overlay with MT support, running with 1 thread
 # art-type: grid
-# art-include: 21.0/Athena
-# art-include: 21.3/Athena
+# art-athena-mt: 4
 # art-include: master/Athena
 
 # art-output: *.root
@@ -12,28 +11,18 @@
 # art-output: mem.full.*
 # art-output: runargs.*
 
-OverlayPool_tf.py \
+Overlay_tf.py \
+--athenaopts '--threads 1' \
 --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
---inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/RDO.merged-pileup.100events.pool.root \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v1/RDO.merged-pileup-MT.100events.pool.root \
 --outputRDOFile MC_plus_MC.RDO.pool.root \
---maxEvents 20 --skipEvents 10 --digiSeedOffset1 511 --digiSeedOffset2 727 \
+--maxEvents 50 --skipEvents 10 --digiSeedOffset1 511 --digiSeedOffset2 727 \
 --conditionsTag OFLCOND-MC16-SDR-20 \
 --geometryVersion ATLAS-R2-2016-01-00-01 \
---triggerConfig 'OverlayPool=NONE' \
---postExec 'ServiceMgr.TGCcablingServerSvc.forcedUse=True' \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
 --imf False
 echo "art-result: $? overlaypool"
 
-Reco_tf.py \
---inputRDOFile MC_plus_MC.RDO.pool.root \
---outputESDFile MC_plus_MC.ESD.pool.root \
---outputAODFile MC_plus_MC.AOD.pool.root \
---maxEvents -1 --skipEvents 0 --autoConfiguration everything \
---preExec 'rec.doTrigger=False;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);' 'RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False' \
---imf False
-echo "art-result: $? reco"
-
 ArtPackage=$1
 ArtJobName=$2
 art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_4threads.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_4threads.sh
new file mode 100755
index 000000000000..9c6bca35fcf1
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_4threads.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# art-description: MC+MC Overlay with MT support, running with 4 threads
+# art-type: grid
+# art-athena-mt: 4
+# art-include: master/Athena
+
+# art-output: *.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+
+Overlay_tf.py \
+--athenaopts '--threads 4' \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v1/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile MC_plus_MC.RDO.pool.root \
+--maxEvents 50 --skipEvents 10 --digiSeedOffset1 511 --digiSeedOffset2 727 \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--imf False
+echo "art-result: $? overlaypool"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_sequential.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_sequential.sh
new file mode 100755
index 000000000000..ae9a25352ea3
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_MT_ttbar_sequential.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# art-description: MC+MC 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/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v1/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile MC_plus_MC.RDO.pool.root \
+--maxEvents 50 --skipEvents 10 --digiSeedOffset1 511 --digiSeedOffset2 727 \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--imf False
+echo "art-result: $? overlaypool"
+
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $? regression"
-- 
GitLab


From 0b1e99e78534c893567fc15a161449c24cdf1add Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 30 Apr 2019 11:32:43 +0200
Subject: [PATCH 010/129] CaloNoiseAlg configuration: Fix for run 1 data

---
 Calorimeter/CaloTools/python/CaloNoiseCondAlg.py       | 8 +++++---
 Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py | 7 +++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py b/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py
index 3a4fc9a9ef7e..6812f6b0fe7b 100644
--- a/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py
+++ b/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py
@@ -99,11 +99,13 @@ def _CaloNoiseCondAlgData(noiseAlgName,noisetype):
                 pass
             pass
         else: #COMP200 case:
-            #The noise for runs before 2012 is a different folder:
+            #The noise for runs before 2012 is in different folders:
             theCaloNoiseAlg.CaloNoiseFolder="/CALO/Ofl/Noise/CellNoise"
-            theCaloNoiseAlg.LArNoiseFolder=""
-            theCaloNoiseAlg.TileNoiseFolder=""
+            theCaloNoiseAlg.LArNoiseFolder="/LAR/NoiseOfl/CellNoise"
+            theCaloNoiseAlg.TileNoiseFolder="/TILE/OFL02/NOISE/CELL"
             conddb.addFolder("CALO_OFL","/CALO/Ofl/Noise/CellNoise",className="CondAttrListCollection")
+            conddb.addFolder("LAR_OFL","/LAR/NoiseOfl/CellNoise",className="CondAttrListCollection")
+            conddb.addFolder("TILE_OFL","/TILE/OFL02/NOISE/CELL",className="CondAttrListCollection")
             
 
         # for luminosity
diff --git a/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py b/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
index dd03b4b850db..269ebc24ced6 100644
--- a/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
+++ b/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
@@ -117,9 +117,12 @@ def CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"):
             log.info("Configuring CaloNoiseCondAlg for Run1 real data processing")
             #The noise for runs before 2012 is a different folder:
             theCaloNoiseAlg.CaloNoiseFolder="/CALO/Ofl/Noise/CellNoise"
-            theCaloNoiseAlg.LArNoiseFolder=""
-            theCaloNoiseAlg.TileNoiseFolder=""
+            theCaloNoiseAlg.LArNoiseFolder="/LAR/NoiseOfl/CellNoise"
+            theCaloNoiseAlg.TileNoiseFolder="/TILE/OFL02/NOISE/CELL"
             result.merge(addFolders(configFlags,"/CALO/Ofl/Noise/CellNoise","CALO_OFL",className="CondAttrListCollection"))
+            result.merge(addFolders(configFlags,"LAR_OFL","/LAR/NoiseOfl/CellNoise",className="CondAttrListCollection"))
+            result.merge(addFolders(configFlags,"TILE_OFL","/TILE/OFL02/NOISE/CELL",className="CondAttrListCollection"))
+
             
         pass #end of real data case
     
-- 
GitLab


From 0f2485a1332d4f7f3c460e004218c63ece7c1be2 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Tue, 30 Apr 2019 13:05:54 +0200
Subject: [PATCH 011/129] verbose views

---
 Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
index 75bc12030ecb..ca26247be8df 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -272,6 +272,7 @@ if jobproperties.ConcurrencyFlags.NumThreads() > 0:
     AlgScheduler.CheckDependencies( True )
     AlgScheduler.ShowControlFlow( True )
     AlgScheduler.ShowDataDependencies( True )
+    AlgScheduler.EnableVerboseViews( True )
 
 # EventInfo creation if needed
 from RecExConfig.ObjKeyStore import objKeyStore
-- 
GitLab


From 7d7395c50884b3ae2ae8fe3558a392e12e53d64b Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Fri, 22 Mar 2019 15:48:39 +0000
Subject: [PATCH 012/129] Merge branch 'pyfwdbwd' into 'master'

AtlasPyFwdBwdPorts: remove enum34 module

See merge request atlas/athena!22075

(cherry picked from commit 4b8021f0d282397a892a99a3c98ca01167557645)

a2c9944d AtlasPyFwdBwdPorts: remove enum34 module
---
 External/AtlasPyFwdBwdPorts/CMakeLists.txt      |   8 +-------
 .../AtlasPyFwdBwdPorts/src/enum34-1.1.6.tar.gz  | Bin 40048 -> 0 bytes
 2 files changed, 1 insertion(+), 7 deletions(-)
 delete mode 100644 External/AtlasPyFwdBwdPorts/src/enum34-1.1.6.tar.gz

diff --git a/External/AtlasPyFwdBwdPorts/CMakeLists.txt b/External/AtlasPyFwdBwdPorts/CMakeLists.txt
index 790692b77f0d..b2d68f30de5a 100644
--- a/External/AtlasPyFwdBwdPorts/CMakeLists.txt
+++ b/External/AtlasPyFwdBwdPorts/CMakeLists.txt
@@ -101,13 +101,7 @@ _setup_python_package( pyflakes
 _setup_python_package( flake8
    ${CMAKE_CURRENT_SOURCE_DIR}/src/flake8-3.6.0.tar.gz
    178485aed0799655d0cbf2e3bdcfaddc
-   DEPENDS pyflakes pycodestyle mccabe enum34
-   SINGLE_VERSION )
-
-# Install enum34:
-_setup_python_package( enum34
-   ${CMAKE_CURRENT_SOURCE_DIR}/src/enum34-1.1.6.tar.gz
-   5f13a0841a61f7fc295c514490d120d0
+   DEPENDS pyflakes pycodestyle mccabe
    SINGLE_VERSION )
 
 # Install mccabe:
diff --git a/External/AtlasPyFwdBwdPorts/src/enum34-1.1.6.tar.gz b/External/AtlasPyFwdBwdPorts/src/enum34-1.1.6.tar.gz
deleted file mode 100644
index ab548ac6d2b89363304c23093781d8d6c06cac34..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 40048
zcmV(uK<mFBiwFo`J~>wc|72-%bT4IYb!{^=Eio=JE;cT7VR8WMy<2zNM$#ynXRI~<
z0g;zCNr!@Y5p|30iEPWU_SmvNNuGQ;8V?1Lkc5Z?H~?swJ1f6n@3-@Qe(R}AccU9<
zkkrMVc#kw0lLY!wU0q#WRb5pbMALD1ZME&Sz4gc6eVM-&{B3OX@Uy+qYw4fz@4I$q
zqrKkgZnV1_-?iG^)_U(dxA)yw_?xDgpSbRKL3ZIsbIL7xF9#w&zmdN{pMU)E_|Gu^
zYprhke*XVG^Z#b=#qR#$?j6tn`ubYc{C76i*0lNW!u<DIYcT(<`}zOke=p+6ED6sq
zGPgcxxE)}<O?MZE>b{yLV?Xkoozcjp5~-U6X^?yhhMwab1j8`RlJInzg>mHi(a@cy
zfg46{8c&l!Ku=D?$WLbOS)7d1rh64;7jB%;XFScEaXbvq!hw$sG+jRl+)0p(!z>Gi
z?j(sng+urPpk(k*0F8`B@l_a|yMs6yhFB?eu+lilwjIZXKNF_Zjn5=7gLnu9VX9#W
znGZl>i~ec+DWHl2g@h>1!a>l4_hIUepfzkH?~q0Xb*WYk5p+8k`QbQ7JUb-NqlOC!
z2@G;L1?X-GOb!Uu&w+8pK!@>QIu4@Dms9l^W+8?*i97bQAPN0ZN>vrsX{xBIHViSg
z{UD^O_&V~(fk7?+bN+^Az>j8PSP{1rCn<D0b58@L7#Kn92GJ0n21pzL!Z^+XmvNIZ
zTtk2n$j&{3myC@xKFh9f_60Gy=_D8+H9^G?X)HlHig;8=RcXp2IC{Nz=pMd%b@a>5
z!LAG6-ygjD``*jlm+tdl-J{pL?u&Qte?8dy`Sp?e`rVtCy9bBv&i+eyx_@-A_x!`r
zJ9x0Na|kt89DK2}|Es(E-|r804-egU2kze6_iy%~F=+i@Xa8t#_ps^i?Z0^Q;pN``
z&rKH^aQELGxo`H~?j1p~qjyd0)G1eU-@S6*?jF2&4L^6D@4eYO`jr5AwRg0SeZ7Lt
zcHH+n2S<A^KD^mEaNmD8c>nHj*TG@E+&g^nW@qp1?n@7PhaTPCzwhoJxreWJ-n_An
z5@9#S_<YxSv$ym7%`W!@qkOq{u>0Z&hm(JM0hj~$-Zb6A_q#9l@XPLh@4{eq4t{My
zn+~*jxcgrppb)%tU+%o!`5DGmUw{&rlNTQjcHbh*?_N2FAD$l`?HzqM+I4?^_wFSj
z`f&H)@32uF{^-7WcSzX!aJbuq9*%afV{8IY1+U@z^ACr6h%{$!|7iE%;KTc)y?6T!
z82K-N78v&qRDDU<eYa0T1q{7A_!S#P91!xG?k}%*;W<q4zC)PWK@=PU#$Fuh#h^bx
z;E^^)cYpWiH+w(t?!VZ@x9_l(U-k}n8!%UUhge{byZvPc`uu=Hra1zr_^U>-O`1t}
z@0Gjr^6z^HHWzka?hp3_oxr2R4=-K|bbHSA_WyoAjKZwn_a?Kivj1<a_1f!&{eQjP
z>)!AGU*m6OW##=0SZL(#!sG`D?GY(Fb)0ZKi4)+gGuUZTw-29=)9?GEQNQm#b&qRU
zq1JS3dr>C8PNVQ&)1dazaXtkJa$G3bZsLFIjx(9TLwImDiv6r!dzg9;)0+E`TJ}VF
zpuMyBc)Rnl;W$|`+a?B%TS)ME5KJ<6AGVd<B#D!4u`$pFQx9Pm^G`=XgCFzmoVdX#
zz<m$*L0KX%fPdkcEMq>$KadorN#q_S)4(Y_dj%V2paDqx(g1ehU?BE;M%}vvcCKLf
zG8|-b0DJUC8-i8_aI+srdc&uF8sG*DTe}?r58S=T6%*Leio38!l2{Q9;0bQ`XYMI%
z`7XR>VJ!+#C=!i?s*x^Ws+PLHp@afun=b6w?iI{GZK2pOl=0dH=m2u~q5&?OUkr6u
zmIcwl9mUZ(&`9tZ#E#Uh8=y4whGmB!>7+oL2Ot6jFYx<L#!^Ob6#opO9{j4ur@z6x
z2+{z`royf-3%dRQa0Idnh(<2A2O>$of6mo`5whHKgmMS`=L6NHgCv{)TANCQ0ZI%b
zt<{tzS082-q}(%@;wT%<+^Y*AlyIjc;3o0(`~oHgPz$^$60);;&M<i{;7q<|fRkVh
zqAW{DAa;%Y5zm%*4M0Jg`7jF&g5(5(JqTe5qJzdD1zUO#nAdQCQuakW{E?+E_-_b=
z>YmQr#1Dxq6y9l?1<H_($Ym<Gm3kVC&YJESH2oB*U0bsF#={rLB;do*D#K4zSK_JZ
z##d305V*y*U}Y<G0=W3rT;d3LPyoB$D6Vt`QeC#z(4k7LP<`@8Qyms-S1SWQssUlc
zXw@987>y5sHDy7m{Usab+Gg7hH5{h>oPu$6XiI}eof6YS6vE3g$rJZu{oxAw_v9=K
zl+_J1U-+q9gs?w|d8{=+)Sp`{U9Ol!QLSN&ZW;kkt)mK3Jv1LNOa+0uvFPG~VJY03
z+^0{e#_?)rn|=T!HC(g?tW=`2-Tml(k0mM!tai6oJC#L7LBzvwpSf%L5Yr`x$mOmz
zz?L??wisRo@a^r+g3)!hv5h50*HNPz`<FqV)^vXwO~S$D2>0#!V3g(~eG6r1e>(@g
zFcJ)H8m+40p22!flfb|1gLE-K=>>LM(7MH{0zET}Ve2mP4_;bFvx!($wTFod3ky_o
z<eAh@FhuDEn`sEPnR<QEdO!F~Qj)c6t@IeQ+)+S9Yfq-pWdt1US<O)!8wyq^8q|lO
zzJ(nn{@~I@aUB@*_!PFx7{v(MID#mhl39eFvmTC`GJ>82xL*nGjBURK2G2VIT5od2
z{VWE;A!`mYz&<zD7mcNArwDSH(dcjy|JRxR6!i1D8fcRd>Z#%lb9*pB0WtJrfggjQ
zH&#6JGMJUwF+lYKWchO(N(4d(ZeNHT<_548g1Cggb*?7{gnxTy#v9^~L&Ip2qE&=U
zBR+Pa&r?(3INzygCy$kV!yI9qHe9rqi~|1?wCG;Mqd;1A2>l_DmWCt{z;V+9fsY2B
zHVUvC@GzLr1Isa2WN*SENc036t^?TjhttUjZFM=^+`1yI!9_5*#4#AiIt1hbxP;ks
z5JTBIv!sSbnVMNq*4vM>U>lKx(&lHFS)y-PCusWt=^8{Sv~&3hA|A0!Fhl`LK4@l}
zgux&viS(o3EQ?VIAw+k)&yG$My6nKZ%Co1?dy7^TP!a-DuL($MwEqaGYK?+yLHtxb
z3P#W(Ho#kjtYp@q_pWMQ2S#J~P^wW<VX*4=T3w4SL)`4|IAemHF?sb3{FBafHqDTI
z;Ce)&s5Q)CX!~m!mI?5z@~Ev`#H{#0Ur;zhXurdCDX8_Y7ST=P%^(2<<B5=BiN|5b
z+wQ{zIW)p)LWQ(a5QB<LLPM>9zl_xfypjxfwSoM#Vj48S{|3$bBiJH_Goe8sHA}#;
z*JFU-W5Z~vj7-m;OoC`wH%3~?SaT++u}9c)9=I>3<ME6i5G@c9!0J*vMerH9K$y*V
zxu;Yr%vkRr<Mb5mxYH;LN6?<C2O|s93s~;SG>Q;UWVQ|y(Co5s%o`7N#@pU74pNk1
zNe}c`^@8S*(~i;@l&Bfj04hc56_A8c-rXn!@!$lekJ^N4IN`X#pE&eH>e*tKmG$Zw
z%#0>vz#}doaUq$+PxP2oB5n7XB*6qA0>qA~YT9(^AJUU`*@DHbd~-L%{wTPzx6owl
zXp#UEp&#kEgV6%E{SoN1unXuLG){U7A~ftGrvXS!g5Z9H7g}q%kTVWH%Uz8R3lKf1
zl}9k)WW;H@K{oIjq-<p<oC7RcQ(*+PLR^+&R6rObR84_f2UqGLYLkNY>*DkPIMQ^K
z$rB9$Sgy66`QZq*HEo?DX!RUD)Fyl}*KC}G=ZKpAkc};>yirO$Me$9WBE1X}#3d{p
zq&lNjkC0q%l$nKU_V^NnYWGvV^@x>>Lum4%=m$)tf(Sg)nqWFW1?<<EnpACpMOfZ2
zvG|>A5`8~8PxTf6ze6gSW2tHMTmpF6zZ~L*Hd_b{vqvU7AetCB5UdZ7AwZs)Oppzv
zWOSIJH3618YW}A_3K3XZYm7u4pcn$ZfHxc^j;3C}Y#K;z@GRjJsmCVUY#7EumV_z`
zn==ZEr`8!3_~>W=Pi7tDzhnf&wu!#!)Q$!9eD-+D)``(WYlGU$8-^etN?Q#YN@{t6
zLQ9zdm2Iy0m%~5<A%N?wF!J8Or@9F&<hsDQBy*CmpN{<T>CmT%-ll(#+aDVrOMMAj
zpxXYHhel3K0SM?DU?}tyfQnmg*@kChdY$U}=3J|p`FJht=KzRr9&8pPAN0^#6J<%a
z*6>o;T#KBBY=xr`*Sr-aauJ|ZLuyA%=5Eo+$4WSUcq*IK>6Z3V-qc5<;2d@lTEapV
z0d0wQg7mK%Sw=u4;ZP}LAYI4_YPkP{ejeAxNnHEbFpYCsHJfEl7gqPUa7l5g!>;P`
zAws=0QpBqFTO3Apqc5P@M#Cv`D$Q<7x&aAKJnI3THoI3KQi5`hpu<<#B;5=+Re?vP
z7eJr`7KPC2jx0`15Nm8gz|l7yWaxbj0LJ05PxEj}z5_J<_|vDKAjDw{{r*Rt<qklO
z1l|fF7%@wd36QntqzzBlvVwh(cqm1mrraq|KwL@!v9xNgC|bfFOCmGV35+5EwF)q8
z@<TwcejuWWZYGUbI)yz2yVR=J8*^55bql}$VF7vd8H>eGX5PpV-+kJ5)lZ$)4gx&q
z3Yf31KBE;2Ez;D2_;i7$E1_6>)^6xsrwFfO2wi9<&O)C|{=vA(iyBFhb|R_AlN|?0
z`CQ*<uL7e!OX&CnG!&BWE1Hr8VPT~DqVV0p6c)nRko98T`B8kPrl!&5EH|DAv%=~s
zQ0U+SfYh6tX7MUu0|t*Ze>6A8yo)lu$d^wIZ1O`x3eYH6<D+I{ObK$5(_^hpX;UD6
zoJ!k0tC>wV1Jnf;AyG(evRGq@olR7s8pX~vDx?EJ>~))&9=gi_d&l{rann0OPFe{S
zegaUERuUjw5c}~UXpEK})Z}c#SK_F&tHJm3IA~r3Z-1)PpnSH<+oEV*o(X6TplyZ_
zQnJigdJ~JPZ$+XV=Zj!%x{q*>Ujt-qitCn6C8=5}JC%(iA!}_L*2+@heth~HTkFl$
zHK&HK>{`Hmz!pm3o5lz>&8j>gJdiHfO`6Imtub!c21P5U!5}7kW5jZgIPYW=12PjJ
zW3Qy+u@nrueH@{cRnB=BRc#;D`X5Yvu^ms$j&*t#5&_Dxg$Auv=mcU3qJH4+2sx9r
zF|;Z9NiJhbDKL&kWE1O)PGRC3o_&efqylNH(jFFR00a|slcclT(>P99heGL7Ktf0B
zSMhW-q~!$r<}ki0G~&B2XV7>!Fx>)xi(UHj9R?Z|Y*d%83o=_7o2hU<(3yhPPE()B
z;`mX{^oL~3)M;xO@x|DS%ysW9R0bcgj{_bypoIm8&J-%dFe#yU?k^+)BasY;`L1ng
zP^>Zlt;rt2vsG?#6vvm-2@AD!#32?oJ0)0J8o?s>llg>Jl8%n)$vi|XR!YgJtxH&R
z03_rZxwW#bjEo%8mdOK#4HB)Hgg;UsE;LFd{P0;K6ch)N^wS$o#}i@g0y$_9K<j8@
z6>mqeKjgPsTR3N)>mK;RJr`IV8T*LM(RmK&Cs*!t;*QYkm%y9EX&Ro6aKaP4DR#6C
zg#R=emrmo%Kj+2-#PaAgpF`FyQqy$fXXcp5gp06hBJKmN#_RYBrQ{}=^>o7zdR4Kr
zR*Kj{=MUF7Z*2mq5z&TnC*THolDvsxQp3iGcsyu!>8vzFZjxNW0OBMG2H9u^c>IO@
zleM<Yvt3OpCcT(}W%U?E>yWgUNfMj^?s4{Jx_yW-NM}*1*}kF}n7ZKzH!GO^0<txv
zX{X~r;Ovv8ajlvGZ%uM8rNM14kQT8#yH1tY1e?A|C}f`wm?YfIxhv`DAs@n%O6y_)
z%BJ=}H+~faDD?Ro=UWrOtdwGw<M}OtSs_qWc^b@<Im>t_|3IBR4C5)jVN(i`KYIGp
z)Se|FY<>BeDX~U0>()p({^TcNJWY+&1ENXFTR5Jal0qa%!fw5+6aFTN#ATYPue7IT
z1tb&J3kYJAF!Er8=a#Lkyln%il&ct~ZQl3D&%!1g7OLiE<?5ORqgQUZM`RnL5cI5d
zWtGsVH9n;^)((42s%f{=6Gk|Mk!2f9D-hV!;W2Dd0_r44<53=91KUe2C!Wd3pONcA
zIMBHiyH!FtI%%O@pyRERdq=-N7*9aobu30pD6{PpksGGz^ppTLU<WuF%Sk*n(It?a
zoL4$MQqOf$939OXM$}uu!`eL0eq^x^Y8(hXaOU%<QMRbW`Qj1_dkOxvs6@1|4HVMm
zmZ{)|c7YYqSC~6Nt_HmdTehn##LD2p$A{B|cI!GYFLd#hXUe*LuW6iU&aV7f12=8|
z+z+Fsay!LCByq07Tu`UwVv|K510hhrQb^Q^BRmKbAxdZmX}AlY24^t~2QdD$(AHoS
zpPrJpkg$63L6)RX7O{%-E05@wUOZBoN5E=L({{z1-EmF8T`PGBSX-1$A+F{(B2K9_
zjb1yX2DNO|?`uwZMIRbrI)BV(#vpj2vgVIqT2nk*#$D61R@B|@wGPRBjye>lQp`fx
z?-z)Y{OH6F>{EQj;EwER+XQl#1K1MbE{Q%S(h4ArF~B?6oGuTm19if#c`32Fq;?qc
zp&~DPbn{l8R_a`yofUnd>W~DQ4K7q`?67TdsjG(`=v*)2QJmDfjRuPn;-vg+8d1!F
zKXP~8@2R%5DzK;GWY=r-t0wVQL)tx0&=KGizyVII4eS?$pN3=aXWKntjGvI04z$)(
z{^WS@LCYc^m@dWFT+QoIY0y8qCpc@C=A>q&T4VP^VRA-2yfiKBJO&L(ASF{kXKUgl
z=<|;5`qYWf-b3WYAEpBm%5_^3k{;0pHHJ>_SN`Zyd9frYGXR|pE`MYW!<=dwk=~Z3
zXVZ~^3FX_Mdo&n+rKDq5x~7Q(6k+8iC5IFvS68ep?r6f}lx>yyI?_*&lxJ|WG~ZW2
z4Sj8JO|YMn{fJ5LiWgA7t}j=$Qu#xyRhAEVt<t}SLk!AQ80a9u7DkhjKaFN)m&+LW
z6D=2ETg%V*O|wbC?Ve*ExHqy0>FzctZzV#Z9;3S<XqU9!@kj%W;Xu+s$}u7Ag0Dqk
zXzkR~ARvh*Xm7PTJ=32BE7$;CB8I`byRSS<x20>30BbitO!ZdWhmt(d_S-Ldk>$sP
z;)pOu5?jo4{Dn!`%U61s<4z;2#jJ)5<AMCD%!%TsU=p>D?hlszvgiZX7eM?3nlgZ#
z%`}iy%jFGA`po;vCnY}94W8oMuf+64;SmKYp`NatO_NAE7)^(?QrM{K5m%Do>|v_A
z|N0d3Elmg@WCaPXJJCl4C(u`#Zh*$7OouWR#KQ!w#S9oYU^|g^!cMyr4&el=oM^j4
zAk>LGJV>*K<PMOe)WRE>4UQa>Hh1X66clQ%Qr<)1BBP6X3;-?U6Pk__V3yb<Znml=
zG4Y`|D%U5(tzTV)pgfPlPl0g~pLg6a!V`?jXfOhT`xK<rT-hFXGIybxI&{e*TQR}M
z<}stNU;ZtaS<IJnx;5!T_=DQ$V?G$Vdw&)rr4=UEy}f$D?<%#gXl_2?qx0cyx{z(u
zEqxiCje@AE9}HTl1Qqya9R05#i8=T~h{@(KCY4xPc|v6OFnLzw$AuV&;&QgeI6NQ4
zgG(vgr0f|D6d#^PI_uX-dPhnUT#Q0z#gb)Fg~mETMUM`F1|o_AH$7%vS{MRg8hDtn
zFXM^bj9@??Ki_~LH#X;9tW6CyQd$Zlj*$d$AO)_Az-b}N6)Q8R2Xg(&^(NtEr_l@S
zI=}zXC`wwIkr4_lvAk+8c$ZbkmUyl$+*I?K)hAV(dnr)~w;bF?x#W#ip%-xkI!Q<o
zBSMjZNfMq!nvho%v56z6C*%lq8fcc9M@U5+6D;JmT&<EKpmYNrx+0Yb83~B6QZwRj
z5Rb<`#=ibN4>r-9KxD{F+td5cgS`uT`Ry92Yb`0y$cY~&sZpsyj&N6>xkX9B8gpXt
zA0*2~KHaQcP#APmDK98PL^9|erf}!*#ok`oex@X3oq9xLjcfRfYS28@et1Ag&{DnT
zr-LxG*zd)5^?`fbrP6bpL2XfZLYG5E8l;%j=9J^1Xv8&QoD!Ud#s|omO)&u>gBD%L
z?ao7|!uyif-8`o<RgyItT-T1xuUxrhYcT`*j1+ymbDvnl%~*QzfaHUkCRu}nU?|jf
zBKf~M_W2h}F%RJ{%)WHz<aM*ySJm2joxF;gBqa;GMX}Iv>*Eqo9M_?h@CVin*+DsM
zy6l-O4JM+&hJm5iu(q4I$}ISeUs&13k|r-pC3~y!!7>wZBO+k}8U6B>VG+)Z6B()j
z<t!eqCbF>L92{ud7{e)kNY@^&&d9{?%eX@?YR?`JQFJcQD>@b@<GHRL4_JmklZ<j}
z*N<?-{`)w0_`y|ATv|<!Q|)NC0I4>AZVbPZF2mws!|pqqFW-`@Y+(%>9<$omkKVm}
zx2??PxgF^O<9aD{`*g(lAwY0KeonpvB#E&#N<S=OyA%@PC$emR3Pzv_4R!3~Wy<W$
z%H&0br<|Pybp!&i-f4Je{qs?L>W@+~8<TumaE2FLzHW*}P0gpfQQ>E?B*@n}x}ER(
zt4Cn-S7(t0{HGK%sSS$ZU*#AbtDynskhYpLX=6sVZCVdhVmIMdE5fKu?X)P8QJ>q~
zJ~?w@$`{&?*j>t(258D|!k({{HpVy;b!8NwJ%<J(h`j{(Oku%M_*J0JFXd4Qn-iri
z6a+zOjCag9OVcQx{^){AkBS8uCZXw&LL52qfjWj7`kAkvrz7GqPK^TKq-k0B_oFN;
zqu_-jh+A|K)_o+Nn!#EWQmAhLWSf@W`=t%Qt@C^4YaD4=$d8blh}5ws)?q|9DvM*8
zqI$Z$Fcx)1=q<r#P_2eK#?uv@Yv)iiKLW5abEsvmYy*FLZb<KnJadsSaL&Y2VS?tM
z?-jeL^Mw5RFy&DFm=+}aAAID6OfjA(D+V`4rBu#1)L2Ce5zcU3$P4<jSe!G;F*S9K
z<$-=I0mIjj!zZ4N1;}A}$buk~@MKY=Q>1m%8gGW@sd|`_Lk2IK0U{+<S)ya;6qzPk
zIBX7tWAxTUtu2nW-MYvOMkn-5;S?vbF<I(LTfsIRU_Bu$*LFZjlL^M2HC^#Ee`0CJ
z{CmQjrH0NEc>~w2%~02#Sv``LA#km@HX~N9I(PQU8kJSRv%7T7@2gB=rLC|cRF%tB
zsj%h!Qtg=wqf+(gQWNsRmMZ-XU~`j+MU4%%VBFR>PD38tE<|bJ5m+)S@0=Bg<LYW9
z!X6c;f#wXsXPSIaOs?zxbd*)B*KK3lL$i#E&V!u_k13Ooju=Y2d2vV2-HH+6whc~;
z5~4U=;&Z6$px7XMB?`@*&XhOBkL=XR@CAM{3WG!wQaIj=^d&#Xg<o{3K<^0R>!#mB
zMI28tURHTFSlz_L>&h&DY$8La1O7Mn`K*ktHqpJGLnggtxJ?C_3DdiBc_~I!)X*GU
z?CW?pZ*t#8rgl!D)vEFdDZ0MUG?Q<t;MjcNVosZMpE(n!=clOIXi?n;ew{gvTV*$x
z96@%kFJ*Mb>dSGHg$6Hr3DZu=>0}2vvKZcv_Lz+dZAhNkG?wU5(unLi_suGkyKd9s
z`ocf*cy5fp>4ar1Ay>oPQty^3wYyZQkJYH5-Hm-lpO##uw&%90EB}(l0mqE2xit-L
zK_1slGeM|TI#5Ol?tx74YC~+yhgDGkfAM4{M2)N)l?~)ed%@VsF+$~_O1oFxb)$@O
zkeJ<h*3Ihy+d!f?S~ZL1sjAT9;tEtsvU!k^=rOCk<&A|8VpNXHa{ep1FQW;9i^=Xt
z6OSuG%d~bVTPDY~In^jM$5KX)mbk-o=dZ@6RwZ|tD<+zeo0y<jwS$$Ly_ePQWwoy^
zs}<X3XVJcrBdU61CtEYkmXy=-xLlogIdc}LowwbkxKl0i+*<6p1JUQ!@`hFBs4vVb
zv{>$trM#tN1`&*+G1|rDh2*<r=>=Q%(z|Z;&U@Y6x4NZj^T7R1{BPWeZR(`+;D&z=
z<x?+t&8f8Th`KJ@)_pgnjGRyfkKW0&cNK^@QRVodoN;8FpY+%m&724FbRsvFlk0Zf
zIQ60fuan%R#Cf2%Esid3JYIBpAXX+bx&8h};n}frEk((G<>w&6JgNF7?foPAM}$-J
zk}j9g?v_zG;6+aNqA8kcu83^KWq)d!;$At0O7UNKoeZ)myqYOP_Hdfy&fw_WlqFM=
zWkfsjh8yXIp5;LYKk7e_tg#G>D->EN6ByPUx%F@uMIoZVZOGtkJ*Y-z)ss2E5HYFl
z2>lB78yUt;85g-d`qxW>VZ$kAp<o9X^St<hSQ`1$2YHlu3IfXDLS#Nt{;1k&7Zt?0
z4@LM2_fFyKr`&PsmK-|_p`r8VG4H}7u@qBY?WI{2e(uZ<G=CstLCIAC1iv9)gdj)1
zy6V2GM-5<$uuMbkv?0$|V{;W}JeP7&D64RueS*GJn#MFlmojs$JWS>0L}4xA(0!Pq
z^P+V6H=N2FmPMMY-*WrGbZcrWGMpwgpK|3fNw<h>OP|TQB~hyM^-*v%#S8i+e{j+b
z8-ya7mO<nn0!Hye07;RyHW&#+f^HdrY#?wDFGE1z1pxfrDda2OUgV5V>8ksZoY1|d
zeEe?}Ptk))W%E_T7$>nMX`Kqf*1axmCWbMdW91p*p^^|C4Ilqf0t_+_T`#^s1{5^i
zkM0izEC^Om-bBJ2_4HjJccgxc>6g*f@_q~ci5^;NN1*fORgtJx1;xo-RJ}#6OHzz%
zvY7|wI4VyUo>rrr4K#pWxWZ93&C})V%FKO~_5oSobfWp`J2JvtChrgrCMx^$DKsp?
z(<mrQn+;BLrsSw?&B-klSF>ompP$t8O!*JwiK^CxDO8DeN_`fa#RB=xVFWs<3HgK<
zqv-QtSz#(Ro@ZMA6zfd=Tuw%FmW#r+Mqi7NCoCZ-iRRwC*@X6GeohI|jrCY!_xPIT
z3M*8y`Ic>4TWvcf(`U9P({N~JhSK@{G$MJFHd~4T#YByD_5s8%^Z6lxYI)PBTBaOL
z&XdRJ&6lY_HxroQ<X?&7rHAw6>6aLd2zz=efYin^Dg*<JvO5^V7a2mnm`0g7gv=bm
z`5jEdvoA6Y=lL|8o6~S!n1=H^n1*LxWC-~*oSV~d&istw$HW5`_?Krj+I2~a)i~8`
zqYNmeK43uct6;qJRVi9`3nS&Xxi*|ppoy!Rw3@@o2^cJbAik(Ckn}|M2JV1=h%Uqr
zB@wIaB>F`*W``ysnv$+q)I~>jo3NW_J&_WxdZNVM{0VGzb91TXR-#zmF00*7M#cjU
zE_`4__i3Sg@tGNn$6kMzK`@bNMB$ZBX`Dc)c|dsJYxr2DH*Xo{+G$2{-}3riVWrn}
ze1|e~kyS+Yi(n2dk%;1Y0+B%KG#L1}$(wD-Hk9jQfVaYNrYVt;N>3F43ZD^MiFY4J
zB%;F28LXxg&vAa5i+v&%PLy1tMvV|lbbwE3`YH7z&N_WrrZ+-LWp^U;WU)VbOdYZ;
zhdm0R)VOMagP<tRCDWtdWH9+zILa{Wo3obbS31cPmKUYSCY7;6rfM2d7?Q8u=ZG}O
zF3)VA@gtEAM7H`s1m9$2^igF*Drvrg8m~5BI2$4<8r>{G5CiuYM+FazpewfK@EGZ8
zr_W^AQ{=+w!cs+F`k{mL3;$7>qtdu(c$}O0%!Cmsjb)-ETp3K%p)^HJlHe0&sFJ2d
z5pTrE5bBli4X3$G(mJ`1^Q-ijKShp_P~Oh1-37&{5>@$E!=fFia%P`Se!!RC3Sh)`
z<T*W+k%!xoc{|xZkLHBJ71YgM9640iBPNQ;4CdSdmj67R<@r=i=)LJ=h*2!!Vlb6k
z(^B+UMqmuYpmW8i%+m#FGCLPPn3KyN@=_Fa4~o3nRk<WJng!XSK`ofi9C70dIas3|
zi=3>5nRA}vB=2DnUY&L2Et)T0YWIrne9@UH9c9+ZYQXNn7!j25^|iz-N{C;uTQZ-+
zs(h7gU1Q`qG%xtbIT*z7CKmZf`QEjZ!&<nuf|Xp_MFgvEgH{)$<*BqO#>>n<Yi6C5
zbu}6(XPuSNtKUD>Q(qMBHBg<(Kplg;J#7I%b9w2!74=MI|Id@|m-NhIG#0KtlLkV{
ziy)%SIikyW0)x$aEc;b83i7pnTY#!pyvy!kB5n&PHK$K=vpB3qMeka8h}`PG`{w@2
z_kRPvv%9<dd*S`xomO|P(=Ocq-RrKm?(hHp8h<3B$P~1EYc-{5ZMu|Ww&}hXvVd?}
ze7*Pc>)pen{`-S>NAF&|d!yYFF24fr%aDjFFZ{OO_idQNddy_7<iyV|JkBCgZy|fB
zHDpiZdrl+ZgEoH3aRw^(fLU=<?QUhm8*y8@da-{x4KdpQO5J%E6kUq$C#UpIJyHgM
zJOq^zcFI`$mXYEC&9gaoS5cx(6)0M0o!cs&-e7>H`vZ4Su-IV-ij#|W8>M`1T<%-C
zU48yt;)M&rzu2AZ57@tkR|=AMn)k)x%V8GB=RsO8M1Q>5IXL(gn#oP6FFqW+!6zN{
z<n6m%_}!HN?a~K8&8>)rafq-UpbV{=dgHkL(J2A}WG~?;icxn1Oy0p#@VvscFCh|_
z##O=Ob+^i3c^f6jy!KkBx3yjYpx&b$#L`rfB9$wG_Q_31HU%Op4WNb=4a~8^5zU<a
zf=^#-S`!qJCfd<zKY#h^4N6WwPs3ph)gt#GPE(M-Rf$(`K5&ueev-`GUqCtXuWA*;
z-{+hR^JeD105H;PWoAJ60HwF9i<rE5IHwtl+*cQ~no@T19AS0<wASYVu@j|NL7tqD
ze<A=Eq42{X9}~XkQJ7U~Reh?)=Jj}V5yZ(%^~gW5#{}byNB$Li&ZMD0#lNQh2#5N#
zmQH-UzY<#g*EAIGt3Xk`R1)4W9#~22RWc2;BKOGRF{l{Eiaqrs_@A+42Y@B&v})CI
z5_@Fm*ma+2zmGe8ANTn>x?3eI{mPW@?7a5Wbk9@QW#d*{lm!|BZrYr16O1wIj;z95
z*$+pgB^hdt$|TR%LY;$_mN)T(p0cJCpOHHpR=RMivDHbWsgrzDm%~&el3yBZMAnQC
z^ZmZA-MmC?qnO02FlX9ZsB&r{sclm+lE{@pK<!~?C^VkB?7oT3<yxJrvOPzidIe?V
zMW8ATy}WlVSNLR8m`SThXn`D=PH5^O1%>{JX)K>%4P+rDBjlDzUVdt=oMQg0(xl3J
z?~IAH9vXd(2^SWeBbf8o!Ds@)eO;;n9zJ~Gr@3dGdG&HryWhI0<<ZN}*NBqL>zWH5
zE%KV)c+P#)WaSrWHN~w3=nGP#yj$WMr^YP1Si>x%9upTGUC3s{<Uvv^*%7<~tWddO
z&&^E4gWsBNyRu;vk>|8q!jiZtynrDbeJY0TvqOyUm&RGyt!z|J`>i$UV}r6;_O=m^
zgzt^~qCKEbOP=zYEFwSDCw!@fw}Ag5zy=*H#E=H3-(Ma}!@ScQAj$vADAJ(S*Dpy&
zRf`wV2-N#wVqbxWfu91Kw8Xz3zCYO8|JjgZ=<$cQZ+8z2S%&1f4@V!~?vp&DKmKKJ
z|A<PjImYm~TX@c2oB~vTlLs;t3J662u&&YG>}<9-jW_T2gwE0KZFSa-S4TS^u$ueG
z)lzR0M5;@8uf7-I`Z@7oIm;{w1%P&-X3u!?+!#11NhJ)uETQrhJZYK0ali1KzZAiG
zNhgz(``N1Q5W02_k5D54d}lRtj&}LYRZx7h|L)-EHNJ{K+rBX09lra(??7(S-x0hT
zKu|>crST%v_VM_Hu9KIBEMH5w%wu~UkHVoptK%!{!1i~4>HoUBLnPU1cY!fC3naVu
za`&+R?p6Qo&cTb<su-5+nP7{)posWZNRuGEHC3)0J{rc9Zf7%jztqVvOiu8KSRK6?
zXKn^(LwCeDVgaDIJPF5gm1t|GidF2Q@>926Q&5L)>RcH_S!;=#Bzd++-PD+EU|HrA
z_>GwZeq(-6`)Gkf+oy^MLc7>k!H>uA-3U#&uPUF$!>2eUzs6uug6o@puC{^ayuV(N
zxrFp_Se<y#RkOSe(tuybprn`HBTQHERT@}(FS_uq{6a;)clT;zkU77{(;{^?*SO|{
z=#zp2w9Un>$QB13ru+$5uuhM8V0AOVJ?!Sj&{t9u8hi-da{#YgNa^&HNlX$KKb+X-
zSwv}I!uw9A*IKub;33u}`J;jk5rQ!K6jDs$62!DJ42SM4o>JH2;IAvzPEV;z)w%6%
zBcJjj7kA|AO{3_@<Ho+oTq@iwnofNa0<mYCCrGz@b51G$6DWD)s)%;DG9}1$0peuL
zmC4aRJd;1G`HkqTYO4Dp1ta=T)EJmF7{nBN7AC_om*Fx{_%xhM!faNvFkPyTMdFGg
z)HauhYjcHuayk@aF#I*pdZZ!JwtlLy1|q;>%zcRB`MA3|yS9!}^|!=0E2JCri(+RI
zcH9sRqGBY&6ur-L5yf{0Ek@1`m0Lhul2+Q)G}5W0jqYNM89-c@ItKB0;wK>p5LPh`
z%bof|Q7o|CH7vvrp>sVeXbsnqbM|Aw*^DOVnJW&^oRrp;!*f#ywqeQS;J){hO2MN-
zZ6xLA&E9+KJU!nzIM{td6LsBTAt>TU<90}Y!fhdtx51Pm3i7fN$HRTlk&2WtcT$Tq
zD%5mSN=3>vpV&Ys`FCEYa|_Nr5h&O$*=eGzy2DbN`KhEwCx^1xj%^Uv0)Iq|0y9`k
zt*06ayc+__H=1-ygjAB|mlvg)?po7b*nvSx#|7e*KS@ziKUrI9np69+iQ_8R@<NP5
zBup4twS^8QO*O(aBUCS$2fXB_@I!IQ2Fg5B4;Ki-L4M;P*N}iU7FCqfUfqLQ`EyIj
z=GY%DEli8m28c*IT%sWD4}rGY<`>tpM+J&N7Ql_cc0mJmW}fpJI*iQkYmWGeQLfmW
zT|s{$`k)}(^jVF=S9sFG`7)?llk62<^i#hrW8t}z7KFz2`H{~1@rZx`B$GV`Cl_yA
z5yu3cxD!DYDK*0kZDBhyX1?4|c?&6KmXpvn-2#gs1tCbHxTfD@uv~)zF@+XO3|3ur
z#)m0*YW8n76_+;hbmET-H}DuIMwR>Kg`XN+2^|B*wT4bABZ(k<<y0EsD_gq8q=-A%
z<diI+^`#qmdGPCPTF7aQw9_Ja(2Yp(ncYgsl(CCfDcA_ZIL<514K`e-s*S2XSqisz
z`XZi2Rw)#3b23cmv_PYvM4#DJY!IiJoq^h)e~d&U5SJU4r6J0$zz)g95nw5CH4sUV
zWI1Tpt?JP)NgSP5N!w!@>el>*J2z;!k5{!MpMqiESg2*<%8#L&mLWB6TC>EZ<eidt
zAVv!b%eMa)D|BUQ16i;T&MtUjx4H!^XR9wvD(Ed$Wj_-%`(uevi+!k8JS=I0*t8z4
zOC_H?#!fg`9<PR?+p{RiA7=9}E4m`A-X@aY%pPC+z4b@U<7Ulmy|Eyxmr*lSj9J!R
zBynN=?HhJosC)g+v3}<k12-z)towi7s{eo99)M@J0^r&00eEsN0G=!aVD9Sa^J(Gy
zvmNq_opS=N@d&R~HhwYFu)MLRKhg4@RG8*#3MN-vl>B||8mn8?_Atn^X>G26H6edd
z{k`<>%C5lBTJ9CLD_2lf0wHQ}1Li}P-xp3CMf_Q&Ek8TfkCH1LJB%?Ao|>`=&p5Ac
zEZxNRU9{1;6G;AfH_be|n`WNeO*0RFbsvuJtReT|+wImoxaN}~N9b7SQ1@do9b2wN
zi>j7)wDaMbG<egxom=(%&)ZdhcDw3NZdX0JP34}~xlQ#mOXc~*2Qs3K^puy9=CgDy
zqT?#wi)+%`4XSl++TTBKT=UtDYd*Pg%^z-9ueJH#H>`PT)|*d9D#w^fN2d2!(V^^G
z6s6Vk(9i9fly!^ho!j>R&s(?f?A9$jscOO0%~hV9W%cr*2%P`@5A)HndFFvf-tA7O
zSF@L5S({3=y6wtRWQF8X8?Cj9Qfw079-*;Xwei_jtto0*58(2s_#%$-TVhw{9NDaV
zX*=wzoi}fm@!X|K`|plk?;i9mU0vtg&1e%UHm`9`=GYE#t%qi2(T|Nqb|FGUeyGZA
zE<T6AYVs7KySO+vJHLW{=-X{92a{f>t=B0YkIx;4ID`={o6An2@`K_V6fT>eaubv-
z?*(P;^<=_}%a4@~mk1NNkQ#J1&!^IwTQ$!KLy2k{<tXppIfcqL{`-d(3=|CND=RCx
zBb||H!nS+y)#%ku0~RG)8niJP^PHRL(EY~dSAl=$38rqbIag2sBA-lk=QLY5b@}E-
zfiqO$W@NKvK+)RQ8u3peIoiy*BgkRXsC^;a0<AYKSqk(^(bMCaWhqd$A}(C<-nKWA
zGivo|vIqf~Uf9qp&TY-n%0t-BvU?A1SI|L$pB%#@!3yykX9YKlRP$hR7?2GRBgPJ@
z0g^=}?-j>zi_0(a#K9PgemY1n4Z9t+lZ%-(>i`|zg{8%o`BM=-GYKn)4{dr-_X#%c
zL5(Wt)Gf(&(5iAvS<e>p(b!{izSLOA408=!R~vH~LTk{{9YeYR?_`oC%+CSVj(b)0
zD~}EI$ZO0&RfH5lS$iMWECAMy{Aumh@GZdnyo?oduwG73@nuIN)~|gGzXZYMOTTIv
z9)8$=x$|p@X}^6Z9-Dj9(TCkbeqK;bc3<wxH>P%S^!mercwzeezdG3C$0qe1?i_tM
z;1?TCHN!pTNYGRKXHffiEC%T@+#l)b9DaQqvbSCy$SxZYBWyqu$1RFn!@Np1jY`y5
z+Lck3Ur<37Yq}eGNp+`GP0W{=A2}a6{uRCjekDF@<+j9ah{F4@=*D;jaNy~Q;m0VF
zE-dA!DCuqqPsK$=(7K5SRLeRW3fPzMHY`n|eO}Vc3!`E18KC%~Jr53QxdkgVfd6kU
z?ZvnV42v5h;G}V#^0fA=HvVdZ$TB>{2s61of!>BK9qoSjnhdH6^@^JaaPlcu45pe3
zNMv^#Qv4Kk=5jPc&6k~7^nBa(A-diVe6J?J#!Ehm6eE+7ShgGUo>t*X-ptc>6sU%C
zW{6@rce19|Dd4y18jk9X8`iEEo8>IU99r%uzi4!M$?JkxbjEMoyn%{gTF)!Zf$C|%
z77bM|dtF%dx;GrI-ozZ5?VnAffz6@T960B~S~O%XbzMlgmUj`38#k-E%<x!^=Qzjt
zLzSt<77bRGyDrSKo_BQ-H*Q+FXh?jD%FEieCGLw{6(jf>3>hPSG?X35JUsogcv=x&
zdqvj?MR@Fj_sji;8Ik#7KMV&{`R2v_XuLU+Kk39D1Qw^EeS&0OIBs?o(tU@uK|CJE
zktO2tB8<?9rIz?fP;=(p&XxCuDHqj`a+UlY)RsBgc>jKwYHw>YZoHfm$y8#jd8#U6
za|`yoQhL-PgoGix1DKKKs#}nUmZY&8b+=~As^y3@>n54@?#cAeNTzp95v^*9$PKKY
zC!-jzuogfRC-=EOe9sv*Wr9WZ1Qp#O-naof0BCP`QSERwT0Na+S&(RgA!jBU`<H=0
zg}8|T<In4=wY<E@hF@<SYki^NSp9P5FLKLz)}k?0D;@&hxPDs&-k^=3WY9spR+~W%
zF9Coz!Ka`)A<x){DNiWz4kqv9^qH8&FdEA1!7nh&DKtp;VgA)z1;4>^je^<OkGP4M
zi<uK>0bT&il*d0#xzPj&uTUM@OoAv2=~9N;WfTuCn=XBPKj-W_AC{Ll&@9$3VoP3(
z0-v@_E+VElNW$0}{ymP92=lWR)w3v$%jX#Yn<#9mWKnp2k(KjMX<C#3phGG$|M0Mj
zYCFFSdE~-qxW`UvMg#byv7pc6niwK1g}kbGR)tJ^O0;W5Lli?c^V^Kds(U69=CksB
z-2k!N(LrPdlI{h<2SJ?bF5|UO<(FU&DzmsLEI!EAT^P!Y_}Ct`D?AP={1Jq!O68$-
z6{7p%QrzLfcxwA7jOt!>5~ySCy&8)COpZr?X7$HVz?mbz_P|M{&~9Gqi_38<V!<#$
z%V!(uVcOk+c)ihdw@j(+RC|jD6ciq5NGw``cGF!gq)`}ZuU9vq{cfjm-8mA#+h#?)
z^8BV8qIa5q9pqn!OOO^w59f(L1|$!1&5d`m5*wM0$3gNoj<O3S9B9u_Jos%28`N)8
zko)}UIY@+>RG>Qo<&~C?!q@673dProQbxDs`m?O*yq<?6Gg|U+nC256vjyoTUncXY
zSeU!Vgjq9azl6|hM(XF#)t9nxi+G2-4!s|nxUY`9x6Ra|@O!<^(!|ZIgmMSp1)a;g
zBHFEcivL0s-*nrp0@dG>_*@bv(z`ZsAJY^tm5(T~zL<!Q_oRK#%>TTUek+b%P4tqp
zckVg+m*ec6d(OTby~`V#mZ0!*x^aW#%a`ZX<r-)M3hQzqbm)f?bBY#jbN25S#{ItV
zr&uTC^hY<x-u*)13u%{KE#J~|(Qec;f+Ut(N_V@QDwov#vikQeE2?@Y>N2+U6dlO!
z_l|F6@A!sk_Rg(6l6<9h(7o3VzMOW@y{&feEmJOsFNjMm=M%3Cj=8tW-!t7m9qBI3
zf|sUZ$$QuCdGD9wy=(uWyjR>ueSK*`R<v;4dosNhna;uNy=Heu^nTMbBV%rA4PzOM
zX2t_KXZOcR_sii=zZ|}(y}h(($dp)GIUVDvoa1{_{Qa8x25s_kVSQQK{OwoPz1jZX
zWVXLwf?r`<yO|w-&eYr+^uOgD=>Gz0z5_eyz2<&T)c+2muApiwA<x_DMMNjYSOTgP
z&UGTE+r<9y`D`#A|KoG8mAr-T>-fSO23&dsz(j35ns1Z_^ZF^8X|2r{X(VsLBowXb
zB0(4fcQFPo#NgJp<(A)hcQfL`*ZW^`+1oKuv2EU{^<|jLt(eRmFq`WMm3J>#&J`|A
zX7nYP(j4ZrB$JxMiR@P%-h_4CjD_8fmC23Q5;kP!de|qZ=jVCAGSwR#zV)8JeDwyH
z&Ck<t7`vbR$UTVDbULn8M^$Ro@N3;tcZte~1{opAL#g3oz3!3`-m1xRgmxB0LklA1
z<+W5G#b9OYB{6d|k5=UZt<D2#&9BNmy^WKAd!v7Cxlm^miM&?6qRc-JqRcO4Ji@<O
zFdD^IM%JT+*X=5tl(9J&O<^}32iZkDtcVoESZj=lv|+9K67G2yaC7=r%#2W#!Bu8%
zjp8O<&h;==DFiC-iR4QMX+=tqJ?@3pr+hX?I#ktgSfVZ-^C>WBm_;OB;iYggQ6Vm4
zd%!Q2H;OL0Vh&GmZDa##_Uj-a+y*$u?r8vgT%?wm#Gqx?mLm-VnySoWS>glfWZ|bU
zo7w3DO5u%z_S9p`Tq4Ni0&C1zNviQ6i7OhPMsca}VVss5Pe>T+R?j?-0k2tViY`59
zys@wX3`JFdo|mYA<5X1;Fbm?781GuDzE*U935>T|Hk@luOI%!`z!OQySarm;V^}UK
zD$cK@(sdH+uE_5&^Ak$Vkj7^PZi3mMDR)UcJ-?_Gl2G$nxbTx<b%svv*~1>nkm5R9
zRC9hMk&t2Jht^<z*hj<B$mg^ZVOC&=#Whk&d4SD&qKz^j@#$|sER6-#E34U<nY@U7
z036Uxf*|L_gNq~vS-~>i(~&>8EL|u{LpMgsZT%cjUIuHz4@$LSHggt;$L%F=%FJPH
zioQH-VgAs^;pbqu90Kg?@SDT|k6NGpe*0^V-`>;>P(YNg!6?Sel}H}QUwQ=85~%2W
zwYBi2@nFLO0b0(1Jv|%E$=dS@-&dri;!6`@8xS`pR?B%ZqoX)vDB{--M{oV;9qB}A
zU3OXA_vm%IBoOfPPDv=>=iT{o0Rm=r?}>gImL&2~465GXf{AASMa&gih)n~rYab=e
zWB&T59-HpkyxWEU7R>b0USFmk>i02UGi<ORuT0bOeb;z>dlF2(;$U;~!hRRh*UB)C
zYMDEWr<{sy6n_fb^n&hQi_bv2`0I*PFQU2XwWWiJQ1HA{Iv*>QSkO1t`s>OPS#D$^
z^f{P*JKLSR6qm!*+Zo>z0o>tX>e&$^`!jAF;O^}jVnGAI^j&2YAc*l+=J_j<Mz1>d
zuq9ZEI?(vYTPd;g=_m^)qX79jZttK}SaIl2vzYlEw*NNBd@CxE<ok8doBhEkMU!cY
zsy1arqjvD9-FEkE5}t>VKcW+UOoSuL+Am5Gr8s9C!t)YO@a=ZI%ce`Ig^ey`QenHP
zPW5qoi5cZSm6Hkv;|V4rN1Zw!mIVN5@5UR5R6!+kvdOxf*toQpsj=WdD%!CR<&%y~
z7>?aEd4}bly7f7C#$ZFC-Fj)YaO;ElbX|ie;<pO-`kdydm^+^^zDs$R`5as=>RB*?
zbUK0kORWdIJD8}w;YsqZY~8vpuuCmd{|+?Fs-sFZnXkQC@olZ?vQY#U`|p1gni0&P
z+=6(4mBrUm{rv9eyvusAcT0k-dO0grx0D8}UfB_VQ`aE8Z3iV&b09(rU<Ze}@{{ul
z;~pAXhX@R6>&2|`W=2n0w1x>zqaYZ<_Kif!)?AfovtZBE*(FiKBLv1mz<qp<QwSfn
z9O!ruLsi`;wsWoAK&~uY^%dF@@HC9?I2z;rdm7M9*5O$g3|H)&tm$g79JfC5@8kCN
zN9$n^a*QbRETgoa4WURZZelVvRkM%)p>M^9T%u6Yg6(|L7w-0XUq*@i{w>Q~5=AW4
zt{CXGMUe+ASCNJ?o#6G6LpO^7%Ve&m1f6PXadUz<XK|%K^DwPH1flj}+CX8Zp1b#`
zB(w`|ueVRo&FV6x=)-SV(356!v4gk3GIAmi%cJvP*rYU`bexpIz(*lUmz-T#pz;hf
z*i+E(%4Zlp8R`Kr>nnr>UgK9!0A^dBvM7{^Pk$3xeseoh)x~x+L!xaRDbAdt`6al8
ztjoxa(r}DdWrW!buNeUxjAn?_Fbc@dhE(lmP!6TULUp8h|D5hw4L(njAjKn-)G|B%
za46txx+JpN@-egMr0yzkf1vN8ybXieIUqMJ8E%6Q^z+x$hW36gautWKq|;jcVG7{E
z`oKe$x=Gy(u=?F-&J`&vXUx@NlK>Fw6}QR#-MzX5+-fQ=ZBDy;*V~sq<L+65v8{fl
zG!>>HTD|176;8GBdv{MVek6903Y&g67AP@T^)uidKk+)D6*W_}I>80+2!saZ%2=`H
zgjSm}igNOYwICpf%Ixl`*ZX@ttyZ1xAcVepb0CK*MuBC|a|_kV?IIH7F@NX!?Gp}d
zx0%{5A*dFT`oU)#*Ig(pEs&Q4gISt5uO&Dw6rL;sRA<hmnRg&W-9V7KfiShSK((Y$
zHBYdz3Rl7B>P^}zV>R{byXVVV%gS3z$z03IU3VvY>GId_f7E~fKKX+buN9APv%do=
z?6#8FGSb+R64@7!$`(jw*OAU{BcWYWN?T4+y8~%$X^HK6QritAw=X2UT}y&vDem{y
z9{}s`?LQhdxyo)T%gvGJ7MsGXa@{p#yK4FF2HWTWX+W00TshA!>s2`~@1?r9*Q^ls
zzJ$PcEun7-!EZU?Zz%zADItxjN-40p@S2|a08~hd*OeBV%iR`KDKsX*a5@O?(yDe{
z^1e5%eSOm!&-#+)FL~Kf^WMyMZ)UqUv)!B7{x31JU2~thrm5}T)^<}{n;~X>9b?-9
z@yKFNyO)suBP1kc8xwN&y{vREE8WXV_p;KxtaL9c-OEabtQ1ePK3@qf8%(E@NnB0^
zdvnq03rI!RlvNBN>giLr_2s0fKbcr`FSy(bF86}Vz2Ndq2`=}(Qg<(t+(@<vWHOL?
zDPXJVYQg-3p&K;u9?OK$dEU%TrIr2^6Pyrj-wQ7Hg3G<&axb{t3oiG9%eN!A+<`4y
zWWQ=E1Qx8?1na$sbhjeXV)M)OYZZl{Y&s!H$DTn|WVeaO!4a0LQ|YBhR@E^H_bf~(
z+hM)kbZckCsRGPq7tCr!_ozV}VHkbAqm@iA;;TZz>>^C4Tvu-qM7F`4v~aXbDiA$_
zij&>RXVrBzR+YEF;5J=C(7YV4c@+Y@X@%QL!Z}8fKGm=5(m-+41$r1xaf5+vqEED$
z_Rqsl0cI!t*EA4GLnu<$N+?>Ssg*=1e;CsTr;?xu@cxiLW+thK5~YAqQN{jzR(@U(
zt}Q%{1=*)04nqlGOdOXD{0(=ua)>kR`cRzreqEw%*h+egNgTDA;;q19q3CV1jEJ5Z
z^Yeb>v*a-@8wLj|)hU)&Y^z(nNHj`l)50n?GF~>BG37<gYZtcY<5IiLQdh(Bqgf%<
zXmwHwoLfpV9Yhzn=7)1~#^k+ps&iHRXA+{GF-1dDkwY+ppoD0k6miZJOe9jX<X0&y
zbD3bJ7+%g8tuIKs&8aLY2kr{x%M#iDFq26z3dTW{rQ7bqA;>=$@pLpqjrZY@RW76c
z-2C21%Ch7!Cs#>OyWy`i0{H{s{%E=EfnvWF-S$8ojr|FyFX0}sOW1T_H|>60g52{g
zQHyB3Tanc1i;;WDj8I6fbW4)AlWNzR<L6ILgNn!sPYBY&GX%4kM-_pqOpv)Vy7Ff!
z4Zt?_!M_&jkplg=Wfa<emkh(mPbw4t_*IF)#GaLdhKWw~);xdCJeUQWuF+0$*$}sa
zRYI9}>?nH2Mdqh3Iu8~i3f8}=c#-izD6itt5;1gQH2@P4b@@TnyzIx>-gv^Kr;(5b
zdG@s-zazj$UmN95?h56juZ{92w*p*b|4aN~P}dg2Jk?;weeS++U%Ic%U4N&PHu`xf
z$@Gg-GMSg9bX>3Ia}L@&30~YW>5I41<Pmt!<(C)o%S-v?)yHaSShNDvE1FqU^cB*J
z=xI^emoP)3gGEK3<H}bcR3sqp+%N<AA*Oz-%0P~7P;R(+k*1SG36N+=XjG;-r>^ev
zoNJTTt+3ow&B?;~&^du6LtgbfV9OWwYy(=mwTCH|8qtZ-_Z2zNmzf9a98}?dKJIz_
ztL{9}iie}YWa&K}VoQolWjaZ#R*+W0x`aNEnWait&~>pe-v#ESPXO_llGo{*K~<oy
zAI-E}rFbGJuBV`rhk(<yrE{Wsec4rIt^zXCP(r&@Pm4Og0v|x;IX~+QkEB*WX2sNO
zlrql8DF?m);OFSwcHM`GySn-eK2{dC2l6$Df<a?p!D^0`cm1W=*4OJ#RG}o_oh8$?
znya9!hlUltf$v9t6lAtl@pkv%#fO7m$pY+kTixJ?4k%C^Z>_tv5v-dt^7q~S4~Osx
zW!JpT^(`p7)^yjsR<FHTEW5jNaP*qX_Pni)by>E%vDscL7Jj>PfbC-8b#JZHW*`8b
zt&L8x?En1me(z}afQ;ZCg0RtqryE{-ZL1S(m}L)ljy@dh3n11vH=*=80o+;NESCLn
zutTGRvYSvA0q!9pdcEFOvF!ft`=by0y9`6Cv&QWL(l*xCi)Ae=XAD!)goQZ_r#6N_
zB!Fe0efp4Rkgx_X!x3G7mD+1@n@~@D5w*ra79`7tO{CN0%pU}O=*D)rLw+PWjlxgR
ztUq$OsE@uR@M{p0fj@KI`nc;}p0BpubhT4n{y*bR;;nCVTdm#IcDrh?``LY@q2#eR
zLK6dgq>p>vQCK{UhIL*B9?_;(7$;wBy5()Q<}_n8Ak4US`Yvy9(S@I0uoke$CbSpr
zyg@noR%W5&D!b6fuWtv{c&i*+X|#V1W2Uk(N~ol%QT)~{j`E3ac$Ciy_Qz5`#U>>&
z9k-XQRmY-*UZJ5P-N9l!gY6<i7c4xsOZ!QX#-mTc5YyMgOxtPkjeiQl9v#@`iJTXc
zW3@OX#y7%tt30r-Z=aOS(dTW6wE_i%>;gVY7tR1T9Rx5_Lvc8}@*#gz@aUTOGgR_n
zW>DX!Z2x#jyYil&!;JFt6}vxxMyEQ2NT>R5PlKsxjKwPgFpuJ@n`|#xtBxu0tC}e(
zWaCLT<3Le)wWB}k`;)LprBqO+z*bk2zKY`-=kc9uDW=K*RSP3!^8C9j^x+kE83N<s
zvlk!;i*8p|R$zyBhjEZ%;&u{@1*zaYkmNZ8)H(%eTf*+9GthuOdr-A7P;nwW7zKWX
z>GK7>y4KZ6wPBprY&RUOd3io<?zv9QH*9@YUNeDioTI>Uv(of*6j&}-!nEp!)T?)m
zeoj`D48x=>bY#iQrtrO_vX!ZVG@}?I4UvQhsg)Up1*P-Qs-d=BU<5Qmf=jy%lpJj}
z9n1t4UZd(aOFj73M{mV?<G8R(k72ohK8+OrdEg1})Jk(zjerC73<g$X0g$R|9Ayqh
z!%7M$?8|~61ObQ%2X=ZH%*yzxpdN#QEHhB1BK3+oD!tOCAk>}dzWyYLVZk);*v*-!
zo;w~FRO7)HCQxHoZ|%&=;aw(89Vg6va?v7D15wb2ZNFdR!K>Q%6vU$M{<HpY^XRUv
zw!OBu{uqBeKG@xP`F8g%`)I-6`uZAvwl{h${geJW-QIWY&PIE^)7@xyyWh3iYa6ZJ
zcW&!zAYcl5TH?Cj1=)ok%|q0J_hKyS^P8G~z8fTPLE?1Z&$0{LwzJ_VJSE}69mm5d
ztYZI@AA*!QB14`i*7epL^qR&f2N}hi1fRkf6jRiU(L)$dpG9$W3_v3RdaHN6uIJ#=
zgL?3)<B|Pfqe<Sp@bZWMw6*x>SpUO#@c3@~!1b`P(W_klxLoq}zk%z&x3T`6+q+-?
z|EBpTl_E*AufhL&-SzcWf&Z^}Tb+CU|26(jPH?VIPTbYiRaZo-@o9~?@0>zBo-X<4
zIG*QjgT@z6(lFgN8gcz3z)O&5J4k2a(|8mP#O+9@Xqv=5fhE_bvY$G_YLa@?GH*ow
z6!wy2d)wW`IdNZ2lQDcep&9xq%|PIXGH2d2ea7JMeX*+6b3aLD?k|3l`d99gQ~dSQ
zgtjLyPR^e-t(A61q5GUJ2uv?$&=>5DLG;r(2#q6e5Ra>BEd<b6E&MsoPNd@vw`L#l
zW<gtB7&RMn5Gc^+y1#_k1?=0t(R!18#<>}H054Ai7mXr58Wm4xZa560j7-C@D?3=&
zfGwlAJW(&q@Hy`0cu_Qn>2FzXcoE};$yw@@hI)iIpb6=MgOE~EIQ2e6fF)myCVHBt
z9PlOrmw3>QBrZmdiZ28@JUQ8AD#wQ>CqlD3IRUinp&28UO{EU%!OE7=gu>i7lyw~0
zjN?4Vm@w8taIp-Mz(@0<0vy1TGk~~143PBM9&++ZS#{i<_j@OO2U~z~`6Iwz1a-M;
zGBxZc*t>%JdH^u$aQV?l^Pp8k*2zg2Wny%4sE$K-MimS@+)NOq(}aTOMl&)R$h+kf
z3HlMgAmk$%ypX`bAhBT!&F>Z&1q}!WL4mVGq$ei?4@@Fsq=^@W4ldlWe@WC4jGe$w
zX9xk*9nw@^p-U>@e<#Oo_(?R5xaG^;5&B_}4iZ??c*^UPrU;riQq)#lK@y)Dm8CGJ
zXd6qng(~{&*)x`XNuCbJ#AXQ>@@>V1kRGs=;(@DtW*)Z6r|O{9*^jee+ue`HK?JRX
zPEEd<tM1W-B%PBJ>JUIiE)%(rw1GWx>oDi^<WWP_!w|0Ubc!*6qB2_CPfnWZCqab|
zf^6Vn@Gu*k^`<4m(YjEN8lLJ)f9_uRFmaD)X+NU5eZ-3!+EC%HF$d`yfZ@naP6Uit
zlFx>S@^hzEDkmy;CGc#ZU^MbH?qUon#(AG#VDKc`Ic=ngG{^)@bDZ+A0k@CDjZOs-
zW+5L*y+|xb!75H($5&L4s=34P>?}xtgZ}lTkE@;98RNb7!ytnV2sTH30huVfnBv}p
zD}pq)l&<WinAadh-xOMMI+?NymBJt+A$J0XeGV@L9?{6dgm61S3cB!91_}*Fm|-0n
zF1M>)3W|+$>rd2!ZMXdlw*{DLJgIqv^JK0!F*>QSn!6F~4Wl?ZhgY%QHN|QbM)ZWJ
zt42?2&s0$@G^^}V&oz~+F_agaQevF=E1}(Y<>9i}xL^<Tp=rM8lu?IaP(-+M(670%
z5%vv6DdjcZc;ON5XPRpMnORmy*dd!G#YDsA`6IG9QLY2!5S6yF<o+Vn{-z5HU)}{O
z`2cJi%F4{EO+ba6u;1rZm<CO`?sO>haVu}L%b?8v3_G^GF@A7?Ny2!)j4v^udmM@@
z_-JzyiN!)1q1IS_<NSv9G;dA1f{Ev%?WgXR_7r<kW><KWGkFZL#zA1eG#Y&z!aWfm
zH;k%OQr=^)JyB5U&ln=@2|~lG#+(c_NyOgC4;`pz4C2|4tt=r^2`rpY5N~)6j0p&>
zt|qET7L6a>i})(|gb~&uN6-sfk+An*b5}495(!0fNH|DKqW21hg)9#}1en+W8fbiG
z$b8Tt-t~!Fa}o+655+#6lKjbJL=z@1l*ymv0W%-vnffrmVEA|{PB%(rY57y>^Tdxp
zvPs7vN7qW7L2nupD>Q9{=WG|6`Xgs5j`Kbt*B0cS1J@tm2_bGKfel$GZ4n>I_vDgf
zb<ID=!Pw3$MEN<)YP3qvrX!N-7#P`m7@5l5L<8I(!Ro7r9teMFm`z2AE8qk{VQ;>o
z`=5s~%<sULyJ_&*A0WeoVv+@2M)6hT02>wEtfF8?f+2v~@LWywBC*TGyT%2`I%%+Y
z)wb?BW|^*021SHzw+rlk?~JaizCz!g94m&T0$LNvDUbLdl(>8aD91=BwT}zIIj#}u
zm?Z@@br>q%bs`-UA`#?*sHXvn5GX)VjGH!b<C7B|B2npSA>t>0l{;Ay*u}TGb3q#@
z`K55tlS+v}w=B9jOHt%&{}au$PzzN%b<&z<yv5{epyA@tIkP2{38i`xM$l<E{Lu-G
z4U+EQzM@zt_7X)D3P;0frWv~BE-9kQ848E8Y0OCBC0&Ds5(<mfQTxE1s8-55-o&!w
zrT>~DH#CKN^{~9}P%|DEU?S0<FzuG0>E0zYM~OcO@F>8okK+_s{QzA#kQ=zrc9u8D
z#if7xw!4#IiVKm$CJAuSTn01XliWiMXh3c_B`RR8mi==xA$zI0XARVKe-24*hq|Jg
zvqNO~yg(}~qSW!#j?ngoJeiFq6lNWXJcF^X9ccOaY?aA=1e@}7g5s*7W90n+7KERT
zs7HjER}*D$6Lw@lt9&$BBp-=+8HWBCDRmGg13bJzu=^mM^aWNI%1PEqm#vz*sOUo@
zOw@D=J?bqjO}CwAg`&k)m#I`2o|olfj<bWrL&gc=@hzoZ7MF%W8YU=@&?X}dBt<(E
z8$}$F^dq!=1fRo{xCiI~egb>qbmSX0)wzZNVb7B9f6{&<YDG{3^src1R!$!muv>t1
zI!zW&yzUCZPuK}Wrvq-!oN#RYrtCoTNpO{Sx3J`$k!2~2q|PQrUVFC9U80)+f&=>?
zD?%`v$dL`(X0Aw*`x4DDNE4qzkuOV3zdkSIU`8av<a1o2pQa=!u`F=sR?m1*AnX0e
z!a3zP1D!t?%TZicj;X>5lMA>rcMResj)w7&DgNcbNM*J!6x>ImgydO5E;r0nTwGey
zEW<_Bg%iL@6*~eM92Gf6g6>4?aSD%yL3ny)V{+@Y68CAA7h^+|WxUlac$6gswre)@
z%QEx&QL2)T`+QdP#f?Z|D+~OXSf%rlRa{Pz>%PK+l+XT{Qr^JS44Ki4s;1zWHU-;6
zRL%g#-Du*O`#mSSV@dJ2jCi2M7i8ZLQ#{$Jvcei0tnEOcB+H_}hy-j(kGiqMR_;{F
zjIUtlt0;*}wNRSXB@qoO;G+S-#AR1#7S$(&#Z4N@BWUbVZlZuWA}g#uTI>!K>foHD
zOq2psw8=^1d!LL<R}DJ?o|GY7iVp$;(5ANX1a#>zdbZL8?gMPNO*-}yJ|cNm6r83J
zae6ZBkz@0=&|Vr6j(UTR<gWZA0@9Np=Qg5_`v?WA86FLtKcXOC#;M4cCv2TauJi)w
zckIs)M{I>eOGgUZAMTI3ZZt#2Y-os?vW#K*5Mh>0Qd5JA0FV?<Gd8Jek-mU(z*;y7
z81s0fuq(0(7*kJDkKlj|czKRaMPQmqr8eTDlHWgFOwVSM1rmLs!*`ArK#~wvE#xWW
zKN35{iX&R23<^%2YB%-ME5I~m;-hqal*TU&&m)#dP6I-=G98a*m}f0;s%TdZqNCwM
z2uH!t(A~5X0L&_(9}{2K*l@(!{+LWC{weI)tTD^QS2%}u)mi2TIu%mo!qiDGP;f%{
zF5sUT3-MxqC%y%Q;ZH{yekJ-U9`Q6-;X}ek8~Fec8lWY6KwM%k5`sO<-`M{xPLTLu
z`~dIjz^8PvbaE&>qX#&7SC~SPIQ<}lDa^G3zj(rn8UbpXy7urWOdkn>5EfL^F%}bU
zQM{Ux(=ba=R*>i9<+C*NjDanGssTO%6P7d~pr~i5Gfe?<UfWlJRIkFcN|crHw(+nm
zm!3_d%UMCNgk5biGsH+;*9gwkxt#6|El;{0a8_7x5+L?Uv@#V=&df06W-(6K(yJxG
zXrZ~<7<kV#%|LR8qTjo}xBf71menFQ3LX4JNMalp`aSbMA!P;qF=8-}ZOTWC;kaZ-
zE1!SZz{J=m!Z9s2W2$hHJhMZgCD9wIMRo(D0zLNBtVn5#9@kVpFD#BpNVyN3cYa>P
zTD!(fAeoK=UhcSN*ci>6hxB`V#mA{`Kb=P8do4U5(0fOmEe{<IWM`$`m)_P?J{`nK
z(4f}v+$;ISOo7w^u^f=q3aRf$2Y2U!VJVlcuWX(a(&P=C+fX`iwK#?#u51n}`81Y$
z)b9^@X#Gc;2Loezf^ik-?m_F)QAhdO+lJ@pCzZSxo9t71SfJ!fu|@0<@t6#PGCmWY
z0c=c6I2kA&xFTY&0XzV@K4)`EtO!u9J!$nv$7|9;GEO=SP^XI1$TLokBjgiJ!X<A6
zxVs+&%z~i}dALqG-Ho;z$2rv6@XO9Mg3?GO797~Xn$#8<eGb|ja|!=2W_}nF`JRTu
zVPIv5wgd#?Oel;lkt=T8(u($iNtp9Fn22(olT^iEit(0#d=<xKrcKeXK+=5@D8e|g
z@kDa8FIslE(dT|rhlY&`lIiOkLFx|;`%rF|u~2~UXc7Jxa<Q=$cZ9wlXqk5b+L14o
zmxE)-cT=(kCm}h<;2K5QSsaM*;V(|@JKpk{4WLxf#FH&@H*rYhrEVw$D!uSYG^SpF
z1AsE>N`xtm#COk=n2mk<?08O{)`KbV78V5tJ;-$QPKDcyP+K{FC;PulBk{{>Zt^(Z
zOfx*aN~U3E78G|fi2|4v6eI}D3!18ORLcXV?qd$}l;75=XkCAY;l<h!I&prIFOVnG
zf~Rq)o1kdDP9`JRhUhoxIXwR|WqfY%AVDjOCqMw7f)Pns!n3T2JHa53$YA$}e@(+g
zxDBzmEQtg9aA@E}V%&nsTG5fNbXAo+`&@G|PBe)zIr7l-lW&M~)=8X_`opX-b^|{R
zf%S+Md3+JO#Y252Kj|L=WZ;;Rt78+Y)o~av!Z0NU!pEvC6iYi0Z>;$1%xG38n4Ks@
zSCywOM;P)?*z9Y#l1>9OnBXDad96{XqB~lMTF(kaJYOVHev<z-&cE`<#sQOIqvJBt
zNM|<GR4oIf!e%EP0N5zt<PTsB+wPh&*9Bu}BOIu09PvWp!x#yX&(nsKt`|KCkL1A*
z2KG)dy3`S;0mQsvqSdU(XbbjPD(*NSEQ<c=q)E0WYduO~Umvh*jKwd8L<jb36b!+4
zt}gIsY63gUY8rrENuG7W6G-|?Hc2u6*EGPTQt{B~tkQ5(mSHY~*<;pKCVq%<pUAV6
z&9WYN=bmQFY~-$)AQmW94o8X`8`+rS3A2D8qP31(|2!f#P*8KQ37v`ln6qkN<kKu(
z<+^C~OmKne>Y|bvX%ubr4|Fi{Mfy7?A&Q5@1oSCmky>hlye_ZeWSFvF8R@SMcT4j{
zGtQL74ItA2@cCVN|K*}-c@Or<*F@hfPlMvQ3@$;_8V|%wt}JTb5UfRdRw^;nT=<e|
zkROA(hO&2pbP7ltTsoo5&n6{G@;@WFTAqbuFiE)goQ3C8c#H-e;i$=ezR;yp5W!9Z
z1Wy76Opj?t`jMPLA1IljaS81MzB|oAwEj3M$QVu4g0dCYCu0Rl$--cTlXZ!aMteyd
z3APLr`#<R$h|jd<;?Yz>1!LhGNoFF&IDt=#Rx`S2%1Mc3rUjmv+L&fjwER?EA>cSK
z1r6>l5_cU(Sc9B@@*fCJE{Qf$uh1!2*+Y0jq|c9^yRgC<mkz<M`_?!*(G5>UM{&A)
zgjd&(4(e4h+gMXRH*JB?qOwd0>1#kot7)va>(K59kkVqCdt@fjU^^}~19=N4mhHJG
zo`v=fkQc&+V{35|r^RJ@9%R*ro@i}rTda@zp+{cEusaru2(UZ^L6fiYQ*(5qN;6zb
zfaY3OoI8|xhki25iAA5Ss#EB@Lu-ZCbJ^#)<ndgI5}SQj_n?>ih_I86!b{EWsKhR^
z#RA)@4ROiiH7y!0(3MZ`wowpGj%z-y_f!05Q2ThSm*wLbc$b$BN$?G^^8~M~sq5!f
z4RM~+YGUph=aoqIUouAy;$hG<);w(UadZxhDnZl47(-ZwO@}379UrH_eJ@kiV5H=O
z3}YOMK!JkhTtA&Tf^QQg@gYRc2b#h`ZAuPNuy+GL$U@9Agrx|*&NNDb5%GMT-Wn{u
z<Qa--XJPd`QZ`C5y0TLlivCGZLoHp3%NKDt2!3P(vOIr-vXNp(d2j^!5G285<PYSg
zXhto;C{Q22g7qQn@>zIF+Ybu`q)CXHh<^40;MK-NlPaX3{Qi!F6i2e_U&xnQp9y5t
zAfQOeP(^6TeGRuoi5fh+VJ9R;zTBRn$6+wR$wt$^q*`8W^YYnn$UKGR41+O+q0oIl
z7pUZh;}E?Vq<|Dylux0L8JKr`7{g(fh~cqb6@CtAot>OO7dU9>3N?2lA_bih*)|9R
z06Fa!oI%|lAPK#R4X)y;H|-^)9fBAd_^5pYD8xGRRl!k9(s@-AdQaJs@2B#m9&<w(
z5@<v$>v>KGLE`DtHb!Aq*Y?gC!G$LT&<#p404+I(keSUN4nrY-aWQ#7EZd;rP^*Gz
z5oP$9D2}ockB{&sfJ4ce=u>Idxh0E~YH}watffL8z$GRCGL8j?<fSQPAwS|ZHuN)}
zFBfBH%Txit5ei~vJ*O)su3Qm=zc5L>8;U?Q<(Fu>F5{ss$&F+v8iVfRrzPVf&njY1
z99purErf2Ax+o%uHbLI|Xh!jH&2!c~_u*=q%|>+kK8D`$xD*HRFjZk=4-=YUXh6<)
zjg6^vSir@2<npdAcm@-IJOEbAX!fIIPw|j!*9vbBL+O|K@B+Sx7!SF@VxAR0D-9T_
zG!qz<wC~YE=fI!$30j|EmU9z?o5`~S-#wk4YYPxY@^Dojx|mEtc^)u^`#3qVqk$<E
zIwVsG1+`3tDefYW>*t{e4#FYQjTt=5DWa0lAaw`N>3Ix|*Y7hVgupsg;0Grs4W2>i
zD=Y_(4deL5gyhxv=ql4}B2<K#jwDnO!4e90FA6)8kv-q1a%#TEGO{Z7z(YW;{!*ns
za&+ljcy8sgc^)d1$JL2@57}?J7<(%=Lttft3o=sb%99wb?#6QN;~cZ8dzL%3W#oPW
zdNQYJrCpExs!mRF-z%Z$q9d%PAPOx{mwoImY5VcZDezxQ{F=P93H{M(`U`bQQw{Wg
z<BhzPDSz<=UCIRH=u*c0V#XQ*%^?*lKt4)3v^cJ=(8dbeK_T3fXq{yO7Q6?!n_4c!
zIog@B41mDJr3#O6hX5SC#<k2xTIe0YmQxbolyc?phFCB;mt$%9)>3p5h>5YNQ+YkO
z6k}t7;^M0aDLzkLD0NRJ@lSC$q}VeuF`7EGmJArxy0ZDoVimDo2qjM*?5QB-+of*^
z(JRbP1X(C)&8?@GDI|id(tWhsiOeDB&YUY|63CT>j+}+mkj1#s!ecWvqz<VTZ;+>U
z?r55(W*sN<vpioEVnh?Ujt~u-GWZMDWTMPI!dQVcqSSaXPd|!{98V=(C8&c=fd!EP
zs?L;EgPQlxGU0~Eh*td|`Q?7s<f%(;P3lbV<us6|o1g%SAWZ3MOs-?8?qt)<cU4e8
zum-MdI^_=kS5N{I*G`^W*;qTA?O25%5U<u)muBJR^Tw$-u@ZvwAdj<li1C+KlRZ7S
zxtc0dgX?r%nHF3xblsHTdR==u@M4L%slbbc?P<V^rEZe~ys9mk{=480Qse@ql-sw6
z{w@^NQf%L18(jt^HR`QKcoAVs97pYFC!8AD|C2Ia2)9FHOUQ&T2zh4sYy>d3Q}kIv
z`)<g=wR8q30;_XvFF)#45;yyLl#Lf`mN1MF<uz1sA&<F;DlX(Htd1q`SSb<mvKR7L
zb|T9qD+S22uMPPf0Y3WLD1UNSC?9=ols~x*;DzN-bumvtf(eG!t9fLp{AwQg<ar?w
zTfdq|K6zQ<f3I{tsUQ{i;N;ib7%{ixh@^D1y)(l>s^}aQrkanj7U@;c&YglU6v-2s
z7gU+8l<y~yV_N2Z0$FyM`w3*(rS2zCKrC@Tfh@bs{RFb?GWQe6vdi30Aj>XuKfxTi
z$8tY`zCf10pP*E0@%;p{ig`bQ4(y!!3H1JMc0YmMg6)0+3!}L1{RD;tRK8Gvol13@
zB$8}-t%ki;0UuNduQBMX_c|ME-EMcI-Pv;JM9i93#i@24<f0;SLHMr1T=~3cIkOTp
zgI4}A8CFs@`J*)%n5?pvlhmWkXexGJIh^ImyePf_Imrtyt;<UP)ct$j0vIPJ8Z>P0
zox~!%f|GG--aeG8LuMjDZq_8;2Fic_19OQ;W2P`yN?R}v)?tS?3M-5;a-SkcghL3O
z5*waJgdaM;kI?}xn@!Nn#dv6HhGXqsQ^|A5>kvdYTpS`xkqYz|BM(!jI9`gx<l#ck
zDEVO~Qga+}B%-t<O->X!g*n_QL2HO^pjG<;Bk4TI;5Vv9^vo$3fei~V&L@z2getON
z`Wn)ud^@<nGd~r%r^0h63WzMdl>Zp$1k_eU4K*b8ojmut3<?~YsW}u$$s_%`f9dD6
z*Dy$|_{StiszRt)!f4|0uwlxXtn$<lV%o`eMM?k25j!JaM`Qlj<0DlzEteAuvA(ag
zS>1RmW=Yxlc^yUWWQr$wa((LiH{gLx2IVka%61z^!URoz&Ww>Pq%+CWnP6|^CWUqu
zcG_lpfumycq{k?_=D}<w?)x~zY<DIO)xyw2&GOYReJu3V!{aN&Va?e4n}QERc9L?b
z7I6!YTW^cc&WSwy=fhOidmOH<nf+Yh@fc`l3xp+MCqWMyUd2fh-DuLFDTCCJ7MT=I
zgESn93<!nMa$Fc1Nw7ikHjERet`WWTpTtC@ZHv<NDhx(L^mevcm)RszRFI|R&lC_-
zw8_{qDC9lxCgfpBc1_e?;X@-TqVP`Jz`Bd#Ohb`HFVCwiI1>%oL&LM4s=^j5%+X>*
zIYI(|84faJQ_6bJiF`=gb!=&#jGR#&Z^PP8sRK|*3YniU7)_jH$n-)!E<HM98geC-
z4vIU?qb#_42a{~5tkKrs=t6_EIKne`4k(T<Nzxnuoj?x5A)ak=xc&^}36<dmgB&=7
zLeaAFk_tX&i7&U4COeN%7c!<nZYFpV+cX7#KEF!wKphqqWe9-5Bqx%W^N5=&W0LeC
z#Rm0d0d>SxOv3NAMxqcpn+Wk6zoOJmpR7XQS0NbVSC+l;8%x$TzS6!%N(4SuswMvz
z#sm3PO^o<Sz6tQ_qXj?~(j=I3+LVpJFI>_1S&;1T5v?$cW8N_sy~yQA=%r<)hj0@L
zO+#~;Bd@Nq(O4LsGM1;<;4IJ6$AJ%|DV!03k}uE`mH8MsNm$uDGCe$0oKUSG6cGiV
zXj7uRF|O}i1S1gk^LtasnN}PZ^4Rb&{VV2wo(#{vLjLDYyWLtV=KqFo-TVB{U*qrL
z`<Jg^_SgR6Jp6zE&;S1a+=Bq!Dc|^~?$1Fa63Idlkn{)ag?^D`lkLZkudc4Vgv!Fs
zg&C0l;<Viso^$=hdGf@4{HhJYYs)==ZymQQzIEL-@omlRiEll3Q+!)@+x+m^v%g>{
zAGOud8^xrzuRwiqAHNPpp8`xZ=04ty1~Dl(kADfH9Z&`G2m2@%ASjOyr>Dg4ALCBl
z<_~y-ZRx#r?Y+H#Z6FMi)#owDP)l^!S-Qiu1;bmq%kI)$_U4XpnZDMR?rYuXizSg`
zc!vM`h<$QmXt&;QAHM{>0$z3m+5Gpf|Bt)g@z%FGTW!$)x4dqryUx`PP&qqxyWO7G
z-fZ>U-o~1@*4gN|YptHwS=;Ekz0Gxg@=*iz4F=i?NO$N&T?cjJOM=?zp)q3(Ana@~
zVBJpJ>vcCa-8CqGO;9%%5zV{P5gy1aGnc)k=W^=?2wJxwsI#%@wTlSalyBSct%K<3
zwAx;4qqF6<x7PT{@(60TbXe(q3Y{=C8}#oM{j0;>6TrR=hN1sF{wxO9+X9-}fR~$V
zZEtgPYZEKI_sMg;Cz#klz%e<gORNtu*XB3xlX!3#;0PZh7kzvLqNDqG5ATJ3E<Rs~
z&pl`u#HPmwafXMzE%z@VFg-p($60Ka-tmCn;{{B{cn#K@k7(mhHX?I0Jidw%b?hVB
z{B}pwwU21)+a1x`9kI-IZv$3%fg`kG{jaxR{civUHa6gG8@{Y}@JX-BPp-icddqCI
z*WjD$OY_b4O*X-v1x?-F7L32R3Brcb?g3JIn?0|GNa=2Y65quqTO0i38ff~WyI^}0
z)Qm0YqucIyZG^0|2K)4ScMXQI#!s#R>!y{-w^_t&GdFK<l=%F5>)Yk?ceMwvw_Dz3
znUvPOHW5y{?RANiaAB_FlTMePEI&P+)|Vvv4op%Tc|m&<B`burweD@SNM6|BC)a?r
zZ6_t>&7D@6hT7jO4R!20>w4##-G@5%oprtY?T%>8KBBd6cSJq=h<e}dh}P{RTK{%O
zwDCoEmlo)`t*te;v$Z7zm9>_)z6Pwc3;WGA1(l9{^Y2);`;BjxRU6y=yJ<F}^i5p}
z1eB*s#bJ<}`J=b-5E}cC2K#tOPmfYHB<|^jpZTNs+%$ceIy2p1Ml=0Fn9W}z`1P0D
zpqQ_>dLVPQI-A}053S8wt5uWbu+Bf~(@34Z{G$P{{uazAQ3AF1o|B_M!Q9q}NPH8X
zQi6w7w`5yv5MBI6XY!@i8J}S`0_eyAYu-(E4Rg!|y?F{V3?%gU6-BFb#g_O6gKT?k
z9f4{tjMj{uRV<Kp%eFw)f$}#tI=n#kk$AdYIfF!ka*oBg3KyvrM$uii-?fd6Qon1~
ze%~j-Cxrk3MDZH00u*aDDB3o44+ON9Vh;>OZw?e)1BzSTkWm1-X9L=%(DXnZT`K^+
zJ_qPE1L!3#Lnr{YZUd}qGpDtCC2VfY0jy`vX`Y_60KkR~fK8ix4&REH*_;Ewx&grT
zGK>~r+_b>hv60-`)~2RIFpOJsVB9cZTrM450k*AWVFR^Svwje4Yppr3ZJNtLBzG};
zUu)TVw=3#BZLj9u+jDx~GI}>tQ59gYG1mo#piSKn#9Vky=fZ1Z1u&de)<xR^!78yR
z*Ptb*N&(`|vRG^P)=G0`GVnE%fvZqnqdyzt?${UkhPK8EUGQK{Ud>4c3f--hC#0SC
zyJq8h>pH6z6VlTsq^D2F`hp2*7bZk{trg(3F=ab=-8Bt7i58Rfa-eFVhxIZh*5-HB
z?X7F;L||e=7Z6$+CVK4!m{==PM=8Lx0P)7MIO%M*OAFd$$7=-+oQEEoU0S)T%|f%j
zR_=1k+9eO(<gQxKliB~)vi;-S6u5h@HK%`*gX)nB=0T~IiCPt&)`o@vYo8|H6plM)
zcNTuxU38STrVX5lvS&!GbEG=~pDsRExkncO?JSFzPP<*27?Vx*OqQU#Jr_E)^2$xC
zaJ^O(hze-v>1gP6$`D8|*?*XBvZ!qsFs&^MQ*WzNW>h8^rj)BYk`_AcS-3dttAE3&
zYbEy!!CQ#3LU0t~n~*}p#wPX~!Ar#YLZT2eD#r6s*HTTrr)O}}H$ilsT>ww$ZBnTe
zlUE4uke18;4#uwg{D?d=0K%g)x4q`Axkqo@-J`!a|H{iM{NWi8;cqae0#G?`4{DBG
z5TZ8PYnuq{(GW)it)U}Er-kja4I?=h8e+pe`i*=hif`wuj!^07k-KVkg&_YI{bvQd
z)nSbb0gvz<opS)v$FKmm*z%yBjoib^mex14mWn876ApmJw%T2o<)bUY>l?;!VT{XP
zFa8f1lJJi?7mTZ<{OW#jiKrIBQNQtJ<L-4X8<%~~pA9^fs>ET}>k$&$jJPfc=J-TM
zT}cgJs?*li5)%ike6u%y;_mdabhmU_x;bs~=5(=C)=JRqY740hE6!hKRV55pRQ8IO
zvb%*#*(+O?!d_Lw%gtDCt8L7fY@jfA9h|xx3ZA&S8rkA**4v8+0}r`2*FaC0OBmO?
zj9$Nso&d#Wyk4ulwce)YOr<U_!=25&tlp#{adZ8W*jVe{9O*hmE$*q)tHwLEe>bQW
z!C^92zm`P_mR%(Y!;XJz`fY989F^J<TG-Lr=GHYjYL^#^O1UdjArZ<rOh*Jq;L?{F
zFVrSP_kKq5g2yF+MJ?eL%)e~@T&h>t+^dOgow@&7x3dn?;M_%Cy46Ld%blh&NUD;i
z7|WGp#p|>w)AVA3dk)D8{B*{5a{8Q4o_y6kcgI}lUa#Bj^=S91OTK{76UyOUxaM<y
zExI^_Vt$t3J_Y9ExkqXrGxJe4^XQD5Zds|xy<}G3<>tBD?Rx)zd*9yNwvp|bzg6Y$
zfMm)=Izz#DKa^<h$g!Px?!?LXai_LSmkJ^w2{B1<0MN2_Hv8GP&*^Tk(Eu6%DLERi
zm>HP_x*LstoIcOrafEsPm(1~2tLYy8pIz2HkDULmCja~DM{>{AuE^hz$e4knmH!5`
z1njkycId(X91nt`2|r1CLDt8UZ+T}cYmP{@0)?v&(qHg>rGM&pyW$RLsUskpOmXa|
zkIKOuOUNd*>m|BL?G8scsn5$lloMoDCuk6@qJVlY(`CFOZ&hrvo&?e+l(>9oOBu@w
zw`D55lDh%Vs&|(6LTH<aHI2_yT=$HA&llf7JG6HhP1Dd_Dm#s*rtg<>)%JShpc46L
z`@A7%_8T5P)lM03k+zct8Ue>{yX>|o*~nGL)A6>wN`+d%M~y4#9}QFFI?YpO?=p4a
zotQbw<+{4-1%YRGi9fMu8B)(BAV0TG=cKDL5+6nNxR~h^JcLzif(yFC)<${$a5#Y4
zg3)`g7^`K){HHG%lMu{qMaP>eA`1g?kO!X1zw#&x@@rX=f$!F*Q_SVjy)2bvrnS0y
zJ&Q;*l~vT<6Ff$D>Wba5GX{_}Ls*~x=yyW4l`+jdkN18jx@EYXeE~n`n?KPF#fH#L
z%d_kb{n0Z4NZ=|iA#V4R8W8IcB@t>hm~7z^DIzdMW2>g1L?uLJoyt-`n<b)28?j8Y
z5~H>!ZET*ZwldxxoMTf;Wu!xwn`N{@$qFO?SvDR34T*D}U!||`VVZ$%-4Wr#_7uVg
zBi{ps4+NZ^ZYk)Nz(|LEe`z4Z0W<ww_(>v&P@EF#TcjY_YXwhv8Rc~4CM$|14VhHy
zZ=s=`g&R>ylZ)SAa&b)Gxj~bQ#cY~i^qPV>s;n$wZGBIRmN$=>n9ADdzu0`EI+R0&
z7nu=32U(d7sb}cm05y4oB?U8S18!51_M|bM#f<D<rh)^;w3)=PWk7MlvA{^Is!)I=
zIX4|oMZsdibRyeF01%;4nbLo)c}8`bhO1;tPdrdsGu$%{M91t(3_(o$4H8o@9J3-`
zA`^Vn-}vEt@#LjkPY6mZ%=qvV%LOL5jfgNV(D9tG%ZgahBXe6fHKt<j!7ApE3>L)E
zwZ9WmTLNfL6R;2|Ta{=LHJD=^(RAw!C#Qr&YCTN1IOr;wg}o2-uY?+!aLGvQe_ySx
zV^BZ8JFrU4z)&qyH`ryJmifFs#BDlS5rKa6F<K>yMFa_!W{_PM%zx>J1aj_>1wU#=
zq?a1xZ5(U9bZ6V@vF6D4*mI7xP`U$878Sy9xkELLi4x$Yp@;bP@>{bFjD>`KD>jYw
zboMsV)$&c`>+~(8t4nV58=%fMg38Kl)RF|D?b~j*mSmq@SAjEQcw||;Oh0lEu!K^Q
zq$u+ZCKp61B&!1yVQf#zv}5|{yDIIt<hkrBxP~Qc98VPqjv=gd4xq(4)6+_5h1DIu
zx3C9NEaCMpDb35%GNni9nnB*E%#xZga8U5h=&g|mE51=*7-I&xs&L!?`}dAbO-sHj
z&)oMwuwW(3V@TGSZt~HP7LZrNHZHPgwYt{wWl~)BYXb5d{96zlq;5>aj2cJM1AcF0
z3wx3U({<Y&<t(S$$~`Q+rtE4x%%-2-!dCPajpMfN61g_?)kF*u#TCgC6CI84gg@V4
z%4PNjB{b=(ng?esye(#5nvN4a*0nq-HmnF{7_6GRLyMd1cU1IVVM4VzBoLWJTn`t2
zie|uDgC&ZA!hTq#S1U5Ayq||)e@AP70^Fp&v#A>`+X%l~rLuIm`l}&=1~r83lbO9a
zHH2Z`88w8bV!-U3_%CK1H~Xs{6tssmX16s4D*q$KCk+=Y1AAvB27}bRifC4Bwka#N
znX~Ig%Z#k$n4sDkh0WHr+Sq&3xii{}+ge8N;FKA?zo~`vjwNqtX^@>=)^4lG4Xg7p
za5Yi2#HyMO5pod5z)uwl;}zQJS_xySQ0LO@LTxqssy)C9<;!K(*i;DVmpj-cT0t+j
zI+Vm^+^^ntPN1kca1lCz(XLYI;Sty?s<)qOVznbJLI)M=WT`_p?ZCG1`2L9{-D6JS
zWq;7)0DUGAdA4NJrjNET(U4cQbhLz=NsFYS<*`xAL+)Yj;VRoe6KnCbWmL0M*AKB&
zk8F)#(&B6M-bb&(oMG~3dC^z!al*T!oC#H%$@F*HO@GqX<p}ojwZn|zZF-z-7WTFq
zLo_Ir<mA!;A>Nbt4Jf8)wR~gybHDL6DcZC-E1J~&w&L}gXGc3J2w$>hsXen8IF%3a
zHIeV=^F{;76Sx}mQAK!-RKX6MFz_i^;JT9<VW7_GGy=b1+WwLlQ0Hpx#{~TbNL60z
z1PR=el6F+3Bga8wIR*ff%|Iv}sdG~1PQr~oeKaA>Q13cSEeD-A(X}VnhqTr<O=Bh3
z(zXL+a#$XM6TM24NE=AawoS0|sDk2^dXkzTKsogfHLw#3V;X^i$^_nC8sK$54KUj~
z^CVgVHJ>Hf43bd5>_OV)Q?}N7X@XlfC~v*)8O)w15i7_QDfK{Zbq9LZuuog$;IPRY
z?-<_A$-!P|-WfS~FUGO)jIeqNCbX73)#~$SP}|e7RhOO>?G2Eh-LPGL<_demcTB_S
zh~ETyjd3VEw>QtniMn^pU=GS=y(>(vT?~=}2WdQx#?t1jSPmSTyJ8(>MKaqgqO3LS
zv#)4m+#Lr4({WVnoMqie3`I56s-@OnrBd5$>pzo8=xevbd|g*yd>~>wWDd^yQRo!&
z#>zw(TB;Lm+IF2X!_#ht*XotgosL_@YlDqc#cyMLL_2mU`GLSo43;DJ@VR(FP49pw
zROW(beAd>bN1LZC>n_dbM!7Ub0DA5($N8c?E+B*4l#*(Jg1@V*1_dGKK>^jGj1Q4C
zXU%0PXClcv<M%_?lF{krVd}Qwo51#W*>w>oFIx2TuP8J6sN-O^w#sX58Lii_a_J5%
z(rpg)7X{Bmmt&SEEKxlnxFo;~x|LWyT9?N)4qNB8;oKRuK&V>h{!Z&0To+(8C#8QM
z<X{7z7q<F!VJdadl;_hi_%+JsgV;zTwVjSfHMYKS<u`9AVHc8?=<XN|*g4huY$uL}
zY}0BB`@BJ4iQTuloHBGHF#N7q-wvOQ9y@ir<3(N$)(&-)CqLHBmR{LclyB+k=6w#}
zC={t`0*N%|lp$U0uwO09|HJ(ki0FI^N76e~Ks0Sw#YTnPVuDs&`}!DbZ>=!z>br92
zAp<E@j6D?J71YRHhJN3xJn%-mYMPK^`s#Bml*R5uz(k-DH9Tu)b0E4PBzc1=rqkWH
zv4u0y)bc!9<b&D(-nF5f4i}eZb&F>-sassj{7isTB{qv~dQOLD3PYD;ixsyFA;-lP
zM7N7%mIW6!#gxL($#(G4(N(YJ-sNFekf`^9M~{|NdpZWoOdiM0&<hMjMUJt8P=PCf
zf9SBZ`{oz#u(9>-;cP_n+8!Y0YT9!MDf*_;YF?0YwetLLCNv|oIjM=d6d9_f>=Nt~
zn-yvVFy0K}9r7dYGD41>hS!-6=YTv{nEh7Q|6p52J)eda*jt>mL-K>n=lQq8qAEQ|
zgw-5YX?lSF*KsJ(^APhBTJ$6|T|Ain8DVZ{<-Q<KFqQnE8H9G&5y>p%=dA~he~hzh
znt)j*5|Ce*lAnp3MVj7#N|4$aC<eg35Yn)M+`OW{4y3?sRqf@a)hNQcn2@?`dUhF;
z#Si(x%Q#b+<OtxKGT9-!C0WN9sC3oly!$u!^IIRf!Pb(1x)(6Ky%j!DxM5VU8$wB;
zOhZemXcwz{TR2XIa1P^<2qU;4{7>baK|2kTvgy?KRTa7Bol(W!8hb=>WSU%6`ZG7!
z#@EOD@L1Ju3}KF%;ikfNzbXzk=mwT=bf}Mh5ZBQKM0=s`|FD5)VOCYNJ}{mfDM}1$
z5)8jkebNaBsBo8+p_$@Op!-cAaXpwjE>_e|aTX&fDx<|0*ArxRhA}WUW)uBl^`zBR
zXEiVSzCkFGN_nUpITZZAmpUQv6@3cm4)9&q>+&goLw&LljGJb1r@p6*vzGB;OB~d<
zh{skIgQ&Diu=c>qU6Mc7)EA=aG+{X=(+Z85h9AXRLcOESqJXchN2n4o4LmG(APh}n
zK=w=w5$BlG{KbknR^-3{{FY{Lgpgq;FM2ow9nJ(SK-I1WPGDKIt6-G?PxcvX`71CF
zqWWi6z{W4VH6j^sR@a_@gP7>lA#*iJ9cP6a%?L{}srvBGWW-s@k7Q>_f%#<Ey!2c>
zuD^#To@WOv-l`7QS4F^}p;4fl!`@PWJQn)Hl=kH{h-V-Jifq|c%$;=P;L70!*MLSk
z-3cX#=><wkw})%X&uKbuvyq-}Rv)e#44jwIdVSsM5yyN~;`0*Da5@HP;wF5%KWPYB
z%!2Tl22czs5s>iEB?*e_R9}c+t1hn1-8elZd;9dXy%((Q(ULHTo4iPuKn%Xt{%!m|
z(kc1`txKQQ67NVG`zwwrU7QVFIgdU96^T!mIP9}U-gxkKX?V;g4G&pA_xKh~a3pM{
zk-^5L)d2a>wjxLs9T)qakQRf46>_q!{sZGSZb1?O+N4WcrtW`)rEr!SylGV}V;y}<
zq^brnygQm`V!TjuV`RfkX)lmq3gu;rVh(k3b={y{V4>`qt(%S+^e}g4n?+3dGUP=t
z+?X<$=;sQzD5R@)nr~L%8&d+^=LPsNA-M0H>>D&^p?hnj0Xw&lcp%#}SOnl08_H*C
z2Hy1W9KdhNK2rV-eK*)i4=fln#C?aRGRYY~FJ<*Bj-=nTgRujaZib;{B4Xm01wIqe
ztKvF>&iWOrdg<#Qf11T>8f<-DW4%sK=X7vt=EZS|70(X7HBH`ARWX-*3kSXy%C><Q
zHYh`k-Cb%1z_~#NA+Jj@V+wuwJaBHI&u6zQsIDr5aJ+nl@pu(qDGkS~`D0ZS)afb2
z>8n~G3v7iO5HypN`zHGfLQUXkx}e_VY0YnZEXH#2SpGFI%itn{71F%qlqrmTqdY`&
z>$JeuGl6a>Ok8CNw5eVox#AweaNjI*{d~RrKHH~7jPd<ajCn2eB&sJ4VdNFv2$?)r
zS&rOmt%U5p-nt0APAQ2>YPj1(beqq6vk125eaRtpT!_hHW|LvyQ8mC4$d^kb8UIE@
zT7IDCR{W`m@nBRf#12)F*GI5!Cg@Mlgn(;>uesjNC3h%B?AD?;o~LP>gbOlRPB?>8
zRE{RFfZBvaAhrV{Cg`J|M5IM{eyu?+L(8&t9?jcgGy1x(1a7;V6%B{dP0J61zMk|A
z^p<7sV1$daRT%rIEg&5N#Ib8+Ko=2bq+pn}QcHy~lvxr9d4iC>VYX?8(gmP>XozJ%
zIV{hZuKhywa+E^^rQrk+ZfIr(w9(<?q5A-1gvK^}I^hAA=}O~sT_vpC?I6-FvXq8I
zi5prcWTN#@RoLmIleGo?w*jd{;VakUxZEZ_?e#R<xe-{OGHulw9v{=J7@HOQ)mQNr
z{_)Xdw`gG~;~aD%)D)*;#KZG!lN4RpTu_}3D6cl(EZ6x&TcpuEAFfNX8gxmnO^)h&
zT~faZ#aYvdj2{uILylmahv^t+g%E$??nJXH5UM*^Ful<2qgiTZT}|C`J;$YCub>h@
z%{hqV$XeqD270w-!~@})u8-(%^oyaie+j^rXItwz^HDF-H6i{V;{}>EST44Sl=Lbg
zB%G533hDf>O_K4HI%uZkrvy9@mph&{w7I^i?EF0xa03M7iaS?Z8As^L%?rrGgcl<)
zO`1w#3>gVIC0S=_0g!wpVw?k5Ppcv$gFd4(Tml_9;Dw9&qjj27pB9LMi}HksIjlXp
zPKc~sVCCu>pyxIRJ0B=(Rz_2y77g||JR59=J+k6?H-Tb26swA|nMsaf3kA`m7E&G^
zLX~>(>%8(-eSKX#|L%kxS}KRda3_bwlT`u${Kx1gIvtPb@6kjX0h4+bLxccekzI^B
z)xflBGcYo1wx@QQme!*!>?Ln)d#68K(Y8(-AdE6*j8<<A8f)#590tY;k|FJgEn@}A
zxXUpw%>~Ki95Fo9ox{p(x63a`_YBK2!X8m&@sbQiGTUmIAx$Kxy_Y~LmC#G`VzXW-
z5_D>BI0%duWfz3)UKJeu0o4|S4(~`um`#l3X{pj{NpGe1RXiztt(dY$w=K^xtv-W_
z;5g+=v+l~u`8?fZvqtdu2IO~C*JCUm6Ivoj@kf~Qbu^0)^LQO$#!3m?FtlCMqpS?g
zNx_rEPSDBoUz->hoVJVBA<l44jSU~->&Mi=V;zx6ooFB{mSKa_ajakHl5}i(0na74
zjWi?&a+#`@ECKFn0|N(&EDT6a*Ob4DSIAd^IDfH19#3)wk?<_@@8o2LJQeS_l);IB
zzA4f}+9pINX21=IZa$>}3E$h)wG+Y|T$TAPvji+c$m{LCeyPot`T_GB4CL)JF&tNE
zHqU7?AnLC~`-|&IwQ<-Hp?Wm%uw?XTOMP{3LGa}(X6e}FZR)oOp{ZpR*jd~JdIINg
zJ$jxHe-RD4ZzQ5^^-;G{18aj6Wrs|AR_a+8$IG*hmbSzy)5R$bh+7}7(dL=~#U<Ng
z_5sA6MZDzMZFtTeEvf;m+P=vk%{T@{LAEdGTF#RTz@h-Ba+a=?Cd96#xPUMlbV6qx
zCJa8MHzii|Ie9o(Ex^?sJo_Sv64_QMNo<M)y{q}lV$dz4pIi*2-iu)H<SzAOKYq|i
z;TKuDV!{QXe}BVofZmF9KV58ihl^AaCBYNyoVxz8*TmyXaDNqy+C3Fv;oVV)TPlYN
zYj<Whm$}`%iQS#BF+Dy#g;6~{9USapdfr|t%%|*FcsAI+XWFVK<H!Z&bKUmr>zxk@
zovM#ugR0#mECT}|RH)iDREA4F2RodBrFSgd{Txz0+NS^AIk~p>a|L%}cYk$C1FIy>
z2)I3BT*j?}HjVKQ-=Vh%SlMz0fPmMlp01={rEfd48_W<nEk~u2*lrxj(9Xyr^hS0j
zbgwDFlyie2mhK%26ucGq#v0y_wDbA^vau?4#-hYQGkamG^?K$j;Nw9eZhh(+%*gd;
zUc|*NaBC2NU=E795%D6bwR^<d$d%da>hMzgXslh=+*vWUg=U1T5P1Q73E9)5Lf+6|
z8k|Sjd{@#b5|X}}G1Is^nlW3sK}}<C=)=#t)09ckn^U4UCPW{&;yXg!`nqz2Mo;YS
z9nMZBqO(x0Me;$2xFJk86LcZejIiyaIq<^qtT$qC=-(NM^cK8{F=LT9=YmeNOBMQV
z6akZb27hLw_wU4Jw%8-&epfpQ8rTw;tSnkx#M27I&h(K0WMWJ-bEqQIQl&xTN;fm?
z#>WB#o5t9uSvrp=dvK_PIZ9U-L^jL7C6`FMbBMpDX2IQg$}_@oeaNYo2UoyWIZQva
zSxRgOAzLPSoHs;YO~-`MWRfu+FA+0u@m)sc*y3`7IT;Evhj~&YA7OAvDZ2kQt1MpB
zRfn$2)6Z3o8xVD06c7am&NCc~i24k!%5WzPH>25BU|zC#1g?YZfwRjrnZ@7Hm^%(T
zM9QwDA#gk*8DR%F13gR8tER}AZ}xf-&A9ra!d$~!gR|TfIb>NJYmuB$u^)ABXvJkU
zVU3{CRub6p{H7!+FGp1GFPS?#%5=Y=lCtM>0!7ef2fOl5%zL~0Dh2^A%1V`fYeTWJ
z6|QgrMGjw6fPz3V<>_kXnkF&}^LP!L5aNN4b`!7fl0Qd>HQcFM`YF4?c^lXjG(mS2
zdZg<6*H`-?;p{b;lx)xJVg11TZ%f#ypij%SOK@vTmdPT@O4WJX;Dg1yGb&_3i`rM!
z>mpMxPwIw|e3GFG6NNT_bXu|A$vc6w;LbXUo(^SRRZBC-83b}?(a@P);zoOxY0)w`
z4O#{t{A6zj$f?seMQlL}cNtEXY<E~SbHZ|!vv;_?+Bme9tsUCR#IC;2&UO`TCh~#k
z$*N>wT9@1eHoze`JfVUKJ)xrYIwpJZEIv=OogF!nf=0r!{EdRm@Qg;9NA+E&JR~|#
zo024eF>I(Cj&BQ@^jdw@!d(}aW$wAUtQ%NeT!CvkzTvoC%S(CmcWXphpu3=Ay~Z^L
z5Cdc#fE9+UJdFmvMe}*WtV*;D$ChLbNGT^Q!}Y0h71t|1ib;~lYD5KV1`R+eQmlxK
z!d0Z<aV0nuZi8IVmk?2KaRcQ{MGcIulx1%|uSERMF&!Yc_Czbn^Uk9p!d_#ZKCtxc
z)^Alb7kP_;XOGHp)9&6dUie2*WBcZ)v1u5tWA&iM^{Gs9<S)P+IZ;!$3NA)R+TA9^
zz%q@C>?;y&gTqTiQY6iiBWtu^aADLHl6e4t6%E!bT2MLK4<h{xUN2sc^<wP2UhI7r
zj5B1xSiU+Dvm16{ygfY3i|Yl##V*O@k^}sxeQ`X@l@XkZikXT?FBUs84I^d9DS}h%
z*x}PtBC{*26Iu-NHjxq**WYn{0g=yZfytd@^kK3a6@7TwUJpc*QnjoBM_bgkUzB6c
zLL>~F^HOvEog~Wex=(cU0@r@c63~RDg8MVozo2bZJKJ1n9paB_RXjZGwVss+80Tpj
zJSt{phsYaLwUKtEiN-vTgaDEOrZHQWaR(#$aIWBn6{|&2OSxP&ianUl*=vH5Y%obR
zx=E_*|6xb4dt*m11kuSb>WyntKRu-jP(?we%H2)tw^x2d&qAKYxw4DZbdmQ=;gay8
zLs7OfRaUAkq{zXh`aqSHdOplUM7Aj(m)4$qo$p3<ziuZyJH9rZ4|;eEMhFnMRV%24
zw-@aC(|DF<k%+m`m26h^Jheu-nsundP#kz&VA;AA_*PfigOm1oqk7ENnVa*GVNw*!
z<}N|>QD5jhj<VS$#@vcG)mybk%7u#vj!hvVl^;jf+e}>r=1R!F1GhuGk;N==QR}m}
zIgix7!H|MgaLZ)AmAx?(g1h63a|>be?Mbv=rcXEPxYd7`#UjuQS|j-;bJ{0&i>tJD
zx42BQ`pwUt{EEGyocxORPRf2oUudX5fbH%Tj7Hew7!)e#WXu3J``YtWIq4}7fE(Hj
z%;c7ITT1bzQ%8y7Ga3x3pU-TY1*{p56CH&ZoK#tO3HmWz!s!gT2r&K$*m-LI1Wauj
z1B<3)*`H9t1fZ%jF@?;W9O^Sf)=g1xDG^f7Ww-%!yvF#E74SjnRo}Q8%Tvs1$FX&?
zDbkl4F{M#g4rzDyFxr!kX)@12+laA<sU|vXQ~eE|K+){7Av~wQwZ*$LD4nh{xZHO3
zh@&Vcu9Xxss7nN}l946LGVq~8f2=Ly6_yhd?GSeT&o$pF`bp1zBbCTsvcUD~bK1)5
zr}!*Lu~@_DEXy&dMN)iMKQUo&8eUmU^!N?1+|*SJAfCVJmE@7ToK*k<`7Q2u)_9Y`
zNNXL5B3g`pZljB_dy~dL)4elnjicgfEUy#evlo~=PL|HrzvwG?dq52PBMby#cf7l6
z-zLI9BY=?8or?EOJwkH;)E+efO+Xf4o(vPvxzS^Gla;|sEM@`@6*1S(cT6#lczdN|
z)7iD`6;^@`LFG}tM~BOh3+!TaUT~0uZ9n0>+h$zHJi(Y`goD04-NZb}+*Kr*#hzh+
z8L%ms-6$79{U=+U<SK=#$SWc6X!5`5xb%3no3nL^>#?njwL2U07R8nRVLG0%$6kFE
zp|2o_!zgBgY$`|?LNGB5KNmGh$Ci@M!%!3==njxM?}~f5Whtq%u?IHWb}G9V8w#vR
z@!2NYw^4S{%Hhl~#tjj>PfzhVY;ns4sh&Xu_l9#J)&=eqcmf481)qpN3>HCaDc}U4
zp$d|?x(aG7w5?=29k&+cpKrJ_h2}h`0F>kvw&Q%HX%92)P!eq)X5VzS{SZ<!OtiRy
zVKk6e6Xv@Sh`q_Tzs0*>WU=g~DywSr!HuXE`V8*~pFOIL@d#gIG+2M2f`IODeBI*G
z_00|(bOB+Qx^27N;DIZiT&p766%2VA(Vipf=)8}501`q#L~*hzAPEn}umC;vVrM_B
zW?VwSKuVFS>n`Hdwpw-V?kmOG=yQB0q*%*TO0nS{Qmn8XyQuv|yruOxux$jGknk#@
zhvkJewwKyTx0qFe3#*l$AM>{8O_c;onEDsouR5N$y;pHJ-s^^6Yw<@<*Y~$GU5nyw
zyw|?3)nD!4HK`p8JG?oygJ*_!$C~1(;>=9T+E?*F3Ez)dG>@m^ajei(#dFkEjZU;D
z+7H@O?Rm{~qMeZYZtdz55ecQd`a>go^t6$idM<Nc9dC#4rT-wUReJSgub|-|+*vxL
z2=_g0!2a&R$uG|LNF=ad5`iQaGFQgiTw=28l$0nyP7}}@smQxKqNuOpPAqp1?u4$J
zcE;rAXRm&E`|5w8Lf6)9!;b%K*%Qsu9Xs@6uR;I&KhIvieNFy_8V-4_kkoJ{WONMI
z3>s@ZJ9+iyCsxDNL*L^yY(Fra#wtIbyn<(76#$VpX}3rZL*Htw@wd0XzIgNO71l6y
z=#)PpmwnxILM!$gYP>#q^Y+zC-YqW(NF5Jf#PWj18gE~n;JZT&m^ye77Y569-LSF7
z%V)p7dHeDi>y=?S^ciG$eaCC8(WDnxl9`+k!Fir+T4i=TW}zT?7XG8L3{gao`;aWs
zi!55^?KNrRq%QlyYLY!Ac;1)Q{<_Z6b(|H~jor^T**TF)Pst-8hO`}ho_27vN&ujh
zNH?@X#DV~L7^eoJt*w2yI5f5V&}y;F{7CvvcBpR~#<N4yRB;nOYTpXO^;l!t3-;#U
ziUTr8CqVa_j>}y_rK~P|T=#}<bfRxoT9k&htV#|QvSM9AUToX;O)DH4UhUd@B{BIa
zy+REx)#aAf<^SrNt-;<sZHc8DVVRYQKA&Z#W(lgu`i&?dL?JyQeS<LFB|75dG-el~
zkq9SRh8?0PU3#BlV04^ha-0&w?T58V72Un_9GRiLv+e`?_5<x(&!<^_H)5sb*`De4
zHheUzAATldt+aeZC9W^{Z>KDEIAU{G(0vs=1fdD26H(~(C#w4MB-^!WQp8;@?NYuj
z%X56o5x^RG01#b^n93ntp_*lmiE&mJ3`0`|Mb!s786SXHcPZq4D6ZGw9Y+`SgvS<1
zy>&y!bo@5oPYRpM^3d!Ucmyd)K1La%ZS)@oqs@Qf0~Efodn~|)Wf!k<YIDQ!0u@=h
zVFGR~^_mwN)TG8IF{K{ngkjxXFGpt!i03TLz{y7I5wg%_*ix?Ii?|@Q!OpO23*C_&
zosPsjz(e6+-Itb{ZY4=qi~R35rGs!>`v&Fzz}ou5s+oU73v9yshmaH|&<@ED@Cf~O
zn33DlAmc%!mD?ouI>W;0vHtkEN1CSxI?#V+#aE6!Y2H+0N(Y|jI%+q4Mv0ZX6}{aq
z0Z*n(#=zoLENy|Q#n8KU8RJ2{SyS&eCNP%X!GOszTWsbHko_1gSIig5S=(y+8~pjL
zkG#jGb-A5b@@t{JrgseShEct42qlFw4K1lMHhA4}b<Xad;Yh_eRN{0TeTcT1i~1)2
z@eHT^`OE>s3C&I;%o{{T%?rd@;Xb5zctX(krl>efP-h7me??udX=={`J;V1nO(?`{
zUOHmR$d67KP+XoX^fRSy8>QL2*gH1@jo#$!=}KE~0Pcpfy}PS$$VNl25(=1|Z!(H`
z10EQprUWm!VsT5D^^q=!B0=Qcvuh@7QD@M_HOoO-@eL8OU-eaNIXf@m=Y(Qp+OKIM
z7{NN8W*Lg7A&RoAI{}9-Zzp!@3FRvl268J_bl{QpSR-_C#F%=M2KAPEAexa!P&O!%
zGnKi<mJM_ppNry$PP=Wge=P+sL17Ll5)?~_OFJOA7W0%iu@E1L>yA1WNtt-9(!U8{
zmnol{O#pj2k0+(wAq7qiR@+&eC-XSpXV<Y_0bl{9G=*+q`VqoKPRGJ2#Zt{wH;So~
z|9aa^0c$V#g0qvb{Dn!pm_ydd_Bagcf7IkU!M%O!%KjW&!z9~4hmvL66RNb)p$$1l
ziBJe`_fN_#Rh0BX_E5hG-?*KGJiWr5DgXpX)uWGO^P#T*6Nhke`zF&c71@O-fi-p8
zcf773vKK-kr%!vnBce+q*rba7GNaeiWL79BUm2N&CNSn-LAld&(D0&{C)}!Kcd&KC
zD3g72u2=VO;NAMYl%fr#frxvhxBHVq2se$_1K(G~&j*e}6>mQ0qb%gpbWH}1)To63
z3H~a{V;EN<?|M0qpE#Y)Z(v0GbYB5j1PAo~gW8luAfXZS%44tBoFk0MJedPz4f1f>
zbzJEE?QB6upr~oc5@TEHbIc`9bD-~dl9!nA@uwn-xJqt9VQ0&s>X%@gsc!%zXi_yo
zQX^#!sCGm!l?BhJ-D{aJL<;TNxxgY#G(w4yq2kGspf`Q3pN4y9te>}#r-h8-l+Br#
z<7<S56o9*B)<XCSrbhgiT0-F~v)aK|Y9xej)c7}=Y=Lpn5(>9UXBhfpp3eB!l7z6I
zh+;{8z3<>jgcqRJpUP_}p2r_RegXFc|4McvxP(l|=>6c_7p4LPno97Y9fVz>mnVD3
zr*wbO?S&i&4^lj5*uHZ3#9j=4t{on-pa<&YSy1Z*4ZM(oFGDAEJd>p%1<<EBBIgTB
zHbYLMON?JYQ32sD_v~53#1Oz+SmQI|gyoL@h~oQImK0zLyNnlWNufP1liFZ%E_Db#
z9r7V@6fIiVK-9v%1Y_Mhz`YL1pI2lJ`38QmG~dK8Hc$rm;%L5&Ur5WEtN9N8@HF4W
zFTUn`_=S)XAHRf}ACwhHe|`1{h^)kK?@{qvb}SS-_F8-Vl>99;vr-6qS1)8$3z?0D
z>}nyav5-?OWH%OatA(7#LSD6y+gQl27V;Vk1=T`+W1+BGC}<u`qgtwE$g5)>G>^Gi
z9rRCGd=854z$AamkLI~9Aw=ifYcLRaXH{M^J)?Hb^6S^^z^+|$Kus%M^9-+c&4*!=
zu7ysmF7QCLYnENBYdZDzOfRTk3&Pqp%QWiOESL-FnqyeCYk;;WUn8<v?OGVr+9QIV
zS-VC)wQH_duj|+QXE!{<F~j;b$EaWP%=$Gyto6?|tlBzoO{-Sdwf)+AxQ<(I&-Lrq
ze51A|-5{uqsRypA@-@?|ts&30YxCwgLA{)3*5=Y{m`if(*UI^ZT`T8<#!$Xyo3(fI
z9kVu8zFQxA->>f@Kd|e43B6i-fl*(lf#uZ8+4a32xJGTP2<KXRkHD|ZrRiF=c{4-T
zl*h%gZBK5`@&ikLu1)r!+@9?lq1<Q3a%=0^@%-9zT{{Tmwc!RvjYfEu8Omejk@=`!
z3tX>$t)Xsc8}(~m?YRNzcm0}U*01?N?V4FzYvh`1)vwj)h8GY5SidID5fKxUMV!$?
z=*3fDDjsUDVo2}w_vlQ!h*vS@RMmcc`dlNtI8EkC7{_^X5ffQ?d|4FhqsNc0uCDY9
zt1Y54eU>gCk(S<#zyJOJ{NIb^)OM|@Z5dO`c8{lI?X0JkWqc%moGDo{kF=iU-jg;T
zzgV58noU`q$FEW%B3hIKdi)yHqXEz86=elIJiWj+><0%AA3po#`GbS6?mu7j2b`&G
z=MbzC-s3zjHfw!$esQzUpvQ~@|C+vQi2w5Q;VaYfO(IYFrtN<Pe2w9Kr5T@N05-7n
zHSH@R*hDMUKy}<_uTuW|AM$w@UtF9fghsqSD58tgvrV#q2vz(shw$%X&A=b|$JJ>T
ze@sAAiWl!m!xy*ze?EEn;`y`JZ}epKIrqQiTf+XgVgGxUalijR%lv;rhbRoHdHn4G
z^N-T#NwB^yFT8qo^7Q9t<xecmLleYuc%#6yiqgfuzxd(V%hys9P0bRv=`noK*Yoq1
zJ6T@blb@U4|MZ7Wj)X%v5+2{+{`Y;i{ro4}rF#Cm9w7;ud%yqx*!ky~vu4+)i)8g7
z*NacZZSa4FS)G5&^qqV9|5-lwWb~f?x9<O6|NF<o7cZaxa=ZMW?c0t-|2^Nom;XM?
z2Rxf0J<Z|&P$!rpNC$QBGFrw*8eI+t;vL;Pc)eLJqwM-fOc;SyN<bb0jTVi=wsnlr
zwcw8lQLaAx!FX4f`ubS9bMRBTj1Sk*1$i21#`2@bkI$0gY%}{17kZjqJkE=B6))oG
zoGs3SlMQ)lcBDOn`OuzkvSqYl7Z2lQlq^WU;nrWvn))U`_<J&oS2=mglh;o*_T%7b
zoX@gkUEs@MRQciIAqAhyiW+$M0goI#?)fPzlwVG&xmeL*h;Z6qp3bkAXXzrDF+k^W
zndj;Z@z%(IQV8ow847z)fjiB0P5Wm8KCTk3`9w^c#i4x5%;IO)S^}vtlj0gDrEHW3
z+LwK$+1prsh<`&hCjb!Z^%q6tZ1Cd6QB9UOps+}qi!v|JY?Bl;qruUE49x|}wb1{w
zcIPZwk^jH}w00}S48-69+WcGyWE<mSA62gZNqhG_Ue@ukWaa;5qOmLVaYvf9y+j{#
zq}hLY-}0Pz)%=*2eu+<#YSen6XyM(678||aqmi-oXph>g6fAYAOXa2d0{~8=yG=xv
zlWOwTd(_5VBUQKR^+30uCq<fFBh7k|=bKmqptTR+m|paxTEZ6jbrBViXyQnF`|`hE
z{_@Y42k1i&9(shTJ&ixci*$`vgV#k=Y;x`BNOQGA?bj@wZ_rQUF}ZQJh%5B~Lmd)L
zYbTp|f_W8>%ErjPuasrv4@&&<`h|9~hKO5I^{7f6#VX|CfElm^pVhyU#l9gF8_Lro
zpi=Zrx+YYN+<Tp#7gykzBD~XpM&TQr5JPLYgKKz$Yxo0ekh5@b4QFr-_uy9yosM&Q
znjP%T|Goa@?W-T2z1~sm>n;D;t|#$-zUx`{{NHEc|F$aM1E!2Cb$=DLov5y>Y5yu(
zzq%5yuDolLG!7I?@Su-+qE@I#*QX1hK>M!Z{}1KA8ydTA{f{f@e+<X;@Av=bn*Vzp
z(Ea|${eMIHp8fSdWc!=<`~P15bFcro*Z<t>f9~}^_xhiE{m;Gr=hpQ<RJ^}&9;4I$
z%XTIIFWYzS`M=M||Fb+&0PDk-6a~X#V9OXuDgZnr0?2}MATWLuz%l-a;CW?SJ>hRy
zabyZCNHLEbqJ98MBbp?GF^4{74#~|w-^-<+S^ndizt6k>UBk9z|4-L<?)U%a_%Pl)
z%^w`Fulcp`9Tr59rVDZjx9*&9%$p)v<oYZHj4Gkng9G>v(nMV6I@|i_S^n<Gdar%2
zjfp7eKRSAFK+%`~wMl3)q<15h6acU>M(-aS#0w&*)r-A{<`?Pe;*^|lGsqt>8ciP@
zbjocH4*Cjg@PHc?(H<P!q-^%!V2Dr#FViZ9@tbwQ>%l=y;@V!?idx%iTN#TtDo9oI
z!tUZ!*<>j|@fORciOukvwYDpTw=zh-@<c%CSFoS3!`lKWr>Q#1HM|gSp|Kz?E?&}t
zA~z(hJUAeG3))*>Tc?PuaIB3V!B1QKxr{!*#J}4vhEbLm)_Q(kch@FcG~E>IO>tZ^
z4~-_<2HsOD0vajOGEju^_9hI>@rd?Oti*`T@d!^b@y;e&9FO|Fv{-FT28=M+`SCk^
z+UR}#9t6ik$Nzp%ksxVl?MNJw@*Xp!iO(tTQO3LRmN<y&0@6^H1(;o~>E8S5rQd}j
z3n~U4j|7=eY+}Auo*j>FKouyqT~c}efbxPk5lq-=nk2+dTr5u6`H>&<gG4A3q0aDl
zBq|a|wfm>2QzWadrc)Hl&Pq{@bVphf14Mdxibfq`eXV>y(Y{tqEnU`%D@FW)jWaQS
zr&{h#wY;5b`8(7i>wc$N&Q7&zqakjHM~pW+Jq02P>6eZXA}C5$r>7%!>LVLB{`OlS
cZIA9lfA2r{pZm}K=ZpUQKP^)jH~>fk06JF8&j0`b

-- 
GitLab


From 37c9333a98dbb6257b6ed867614b1880d4c6c0b4 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Tue, 30 Apr 2019 15:11:30 +0200
Subject: [PATCH 013/129] Fix some problems with the configuration (not
 complete fixes, but we do want to move to a new configuration soon).

As part of my ambi cleanup I ran into issues running MCRE locally (see ATEAM-530). These are caused by the fact that some recent changes by Jovan introduce an ordering dependency on MCRE. In this commit I have attempted to make some changes back to the way ConfigDB/ConfiguredFactory expects things to be defined, but there could be further improvements. I can at least run MCRE locally again (as part of a sparse build).
---
 .../python/MuonCaloTagTool.py                 |  8 ++++-
 .../python/MuonCombinedAlgs.py                | 10 +-----
 .../python/MuonCombinedFitTools.py            | 36 +++++++------------
 .../python/MuonCombinedRecExampleConfigDb.py  | 19 +++-------
 .../python/MuonCombinedTools.py               | 20 ++++-------
 .../python/MuonSegmentTaggerTools.py          |  5 +--
 6 files changed, 32 insertions(+), 66 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
index 2b3d3de7b5bc..a1b5f7615e29 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
@@ -35,13 +35,19 @@ def TrackEnergyInCaloTool( name ='TrackEnergyInCaloTool', **kwargs ):
     return CfgMgr.TrackEnergyInCaloTool(name,**kwargs)
 
 def TrackDepositInCaloTool( name ='TrackDepositInCaloTool', **kwargs ):
+    from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
+    from TrackToCalo.TrackToCaloConf import Rec__ParticleCaloCellAssociationTool
+    caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = getPublicTool("MuonParticleCaloExtensionTool"))
+    kwargs.setdefault("ExtrapolatorHandle",       AtlasExtrapolator() )
+    kwargs.setdefault("ParticleCaloExtensionTool",       MuonParticleCaloExtensionTool )
+    kwargs.setdefault("ParticleCaloCellAssociationTool",       caloCellAssociationTool )
     return CfgMgr.TrackDepositInCaloTool(name,**kwargs)
 
 def CaloMuonLikelihoodTool(name='CaloMuonLikelihoodTool', **kwargs ):
     kwargs.setdefault("TrackEnergyInCaloTool", getPublicTool("TrackEnergyInCaloTool") )
     return CfgMgr.CaloMuonLikelihoodTool(name,**kwargs)
 
-def MuonCaloTagTool( name='MuonCaloTagTool', **kwargs ):
+def MuonCaloTagTool( name='MuonCaloTagTool', **kwargs ):  
     from CaloTrkMuIdTools.CaloTrkMuIdToolsConf import CaloMuonTag as ConfiguredCaloMuonTag
     CaloMuonTagLoose = ConfiguredCaloMuonTag(name = "CaloMuonTagLoose")
     CaloMuonTagLoose.TagMode="Loose"
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 122c50317c3d..021710e832bb 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -64,15 +64,7 @@ def MuonCombinedInDetCandidateAlg( name="MuonCombinedInDetCandidateAlg",**kwargs
         kwargs.setdefault("DoSiliconAssocForwardMuons", True )
         kwargs.setdefault("InDetForwardTrackSelector", getPublicTool("MuonCombinedInDetDetailedForwardTrackSelectorTool") )
     
-    from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
-    from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
-
-    from MuonTGRecTools.MuonTGRecToolsConf import Muon__MuonSystemExtensionTool
-    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
-
-    muonExtTool = Muon__MuonSystemExtensionTool(Extrapolator = AtlasExtrapolator(),
-                                                ParticleCaloExtensionTool = pcExtensionTool)
-    kwargs.setdefault("MuonSystemExtensionTool", muonExtTool)
+    kwargs.setdefault("MuonSystemExtensionTool", getPublicTool("MuonSystemExtensionTool"))
 
     return CfgMgr.MuonCombinedInDetCandidateAlg(name,**kwargs)
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
index 79863eff8b0d..85904b5d8113 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
@@ -182,23 +182,24 @@ def MuidSegmentRegionRecoveryTool( name ='MuidSegmentRegionRecoveryTool', **kwar
     kwargs.setdefault("Fitter",  getPublicTool("CombinedMuonTrackBuilderFit") )
     return CfgMgr.Muon__MuonSegmentRegionRecoveryTool(name,**kwargs)
 
-from AthenaCommon.AppMgr import ToolSvc
-        
-def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
-    import MuonCombinedRecExample.CombinedMuonTrackSummary
-    from AthenaCommon.AppMgr    import ToolSvc
+
+def MuonMaterialProviderTool( name = "MuonMaterialProviderTool"):
     from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
     from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__MuonCaloEnergyTool, Rec__ParticleCaloCellAssociationTool
     from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool
-
-    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
     caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
-    muonCaloEnergyTool = Rec__MuonCaloEnergyTool(ParticleCaloExtensionTool = pcExtensionTool,
+    ToolSvc += caloCellAssociationTool
+  
+    muonCaloEnergyTool = Rec__MuonCaloEnergyTool(ParticleCaloExtensionTool = getPublicTool("MuonParticleCaloExtensionTool"),
                                                  ParticleCaloCellAssociationTool = caloCellAssociationTool)
 
+    ToolSvc += muonCaloEnergyTool
     materialProviderTool = Trk__TrkMaterialProviderTool(MuonCaloEnergyTool = muonCaloEnergyTool);
-    ToolSvc += materialProviderTool
+    return materialProviderTool
 
+def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
+    import MuonCombinedRecExample.CombinedMuonTrackSummary
+    from AthenaCommon.AppMgr    import ToolSvc
     kwargs.setdefault("CaloEnergyParam"               , getPublicTool("MuidCaloEnergyToolParam") )
     kwargs.setdefault("CaloTSOS"                      , getPublicTool("MuidCaloTrackStateOnSurface") )
     kwargs.setdefault("CscRotCreator"                 , getPublicTool("CscClusterOnTrackCreator") )
@@ -222,7 +223,7 @@ def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
     kwargs.setdefault("Vertex3DSigmaZ"                , 60.*mm)
     kwargs.setdefault("TrackSummaryTool"              , ToolSvc.CombinedMuonTrackSummary )
     kwargs.setdefault("UseCaloTG"                     , False )
-    kwargs.setdefault("CaloMaterialProvider"          , materialProviderTool)
+    kwargs.setdefault("CaloMaterialProvider"          , getPublicTool("MuonMaterialProviderTool"))
 
     if beamFlags.beamType() == 'cosmics':
         kwargs.setdefault("MdtRotCreator" ,  "" )
@@ -240,19 +241,6 @@ def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
 
 def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ):
     import MuonCombinedRecExample.CombinedMuonTrackSummary
-    from AthenaCommon.AppMgr    import ToolSvc
-    from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
-    from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__MuonCaloEnergyTool, Rec__ParticleCaloCellAssociationTool
-    from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool
-
-    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
-    caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
-    muonCaloEnergyTool = Rec__MuonCaloEnergyTool(ParticleCaloExtensionTool = pcExtensionTool,
-                                                 ParticleCaloCellAssociationTool = caloCellAssociationTool)
-
-    materialProviderTool = Trk__TrkMaterialProviderTool(MuonCaloEnergyTool = muonCaloEnergyTool);
-    ToolSvc += materialProviderTool
-
     kwargs.setdefault("CaloEnergyParam"               , getPublicTool("MuidCaloEnergyToolParam") )
     kwargs.setdefault("CaloTSOS"                      , getPublicTool("MuidCaloTrackStateOnSurface") )
     kwargs.setdefault("CscRotCreator"                 , getPublicTool("CscClusterOnTrackCreator") )
@@ -277,7 +265,7 @@ def CombinedMuonTrackBuilder( name='CombinedMuonTrackBuilder', **kwargs ):
     kwargs.setdefault("Vertex3DSigmaZ"                , 60.*mm)
     kwargs.setdefault("TrackSummaryTool"              , ToolSvc.CombinedMuonTrackSummary )
     kwargs.setdefault("UseCaloTG"                     , True ) #
-    kwargs.setdefault("CaloMaterialProvider"          , materialProviderTool)
+    kwargs.setdefault("CaloMaterialProvider"          , getPublicTool("MuonMaterialProviderTool"))
     
     if beamFlags.beamType() == 'cosmics':
         kwargs.setdefault("MdtRotCreator" ,  "" )
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index 1166244b13cc..fbf0e3453167 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -8,7 +8,6 @@ from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorit
 
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
 
-
 # combined tools
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedTool","MuonCombinedTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.InDetCandidateTool","InDetCandidateTool")
@@ -31,20 +30,14 @@ addTool("MuonCombinedRecExample.MuGirlTagTool.CombinedStauTrackBuilder",'Combine
 addTool("MuonCombinedRecExample.MuGirlTagTool.MuonStauCandidateTrackBuilderTool","MuonStauCandidateTrackBuilderTool")
 addTool("MuonCombinedRecExample.MuGirlTagTool.MuonStauInsideOutRecoTool","MuonStauInsideOutRecoTool")
 addTool("MuonCombinedRecExample.MuGirlTagTool.MuonStauRecoTool","MuonStauRecoTool")
-
-
-from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
-from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__ParticleCaloCellAssociationTool
-
-pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
-caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
-
-addTool("MuonCombined::MuonCombinedStacoTagTool","MuonCombinedStacoTagTool", ParticleCaloExtensionTool = pcExtensionTool)
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedFitTagTool","MuonCombinedFitTagTool")
+addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedStacoTagTool","MuonCombinedStacoTagTool")
 addTool("Trk::TrackParticleCreatorTool","TrackParticleCreatorTool")
 addTool("MuonCombinedRecExample.MuonCaloTagTool.MuonCaloTagTool","MuonCaloTagTool")
 addTool("Rec::MuonMomentumBalanceSignificanceTool","MuonMomentumBalanceSignificanceTool")
 addTool("Rec::MuonScatteringAngleSignificanceTool","MuonScatteringAngleSignificanceTool")
+addTool( "Muon::MuonSystemExtensionTool", "MuonSystemExtensionTool", ParticleCaloExtensionTool = "ParticleCaloExtensionTool", Extrapolator = "AtlasExtrapolator")
+addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuonMaterialProviderTool","MuonMaterialProviderTool")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlAlg","MuGirlAlg")
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuonCaloTagAlg","MuonCaloTagAlg")
@@ -60,6 +53,7 @@ addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.StauCreatorAlg","StauCreat
 
 # tracking tools
 addTool("TrkTrackSummaryTool.AtlasTrackSummaryTool.AtlasTrackSummaryTool", "AtlasTrackSummaryTool" )
+addTool("Trk::ParticleCaloExtensionTool", "MuonParticleCaloExtensionTool", Extrapolator = "AtlasExtrapolator")
 
 # put this here until it is set in the appropriate package
 addTool("MuonCombinedRecExample.MuonSegmentTaggerTools.MuTagMatchingTool","MuTagMatchingTool")
@@ -87,10 +81,7 @@ addTool("MuonCombinedRecExample.MuonCombinedFitTools.OutwardsSegmentRegionRecove
 ####### calo tag
 addTool("MuonCombinedRecExample.MuonCaloTagTool.CaloTrkMuIdAlgTrackSelectorTool","CaloTrkMuIdAlgTrackSelectorTool")
 addTool("MuonCombinedRecExample.MuonCaloTagTool.TrackEnergyInCaloTool","TrackEnergyInCaloTool")
-addTool("MuonCombinedRecExample.MuonCaloTagTool.TrackDepositInCaloTool","TrackDepositInCaloTool", 
-        ExtrapolatorHandle=AtlasExtrapolator(), 
-        ParticleCaloExtensionTool=pcExtensionTool,
-        ParticleCaloCellAssociationTool=caloCellAssociationTool)
+addTool("MuonCombinedRecExample.MuonCaloTagTool.TrackDepositInCaloTool","TrackDepositInCaloTool")
 addTool("MuonCombinedRecExample.MuonCaloTagTool.CaloMuonTagLoose","CaloMuonTagLoose")
 addTool("MuonCombinedRecExample.MuonCaloTagTool.CaloMuonTag","CaloMuonTag")
 addTool("MuonCombinedRecExample.MuonCaloTagTool.CaloMuonLikelihoodTool","CaloMuonLikelihoodTool")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
index 83c177b13dc8..61efa8401b99 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
@@ -76,19 +76,7 @@ def InDetCandidateTool(name="InDetCandidateTool",**kwargs ):
     return CfgMgr.MuonCombined__InDetCandidateTool(name,**kwargs)
 
 def MuonCreatorTool(name="MuonCreatorTool",**kwargs):
-    from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
-    from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__MuonCaloEnergyTool, Rec__ParticleCaloCellAssociationTool
-    from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool
-
-    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
-    kwargs.setdefault("ParticleCaloExtensionTool", pcExtensionTool)
-
-    caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
-    muonCaloEnergyTool = Rec__MuonCaloEnergyTool(ParticleCaloExtensionTool = pcExtensionTool,
-                                                 ParticleCaloCellAssociationTool = caloCellAssociationTool)
-
-    materialProviderTool = Trk__TrkMaterialProviderTool(MuonCaloEnergyTool = muonCaloEnergyTool);
-    kwargs.setdefault("CaloMaterialProvider", materialProviderTool)
+    kwargs.setdefault("CaloMaterialProvider", getPublicTool("MuonMaterialProviderTool"))
 
     getPublicTool("MuonMomentumBalanceSignificanceTool")
     getPublicTool("MuonScatteringAngleSignificanceTool")
@@ -120,4 +108,8 @@ def MuonCombinedFitTagTool(name="MuonCombinedFitTagTool",**kwargs):
     kwargs.setdefault("MatchQuality",         getPublicTool("MuonMatchQuality") )
     return CfgMgr.MuonCombined__MuonCombinedFitTagTool(name,**kwargs)
                          
-                     
+def MuonCombinedStacoTagTool(name="MuonCombinedStacoTagTool",**kwargs):
+    kwargs.setdefault("ParticleCaloExtensionTool",  getPublicTool("MuonParticleCaloExtensionTool") )
+  
+    return CfgMgr.MuonCombined__MuonCombinedStacoTagTool(name,**kwargs)
+                      
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonSegmentTaggerTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonSegmentTaggerTools.py
index 57ba53d26a2d..347d51cb61a1 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonSegmentTaggerTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonSegmentTaggerTools.py
@@ -31,10 +31,7 @@ def MuTagAmbiguitySolverTool(name='MuTagAmbiguitySolverTool', **kwargs ):
 
 
 def MuonSegmentTagTool( name="MuonSegmentTagTool", **kwargs ):
-    from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
-    from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
-    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
-    kwargs.setdefault("ParticleCaloExtensionTool", pcExtensionTool)
+    kwargs.setdefault("ParticleCaloExtensionTool", getPublicTool("MuonParticleCaloExtensionTool"))
     kwargs.setdefault("MuTagMatchingTool", getPublicTool("MuTagMatchingTool") )
     kwargs.setdefault("MuTagAmbiguitySolverTool", getPublicTool("MuTagAmbiguitySolverTool") )
     return CfgMgr.MuonCombined__MuonSegmentTagTool(name,**kwargs)
-- 
GitLab


From 0c0854ae8c24c4b1a847ba8fa505877cb24658a6 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Mon, 29 Apr 2019 13:26:05 +0200
Subject: [PATCH 014/129] Fix the type to be what is actually retrieved - this
 might not be what was intended, but it IS what has been happening for years.

---
 .../DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx   | 2 +-
 .../MuonTrackSteeringTools/src/MuonTrackSteering.cxx          | 4 ++--
 .../MuidCombinedTools/src/MuidMatchMaker.cxx                  | 4 ++--
 .../src/MuonInsideOutRecoTool.cxx                             | 2 +-
 .../MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx    | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
index 361384bfcaf1..448309ca8680 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
@@ -24,7 +24,7 @@ namespace Muon {
     :
     AthAlgTool(type, name, parent),
     m_slTrackFitter("Trk::GlobalChi2Fitter/MCTBSLFitter"),
-    m_ambiTool("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor"),
+    m_ambiTool("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"),
     m_trackToSegmentTool("Muon::MuonTrackToSegmentTool/MuonTrackToSegmentTool"),
     m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"),
     m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuonTrackSteering.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuonTrackSteering.cxx
index 91394f93bded..ccd620a07be1 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuonTrackSteering.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuonTrackSteering.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -54,7 +54,7 @@ namespace Muon {
         , m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool")
           , m_candidateTool("Muon::MuPatCandidateTool/MuPatCandidateTool")
             , m_trackBTool("Muon::MooTrackBuilder/MooMuonTrackBuilder")
-              , m_ambiTool("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor")
+              , m_ambiTool("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor")
                 , m_mooBTool("Muon::MooTrackBuilder/MooMuonTrackBuilder")
                   , m_candidateMatchingTool("Muon::MooCandidateMatchingTool/MooCandidateMatchingTool")
                     , m_trackRefineTool("Muon::MooTrackBuilder/MooMuonTrackBuilder")
diff --git a/Reconstruction/MuonIdentification/MuidCombinedTools/src/MuidMatchMaker.cxx b/Reconstruction/MuonIdentification/MuidCombinedTools/src/MuidMatchMaker.cxx
index 72589d2dddaa..a03f9f6cd595 100644
--- a/Reconstruction/MuonIdentification/MuidCombinedTools/src/MuidMatchMaker.cxx
+++ b/Reconstruction/MuonIdentification/MuidCombinedTools/src/MuidMatchMaker.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////////////////
@@ -62,7 +62,7 @@ MuidMatchMaker::MuidMatchMaker (const std::string&	type,
 				const std::string&	name, 
 				const IInterface*	parent)
     :	AthAlgTool		(type, name, parent),
-	m_ambiguityProcessor	("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor"),
+	m_ambiguityProcessor	("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"),
 	m_caloEnergyParam	("Rec::MuidCaloEnergyParam/MuidCaloEnergyParam"),
 	m_caloTSOS		("Rec::MuidCaloTrackStateOnSurface/MuidCaloTrackStateOnSurface"),
 	m_intersector		("Trk::RungeKuttaIntersector/RungeKuttaIntersector"),
diff --git a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx
index 26fdefbc47e3..c91ad156e87f 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx
@@ -39,7 +39,7 @@ namespace MuonCombined {
     m_candidateTrackBuilder("Muon::MuonCandidateTrackBuilderTool/MuonCandidateTrackBuilderTool"),
     m_recoValidationTool(""),
     m_trackFitter("Rec::CombinedMuonTrackBuilder/CombinedMuonTrackBuilder"),
-    m_trackAmbiguityResolver("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor"),
+    m_trackAmbiguityResolver("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"),
     m_layerHashProvider("Muon::MuonLayerHashProviderTool")
   {
     declareInterface<IMuonCombinedInDetExtensionTool>(this);
diff --git a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx
index 7f12f50a8d53..e45f25325dd6 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx
@@ -64,7 +64,7 @@ namespace MuonCombined {
     m_segmentMakerT0Fit("Muon::DCMathSegmentMaker/DCMathT0FitSegmentMaker"),
     m_segmentMatchingTool("Muon::MuonLayerSegmentMatchingTool/MuonLayerSegmentMatchingTool"),
     m_recoValidationTool("Muon::MuonRecoValidationTool/MuonRecoValidationTool"),
-    m_trackAmbibuityResolver("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor"),
+    m_trackAmbibuityResolver("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"),
     m_hitTimingTool("Muon::MuonHitTimingTool/MuonHitTimingTool"),
     m_layerHoughTool("Muon::MuonLayerHoughTool/MuonLayerHoughTool"),
     m_muonPRDSelectionTool("Muon::MuonPRDSelectionTool/MuonPRDSelectionTool"),
-- 
GitLab


From d48085729ccc854eedb177539ae728ff708df9d1 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Mon, 29 Apr 2019 13:30:00 +0200
Subject: [PATCH 015/129] Remove the *extremely* misleadingly named
 MuonSimpleAmbiProcessorTool from MuonCombinedRecExample, and for the one
 client, move to MuonAmbiProcessor (which is probably what was intended
 anyway).

---
 .../MuonCombinedBaseTools/src/MuonCreatorTool.cxx          | 2 +-
 .../python/MuonCombinedRecExampleConfigDb.py               | 1 -
 .../MuonCombinedRecExample/python/MuonCombinedTools.py     | 7 -------
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
index 52248d913b37..521c7a6568ed 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
@@ -89,7 +89,7 @@ namespace MuonCombined {
     m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool"),
     m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this),
     m_particleCreator("Trk::TrackParticleCreatorTool/MuonCombinedTrackParticleCreator"),
-    m_ambiguityProcessor("Trk::TrackSelectionProcessorTool/MuonSimpleAmbiProcessorTool"),
+    m_ambiguityProcessor("Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"),
     m_propagator("Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"),
     m_muonDressingTool("MuonCombined::MuonDressingTool/MuonDressingTool"),
     m_momentumBalanceTool("Rec::MuonMomentumBalanceSignificanceTool/MuonMomentumBalanceSignificanceTool"),
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index fbf0e3453167..aa4e1769e1d0 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -69,7 +69,6 @@ addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","MuonCreatorT
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCreatorTool","StauCreatorTool",BuildStauContainer=True)
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCandidateTool","MuonCandidateTool")
 addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedTrackSummaryTool","MuonCombinedTrackSummaryTool")
-addTool("MuonCombinedRecExample.MuonCombinedTools.MuonSimpleAmbiProcessorTool","MuonSimpleAmbiProcessorTool")
 
 #addTool("MuonCombinedRecExample.CombinedMuonTrackSummary.CombinedMuonTrackSummary","CombinedMuonTrackSummary")
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
index 61efa8401b99..4be30e6c36be 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
@@ -15,13 +15,6 @@ beamFlags = jobproperties.Beam
 from AthenaCommon.GlobalFlags import globalflags
 from RecExConfig.RecFlags import rec
 
-def MuonSimpleAmbiProcessorTool( name='MuonSimpleAmbiProcessorTool', **kwargs): 
-    kwargs.setdefault("DropDouble", False )
-    kwargs.setdefault("DisableSorting", True )
-    kwargs.setdefault("ScoringTool", getPublicTool("MuonTrackScoringTool") )
-    kwargs.setdefault("SelectionTool", getPublicTool("MuonAmbiSelectionTool") )
-    return CfgMgr.Trk__TrackSelectionProcessorTool(name,**kwargs)
-
 def MuonCombinedInDetDetailedTrackSelectorTool( name='MuonCombinedInDetDetailedTrackSelectorTool', **kwargs): 
     if beamFlags.beamType() == 'cosmics':
         kwargs.setdefault("pTMin", 500 )
-- 
GitLab


From 78e664a81596bd895a024976afdc0438597e9885 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 30 Apr 2019 15:58:13 +0200
Subject: [PATCH 016/129] MuonTrackSummaryHelperTool: Remove duplicate property

- Remove duplicate property `MdtPrepDataContainer`, which was declared
  both in the .cxx and .h file.
- Move all properties to new style properties.
- Fix indentation in .h file.
- Move private header to src directory
---
 .../MuonTrackSummaryHelperTool/CMakeLists.txt |   4 -
 .../MuonTrackSummaryHelperTool.h              | 138 ------------------
 .../src/MuonTrackSummaryHelperTool.cxx        |  38 +----
 .../src/MuonTrackSummaryHelperTool.h          | 133 +++++++++++++++++
 .../MuonTrackSummaryHelperTool_entries.cxx    |   2 +-
 5 files changed, 137 insertions(+), 178 deletions(-)
 delete mode 100755 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h
 create mode 100755 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h

diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/CMakeLists.txt
index 5de83df25cc4..489261cd0d04 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/CMakeLists.txt
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/CMakeLists.txt
@@ -38,7 +38,3 @@ atlas_add_component( MuonTrackSummaryHelperTool
                      src/*.cxx
                      src/components/*.cxx
                      LINK_LIBRARIES AthenaBaseComps GaudiKernel MuonPrepRawData TrkGeometry TrkEventPrimitives TrkTrackSummary TrkToolInterfaces StoreGateLib SGtests Identifier MuonReadoutGeometry MuonIdHelpersLib MuonCompetingRIOsOnTrack MuonRIO_OnTrack MuonSegment MuonRecHelperToolsLib MuonRecToolInterfaces TrkDetElementBase TrkSurfaces TrkCompetingRIOsOnTrack TrkMeasurementBase TrkParameters TrkPseudoMeasurementOnTrack TrkTrack TrkExInterfaces )
-
-# Install files from the package:
-atlas_install_headers( MuonTrackSummaryHelperTool )
-
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h
deleted file mode 100755
index 33b75ecea632..000000000000
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MUONTRACKSUMMARYHELPERTOOL_H
-#define MUONTRACKSUMMARYHELPERTOOL_H
-
-#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
-//
-#include "TrkGeometry/TrackingGeometry.h"
-#include "TrkEventPrimitives/ParticleHypothesis.h"
-#include "MuonPrepRawData/MuonPrepDataContainer.h"
-
-#include "TrkTrackSummary/TrackSummary.h"
-#include "TrkTrackSummary/MuonTrackSummary.h"
-
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-
-#include "StoreGate/ReadHandleKey.h"
-
-#include <vector>
-#include <bitset>
-
-class RpcIdHelper;
-class TgcIdHelper;
-class CscIdHelper;
-class MdtIdHelper;
-// New Small Wheel
-class MmIdHelper;
-class sTgcIdHelper;
-
-class Identifier;
-
-namespace Trk {
-    class RIO_OnTrack;
-    class TrackStateOnSurface;
-    class ITrackHoleSearchTool;
-    class CompetingRIOsOnTrack;
-    class IExtrapolator;
-}
-
-namespace MuonGM {
-  class MuonDetectorManager;
-}
-
-namespace Muon {
-
-  class MuonIdHelperTool;
-  class MuonEDMHelperTool;
-  
-  class MuonTrackSummaryHelperTool :  virtual public Trk::ITrackSummaryHelperTool, public AthAlgTool   {
-  public:
-        MuonTrackSummaryHelperTool(const std::string&,const std::string&,const IInterface*);
-        
-        virtual ~MuonTrackSummaryHelperTool ();
-        
-        virtual StatusCode initialize();
-        
-        virtual void analyse(
-                            const Trk::Track& trk, 
-                            const Trk::RIO_OnTrack* rot, 
-                            const Trk::TrackStateOnSurface* tsos,
-                            std::vector<int>& information, 
-                            std::bitset<Trk::numberOfDetectorTypes>& hitPattern  ) const ;
-                            
-        
-        virtual void analyse( 
-                            const Trk::Track& trk,
-                            const Trk::CompetingRIOsOnTrack* crot,
-                            const Trk::TrackStateOnSurface* tsos,
-                            std::vector<int>& information, 
-                            std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const;
-
-            
-        /** */
-        void searchForHoles(
-                  const Trk::Track& track,
-                  std::vector<int>& information, Trk::ParticleHypothesis hyp) const;
-
-	void addDetailedTrackSummary( const Trk::Track& track, Trk::TrackSummary& summary ) const;
-
-private:
-
-	const MdtPrepDataCollection* findMdtPrdCollection( const Identifier& chId ) const;
-	void calculateRoadHits(Trk::MuonTrackSummary::ChamberHitSummary& chamberHitSummary, const Trk::TrackParameters& pars) const;
-	bool isFirstProjection( const Identifier& id ) const;
-	void updateHoleContent( Trk::MuonTrackSummary::ChamberHitSummary& chamberHitSummary ) const;
-
-        // muon IdHelpers
-        const RpcIdHelper* m_rpcId;
-        const TgcIdHelper* m_tgcId;
-        const CscIdHelper* m_cscId;
-        const MdtIdHelper* m_mdtId;
-        //New Small Wheel
-        const sTgcIdHelper* m_stgcId;
-        const MmIdHelper* m_mmId;
-        
-        /** tool used to do hole search */
-        ToolHandle<Trk::ITrackHoleSearchTool> m_muonTgTool;
-        
-        /* used to work out layer ids etc*/
-        ToolHandle<MuonIdHelperTool> m_idHelperTool;
-        
-        /* used to work out if track has momentum */
-        ToolHandle<MuonEDMHelperTool> m_edmHelperTool;
-        
-        /* used to do hits-in-road search */
-        ToolHandle<Trk::IExtrapolator> m_extrapolator;
-        
-        /* used to do hits-in-road search for straight tracks */
-        ToolHandle<Trk::IExtrapolator> m_slExtrapolator;
-        
-        /**increment the 'type'*/
-        void increment(int& type) const;
-        
-        /**Allows us to block the hole search whilst the Muon tracking geometry etc is being debugged*/
-        bool m_doHoles;
-        
-	/** allow us to block the calculation of close hits */
-	bool m_calculateCloseHits;
-
-	/** width road use to associate close hits  */
-	double m_roadWidth;
-	
-	/** storegate key of MdtPrepDataContainer */
-	SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_mdtKey{this,"MdtPrepDataContainer","MDT_DriftCircles","MDT PRDs"};
-
-        //std::string m_holeOnTrackToolName;
-        mutable const Trk::TrackingGeometry* m_trackingGeometry;
-        std::string  m_trackingGeometryName;
-	const MuonGM::MuonDetectorManager*  m_detMgr;
-
-    };
-    
-}
-#endif 
-
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx
index b1cbb362a25e..897c5593fbae 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx
@@ -1,18 +1,13 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h"
-
-#include "GaudiKernel/MsgStream.h"
-
-#include "StoreGate/StoreGateSvc.h"
+#include "MuonTrackSummaryHelperTool.h"
 
 #include "Identifier/Identifier.h"
 
 #include "TrkDetElementBase/TrkDetElementBase.h"
 #include "TrkMeasurementBase/MeasurementBase.h"
-//#include "TrkRIO_OnTrack/RIO_OnTrack.h"
 #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h"
 #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h"
 
@@ -24,31 +19,20 @@
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 
 #include "TrkTrackSummary/TrackSummary.h"
-
-#include "TrkExInterfaces/IExtrapolator.h"
-
-
 #include "TrkTrack/Track.h"
 #include "TrkTrack/TrackStateOnSurface.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkSurfaces/Surface.h"
-//#include "TrkGeometry/Layer.h"
 
 #include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonIdHelpers/TgcIdHelper.h"
 #include "MuonIdHelpers/CscIdHelper.h"
 #include "MuonIdHelpers/RpcIdHelper.h"
 
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-#include "MuonRecHelperTools/MuonEDMHelperTool.h"
-
-#include "TrkToolInterfaces/ITrackHoleSearchTool.h"
-
 #include "StoreGate/ReadHandle.h"
 
 #include <vector>
 #include <cassert>
-#include <iostream>
 #include <set>
 #include <cmath>
 
@@ -56,25 +40,9 @@ Muon::MuonTrackSummaryHelperTool::MuonTrackSummaryHelperTool(
 							     const std::string& t,
 							     const std::string& n,
 							     const IInterface*  p )
-  :
-  AthAlgTool(t,n,p),
-  m_muonTgTool("MuonHolesOnTrack"),
-  m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"),
-  m_edmHelperTool("Muon::MuonEDMHelperTool/MuonEDMHelperTool"),
-  m_extrapolator("Trk::Extrapolator/AtlasExtrapolator"),
-  m_slExtrapolator("Trk::Extrapolator/MuonStraightLineExtrapolator"),
-  m_doHoles(false), 
-  m_trackingGeometry(0),
-  m_trackingGeometryName("MuonStandaloneTrackingGeometry")
+  : AthAlgTool(t,n,p)
 {
   declareInterface<ITrackSummaryHelperTool>(this);
-  declareProperty("DoHolesOnTrack",  m_doHoles);	
-  declareProperty("CalculateCloseHits", m_calculateCloseHits = false );
-  declareProperty("RoadWidth",           m_roadWidth = 135.,"width used to calculate hits within the road (mm)"); 
-  declareProperty("Extrapolator",    m_extrapolator);
-  declareProperty("MdtPrepDataContainer", m_mdtKey="MDT_DriftCircles");
-  declareProperty("HoleOnTrackTool", m_muonTgTool);	
-  declareProperty("TrackingGeometryName", m_trackingGeometryName);
 }
 
 Muon::MuonTrackSummaryHelperTool::~MuonTrackSummaryHelperTool()
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
new file mode 100755
index 000000000000..1b280dde1da2
--- /dev/null
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
@@ -0,0 +1,133 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef MUONTRACKSUMMARYHELPERTOOL_H
+#define MUONTRACKSUMMARYHELPERTOOL_H
+
+#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
+//
+#include "TrkGeometry/TrackingGeometry.h"
+#include "TrkEventPrimitives/ParticleHypothesis.h"
+#include "TrkExInterfaces/IExtrapolator.h"
+#include "TrkToolInterfaces/ITrackHoleSearchTool.h"
+#include "TrkTrackSummary/TrackSummary.h"
+#include "TrkTrackSummary/MuonTrackSummary.h"
+
+#include "MuonPrepRawData/MuonPrepDataContainer.h"
+#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonRecHelperTools/MuonEDMHelperTool.h"
+
+#include "GaudiKernel/ToolHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "StoreGate/ReadHandleKey.h"
+
+#include <vector>
+#include <bitset>
+
+class RpcIdHelper;
+class TgcIdHelper;
+class CscIdHelper;
+class MdtIdHelper;
+// New Small Wheel
+class MmIdHelper;
+class sTgcIdHelper;
+
+class Identifier;
+
+namespace Trk {
+  class RIO_OnTrack;
+  class TrackStateOnSurface;
+  class CompetingRIOsOnTrack;
+}
+
+namespace MuonGM {
+  class MuonDetectorManager;
+}
+
+namespace Muon {
+
+  class MuonTrackSummaryHelperTool :  virtual public Trk::ITrackSummaryHelperTool, public AthAlgTool   {
+  public:
+    MuonTrackSummaryHelperTool(const std::string&,const std::string&,const IInterface*);
+        
+    virtual ~MuonTrackSummaryHelperTool ();
+        
+    virtual StatusCode initialize() override;
+        
+    virtual void analyse(
+                         const Trk::Track& trk,
+                         const Trk::RIO_OnTrack* rot,
+                         const Trk::TrackStateOnSurface* tsos,
+                         std::vector<int>& information,
+                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern  ) const override;
+
+    virtual void analyse( 
+                         const Trk::Track& trk,
+                         const Trk::CompetingRIOsOnTrack* crot,
+                         const Trk::TrackStateOnSurface* tsos,
+                         std::vector<int>& information,
+                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override;
+
+    void searchForHoles(
+                        const Trk::Track& track,
+                        std::vector<int>& information, Trk::ParticleHypothesis hyp) const;
+
+    void addDetailedTrackSummary( const Trk::Track& track, Trk::TrackSummary& summary ) const;
+
+private:
+
+    const MdtPrepDataCollection* findMdtPrdCollection( const Identifier& chId ) const;
+    void calculateRoadHits(Trk::MuonTrackSummary::ChamberHitSummary& chamberHitSummary, const Trk::TrackParameters& pars) const;
+    bool isFirstProjection( const Identifier& id ) const;
+    void updateHoleContent( Trk::MuonTrackSummary::ChamberHitSummary& chamberHitSummary ) const;
+
+    /**increment the 'type'*/
+    void increment(int& type) const;
+
+    // muon IdHelpers
+    const RpcIdHelper* m_rpcId{nullptr};
+    const TgcIdHelper* m_tgcId{nullptr};
+    const CscIdHelper* m_cscId{nullptr};
+    const MdtIdHelper* m_mdtId{nullptr};
+    //New Small Wheel
+    const sTgcIdHelper* m_stgcId{nullptr};
+    const MmIdHelper* m_mmId{nullptr};
+
+    /* used to work out layer ids etc*/
+    ToolHandle<MuonIdHelperTool> m_idHelperTool{"Muon::MuonIdHelperTool/MuonIdHelperTool"};
+
+    /* used to work out if track has momentum */
+    ToolHandle<MuonEDMHelperTool> m_edmHelperTool{"Muon::MuonEDMHelperTool/MuonEDMHelperTool"};
+
+    /* used to do hits-in-road search for straight tracks */
+    ToolHandle<Trk::IExtrapolator> m_slExtrapolator{"Trk::Extrapolator/MuonStraightLineExtrapolator"};
+
+    /** tool used to do hole search */
+    ToolHandle<Trk::ITrackHoleSearchTool> m_muonTgTool{this, "HoleOnTrackTool", "MuonHolesOnTrack"};
+
+    /* used to do hits-in-road search */
+    ToolHandle<Trk::IExtrapolator> m_extrapolator{this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
+        
+    /**Allows us to block the hole search whilst the Muon tracking geometry etc is being debugged*/
+    Gaudi::Property<bool> m_doHoles{this, "DoHolesOnTrack", false};
+        
+    /** allow us to block the calculation of close hits */
+    Gaudi::Property<bool> m_calculateCloseHits{this, "CalculateCloseHits", false};
+
+    /** width road use to associate close hits  */
+    Gaudi::Property<double> m_roadWidth{this, "RoadWidth", 135., "width used to calculate hits within the road (mm)"};
+
+    /** storegate key of MdtPrepDataContainer */
+    SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_mdtKey{this,"MdtPrepDataContainer","MDT_DriftCircles","MDT PRDs"};
+
+    /** name of the tracking geometry */
+    Gaudi::Property<std::string> m_trackingGeometryName{this, "TrackingGeometryName", "MuonStandaloneTrackingGeometry"};
+
+    mutable const Trk::TrackingGeometry* m_trackingGeometry{nullptr};
+    const MuonGM::MuonDetectorManager*  m_detMgr{nullptr};
+  };
+}
+#endif 
+
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/components/MuonTrackSummaryHelperTool_entries.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/components/MuonTrackSummaryHelperTool_entries.cxx
index 4b162a02f348..aef8e44df557 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/components/MuonTrackSummaryHelperTool_entries.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/components/MuonTrackSummaryHelperTool_entries.cxx
@@ -1,4 +1,4 @@
-#include "MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h"
+#include "../MuonTrackSummaryHelperTool.h"
 #include "../MuonHitSummaryTool.h"
 
 using namespace Muon;
-- 
GitLab


From 5fcadaf496f35e4af248e17d1fc85e548b3d6851 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Tue, 30 Apr 2019 16:35:03 +0200
Subject: [PATCH 017/129] MuFastDataPreparator: Remove duplicate property and
 cleanup

- Remove duplicate RPCRecRoiSvc property that was declared both in the
  .cxx and .h file
- Move all properties to new-style properties
- Convert undeclared `BooleanProperty` to plain `bool`
- Remove `finalize()` method (not necessary to call the base class)
- Remove interface declaration code as this tool doesn't have any
  additional interfaces beyond `AthAlgTool`
---
 .../TrigL2MuonSA/MuFastDataPreparator.h       | 58 ++++++-------------
 .../TrigL2MuonSA/RpcDataPreparator.h          |  4 +-
 .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 55 +-----------------
 3 files changed, 24 insertions(+), 93 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h
index 12221ac3d87f..5c4315ef8c65 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h
@@ -34,8 +34,6 @@
 #include "TrigL2MuonSA/PtEndcapLUTSvc.h"
 #include "RegionSelector/IRegSelSvc.h"
 
-class StoreGateSvc;
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -45,17 +43,12 @@ class MuFastDataPreparator: public AthAlgTool
 {
  public:
   
-  static const InterfaceID& interfaceID();
-  
-  MuFastDataPreparator(const std::string& type, 
+  MuFastDataPreparator(const std::string& type,
 		       const std::string& name,
 		       const IInterface*  parent);
-  
-  ~MuFastDataPreparator();
-  
-  virtual StatusCode initialize();
-  virtual StatusCode finalize  ();
-  
+
+  virtual StatusCode initialize() override;
+
  public:
   
   StatusCode prepareData(const LVL1::RecMuonRoI*     p_roi,
@@ -77,9 +70,7 @@ class MuFastDataPreparator: public AthAlgTool
 			 TrigL2MuonSA::MdtHits&      mdtHits_overlap,
 			 TrigL2MuonSA::CscHits&      cscHits);
   
-  BooleanProperty  m_use_mcLUT;
-
-  void setOptions(const TrigL2MuonSA::MuFastDataPreparatorOptions& options); 
+  void setOptions(const TrigL2MuonSA::MuFastDataPreparatorOptions& options);
 
   void setRoadWidthForFailure(double rWidth_RPC_Failed, double rWidth_TGC_Failed);
 
@@ -97,39 +88,28 @@ class MuFastDataPreparator: public AthAlgTool
 
   bool isRpcFakeRoi() {return m_isRpcFakeRoi;}
 
- protected:
-  
-  // Services
-  //ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc;
-  ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc {
-  	this, "RPCRecRoiSvc", "LVL1RPC::RPCRecRoiSvc", "Reconstruction of RPC RoI"};
-
  private:
   
   TrigL2MuonSA::MuFastDataPreparatorOptions m_options;
+  const MdtIdHelper* m_mdtIdHelper{nullptr};
 
   ServiceHandle<IRegSelSvc> m_regionSelector;
-  const MdtIdHelper* m_mdtIdHelper;
-  
- private:
-  
-  //const TrigL2MuonSA::PtEndcapLUTSvc*    m_ptEndcapLUTSvc;
 
-  // Tools
-  ToolHandle<RpcDataPreparator>  m_rpcDataPreparator;
-  ToolHandle<TgcDataPreparator>  m_tgcDataPreparator;
-  ToolHandle<MdtDataPreparator>  m_mdtDataPreparator;
-  ToolHandle<CscDataPreparator>  m_cscDataPreparator;
-  
-  ToolHandle<RpcRoadDefiner>     m_rpcRoadDefiner;
-  ToolHandle<TgcRoadDefiner>     m_tgcRoadDefiner;
-  ToolHandle<RpcPatFinder>       m_rpcPatFinder;
-  
-  ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool;
+  ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc{this, "RPCRecRoiSvc", "LVL1RPC::RPCRecRoiSvc"};
+  ToolHandle<RpcDataPreparator>   m_rpcDataPreparator{this, "RPCDataPreparator", "TrigL2MuonSA::RpcDataPreparator"};
+  ToolHandle<TgcDataPreparator>   m_tgcDataPreparator{this, "TGCDataPreparator", "TrigL2MuonSA::TgcDataPreparator"};
+  ToolHandle<MdtDataPreparator>   m_mdtDataPreparator{this, "MDTDataPreparator", "TrigL2MuonSA::MdtDataPreparator"};
+  ToolHandle<CscDataPreparator>   m_cscDataPreparator{this, "CSCDataPreparator", "TrigL2MuonSA::CscDataPreparator"};
 
-  BooleanProperty m_use_rpc;
+  ToolHandle<RpcRoadDefiner>      m_rpcRoadDefiner{"TrigL2MuonSA::RpcRoadDefiner"};
+  ToolHandle<TgcRoadDefiner>      m_tgcRoadDefiner{"TrigL2MuonSA::TgcRoadDefiner"};
+  ToolHandle<RpcPatFinder>        m_rpcPatFinder{"TrigL2MuonSA::RpcPatFinder"};
+  
+  ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool{nullptr};
 
-  bool m_isRpcFakeRoi;
+  bool m_use_rpc{false};
+  bool m_isRpcFakeRoi{false};
+  bool m_use_mcLUT{false};
 };
   
 } // namespace TrigL2MuonSA
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
index 2e25d943ba6f..e72a0b755969 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef  TRIGL2MUONSA_RPCDATAPREPARATOR_H
@@ -103,7 +103,7 @@ class RpcDataPreparator: public AthAlgTool
       ToolHandle <Muon::MuonIdHelperTool>  m_idHelperTool;  //!< Pointer to concrete tool
 
       SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_rpcPrepContainerKey{
-	this, "RpcPrepDataContainer", "RPC_Measurements", "Neme of the RPCContainer to read in"};
+       this, "RpcPrepDataContainer", "RPC_Measurements", "Name of the RPCContainer to read in"};
 
       // Declare the keys used to access the data: one for reading and one
       // for writing.
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx
index e8df227d6294..32b4b202ae19 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigL2MuonSA/MuFastDataPreparator.h"
@@ -14,15 +14,6 @@
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonIdHelpers/MdtIdHelper.h"
 
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_MuFastDataPreparator("IID_MuFastDataPreparator", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::MuFastDataPreparator::interfaceID() { return IID_MuFastDataPreparator; }
-
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -30,30 +21,10 @@ TrigL2MuonSA::MuFastDataPreparator::MuFastDataPreparator(const std::string& type
                                                          const std::string& name,
                                                          const IInterface*  parent): 
   AthAlgTool(type,name,parent),
-  m_options(),
-  m_regionSelector("RegSelSvc", name ),
-  m_rpcDataPreparator("TrigL2MuonSA::RpcDataPreparator"),
-  m_tgcDataPreparator("TrigL2MuonSA::TgcDataPreparator", this),
-  m_mdtDataPreparator("TrigL2MuonSA::MdtDataPreparator", this),
-  m_cscDataPreparator("TrigL2MuonSA::CscDataPreparator"),
-  m_rpcRoadDefiner("TrigL2MuonSA::RpcRoadDefiner"),
-  m_tgcRoadDefiner("TrigL2MuonSA::TgcRoadDefiner"),
-  m_rpcPatFinder("TrigL2MuonSA::RpcPatFinder")
+  m_regionSelector("RegSelSvc", name)
 {
-   declareInterface<TrigL2MuonSA::MuFastDataPreparator>(this);
-   declareProperty("RPCRecRoiSvc",      m_recRPCRoiSvc,      "Reconstruction of RPC RoI");
-   declareProperty("RPCDataPreparator", m_rpcDataPreparator );
-   declareProperty("TGCDataPreparator", m_tgcDataPreparator );
-   declareProperty("MDTDataPreparator", m_mdtDataPreparator );
-   declareProperty("CSCDataPreparator", m_cscDataPreparator );
 }
 
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-TrigL2MuonSA::MuFastDataPreparator::~MuFastDataPreparator() 
-{
-}
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
@@ -225,10 +196,8 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::prepareData(const LVL1::RecMuonRo
   
   StatusCode sc = StatusCode::SUCCESS;
   
-  if(!m_use_rpc){
+  if(m_use_rpc) {
 
-  } else {
-    
     m_rpcPatFinder->clear();
 
     unsigned int roiWord = p_roi->roiWord();
@@ -346,21 +315,3 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::prepareData(const LVL1::RecMuonRo
 
   return StatusCode::SUCCESS; 
 }
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::MuFastDataPreparator::finalize()
-{
-  ATH_MSG_DEBUG("Finalizing MuFastDataPreparator - package version " << PACKAGE_VERSION);
-   
-   StatusCode sc = AthAlgTool::finalize(); 
-   if (!sc.isSuccess()) {
-     ATH_MSG_ERROR("Could not finalize the AthAlgTool base class.");
-     return sc;
-   }
-   return sc;
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-- 
GitLab


From a2d43855b97dc8d70ac5e2772581d30a57c39799 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Tue, 30 Apr 2019 17:10:34 +0200
Subject: [PATCH 018/129] More fixes for configuration.

---
 .../MuonCombinedRecExample/python/MuonCaloTagTool.py           | 2 +-
 .../MuonCombinedRecExample/python/MuonCombinedFitTools.py      | 3 ++-
 .../python/MuonCombinedRecExampleConfigDb.py                   | 2 +-
 .../MuonCombinedRecExample/python/MuonCombinedTools.py         | 1 +
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
index a1b5f7615e29..a8a5b63dbfb7 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
@@ -39,7 +39,7 @@ def TrackDepositInCaloTool( name ='TrackDepositInCaloTool', **kwargs ):
     from TrackToCalo.TrackToCaloConf import Rec__ParticleCaloCellAssociationTool
     caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = getPublicTool("MuonParticleCaloExtensionTool"))
     kwargs.setdefault("ExtrapolatorHandle",       AtlasExtrapolator() )
-    kwargs.setdefault("ParticleCaloExtensionTool",       MuonParticleCaloExtensionTool )
+    kwargs.setdefault("ParticleCaloExtensionTool",       getPublicTool("MuonParticleCaloExtensionTool") )
     kwargs.setdefault("ParticleCaloCellAssociationTool",       caloCellAssociationTool )
     return CfgMgr.TrackDepositInCaloTool(name,**kwargs)
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
index 85904b5d8113..a090735a9bba 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
@@ -185,9 +185,10 @@ def MuidSegmentRegionRecoveryTool( name ='MuidSegmentRegionRecoveryTool', **kwar
 
 def MuonMaterialProviderTool( name = "MuonMaterialProviderTool"):
     from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
+    from AthenaCommon.AppMgr import ToolSvc
     from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__MuonCaloEnergyTool, Rec__ParticleCaloCellAssociationTool
     from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool
-    caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
+    caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = getPublicTool("MuonParticleCaloExtensionTool"))
     ToolSvc += caloCellAssociationTool
   
     muonCaloEnergyTool = Rec__MuonCaloEnergyTool(ParticleCaloExtensionTool = getPublicTool("MuonParticleCaloExtensionTool"),
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
index aa4e1769e1d0..85f4740a2da3 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecExampleConfigDb.py
@@ -36,7 +36,7 @@ addTool("Trk::TrackParticleCreatorTool","TrackParticleCreatorTool")
 addTool("MuonCombinedRecExample.MuonCaloTagTool.MuonCaloTagTool","MuonCaloTagTool")
 addTool("Rec::MuonMomentumBalanceSignificanceTool","MuonMomentumBalanceSignificanceTool")
 addTool("Rec::MuonScatteringAngleSignificanceTool","MuonScatteringAngleSignificanceTool")
-addTool( "Muon::MuonSystemExtensionTool", "MuonSystemExtensionTool", ParticleCaloExtensionTool = "ParticleCaloExtensionTool", Extrapolator = "AtlasExtrapolator")
+addTool( "Muon::MuonSystemExtensionTool", "MuonSystemExtensionTool", ParticleCaloExtensionTool = "MuonParticleCaloExtensionTool", Extrapolator = "AtlasExtrapolator")
 addTool("MuonCombinedRecExample.MuonCombinedFitTools.MuonMaterialProviderTool","MuonMaterialProviderTool")
 
 addAlgorithm("MuonCombinedRecExample.MuonCombinedAlgs.MuGirlAlg","MuGirlAlg")
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
index 4be30e6c36be..e7f247d6fdd6 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedTools.py
@@ -76,6 +76,7 @@ def MuonCreatorTool(name="MuonCreatorTool",**kwargs):
     getPublicTool("MuonCaloParticleCreator")
 
     kwargs.setdefault("TrackParticleCreator", getPublicTool("MuonCombinedParticleCreator") )
+    kwargs.setdefault("ParticleCaloExtensionTool", getPublicTool("MuonParticleCaloExtensionTool") )
     # kwargs.setdefault("CaloNoiseTool", getPublicTool("CaloNoiseToolDefault") )
     return CfgMgr.MuonCombined__MuonCreatorTool(name,**kwargs)
 
-- 
GitLab


From 0c241577f1223c15df65b02ddf3c8877be31d485 Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Tue, 30 Apr 2019 20:38:38 +0200
Subject: [PATCH 019/129] TileByteStream: Fix Tile ROD decoder dependency

TileROD_Decoder tool has been modified
to use TileL2Builder tool via ToolHandle
in order to propagate dependency correctly.

Reference files for unit tests
have been updated accordingly.
---
 .../TileByteStream/TileROD_Decoder.h          |  16 +-
 .../TileBeamElemContByteStreamCnv_test.ref    | 164 +++---
 .../TileDigitsContByteStreamCnv_test.ref      | 398 +++++++--------
 .../share/TileL2ContByteStreamCnv_test.ref    | 164 +++---
 .../share/TileLaserObjByteStreamCnv_test.ref  | 466 +++++++++---------
 .../share/TileMuRcvContByteStreamCnv_test.ref | 434 ++++++++--------
 .../share/TileROD_Decoder_test.txt            |   2 +-
 .../TileRawChannelContByteStreamCnv_test.ref  | 422 ++++++++--------
 .../TileByteStream/src/TileROD_Decoder.cxx    |  22 +-
 9 files changed, 1037 insertions(+), 1051 deletions(-)

diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
index dc07c3aa98ff..bc1c4896c075 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
@@ -35,6 +35,7 @@
 #include "TileConditions/TileCondToolTiming.h"
 #include "TileConditions/TileCondToolEmscale.h"
 #include "TileConditions/ITileBadChanTool.h"
+#include "TileL2Algs/TileL2Builder.h"
 
 // Atlas includes
 #include "AthenaBaseComps/AthAlgTool.h"
@@ -57,7 +58,6 @@
 
 class TileRawChannelBuilder;
 class TileCellBuilder;
-class TileL2Builder;
 class TileHid2RESrcID;
 
 namespace TileROD_Helper {
@@ -526,13 +526,15 @@ class TileROD_Decoder: public AthAlgTool {
     float m_allowedTimeMax; //!< set amp to zero if time is above allowed time max
 
     ToolHandle<TileCondToolTiming> m_tileToolTiming{this,
-          "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"};
+        "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"};
     ToolHandle<TileCondToolOfcCool> m_tileCondToolOfcCool{this,
-          "TileCondToolOfcCool", "TileCondToolOfcCool", "Tile OFC tool"};
+        "TileCondToolOfcCool", "TileCondToolOfcCool", "Tile OFC tool"};
     ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this,
-          "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"};
+        "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"};
     ToolHandle<ITileBadChanTool> m_tileBadChanTool{this,
-	        "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
+        "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
+    ToolHandle<TileL2Builder> m_L2Builder{this,
+        "TileL2Builder", "TileL2Builder", "Tile L2 builder tool"};
 
     // OFWeights for different units and different drawers:
     // every element contains OFC for single drawer and one of 4 different units
@@ -578,10 +580,6 @@ class TileROD_Decoder: public AthAlgTool {
     int m_maxWarningPrint;
     int m_maxErrorPrint;
 
-    // Pointer to TileL2Builder
-    const TileL2Builder* m_L2Builder;
-    std::string m_TileDefaultL2Builder;
-
     mutable std::atomic<int> m_WarningCounter;
     mutable std::atomic<int> m_ErrorCounter;
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
index f4fb638c7953..8845cb4ae9d3 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileBeamElemContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Sun Mar 31 05:32:45 CEST 2019
+Tue Apr 30 20:05:17 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileBeamElemContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:33:16 2019
+                                          running on pcatl12 on Tue Apr 30 20:05:27 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -45,8 +45,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -79,7 +79,7 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
-ClassIDSvc           INFO  getRegistryEntries: read 3099 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3142 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -98,7 +98,7 @@ IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/TIME/CHANNELOFFSET/PHY
 IOVDbSvc             INFO Added taginfo remove for /TILE/ONL01/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
-ClassIDSvc           INFO  getRegistryEntries: read 815 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 830 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -187,7 +187,7 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.6S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.5S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -199,7 +199,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -211,9 +211,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -248,7 +248,7 @@ GeoModelSvc.Til...   INFO  Global positioning of barrel with rotation (0,0,0)) a
 GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrMan...   INFO Entering create_elements()
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.21S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.11S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -270,11 +270,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -327,7 +327,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 3841 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3843 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 HistogramPersis...WARNING Histograms saving not required.
@@ -337,7 +337,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
-ClassIDSvc           INFO  getRegistryEntries: read 629 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -382,12 +382,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -634,23 +634,23 @@ IncidentProcAlg2     INFO Finalize
 EventInfoByteSt...   INFO finalize 
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.15 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.65 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.07 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.12 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.19 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.26 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.14 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.15 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.49 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     1.09 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.03 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
-IOVDbSvc             INFO  bytes in ((      3.40 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.69 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     1.29 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.01 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.85 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.79 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.90 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.86 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.90 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     1.02 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.45 ))s
+IOVDbSvc             INFO  bytes in ((      8.90 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.17 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     3.23 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.14 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     7.76 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -659,29 +659,29 @@ ToolSvc.TileROD...   INFO Finalizing
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=  245(+-  235)/   10/  480 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.53  [s] Ave/Min/Max=0.0408(+-0.133)/    0/  0.5  [s] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 9.77  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  250 [ms] Ave/Min/Max=  125(+-  125)/    0/  250 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  280 [ms] Ave/Min/Max= 21.5(+-   69)/    0/  260 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot=  6.6  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-Sun Mar 31 05:33:46 CEST 2019
+Tue Apr 30 20:05:55 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [4] concurrent threads and [4] concurrent events
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 4 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileBeamElemContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -701,7 +701,7 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:34:19 2019
+                                          running on pcatl12 on Tue Apr 30 20:06:03 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -716,8 +716,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                         WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -748,8 +748,8 @@ ByteStreamAddressProviderSvc                       INFO    Calorimeter Cluster P
 ByteStreamAddressProviderSvc                       INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddressProviderSvc                       INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddressProviderSvc                       INFO -- Will fill Store with id =  0
-ClassIDSvc                                         INFO  getRegistryEntries: read 2774 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 1024 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2817 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1039 CLIDRegistry entries for module ALL
 IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc                                           INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -859,7 +859,7 @@ EndcapDMConstruction                               INFO Start building EC electr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstruction                               INFO Start building EC electronics geometry
-GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.6S
+GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.53S
 GeoModelSvc.TileDetectorTool                       INFO  Entering TileDetectorTool::create()
 TileDddbManager                                    INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                    INFO n_tiglob = 5
@@ -871,7 +871,7 @@ TileDddbManager                                    INFO n_tileSwitches = 1
 ClassIDSvc                                         INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDescrCnv                                INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID                                           INFO initialize_from_dictionary 
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -883,9 +883,9 @@ CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID                                     INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -920,7 +920,7 @@ GeoModelSvc.TileDetectorTool                       INFO  Global positioning of b
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrManager                                INFO Entering create_elements()
-GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.24S
+GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.15S
 ClassIDSvc                                         INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                     INFO Initializing....TileInfoLoader
 TileInfoLoader                                     INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -942,11 +942,11 @@ TileInfoLoader                                     INFO Sampling fraction for E2
 TileInfoLoader                                     INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader                                     INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader                                     INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID                                        INFO initialize_from_dictionary
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -955,7 +955,7 @@ TileCablingSvc                                     INFO Cabling for RUN2 (2014-2
 TileCablingSvc                                     INFO Setting Cabling type to 4
 TileInfoLoader                                     INFO Placed TileInfo object in the detector store.
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 4106 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 4108 CLIDRegistry entries for module ALL
 PyComponentMgr                              0      INFO Initializing PyComponentMgr...
 Finalizer                                   0      INFO Initializing Finalizer...
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
@@ -1066,12 +1066,12 @@ CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDescrCnv                    0   0      INFO  Finished 
 CaloIdMgrDetDescrCnv                    0   0      INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -1082,7 +1082,7 @@ AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processi
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...0   0      INFO TileL2Builder initialization completed
+ToolSvc.TileROD_Decoder.TileL2Builder   0   0      INFO TileL2Builder initialization completed
 AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  2   2      INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  3   3      INFO   ===>>>  start processing event #1131086, run #204073 on slot 3,  0 events processed so far  <<<===
@@ -1282,7 +1282,7 @@ AthenaHiveEventLoopMgr                             INFO   ===>>>  done processin
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 8.92167
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 6.2739
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
 Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
@@ -1300,7 +1300,7 @@ AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 PyComponentMgr                                     INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv                                  INFO in finalize
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.16 ))s
+IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.81 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
@@ -1312,23 +1312,23 @@ IOVDbFolder                                        INFO Folder /TILE/OFL02/NOISE
 IOVDbFolder                                        INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
-IOVDbSvc                                           INFO  bytes in ((      0.18 ))s
+IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.46 ))s
+IOVDbSvc                                           INFO  bytes in ((      1.26 ))s
 IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.18 ))s
+IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.26 ))s
 IOVDbSvc                                           INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 TileInfoLoader                                     INFO TileInfoLoader::finalize()
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStreamMetadataTool                     INFO in finalize()
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...           INFO Finalizing
+ToolSvc.TileROD_Decoder.TileL2Builder              INFO Finalizing
 *****Chrono*****                                   INFO ****************************************************************************************************
 *****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
-cObjR_ALL                                          INFO Time User   : Tot=  0.5  [s] Ave/Min/Max= 0.25(+- 0.24)/ 0.01/ 0.49  [s] #=  2
-cObj_ALL                                           INFO Time User   : Tot= 0.54  [s] Ave/Min/Max= 0.27(+- 0.24)/ 0.03/ 0.51  [s] #=  2
-ChronoStatSvc                                      INFO Time User   : Tot=    8  [s]                                             #=  1
+cObjR_ALL                                          INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  140)/   10/  290 [ms] #=  2
+cObj_ALL                                           INFO Time User   : Tot=  360 [ms] Ave/Min/Max=  180(+-  160)/   20/  340 [ms] #=  2
+ChronoStatSvc                                      INFO Time User   : Tot= 5.74  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
index 321e6fd4f752..f830295f1cd9 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileDigitsContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Sun Mar 31 05:46:50 CEST 2019
+Tue Apr 30 20:11:50 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileDigitsContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:47:21 2019
+                                          running on pcatl12 on Tue Apr 30 20:11:57 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -45,8 +45,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -79,8 +79,8 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
-ClassIDSvc           INFO  getRegistryEntries: read 3099 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 815 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3142 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 830 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -187,7 +187,7 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.67S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.56S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -199,7 +199,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -211,9 +211,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -248,7 +248,7 @@ GeoModelSvc.Til...   INFO  Global positioning of barrel with rotation (0,0,0)) a
 GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrMan...   INFO Entering create_elements()
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.22S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.14S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -270,11 +270,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -327,7 +327,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 3841 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3843 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 HistogramPersis...WARNING Histograms saving not required.
@@ -337,7 +337,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
-ClassIDSvc           INFO  getRegistryEntries: read 629 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -382,12 +382,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -635,23 +635,23 @@ IncidentProcAlg2     INFO Finalize
 EventInfoByteSt...   INFO finalize 
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.70 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.92 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.88 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.84 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.79 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.83 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.78 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.76 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.89 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.01 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.41 ))s
-IOVDbSvc             INFO  bytes in ((      7.87 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.07 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.14 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.83 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.90 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.05 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.03 ))s
+IOVDbSvc             INFO  bytes in ((      2.39 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.11 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     6.76 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.08 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     2.31 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -661,29 +661,29 @@ ToolSvc.TileROD...   INFO Finalizing
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=  245(+-  235)/   10/  480 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.53  [s] Ave/Min/Max=0.0408(+- 0.13)/    0/ 0.49  [s] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 10.4  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  140)/   10/  290 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  330 [ms] Ave/Min/Max= 25.4(+- 82.3)/    0/  310 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 6.71  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-Sun Mar 31 05:48:05 CEST 2019
+Tue Apr 30 20:12:22 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [4] concurrent threads and [4] concurrent events
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 4 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileDigitsContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -703,7 +703,7 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:48:33 2019
+                                          running on pcatl12 on Tue Apr 30 20:12:28 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -718,8 +718,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                         WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -750,8 +750,8 @@ ByteStreamAddressProviderSvc                       INFO    Calorimeter Cluster P
 ByteStreamAddressProviderSvc                       INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddressProviderSvc                       INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddressProviderSvc                       INFO -- Will fill Store with id =  0
-ClassIDSvc                                         INFO  getRegistryEntries: read 2774 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 1024 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2817 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1039 CLIDRegistry entries for module ALL
 IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc                                           INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -861,7 +861,7 @@ EndcapDMConstruction                               INFO Start building EC electr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstruction                               INFO Start building EC electronics geometry
-GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.58S
+GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.59S
 GeoModelSvc.TileDetectorTool                       INFO  Entering TileDetectorTool::create()
 TileDddbManager                                    INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                    INFO n_tiglob = 5
@@ -873,7 +873,7 @@ TileDddbManager                                    INFO n_tileSwitches = 1
 ClassIDSvc                                         INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDescrCnv                                INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID                                           INFO initialize_from_dictionary 
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -885,9 +885,9 @@ CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID                                     INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -922,7 +922,7 @@ GeoModelSvc.TileDetectorTool                       INFO  Global positioning of b
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrManager                                INFO Entering create_elements()
-GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.22S
+GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.14S
 ClassIDSvc                                         INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                     INFO Initializing....TileInfoLoader
 TileInfoLoader                                     INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -944,11 +944,11 @@ TileInfoLoader                                     INFO Sampling fraction for E2
 TileInfoLoader                                     INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader                                     INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader                                     INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID                                        INFO initialize_from_dictionary
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -957,7 +957,7 @@ TileCablingSvc                                     INFO Cabling for RUN2 (2014-2
 TileCablingSvc                                     INFO Setting Cabling type to 4
 TileInfoLoader                                     INFO Placed TileInfo object in the detector store.
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 4106 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 4108 CLIDRegistry entries for module ALL
 PyComponentMgr                              0      INFO Initializing PyComponentMgr...
 Finalizer                                   0      INFO Initializing Finalizer...
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
@@ -1070,12 +1070,12 @@ CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDescrCnv                    0   0      INFO  Finished 
 CaloIdMgrDetDescrCnv                    0   0      INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -1086,7 +1086,7 @@ AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processi
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...0   0      INFO TileL2Builder initialization completed
+ToolSvc.TileROD_Decoder.TileL2Builder   0   0      INFO TileL2Builder initialization completed
 ToolSvc.TileDigitsContByteStreamTool    0   0      INFO Initializing TileDigitsContByteStreamTool
 AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  2   2      INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
@@ -1165,129 +1165,129 @@ AthenaHiveEventLoopMgr                  38  1      INFO   ===>>>  start processi
 AthenaHiveEventLoopMgr                  39  3      INFO   ===>>>  start processing event #1143097, run #204073 on slot 3,  36 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139475, run #204073 on slot 2,  37 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139958, run #204073 on slot 0,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  40  0      INFO   ===>>>  start processing event #1134147, run #204073 on slot 0,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  41  2      INFO   ===>>>  start processing event #1137156, run #204073 on slot 2,  38 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143765, run #204073 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  40  0      INFO   ===>>>  start processing event #1134147, run #204073 on slot 0,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  41  1      INFO   ===>>>  start processing event #1137156, run #204073 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  42  2      INFO   ===>>>  start processing event #1136377, run #204073 on slot 2,  39 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143097, run #204073 on slot 3,  40 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1134147, run #204073 on slot 0,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  42  0      INFO   ===>>>  start processing event #1136377, run #204073 on slot 0,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  43  1      INFO   ===>>>  start processing event #1137842, run #204073 on slot 1,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  44  3      INFO   ===>>>  start processing event #1141705, run #204073 on slot 3,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137156, run #204073 on slot 2,  42 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  45  2      INFO   ===>>>  start processing event #1143410, run #204073 on slot 2,  42 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136377, run #204073 on slot 0,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137842, run #204073 on slot 1,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  46  0      INFO   ===>>>  start processing event #1144170, run #204073 on slot 0,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  47  1      INFO   ===>>>  start processing event #1145987, run #204073 on slot 1,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141705, run #204073 on slot 3,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143410, run #204073 on slot 2,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137156, run #204073 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  43  0      INFO   ===>>>  start processing event #1137842, run #204073 on slot 0,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  44  1      INFO   ===>>>  start processing event #1141705, run #204073 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  45  3      INFO   ===>>>  start processing event #1143410, run #204073 on slot 3,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136377, run #204073 on slot 2,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137842, run #204073 on slot 0,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141705, run #204073 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  46  0      INFO   ===>>>  start processing event #1144170, run #204073 on slot 0,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  47  1      INFO   ===>>>  start processing event #1145987, run #204073 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  48  2      INFO   ===>>>  start processing event #1145633, run #204073 on slot 2,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143410, run #204073 on slot 3,  46 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144170, run #204073 on slot 0,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  48  0      INFO   ===>>>  start processing event #1145633, run #204073 on slot 0,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  49  2      INFO   ===>>>  start processing event #1135005, run #204073 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  50  3      INFO   ===>>>  start processing event #1142167, run #204073 on slot 3,  47 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145987, run #204073 on slot 1,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145633, run #204073 on slot 0,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1135005, run #204073 on slot 2,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  51  0      INFO   ===>>>  start processing event #1144646, run #204073 on slot 0,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  52  1      INFO   ===>>>  start processing event #1145027, run #204073 on slot 1,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  53  2      INFO   ===>>>  start processing event #1144112, run #204073 on slot 2,  50 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142167, run #204073 on slot 3,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144646, run #204073 on slot 0,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145027, run #204073 on slot 1,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  54  0      INFO   ===>>>  start processing event #1138485, run #204073 on slot 0,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  55  1      INFO   ===>>>  start processing event #1144565, run #204073 on slot 1,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  56  3      INFO   ===>>>  start processing event #1139498, run #204073 on slot 3,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144112, run #204073 on slot 2,  54 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138485, run #204073 on slot 0,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144565, run #204073 on slot 1,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  57  0      INFO   ===>>>  start processing event #1136546, run #204073 on slot 0,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  58  1      INFO   ===>>>  start processing event #1143799, run #204073 on slot 1,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  59  2      INFO   ===>>>  start processing event #1142877, run #204073 on slot 2,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139498, run #204073 on slot 3,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136546, run #204073 on slot 0,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143799, run #204073 on slot 1,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  60  0      INFO   ===>>>  start processing event #1149894, run #204073 on slot 0,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  61  1      INFO   ===>>>  start processing event #1145364, run #204073 on slot 1,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  62  3      INFO   ===>>>  start processing event #1143770, run #204073 on slot 3,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142877, run #204073 on slot 2,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149894, run #204073 on slot 0,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145364, run #204073 on slot 1,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  63  0      INFO   ===>>>  start processing event #1148361, run #204073 on slot 0,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  64  1      INFO   ===>>>  start processing event #1148167, run #204073 on slot 1,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  65  2      INFO   ===>>>  start processing event #1138948, run #204073 on slot 2,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143770, run #204073 on slot 3,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148361, run #204073 on slot 0,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148167, run #204073 on slot 1,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  66  0      INFO   ===>>>  start processing event #1144808, run #204073 on slot 0,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  67  1      INFO   ===>>>  start processing event #1145832, run #204073 on slot 1,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  68  3      INFO   ===>>>  start processing event #1153100, run #204073 on slot 3,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138948, run #204073 on slot 2,  66 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144808, run #204073 on slot 0,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145832, run #204073 on slot 1,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  69  0      INFO   ===>>>  start processing event #1142524, run #204073 on slot 0,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  70  1      INFO   ===>>>  start processing event #1138294, run #204073 on slot 1,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  71  2      INFO   ===>>>  start processing event #1138350, run #204073 on slot 2,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153100, run #204073 on slot 3,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142524, run #204073 on slot 0,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138294, run #204073 on slot 1,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  72  0      INFO   ===>>>  start processing event #1149424, run #204073 on slot 0,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  73  1      INFO   ===>>>  start processing event #1151102, run #204073 on slot 1,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  74  3      INFO   ===>>>  start processing event #1152242, run #204073 on slot 3,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138350, run #204073 on slot 2,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149424, run #204073 on slot 0,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151102, run #204073 on slot 1,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  75  0      INFO   ===>>>  start processing event #1148416, run #204073 on slot 0,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  76  1      INFO   ===>>>  start processing event #1142753, run #204073 on slot 1,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  77  2      INFO   ===>>>  start processing event #1149997, run #204073 on slot 2,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152242, run #204073 on slot 3,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148416, run #204073 on slot 0,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142753, run #204073 on slot 1,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  78  0      INFO   ===>>>  start processing event #1151617, run #204073 on slot 0,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  79  1      INFO   ===>>>  start processing event #1149794, run #204073 on slot 1,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  80  3      INFO   ===>>>  start processing event #1152504, run #204073 on slot 3,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149997, run #204073 on slot 2,  78 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151617, run #204073 on slot 0,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149794, run #204073 on slot 1,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  81  0      INFO   ===>>>  start processing event #1142485, run #204073 on slot 0,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  82  1      INFO   ===>>>  start processing event #1151364, run #204073 on slot 1,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  83  2      INFO   ===>>>  start processing event #1143901, run #204073 on slot 2,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152504, run #204073 on slot 3,  81 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142485, run #204073 on slot 0,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  84  0      INFO   ===>>>  start processing event #1153979, run #204073 on slot 0,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  85  3      INFO   ===>>>  start processing event #1150212, run #204073 on slot 3,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143901, run #204073 on slot 2,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151364, run #204073 on slot 1,  84 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153979, run #204073 on slot 0,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  86  0      INFO   ===>>>  start processing event #1152633, run #204073 on slot 0,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  87  1      INFO   ===>>>  start processing event #1155482, run #204073 on slot 1,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  88  2      INFO   ===>>>  start processing event #1150472, run #204073 on slot 2,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1150212, run #204073 on slot 3,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152633, run #204073 on slot 0,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1155482, run #204073 on slot 1,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  89  0      INFO   ===>>>  start processing event #1140275, run #204073 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  90  1      INFO   ===>>>  start processing event #1145882, run #204073 on slot 1,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  91  3      INFO   ===>>>  start processing event #1151732, run #204073 on slot 3,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1150472, run #204073 on slot 2,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1140275, run #204073 on slot 0,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145882, run #204073 on slot 1,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  92  0      INFO   ===>>>  start processing event #1137896, run #204073 on slot 0,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  93  1      INFO   ===>>>  start processing event #1156381, run #204073 on slot 1,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  94  2      INFO   ===>>>  start processing event #1149161, run #204073 on slot 2,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151732, run #204073 on slot 3,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137896, run #204073 on slot 0,  93 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156381, run #204073 on slot 1,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  95  0      INFO   ===>>>  start processing event #1153794, run #204073 on slot 0,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  96  1      INFO   ===>>>  start processing event #1151312, run #204073 on slot 1,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  97  3      INFO   ===>>>  start processing event #1148893, run #204073 on slot 3,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149161, run #204073 on slot 2,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153794, run #204073 on slot 0,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151312, run #204073 on slot 1,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  98  0      INFO   ===>>>  start processing event #1156938, run #204073 on slot 0,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  99  1      INFO   ===>>>  start processing event #1156351, run #204073 on slot 1,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148893, run #204073 on slot 3,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156938, run #204073 on slot 0,  99 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156351, run #204073 on slot 1,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 12.0004
+AthenaHiveEventLoopMgr                  49  0      INFO   ===>>>  start processing event #1135005, run #204073 on slot 0,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  50  1      INFO   ===>>>  start processing event #1142167, run #204073 on slot 1,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  51  3      INFO   ===>>>  start processing event #1144646, run #204073 on slot 3,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145633, run #204073 on slot 2,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1135005, run #204073 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142167, run #204073 on slot 1,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  52  0      INFO   ===>>>  start processing event #1145027, run #204073 on slot 0,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  53  1      INFO   ===>>>  start processing event #1144112, run #204073 on slot 1,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  54  2      INFO   ===>>>  start processing event #1138485, run #204073 on slot 2,  51 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144646, run #204073 on slot 3,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145027, run #204073 on slot 0,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144112, run #204073 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  55  0      INFO   ===>>>  start processing event #1144565, run #204073 on slot 0,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  56  1      INFO   ===>>>  start processing event #1139498, run #204073 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  57  3      INFO   ===>>>  start processing event #1136546, run #204073 on slot 3,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138485, run #204073 on slot 2,  55 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144565, run #204073 on slot 0,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139498, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  58  0      INFO   ===>>>  start processing event #1143799, run #204073 on slot 0,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  59  1      INFO   ===>>>  start processing event #1142877, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  60  2      INFO   ===>>>  start processing event #1149894, run #204073 on slot 2,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136546, run #204073 on slot 3,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143799, run #204073 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142877, run #204073 on slot 1,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  61  0      INFO   ===>>>  start processing event #1145364, run #204073 on slot 0,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  62  1      INFO   ===>>>  start processing event #1143770, run #204073 on slot 1,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  63  3      INFO   ===>>>  start processing event #1148361, run #204073 on slot 3,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149894, run #204073 on slot 2,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145364, run #204073 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143770, run #204073 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  64  0      INFO   ===>>>  start processing event #1148167, run #204073 on slot 0,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  65  1      INFO   ===>>>  start processing event #1138948, run #204073 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  66  2      INFO   ===>>>  start processing event #1144808, run #204073 on slot 2,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148361, run #204073 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148167, run #204073 on slot 0,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138948, run #204073 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  67  0      INFO   ===>>>  start processing event #1145832, run #204073 on slot 0,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  68  1      INFO   ===>>>  start processing event #1153100, run #204073 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  69  3      INFO   ===>>>  start processing event #1142524, run #204073 on slot 3,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144808, run #204073 on slot 2,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145832, run #204073 on slot 0,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153100, run #204073 on slot 1,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  70  0      INFO   ===>>>  start processing event #1138294, run #204073 on slot 0,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  71  1      INFO   ===>>>  start processing event #1138350, run #204073 on slot 1,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  72  2      INFO   ===>>>  start processing event #1149424, run #204073 on slot 2,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142524, run #204073 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138294, run #204073 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138350, run #204073 on slot 1,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  73  0      INFO   ===>>>  start processing event #1151102, run #204073 on slot 0,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  74  1      INFO   ===>>>  start processing event #1152242, run #204073 on slot 1,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  75  3      INFO   ===>>>  start processing event #1148416, run #204073 on slot 3,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149424, run #204073 on slot 2,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151102, run #204073 on slot 0,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152242, run #204073 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  76  0      INFO   ===>>>  start processing event #1142753, run #204073 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  77  1      INFO   ===>>>  start processing event #1149997, run #204073 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  78  2      INFO   ===>>>  start processing event #1151617, run #204073 on slot 2,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148416, run #204073 on slot 3,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142753, run #204073 on slot 0,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149997, run #204073 on slot 1,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  79  0      INFO   ===>>>  start processing event #1149794, run #204073 on slot 0,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  80  1      INFO   ===>>>  start processing event #1152504, run #204073 on slot 1,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  81  3      INFO   ===>>>  start processing event #1142485, run #204073 on slot 3,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151617, run #204073 on slot 2,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149794, run #204073 on slot 0,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152504, run #204073 on slot 1,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  82  0      INFO   ===>>>  start processing event #1151364, run #204073 on slot 0,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  83  1      INFO   ===>>>  start processing event #1143901, run #204073 on slot 1,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  84  2      INFO   ===>>>  start processing event #1153979, run #204073 on slot 2,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142485, run #204073 on slot 3,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151364, run #204073 on slot 0,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143901, run #204073 on slot 1,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  85  0      INFO   ===>>>  start processing event #1150212, run #204073 on slot 0,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  86  1      INFO   ===>>>  start processing event #1152633, run #204073 on slot 1,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  87  3      INFO   ===>>>  start processing event #1155482, run #204073 on slot 3,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153979, run #204073 on slot 2,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1150212, run #204073 on slot 0,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152633, run #204073 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  88  0      INFO   ===>>>  start processing event #1150472, run #204073 on slot 0,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  89  1      INFO   ===>>>  start processing event #1140275, run #204073 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  90  2      INFO   ===>>>  start processing event #1145882, run #204073 on slot 2,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1155482, run #204073 on slot 3,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1150472, run #204073 on slot 0,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1140275, run #204073 on slot 1,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  91  0      INFO   ===>>>  start processing event #1151732, run #204073 on slot 0,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  92  1      INFO   ===>>>  start processing event #1137896, run #204073 on slot 1,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  93  3      INFO   ===>>>  start processing event #1156381, run #204073 on slot 3,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145882, run #204073 on slot 2,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151732, run #204073 on slot 0,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137896, run #204073 on slot 1,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  94  0      INFO   ===>>>  start processing event #1149161, run #204073 on slot 0,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  95  1      INFO   ===>>>  start processing event #1153794, run #204073 on slot 1,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  96  2      INFO   ===>>>  start processing event #1151312, run #204073 on slot 2,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156381, run #204073 on slot 3,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149161, run #204073 on slot 0,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153794, run #204073 on slot 1,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  97  0      INFO   ===>>>  start processing event #1148893, run #204073 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  98  1      INFO   ===>>>  start processing event #1156938, run #204073 on slot 1,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  99  3      INFO   ===>>>  start processing event #1156351, run #204073 on slot 3,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151312, run #204073 on slot 2,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 4.93046
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
 Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
@@ -1305,7 +1305,7 @@ AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 PyComponentMgr                                     INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv                                  INFO in finalize
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.97 ))s
+IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.21 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
@@ -1317,24 +1317,24 @@ IOVDbFolder                                        INFO Folder /TILE/OFL02/NOISE
 IOVDbFolder                                        INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.52 ))s
-IOVDbSvc                                           INFO  bytes in ((      1.49 ))s
+IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.03 ))s
+IOVDbSvc                                           INFO  bytes in ((      0.24 ))s
 IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.49 ))s
+IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.24 ))s
 IOVDbSvc                                           INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 TileInfoLoader                                     INFO TileInfoLoader::finalize()
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStreamMetadataTool                     INFO in finalize()
 ToolSvc.TileDigitsContByteStreamTool               INFO Finalizing TileDigitsContByteStreamTool successfuly
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...           INFO Finalizing
+ToolSvc.TileROD_Decoder.TileL2Builder              INFO Finalizing
 *****Chrono*****                                   INFO ****************************************************************************************************
 *****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
-cObjR_ALL                                          INFO Time User   : Tot=  0.5  [s] Ave/Min/Max= 0.25(+- 0.24)/ 0.01/ 0.49  [s] #=  2
-cObj_ALL                                           INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=0.275(+-0.235)/ 0.04/ 0.51  [s] #=  2
-ChronoStatSvc                                      INFO Time User   : Tot= 8.41  [s]                                             #=  1
+cObjR_ALL                                          INFO Time User   : Tot=  260 [ms] Ave/Min/Max=  130(+-  130)/    0/  260 [ms] #=  2
+cObj_ALL                                           INFO Time User   : Tot=  310 [ms] Ave/Min/Max=  155(+-  135)/   20/  290 [ms] #=  2
+ChronoStatSvc                                      INFO Time User   : Tot= 5.95  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
index 21ceb74dd8a8..5a98e5444691 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileL2ContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Sun Mar 31 05:23:32 CEST 2019
+Tue Apr 30 20:06:25 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileL2ContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:24:16 2019
+                                          running on pcatl12 on Tue Apr 30 20:06:35 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -45,8 +45,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -79,7 +79,7 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
-ClassIDSvc           INFO  getRegistryEntries: read 3099 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3142 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -98,7 +98,7 @@ IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/TIME/CHANNELOFFSET/PHY
 IOVDbSvc             INFO Added taginfo remove for /TILE/ONL01/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
-ClassIDSvc           INFO  getRegistryEntries: read 815 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 830 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -187,7 +187,7 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.6S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.53S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -199,7 +199,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -211,9 +211,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -248,7 +248,7 @@ GeoModelSvc.Til...   INFO  Global positioning of barrel with rotation (0,0,0)) a
 GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrMan...   INFO Entering create_elements()
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.22S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.14S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -270,11 +270,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -327,7 +327,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 3841 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3843 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 HistogramPersis...WARNING Histograms saving not required.
@@ -337,7 +337,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
-ClassIDSvc           INFO  getRegistryEntries: read 629 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -382,12 +382,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -635,23 +635,23 @@ IncidentProcAlg2     INFO Finalize
 EventInfoByteSt...   INFO finalize 
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     5.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     5.18 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.08 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.06 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.06 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.05 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.12 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.88 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.85 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.04 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
-IOVDbSvc             INFO  bytes in ((     12.48 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.74 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     1.19 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.14 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.91 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.91 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.93 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.79 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.76 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.97 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.54 ))s
+IOVDbSvc             INFO  bytes in ((      8.99 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     5.07 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     7.41 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.28 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     7.71 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -660,29 +660,29 @@ ToolSvc.TileROD...   INFO Finalizing
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  490 [ms] Ave/Min/Max=  245(+-  235)/   10/  480 [ms] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.54  [s] Ave/Min/Max=0.0415(+-0.133)/    0/  0.5  [s] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 10.8  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  260 [ms] Ave/Min/Max=  130(+-  130)/    0/  260 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  280 [ms] Ave/Min/Max= 21.5(+- 71.8)/    0/  270 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 7.16  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-Sun Mar 31 05:25:15 CEST 2019
+Tue Apr 30 20:07:03 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [4] concurrent threads and [4] concurrent events
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 4 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileL2ContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -702,7 +702,7 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:25:56 2019
+                                          running on pcatl12 on Tue Apr 30 20:07:11 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -717,8 +717,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                         WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -749,8 +749,8 @@ ByteStreamAddressProviderSvc                       INFO    Calorimeter Cluster P
 ByteStreamAddressProviderSvc                       INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddressProviderSvc                       INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddressProviderSvc                       INFO -- Will fill Store with id =  0
-ClassIDSvc                                         INFO  getRegistryEntries: read 2774 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 1024 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2817 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1039 CLIDRegistry entries for module ALL
 IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc                                           INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -860,7 +860,7 @@ EndcapDMConstruction                               INFO Start building EC electr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstruction                               INFO Start building EC electronics geometry
-GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.64S
+GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.5S
 GeoModelSvc.TileDetectorTool                       INFO  Entering TileDetectorTool::create()
 TileDddbManager                                    INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                    INFO n_tiglob = 5
@@ -872,7 +872,7 @@ TileDddbManager                                    INFO n_tileSwitches = 1
 ClassIDSvc                                         INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDescrCnv                                INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID                                           INFO initialize_from_dictionary 
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -884,9 +884,9 @@ CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID                                     INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -921,7 +921,7 @@ GeoModelSvc.TileDetectorTool                       INFO  Global positioning of b
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrManager                                INFO Entering create_elements()
-GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.23S
+GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.15S
 ClassIDSvc                                         INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                     INFO Initializing....TileInfoLoader
 TileInfoLoader                                     INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -943,11 +943,11 @@ TileInfoLoader                                     INFO Sampling fraction for E2
 TileInfoLoader                                     INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader                                     INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader                                     INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID                                        INFO initialize_from_dictionary
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -956,7 +956,7 @@ TileCablingSvc                                     INFO Cabling for RUN2 (2014-2
 TileCablingSvc                                     INFO Setting Cabling type to 4
 TileInfoLoader                                     INFO Placed TileInfo object in the detector store.
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 4106 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 4108 CLIDRegistry entries for module ALL
 PyComponentMgr                              0      INFO Initializing PyComponentMgr...
 Finalizer                                   0      INFO Initializing Finalizer...
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
@@ -1067,12 +1067,12 @@ CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDescrCnv                    0   0      INFO  Finished 
 CaloIdMgrDetDescrCnv                    0   0      INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -1083,7 +1083,7 @@ AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processi
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...0   0      INFO TileL2Builder initialization completed
+ToolSvc.TileROD_Decoder.TileL2Builder   0   0      INFO TileL2Builder initialization completed
 ToolSvc.TileL2ContByteStreamTool        0   0      INFO Initializing TileL2ContByteStreamTool
 AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  2   2      INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
@@ -1284,7 +1284,7 @@ AthenaHiveEventLoopMgr                             INFO   ===>>>  done processin
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 10.5489
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 8.20128
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
 Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
@@ -1302,7 +1302,7 @@ AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 PyComponentMgr                                     INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv                                  INFO in finalize
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.50 ))s
+IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     1.52 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
@@ -1314,23 +1314,23 @@ IOVDbFolder                                        INFO Folder /TILE/OFL02/NOISE
 IOVDbFolder                                        INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.36 ))s
-IOVDbSvc                                           INFO  bytes in ((      0.86 ))s
+IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.70 ))s
+IOVDbSvc                                           INFO  bytes in ((      2.22 ))s
 IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.86 ))s
+IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     2.22 ))s
 IOVDbSvc                                           INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 TileInfoLoader                                     INFO TileInfoLoader::finalize()
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStreamMetadataTool                     INFO in finalize()
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...           INFO Finalizing
+ToolSvc.TileROD_Decoder.TileL2Builder              INFO Finalizing
 *****Chrono*****                                   INFO ****************************************************************************************************
 *****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
-cObjR_ALL                                          INFO Time User   : Tot=  0.5  [s] Ave/Min/Max= 0.25(+- 0.24)/ 0.01/ 0.49  [s] #=  2
-cObj_ALL                                           INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=0.275(+-0.235)/ 0.04/ 0.51  [s] #=  2
-ChronoStatSvc                                      INFO Time User   : Tot= 9.18  [s]                                             #=  1
+cObjR_ALL                                          INFO Time User   : Tot=  260 [ms] Ave/Min/Max=  130(+-  130)/    0/  260 [ms] #=  2
+cObj_ALL                                           INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  140)/   10/  290 [ms] #=  2
+ChronoStatSvc                                      INFO Time User   : Tot= 6.25  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
index 5ad09a9d07a6..102482c5efee 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileLaserObjByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Sun Mar 31 05:14:37 CEST 2019
+Tue Apr 30 20:07:32 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileLaserObjByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:15:08 2019
+                                          running on pcatl12 on Tue Apr 30 20:07:40 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -45,8 +45,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -79,7 +79,7 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
-ClassIDSvc           INFO  getRegistryEntries: read 3099 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3142 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -157,7 +157,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
-ClassIDSvc           INFO  getRegistryEntries: read 2412 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2489 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 IdDictDetDescrCnv    INFO in initialize
 IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
@@ -186,7 +186,7 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.63S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.58S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -198,7 +198,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -210,9 +210,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -247,7 +247,7 @@ GeoModelSvc.Til...   INFO  Global positioning of barrel with rotation (0,0,0)) a
 GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrMan...   INFO Entering create_elements()
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.23S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.14S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -269,11 +269,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -326,7 +326,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 4488 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4490 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 HistogramPersis...WARNING Histograms saving not required.
@@ -336,7 +336,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TileByteStream/TileByteStream-01-00-00/data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data
-ClassIDSvc           INFO  getRegistryEntries: read 691 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -381,12 +381,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -633,23 +633,23 @@ IncidentProcAlg2     INFO Finalize
 EventInfoByteSt...   INFO finalize 
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.14 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     0.18 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.07 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.06 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.04 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.03 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.08 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     0.43 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.48 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.86 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     1.29 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.13 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.04 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.85 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.98 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.86 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.87 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.88 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     0.87 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.94 ))s
 IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.05 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.02 ))s
-IOVDbSvc             INFO  bytes in ((      1.65 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.72 ))s
+IOVDbSvc             INFO  bytes in ((     11.34 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.16 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     1.49 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.58 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     9.76 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -658,29 +658,29 @@ ToolSvc.TileROD...   INFO Finalizing
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  0.5  [s] Ave/Min/Max= 0.25(+- 0.25)/    0/  0.5  [s] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.53  [s] Ave/Min/Max=0.0408(+-0.136)/    0/ 0.51  [s] #= 13
-ChronoStatSvc        INFO Time User   : Tot=  4.8  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  270 [ms] Ave/Min/Max=  135(+-  135)/    0/  270 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  300 [ms] Ave/Min/Max= 23.1(+- 74.4)/    0/  280 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 3.32  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-Sun Mar 31 05:15:32 CEST 2019
+Tue Apr 30 20:08:13 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [4] concurrent threads and [4] concurrent events
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 4 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileLaserObjByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -700,7 +700,7 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:15:58 2019
+                                          running on pcatl12 on Tue Apr 30 20:08:21 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -715,8 +715,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                         WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -747,7 +747,7 @@ ByteStreamAddressProviderSvc                       INFO    Calorimeter Cluster P
 ByteStreamAddressProviderSvc                       INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddressProviderSvc                       INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddressProviderSvc                       INFO -- Will fill Store with id =  0
-ClassIDSvc                                         INFO  getRegistryEntries: read 2774 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2817 CLIDRegistry entries for module ALL
 IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc                                           INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -828,7 +828,7 @@ BarrelConstruction                                 INFO   Use sagging in geometr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EventPersistencySvc                                INFO Added successfully Conversion service:DetDescrCnvSvc
-ClassIDSvc                                         INFO  getRegistryEntries: read 2412 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2427 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileTBID helper object in the detector store
 IdDictDetDescrCnv                                  INFO in initialize
 IdDictDetDescrCnv                                  INFO in createObj: creating a IdDictManager object in the detector store
@@ -857,7 +857,7 @@ EndcapDMConstruction                               INFO Start building EC electr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstruction                               INFO Start building EC electronics geometry
-GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 22944Kb 	 Time = 0.61S
+GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.61S
 GeoModelSvc.TileDetectorTool                       INFO  Entering TileDetectorTool::create()
 TileDddbManager                                    INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                    INFO n_tiglob = 5
@@ -869,7 +869,7 @@ TileDddbManager                                    INFO n_tileSwitches = 1
 ClassIDSvc                                         INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDescrCnv                                INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID                                           INFO initialize_from_dictionary 
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -881,9 +881,9 @@ CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID                                     INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -918,7 +918,7 @@ GeoModelSvc.TileDetectorTool                       INFO  Global positioning of b
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrManager                                INFO Entering create_elements()
-GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.23S
+GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.13S
 ClassIDSvc                                         INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                     INFO Initializing....TileInfoLoader
 TileInfoLoader                                     INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -940,11 +940,11 @@ TileInfoLoader                                     INFO Sampling fraction for E2
 TileInfoLoader                                     INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader                                     INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader                                     INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID                                        INFO initialize_from_dictionary
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -953,7 +953,7 @@ TileCablingSvc                                     INFO Cabling for RUN2a (2018)
 TileCablingSvc                                     INFO Setting Cabling type to 5
 TileInfoLoader                                     INFO Placed TileInfo object in the detector store.
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 4753 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 4755 CLIDRegistry entries for module ALL
 PyComponentMgr                              0      INFO Initializing PyComponentMgr...
 Finalizer                                   0      INFO Initializing Finalizer...
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
@@ -1064,12 +1064,12 @@ CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDescrCnv                    0   0      INFO  Finished 
 CaloIdMgrDetDescrCnv                    0   0      INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -1081,9 +1081,9 @@ AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processi
 AthenaHiveEventLoopMgr                  2   2      INFO   ===>>>  start processing event #18126, run #363899 on slot 2,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  3   3      INFO   ===>>>  start processing event #18127, run #363899 on slot 3,  0 events processed so far  <<<===
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...0   0      INFO TileL2Builder initialization completed
+ClassIDSvc                              2   2      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
+ClassIDSvc                              2   2      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
+ToolSvc.TileROD_Decoder.TileL2Builder   2   2      INFO TileL2Builder initialization completed
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18124, run #363899 on slot 0,  1 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  2 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18126, run #363899 on slot 2,  3 events processed so far  <<<===
@@ -1095,192 +1095,192 @@ AthenaHiveEventLoopMgr                  7   3      INFO   ===>>>  start processi
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18128, run #363899 on slot 0,  5 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #18132, run #363899 on slot 0,  5 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18129, run #363899 on slot 1,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   1      INFO   ===>>>  start processing event #18133, run #363899 on slot 1,  6 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18130, run #363899 on slot 2,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  2      INFO   ===>>>  start processing event #18134, run #363899 on slot 2,  7 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18131, run #363899 on slot 3,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   1      INFO   ===>>>  start processing event #18133, run #363899 on slot 1,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  2      INFO   ===>>>  start processing event #18134, run #363899 on slot 2,  8 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  11  3      INFO   ===>>>  start processing event #18135, run #363899 on slot 3,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18133, run #363899 on slot 1,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  1      INFO   ===>>>  start processing event #18136, run #363899 on slot 1,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18134, run #363899 on slot 2,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  2      INFO   ===>>>  start processing event #18137, run #363899 on slot 2,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18135, run #363899 on slot 3,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  3      INFO   ===>>>  start processing event #18138, run #363899 on slot 3,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18132, run #363899 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18136, run #363899 on slot 1,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #18139, run #363899 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  1      INFO   ===>>>  start processing event #18140, run #363899 on slot 1,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18137, run #363899 on slot 2,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18138, run #363899 on slot 3,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  2      INFO   ===>>>  start processing event #18141, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  3      INFO   ===>>>  start processing event #18142, run #363899 on slot 3,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18139, run #363899 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #18143, run #363899 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18140, run #363899 on slot 1,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  20  1      INFO   ===>>>  start processing event #18144, run #363899 on slot 1,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18141, run #363899 on slot 2,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18142, run #363899 on slot 3,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  21  2      INFO   ===>>>  start processing event #18145, run #363899 on slot 2,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  22  3      INFO   ===>>>  start processing event #18146, run #363899 on slot 3,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18143, run #363899 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18144, run #363899 on slot 1,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  23  0      INFO   ===>>>  start processing event #18147, run #363899 on slot 0,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  24  1      INFO   ===>>>  start processing event #18148, run #363899 on slot 1,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18145, run #363899 on slot 2,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18146, run #363899 on slot 3,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  25  2      INFO   ===>>>  start processing event #18149, run #363899 on slot 2,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  26  3      INFO   ===>>>  start processing event #18150, run #363899 on slot 3,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18147, run #363899 on slot 0,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  27  0      INFO   ===>>>  start processing event #18151, run #363899 on slot 0,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18148, run #363899 on slot 1,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18149, run #363899 on slot 2,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  28  1      INFO   ===>>>  start processing event #18152, run #363899 on slot 1,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  29  2      INFO   ===>>>  start processing event #18153, run #363899 on slot 2,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18150, run #363899 on slot 3,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  30  3      INFO   ===>>>  start processing event #18154, run #363899 on slot 3,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18151, run #363899 on slot 0,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  31  0      INFO   ===>>>  start processing event #18155, run #363899 on slot 0,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18152, run #363899 on slot 1,  29 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18153, run #363899 on slot 2,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  32  1      INFO   ===>>>  start processing event #18156, run #363899 on slot 1,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  33  2      INFO   ===>>>  start processing event #18157, run #363899 on slot 2,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18154, run #363899 on slot 3,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  34  3      INFO   ===>>>  start processing event #18158, run #363899 on slot 3,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18155, run #363899 on slot 0,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  35  0      INFO   ===>>>  start processing event #18159, run #363899 on slot 0,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18156, run #363899 on slot 1,  33 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  36  1      INFO   ===>>>  start processing event #18160, run #363899 on slot 1,  33 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18157, run #363899 on slot 2,  34 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18158, run #363899 on slot 3,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18159, run #363899 on slot 0,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  37  0      INFO   ===>>>  start processing event #18161, run #363899 on slot 0,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18132, run #363899 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18133, run #363899 on slot 1,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #18136, run #363899 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  1      INFO   ===>>>  start processing event #18137, run #363899 on slot 1,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18134, run #363899 on slot 2,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18135, run #363899 on slot 3,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  2      INFO   ===>>>  start processing event #18138, run #363899 on slot 2,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  3      INFO   ===>>>  start processing event #18139, run #363899 on slot 3,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18136, run #363899 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18137, run #363899 on slot 1,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #18140, run #363899 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  1      INFO   ===>>>  start processing event #18141, run #363899 on slot 1,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18138, run #363899 on slot 2,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18139, run #363899 on slot 3,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  2      INFO   ===>>>  start processing event #18142, run #363899 on slot 2,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  3      INFO   ===>>>  start processing event #18143, run #363899 on slot 3,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18140, run #363899 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18141, run #363899 on slot 1,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  20  0      INFO   ===>>>  start processing event #18144, run #363899 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  21  1      INFO   ===>>>  start processing event #18145, run #363899 on slot 1,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18142, run #363899 on slot 2,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18143, run #363899 on slot 3,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  22  2      INFO   ===>>>  start processing event #18146, run #363899 on slot 2,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  23  3      INFO   ===>>>  start processing event #18147, run #363899 on slot 3,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18144, run #363899 on slot 0,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18145, run #363899 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  24  0      INFO   ===>>>  start processing event #18148, run #363899 on slot 0,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  25  1      INFO   ===>>>  start processing event #18149, run #363899 on slot 1,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18146, run #363899 on slot 2,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18147, run #363899 on slot 3,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  26  2      INFO   ===>>>  start processing event #18150, run #363899 on slot 2,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  27  3      INFO   ===>>>  start processing event #18151, run #363899 on slot 3,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18148, run #363899 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18149, run #363899 on slot 1,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  28  0      INFO   ===>>>  start processing event #18152, run #363899 on slot 0,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  29  1      INFO   ===>>>  start processing event #18153, run #363899 on slot 1,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18150, run #363899 on slot 2,  27 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18151, run #363899 on slot 3,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  30  2      INFO   ===>>>  start processing event #18154, run #363899 on slot 2,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  31  3      INFO   ===>>>  start processing event #18155, run #363899 on slot 3,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18152, run #363899 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18153, run #363899 on slot 1,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  32  0      INFO   ===>>>  start processing event #18156, run #363899 on slot 0,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  33  1      INFO   ===>>>  start processing event #18157, run #363899 on slot 1,  30 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18154, run #363899 on slot 2,  31 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18155, run #363899 on slot 3,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  34  2      INFO   ===>>>  start processing event #18158, run #363899 on slot 2,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  35  3      INFO   ===>>>  start processing event #18159, run #363899 on slot 3,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18156, run #363899 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18157, run #363899 on slot 1,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  36  0      INFO   ===>>>  start processing event #18160, run #363899 on slot 0,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  37  1      INFO   ===>>>  start processing event #18161, run #363899 on slot 1,  34 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18158, run #363899 on slot 2,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18159, run #363899 on slot 3,  36 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  38  2      INFO   ===>>>  start processing event #18162, run #363899 on slot 2,  36 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  39  3      INFO   ===>>>  start processing event #18163, run #363899 on slot 3,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18160, run #363899 on slot 1,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  40  1      INFO   ===>>>  start processing event #18164, run #363899 on slot 1,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18161, run #363899 on slot 0,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  41  0      INFO   ===>>>  start processing event #18165, run #363899 on slot 0,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18160, run #363899 on slot 0,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18161, run #363899 on slot 1,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  40  0      INFO   ===>>>  start processing event #18164, run #363899 on slot 0,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  41  1      INFO   ===>>>  start processing event #18165, run #363899 on slot 1,  38 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18162, run #363899 on slot 2,  39 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18163, run #363899 on slot 3,  40 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  42  2      INFO   ===>>>  start processing event #18166, run #363899 on slot 2,  40 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  43  3      INFO   ===>>>  start processing event #18167, run #363899 on slot 3,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18164, run #363899 on slot 1,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  44  1      INFO   ===>>>  start processing event #18168, run #363899 on slot 1,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18165, run #363899 on slot 0,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18164, run #363899 on slot 0,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18165, run #363899 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  44  0      INFO   ===>>>  start processing event #18168, run #363899 on slot 0,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  45  1      INFO   ===>>>  start processing event #18169, run #363899 on slot 1,  42 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18166, run #363899 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  45  0      INFO   ===>>>  start processing event #18169, run #363899 on slot 0,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  46  2      INFO   ===>>>  start processing event #18170, run #363899 on slot 2,  43 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18167, run #363899 on slot 3,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  46  2      INFO   ===>>>  start processing event #18170, run #363899 on slot 2,  44 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  47  3      INFO   ===>>>  start processing event #18171, run #363899 on slot 3,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18168, run #363899 on slot 1,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  48  1      INFO   ===>>>  start processing event #18172, run #363899 on slot 1,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18169, run #363899 on slot 0,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  49  0      INFO   ===>>>  start processing event #18173, run #363899 on slot 0,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18168, run #363899 on slot 0,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18169, run #363899 on slot 1,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  48  0      INFO   ===>>>  start processing event #18172, run #363899 on slot 0,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  49  1      INFO   ===>>>  start processing event #18173, run #363899 on slot 1,  46 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18170, run #363899 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  50  2      INFO   ===>>>  start processing event #18174, run #363899 on slot 2,  47 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18171, run #363899 on slot 3,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18172, run #363899 on slot 1,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  51  1      INFO   ===>>>  start processing event #18175, run #363899 on slot 1,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  52  3      INFO   ===>>>  start processing event #18176, run #363899 on slot 3,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18173, run #363899 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  50  2      INFO   ===>>>  start processing event #18174, run #363899 on slot 2,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  51  3      INFO   ===>>>  start processing event #18175, run #363899 on slot 3,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18172, run #363899 on slot 0,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18173, run #363899 on slot 1,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  52  0      INFO   ===>>>  start processing event #18176, run #363899 on slot 0,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  53  1      INFO   ===>>>  start processing event #18177, run #363899 on slot 1,  50 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18174, run #363899 on slot 2,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  53  0      INFO   ===>>>  start processing event #18177, run #363899 on slot 0,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  54  2      INFO   ===>>>  start processing event #18178, run #363899 on slot 2,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18175, run #363899 on slot 1,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  55  1      INFO   ===>>>  start processing event #18179, run #363899 on slot 1,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18176, run #363899 on slot 3,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  56  3      INFO   ===>>>  start processing event #18180, run #363899 on slot 3,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18177, run #363899 on slot 0,  54 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  57  0      INFO   ===>>>  start processing event #18181, run #363899 on slot 0,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18175, run #363899 on slot 3,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  54  2      INFO   ===>>>  start processing event #18178, run #363899 on slot 2,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  55  3      INFO   ===>>>  start processing event #18179, run #363899 on slot 3,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18176, run #363899 on slot 0,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18177, run #363899 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  56  0      INFO   ===>>>  start processing event #18180, run #363899 on slot 0,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  57  1      INFO   ===>>>  start processing event #18181, run #363899 on slot 1,  54 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18178, run #363899 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  58  2      INFO   ===>>>  start processing event #18182, run #363899 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18179, run #363899 on slot 1,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  59  1      INFO   ===>>>  start processing event #18183, run #363899 on slot 1,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18180, run #363899 on slot 3,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18181, run #363899 on slot 0,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18179, run #363899 on slot 3,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  58  2      INFO   ===>>>  start processing event #18182, run #363899 on slot 2,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  59  3      INFO   ===>>>  start processing event #18183, run #363899 on slot 3,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18180, run #363899 on slot 0,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18181, run #363899 on slot 1,  58 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  60  0      INFO   ===>>>  start processing event #18184, run #363899 on slot 0,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  61  3      INFO   ===>>>  start processing event #18185, run #363899 on slot 3,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  61  1      INFO   ===>>>  start processing event #18185, run #363899 on slot 1,  58 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18182, run #363899 on slot 2,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  62  2      INFO   ===>>>  start processing event #18186, run #363899 on slot 2,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18183, run #363899 on slot 1,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  63  1      INFO   ===>>>  start processing event #18187, run #363899 on slot 1,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18183, run #363899 on slot 3,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  62  2      INFO   ===>>>  start processing event #18186, run #363899 on slot 2,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  63  3      INFO   ===>>>  start processing event #18187, run #363899 on slot 3,  60 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18184, run #363899 on slot 0,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  64  0      INFO   ===>>>  start processing event #18188, run #363899 on slot 0,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18185, run #363899 on slot 3,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  65  3      INFO   ===>>>  start processing event #18189, run #363899 on slot 3,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18185, run #363899 on slot 1,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  64  0      INFO   ===>>>  start processing event #18188, run #363899 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  65  1      INFO   ===>>>  start processing event #18189, run #363899 on slot 1,  62 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18186, run #363899 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  66  2      INFO   ===>>>  start processing event #18190, run #363899 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18187, run #363899 on slot 1,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  67  1      INFO   ===>>>  start processing event #18191, run #363899 on slot 1,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18187, run #363899 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  66  2      INFO   ===>>>  start processing event #18190, run #363899 on slot 2,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  67  3      INFO   ===>>>  start processing event #18191, run #363899 on slot 3,  64 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18188, run #363899 on slot 0,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  68  0      INFO   ===>>>  start processing event #18192, run #363899 on slot 0,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18189, run #363899 on slot 3,  66 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  69  3      INFO   ===>>>  start processing event #18193, run #363899 on slot 3,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18189, run #363899 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  68  0      INFO   ===>>>  start processing event #18192, run #363899 on slot 0,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  69  1      INFO   ===>>>  start processing event #18193, run #363899 on slot 1,  66 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18190, run #363899 on slot 2,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  70  2      INFO   ===>>>  start processing event #18194, run #363899 on slot 2,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18191, run #363899 on slot 1,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18191, run #363899 on slot 3,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  70  2      INFO   ===>>>  start processing event #18194, run #363899 on slot 2,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  71  3      INFO   ===>>>  start processing event #18195, run #363899 on slot 3,  68 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18192, run #363899 on slot 0,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  71  0      INFO   ===>>>  start processing event #18195, run #363899 on slot 0,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  72  1      INFO   ===>>>  start processing event #18196, run #363899 on slot 1,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18193, run #363899 on slot 3,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  73  3      INFO   ===>>>  start processing event #18197, run #363899 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18193, run #363899 on slot 1,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  72  0      INFO   ===>>>  start processing event #18196, run #363899 on slot 0,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  73  1      INFO   ===>>>  start processing event #18197, run #363899 on slot 1,  70 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18194, run #363899 on slot 2,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  74  2      INFO   ===>>>  start processing event #18198, run #363899 on slot 2,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18195, run #363899 on slot 0,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  75  0      INFO   ===>>>  start processing event #18199, run #363899 on slot 0,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18197, run #363899 on slot 3,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  76  3      INFO   ===>>>  start processing event #18200, run #363899 on slot 3,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18196, run #363899 on slot 1,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18195, run #363899 on slot 3,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  74  2      INFO   ===>>>  start processing event #18198, run #363899 on slot 2,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  75  3      INFO   ===>>>  start processing event #18199, run #363899 on slot 3,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18196, run #363899 on slot 0,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18197, run #363899 on slot 1,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  76  0      INFO   ===>>>  start processing event #18200, run #363899 on slot 0,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  77  1      INFO   ===>>>  start processing event #18201, run #363899 on slot 1,  74 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18198, run #363899 on slot 2,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  77  1      INFO   ===>>>  start processing event #18201, run #363899 on slot 1,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  78  2      INFO   ===>>>  start processing event #18202, run #363899 on slot 2,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18199, run #363899 on slot 0,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  79  0      INFO   ===>>>  start processing event #18203, run #363899 on slot 0,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18200, run #363899 on slot 3,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  80  3      INFO   ===>>>  start processing event #18204, run #363899 on slot 3,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18199, run #363899 on slot 3,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  78  2      INFO   ===>>>  start processing event #18202, run #363899 on slot 2,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  79  3      INFO   ===>>>  start processing event #18203, run #363899 on slot 3,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18200, run #363899 on slot 0,  77 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18201, run #363899 on slot 1,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  80  0      INFO   ===>>>  start processing event #18204, run #363899 on slot 0,  78 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  81  1      INFO   ===>>>  start processing event #18205, run #363899 on slot 1,  78 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18202, run #363899 on slot 2,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  82  2      INFO   ===>>>  start processing event #18206, run #363899 on slot 2,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18203, run #363899 on slot 0,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  83  0      INFO   ===>>>  start processing event #18207, run #363899 on slot 0,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18204, run #363899 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18203, run #363899 on slot 3,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  82  2      INFO   ===>>>  start processing event #18206, run #363899 on slot 2,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  83  3      INFO   ===>>>  start processing event #18207, run #363899 on slot 3,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18204, run #363899 on slot 0,  81 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18205, run #363899 on slot 1,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  84  1      INFO   ===>>>  start processing event #18208, run #363899 on slot 1,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  85  3      INFO   ===>>>  start processing event #18209, run #363899 on slot 3,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  84  0      INFO   ===>>>  start processing event #18208, run #363899 on slot 0,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  85  1      INFO   ===>>>  start processing event #18209, run #363899 on slot 1,  82 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18206, run #363899 on slot 2,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  86  2      INFO   ===>>>  start processing event #18210, run #363899 on slot 2,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18207, run #363899 on slot 0,  84 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  87  0      INFO   ===>>>  start processing event #18211, run #363899 on slot 0,  84 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18208, run #363899 on slot 1,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  88  1      INFO   ===>>>  start processing event #18212, run #363899 on slot 1,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18209, run #363899 on slot 3,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18207, run #363899 on slot 3,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  86  2      INFO   ===>>>  start processing event #18210, run #363899 on slot 2,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  87  3      INFO   ===>>>  start processing event #18211, run #363899 on slot 3,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18208, run #363899 on slot 0,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18209, run #363899 on slot 1,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  88  0      INFO   ===>>>  start processing event #18212, run #363899 on slot 0,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  89  1      INFO   ===>>>  start processing event #18213, run #363899 on slot 1,  86 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18210, run #363899 on slot 2,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  89  2      INFO   ===>>>  start processing event #18213, run #363899 on slot 2,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  90  3      INFO   ===>>>  start processing event #18214, run #363899 on slot 3,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18211, run #363899 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  91  0      INFO   ===>>>  start processing event #18215, run #363899 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18212, run #363899 on slot 1,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  92  1      INFO   ===>>>  start processing event #18216, run #363899 on slot 1,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18213, run #363899 on slot 2,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  93  2      INFO   ===>>>  start processing event #18217, run #363899 on slot 2,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18214, run #363899 on slot 3,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18215, run #363899 on slot 0,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  94  0      INFO   ===>>>  start processing event #18218, run #363899 on slot 0,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18211, run #363899 on slot 3,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  90  2      INFO   ===>>>  start processing event #18214, run #363899 on slot 2,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  91  3      INFO   ===>>>  start processing event #18215, run #363899 on slot 3,  88 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18212, run #363899 on slot 0,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18213, run #363899 on slot 1,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  92  0      INFO   ===>>>  start processing event #18216, run #363899 on slot 0,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  93  1      INFO   ===>>>  start processing event #18217, run #363899 on slot 1,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18214, run #363899 on slot 2,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18215, run #363899 on slot 3,  92 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  94  2      INFO   ===>>>  start processing event #18218, run #363899 on slot 2,  92 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  95  3      INFO   ===>>>  start processing event #18219, run #363899 on slot 3,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18216, run #363899 on slot 1,  93 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18217, run #363899 on slot 2,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  96  1      INFO   ===>>>  start processing event #18220, run #363899 on slot 1,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  97  2      INFO   ===>>>  start processing event #18221, run #363899 on slot 2,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18218, run #363899 on slot 0,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  98  0      INFO   ===>>>  start processing event #18222, run #363899 on slot 0,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18216, run #363899 on slot 0,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18217, run #363899 on slot 1,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  96  0      INFO   ===>>>  start processing event #18220, run #363899 on slot 0,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  97  1      INFO   ===>>>  start processing event #18221, run #363899 on slot 1,  94 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18218, run #363899 on slot 2,  95 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18219, run #363899 on slot 3,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  98  2      INFO   ===>>>  start processing event #18222, run #363899 on slot 2,  96 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  99  3      INFO   ===>>>  start processing event #18223, run #363899 on slot 3,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18220, run #363899 on slot 1,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18221, run #363899 on slot 2,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18222, run #363899 on slot 0,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18220, run #363899 on slot 0,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18221, run #363899 on slot 1,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18222, run #363899 on slot 2,  99 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18223, run #363899 on slot 3,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 2.56846
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 2.66376
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
 Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
@@ -1298,7 +1298,7 @@ AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 PyComponentMgr                                     INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv                                  INFO in finalize
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.24 ))s
+IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.69 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
@@ -1310,23 +1310,23 @@ IOVDbFolder                                        INFO Folder /TILE/OFL02/NOISE
 IOVDbFolder                                        INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.05 ))s
-IOVDbSvc                                           INFO  bytes in ((      0.29 ))s
+IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.41 ))s
+IOVDbSvc                                           INFO  bytes in ((      1.11 ))s
 IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.29 ))s
+IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.11 ))s
 IOVDbSvc                                           INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 TileInfoLoader                                     INFO TileInfoLoader::finalize()
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStreamMetadataTool                     INFO in finalize()
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...           INFO Finalizing
+ToolSvc.TileROD_Decoder.TileL2Builder              INFO Finalizing
 *****Chrono*****                                   INFO ****************************************************************************************************
 *****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
-cObjR_ALL                                          INFO Time User   : Tot= 0.51  [s] Ave/Min/Max=0.255(+-0.245)/ 0.01/  0.5  [s] #=  2
-cObj_ALL                                           INFO Time User   : Tot= 0.56  [s] Ave/Min/Max= 0.28(+- 0.24)/ 0.04/ 0.52  [s] #=  2
-ChronoStatSvc                                      INFO Time User   : Tot= 3.02  [s]                                             #=  1
+cObjR_ALL                                          INFO Time User   : Tot=  280 [ms] Ave/Min/Max=  140(+-  140)/    0/  280 [ms] #=  2
+cObj_ALL                                           INFO Time User   : Tot=  330 [ms] Ave/Min/Max=  165(+-  145)/   20/  310 [ms] #=  2
+ChronoStatSvc                                      INFO Time User   : Tot= 2.27  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
index 6378167afde8..e3c80386865c 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileMuRcvContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Sun Mar 31 05:07:09 CEST 2019
+Tue Apr 30 20:08:40 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileMuRcvContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:07:39 2019
+                                          running on pcatl12 on Tue Apr 30 20:08:49 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -45,8 +45,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -79,7 +79,7 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
-ClassIDSvc           INFO  getRegistryEntries: read 3099 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3142 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -98,7 +98,7 @@ IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/TIME/CHANNELOFFSET/PHY
 IOVDbSvc             INFO Added taginfo remove for /TILE/ONL01/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
-ClassIDSvc           INFO  getRegistryEntries: read 815 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 830 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
@@ -187,7 +187,7 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 22944Kb 	 Time = 0.59S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 24992Kb 	 Time = 0.53S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -199,7 +199,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -211,9 +211,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -248,7 +248,7 @@ GeoModelSvc.Til...   INFO  Global positioning of barrel with rotation (0,0,0)) a
 GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrMan...   INFO Entering create_elements()
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.21S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.14S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -270,11 +270,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -327,7 +327,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 3841 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3843 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 HistogramPersis...WARNING Histograms saving not required.
@@ -337,7 +337,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TileByteStream/TileByteStream-01-00-00/data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data
-ClassIDSvc           INFO  getRegistryEntries: read 629 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -382,12 +382,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -635,23 +635,23 @@ IncidentProcAlg2     INFO Finalize
 EventInfoByteSt...   INFO finalize 
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.80 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     0.85 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.90 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.78 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.60 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.73 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.60 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.71 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.84 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     0.73 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.69 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.08 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.56 ))s
-IOVDbSvc             INFO  bytes in ((      8.87 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     5.20 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/104912 ((     5.17 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.04 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641536 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/43176 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.05 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.01 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.03 ))s
+IOVDbSvc             INFO  bytes in ((     10.89 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.37 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     7.51 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     5.24 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     5.65 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -661,29 +661,29 @@ ToolSvc.TileROD...   INFO Finalizing
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  0.5  [s] Ave/Min/Max= 0.25(+- 0.24)/ 0.01/ 0.49  [s] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.54  [s] Ave/Min/Max=0.0415(+-0.135)/    0/ 0.51  [s] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 4.88  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  280 [ms] Ave/Min/Max=  140(+-  140)/    0/  280 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  320 [ms] Ave/Min/Max= 24.6(+- 79.7)/    0/  300 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 3.15  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-Sun Mar 31 05:08:05 CEST 2019
+Tue Apr 30 20:09:25 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [4] concurrent threads and [4] concurrent events
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 4 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileMuRcvContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -703,7 +703,7 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:08:33 2019
+                                          running on pcatl12 on Tue Apr 30 20:09:42 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -718,8 +718,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                         WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -750,8 +750,8 @@ ByteStreamAddressProviderSvc                       INFO    Calorimeter Cluster P
 ByteStreamAddressProviderSvc                       INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddressProviderSvc                       INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddressProviderSvc                       INFO -- Will fill Store with id =  0
-ClassIDSvc                                         INFO  getRegistryEntries: read 2774 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 1024 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2817 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1039 CLIDRegistry entries for module ALL
 IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc                                           INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -861,7 +861,7 @@ EndcapDMConstruction                               INFO Start building EC electr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstruction                               INFO Start building EC electronics geometry
-GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 22736Kb 	 Time = 0.57S
+GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.47S
 GeoModelSvc.TileDetectorTool                       INFO  Entering TileDetectorTool::create()
 TileDddbManager                                    INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                    INFO n_tiglob = 5
@@ -873,7 +873,7 @@ TileDddbManager                                    INFO n_tileSwitches = 1
 ClassIDSvc                                         INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDescrCnv                                INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID                                           INFO initialize_from_dictionary 
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -885,9 +885,9 @@ CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID                                     INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -922,7 +922,7 @@ GeoModelSvc.TileDetectorTool                       INFO  Global positioning of b
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrManager                                INFO Entering create_elements()
-GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.21S
+GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.14S
 ClassIDSvc                                         INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                     INFO Initializing....TileInfoLoader
 TileInfoLoader                                     INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -944,11 +944,11 @@ TileInfoLoader                                     INFO Sampling fraction for E2
 TileInfoLoader                                     INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader                                     INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader                                     INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID                                        INFO initialize_from_dictionary
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -957,7 +957,7 @@ TileCablingSvc                                     INFO Cabling for RUN2a (2018)
 TileCablingSvc                                     INFO Setting Cabling type to 5
 TileInfoLoader                                     INFO Placed TileInfo object in the detector store.
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 4106 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 4108 CLIDRegistry entries for module ALL
 PyComponentMgr                              0      INFO Initializing PyComponentMgr...
 Finalizer                                   0      INFO Initializing Finalizer...
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
@@ -1068,12 +1068,12 @@ CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDescrCnv                    0   0      INFO  Finished 
 CaloIdMgrDetDescrCnv                    0   0      INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -1083,16 +1083,16 @@ RootDatabase.open                       0   0      INFO /cvmfs/atlas-condb.cern.
 AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #18124, run #363899 on slot 0,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processing event #18125, run #363899 on slot 1,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  2   2      INFO   ===>>>  start processing event #18126, run #363899 on slot 2,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
 AthenaHiveEventLoopMgr                  3   3      INFO   ===>>>  start processing event #18127, run #363899 on slot 3,  0 events processed so far  <<<===
-ClassIDSvc                              2   2      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
-ClassIDSvc                              2   2      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...2   2      INFO TileL2Builder initialization completed
-ToolSvc.TileMuRcvContByteStreamTool     2   2      INFO Initializing TileMuRcvContByteStreamTool
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
+ClassIDSvc                              3   3      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
+ClassIDSvc                              1   1      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
+ToolSvc.TileROD_Decoder.TileL2Builder   1   1      INFO TileL2Builder initialization completed
+ToolSvc.TileMuRcvContByteStreamTool     1   1      INFO Initializing TileMuRcvContByteStreamTool
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18124, run #363899 on slot 0,  1 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #18128, run #363899 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18126, run #363899 on slot 2,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18125, run #363899 on slot 1,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18126, run #363899 on slot 2,  3 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18127, run #363899 on slot 3,  4 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  5   1      INFO   ===>>>  start processing event #18129, run #363899 on slot 1,  4 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  6   2      INFO   ===>>>  start processing event #18130, run #363899 on slot 2,  4 events processed so far  <<<===
@@ -1100,192 +1100,192 @@ AthenaHiveEventLoopMgr                  7   3      INFO   ===>>>  start processi
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18128, run #363899 on slot 0,  5 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #18132, run #363899 on slot 0,  5 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18129, run #363899 on slot 1,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   1      INFO   ===>>>  start processing event #18133, run #363899 on slot 1,  6 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18130, run #363899 on slot 2,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   1      INFO   ===>>>  start processing event #18133, run #363899 on slot 1,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  2      INFO   ===>>>  start processing event #18134, run #363899 on slot 2,  7 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18131, run #363899 on slot 3,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  2      INFO   ===>>>  start processing event #18134, run #363899 on slot 2,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  3      INFO   ===>>>  start processing event #18135, run #363899 on slot 3,  8 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18132, run #363899 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #18136, run #363899 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #18135, run #363899 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  3      INFO   ===>>>  start processing event #18136, run #363899 on slot 3,  9 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18133, run #363899 on slot 1,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  1      INFO   ===>>>  start processing event #18137, run #363899 on slot 1,  10 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18134, run #363899 on slot 2,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18135, run #363899 on slot 3,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  2      INFO   ===>>>  start processing event #18138, run #363899 on slot 2,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  3      INFO   ===>>>  start processing event #18139, run #363899 on slot 3,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18136, run #363899 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #18140, run #363899 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  1      INFO   ===>>>  start processing event #18137, run #363899 on slot 1,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  2      INFO   ===>>>  start processing event #18138, run #363899 on slot 2,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18135, run #363899 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18136, run #363899 on slot 3,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #18139, run #363899 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  3      INFO   ===>>>  start processing event #18140, run #363899 on slot 3,  13 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18137, run #363899 on slot 1,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  1      INFO   ===>>>  start processing event #18141, run #363899 on slot 1,  14 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18138, run #363899 on slot 2,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  1      INFO   ===>>>  start processing event #18141, run #363899 on slot 1,  15 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  18  2      INFO   ===>>>  start processing event #18142, run #363899 on slot 2,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18139, run #363899 on slot 3,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  3      INFO   ===>>>  start processing event #18143, run #363899 on slot 3,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18140, run #363899 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18139, run #363899 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18140, run #363899 on slot 3,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #18143, run #363899 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  20  3      INFO   ===>>>  start processing event #18144, run #363899 on slot 3,  17 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18141, run #363899 on slot 1,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  20  0      INFO   ===>>>  start processing event #18144, run #363899 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  21  1      INFO   ===>>>  start processing event #18145, run #363899 on slot 1,  18 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18142, run #363899 on slot 2,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18143, run #363899 on slot 3,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  22  2      INFO   ===>>>  start processing event #18146, run #363899 on slot 2,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  23  3      INFO   ===>>>  start processing event #18147, run #363899 on slot 3,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18144, run #363899 on slot 0,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  24  0      INFO   ===>>>  start processing event #18148, run #363899 on slot 0,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  21  1      INFO   ===>>>  start processing event #18145, run #363899 on slot 1,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  22  2      INFO   ===>>>  start processing event #18146, run #363899 on slot 2,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18143, run #363899 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  23  0      INFO   ===>>>  start processing event #18147, run #363899 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18144, run #363899 on slot 3,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  24  3      INFO   ===>>>  start processing event #18148, run #363899 on slot 3,  21 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18145, run #363899 on slot 1,  22 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  25  1      INFO   ===>>>  start processing event #18149, run #363899 on slot 1,  22 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18146, run #363899 on slot 2,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18147, run #363899 on slot 3,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  26  2      INFO   ===>>>  start processing event #18150, run #363899 on slot 2,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  27  3      INFO   ===>>>  start processing event #18151, run #363899 on slot 3,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18148, run #363899 on slot 0,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  26  2      INFO   ===>>>  start processing event #18150, run #363899 on slot 2,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18147, run #363899 on slot 0,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  27  0      INFO   ===>>>  start processing event #18151, run #363899 on slot 0,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18148, run #363899 on slot 3,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  28  3      INFO   ===>>>  start processing event #18152, run #363899 on slot 3,  25 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18149, run #363899 on slot 1,  26 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  28  0      INFO   ===>>>  start processing event #18152, run #363899 on slot 0,  26 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  29  1      INFO   ===>>>  start processing event #18153, run #363899 on slot 1,  26 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18150, run #363899 on slot 2,  27 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  30  2      INFO   ===>>>  start processing event #18154, run #363899 on slot 2,  27 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18151, run #363899 on slot 3,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  31  3      INFO   ===>>>  start processing event #18155, run #363899 on slot 3,  28 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18152, run #363899 on slot 0,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18151, run #363899 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  31  0      INFO   ===>>>  start processing event #18155, run #363899 on slot 0,  28 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18152, run #363899 on slot 3,  29 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  32  3      INFO   ===>>>  start processing event #18156, run #363899 on slot 3,  29 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18153, run #363899 on slot 1,  30 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  32  0      INFO   ===>>>  start processing event #18156, run #363899 on slot 0,  30 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  33  1      INFO   ===>>>  start processing event #18157, run #363899 on slot 1,  30 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18154, run #363899 on slot 2,  31 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  34  2      INFO   ===>>>  start processing event #18158, run #363899 on slot 2,  31 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18155, run #363899 on slot 3,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  35  3      INFO   ===>>>  start processing event #18159, run #363899 on slot 3,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18156, run #363899 on slot 0,  33 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  36  0      INFO   ===>>>  start processing event #18160, run #363899 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18155, run #363899 on slot 0,  32 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18156, run #363899 on slot 3,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  35  0      INFO   ===>>>  start processing event #18159, run #363899 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  36  3      INFO   ===>>>  start processing event #18160, run #363899 on slot 3,  33 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18157, run #363899 on slot 1,  34 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  37  1      INFO   ===>>>  start processing event #18161, run #363899 on slot 1,  34 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18158, run #363899 on slot 2,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18159, run #363899 on slot 3,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  38  2      INFO   ===>>>  start processing event #18162, run #363899 on slot 2,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  39  3      INFO   ===>>>  start processing event #18163, run #363899 on slot 3,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18160, run #363899 on slot 0,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  40  0      INFO   ===>>>  start processing event #18164, run #363899 on slot 0,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  37  1      INFO   ===>>>  start processing event #18161, run #363899 on slot 1,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  38  2      INFO   ===>>>  start processing event #18162, run #363899 on slot 2,  35 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18159, run #363899 on slot 0,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18160, run #363899 on slot 3,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  39  0      INFO   ===>>>  start processing event #18163, run #363899 on slot 0,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  40  3      INFO   ===>>>  start processing event #18164, run #363899 on slot 3,  37 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18161, run #363899 on slot 1,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  41  1      INFO   ===>>>  start processing event #18165, run #363899 on slot 1,  38 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18162, run #363899 on slot 2,  39 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18163, run #363899 on slot 3,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  42  2      INFO   ===>>>  start processing event #18166, run #363899 on slot 2,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  43  3      INFO   ===>>>  start processing event #18167, run #363899 on slot 3,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18164, run #363899 on slot 0,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  44  0      INFO   ===>>>  start processing event #18168, run #363899 on slot 0,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  41  1      INFO   ===>>>  start processing event #18165, run #363899 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  42  2      INFO   ===>>>  start processing event #18166, run #363899 on slot 2,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18163, run #363899 on slot 0,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18164, run #363899 on slot 3,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  43  0      INFO   ===>>>  start processing event #18167, run #363899 on slot 0,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  44  3      INFO   ===>>>  start processing event #18168, run #363899 on slot 3,  41 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18165, run #363899 on slot 1,  42 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  45  1      INFO   ===>>>  start processing event #18169, run #363899 on slot 1,  42 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18166, run #363899 on slot 2,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18167, run #363899 on slot 3,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  46  2      INFO   ===>>>  start processing event #18170, run #363899 on slot 2,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  47  3      INFO   ===>>>  start processing event #18171, run #363899 on slot 3,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18168, run #363899 on slot 0,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  45  1      INFO   ===>>>  start processing event #18169, run #363899 on slot 1,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  46  2      INFO   ===>>>  start processing event #18170, run #363899 on slot 2,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18167, run #363899 on slot 0,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18168, run #363899 on slot 3,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  47  0      INFO   ===>>>  start processing event #18171, run #363899 on slot 0,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  48  3      INFO   ===>>>  start processing event #18172, run #363899 on slot 3,  45 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18169, run #363899 on slot 1,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  48  0      INFO   ===>>>  start processing event #18172, run #363899 on slot 0,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  49  1      INFO   ===>>>  start processing event #18173, run #363899 on slot 1,  46 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18170, run #363899 on slot 2,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18171, run #363899 on slot 3,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  50  2      INFO   ===>>>  start processing event #18174, run #363899 on slot 2,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  51  3      INFO   ===>>>  start processing event #18175, run #363899 on slot 3,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18172, run #363899 on slot 0,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  49  1      INFO   ===>>>  start processing event #18173, run #363899 on slot 1,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  50  2      INFO   ===>>>  start processing event #18174, run #363899 on slot 2,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18171, run #363899 on slot 0,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18172, run #363899 on slot 3,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  51  0      INFO   ===>>>  start processing event #18175, run #363899 on slot 0,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  52  3      INFO   ===>>>  start processing event #18176, run #363899 on slot 3,  49 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18173, run #363899 on slot 1,  50 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18174, run #363899 on slot 2,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  52  0      INFO   ===>>>  start processing event #18176, run #363899 on slot 0,  51 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  53  1      INFO   ===>>>  start processing event #18177, run #363899 on slot 1,  51 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  54  2      INFO   ===>>>  start processing event #18178, run #363899 on slot 2,  51 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18175, run #363899 on slot 3,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  55  3      INFO   ===>>>  start processing event #18179, run #363899 on slot 3,  52 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18176, run #363899 on slot 0,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  56  0      INFO   ===>>>  start processing event #18180, run #363899 on slot 0,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18175, run #363899 on slot 0,  52 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18176, run #363899 on slot 3,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  55  0      INFO   ===>>>  start processing event #18179, run #363899 on slot 0,  53 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  56  3      INFO   ===>>>  start processing event #18180, run #363899 on slot 3,  53 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18177, run #363899 on slot 1,  54 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18178, run #363899 on slot 2,  55 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  57  1      INFO   ===>>>  start processing event #18181, run #363899 on slot 1,  55 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  58  2      INFO   ===>>>  start processing event #18182, run #363899 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18179, run #363899 on slot 3,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  59  3      INFO   ===>>>  start processing event #18183, run #363899 on slot 3,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18180, run #363899 on slot 0,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18179, run #363899 on slot 0,  56 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18180, run #363899 on slot 3,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  59  0      INFO   ===>>>  start processing event #18183, run #363899 on slot 0,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  60  3      INFO   ===>>>  start processing event #18184, run #363899 on slot 3,  57 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18181, run #363899 on slot 1,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  60  0      INFO   ===>>>  start processing event #18184, run #363899 on slot 0,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  61  1      INFO   ===>>>  start processing event #18185, run #363899 on slot 1,  58 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18182, run #363899 on slot 2,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18183, run #363899 on slot 3,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  62  2      INFO   ===>>>  start processing event #18186, run #363899 on slot 2,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  63  3      INFO   ===>>>  start processing event #18187, run #363899 on slot 3,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18185, run #363899 on slot 1,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  64  1      INFO   ===>>>  start processing event #18188, run #363899 on slot 1,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18184, run #363899 on slot 0,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  65  0      INFO   ===>>>  start processing event #18189, run #363899 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  61  1      INFO   ===>>>  start processing event #18185, run #363899 on slot 1,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  62  2      INFO   ===>>>  start processing event #18186, run #363899 on slot 2,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18183, run #363899 on slot 0,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18184, run #363899 on slot 3,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  63  0      INFO   ===>>>  start processing event #18187, run #363899 on slot 0,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  64  3      INFO   ===>>>  start processing event #18188, run #363899 on slot 3,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18185, run #363899 on slot 1,  62 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18186, run #363899 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18187, run #363899 on slot 3,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18188, run #363899 on slot 1,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  66  1      INFO   ===>>>  start processing event #18190, run #363899 on slot 1,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  67  2      INFO   ===>>>  start processing event #18191, run #363899 on slot 2,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  65  1      INFO   ===>>>  start processing event #18189, run #363899 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  66  2      INFO   ===>>>  start processing event #18190, run #363899 on slot 2,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18187, run #363899 on slot 0,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18188, run #363899 on slot 3,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  67  0      INFO   ===>>>  start processing event #18191, run #363899 on slot 0,  65 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  68  3      INFO   ===>>>  start processing event #18192, run #363899 on slot 3,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18189, run #363899 on slot 0,  66 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  69  0      INFO   ===>>>  start processing event #18193, run #363899 on slot 0,  66 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18190, run #363899 on slot 1,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  70  1      INFO   ===>>>  start processing event #18194, run #363899 on slot 1,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18191, run #363899 on slot 2,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18189, run #363899 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18190, run #363899 on slot 2,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  69  1      INFO   ===>>>  start processing event #18193, run #363899 on slot 1,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  70  2      INFO   ===>>>  start processing event #18194, run #363899 on slot 2,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18191, run #363899 on slot 0,  68 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18192, run #363899 on slot 3,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  71  2      INFO   ===>>>  start processing event #18195, run #363899 on slot 2,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  71  0      INFO   ===>>>  start processing event #18195, run #363899 on slot 0,  69 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  72  3      INFO   ===>>>  start processing event #18196, run #363899 on slot 3,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18193, run #363899 on slot 0,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18194, run #363899 on slot 1,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  73  0      INFO   ===>>>  start processing event #18197, run #363899 on slot 0,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  74  1      INFO   ===>>>  start processing event #18198, run #363899 on slot 1,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18195, run #363899 on slot 2,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  75  2      INFO   ===>>>  start processing event #18199, run #363899 on slot 2,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18193, run #363899 on slot 1,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18194, run #363899 on slot 2,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  73  1      INFO   ===>>>  start processing event #18197, run #363899 on slot 1,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  74  2      INFO   ===>>>  start processing event #18198, run #363899 on slot 2,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18195, run #363899 on slot 0,  72 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18196, run #363899 on slot 3,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  75  0      INFO   ===>>>  start processing event #18199, run #363899 on slot 0,  73 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  76  3      INFO   ===>>>  start processing event #18200, run #363899 on slot 3,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18197, run #363899 on slot 0,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18198, run #363899 on slot 1,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  77  0      INFO   ===>>>  start processing event #18201, run #363899 on slot 0,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  78  1      INFO   ===>>>  start processing event #18202, run #363899 on slot 1,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18199, run #363899 on slot 2,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18197, run #363899 on slot 1,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18198, run #363899 on slot 2,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  77  1      INFO   ===>>>  start processing event #18201, run #363899 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  78  2      INFO   ===>>>  start processing event #18202, run #363899 on slot 2,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18199, run #363899 on slot 0,  76 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18200, run #363899 on slot 3,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  79  2      INFO   ===>>>  start processing event #18203, run #363899 on slot 2,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  79  0      INFO   ===>>>  start processing event #18203, run #363899 on slot 0,  77 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  80  3      INFO   ===>>>  start processing event #18204, run #363899 on slot 3,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18201, run #363899 on slot 0,  78 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  81  0      INFO   ===>>>  start processing event #18205, run #363899 on slot 0,  78 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18202, run #363899 on slot 1,  79 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18203, run #363899 on slot 2,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  82  1      INFO   ===>>>  start processing event #18206, run #363899 on slot 1,  80 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  83  2      INFO   ===>>>  start processing event #18207, run #363899 on slot 2,  80 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18201, run #363899 on slot 1,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18202, run #363899 on slot 2,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  81  1      INFO   ===>>>  start processing event #18205, run #363899 on slot 1,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  82  2      INFO   ===>>>  start processing event #18206, run #363899 on slot 2,  79 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18203, run #363899 on slot 0,  80 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18204, run #363899 on slot 3,  81 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18205, run #363899 on slot 0,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  84  0      INFO   ===>>>  start processing event #18208, run #363899 on slot 0,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  85  3      INFO   ===>>>  start processing event #18209, run #363899 on slot 3,  82 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18206, run #363899 on slot 1,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  86  1      INFO   ===>>>  start processing event #18210, run #363899 on slot 1,  83 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18207, run #363899 on slot 2,  84 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18208, run #363899 on slot 0,  85 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18209, run #363899 on slot 3,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  87  0      INFO   ===>>>  start processing event #18211, run #363899 on slot 0,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  88  2      INFO   ===>>>  start processing event #18212, run #363899 on slot 2,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  89  3      INFO   ===>>>  start processing event #18213, run #363899 on slot 3,  86 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18210, run #363899 on slot 1,  87 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  90  1      INFO   ===>>>  start processing event #18214, run #363899 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  83  0      INFO   ===>>>  start processing event #18207, run #363899 on slot 0,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  84  3      INFO   ===>>>  start processing event #18208, run #363899 on slot 3,  81 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18205, run #363899 on slot 1,  82 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18206, run #363899 on slot 2,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  85  1      INFO   ===>>>  start processing event #18209, run #363899 on slot 1,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  86  2      INFO   ===>>>  start processing event #18210, run #363899 on slot 2,  83 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18207, run #363899 on slot 0,  84 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18208, run #363899 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  87  0      INFO   ===>>>  start processing event #18211, run #363899 on slot 0,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  88  3      INFO   ===>>>  start processing event #18212, run #363899 on slot 3,  85 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18209, run #363899 on slot 1,  86 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18210, run #363899 on slot 2,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  89  1      INFO   ===>>>  start processing event #18213, run #363899 on slot 1,  87 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  90  2      INFO   ===>>>  start processing event #18214, run #363899 on slot 2,  87 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18211, run #363899 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  91  0      INFO   ===>>>  start processing event #18215, run #363899 on slot 0,  88 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18212, run #363899 on slot 2,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  92  2      INFO   ===>>>  start processing event #18216, run #363899 on slot 2,  89 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18213, run #363899 on slot 3,  90 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18214, run #363899 on slot 1,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18212, run #363899 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  91  0      INFO   ===>>>  start processing event #18215, run #363899 on slot 0,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  92  3      INFO   ===>>>  start processing event #18216, run #363899 on slot 3,  89 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18213, run #363899 on slot 1,  90 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18214, run #363899 on slot 2,  91 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  93  1      INFO   ===>>>  start processing event #18217, run #363899 on slot 1,  91 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  94  3      INFO   ===>>>  start processing event #18218, run #363899 on slot 3,  91 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  94  2      INFO   ===>>>  start processing event #18218, run #363899 on slot 2,  91 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18215, run #363899 on slot 0,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18216, run #363899 on slot 2,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18216, run #363899 on slot 3,  93 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  95  0      INFO   ===>>>  start processing event #18219, run #363899 on slot 0,  93 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  96  2      INFO   ===>>>  start processing event #18220, run #363899 on slot 2,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  96  3      INFO   ===>>>  start processing event #18220, run #363899 on slot 3,  93 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18217, run #363899 on slot 1,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  97  1      INFO   ===>>>  start processing event #18221, run #363899 on slot 1,  94 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18218, run #363899 on slot 3,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  98  3      INFO   ===>>>  start processing event #18222, run #363899 on slot 3,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18220, run #363899 on slot 2,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18219, run #363899 on slot 0,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18218, run #363899 on slot 2,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  97  1      INFO   ===>>>  start processing event #18221, run #363899 on slot 1,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  98  2      INFO   ===>>>  start processing event #18222, run #363899 on slot 2,  95 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18219, run #363899 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18220, run #363899 on slot 3,  97 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  99  0      INFO   ===>>>  start processing event #18223, run #363899 on slot 0,  97 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18221, run #363899 on slot 1,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18222, run #363899 on slot 3,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18222, run #363899 on slot 2,  99 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18223, run #363899 on slot 0,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 3.22937
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 11.4138
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
 Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
@@ -1303,7 +1303,7 @@ AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 PyComponentMgr                                     INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv                                  INFO in finalize
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.78 ))s
+IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     5.16 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
@@ -1315,24 +1315,24 @@ IOVDbFolder                                        INFO Folder /TILE/OFL02/NOISE
 IOVDbFolder                                        INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.36 ))s
-IOVDbSvc                                           INFO  bytes in ((      1.14 ))s
+IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.03 ))s
+IOVDbSvc                                           INFO  bytes in ((      5.19 ))s
 IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.14 ))s
+IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     5.19 ))s
 IOVDbSvc                                           INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 TileInfoLoader                                     INFO TileInfoLoader::finalize()
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStreamMetadataTool                     INFO in finalize()
 ToolSvc.TileMuRcvContByteStreamTool                INFO Finalizing TileMuRcvContByteStreamTool successfuly
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...           INFO Finalizing
+ToolSvc.TileROD_Decoder.TileL2Builder              INFO Finalizing
 *****Chrono*****                                   INFO ****************************************************************************************************
 *****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
-cObjR_ALL                                          INFO Time User   : Tot=  0.5  [s] Ave/Min/Max= 0.25(+- 0.24)/ 0.01/ 0.49  [s] #=  2
-cObj_ALL                                           INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=0.275(+-0.235)/ 0.04/ 0.51  [s] #=  2
-ChronoStatSvc                                      INFO Time User   : Tot= 3.01  [s]                                             #=  1
+cObjR_ALL                                          INFO Time User   : Tot=  300 [ms] Ave/Min/Max=  150(+-  150)/    0/  300 [ms] #=  2
+cObj_ALL                                           INFO Time User   : Tot=  350 [ms] Ave/Min/Max=  175(+-  165)/   10/  340 [ms] #=  2
+ChronoStatSvc                                      INFO Time User   : Tot= 2.07  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileROD_Decoder_test.txt b/TileCalorimeter/TileSvc/TileByteStream/share/TileROD_Decoder_test.txt
index 6ed9d96e4208..bea702c240e3 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileROD_Decoder_test.txt
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileROD_Decoder_test.txt
@@ -1,4 +1,4 @@
 
 ApplicationMgr.ExtSvc = {"StoreGateSvc/DetectorStore", "StoreGateSvc/ConditionStore"};
-ToolSvc.TileROD_Decoder.TileDefaultL2Builder = "";
+ToolSvc.TileROD_Decoder.TileL2Builder = "";
 ToolSvc.TileROD_Decoder.TileBadChanTool = "";
diff --git a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
index b9f464b34726..d20deccf91aa 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
+++ b/TileCalorimeter/TileSvc/TileByteStream/share/TileRawChannelContByteStreamCnv_test.ref
@@ -1,16 +1,16 @@
-Sun Mar 31 05:37:20 CEST 2019
+Tue Apr 30 20:04:01 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileRawChannelContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -29,7 +29,7 @@ ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to leve
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:37:52 2019
+                                          running on pcatl12 on Tue Apr 30 20:04:13 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -45,8 +45,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -79,8 +79,8 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 IOVDbSvc             INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
-ClassIDSvc           INFO  getRegistryEntries: read 3099 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 815 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3142 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 830 CLIDRegistry entries for module ALL
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
@@ -187,7 +187,7 @@ EndcapDMConstru...   INFO Start building EC electronics geometry
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstru...   INFO Start building EC electronics geometry
-GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.61S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.5S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 TileDddbManager      INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager      INFO n_tiglob = 5
@@ -199,7 +199,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -211,9 +211,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -248,7 +248,7 @@ GeoModelSvc.Til...   INFO  Global positioning of barrel with rotation (0,0,0)) a
 GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrMan...   INFO Entering create_elements()
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.22S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.12S
 ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -270,11 +270,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -327,7 +327,7 @@ TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCond
 TileEMScaleCond...   INFO Creating TileCondProxyCool(TileEMScaleCondAlg.TileCondProxyCool_OnlEms) for folder: "/TILE/OFL02/CALIB/EMS"
 TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.TileCondProxyCool_NoiseSample) for folder: "/TILE/OFL02/NOISE/SAMPLE"
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
-ClassIDSvc           INFO  getRegistryEntries: read 3841 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3843 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 Finalizer            INFO Initializing Finalizer...
 HistogramPersis...WARNING Histograms saving not required.
@@ -337,7 +337,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1
-ClassIDSvc           INFO  getRegistryEntries: read 629 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 425 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/NLN'
@@ -382,12 +382,12 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -635,23 +635,23 @@ IncidentProcAlg2     INFO Finalize
 EventInfoByteSt...   INFO finalize 
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.93 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.77 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.91 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.84 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.54 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.77 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     4.26 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.74 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     0.83 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.09 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.07 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     1.34 ))s
-IOVDbSvc             INFO  bytes in ((     12.11 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     1.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     1.26 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     1.98 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.83 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.81 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     1.46 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.90 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.87 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641504 ((     5.10 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/93060 ((     0.83 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.92 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.06 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.69 ))s
+IOVDbSvc             INFO  bytes in ((     16.76 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     2.27 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     9.84 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.75 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((    15.01 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -661,29 +661,29 @@ ToolSvc.TileROD...   INFO Finalizing
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot= 0.59  [s] Ave/Min/Max=0.295(+-0.285)/ 0.01/ 0.58  [s] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.63  [s] Ave/Min/Max=0.0485(+-0.159)/    0/  0.6  [s] #= 13
-ChronoStatSvc        INFO Time User   : Tot= 13.2  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  280 [ms] Ave/Min/Max=  140(+-  130)/   10/  270 [ms] #=  2
+cObj_ALL             INFO Time User   : Tot=  310 [ms] Ave/Min/Max= 23.8(+- 74.2)/    0/  280 [ms] #= 13
+ChronoStatSvc        INFO Time User   : Tot= 8.19  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
 ApplicationMgr       INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
-Sun Mar 31 05:38:38 CEST 2019
+Tue Apr 30 20:04:46 CEST 2019
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/32f50a414ac] -- built on [2019-03-30T1739]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-slc6-gcc8-opt] [master-tile-rod-decoder-dependency-fix/43f0b9e782] -- built on [2019-04-30T1954]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO configuring AthenaHive with [4] concurrent threads and [4] concurrent events
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 4 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "TileByteStream/TileRawChannelContByteStreamCnv_test.py"
-[?1034hSetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5468 configurables from 58 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5473 configurables from 4 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.1
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -703,7 +703,7 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus024.cern.ch on Sun Mar 31 05:39:03 2019
+                                          running on pcatl12 on Tue Apr 30 20:04:55 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -718,8 +718,8 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus024.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host pcatl12.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                         WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
@@ -750,8 +750,8 @@ ByteStreamAddressProviderSvc                       INFO    Calorimeter Cluster P
 ByteStreamAddressProviderSvc                       INFO    Calorimeter Jet/Energy Processor RoI = 0xac, 0xad
 ByteStreamAddressProviderSvc                       INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddressProviderSvc                       INFO -- Will fill Store with id =  0
-ClassIDSvc                                         INFO  getRegistryEntries: read 2774 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 1024 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2817 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1039 CLIDRegistry entries for module ALL
 IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
 IOVDbSvc                                           INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
@@ -861,7 +861,7 @@ EndcapDMConstruction                               INFO Start building EC electr
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EndcapDMConstruction                               INFO Start building EC electronics geometry
-GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.62S
+GeoModelSvc                                        INFO GeoModelSvc.LArDetectorToolNV	 SZ= 23968Kb 	 Time = 0.51S
 GeoModelSvc.TileDetectorTool                       INFO  Entering TileDetectorTool::create()
 TileDddbManager                                    INFO m_tag = ATLAS-R2-2016-01-00-01
 TileDddbManager                                    INFO n_tiglob = 5
@@ -873,7 +873,7 @@ TileDddbManager                                    INFO n_tileSwitches = 1
 ClassIDSvc                                         INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour                                      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDescrCnv                                INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID                                           INFO initialize_from_dictionary 
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -885,9 +885,9 @@ CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID                                    INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID                                     INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
@@ -922,7 +922,7 @@ GeoModelSvc.TileDetectorTool                       INFO  Global positioning of b
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) Gaudi::Units::cm
 GeoModelSvc.TileDetectorTool                       INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) Gaudi::Units::cm
 TileDetDescrManager                                INFO Entering create_elements()
-GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 3576Kb 	 Time = 0.2S
+GeoModelSvc                                        INFO GeoModelSvc.TileDetectorTool	 SZ= 4600Kb 	 Time = 0.13S
 ClassIDSvc                                         INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader                                     INFO Initializing....TileInfoLoader
 TileInfoLoader                                     INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
@@ -944,11 +944,11 @@ TileInfoLoader                                     INFO Sampling fraction for E2
 TileInfoLoader                                     INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader                                     INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader                                     INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader                                     INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_IDDetDescrCnv                         INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID                                        INFO initialize_from_dictionary
 AtlasDetectorID                                    INFO initialize_from_dictionary - OK
@@ -957,7 +957,7 @@ TileCablingSvc                                     INFO Cabling for RUN2 (2014-2
 TileCablingSvc                                     INFO Setting Cabling type to 4
 TileInfoLoader                                     INFO Placed TileInfo object in the detector store.
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                  0      INFO  getRegistryEntries: read 4106 CLIDRegistry entries for module ALL
+ClassIDSvc                                  0      INFO  getRegistryEntries: read 4108 CLIDRegistry entries for module ALL
 PyComponentMgr                              0      INFO Initializing PyComponentMgr...
 Finalizer                                   0      INFO Initializing Finalizer...
 ClassIDSvc                                  0      INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
@@ -1070,12 +1070,12 @@ CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID                         0   0      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_IDDetDescrCnv              0   0      INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
-TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-29T2201/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour                           0   0      INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2147/Athena/22.0.2/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID                         0   0      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDescrCnv                    0   0      INFO  Finished 
 CaloIdMgrDetDescrCnv                    0   0      INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -1086,61 +1086,61 @@ AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processi
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 671 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
 ClassIDSvc                              0   0      INFO  getRegistryEntries: read 90 CLIDRegistry entries for module ALL
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...0   0      INFO TileL2Builder initialization completed
+ToolSvc.TileROD_Decoder.TileL2Builder   0   0      INFO TileL2Builder initialization completed
 ToolSvc.TileRawChannelContByteStreamTool0   0      INFO Initializing TileRawChannelContByteStreamTool
 AthenaHiveEventLoopMgr                  1   1      INFO   ===>>>  start processing event #1129665, run #204073 on slot 1,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  2   2      INFO   ===>>>  start processing event #1131212, run #204073 on slot 2,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  3   3      INFO   ===>>>  start processing event #1131086, run #204073 on slot 3,  0 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1129572, run #204073 on slot 0,  1 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1129665, run #204073 on slot 1,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #1130272, run #204073 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  5   1      INFO   ===>>>  start processing event #1131269, run #204073 on slot 1,  2 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1131212, run #204073 on slot 2,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #1130272, run #204073 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   1      INFO   ===>>>  start processing event #1131269, run #204073 on slot 1,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   2      INFO   ===>>>  start processing event #1130716, run #204073 on slot 2,  3 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1131086, run #204073 on slot 3,  4 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130272, run #204073 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #1130716, run #204073 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  7   2      INFO   ===>>>  start processing event #1132019, run #204073 on slot 2,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  8   3      INFO   ===>>>  start processing event #1132092, run #204073 on slot 3,  5 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1131269, run #204073 on slot 1,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130716, run #204073 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132019, run #204073 on slot 2,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #1130238, run #204073 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  10  1      INFO   ===>>>  start processing event #1134553, run #204073 on slot 1,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  11  2      INFO   ===>>>  start processing event #1130999, run #204073 on slot 2,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132092, run #204073 on slot 3,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130238, run #204073 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #1133461, run #204073 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  13  3      INFO   ===>>>  start processing event #1131152, run #204073 on slot 3,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1134553, run #204073 on slot 1,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130999, run #204073 on slot 2,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1133461, run #204073 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #1130142, run #204073 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  15  1      INFO   ===>>>  start processing event #1132770, run #204073 on slot 1,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  16  2      INFO   ===>>>  start processing event #1132365, run #204073 on slot 2,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1131152, run #204073 on slot 3,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130142, run #204073 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132770, run #204073 on slot 1,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #1136791, run #204073 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  18  1      INFO   ===>>>  start processing event #1133781, run #204073 on slot 1,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  19  3      INFO   ===>>>  start processing event #1132067, run #204073 on slot 3,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132365, run #204073 on slot 2,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136791, run #204073 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  20  0      INFO   ===>>>  start processing event #1138637, run #204073 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  21  2      INFO   ===>>>  start processing event #1139495, run #204073 on slot 2,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1133781, run #204073 on slot 1,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132067, run #204073 on slot 3,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  22  1      INFO   ===>>>  start processing event #1140193, run #204073 on slot 1,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  23  3      INFO   ===>>>  start processing event #1142953, run #204073 on slot 3,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138637, run #204073 on slot 0,  21 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139495, run #204073 on slot 2,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  24  0      INFO   ===>>>  start processing event #1139127, run #204073 on slot 0,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  25  2      INFO   ===>>>  start processing event #1141272, run #204073 on slot 2,  22 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1140193, run #204073 on slot 1,  23 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142953, run #204073 on slot 3,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #1132019, run #204073 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   1      INFO   ===>>>  start processing event #1132092, run #204073 on slot 1,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   3      INFO   ===>>>  start processing event #1130238, run #204073 on slot 3,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130716, run #204073 on slot 2,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132019, run #204073 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132092, run #204073 on slot 1,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #1134553, run #204073 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  1      INFO   ===>>>  start processing event #1130999, run #204073 on slot 1,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  2      INFO   ===>>>  start processing event #1133461, run #204073 on slot 2,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130238, run #204073 on slot 3,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1134553, run #204073 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130999, run #204073 on slot 1,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #1131152, run #204073 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  1      INFO   ===>>>  start processing event #1130142, run #204073 on slot 1,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  3      INFO   ===>>>  start processing event #1132770, run #204073 on slot 3,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1133461, run #204073 on slot 2,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1131152, run #204073 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1130142, run #204073 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #1132365, run #204073 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  1      INFO   ===>>>  start processing event #1136791, run #204073 on slot 1,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  2      INFO   ===>>>  start processing event #1133781, run #204073 on slot 2,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132770, run #204073 on slot 3,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132365, run #204073 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136791, run #204073 on slot 1,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #1132067, run #204073 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  20  1      INFO   ===>>>  start processing event #1138637, run #204073 on slot 1,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  21  3      INFO   ===>>>  start processing event #1139495, run #204073 on slot 3,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1133781, run #204073 on slot 2,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1132067, run #204073 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138637, run #204073 on slot 1,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  22  0      INFO   ===>>>  start processing event #1140193, run #204073 on slot 0,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  23  1      INFO   ===>>>  start processing event #1142953, run #204073 on slot 1,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  24  2      INFO   ===>>>  start processing event #1139127, run #204073 on slot 2,  21 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139495, run #204073 on slot 3,  22 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1140193, run #204073 on slot 0,  23 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142953, run #204073 on slot 1,  24 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  25  0      INFO   ===>>>  start processing event #1141272, run #204073 on slot 0,  24 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  26  1      INFO   ===>>>  start processing event #1137117, run #204073 on slot 1,  24 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  27  3      INFO   ===>>>  start processing event #1139599, run #204073 on slot 3,  24 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139127, run #204073 on slot 0,  25 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141272, run #204073 on slot 2,  26 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139127, run #204073 on slot 2,  25 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141272, run #204073 on slot 0,  26 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137117, run #204073 on slot 1,  27 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  28  0      INFO   ===>>>  start processing event #1140314, run #204073 on slot 0,  27 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  29  1      INFO   ===>>>  start processing event #1133685, run #204073 on slot 1,  27 events processed so far  <<<===
@@ -1153,97 +1153,97 @@ AthenaHiveEventLoopMgr                  32  1      INFO   ===>>>  start processi
 AthenaHiveEventLoopMgr                  33  3      INFO   ===>>>  start processing event #1141197, run #204073 on slot 3,  30 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143279, run #204073 on slot 2,  31 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137563, run #204073 on slot 0,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  34  0      INFO   ===>>>  start processing event #1140039, run #204073 on slot 0,  32 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  35  2      INFO   ===>>>  start processing event #1142531, run #204073 on slot 2,  32 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139927, run #204073 on slot 1,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  34  0      INFO   ===>>>  start processing event #1140039, run #204073 on slot 0,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  35  1      INFO   ===>>>  start processing event #1142531, run #204073 on slot 1,  33 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  36  2      INFO   ===>>>  start processing event #1139475, run #204073 on slot 2,  33 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141197, run #204073 on slot 3,  34 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  36  1      INFO   ===>>>  start processing event #1139475, run #204073 on slot 1,  34 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  37  3      INFO   ===>>>  start processing event #1139958, run #204073 on slot 3,  34 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1140039, run #204073 on slot 0,  35 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142531, run #204073 on slot 2,  36 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139475, run #204073 on slot 1,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  38  0      INFO   ===>>>  start processing event #1143765, run #204073 on slot 0,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  39  1      INFO   ===>>>  start processing event #1143097, run #204073 on slot 1,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  40  2      INFO   ===>>>  start processing event #1134147, run #204073 on slot 2,  37 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139958, run #204073 on slot 3,  38 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143765, run #204073 on slot 0,  39 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143097, run #204073 on slot 1,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  41  0      INFO   ===>>>  start processing event #1137156, run #204073 on slot 0,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  42  1      INFO   ===>>>  start processing event #1136377, run #204073 on slot 1,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  43  3      INFO   ===>>>  start processing event #1137842, run #204073 on slot 3,  40 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1134147, run #204073 on slot 2,  41 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137156, run #204073 on slot 0,  42 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  44  0      INFO   ===>>>  start processing event #1141705, run #204073 on slot 0,  42 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  45  2      INFO   ===>>>  start processing event #1143410, run #204073 on slot 2,  42 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136377, run #204073 on slot 1,  43 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137842, run #204073 on slot 3,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  46  1      INFO   ===>>>  start processing event #1144170, run #204073 on slot 1,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  47  3      INFO   ===>>>  start processing event #1145987, run #204073 on slot 3,  44 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141705, run #204073 on slot 0,  45 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143410, run #204073 on slot 2,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  48  0      INFO   ===>>>  start processing event #1145633, run #204073 on slot 0,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  49  2      INFO   ===>>>  start processing event #1135005, run #204073 on slot 2,  46 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144170, run #204073 on slot 1,  47 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145987, run #204073 on slot 3,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142531, run #204073 on slot 1,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  37  0      INFO   ===>>>  start processing event #1139958, run #204073 on slot 0,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  38  1      INFO   ===>>>  start processing event #1143765, run #204073 on slot 1,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  39  3      INFO   ===>>>  start processing event #1143097, run #204073 on slot 3,  36 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139475, run #204073 on slot 2,  37 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139958, run #204073 on slot 0,  38 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143765, run #204073 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  40  0      INFO   ===>>>  start processing event #1134147, run #204073 on slot 0,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  41  1      INFO   ===>>>  start processing event #1137156, run #204073 on slot 1,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  42  2      INFO   ===>>>  start processing event #1136377, run #204073 on slot 2,  39 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143097, run #204073 on slot 3,  40 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1134147, run #204073 on slot 0,  41 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137156, run #204073 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  43  0      INFO   ===>>>  start processing event #1137842, run #204073 on slot 0,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  44  1      INFO   ===>>>  start processing event #1141705, run #204073 on slot 1,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  45  3      INFO   ===>>>  start processing event #1143410, run #204073 on slot 3,  42 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136377, run #204073 on slot 2,  43 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137842, run #204073 on slot 0,  44 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1141705, run #204073 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  46  0      INFO   ===>>>  start processing event #1144170, run #204073 on slot 0,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  47  1      INFO   ===>>>  start processing event #1145987, run #204073 on slot 1,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  48  2      INFO   ===>>>  start processing event #1145633, run #204073 on slot 2,  45 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143410, run #204073 on slot 3,  46 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144170, run #204073 on slot 0,  47 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145987, run #204073 on slot 1,  48 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  49  0      INFO   ===>>>  start processing event #1135005, run #204073 on slot 0,  48 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  50  1      INFO   ===>>>  start processing event #1142167, run #204073 on slot 1,  48 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  51  3      INFO   ===>>>  start processing event #1144646, run #204073 on slot 3,  48 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145633, run #204073 on slot 0,  49 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1135005, run #204073 on slot 2,  50 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145633, run #204073 on slot 2,  49 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1135005, run #204073 on slot 0,  50 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142167, run #204073 on slot 1,  51 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  52  0      INFO   ===>>>  start processing event #1145027, run #204073 on slot 0,  51 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  53  1      INFO   ===>>>  start processing event #1144112, run #204073 on slot 1,  51 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  54  2      INFO   ===>>>  start processing event #1138485, run #204073 on slot 2,  51 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144646, run #204073 on slot 3,  52 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145027, run #204073 on slot 0,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  55  0      INFO   ===>>>  start processing event #1144565, run #204073 on slot 0,  53 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  56  3      INFO   ===>>>  start processing event #1139498, run #204073 on slot 3,  53 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144112, run #204073 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  55  0      INFO   ===>>>  start processing event #1144565, run #204073 on slot 0,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  56  1      INFO   ===>>>  start processing event #1139498, run #204073 on slot 1,  54 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  57  3      INFO   ===>>>  start processing event #1136546, run #204073 on slot 3,  54 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138485, run #204073 on slot 2,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  57  1      INFO   ===>>>  start processing event #1136546, run #204073 on slot 1,  55 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  58  2      INFO   ===>>>  start processing event #1143799, run #204073 on slot 2,  55 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144565, run #204073 on slot 0,  56 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139498, run #204073 on slot 3,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  59  0      INFO   ===>>>  start processing event #1142877, run #204073 on slot 0,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  60  3      INFO   ===>>>  start processing event #1149894, run #204073 on slot 3,  57 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136546, run #204073 on slot 1,  58 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143799, run #204073 on slot 2,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  61  1      INFO   ===>>>  start processing event #1145364, run #204073 on slot 1,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  62  2      INFO   ===>>>  start processing event #1143770, run #204073 on slot 2,  59 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142877, run #204073 on slot 0,  60 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149894, run #204073 on slot 3,  61 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145364, run #204073 on slot 1,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  63  0      INFO   ===>>>  start processing event #1148361, run #204073 on slot 0,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  64  1      INFO   ===>>>  start processing event #1148167, run #204073 on slot 1,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  65  3      INFO   ===>>>  start processing event #1138948, run #204073 on slot 3,  62 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143770, run #204073 on slot 2,  63 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148361, run #204073 on slot 0,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  66  0      INFO   ===>>>  start processing event #1144808, run #204073 on slot 0,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  67  2      INFO   ===>>>  start processing event #1145832, run #204073 on slot 2,  64 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148167, run #204073 on slot 1,  65 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138948, run #204073 on slot 3,  66 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144808, run #204073 on slot 0,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  68  0      INFO   ===>>>  start processing event #1153100, run #204073 on slot 0,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  69  1      INFO   ===>>>  start processing event #1142524, run #204073 on slot 1,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  70  3      INFO   ===>>>  start processing event #1138294, run #204073 on slot 3,  67 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145832, run #204073 on slot 2,  68 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153100, run #204073 on slot 0,  69 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142524, run #204073 on slot 1,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  71  0      INFO   ===>>>  start processing event #1138350, run #204073 on slot 0,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  72  1      INFO   ===>>>  start processing event #1149424, run #204073 on slot 1,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  73  2      INFO   ===>>>  start processing event #1151102, run #204073 on slot 2,  70 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138294, run #204073 on slot 3,  71 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138350, run #204073 on slot 0,  72 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149424, run #204073 on slot 1,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  74  0      INFO   ===>>>  start processing event #1152242, run #204073 on slot 0,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  75  1      INFO   ===>>>  start processing event #1148416, run #204073 on slot 1,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  76  3      INFO   ===>>>  start processing event #1142753, run #204073 on slot 3,  73 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151102, run #204073 on slot 2,  74 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152242, run #204073 on slot 0,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  77  0      INFO   ===>>>  start processing event #1149997, run #204073 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1139498, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  58  0      INFO   ===>>>  start processing event #1143799, run #204073 on slot 0,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  59  1      INFO   ===>>>  start processing event #1142877, run #204073 on slot 1,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  60  2      INFO   ===>>>  start processing event #1149894, run #204073 on slot 2,  57 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1136546, run #204073 on slot 3,  58 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143799, run #204073 on slot 0,  59 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142877, run #204073 on slot 1,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  61  0      INFO   ===>>>  start processing event #1145364, run #204073 on slot 0,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  62  1      INFO   ===>>>  start processing event #1143770, run #204073 on slot 1,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  63  3      INFO   ===>>>  start processing event #1148361, run #204073 on slot 3,  60 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149894, run #204073 on slot 2,  61 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145364, run #204073 on slot 0,  62 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1143770, run #204073 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  64  0      INFO   ===>>>  start processing event #1148167, run #204073 on slot 0,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  65  1      INFO   ===>>>  start processing event #1138948, run #204073 on slot 1,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  66  2      INFO   ===>>>  start processing event #1144808, run #204073 on slot 2,  63 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148361, run #204073 on slot 3,  64 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148167, run #204073 on slot 0,  65 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138948, run #204073 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  67  0      INFO   ===>>>  start processing event #1145832, run #204073 on slot 0,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  68  1      INFO   ===>>>  start processing event #1153100, run #204073 on slot 1,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  69  3      INFO   ===>>>  start processing event #1142524, run #204073 on slot 3,  66 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1144808, run #204073 on slot 2,  67 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145832, run #204073 on slot 0,  68 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153100, run #204073 on slot 1,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  70  0      INFO   ===>>>  start processing event #1138294, run #204073 on slot 0,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  71  1      INFO   ===>>>  start processing event #1138350, run #204073 on slot 1,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  72  2      INFO   ===>>>  start processing event #1149424, run #204073 on slot 2,  69 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142524, run #204073 on slot 3,  70 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138294, run #204073 on slot 0,  71 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1138350, run #204073 on slot 1,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  73  0      INFO   ===>>>  start processing event #1151102, run #204073 on slot 0,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  74  1      INFO   ===>>>  start processing event #1152242, run #204073 on slot 1,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  75  3      INFO   ===>>>  start processing event #1148416, run #204073 on slot 3,  72 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149424, run #204073 on slot 2,  73 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151102, run #204073 on slot 0,  74 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1152242, run #204073 on slot 1,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  76  0      INFO   ===>>>  start processing event #1142753, run #204073 on slot 0,  75 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  77  1      INFO   ===>>>  start processing event #1149997, run #204073 on slot 1,  75 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  78  2      INFO   ===>>>  start processing event #1151617, run #204073 on slot 2,  75 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148416, run #204073 on slot 1,  76 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142753, run #204073 on slot 3,  77 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149997, run #204073 on slot 0,  78 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148416, run #204073 on slot 3,  76 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1142753, run #204073 on slot 0,  77 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149997, run #204073 on slot 1,  78 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  79  0      INFO   ===>>>  start processing event #1149794, run #204073 on slot 0,  78 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  80  1      INFO   ===>>>  start processing event #1152504, run #204073 on slot 1,  78 events processed so far  <<<===
 AthenaHiveEventLoopMgr                  81  3      INFO   ===>>>  start processing event #1142485, run #204073 on slot 3,  78 events processed so far  <<<===
@@ -1273,21 +1273,21 @@ AthenaHiveEventLoopMgr                  92  1      INFO   ===>>>  start processi
 AthenaHiveEventLoopMgr                  93  3      INFO   ===>>>  start processing event #1156381, run #204073 on slot 3,  90 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1145882, run #204073 on slot 2,  91 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151732, run #204073 on slot 0,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  94  0      INFO   ===>>>  start processing event #1149161, run #204073 on slot 0,  92 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  95  2      INFO   ===>>>  start processing event #1153794, run #204073 on slot 2,  92 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1137896, run #204073 on slot 1,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  94  0      INFO   ===>>>  start processing event #1149161, run #204073 on slot 0,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  95  1      INFO   ===>>>  start processing event #1153794, run #204073 on slot 1,  93 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  96  2      INFO   ===>>>  start processing event #1151312, run #204073 on slot 2,  93 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156381, run #204073 on slot 3,  94 events processed so far  <<<===
 AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1149161, run #204073 on slot 0,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  96  0      INFO   ===>>>  start processing event #1151312, run #204073 on slot 0,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  97  1      INFO   ===>>>  start processing event #1148893, run #204073 on slot 1,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  98  3      INFO   ===>>>  start processing event #1156938, run #204073 on slot 3,  95 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153794, run #204073 on slot 2,  96 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151312, run #204073 on slot 0,  97 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148893, run #204073 on slot 1,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                  99  0      INFO   ===>>>  start processing event #1156351, run #204073 on slot 0,  98 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156938, run #204073 on slot 3,  99 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156351, run #204073 on slot 0,  100 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 10.414
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1153794, run #204073 on slot 1,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  97  0      INFO   ===>>>  start processing event #1148893, run #204073 on slot 0,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  98  1      INFO   ===>>>  start processing event #1156938, run #204073 on slot 1,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  99  3      INFO   ===>>>  start processing event #1156351, run #204073 on slot 3,  96 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1151312, run #204073 on slot 2,  97 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1148893, run #204073 on slot 0,  98 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156938, run #204073 on slot 1,  99 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1156351, run #204073 on slot 3,  100 events processed so far  <<<===
+AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 7.41376
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
 Domain[ROOT_All]                                   INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
 /cvmfs/atlas-condb.cern.ch/repo/condi...           INFO Database being retired...
@@ -1305,7 +1305,7 @@ AvalancheSchedulerSvc                              INFO Joining Scheduler thread
 PyComponentMgr                                     INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv                                  INFO in finalize
 EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     1.09 ))s
+IOVDbFolder                                        INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     1.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
@@ -1317,24 +1317,24 @@ IOVDbFolder                                        INFO Folder /TILE/OFL02/NOISE
 IOVDbFolder                                        INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
 IOVDbFolder                                        INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 0/0 objs/chan/bytes 0/277/0 ((     0.00 ))s
-IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.41 ))s
-IOVDbSvc                                           INFO  bytes in ((      1.50 ))s
+IOVDbFolder                                        INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.55 ))s
+IOVDbSvc                                           INFO  bytes in ((      1.55 ))s
 IOVDbSvc                                           INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.50 ))s
+IOVDbSvc                                           INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.55 ))s
 IOVDbSvc                                           INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 1 nFolders: 11 ReadTime: ((     0.00 ))s
 TileInfoLoader                                     INFO TileInfoLoader::finalize()
 AthDictLoaderSvc                                   INFO in finalize...
 ToolSvc                                            INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStreamMetadataTool                     INFO in finalize()
 ToolSvc.TileRawChannelContByteStreamTool           INFO Finalizing TileRawChannelContByteStreamTool successfuly
-ToolSvc.TileROD_Decoder.TileROD_L2Bui...           INFO Finalizing
+ToolSvc.TileROD_Decoder.TileL2Builder              INFO Finalizing
 *****Chrono*****                                   INFO ****************************************************************************************************
 *****Chrono*****                                   INFO WARNING: MT job; statistics are unreliable
 *****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****                                   INFO ****************************************************************************************************
-cObjR_ALL                                          INFO Time User   : Tot= 0.54  [s] Ave/Min/Max= 0.27(+- 0.26)/ 0.01/ 0.53  [s] #=  2
-cObj_ALL                                           INFO Time User   : Tot= 0.58  [s] Ave/Min/Max= 0.29(+- 0.26)/ 0.03/ 0.55  [s] #=  2
-ChronoStatSvc                                      INFO Time User   : Tot=   11  [s]                                             #=  1
+cObjR_ALL                                          INFO Time User   : Tot=  310 [ms] Ave/Min/Max=  155(+-  155)/    0/  310 [ms] #=  2
+cObj_ALL                                           INFO Time User   : Tot=  390 [ms] Ave/Min/Max=  195(+-  175)/   20/  370 [ms] #=  2
+ChronoStatSvc                                      INFO Time User   : Tot= 7.58  [s]                                             #=  1
 *****Chrono*****                                   INFO ****************************************************************************************************
 ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
 ApplicationMgr                                     INFO Application Manager Finalized successfully
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
index fdb831801497..fd42ec9e601a 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
@@ -13,17 +13,11 @@
 #include "TileIdentifier/TileTBFrag.h"
 #include "TileConditions/TileCablingService.h"
 #include "TileRecUtils/TileRawChannelBuilder.h"
-#include "TileL2Algs/TileL2Builder.h"
 
 // Atlas includes
 #include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h"
 #include "AthenaKernel/errorcheck.h"
 
-// Gaudi includes
-#include "GaudiKernel/ListItem.h"
-#include "GaudiKernel/ServiceHandle.h"
-
-
 #include <algorithm>
 #include <iomanip>
 #include <sstream>
@@ -56,7 +50,7 @@ TileROD_Decoder::TileROD_Decoder(const std::string& type, const std::string& nam
   
   declareProperty("TileCellEthresholdMeV", m_TileCellEthreshold = -100000.);
   declareProperty("TileDefaultChannelBuilder", m_TileDefaultChannelBuilder = "TileRawChannelBuilderFlatFilter/TileROD_RCBuilder");
-  declareProperty("TileDefaultL2Builder", m_TileDefaultL2Builder = "TileL2Builder/TileROD_L2Builder");
+
   declareProperty("VerboseOutput", m_verbose = false);
   declareProperty("calibrateEnergy", m_calibrateEnergy = true); // convert ADC counts to pCb for RawChannels
   declareProperty("suppressDummyFragments", m_suppressDummyFragments = false);
@@ -126,9 +120,6 @@ StatusCode TileROD_Decoder::initialize() {
   m_rc2bytes.setVerbose(m_verbose);
   m_d2Bytes.setVerbose(m_verbose);
   
-  ServiceHandle<IToolSvc> toolSvc("ToolSvc", this->name());
-  ATH_CHECK( toolSvc.retrieve() );
-  
   // retrieve TileHWID helper from det store
   ATH_CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
   
@@ -173,13 +164,10 @@ StatusCode TileROD_Decoder::initialize() {
   m_Rw2Pmt[2].reserve(m_maxChannels * TileCalibUtils::MAX_DRAWER);
   m_Rw2Pmt[3].reserve(m_maxChannels * TileCalibUtils::MAX_DRAWER);
   
-  if (m_TileDefaultL2Builder.size() > 0) {
-    ATH_MSG_DEBUG( "creating algtool " << m_TileDefaultL2Builder );
-    ListItem algL2(m_TileDefaultL2Builder);
-    ATH_CHECK( toolSvc->retrieveTool(algL2.type(), algL2.name(), m_L2Builder, this) );
-    ATH_MSG_DEBUG( "algtool " << m_TileDefaultL2Builder << " created " );
+  if (!m_L2Builder.empty()) {
+    ATH_CHECK( m_L2Builder.retrieve() );
   } else {
-    m_L2Builder = 0;
+    m_L2Builder.disable();
   }
   
   // Initialize
@@ -3009,7 +2997,7 @@ void TileROD_Decoder::fillCollectionL2(const ROBData * rob, TileL2Container & v)
     // return;
   }
   
-  if (DataType >= 3 && counter == 0 && m_L2Builder) {
+  if (DataType >= 3 && counter == 0 && !m_L2Builder.empty()) {
     if (m_L2Builder->process(fragmin, fragmax, &v).isFailure()) {
       ATH_MSG_ERROR( "Failure in " << m_L2Builder );
       return;
-- 
GitLab


From 997d22a67c515f018aed6f89184637f652450a52 Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Thu, 11 Apr 2019 17:29:16 -0700
Subject: [PATCH 020/129] The HEC and FCAL parts of the LArHV package migrated
 away from RCBase custom ref counting

Dropped HEC and FCAL ConstLink typedefs and the redundant FCALHVDescriptor class

Migrated following client packages to the new interface of HEC and FCAL components of LArHV:
  LArCalorimeter/LArGeoModel/LArReadoutGeometry
  LArCalorimeter/LArGeoModel/LArGeoAlgsNV
  LArCalorimeter/LArGeoModel/LArGeoH62004Algs
  LArCalorimeter/LArCondUtils
  LArCalorimeter/LArCafJobs
  LArCalorimeter/LArRecUtils
  LArCalorimeter/LArG4/LArG4FCAL
  LArCalorimeter/LArG4/LArG4HEC
  Calorimeter/CaloCondPhysAlgs
  graphics/VP1/VP1Systems/VP1CaloReadoutSystems
---
 .../src/CaloCellCalcEnergyCorr.cxx            |  18 +-
 .../LArCafJobs/src/LArNoiseBursts.cxx         |   8 +-
 .../LArCondUtils/src/LArHV2Ntuple.cxx         |  59 +++---
 .../LArCondUtils/src/LArHVPathologyDbAlg.cxx  |  30 ++-
 .../LArCondUtils/src/LArHVToolDB.cxx          |  12 +-
 .../LArG4FCAL/src/LArFCALCalculatorBase.cc    |  22 +-
 .../LArG4HEC/src/LArHECWheelCalculator.cc     |   6 +-
 .../LArGeoAlgsNV/src/LArDetectorFactory.cxx   |   4 +-
 .../LArGeoAlgsNV/src/LArDetectorTool.cxx      |   6 +-
 .../src/LArDetectorFactoryH62004.cxx          |   2 +-
 .../LArGeoModel/LArHV/LArHV/EMBHVDescriptor.h |  45 ++--
 .../LArHV/LArHV/EMECHVDescriptor.h            |  81 +++-----
 .../LArGeoModel/LArHV/LArHV/EMECHVElectrode.h |   3 +-
 .../LArGeoModel/LArHV/LArHV/EMECHVModule.h    |  10 +-
 .../LArHV/LArHV/FCALHVDescriptor.h            |  29 ---
 .../LArGeoModel/LArHV/LArHV/FCALHVLine.h      |  72 +++----
 .../LArHV/LArHV/FCALHVLineConstLink.h         |  10 -
 .../LArGeoModel/LArHV/LArHV/FCALHVManager.h   | 117 +++++------
 .../LArGeoModel/LArHV/LArHV/FCALHVModule.h    |  84 +++-----
 .../LArHV/LArHV/FCALHVModuleConstLink.h       |  10 -
 .../LArGeoModel/LArHV/LArHV/HECHVDescriptor.h |  45 ++--
 .../LArGeoModel/LArHV/LArHV/HECHVManager.h    | 104 +++++-----
 .../LArGeoModel/LArHV/LArHV/HECHVModule.h     |  89 ++++----
 .../LArHV/LArHV/HECHVModuleConstLink.h        |  10 -
 .../LArGeoModel/LArHV/LArHV/HECHVSubgap.h     |  74 +++----
 .../LArGeoModel/LArHV/LArHV/LArHVManager.h    |  16 +-
 .../LArGeoModel/LArHV/src/EMBHVDescriptor.cpp |  13 +-
 .../LArHV/src/EMECHVDescriptor.cpp            |  16 +-
 .../LArGeoModel/LArHV/src/EMECHVModule.cpp    |   8 +
 .../LArHV/src/FCALHVDescriptor.cpp            |  17 --
 .../LArGeoModel/LArHV/src/FCALHVLine.cpp      |  49 ++---
 .../LArGeoModel/LArHV/src/FCALHVManager.cpp   |  62 +++---
 .../LArGeoModel/LArHV/src/FCALHVModule.cpp    |  65 +++---
 .../LArGeoModel/LArHV/src/HECHVDescriptor.cpp |  16 +-
 .../LArGeoModel/LArHV/src/HECHVManager.cpp    |  69 ++++---
 .../LArGeoModel/LArHV/src/HECHVModule.cpp     |  60 +++---
 .../LArGeoModel/LArHV/src/HECHVSubgap.cpp     |  51 +++--
 .../LArGeoModel/LArHV/src/LArHVManager.cpp    |  20 +-
 .../LArReadoutGeometry/EMBDetectorManager.h   |   8 +-
 .../LArReadoutGeometry/EMECDetectorManager.h  |   8 +-
 .../LArReadoutGeometry/FCALDetectorManager.h  |  42 ++--
 .../LArReadoutGeometry/FCALTile.h             |  21 +-
 .../LArReadoutGeometry/FCALTube.h             |  20 +-
 .../LArReadoutGeometry/HECCell.h              |  34 ++-
 .../LArReadoutGeometry/HECDetectorManager.h   |  41 ++--
 .../src/FCALDetectorManager.cxx               |  19 +-
 .../LArReadoutGeometry/src/FCALTile.cxx       |  15 +-
 .../LArReadoutGeometry/src/FCALTube.cxx       |  16 +-
 .../LArReadoutGeometry/src/HECCell.cxx        |  18 +-
 .../src/HECDetectorManager.cxx                |  21 +-
 .../LArRecUtils/src/LArHVCondAlg.cxx          |  54 +++--
 .../src/LArHVPathologyDbCondAlg.cxx           |   6 +-
 .../src/VP1CaloReadoutSystem.cxx              | 194 +++++++++---------
 53 files changed, 835 insertions(+), 1094 deletions(-)
 delete mode 100644 LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVDescriptor.h
 delete mode 100644 LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLineConstLink.h
 delete mode 100644 LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModuleConstLink.h
 delete mode 100644 LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModuleConstLink.h
 delete mode 100644 LArCalorimeter/LArGeoModel/LArHV/src/FCALHVDescriptor.cpp

diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx
index 8d1333d61c39..9671307f6003 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx
@@ -24,10 +24,8 @@
 #include "LArHV/EMECPresamplerHVModuleConstLink.h"
 #include "LArHV/EMECPresamplerHVModule.h"
 #include "LArReadoutGeometry/HECCell.h"
-#include "LArHV/HECHVSubgapConstLink.h"
 #include "LArHV/HECHVSubgap.h"
 #include "LArReadoutGeometry/FCALTile.h"
-#include "LArHV/FCALHVLineConstLink.h"
 #include "LArHV/FCALHVLine.h"
 
 #include "LArHV/LArHVManager.h"
@@ -222,25 +220,17 @@ std::vector<int> CaloCellCalcEnergyCorr::GetHVLines(const Identifier& id) {
     const HECCellConstLink cell = hecElement->getHECCell();
     unsigned int nsubgaps = cell->getNumSubgaps();
     for (unsigned int igap=0;igap<nsubgaps;igap++) {
-      const HECHVSubgapConstLink subgap = cell->getSubgap(igap);
-      hv.insert(subgap->hvLineNo());
+      const HECHVSubgap& subgap = cell->getSubgap(igap);
+      hv.insert(subgap.hvLineNo());
     }
   } else if (m_larfcal_id->is_lar_fcal(id)) { // LAr FCAL
     const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(m_calodetdescrmgr->get_element(id));
     if (!fcalElement) std::abort();
     const FCALTile* tile = fcalElement->getFCALTile();
     unsigned int nlines = tile->getNumHVLines();
-    unsigned int nlines_found=0;
     for (unsigned int i=0;i<nlines;i++) {
-      const FCALHVLineConstLink line = tile->getHVLine(i);
-      if (line) nlines_found++;
-    }
-    if ( nlines_found>0 ) {
-      for (unsigned int i=0;i<nlines;i++) {
-        const FCALHVLineConstLink line = tile->getHVLine(i);
-        if (!line) continue;
-        hv.insert(line->hvLineNo());
-      }
+      const FCALHVLine* line = tile->getHVLine(i);
+      if(line) hv.insert(line->hvLineNo());
     }
   } else if (m_larem_id->is_lar_em(id) && m_larem_id->sampling(id)==0) { // Presamplers
     if (abs(m_larem_id->barrel_ec(id))==1) {
diff --git a/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx b/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx
index 5543fa3f8126..6d295483c3da 100644
--- a/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx
+++ b/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx
@@ -58,10 +58,8 @@
 #include "LArHV/EMECPresamplerHVModuleConstLink.h"
 #include "LArHV/EMECPresamplerHVModule.h"
 #include "LArReadoutGeometry/HECCell.h"
-#include "LArHV/HECHVSubgapConstLink.h"
 #include "LArHV/HECHVSubgap.h"
 #include "LArReadoutGeometry/FCALTile.h"
-#include "LArHV/FCALHVLineConstLink.h"
 #include "LArHV/FCALHVLine.h"
 #include "LArHV/LArHVManager.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
@@ -1411,8 +1409,8 @@ std::vector<int>* LArNoiseBursts::GetHVLines(const Identifier& id)
     const HECCellConstLink cell = hecElement->getHECCell();
     nsubgaps = cell->getNumSubgaps();
     for(i=0;i<nsubgaps;i++) {
-      const HECHVSubgapConstLink subgap = cell->getSubgap(i);
-      tmplines.push_back(subgap->hvLineNo());
+      const HECHVSubgap& subgap = cell->getSubgap(i);
+      tmplines.push_back(subgap.hvLineNo());
     }
   } else if(m_LArFCAL_IDHelper->is_lar_fcal(id)) { // LAr FCAL
     ATH_MSG_DEBUG ( "LAr HEC");
@@ -1422,7 +1420,7 @@ std::vector<int>* LArNoiseBursts::GetHVLines(const Identifier& id)
     const FCALTile* tile = fcalElement->getFCALTile();
     nlines = tile->getNumHVLines();
     for(i=0;i<nlines;i++) {
-      const FCALHVLineConstLink line = tile->getHVLine(i);
+      const FCALHVLine* line = tile->getHVLine(i);
       if(line) tmplines.push_back(line->hvLineNo());
     }   
   } else if(m_LArEM_IDHelper->is_lar_em(id) && m_LArEM_IDHelper->sampling(id)==0) { // Presamplers
diff --git a/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx b/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx
index 4d0f17dd88f8..c910c6274c31 100644
--- a/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx
@@ -15,7 +15,6 @@
 #include "LArHV/EMECHVElectrode.h"
 #include "LArHV/HECHVManager.h"
 #include "LArHV/HECHVModule.h"
-#include "LArHV/HECHVModuleConstLink.h"
 #include "LArHV/HECHVSubgap.h"
 #include "LArHV/FCALHVManager.h"
 #include "LArHV/EMBPresamplerHVManager.h"
@@ -324,14 +323,14 @@
       }
     }// EMEC Inner
 
-    const HECHVManager* hvManager_HEC=manager->getHECHVManager();
+    const HECHVManager& hvManager_HEC=manager->getHECHVManager();
     float etamax_layer[4]={3.3,3.1,3.1,3.3};
     float etamin_layer[4]={1.5,1.5,1.6,1.7};
 
     
-    for (unsigned int iSide=hvManager_HEC->beginSideIndex();iSide<hvManager_HEC->endSideIndex();iSide++) { // loop over HV modules      
-      for (unsigned int iPhi=hvManager_HEC->beginPhiIndex();iPhi<hvManager_HEC->endPhiIndex();iPhi++) {
-        for (unsigned int iSampling=hvManager_HEC->beginSamplingIndex();iSampling<hvManager_HEC->endSamplingIndex();iSampling++) {
+    for (unsigned int iSide=hvManager_HEC.beginSideIndex();iSide<hvManager_HEC.endSideIndex();iSide++) { // loop over HV modules      
+      for (unsigned int iPhi=hvManager_HEC.beginPhiIndex();iPhi<hvManager_HEC.endPhiIndex();iPhi++) {
+        for (unsigned int iSampling=hvManager_HEC.beginSamplingIndex();iSampling<hvManager_HEC.endSamplingIndex();iSampling++) {
           float eta_min,eta_max;
           if (iSide==1) {
            eta_min = etamin_layer[iSampling];
@@ -341,13 +340,13 @@
            eta_max = -1.*etamin_layer[iSampling];
          }
          float eta = 0.5*(eta_min+eta_max);
-         HECHVModuleConstLink hvMod = hvManager_HEC->getHVModule(iSide,iPhi,iSampling);
-         float phi = 0.5*(hvMod->getPhiMin()+hvMod->getPhiMax());
+         const HECHVModule& hvMod = hvManager_HEC.getHVModule(iSide,iPhi,iSampling);
+         float phi = 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
 
-         for (unsigned int iGap=0;iGap<hvMod->getNumSubgaps();iGap++) {//HEC : 4 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
-            HECHVSubgapConstLink subgap=hvMod->getSubgap(iGap);
-            float hv = subgap->voltage();
-            float current = subgap->current();
+         for (unsigned int iGap=0;iGap<hvMod.getNumSubgaps();iGap++) {//HEC : 4 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
+            const HECHVSubgap& subgap=hvMod.getSubgap(iGap);
+            float hv = subgap.voltage();
+            float current = subgap.current();
             m_bec = 10+iSampling;
             m_isPresampler=0;
             m_eta=eta;
@@ -356,7 +355,7 @@
             m_gap = iGap;
             m_hv=hv;
             m_current=current;
-            m_hvline = subgap->hvLineNo();
+            m_hvline = subgap.hvLineNo();
             if(m_addcells) {
                   for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
                      m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
@@ -372,16 +371,16 @@
      }
    }//HECHVManager 
 
-   const FCALHVManager *hvManager_FCAL=manager->getFCALHVManager();
-   for (unsigned int iSide=hvManager_FCAL->beginSideIndex();iSide<hvManager_FCAL->endSideIndex();iSide++) { // loop over HV modules
+   const FCALHVManager& hvManager_FCAL=manager->getFCALHVManager();
+   for (unsigned int iSide=hvManager_FCAL.beginSideIndex();iSide<hvManager_FCAL.endSideIndex();iSide++) { // loop over HV modules
        float eta_min=3.1,eta_max=4.9;
        if (iSide==0) { eta_min=-4.9; eta_max=-3.1; }
 
        float eta = 0.5*(eta_min+eta_max);
-       for (unsigned int iSampling=hvManager_FCAL->beginSamplingIndex();iSampling<hvManager_FCAL->endSamplingIndex();iSampling++) {
-            for (unsigned int iSector=hvManager_FCAL->beginSectorIndex(iSampling);iSector<hvManager_FCAL->endSectorIndex(iSampling);iSector++) {
+       for (unsigned int iSampling=hvManager_FCAL.beginSamplingIndex();iSampling<hvManager_FCAL.endSamplingIndex();iSampling++) {
+            for (unsigned int iSector=hvManager_FCAL.beginSectorIndex(iSampling);iSector<hvManager_FCAL.endSectorIndex(iSampling);iSector++) {
  
-                 FCALHVModuleConstLink hvMod = hvManager_FCAL->getHVModule(iSide,iSector,iSampling);
+                 const FCALHVModule& hvMod = hvManager_FCAL.getHVModule(iSide,iSector,iSampling);
                  //std::cout << " FCAL HVModule side,sampling,sector " << iSide << " " << iSampling << " " << iSector << std::endl;
                  //std::cout << "   HV nominal " << HVnominal << std::endl;
   
@@ -393,10 +392,10 @@
                  float phi_max = CaloPhiRange::fix(dphi+phi_min);
                  float phi = 0.5*(phi_min+phi_max);
          
-                 for (unsigned int iLine=0;iLine<hvMod->getNumHVLines();iLine++) {
-                     FCALHVLineConstLink hvline = hvMod->getHVLine(iLine);
-                     float hv = hvline->voltage();
-                     float current = hvline->current();
+                 for (unsigned int iLine=0;iLine<hvMod.getNumHVLines();iLine++) {
+                     const FCALHVLine& hvline = hvMod.getHVLine(iLine);
+                     float hv = hvline.voltage();
+                     float current = hvline.current();
                      m_bec = 14+iSampling;
                      m_isPresampler=0;
                      m_eta=eta;
@@ -405,7 +404,7 @@
                      m_gap = iLine;
                      m_hv=hv;
                      m_current=current;
-                     m_hvline = hvline->hvLineNo();
+                     m_hvline = hvline.hvLineNo();
                      if(m_addcells) {
                        for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
                          m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
@@ -457,25 +456,17 @@ std::vector<int> LArHV2Ntuple::GetHVLines(const Identifier& id) {
      const HECCellConstLink cell = hecElement->getHECCell();
      unsigned int nsubgaps = cell->getNumSubgaps();
      for (unsigned int igap=0;igap<nsubgaps;igap++) {
-       const HECHVSubgapConstLink subgap = cell->getSubgap(igap);
-       hv.insert(subgap->hvLineNo());
+       const HECHVSubgap& subgap = cell->getSubgap(igap);
+       hv.insert(subgap.hvLineNo());
      }
    } else if (m_caloId->is_fcal(id)) { // LAr FCAL
      const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(m_calodetdescrmgr->get_element(id));
      if (!fcalElement) std::abort();
      const FCALTile* tile = fcalElement->getFCALTile();
      unsigned int nlines = tile->getNumHVLines();
-     unsigned int nlines_found=0;
      for (unsigned int i=0;i<nlines;i++) {
-       const FCALHVLineConstLink line = tile->getHVLine(i);
-       if (line) nlines_found++;
-     }
-     if ( nlines_found>0 ) {
-       for (unsigned int i=0;i<nlines;i++) {
-         const FCALHVLineConstLink line = tile->getHVLine(i);
-         if (!line) continue;
-         hv.insert(line->hvLineNo());
-       }
+       const FCALHVLine* line = tile->getHVLine(i);
+       if (line) hv.insert(line->hvLineNo());
      }
    } else if (m_caloId->is_em(id) && m_caloId->sampling(id)==0) { // Presamplers
      if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
diff --git a/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx b/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx
index e5543f6088e7..8b6acfa012f2 100644
--- a/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx
@@ -26,10 +26,8 @@
 #include "LArHV/EMECPresamplerHVModuleConstLink.h"
 #include "LArHV/EMECPresamplerHVModule.h"
 #include "LArReadoutGeometry/HECCell.h"
-#include "LArHV/HECHVSubgapConstLink.h"
 #include "LArHV/HECHVSubgap.h"
 #include "LArReadoutGeometry/FCALTile.h"
-#include "LArHV/FCALHVLineConstLink.h"
 #include "LArHV/FCALHVLine.h"
 
 #include <fstream>
@@ -413,8 +411,8 @@ std::vector<unsigned int> LArHVPathologyDbAlg::getElectInd(const Identifier & id
       const HECCellConstLink cell = hecElement->getHECCell();
       unsigned int nsubgaps = cell->getNumSubgaps();
       for (unsigned int i=0;i<nsubgaps;i++) {
-          const HECHVSubgapConstLink subgap = cell->getSubgap(i);
-          if (subgap->hvLineNo()==HVline) {
+          const HECHVSubgap& subgap = cell->getSubgap(i);
+          if (subgap.hvLineNo()==HVline) {
             list.push_back(i);
           }
       }
@@ -426,12 +424,12 @@ std::vector<unsigned int> LArHVPathologyDbAlg::getElectInd(const Identifier & id
        const FCALTile* tile = fcalElement->getFCALTile();
        unsigned int nlines = tile->getNumHVLines();
        for (unsigned int i=0;i<nlines;i++) {
-         const FCALHVLineConstLink line2 = tile->getHVLine(i);
-         if (line2) {
-            if (line2->hvLineNo()==HVline) {
-               list.push_back(i);
-            }
-         }
+         const FCALHVLine* line2 = tile->getHVLine(i);
+	 if(line2) {
+	   if (line2->hvLineNo()==HVline) {
+	     list.push_back(i);
+	   }
+	 }
        }
     }
   }
@@ -512,7 +510,7 @@ int LArHVPathologyDbAlg::getHVline(const Identifier & id, short unsigned int Ele
          msg(MSG::ERROR) << "Wrong igap "<<ElectInd<<" for HEC cell "<<id.get_identifier32().get_compact() <<endmsg;
          return -1;
       } else {
-         return cell->getSubgap(ElectInd)->hvLineNo();
+         return cell->getSubgap(ElectInd).hvLineNo();
       }
     }
   }
@@ -525,13 +523,13 @@ int LArHVPathologyDbAlg::getHVline(const Identifier & id, short unsigned int Ele
          msg(MSG::ERROR) << "Wrong line "<<ElectInd<<" for FCAL cell "<<id.get_identifier32().get_compact() <<endmsg;
          return -1;
       } else {
-         const FCALHVLineConstLink line2 = tile->getHVLine(ElectInd);
+         const FCALHVLine* line2 = tile->getHVLine(ElectInd);
          if(line2) {
-            return line2->hvLineNo();
+	   return line2->hvLineNo();
          } else {
-            msg(MSG::ERROR) << "Do not have HVLine for "<<ElectInd<<" for FCAL cell "<<id.get_identifier32().get_compact() <<endmsg;
-            return -1;
-         }
+	   msg(MSG::ERROR) << "Do not have HVLine for "<<ElectInd<<" for FCAL cell "<<id.get_identifier32().get_compact() <<endmsg;
+	   return -1;
+	 }
       }
     }
   }
diff --git a/LArCalorimeter/LArCondUtils/src/LArHVToolDB.cxx b/LArCalorimeter/LArCondUtils/src/LArHVToolDB.cxx
index 3cee45a22b43..dc7c04d45477 100755
--- a/LArCalorimeter/LArCondUtils/src/LArHVToolDB.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArHVToolDB.cxx
@@ -22,10 +22,8 @@
 #include "LArHV/EMECPresamplerHVModuleConstLink.h"
 #include "LArHV/EMECPresamplerHVModule.h"
 #include "LArReadoutGeometry/HECCell.h"
-#include "LArHV/HECHVSubgapConstLink.h"
 #include "LArHV/HECHVSubgap.h"
 #include "LArReadoutGeometry/FCALTile.h"
-#include "LArHV/FCALHVLineConstLink.h"
 #include "LArHV/FCALHVLine.h"
 
 #include "LArHV/LArHVManager.h"
@@ -412,10 +410,10 @@ StatusCode LArHVToolDB::getPayload(const Identifier& id, std::vector< HV_t > & v
       double wt = 1./nsubgaps;
       //std::cout << " nsubgaps " << nsubgaps << std::endl;
       for (unsigned int i=0;i<nsubgaps;i++) {
-          const HECHVSubgapConstLink subgap = cell->getSubgap(i);
+          const HECHVSubgap& subgap = cell->getSubgap(i);
           double hv;
           double curr;
-          subgap->voltage_current(hv,curr);
+          subgap.voltage_current(hv,curr);
           //std::cout << "     hv value " << hv << std::endl;
           if (hasPathology) {
              msg(MSG::DEBUG) << "Has pathology for id: "<< m_larhec_id->print_to_string(id)<<" "<<m_hasPathologyHEC[index]<<endmsg;
@@ -452,15 +450,15 @@ StatusCode LArHVToolDB::getPayload(const Identifier& id, std::vector< HV_t > & v
       unsigned int nlines = tile->getNumHVLines();
       unsigned int nlines_found=0;
       for (unsigned int i=0;i<nlines;i++) {
-        const FCALHVLineConstLink line = tile->getHVLine(i);
+        const FCALHVLine* line = tile->getHVLine(i);
         if (line) nlines_found++;
       }
       //std::cout << " nlines " << nlines << " " << nlines_found << std::endl;
       if (nlines_found>0) {
         double wt = 1./nlines_found;
         for (unsigned int i=0;i<nlines;i++) {
-          const FCALHVLineConstLink line = tile->getHVLine(i);
-          if (!line) continue;
+	  const FCALHVLine* line = tile->getHVLine(i);
+	  if (!line) continue;
           //std::cout << " line " << line;
           double hv;
           double curr;
diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc
index 96ad84a9eb9d..cbcc743f6e6d 100644
--- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc
+++ b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------------
@@ -13,7 +13,7 @@
 #include "LArG4Code/LArG4Identifier.h"
 #include "LArG4Code/LArG4BirksLaw.h"
 #include "StoreGate/StoreGate.h"
-//#include "LArG4RunControl/LArG4FCALOptions.h"
+
 // Geant4 includes
 #include "G4LogicalVolume.hh"
 #include "G4VPhysicalVolume.hh"
@@ -135,16 +135,14 @@ G4bool LArFCALCalculatorBase::Process(const G4Step* a_step, std::vector<LArHitDa
       for (unsigned int i=0;i<tile->getNumTubes();i++) {
         FCALTubeConstLink tube=tile->getTube(i);
         if (tube->getXLocal() == (*t).second.x() && tube->getYLocal()==(*t).second.y()) {
-          FCALHVLineConstLink line =tube->getHVLine();
-          if (line) {
-            double voltage = line->voltage();
-            //double current = line->current();
-            bool   hvOn    = line->hvOn();
-            if (!hvOn) hdata[0].energy=0.0;
-            hdata[0].energy *= pow((voltage)/2000.0,0.6);
-            tubeFound=true;
-            break;
-          }
+          const FCALHVLine& line =tube->getHVLine();
+	  double voltage = line.voltage();
+	  //double current = line->current();
+	  bool   hvOn    = line.hvOn();
+	  if (!hvOn) hdata[0].energy=0.0;
+	  hdata[0].energy *= pow((voltage)/2000.0,0.6);
+	  tubeFound=true;
+	  break;
         }
       }
       if (!tubeFound)   throw std::runtime_error("FCAL Tube not found (for HV calculation)");
diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc
index bbf69bf9ce9b..c2fb8fd1b635 100644
--- a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc
+++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHECWheelCalculator.h"
@@ -111,8 +111,8 @@ G4bool LArHECWheelCalculator::Process(const G4Step* a_step, std::vector<LArHitDa
   if (m_DetectorManager) {
     const HECDetectorRegion *hecRegion=m_DetectorManager->getDetectorRegion(zSide<0? 0: 1, sampling, region);
     HECCellConstLink cell=hecRegion->getHECCell(eta, phi);
-    HECHVSubgapConstLink subgap = cell->getSubgap(subgapIndex);
-    hdata[0].energy *= (pow(subgap->voltage()/1800.0,0.6));
+    const HECHVSubgap& subgap = cell->getSubgap(subgapIndex);
+    hdata[0].energy *= (pow(subgap.voltage()/1800.0,0.6));
   }
 
   return true;
diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx
index 6fec31f3d091..c09787ba0dd0 100755
--- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx
+++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx
@@ -337,7 +337,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container )
   
   try
   {
-    fcalDetectorManager = new FCALDetectorManager();
+    fcalDetectorManager = new FCALDetectorManager(&(m_hvManager->getFCALHVManager()));
     std::string fcalModName[2][3]={{"FCAL1_NEG","FCAL2_NEG","FCAL3_NEG"},
 				   {"FCAL1_POS","FCAL2_POS","FCAL3_POS"}};
     for (int e=0;e<2;e++) {
@@ -360,7 +360,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container )
 
   try
   {
-    hecDetectorManager = new  HECDetectorManager();
+    hecDetectorManager = new  HECDetectorManager(&(m_hvManager->getHECHVManager()));
     for (unsigned int s=0;s<4;s++) {
       for (unsigned int r=0;r<2;r++) {
 	unsigned int nPhi    = r==0? 2:1;
diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx
index 1691106ea92a..cce45b888b2b 100755
--- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx
+++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx
@@ -28,8 +28,6 @@
 #include "GeoModelUtilities/StoredPhysVol.h"
 #include "GeoModelKernel/GeoFullPhysVol.h"
 #include "LArHV/LArHVManager.h"
-#include "LArHV/HECHVManager.h"
-#include "LArHV/FCALHVManager.h"
 #include "LArHV/EMBPresamplerHVManager.h"
 #include "LArHV/EMECPresamplerHVManager.h"
 
@@ -72,12 +70,10 @@ LArDetectorToolNV::~LArDetectorToolNV()
 StatusCode LArDetectorToolNV::create()
 { 
   // Initialize the HV System:
-  const HECHVManager *hecHV   = new HECHVManager();
-  const FCALHVManager *fcalHV= new FCALHVManager();
   const EMBPresamplerHVManager *embPSHV = new EMBPresamplerHVManager();
   const EMECPresamplerHVManager *emecPSHV = new EMECPresamplerHVManager();
 
-  LArHVManager *hvManager= new LArHVManager(hecHV, fcalHV,embPSHV, emecPSHV);
+  LArHVManager *hvManager= new LArHVManager(embPSHV, emecPSHV);
 
   ATH_CHECK(detStore()->record(hvManager,"LArHVManager"));  
 
diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx
index 739009b695bd..a8956ab62e7d 100755
--- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx
+++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx
@@ -319,7 +319,7 @@ void LArGeo::LArDetectorFactoryH62004::create(GeoPhysVol *world)
      StoredPhysVol *vol;
      if (StatusCode::SUCCESS==m_detectorStore->retrieve(vol,"HEC_POS")) {
         try {
-           hecDetManager = new  HECDetectorManager(true);
+           hecDetManager = new  HECDetectorManager(nullptr,true);
            for (unsigned int s=0;s<3;s++) {
             for (unsigned int r=0;r<2;r++) {
 	     unsigned int nPhi    = r==0? 2:1;
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMBHVDescriptor.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMBHVDescriptor.h
index ea9b43bbd95d..73261f355f48 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMBHVDescriptor.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMBHVDescriptor.h
@@ -1,49 +1,34 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef EMBHVDESCRIPTOR_H_HEADER_INCLUDED_F36D906D
-#define EMBHVDESCRIPTOR_H_HEADER_INCLUDED_F36D906D
+#ifndef LARHV_EMBHVDESCRIPTOR_H
+#define LARHV_EMBHVDESCRIPTOR_H
 
 #include "GeoModelKernel/CellBinning.h"
 
-//##ModelId=475308BA007D
 class EMBHVDescriptor
 {
-  public:
-    // Constructor
-    //##ModelId=4755BF39021B
+ public:
   EMBHVDescriptor(const CellBinning &etaBinning, const CellBinning &phiBinning);
-  
-  //##ModelId=4755BF390264
-  virtual ~EMBHVDescriptor();
-  //##ModelId=47564B2A030D
+  ~EMBHVDescriptor();
+
   const CellBinning &getEtaBinning() const
-    {
-      return m_etaBinning;
-    }
+  {
+    return m_etaBinning;
+  }
   
-  
-  //##ModelId=47564B5C0224
   const CellBinning &getPhiBinning() const
-    {
-      return m_phiBinning;
-    }
+  {
+    return m_phiBinning;
+  }
   
  private:
-  //##ModelId=4755BF39022A
   EMBHVDescriptor(const EMBHVDescriptor& right);
-  
-  //##ModelId=4755BF390280
   EMBHVDescriptor& operator=(const EMBHVDescriptor& right);
-    //##ModelId=47A3AC8F01E0
-    const CellBinning m_etaBinning;
-  
-    //##ModelId=47A3AC8F01F1
-    const CellBinning m_phiBinning;
 
+  const CellBinning m_etaBinning;
+  const CellBinning m_phiBinning;
 };
 
-
-
-#endif /* EMBHVDESCRIPTOR_H_HEADER_INCLUDED_F36D906D */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVDescriptor.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVDescriptor.h
index 6a4b5535498c..8bed8f069ce8 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVDescriptor.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVDescriptor.h
@@ -1,59 +1,40 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef EMECHVDESCRIPTOR_H_HEADER_INCLUDED_A53E30B4
-#define EMECHVDESCRIPTOR_H_HEADER_INCLUDED_A53E30B4
+#ifndef LARHV_EMECHVDESCRIPTOR_H
+#define LARHV_EMECHVDESCRIPTOR_H
 #include "GeoModelKernel/CellBinning.h"
 #include "GeoModelKernel/CellPartitioning.h"
-//##ModelId=478D135F006C
+
 class EMECHVDescriptor
 {
-  public:
-    //##ModelId=478D138C01BE
-    virtual ~EMECHVDescriptor();
-
-    //##ModelId=478D138C01CA
-    const CellPartitioning &getEtaBinning() const
-    {
-      return m_etaBinning;
-    }
-
-    //##ModelId=478D138C01D5
-    const CellBinning &getPhiBinning() const
-    {
-      return m_phiBinning;
-    }
-
-    // Constructor
-    //##ModelId=478D138C0214
-    EMECHVDescriptor(const CellPartitioning &etaBinning, const CellBinning &phiBinning, const CellBinning &sectorBinning);
-
-    //##ModelId=43FC51F00276
-    const CellBinning &getSectorBinning() const
-    {
-      return m_sectorBinning;
-    }
-
-
-  private:
-
-    //##ModelId=478D138C01DF
-    EMECHVDescriptor(const EMECHVDescriptor& right);
-
-    //##ModelId=478D138C01F4
-    EMECHVDescriptor& operator=(const EMECHVDescriptor& right);
-    //##ModelId=478D5F730160
-    const CellPartitioning m_etaBinning;
-    //##ModelId=478D5FC5018F
-    const CellBinning m_phiBinning;
-    //##ModelId=43FBFE39000C
-    const CellBinning m_sectorBinning;
-
-
-
+ public:
+  EMECHVDescriptor(const CellPartitioning &etaBinning, const CellBinning &phiBinning, const CellBinning &sectorBinning);
+  ~EMECHVDescriptor();
+
+  const CellPartitioning &getEtaBinning() const
+  {
+    return m_etaBinning;
+  }
+  
+  const CellBinning &getPhiBinning() const
+  {
+    return m_phiBinning;
+  }
+
+  const CellBinning &getSectorBinning() const
+  {
+    return m_sectorBinning;
+  }
+
+ private:
+  EMECHVDescriptor(const EMECHVDescriptor& right);
+  EMECHVDescriptor& operator=(const EMECHVDescriptor& right);
+
+  const CellPartitioning m_etaBinning;
+  const CellBinning m_phiBinning;
+  const CellBinning m_sectorBinning;
 };
 
-
-
-#endif /* EMECHVDESCRIPTOR_H_HEADER_INCLUDED_A53E30B4 */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVElectrode.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVElectrode.h
index c8812a4b2523..a0b6846aedcc 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVElectrode.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVElectrode.h
@@ -12,6 +12,7 @@ class EMECHVElectrode
  public:
   // The ownership of the EMBHVModule pointer NOT transferred to EMECHVElectrode
   EMECHVElectrode(const EMECHVModule* module, unsigned int iElectrode);
+  ~EMECHVElectrode();
 
   unsigned int getElectrodeIndex() const;
 
@@ -36,8 +37,6 @@ class EMECHVElectrode
   int hvLineNo(int iGap) const;
 
  private:
-  ~EMECHVElectrode();
-
   EMECHVElectrode(const EMECHVElectrode& right);
   EMECHVElectrode& operator=(const EMECHVElectrode& right);
 
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVModule.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVModule.h
index 143de691339c..3a62f8032a5f 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVModule.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/EMECHVModule.h
@@ -54,11 +54,11 @@ class EMECHVModule
   const EMECHVManager& getManager() const;
   
  private:
-    EMECHVModule(const EMECHVModule& right);
-    EMECHVModule& operator=(const EMECHVModule& right);
-
-    class Clockwork;
-    Clockwork *m_c;
+  EMECHVModule(const EMECHVModule& right);
+  EMECHVModule& operator=(const EMECHVModule& right);
+  
+  class Clockwork;
+  Clockwork *m_c;
 };
 
 #endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVDescriptor.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVDescriptor.h
deleted file mode 100644
index 28ec9a057045..000000000000
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVDescriptor.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FCALHVDESCRIPTOR_H_HEADER_INCLUDED_88E96F3D
-#define FCALHVDESCRIPTOR_H_HEADER_INCLUDED_88E96F3D
-
-//##ModelId=47ABB04701F9
-class FCALHVDescriptor
-{
-  public:
-    //##ModelId=47ABB0820151
-    FCALHVDescriptor();
-
-    //##ModelId=47ABB08201A7
-    virtual ~FCALHVDescriptor();
-
-  private:
-    //##ModelId=47ABB0820163
-    FCALHVDescriptor(const FCALHVDescriptor& right);
-
-    //##ModelId=47ABB08201C7
-    FCALHVDescriptor& operator=(const FCALHVDescriptor& right);
-
-};
-
-
-
-#endif /* FCALHVDESCRIPTOR_H_HEADER_INCLUDED_88E96F3D */
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLine.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLine.h
index 5fa914a5add3..a60142c92dd8 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLine.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLine.h
@@ -1,65 +1,39 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef FCALHVLINE_H_HEADER_INCLUDED_B7B4E2E0
-#define FCALHVLINE_H_HEADER_INCLUDED_B7B4E2E0
-#include "GeoModelKernel/RCBase.h"
-#include "LArHV/FCALHVModuleConstLink.h"
+#ifndef LARHV_FCALHVLINE_H
+#define LARHV_FCALHVLINE_H
 
 class FCALHVModule;
 
-
-//  
-//##ModelId=47ABB4D9030F
-class FCALHVLine : public RCBase
+class FCALHVLine
 {
-  public:
-    // Constructor
-    //##ModelId=47ABB4D90312
-    FCALHVLine(FCALHVModuleConstLink module, unsigned int iLine);
-
-    // returns a pointer to the module that owns this electrode.
-    //##ModelId=47ABB4D90315
-    FCALHVModuleConstLink getModule() const;
-
-    // Returns the index of this electrode.
-    //##ModelId=47ABB4D90317
-    unsigned int getLineIndex() const;
-
-    // HV Status
-    bool hvOn() const;
-    
-    // Voltage
-    double voltage() const;
+ public:
+  FCALHVLine(const FCALHVModule* module, unsigned int iLine);
+  ~FCALHVLine();
 
-    // Current
-    double current() const;
+  // returns a pointer to the module that owns this electrode.
+  const FCALHVModule& getModule() const;
 
-    // Voltage and current at the same time:
-    void voltage_current(double& v, double& i) const;
+  unsigned int getLineIndex() const;
 
-    // HVLine no
-    int hvLineNo() const;
+  bool hvOn() const;
+  double voltage() const;
+  double current() const;
 
-  private:
-    // Destructor
-    //##ModelId=47ABB4D9031B
-    virtual ~FCALHVLine();
+  // Voltage and current at the same time:
+  void voltage_current(double& v, double& i) const;
 
-    // Illegal operation
-    //##ModelId=47ABB4D9031D
-    FCALHVLine(const FCALHVLine& right);
+  // HVLine no
+  int hvLineNo() const;
 
-    // Illegal operation
-    //##ModelId=47ABB4D9031F
-    FCALHVLine& operator=(const FCALHVLine& right);
-
-    class Clockwork;
-    Clockwork *m_c;
+ private: 
+  FCALHVLine(const FCALHVLine& right);
+  FCALHVLine& operator=(const FCALHVLine& right);
 
+  class Clockwork;
+  Clockwork *m_c;
 };
 
-
-
-#endif /* FCALHVLINE_H_HEADER_INCLUDED_B7B4E2E0 */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLineConstLink.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLineConstLink.h
deleted file mode 100644
index 527c56dbc228..000000000000
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVLineConstLink.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef _FCALHVLineConstLink_h_
-#define _FCALHVLineConstLink_h_
-#include "GeoModelKernel/ConstLink.h"
-class FCALHVLine;
-typedef ConstLink<FCALHVLine> FCALHVLineConstLink;
-#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVManager.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVManager.h
index d41ed878339c..a76fabeb5e2a 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVManager.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVManager.h
@@ -1,74 +1,63 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef FCALHVMANAGER_H_HEADER_INCLUDED_AC244FA8
-#define FCALHVMANAGER_H_HEADER_INCLUDED_AC244FA8
+#ifndef LARHV_FCALHVMANAGER_H
+#define LARHV_FCALHVMANAGER_H
 
-#include "GeoModelKernel/RCBase.h"
-#include "FCALHVModule.h"
-typedef ConstLink<FCALHVModule> FCALHVModuleConstLink;
-class FCALHVDescriptor;
+#include "LArHV/FCALHVModule.h"
 
 struct FCALHVPayload;
 
-//##ModelId=475307C201C5
-class FCALHVManager : public RCBase
+/**
+ * @class FCALHVManager
+ *
+ * @brief  This class provides direct access to information on the HV
+ * electrodes within the barrels.  The information may be accessed either
+ * directly or iteratively.  Direct access is provided by the getHVModule()
+ * method.  Iterative access
+ * is by looping over valid side, eta, phi, and sector indices to
+ * retrieve a HV module.  From the high voltage modules one
+ * can obtain a list of electrodes (iteratively or directly).
+ *
+ * The manager owns the pointers to the HV Modules.
+ */
+
+class FCALHVManager
 {
-  public:
-    //##ModelId=47ABAE9302D3
-    FCALHVManager();
-
-    //##ModelId=47ABAE930373
-    virtual ~FCALHVManager();
-
-    //##ModelId=47ABAF5E0079
-    const FCALHVDescriptor *getDescriptor() const;
-
-    // Begin side index (0=negative and 1= positive)
-    //##ModelId=47ABAF5E0092
-    unsigned int beginSideIndex() const;
-
-    // End side index (0=negative and 1= positive)
-    //##ModelId=47ABAF5E009F
-    unsigned int endSideIndex() const;
-
-    //##ModelId=47ABAF5E00AD
-    unsigned int beginSectorIndex(unsigned int iSampling) const;
-
-    //##ModelId=47ABAF5E00BB
-    unsigned int endSectorIndex(unsigned int iSampling) const;
-
-    //##ModelId=47ABAF5E00C9
-    unsigned int beginSamplingIndex() const;
-
-    //##ModelId=47ABAF5E00D9
-    unsigned int endSamplingIndex() const;
-
-    //##ModelId=47ABAF5E00E8
-    FCALHVModuleConstLink getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const;
-
-    // Refresh from the database if needed
-    void update() const;
-
-    // Make the data stale.  Force update of data.
-    void reset() const;
-
-    // Get the database payload
-    FCALHVPayload *getPayload(const FCALHVLine &) const;
-
-
-  private:
-    //##ModelId=47ABAE93032E
-    FCALHVManager(const FCALHVManager& right);
-
-    //##ModelId=47ABAE930392
-    FCALHVManager& operator=(const FCALHVManager& right);
-
-    class Clockwork;
-    Clockwork *m_c;
+ public:
+  FCALHVManager();
+  ~FCALHVManager();
+
+  // Begin/End side index (0=negative and 1= positive)
+  unsigned int beginSideIndex() const;
+  unsigned int endSideIndex() const;
+
+  unsigned int beginSectorIndex(unsigned int iSampling) const;
+  unsigned int endSectorIndex(unsigned int iSampling) const;
+
+  unsigned int beginSamplingIndex() const;
+  unsigned int endSamplingIndex() const;
+
+  const FCALHVModule& getHVModule(unsigned int iSide
+				  , unsigned int iSector
+				  , unsigned int iSampling) const;
+
+  // Refresh from the database if needed
+  void update() const;
+  
+  // Make the data stale.  Force update of data.
+  void reset() const;
+  
+  // Get the database payload
+  FCALHVPayload *getPayload(const FCALHVLine &) const;
+
+ private:
+  FCALHVManager(const FCALHVManager& right);
+  FCALHVManager& operator=(const FCALHVManager& right);
+
+  class Clockwork;
+  Clockwork *m_c;
 };
 
-
-
-#endif /* FCALHVMANAGER_H_HEADER_INCLUDED_AC244FA8 */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModule.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModule.h
index 82d571889dfe..efe2f10e8d4f 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModule.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModule.h
@@ -1,64 +1,48 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef FCALHVMODULE_H_HEADER_INCLUDED_B6E380D9
-#define FCALHVMODULE_H_HEADER_INCLUDED_B6E380D9
-class HECHVModule;
-class HECHVManager;
-class FCALHVManager;
-#include "GeoModelKernel/ConstLink.h"
-#include "GeoModelKernel/RCBase.h"
-#include "LArHV/FCALHVLineConstLink.h"
-
-//##ModelId=47ABB2AD00A4
-class FCALHVModule : public RCBase
-{
-  public:
-    //##ModelId=47ABB2AD00A9
-    FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling);
-
-    // Side Index (0=Negative, 1=Positive)
-    //##ModelId=47ABB2AD00B2
-    unsigned int getSideIndex() const;
-
-    // Get eta Index
-    //##ModelId=47ABB2AD00B4
-    unsigned int getSamplingIndex() const;
+#ifndef LARHV_FCALHVMODULE_H
+#define LARHV_FCALHVMODULE_H
 
-    // Get sector index
-    //##ModelId=47ABB2AD00B6
-    unsigned int getSectorIndex() const;
+class FCALHVManager;
+class FCALHVLine;
 
-    // Get num electrodes
-    //##ModelId=47ABB2AD00B8
-    unsigned int getNumHVLines() const;
+/**
+ * @class FCALHVModule
+ * 
+ * @brief Describes one HV Module within the FCAL
+ *
+ * It owns the pointers to HV Lines
+ */
 
-    // Gets an electrode
-    //##ModelId=47ABB2AD00BA
-    FCALHVLineConstLink getHVLine(unsigned int iLine) const;
+class FCALHVModule
+{
+ public:
+  FCALHVModule(const FCALHVManager *manager
+	       , unsigned int iSide
+	       , unsigned int iSector
+	       , unsigned int iSampling);
+  ~FCALHVModule();
 
-    //##ModelId=47ABB3E7009B
-    const FCALHVManager *getManager() const;
+  // Side Index (0=Negative, 1=Positive)
+  unsigned int getSideIndex() const;
 
-  private:
-    // Destructor
-    //##ModelId=47ABB2AD00BD
-    virtual ~FCALHVModule();
+  unsigned int getSamplingIndex() const;
+  unsigned int getSectorIndex() const;
 
-    // Illegal operation
-    //##ModelId=47ABB2AD00BF
-    FCALHVModule(const FCALHVModule& right);
+  unsigned int getNumHVLines() const;
 
-    // Illegal operation
-    //##ModelId=47ABB2AD00C1
-    FCALHVModule& operator=(const FCALHVModule& right);
+  const FCALHVLine& getHVLine(unsigned int iLine) const;
+  
+  const FCALHVManager& getManager() const;
 
-    class Clockwork;
-    Clockwork *m_c;
+ private:
+  FCALHVModule(const FCALHVModule& right);
+  FCALHVModule& operator=(const FCALHVModule& right);
 
+  class Clockwork;
+  Clockwork *m_c;
 };
 
-
-
-#endif /* FCALHVMODULE_H_HEADER_INCLUDED_B6E380D9 */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModuleConstLink.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModuleConstLink.h
deleted file mode 100644
index ac22293bbfdc..000000000000
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/FCALHVModuleConstLink.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef _FCALHVModuleConstLink_h_
-#define _FCALHVModuleConstLink_h_
-#include "GeoModelKernel/ConstLink.h"
-class FCALHVModule;
-typedef ConstLink<FCALHVModule> FCALHVModuleConstLink;
-#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVDescriptor.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVDescriptor.h
index a7a73247ee78..f9e51f781e6c 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVDescriptor.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVDescriptor.h
@@ -1,37 +1,28 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef HECHVDESCRIPTOR_H_HEADER_INCLUDED_B0D9EFF4
-#define HECHVDESCRIPTOR_H_HEADER_INCLUDED_B0D9EFF4
+#ifndef LARHV_HECHVDESCRIPTOR_H
+#define LARHV_HECHVDESCRIPTOR_H
+
 #include "GeoModelKernel/CellBinning.h"
-class EMBHVDescriptor;
 
-//##ModelId=47A07935031C
 class HECHVDescriptor
 {
-  public:
-    // Constructor
-    //##ModelId=47A079350327
-    HECHVDescriptor(const CellBinning &phiBinning);
-
-    //##ModelId=47A079350321
-    const CellBinning &getPhiBinning() const;
-
-    //##ModelId=47A07935031D
-    virtual ~HECHVDescriptor();
-
-  private:
-    //##ModelId=47A079350323
-    HECHVDescriptor(const HECHVDescriptor& right);
-
-    //##ModelId=47A079350325
-    EMBHVDescriptor& operator=(const EMBHVDescriptor& right);
-
-    //##ModelId=47AB7ACF0134
-    const CellBinning m_phiBinning;
+ public:
+  HECHVDescriptor(const CellBinning &phiBinning);
+  ~HECHVDescriptor();
+
+  const CellBinning& getPhiBinning() const
+  {
+    return m_phiBinning;
+  }
+  
+ private:
+  HECHVDescriptor(const HECHVDescriptor& right);
+  HECHVDescriptor& operator=(const HECHVDescriptor& right);
+
+  const CellBinning m_phiBinning;
 };
 
-
-
 #endif /* HECHVDESCRIPTOR_H_HEADER_INCLUDED_B0D9EFF4 */
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVManager.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVManager.h
index 6b236fe1d891..ebf8969bd28f 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVManager.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVManager.h
@@ -1,76 +1,66 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef HECHVMANAGER_H_HEADER_INCLUDED_B88C423D
-#define HECHVMANAGER_H_HEADER_INCLUDED_B88C423D
-#include "GeoModelKernel/RCBase.h"
-class HEECHVManager;
-class HECHVDescriptor;
-#include "HECHVModule.h"
-typedef ConstLink<HECHVModule> HECHVModuleConstLink;
+#ifndef LARHV_HECHVMANAGER_H
+#define LARHV_HECHVMANAGER_H
+
+#include "LArHV/HECHVDescriptor.h"
+#include "LArHV/HECHVModule.h"
 
 struct HECHVPayload;
 
-//##ModelId=4753077F00A0
-class HECHVManager : public RCBase
+/**
+ * @class HECHVManager
+ *
+ * @brief  This class provides direct access to information on the HV
+ * electrodes within the barrels.  The information may be accessed either
+ * directly or iteratively.  Direct access is provided by the getHVModule()
+ * method.  Iterative access
+ * is by looping over valid side, eta, phi, and sector indices to
+ * retrieve a HV module.  From the high voltage modules one
+ * can obtain a list of electrodes (iteratively or directly).
+ *
+ * The manager owns the pointers to the HV Modules.
+ */
+
+class HECHVManager
 {
-  public:
-    //##ModelId=47A07A0C016B
-    HECHVManager();
-
-    //##ModelId=47A07A0C0176
-    const HECHVDescriptor *getDescriptor() const;
-
-    // Begin side index (0=negative and 1= positive)
-    //##ModelId=47A07AC901D3
-    unsigned int beginSideIndex() const;
-
-    // End side index (0=negative and 1= positive)
-    //##ModelId=47A07AC901E4
-    unsigned int endSideIndex() const;
-
-    //##ModelId=47A07A0C01A1
-    unsigned int beginPhiIndex() const;
-
-    //##ModelId=47A07A0C01AD
-    unsigned int endPhiIndex() const;
+ public:
+  HECHVManager();
+  ~HECHVManager();
 
-    //##ModelId=47A07A0C01BA
-    unsigned int beginSamplingIndex() const;
+  const HECHVDescriptor& getDescriptor() const;
 
-    //##ModelId=47A07A0C01C9
-    unsigned int endSamplingIndex() const;
+  // Begin/End side index (0=negative and 1= positive)
+  unsigned int beginSideIndex() const;
+  unsigned int endSideIndex() const;
 
-    //##ModelId=47A07A0C01D7
-    HECHVModuleConstLink getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const;
+  unsigned int beginPhiIndex() const;
+  unsigned int endPhiIndex() const;
 
-    // Refresh from the database if needed
-    void update() const;
+  unsigned int beginSamplingIndex() const;
+  unsigned int endSamplingIndex() const;
 
-    // Make the data stale.  Force update of data.
-    void reset() const;
+  const HECHVModule& getHVModule(unsigned int iSide
+				 , unsigned int iPhi
+				 , unsigned int iSampling) const;
 
-    // Get the database payload
-    HECHVPayload *getPayload(const HECHVSubgap &) const;
+  // Refresh from the database if needed
+  void update() const;
 
-  private:
+  // Make the data stale.  Force update of data.
+  void reset() const;
 
+  // Get the database payload
+  HECHVPayload *getPayload(const HECHVSubgap &) const;
 
-    //##ModelId=47A07A0C01E5
-    virtual ~HECHVManager();
-
-    //##ModelId=47A07A0C01F3
-    HECHVManager(const HECHVManager& right);
-
-    //##ModelId=47A07A0C0210
-    HECHVManager& operator=(const HECHVManager& right);
-
-    class Clockwork;
-    Clockwork *m_c;
+ private:
+  HECHVManager(const HECHVManager& right);
+  HECHVManager& operator=(const HECHVManager& right);
 
+  class Clockwork;
+  Clockwork *m_c;
 };
 
-
-
-#endif /* HECHVMANAGER_H_HEADER_INCLUDED_B88C423D */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModule.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModule.h
index 287d371cf01a..6dec3d4856fc 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModule.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModule.h
@@ -1,68 +1,51 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef HECHVMODULE_H_HEADER_INCLUDED_DB6688D8
-#define HECHVMODULE_H_HEADER_INCLUDED_DB6688D8
-#include "GeoModelKernel/RCBase.h"
-#include "GeoModelKernel/ConstLink.h"
-#include "LArHV/HECHVSubgapConstLink.h"
-class HECHVManager;
-
-
-//##ModelId=47A078E8027A
-class HECHVModule : public RCBase
-{
-  public:
-    //##ModelId=47A078E80280
-    HECHVModule(const HECHVManager *manager, unsigned int iSide, unsigned int iPhi, unsigned int iSampling);
-
-    // Side Index (0=Negative, 1=Positive)
-    //##ModelId=47A078E80285
-    unsigned int getSideIndex() const;
+#ifndef LARHV_HECHVMODULE_H
+#define LARHV_HECHVMODULE_H
 
-    // Get eta Index
-    //##ModelId=47A078E80287
-    unsigned int getSamplingIndex() const;
-
-    // Get phi index
-    //##ModelId=47A078E80289
-    unsigned int getPhiIndex() const;
-
-    // Get num electrodes
-    //##ModelId=47A078E8028D
-    unsigned int getNumSubgaps() const;
+class HECHVManager;
+class HECHVSubgap;
 
-    // Gets an electrode
-    //##ModelId=47A078E8028F
-    HECHVSubgapConstLink getSubgap(unsigned int iElectrode) const;
-    //##ModelId=47AB88CD00F2
-    double getPhiMin() const;
+/**
+ * @class HECHVModule
+ *
+ * @brief Describes one HV Module within the HEC
+ * 
+ * It owns the pointers to HV Subgaps
+ */
 
 
-    //##ModelId=47AB88CD0105
-    double getPhiMax() const;
+class HECHVModule
+{
+ public:
+  HECHVModule(const HECHVManager *manager
+	      , unsigned int iSide
+	      , unsigned int iPhi
+	      , unsigned int iSampling);
+  ~HECHVModule();
 
-    //##ModelId=47ABB40E02DF
-    const HECHVManager *getManager() const;
+  // Side Index (0=Negative, 1=Positive)
+  unsigned int getSideIndex() const;
 
-  private:
-    // Destructor
-    //##ModelId=47A078E80292
-    virtual ~HECHVModule();
+  unsigned int getSamplingIndex() const;
+  unsigned int getPhiIndex() const;
 
-    // Illegal operation
-    //##ModelId=47A078E80294
-    HECHVModule(const HECHVModule& right);
+  unsigned int getNumSubgaps() const;
+  const HECHVSubgap& getSubgap(unsigned int iElectrode) const;
+  
+  double getPhiMin() const;
+  double getPhiMax() const;
 
-    // Illegal operation
-    //##ModelId=47A078E80296
-    HECHVModule& operator=(const HECHVModule& right);
+  const HECHVManager& getManager() const;
 
-    class Clockwork;
-    Clockwork *m_c;
+ private:
+  HECHVModule(const HECHVModule& right);
+  HECHVModule& operator=(const HECHVModule& right);
 
+  class Clockwork;
+  Clockwork *m_c;
 };
 
-
-#endif /* HECHVMODULE_H_HEADER_INCLUDED_DB6688D8 */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModuleConstLink.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModuleConstLink.h
deleted file mode 100644
index 1ecde482f71d..000000000000
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVModuleConstLink.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef _HECHVModuleConstLink_h_
-#define _HECHVModuleConstLink_h_
-#include "GeoModelKernel/ConstLink.h"
-class HECHVModule;
-typedef ConstLink<HECHVModule> HECHVModuleConstLink;
-#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVSubgap.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVSubgap.h
index 7d54cd6c1b0a..f22e77935a66 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVSubgap.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/HECHVSubgap.h
@@ -1,62 +1,38 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef HECHVSUBGAP_H_HEADER_INCLUDED_E1B34569
-#define HECHVSUBGAP_H_HEADER_INCLUDED_E1B34569
-class HECHVModule;
-#include "GeoModelKernel/RCBase.h"
-#include "LArHV/HECHVModuleConstLink.h"
-//  
-//##ModelId=47A0797F0247
-class HECHVSubgap : public RCBase
-{
-  public:
-    // Constructor
-    //##ModelId=47A0797F024A
-    HECHVSubgap(HECHVModuleConstLink module, unsigned int iSubgap);
-
-    // returns a pointer to the module that owns this electrode.
-    //##ModelId=47A0797F024D
-    HECHVModuleConstLink getModule() const;
-
-    // Returns the index of this electrode.
-    //##ModelId=47A0797F024F
-    unsigned int getSubgapIndex() const;
-
-    // HV Status
-    bool hvOn() const;
-    
-    // Voltage
-    double voltage() const;
+#ifndef LARHV_HECHVSUBGAP_H
+#define LARHV_HECHVSUBGAP_H
 
-    // Current
-    double current() const;
+class HECHVModule;
 
-    // HVLine no
-    int hvLineNo() const;
+class HECHVSubgap
+{
+ public:
+  HECHVSubgap(const HECHVModule* module, unsigned int iSubgap);
+  ~HECHVSubgap();
 
-    // Voltage and current at the same time:
-    void voltage_current(double& v, double& i) const;
+  // returns a pointer to the module that owns this electrode.
+  const HECHVModule& getModule() const;
 
-  private:
-    // Destructor
-    //##ModelId=47A0797F0251
-    virtual ~HECHVSubgap();
+  // Returns the index of this electrode.
+  unsigned int getSubgapIndex() const;
 
-    // Illegal operation
-    //##ModelId=47A0797F0253
-    HECHVSubgap(const HECHVSubgap& right);
+  bool hvOn() const;
+  double voltage() const;
+  double current() const;
+  int hvLineNo() const;
 
-    // Illegal operation
-    //##ModelId=47A0797F0255
-    HECHVSubgap& operator=(const HECHVSubgap& right);
+  // Voltage and current at the same time:
+  void voltage_current(double& v, double& i) const;
 
-    class Clockwork;
-    Clockwork *m_c;
+ private:
+  HECHVSubgap(const HECHVSubgap& right);
+  HECHVSubgap& operator=(const HECHVSubgap& right);
 
+  class Clockwork;
+  Clockwork *m_c;
 };
 
-
-
-#endif /* HECHVSUBGAP_H_HEADER_INCLUDED_E1B34569 */
+#endif
diff --git a/LArCalorimeter/LArGeoModel/LArHV/LArHV/LArHVManager.h b/LArCalorimeter/LArGeoModel/LArHV/LArHV/LArHVManager.h
index 152050b7be49..f256077eff5b 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/LArHV/LArHVManager.h
+++ b/LArCalorimeter/LArGeoModel/LArHV/LArHV/LArHVManager.h
@@ -5,13 +5,13 @@
 #ifndef LARHV_LARHVMANAGER_H
 #define LARHV_LARHVMANAGER_H
 
-class HECHVManager;
-class FCALHVManager;
 class EMBPresamplerHVManager;
 class EMECPresamplerHVManager;
 
-#include "LArHV/EMECHVManager.h"
 #include "LArHV/EMBHVManager.h"
+#include "LArHV/EMECHVManager.h"
+#include "LArHV/HECHVManager.h"
+#include "LArHV/FCALHVManager.h"
 
 #include "IOVSvc/IOVSvc.h"
 #include "StoreGate/DataHandle.h"
@@ -32,7 +32,7 @@ class LArHVManager
   
     // Constructor
     // 
-    LArHVManager(const HECHVManager *hecHv, const FCALHVManager *fcalHv, const EMBPresamplerHVManager *embPreManager, const EMECPresamplerHVManager *emecPreManager);
+    LArHVManager(const EMBPresamplerHVManager *embPreManager, const EMECPresamplerHVManager *emecPreManager);
     
     //  Destructor
     virtual ~LArHVManager();
@@ -50,10 +50,10 @@ class LArHVManager
     const EMECPresamplerHVManager *getEMECPresamplerHVManager() const;
   
     // Returns the HECHVManager
-    const HECHVManager *getHECHVManager() const;
+    const HECHVManager& getHECHVManager() const;
   
     // Returns the FCALHVManager
-    const FCALHVManager *getFCALHVManager() const;
+    const FCALHVManager& getFCALHVManager() const;
     
     void reset() const;
     
@@ -69,8 +69,8 @@ class LArHVManager
   EMBHVManager   m_embHV;
   EMECHVManager  m_emecHVInner;
   EMECHVManager  m_emecHVOuter;
-  const HECHVManager            *m_hecHV;
-  const FCALHVManager           *m_fcalHV;
+  HECHVManager   m_hecHV;
+  FCALHVManager  m_fcalHV;
   const EMBPresamplerHVManager  *m_embPreHV;
   const EMECPresamplerHVManager *m_emecPreHV;
 
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/EMBHVDescriptor.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/EMBHVDescriptor.cpp
index 3c13de8580e1..c5b603f8961e 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/EMBHVDescriptor.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/EMBHVDescriptor.cpp
@@ -1,18 +1,17 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/EMBHVDescriptor.h"
 
-//##ModelId=4755BF390264
-EMBHVDescriptor::~EMBHVDescriptor()
+EMBHVDescriptor::EMBHVDescriptor(const CellBinning &etaBinning
+				 , const CellBinning &phiBinning)
+  : m_etaBinning(etaBinning)
+  , m_phiBinning(phiBinning)	 
 {
 }
 
-
-//##ModelId=4755BF39021B
-EMBHVDescriptor::EMBHVDescriptor(const CellBinning &etaBinning, const CellBinning &phiBinning)
-:m_etaBinning(etaBinning),m_phiBinning(phiBinning)	 
+EMBHVDescriptor::~EMBHVDescriptor()
 {
 }
 
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVDescriptor.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVDescriptor.cpp
index f9b13989c85b..b1139c5b6619 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVDescriptor.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVDescriptor.cpp
@@ -1,18 +1,22 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/EMECHVDescriptor.h"
 
-//##ModelId=478D138C01BE
-EMECHVDescriptor::~EMECHVDescriptor()
+EMECHVDescriptor::EMECHVDescriptor(const CellPartitioning &etaBinning
+				   , const CellBinning &phiBinning
+				   , const CellBinning &sectorBinning)
+  : m_etaBinning(etaBinning)
+  , m_phiBinning(phiBinning)
+  , m_sectorBinning(sectorBinning)
 {
 }
 
-//##ModelId=478D138C0214
-EMECHVDescriptor::EMECHVDescriptor(const CellPartitioning &etaBinning, const CellBinning &phiBinning, const CellBinning &sectorBinning):
-  m_etaBinning(etaBinning),m_phiBinning(phiBinning),m_sectorBinning(sectorBinning)
+EMECHVDescriptor::~EMECHVDescriptor()
 {
 }
 
 
+
+
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVModule.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVModule.cpp
index 4e58d3820561..ccb6bd469851 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVModule.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/EMECHVModule.cpp
@@ -29,6 +29,14 @@ public:
       electrodes.push_back(new EMECHVElectrode(modulePtr, iElectrode));
     }
   }
+  ~Clockwork()
+  {
+    auto it=electrodes.begin();
+    auto itend=electrodes.end();
+    for(;it!=itend;++it) {
+      delete *it;
+    }
+  }
 
   const EMECHVManager *manager;
   unsigned int iSide;
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVDescriptor.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVDescriptor.cpp
deleted file mode 100644
index 181077591a75..000000000000
--- a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVDescriptor.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "LArHV/FCALHVDescriptor.h"
-
-//##ModelId=47ABB0820151
-FCALHVDescriptor::FCALHVDescriptor()
-{
-}
-
-
-//##ModelId=47ABB08201A7
-FCALHVDescriptor::~FCALHVDescriptor()
-{
-}
-
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVLine.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVLine.cpp
index 05339466e0c1..0cf03a5915c3 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVLine.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVLine.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/FCALHVLine.h"
@@ -8,67 +8,62 @@
 #include "FCALHVPayload.h"
 
 class FCALHVLine::Clockwork {
- 
 public:
+  Clockwork(const FCALHVModule* modulePtr
+	    , unsigned int line)
+    : module(modulePtr)
+    , iLine(line)
+  {}
 
   const FCALHVModule *module;
-  
   unsigned int iLine;
-
 };
 
-//##ModelId=47ABB4D90312
-FCALHVLine::FCALHVLine(FCALHVModuleConstLink module, unsigned int iLine):m_c(new Clockwork())
+FCALHVLine::FCALHVLine(const FCALHVModule* module
+		       , unsigned int iLine)
+  : m_c(new Clockwork(module,iLine))
 {
-  m_c->module=&*module;
-  m_c->iLine=iLine;
 }
 
-//##ModelId=47ABB4D90315
-FCALHVModuleConstLink FCALHVLine::getModule() const
+FCALHVLine::~FCALHVLine()
 {
-  return m_c->module;
+  delete m_c;
 }
 
-//##ModelId=47ABB4D90317
-unsigned int FCALHVLine::getLineIndex() const
+const FCALHVModule& FCALHVLine::getModule() const
 {
-  return m_c->iLine;
+  return *(m_c->module);
 }
 
-//##ModelId=47ABB4D90319
-bool FCALHVLine::hvOn() const
+unsigned int FCALHVLine::getLineIndex() const
 {
-  FCALHVPayload *payload = m_c->module->getManager()->getPayload(*this);
-  if (payload->voltage<-9999) return false;
-  else return true;
+  return m_c->iLine;
 }
 
-//##ModelId=47ABB4D9031B
-FCALHVLine::~FCALHVLine()
+bool FCALHVLine::hvOn() const
 {
-  delete m_c;
+  FCALHVPayload *payload = m_c->module->getManager().getPayload(*this);
+  return (payload->voltage>=-9999);
 }
 
 double FCALHVLine::voltage() const {
-  FCALHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+  FCALHVPayload *payload = m_c->module->getManager().getPayload(*this);
   return payload->voltage;
 }
 
 double FCALHVLine::current() const {
-  FCALHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+  FCALHVPayload *payload = m_c->module->getManager().getPayload(*this);
   return payload->current;
 }
 
 void FCALHVLine::voltage_current(double& voltage, double&current) const {
- FCALHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+ FCALHVPayload *payload = m_c->module->getManager().getPayload(*this);
  voltage = payload->voltage;
  current = payload->current;
 }
 
 
 int FCALHVLine::hvLineNo() const {
-  FCALHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+  FCALHVPayload *payload = m_c->module->getManager().getPayload(*this);
   return payload->hvLineNo;
 }
-
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVManager.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVManager.cpp
index 3b3d8740db3f..cae91a0ac378 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVManager.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVManager.cpp
@@ -1,11 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/FCALHVManager.h"
-#include "LArHV/FCALHVModule.h"
 #include "LArHV/FCALHVLine.h"
-#include "LArHV/FCALHVDescriptor.h"
 
 #include "FCALHVPayload.h"
 
@@ -25,53 +23,57 @@
 
 class FCALHVManager::Clockwork {
 public:
-  FCALHVDescriptor *descriptor;
-  FCALHVModuleConstLink linkArray[2][16][3];
+  Clockwork(const FCALHVManager* manager)
+  {
+    for(int iSide=0; iSide<2; ++iSide) {
+      for(int iSector=0; iSector<16; ++iSector) {
+	for(int iSampling=0; iSampling<3; ++iSampling) {
+	  moduleArray[iSide][iSector][iSampling] = new FCALHVModule(manager,iSide,iSector,iSampling);
+	}
+      }
+    }
+  }
+  ~Clockwork()
+  {
+    for(int iSide=0; iSide<2; ++iSide) {
+      for(int iSector=0; iSector<16; ++iSector) {
+	for(int iSampling=0; iSampling<3; ++iSampling) {
+	  delete moduleArray[iSide][iSector][iSampling];
+	}
+      }
+    }
+  }
+  const FCALHVModule* moduleArray[2][16][3];
   std::atomic<bool>          init{false};
   std::mutex                 mtx;
   std::vector<FCALHVPayload> payloadArray;
 };
 
-//##ModelId=47ABAE9302D3
-FCALHVManager::FCALHVManager():m_c(new Clockwork())
+FCALHVManager::FCALHVManager()
+  : m_c(new Clockwork(this))
 {
-  m_c->descriptor = new FCALHVDescriptor();
-  m_c->init=false;
 }
 
-
-//##ModelId=47ABAE930373
 FCALHVManager::~FCALHVManager()
 {
-  delete m_c->descriptor;
   delete m_c;
 }
 
-//##ModelId=47ABAF5E0079
-const FCALHVDescriptor *FCALHVManager::getDescriptor() const
-{
-  return m_c->descriptor;
-}
-
-//##ModelId=47ABAF5E0092
 unsigned int FCALHVManager::beginSideIndex() const
 {
   return 0;
 }
 
-//##ModelId=47ABAF5E009F
 unsigned int FCALHVManager::endSideIndex() const
 {
   return 2;
 }
 
-//##ModelId=47ABAF5E00AD
 unsigned int FCALHVManager::beginSectorIndex(unsigned int /*iSampling*/) const
 {
   return 0;
 }
 
-//##ModelId=47ABAF5E00BB
 unsigned int FCALHVManager::endSectorIndex(unsigned int iSampling) const
 {
   if (iSampling==0) return 16;
@@ -80,23 +82,19 @@ unsigned int FCALHVManager::endSectorIndex(unsigned int iSampling) const
   return 0;
 }
 
-//##ModelId=47ABAF5E00C9
 unsigned int FCALHVManager::beginSamplingIndex() const
 {
   return 0;
 }
 
-//##ModelId=47ABAF5E00D9
 unsigned int FCALHVManager::endSamplingIndex() const
 {
   return 3;
 }
 
-//##ModelId=47ABAF5E00E8
-FCALHVModuleConstLink FCALHVManager::getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
+const FCALHVModule& FCALHVManager::getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
 {
-  if (!m_c->linkArray[iSide][iSector][iSampling]) m_c->linkArray[iSide][iSector][iSampling]=FCALHVModuleConstLink(new FCALHVModule(this,iSide,iSector, iSampling));
-  return m_c->linkArray[iSide][iSector][iSampling];
+  return *(m_c->moduleArray[iSide][iSector][iSampling]);
 }
 
 void FCALHVManager::update() const {
@@ -200,10 +198,10 @@ void FCALHVManager::update() const {
 FCALHVPayload *FCALHVManager::getPayload(const FCALHVLine &line) const {
   update();
   unsigned int lineIndex         = line.getLineIndex();
-  FCALHVModuleConstLink module = line.getModule();
-  unsigned int sectorIndex       = module->getSectorIndex();
-  unsigned int sideIndex         = module->getSideIndex();
-  unsigned int samplingIndex     = module->getSamplingIndex();
+  const FCALHVModule& module     = line.getModule();
+  unsigned int sectorIndex       = module.getSectorIndex();
+  unsigned int sideIndex         = module.getSideIndex();
+  unsigned int samplingIndex     = module.getSamplingIndex();
   unsigned int index             = 192*sideIndex+12*sectorIndex+4*samplingIndex+lineIndex;
   //std::cout << "in Fcal getPayload: " << this << ' ' << index << ' ' << sideIndex << ' ' << sectorIndex << ' ' << samplingIndex << ' ' << lineIndex << std::endl;
   return &m_c->payloadArray[index];
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVModule.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVModule.cpp
index 4762265e059e..69e4e230a55f 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVModule.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/FCALHVModule.cpp
@@ -1,81 +1,86 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/FCALHVModule.h"
 #include "LArHV/FCALHVManager.h"
 #include "LArHV/FCALHVLine.h"
 
-#include <sstream>
 #include <stdexcept>
 
 class FCALHVModule::Clockwork {
 public:
+  Clockwork(const FCALHVManager* managerPtr
+	    , const FCALHVModule* modulePtr
+	    , unsigned int side
+	    , unsigned int sector
+	    , unsigned int sampling)
+    : manager(managerPtr)
+    , iSide(side)
+    , iSector(sector)
+    , iSampling(sampling) {
+    for(int iLine=0; iLine<4; ++iLine) {
+      hvLine[iLine] = new FCALHVLine(modulePtr,iLine);
+    }
+  }
+  ~Clockwork() {
+    for(int iLine=0; iLine<4; ++iLine) {
+      delete hvLine[iLine];
+    }
+  }
 
   const FCALHVManager *manager;
   unsigned int iSide;
   unsigned int iSector;
   unsigned int iSampling;
-  FCALHVLineConstLink hvLine[4];
+  const FCALHVLine* hvLine[4];
 };
 
+FCALHVModule::FCALHVModule(const FCALHVManager* manager
+			   , unsigned int iSide
+			   , unsigned int iSector
+			   , unsigned int iSampling)
+  :m_c(new Clockwork(manager,this,iSide,iSector,iSampling))
+{
+}
 
-
-//##ModelId=47ABB2AD00A9
-FCALHVModule::FCALHVModule(const FCALHVManager *manager, unsigned int iSide, unsigned int iSector, unsigned int iSampling):m_c(new Clockwork())
+FCALHVModule::~FCALHVModule()
 {
-  m_c->manager=manager;
-  m_c->iSide=iSide;
-  m_c->iSector=iSector;
-  m_c->iSampling=iSampling;
+  delete m_c;
 }
 
-//##ModelId=47ABB2AD00B2
 unsigned int FCALHVModule::getSideIndex() const
 {
   return m_c->iSide;
 }
 
-//##ModelId=47ABB2AD00B4
 unsigned int FCALHVModule::getSamplingIndex() const
 {
   return m_c->iSampling;
 }
 
-//##ModelId=47ABB2AD00B6
 unsigned int FCALHVModule::getSectorIndex() const
 {
   return m_c->iSector;
 }
 
-//##ModelId=47ABB2AD00B8
 unsigned int FCALHVModule::getNumHVLines() const
 {
   return 4;
 }
 
-//##ModelId=47ABB2AD00BA
-FCALHVLineConstLink FCALHVModule::getHVLine(unsigned int iLine) const
+const FCALHVLine& FCALHVModule::getHVLine(unsigned int iLine) const
 {
   // Check bounds and throw error if out of range.
   if (iLine>3) {
-    std::ostringstream msg;
-    msg << "FCALHVModule requesting out of range HV line, number " << iLine;
-    throw std::runtime_error(msg.str().c_str());
+    std::string msg = std::string("FCALHVModule requesting out of range HV line, number ") + std::to_string(iLine);
+    throw std::runtime_error(msg.c_str());
   }
 
-  if (!m_c->hvLine[iLine]) m_c->hvLine[iLine]= FCALHVLineConstLink(new FCALHVLine(this,iLine));
-  return m_c->hvLine[iLine];
+  return *(m_c->hvLine[iLine]);
 }
 
-//##ModelId=47ABB2AD00BD
-FCALHVModule::~FCALHVModule()
-{
-  delete m_c;
-}
-
-
-const FCALHVManager *FCALHVModule::getManager() const
+const FCALHVManager& FCALHVModule::getManager() const
 {
-  return m_c->manager;
+  return *(m_c->manager);
 }
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVDescriptor.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVDescriptor.cpp
index 222dfbac9d66..d1eb217efb14 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVDescriptor.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVDescriptor.cpp
@@ -1,23 +1,17 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/HECHVDescriptor.h"
-#include "LArHV/EMBHVDescriptor.h"
 
-//##ModelId=47A079350327
-HECHVDescriptor::HECHVDescriptor(const CellBinning &phiBinning):m_phiBinning(phiBinning)
+HECHVDescriptor::HECHVDescriptor(const CellBinning &phiBinning)
+  : m_phiBinning(phiBinning)
 {
 }
 
-//##ModelId=47A079350321
-const CellBinning &HECHVDescriptor::getPhiBinning() const
-{
-  return m_phiBinning;
-}
-
-//##ModelId=47A07935031D
 HECHVDescriptor::~HECHVDescriptor()
 {
 }
 
+
+
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVManager.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVManager.cpp
index 43f3c99ab18c..2bae0c972db9 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVManager.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVManager.cpp
@@ -1,9 +1,8 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/HECHVManager.h"
-#include "LArHV/HECHVDescriptor.h"
 #include "LArHV/HECHVModule.h"
 #include "LArHV/HECHVSubgap.h"
 #include <cmath>
@@ -27,74 +26,84 @@
 
 class HECHVManager::Clockwork {
 public:
-  HECHVDescriptor *descriptor;
-  HECHVModuleConstLink linkArray[2][32][4];
-  std::atomic<bool>          init{false};
-  std::mutex                 mtx;
+  Clockwork(const HECHVManager* manager) 
+    : descriptor(new HECHVDescriptor(CellBinning(0,2*M_PI,32)))
+  {
+    for(int iSide=0; iSide<2; ++iSide) {
+      for(int iPhi=0; iPhi<32; ++iPhi) {
+	for(int iSampling=0; iSampling<4; ++iSampling) {
+	  moduleArray[iSide][iPhi][iSampling] = new HECHVModule(manager,iSide,iPhi,iSampling);
+	}
+      }
+    }
+  }
+  ~Clockwork()
+  {
+    for(int iSide=0; iSide<2; ++iSide) {
+      for(int iPhi=0; iPhi<32; ++iPhi) {
+	for(int iSampling=0; iSampling<4; ++iSampling) {
+	  delete moduleArray[iSide][iPhi][iSampling];
+	}
+      }
+    }
+    delete descriptor;
+  }
+  HECHVDescriptor*   descriptor;
+  const HECHVModule* moduleArray[2][32][4];
+  std::atomic<bool>  init{false};
+  std::mutex         mtx;
   std::vector<HECHVPayload> payloadArray;     
 };
 
-//##ModelId=47A07A0C016B
-HECHVManager::HECHVManager():m_c(new Clockwork)
+HECHVManager::HECHVManager()
+  : m_c(new Clockwork(this))
 {
-  m_c->descriptor = new HECHVDescriptor(CellBinning(0,2*M_PI,32));
-  m_c->init=false;
 }
 
-
-//##ModelId=47A07A0C0176
-const HECHVDescriptor *HECHVManager::getDescriptor() const
+const HECHVDescriptor& HECHVManager::getDescriptor() const
 {
-  return m_c->descriptor;
+  return *(m_c->descriptor);
 }
 
-//##ModelId=47A07AC901D3
 unsigned int HECHVManager::beginSideIndex() const
 {
   return 0;
 }
 
-//##ModelId=47A07AC901E4
 unsigned int HECHVManager::endSideIndex() const
 {
   return 2;
 }
 
-//##ModelId=47A07A0C01A1
 unsigned int HECHVManager::beginPhiIndex() const
 {
   return 0;
 }
 
-//##ModelId=47A07A0C01AD
 unsigned int HECHVManager::endPhiIndex() const
 {
   return 32;
 }
 
-//##ModelId=47A07A0C01BA
 unsigned int HECHVManager::beginSamplingIndex() const
 {
   return 0;
 }
 
-//##ModelId=47A07A0C01C9
 unsigned int HECHVManager::endSamplingIndex() const
 {
   return 4;
 }
 
-//##ModelId=47A07A0C01D7
-HECHVModuleConstLink HECHVManager::getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
+const HECHVModule& HECHVManager::getHVModule(unsigned int iSide
+					     , unsigned int iPhi
+					     , unsigned int iSampling) const
 {
-  if (!m_c->linkArray[iSide][iPhi][iSampling]) m_c->linkArray[iSide][iPhi][iSampling]=HECHVModuleConstLink(new HECHVModule(this,iSide, iPhi, iSampling));
-  return m_c->linkArray[iSide][iPhi][iSampling];
+  return *(m_c->moduleArray[iSide][iPhi][iSampling]);
 }
 
-//##ModelId=47A07A0C01E5
 HECHVManager::~HECHVManager()
 {
-  delete m_c->descriptor;
   delete m_c;
 }
 
@@ -200,10 +209,10 @@ void HECHVManager::update() const {
 HECHVPayload *HECHVManager::getPayload(const HECHVSubgap &subgap) const {
   update();
   unsigned int subgapIndex    = subgap.getSubgapIndex();
-  HECHVModuleConstLink module =  subgap.getModule();
-  unsigned int phiIndex       = module->getPhiIndex();
-  unsigned int samplingIndex  = module->getSamplingIndex();
-  unsigned int sideIndex      = module->getSideIndex();
+  const HECHVModule& module   = subgap.getModule();
+  unsigned int phiIndex       = module.getPhiIndex();
+  unsigned int samplingIndex  = module.getSamplingIndex();
+  unsigned int sideIndex      = module.getSideIndex();
   unsigned int index          = 512*sideIndex+16*phiIndex+4*samplingIndex+subgapIndex;
   return &m_c->payloadArray[index];
 }
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVModule.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVModule.cpp
index 67284c634f00..5c8b45131b64 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVModule.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVModule.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/HECHVModule.h"
@@ -8,80 +8,86 @@
 #include "LArHV/HECHVSubgap.h"
 
 class HECHVModule::Clockwork {
-
 public:
+  Clockwork(const HECHVManager* managerPtr
+	    , const HECHVModule* modulePtr
+	    , unsigned int side
+	    , unsigned int phi
+	    , unsigned int sampling)
+    : manager(managerPtr)
+    , iSide(side)
+    , iPhi(phi)
+    , iSampling(sampling)
+  {
+    for(unsigned iSubgap=0; iSubgap<4; ++iSubgap) {
+      subgaps[iSubgap] = new HECHVSubgap(modulePtr,iSubgap);
+    }
+  }
+  ~Clockwork()
+  {
+    for(unsigned iSubgap=0; iSubgap<4; ++iSubgap) {
+      delete subgaps[iSubgap];
+    }
+  }
 
   const HECHVManager *manager;
   unsigned int iSide;
   unsigned int iPhi;
   unsigned int iSampling;
   
-  HECHVSubgapConstLink linkArray[4];
-
+  const HECHVSubgap* subgaps[4];
 };
 
-
-
-//##ModelId=47A078E80280
-HECHVModule::HECHVModule(const HECHVManager *manager, unsigned int iSide, unsigned int iPhi, unsigned int iSampling):m_c(new Clockwork())
+HECHVModule::HECHVModule(const HECHVManager *manager
+			 , unsigned int iSide
+			 , unsigned int iPhi
+			 , unsigned int iSampling)
+  :m_c(new Clockwork(manager,this,iSide,iPhi,iSampling))
 {
-  m_c->manager=manager;
-  m_c->iSide=iSide;
-  m_c->iPhi=iPhi;
-  m_c->iSampling=iSampling;
 }
 
-//##ModelId=47A078E80285
 unsigned int HECHVModule::getSideIndex() const
 {
   return m_c->iSide;
 }
 
-//##ModelId=47A078E80287
 unsigned int HECHVModule::getSamplingIndex() const
 {
   return m_c->iSampling;
 }
 
-//##ModelId=47A078E80289
 unsigned int HECHVModule::getPhiIndex() const
 {
   return m_c->iPhi;
 }
 
-//##ModelId=47A078E8028D
 unsigned int HECHVModule::getNumSubgaps() const
 {
   return 4;
 }
 
-//##ModelId=47A078E8028F
-HECHVSubgapConstLink HECHVModule::getSubgap(unsigned int iElectrode) const
+const HECHVSubgap& HECHVModule::getSubgap(unsigned int iElectrode) const
 {
-  if (!m_c->linkArray[iElectrode]) m_c->linkArray[iElectrode]=HECHVSubgapConstLink( new HECHVSubgap(this, iElectrode));
-  return m_c->linkArray[iElectrode];
+  return *(m_c->subgaps[iElectrode]);
 }
 
-//##ModelId=47A078E80292
 HECHVModule::~HECHVModule()
 {
   delete m_c;
 }
 
-//##ModelId=47AB88CD00F2
 double HECHVModule::getPhiMin() const
 {
-  return m_c->manager->getDescriptor()->getPhiBinning().binLower(m_c->iPhi);
+  return m_c->manager->getDescriptor().getPhiBinning().binLower(m_c->iPhi);
 }
 
-//##ModelId=47AB88CD0105
 double HECHVModule::getPhiMax() const
 {
-  return m_c->manager->getDescriptor()->getPhiBinning().binUpper(m_c->iPhi);
+  return m_c->manager->getDescriptor().getPhiBinning().binUpper(m_c->iPhi);
 }
 
-const HECHVManager *HECHVModule::getManager() const 
+const HECHVManager& HECHVModule::getManager() const
 {
-  return m_c->manager;
+  return *(m_c->manager);
 }
 
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVSubgap.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVSubgap.cpp
index 5c134b355a11..3fbd0f605634 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/HECHVSubgap.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/HECHVSubgap.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArHV/HECHVSubgap.h"
@@ -9,66 +9,63 @@
 #include "HECHVPayload.h"
 
 class HECHVSubgap::Clockwork {
-
 public:
-
-    const HECHVModule *module;
-
-    unsigned int iSubgap;
+  Clockwork(const HECHVModule* modulePtr
+	    , unsigned int subgap)
+    : module(modulePtr)
+    , iSubgap(subgap)
+  {}
+
+  const HECHVModule *module;
+  unsigned int iSubgap;
 };
 
-//##ModelId=47A0797F024A
-HECHVSubgap::HECHVSubgap(HECHVModuleConstLink module, unsigned int iSubgap):m_c(new Clockwork())
+HECHVSubgap::HECHVSubgap(const HECHVModule* module
+			 , unsigned int iSubgap)
+  :m_c(new Clockwork(module,iSubgap))
 {
-  m_c->module=&*module;
-  m_c->iSubgap=iSubgap;
 }
 
-//##ModelId=47A0797F024D
-HECHVModuleConstLink HECHVSubgap::getModule() const
+HECHVSubgap::~HECHVSubgap()
 {
-  return m_c->module;
+  delete m_c;
 }
 
-//##ModelId=47A0797F024F
-unsigned int HECHVSubgap::getSubgapIndex() const
+const HECHVModule& HECHVSubgap::getModule() const
 {
-  return m_c->iSubgap;
+  return *(m_c->module);
 }
 
-//##ModelId=47A0797F0251
-HECHVSubgap::~HECHVSubgap()
+unsigned int HECHVSubgap::getSubgapIndex() const
 {
-  delete m_c;
+  return m_c->iSubgap;
 }
 
-//##ModelId=47AB8A2103AC
 bool HECHVSubgap::hvOn() const
 {
-  HECHVPayload *payload = m_c->module->getManager()->getPayload(*this);
-  if (payload->voltage<-9999) return false;
-  else return true;
+  HECHVPayload *payload = m_c->module->getManager().getPayload(*this);
+  return (payload->voltage>=-9999);
 }
 
 double HECHVSubgap::voltage() const {
-  HECHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+  HECHVPayload *payload = m_c->module->getManager().getPayload(*this);
   return payload->voltage;
 }
 
 
 double HECHVSubgap::current() const {
-  HECHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+  HECHVPayload *payload = m_c->module->getManager().getPayload(*this);
   return payload->current;
 }
 
 void HECHVSubgap::voltage_current(double& voltage, double&current) const {
- HECHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+ HECHVPayload *payload = m_c->module->getManager().getPayload(*this);
  voltage = payload->voltage;
  current = payload->current;
 }
 
 
 int HECHVSubgap::hvLineNo() const {
-  HECHVPayload *payload = m_c->module->getManager()->getPayload(*this);
+  HECHVPayload *payload = m_c->module->getManager().getPayload(*this);
   return payload->hvLineNo;
 }
diff --git a/LArCalorimeter/LArGeoModel/LArHV/src/LArHVManager.cpp b/LArCalorimeter/LArGeoModel/LArHV/src/LArHVManager.cpp
index 7a813863b319..7ca4f6d91024 100644
--- a/LArCalorimeter/LArGeoModel/LArHV/src/LArHVManager.cpp
+++ b/LArCalorimeter/LArGeoModel/LArHV/src/LArHVManager.cpp
@@ -10,20 +10,16 @@
 #include "LArHV/EMECPresamplerHVManager.h"
 #include "LArHV/LArHVManager.h"
 
-LArHVManager::LArHVManager(const HECHVManager *hecHV
-			   , const FCALHVManager *fcalHV
-			   , const EMBPresamplerHVManager *embPreHV
+LArHVManager::LArHVManager(const EMBPresamplerHVManager *embPreHV
 			   , const EMECPresamplerHVManager *emecPreHV)
   : m_embHV()
   , m_emecHVInner(EMECHVModule::INNER)
   , m_emecHVOuter(EMECHVModule::OUTER)
-  , m_hecHV(hecHV)
-  , m_fcalHV(fcalHV)
+  , m_hecHV()
+  , m_fcalHV()
   , m_embPreHV(embPreHV)
   , m_emecPreHV(emecPreHV)
 {
-  if (m_hecHV)  m_hecHV->ref();
-  if (m_fcalHV) m_fcalHV->ref();
   if (m_embPreHV)  m_embPreHV->ref();
   if (m_emecPreHV) m_emecPreHV->ref();
 
@@ -34,8 +30,8 @@ void LArHVManager::reset() const
   m_embHV.reset();
   m_emecHVInner.reset();
   m_emecHVOuter.reset();
-  if (m_hecHV)  m_hecHV->reset();
-  if (m_fcalHV) m_fcalHV->reset();
+  m_hecHV.reset();
+  m_fcalHV.reset();
   if (m_embPreHV)  m_embPreHV->reset();
   if (m_emecPreHV) m_emecPreHV->reset(); 
  return;
@@ -44,8 +40,6 @@ void LArHVManager::reset() const
 
 LArHVManager::~LArHVManager()
 {
-  if (m_hecHV)  m_hecHV->unref();
-  if (m_fcalHV) m_fcalHV->unref();
   if (m_embPreHV)  m_embPreHV->unref();
   if (m_emecPreHV) m_emecPreHV->unref();
 
@@ -61,12 +55,12 @@ const EMECHVManager& LArHVManager::getEMECHVManager(IOType IO) const
   return IO==EMECHVModule::INNER ? m_emecHVInner : m_emecHVOuter;
 }
 
-const HECHVManager *LArHVManager::getHECHVManager() const
+const HECHVManager& LArHVManager::getHECHVManager() const
 {
   return m_hecHV;
 }
 
-const FCALHVManager *LArHVManager::getFCALHVManager() const
+const FCALHVManager& LArHVManager::getFCALHVManager() const
 {
   return m_fcalHV;
 }
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h
index 88ca94d6aca9..4c81ef13bc55 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h
@@ -43,7 +43,7 @@ class EMBDetectorManager : public GeoVDetectorManager
   /**
    * @brief Destructor
    */
-  ~EMBDetectorManager();
+  virtual ~EMBDetectorManager() override;
   
   /**
    * @brief	Iterate over detector regions
@@ -69,12 +69,12 @@ class EMBDetectorManager : public GeoVDetectorManager
   /**
    * @brief	Gets the ith tree top.
    */
-  virtual PVConstLink getTreeTop (unsigned int i) const;
+  virtual PVConstLink getTreeTop (unsigned int i) const override;
   
   /**
    * @brief	Gets the total number of tree tops.
    */
-  virtual unsigned int getNumTreeTops () const;
+  virtual unsigned int getNumTreeTops () const override;
   
   /**
    * @brief	Add a new Detector Region
@@ -84,7 +84,7 @@ class EMBDetectorManager : public GeoVDetectorManager
   /**
    * @brief	Add a Tree Top
    */
-  virtual void addTreeTop (PVLink treeTop);
+  void addTreeTop (PVLink treeTop);
   
   /**
    * @brief	Collection of useful numerical data for the description of the barrel cells.
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h
index 9287fe227776..b177a4b087b0 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h
@@ -47,7 +47,7 @@ class EMECDetectorManager : public GeoVDetectorManager
   /**
    * @brief  Destructor
    */
-  ~EMECDetectorManager();
+  virtual ~EMECDetectorManager() override;
       
   /**
    * @brief 	Iterate over detector regions
@@ -72,12 +72,12 @@ class EMECDetectorManager : public GeoVDetectorManager
   /**
    * @brief 	Gets the ith tree top.
    */
-  virtual PVConstLink getTreeTop (unsigned int i) const;
+  virtual PVConstLink getTreeTop (unsigned int i) const override;
       
   /**
    * @brief 	Gets the total number of tree tops.
    */
-  virtual unsigned int getNumTreeTops () const;
+  virtual unsigned int getNumTreeTops () const override;
       
   /**
    * @brief 	This provides the distance in CLHEP::mm from the Focal Plane to
@@ -168,7 +168,7 @@ class EMECDetectorManager : public GeoVDetectorManager
   /**
    * @brief 	Add a Tree Top
    */
-  virtual void addTreeTop (PVLink treeTop);
+  void addTreeTop (PVLink treeTop);
 
   /**
    * @brief 	Get the HV Managers
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h
index e8002d41a3f9..778a9a97afc4 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h
@@ -1,30 +1,30 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARREADOUTGEOMETRY_FCALDETECTORMANAGER_H
 #define LARREADOUTGEOMETRY_FCALDETECTORMANAGER_H
+
 #include "LArReadoutGeometry/FCAL_ChannelMap.h"
 #include "LArReadoutGeometry/FCALModule.h"
+#include "LArHV/FCALHVManager.h"
+#include "GeoModelKernel/GeoVDetectorManager.h"
 #include "AthenaKernel/CLASS_DEF.h"
 #include <vector>
-#include "GeoModelKernel/GeoVDetectorManager.h"
-class FCALHVManager;
-class IMessageSvc;
 
-/**
- *     @brief A manager class providing access to readout geometry information
- *     for the forward calorimeter.
- */
+class IMessageSvc;
 
 /**
- *	Manager class for the FCAL which provides access to the
- *	FCAL Modules, the Physical Volumes, and the FCAL Channel
- *	Map.  The FCAL Channel Map is a descriptor for the
- *	FCAL.
+ * @class FCALDetectorManager
+ *
+ * @brief A manager class providing access to readout geometry information
+ * for the forward calorimeter.
+ *
+ * Manager class for the FCAL which provides access to the
+ * FCAL Modules, the Physical Volumes, and the FCAL Channel
+ * Map. The FCAL Channel Map is a descriptor for the FCAL.
  */
 
-
 class FCALDetectorManager : public GeoVDetectorManager  
 {
   
@@ -34,17 +34,17 @@ class FCALDetectorManager : public GeoVDetectorManager
   typedef std::vector<const FCALModule *>::const_iterator ConstIterator;
   
 
-  public:
+ public:
       
   /**
    * @brief Constructor
    */
-  FCALDetectorManager ();
+  FCALDetectorManager (const FCALHVManager* hvManager=nullptr);
     
   /**
    * @brief Desctructor
    */
-  virtual ~FCALDetectorManager();
+  virtual ~FCALDetectorManager() override;
       
   /**
    * @brief Iterate over FCAL Modules
@@ -64,12 +64,12 @@ class FCALDetectorManager : public GeoVDetectorManager
   /**
    * @brief Gets the number of tree tops.
    */
-  virtual unsigned int getNumTreeTops () const;
+  virtual unsigned int getNumTreeTops () const override;
       
   /**
    * @brief Gets the ith tree top.
    */
-  virtual PVConstLink getTreeTop (unsigned int i) const;
+  virtual PVConstLink getTreeTop (unsigned int i) const override;
       
   /**
    * @brief Returns the Channel Map.
@@ -84,12 +84,12 @@ class FCALDetectorManager : public GeoVDetectorManager
   /**
    * @brief Add a Tree Top
    */
-  virtual void addTreeTop (PVLink treeTop);
+  void addTreeTop (PVLink treeTop);
 
   /**
    * @brief Get the HV Manager:
    */
-  const FCALHVManager * getHVManager() const;
+  const FCALHVManager& getHVManager() const;
 
   private:
     
@@ -116,7 +116,7 @@ class FCALDetectorManager : public GeoVDetectorManager
 
       const FCAL_ChannelMap *m_fcal_channel_map;
 
-      mutable const FCALHVManager *m_HVManager;
+      const FCALHVManager* m_HVManager;
       
 };
 
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h
index 23a227be49c1..f36f8f0b5bbf 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h
@@ -1,23 +1,26 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARREADOUTGEOMETRY_FCALTILE_H
 #define LARREADOUTGEOMETRY_FCALTILE_H
+
 #include "LArReadoutGeometry/FCAL_ChannelMap.h"
 #include "LArHV/FCALHVModule.h"
 #include "LArReadoutGeometry/FCALTubeConstLink.h"
 
+class FCALModule;
+
 /**
+ * @class FCALTile
+ *
  * @brief A tile of the forward calorimeter readout geometry
+ *
+ * This class represents the size, shape, position, and
+ * indices of a single tile within the FCAL.  For access to
+ * the FCAL Tiles, you should use the FCAL Module class.
  */
 
-/**
- *	This class represents the size, shape, position, and
- *	indices of a single tile within the FCAL.  For access to
- *	the FCAL Tiles, you should use the FCAL Module class.
- */
-class FCALModule;
 class FCALTile 
 {
   typedef FCAL_ChannelMap::tileMap_const_iterator TileConstIterator;
@@ -98,7 +101,7 @@ class FCALTile
   /**
    * @brief Get hvline
    */
-  const FCALHVLineConstLink & getHVLine (unsigned int i) const;
+  const FCALHVLine* getHVLine (unsigned int i) const;
           
  private:
 
@@ -109,7 +112,7 @@ class FCALTile
   /**
    * @brief	Cache of subgaps.
    */
-  mutable FCALHVLineConstLink m_line[4];
+  mutable const FCALHVLine* m_line[4] = { nullptr };
 
   /**
    * @brief	Cache of tubes.
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h
index 719f0cbdc3b2..805bf916a2d2 100644
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h
@@ -1,18 +1,20 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARREADOUTGEOMETRY_FCALTUBE_H
 #define LARREADOUTGEOMETRY_FCALTUBE_H
 
 #include "GeoModelKernel/RCBase.h"
-//
-// This class represents an FCAL Tube. The tube has a position and it also has
-// links to the High Voltage Lines.
-//
-#include "LArHV/FCALHVLineConstLink.h"
 #include "LArHV/FCALHVLine.h"
 
+/**
+ * @class FCALTube
+ * 
+ * @brief This class represents an FCAL Tube. The tube has a position and it also has
+ * links to the High Voltage Lines.
+ */
+
 class FCALTile;
 
 class FCALTube : public RCBase {
@@ -20,7 +22,7 @@ class FCALTube : public RCBase {
  public:
 
   // Constructor
-  FCALTube(const FCALTile *tile, FCALHVLineConstLink line, double x, double y);
+  FCALTube(const FCALTile *tile, const FCALHVLine& line, double x, double y);
 
   // Get the tube position (x)
   double getXLocal() const;
@@ -32,7 +34,7 @@ class FCALTube : public RCBase {
   const FCALTile *getTile() const;
 
   // Get the High Voltage Line
-  FCALHVLineConstLink getHVLine() const;
+  const FCALHVLine& getHVLine() const;
 
  private:
 
@@ -43,7 +45,7 @@ class FCALTube : public RCBase {
   virtual ~FCALTube();
 
   const FCALTile      *m_tile;        // link to the Tile
-  FCALHVLineConstLink  m_hvLine;      // link to HVLine
+  const FCALHVLine&    m_hvLine;      // link to HVLine
   double               m_x;           // nominal x position
   double               m_y;           // nominal y position;
   
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h
index f5a02ad5e827..f8a97d572159 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h
@@ -1,34 +1,32 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARREADOUTGEOMETRY_HECCELL_H
 #define LARREADOUTGEOMETRY_HECCELL_H
+
 #include "LArReadoutGeometry/HECDetDescr.h"
 #include "GeoModelKernel/CellBinning.h"
 #include "GeoModelKernel/RCBase.h"
-#include "LArHV/HECHVModule.h"
 #include "LArHV/HECHVSubgap.h"
-/**
- * @brief A cell of the hadronic endcap calorimeter readout
- * geometry
- */
 
 /**
- *	This class represents a single HEC Cell.  A cell spans
- *	multiple blocks and has different boundaries at each
- *	block.  For access to the HEC  Cells, use the HECDetector
- *	Region class.
+ * @class HECCell
+ *
+ * @brief A cell of the hadronic endcap calorimeter readout geometry
+ * 
+ * This class represents a single HEC Cell.  A cell spans
+ * multiple blocks and has different boundaries at each
+ * block.  For access to the HEC  Cells, use the HECDetector
+ * Region class.
  *
- *	Use the HEC Cells through HEC Cell Links please!!!  This
- *	will free the memory used by the cell when the last link
- *	to the cell disappears.
+ * Use the HEC Cells through HEC Cell Links please!!!  This
+ * will free the memory used by the cell when the last link
+ *to the cell disappears.
  */
 
-
 class HECCell : public RCBase  
-{
-  
+{  
  public:
 
   typedef enum {FRONT,CENTER,BACK} CELLPOS;
@@ -167,7 +165,7 @@ class HECCell : public RCBase
   /**
    * @Get subgap
    */
-  const HECHVSubgapConstLink & getSubgap (unsigned int i) const;
+  const HECHVSubgap& getSubgap (unsigned int i) const;
       
 
 
@@ -194,7 +192,7 @@ class HECCell : public RCBase
   /**
    * @brief	Cache of subgaps.
    */
-  mutable std::vector<HECHVSubgapConstLink> m_subgap;
+  mutable std::vector<const HECHVSubgap*> m_subgap;
 
   /**
    * @brief Additional Implementation Declarations
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h
index 62d552a2d42f..028adfaae840 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h
@@ -1,48 +1,51 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef LARREADOUTGEOMETRY_HECDETECTORMANAGER_H
 #define LARREADOUTGEOMETRY_HECDETECTORMANAGER_H
+
 #include "AthenaKernel/CLASS_DEF.h"
 #include "LArReadoutGeometry/HECLongBlock.h"
+#include "LArHV/HECHVManager.h"
 #include "GeoModelKernel/GeoVDetectorManager.h"
+
 class HECDetDescr;
 class HECDetectorRegion;
-class HECHVManager;
-/**
- *     @brief A manager class providing access to readout geometry information
- *     for the hadronic endcap calorimeter.
- */
 
 /**
- *	A manager for the HEC.  Provides access to:  HEC
- *	Regions, Descriptors to HEC Regions, Longitudinal HEC
- *	blocks, and top level physical volumes (or tree tops).
+ * @class HECDetectorManager
+ *
+ * @brief A manager class providing access to readout geometry information
+ * for the hadronic endcap calorimeter.
+ *
+ * A manager for the HEC.  Provides access to:  HEC
+ * Regions, Descriptors to HEC Regions, Longitudinal HEC
+ * blocks, and top level physical volumes (or tree tops).
  */
 
 class HECDetectorManager : public GeoVDetectorManager  
 {
   
  public:
-
+  
   typedef std::vector<const HECLongBlock *>::const_iterator BlockConstIterator;
   typedef std::vector<const HECDetectorRegion  *>::const_iterator DetectorRegionConstIterator;
   typedef HECDetectorRegion const * HECDetRegionArray[2][4][2];
   
-
+  
  public:
-    
+  
   
   /**
    * @brief Constructor
    */
-  HECDetectorManager(bool isTestBeam=false);
+  HECDetectorManager(const HECHVManager* hvManager=nullptr, bool isTestBeam=false);
   
   /**
    * @brief Destructor
    */
-  ~HECDetectorManager();
+  virtual ~HECDetectorManager() override;
       
   /**
    * @brief	Iterate over detector regions
@@ -67,12 +70,12 @@ class HECDetectorManager : public GeoVDetectorManager
   /**
    * @brief	Gets the ith tree top.
    */
-  virtual PVConstLink getTreeTop (unsigned int i) const;
+  virtual PVConstLink getTreeTop (unsigned int i) const override;
       
   /**
    * @brief	Gets the total number of tree tops.
    */
-  virtual unsigned int getNumTreeTops () const;
+  virtual unsigned int getNumTreeTops () const override;
       
   /**
    * @brief	Iterate over blocks.
@@ -102,7 +105,7 @@ class HECDetectorManager : public GeoVDetectorManager
   /**
    * @brief	Add a Tree Top
    */
-  virtual void addTreeTop (PVLink treeTop);
+  void addTreeTop (PVLink treeTop);
 
       
   /**
@@ -124,7 +127,7 @@ class HECDetectorManager : public GeoVDetectorManager
   /**
    * @brief	Get the HV Manager
    */
-  const HECHVManager * getHVManager() const;
+  const HECHVManager& getHVManager() const;
 
 
  private:
@@ -160,7 +163,7 @@ class HECDetectorManager : public GeoVDetectorManager
   double m_focalToRef1;
   double m_focalToRef2;
 
-  mutable const HECHVManager * m_HVManager;
+  const HECHVManager* m_HVManager;
 
   bool m_isTestBeam;
 
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx
index 9f4104ae1633..c25f0991baa8 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALDetectorManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GaudiKernel/Bootstrap.h"
@@ -10,8 +10,9 @@
 #include "LArHV/LArHVManager.h"
 #include "StoreGate/StoreGate.h"
 
-FCALDetectorManager::FCALDetectorManager ()
-  :GeoVDetectorManager(),m_HVManager(NULL)
+FCALDetectorManager::FCALDetectorManager (const FCALHVManager* hvManager)
+  : GeoVDetectorManager()
+  , m_HVManager(hvManager)
 {
   setName("LArFCAL");
   for (int s=0;s<2;s++) {
@@ -89,17 +90,9 @@ void FCALDetectorManager::addTreeTop (PVLink treeTop)
   treeTop->ref();
 }
 
-const FCALHVManager * FCALDetectorManager::getHVManager () const
+const FCALHVManager& FCALDetectorManager::getHVManager () const
 {
-
-  if (!m_HVManager) {
-    StoreGateSvc *detStore = StoreGate::pointer("DetectorStore");
-    const LArHVManager *manager = NULL;
-    if (detStore->retrieve(manager)==StatusCode::SUCCESS) {
-      m_HVManager=manager->getFCALHVManager();
-    }
-  }
-  return m_HVManager;
+  return *m_HVManager;
 }
 
 
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx
index 3178d00d838b..1fd2702b74e6 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTile.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArReadoutGeometry/FCALTile.h"
@@ -12,7 +12,6 @@
 #include "GaudiKernel/ISvcLocator.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/StoreGate.h"
-// Class FCALTile 
 
 FCALTile::FCALTile(const FCALTile &right)
   :m_module(right.m_module),m_tile(right.m_tile)
@@ -80,13 +79,13 @@ unsigned int FCALTile::getNumHVLines() const {
   return 4;
 }
 
-const FCALHVLineConstLink & FCALTile::getHVLine (unsigned int i) const {
+const FCALHVLine* FCALTile::getHVLine (unsigned int i) const {
   if (!m_line[i]) {
     
     for (unsigned int j=0;j<getNumTubes();j++) {
-      unsigned int index=getTube(j)->getHVLine()->getLineIndex();
+      unsigned int index=getTube(j)->getHVLine().getLineIndex();
       if (i==index) { 
-	m_line[i]=getTube(j)->getHVLine();
+	m_line[i]=&(getTube(j)->getHVLine());
 	break;
       }
     }
@@ -156,8 +155,8 @@ FCALTubeConstLink FCALTile::getTube (unsigned int i) const {
 
         //std::cout << " feedNumber, lineNumber " << feedNumber << " " << lineNumber << std::endl;
 	
-	const FCALHVManager *hvManager=getModule()->getManager()->getHVManager();
-	FCALHVModuleConstLink hvMod = hvManager->getHVModule(iSide,hv_moduleNumber,iSampling);
+	const FCALHVManager& hvManager=getModule()->getManager()->getHVManager();
+	const FCALHVModule& hvMod = hvManager.getHVModule(iSide,hv_moduleNumber,iSampling);
 	unsigned int index=0;
 
 	if      (lineNumber%4==0) index=0;
@@ -166,7 +165,7 @@ FCALTubeConstLink FCALTile::getTube (unsigned int i) const {
 	else if (lineNumber%4==3) index=2;
 	else throw std::runtime_error("Error in FCALTile: unrecognized HV Line");
 
-	FCALHVLineConstLink hvElec = hvMod->getHVLine(index);
+	const FCALHVLine& hvElec = hvMod.getHVLine(index);
         //std::cout << " add hvElec for index " << index << "  hvElec= " << hvElec << std::endl;
 	
 	FCALTubeConstLink tubeLink(new FCALTube(this, hvElec, (*t).second.x(),(*t).second.y()));
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTube.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTube.cxx
index 39bc4390f5d1..5ea740ebf220 100644
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTube.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALTube.cxx
@@ -1,13 +1,19 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArReadoutGeometry/FCALTube.h"
 
-
-
 // Constructor
-FCALTube::FCALTube(const FCALTile *tile, FCALHVLineConstLink hvLine, double x, double y):m_tile(tile),m_hvLine(hvLine),m_x(x), m_y(y) {
+FCALTube::FCALTube(const FCALTile *tile
+		   , const FCALHVLine& hvLine
+		   , double x
+		   , double y)
+  : m_tile(tile)
+  , m_hvLine(hvLine)
+  , m_x(x)
+  , m_y(y) 
+{
 }
 
 // Destructor
@@ -30,6 +36,6 @@ const FCALTile *FCALTube::getTile() const {
 }
 
 // Get the High Voltage Line
-FCALHVLineConstLink FCALTube::getHVLine() const {
+const FCALHVLine& FCALTube::getHVLine() const {
   return m_hvLine;
 }
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCell.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCell.cxx
index 2892686dd1bc..a7b426d79fc1 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCell.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCell.cxx
@@ -1,13 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArReadoutGeometry/HECCell.h"
 #include "LArHV/HECHVManager.h"
 #include "LArHV/HECHVModule.h"
-#include "LArHV/HECHVSubgap.h"
 #include "LArHV/HECHVDescriptor.h"
-// Class HECCell 
 
 HECCell::~HECCell()
 {
@@ -19,14 +17,14 @@ unsigned int HECCell::getNumSubgaps() const {
   return m_subgap.size();
 }
 
-const HECHVSubgapConstLink & HECCell::getSubgap (unsigned int i) const {
+const HECHVSubgap& HECCell::getSubgap (unsigned int i) const {
   if (m_subgap.size()==0) initHV();
-  return m_subgap[i];
+  return *(m_subgap[i]);
 }
 
 void HECCell::initHV() const {
 
-  const HECHVManager *hvManager=getDescriptor()->getManager()->getHVManager();
+  const HECHVManager& hvManager=getDescriptor()->getManager()->getHVManager();
 
 
   unsigned int iSide=getEndcapIndex();
@@ -34,15 +32,15 @@ void HECCell::initHV() const {
   double phiUpper = getPhiMaxNominal();
   double phiLower = getPhiMinNominal();
   double phi=fabs(phiUpper+phiLower)/2.0;
-  const CellBinning & phiBinning=hvManager->getDescriptor()->getPhiBinning();
+  const CellBinning & phiBinning=hvManager.getDescriptor().getPhiBinning();
   unsigned int iPhi = int((phi - phiBinning.getStart())/phiBinning.getDelta()) + phiBinning.getFirstDivisionNumber();
 
   unsigned int iSampling=getSamplingIndex();
 
-  HECHVModuleConstLink hvMod = hvManager->getHVModule(iSide,iPhi,iSampling);
+  const HECHVModule& hvMod = hvManager.getHVModule(iSide,iPhi,iSampling);
   for (unsigned int iSubgap=0;iSubgap<4;iSubgap++) {
-    HECHVSubgapConstLink hvElec = hvMod->getSubgap(iSubgap);
-    m_subgap.push_back(hvElec);
+    const HECHVSubgap& hvElec = hvMod.getSubgap(iSubgap);
+    m_subgap.push_back(&hvElec);
   }
 
 } 
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx
index 313f1ea19c0f..acaf30b356c2 100755
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "LArReadoutGeometry/HECDetDescr.h"
@@ -19,8 +19,10 @@
 
 // Class HECDetectorManager 
 
-HECDetectorManager::HECDetectorManager(bool isTestBeam)
-  :GeoVDetectorManager(),m_HVManager(NULL),m_isTestBeam(isTestBeam)
+HECDetectorManager::HECDetectorManager(const HECHVManager* hvManager, bool isTestBeam)
+  : GeoVDetectorManager()
+  , m_HVManager(hvManager)
+  , m_isTestBeam(isTestBeam)
 {
   setName("LArHEC");
 
@@ -165,18 +167,9 @@ void HECDetectorManager::addTreeTop (PVLink treeTop)
   treeTop->ref();
 }
 
-
-const HECHVManager * HECDetectorManager::getHVManager () const
+const HECHVManager& HECDetectorManager::getHVManager () const
 {
-
-  if (!m_HVManager) {
-    StoreGateSvc *detStore = StoreGate::pointer("DetectorStore");
-    const LArHVManager *manager = NULL;
-    if (detStore->retrieve(manager)==StatusCode::SUCCESS) {
-      m_HVManager=manager->getHECHVManager();
-    }
-  }
-  return m_HVManager;
+  return *m_HVManager;
 }
 
 
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx
index a87724aaf8e4..c98c881f986d 100755
--- a/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx
@@ -29,11 +29,9 @@
 #include "LArHV/EMECPresamplerHVModule.h"
 #include "LArReadoutGeometry/HECCell.h"
 #include "LArHV/HECHVManager.h"
-#include "LArHV/HECHVSubgapConstLink.h"
 #include "LArHV/HECHVSubgap.h"
 #include "LArReadoutGeometry/FCALTile.h"
 #include "LArHV/FCALHVManager.h"
-#include "LArHV/FCALHVLineConstLink.h"
 #include "LArHV/FCALHVLine.h"
 
 #include "LArHV/LArHVManager.h"
@@ -562,10 +560,10 @@ StatusCode LArHVCondAlg::fillPayload(LArHVData* hvdata, const LArHVData* hvdataO
     double wt = 1./nsubgaps;
     //std::cout << " nsubgaps " << nsubgaps << std::endl;
     for (unsigned int i=0;i<nsubgaps;i++) {
-        const HECHVSubgapConstLink subgap = cell->getSubgap(i);
-        const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), subgap->hvLineNo());
+        const HECHVSubgap& subgap = cell->getSubgap(i);
+        const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), subgap.hvLineNo());
         if(itrLine == hvlineidx.end()) { // error, could not find HVline index
-           ATH_MSG_ERROR("Do not have hvline: "<<subgap->hvLineNo()<<" in LArHVData mapping !!!");
+           ATH_MSG_ERROR("Do not have hvline: "<<subgap.hvLineNo()<<" in LArHVData mapping !!!");
            return StatusCode::FAILURE;
         }
         unsigned idx = itrLine - hvlineidx.begin(); 
@@ -630,14 +628,14 @@ StatusCode LArHVCondAlg::fillPayload(LArHVData* hvdata, const LArHVData* hvdataO
       unsigned int nlines = tile->getNumHVLines();
       unsigned int nlines_found=0;
       for (unsigned int i=0;i<nlines;i++) {
-        const FCALHVLineConstLink line = tile->getHVLine(i);
+        const FCALHVLine* line = tile->getHVLine(i);
         if (line) nlines_found++;
       }
       //std::cout << " nlines " << nlines << " " << nlines_found << std::endl;
       if (nlines_found>0) {
         double wt = 1./nlines_found;
         for (unsigned int i=0;i<nlines;i++) {
-          const FCALHVLineConstLink line = tile->getHVLine(i);
+          const FCALHVLine* line = tile->getHVLine(i);
           if (!line) continue;
           const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), line->hvLineNo());
           if(itrLine == hvlineidx.end()) { // error, could not find HVline index
@@ -1224,11 +1222,11 @@ StatusCode LArHVCondAlg::searchNonNominalHV_HEC(CaloAffectedRegionInfoVec *vAffe
 
   if (detStore()->retrieve(manager)==StatusCode::SUCCESS) {
   
-    const HECHVManager* hvManager_HEC=manager->getHECHVManager();
+    const HECHVManager& hvManager_HEC=manager->getHECHVManager();
     
-    for (unsigned int iSide=hvManager_HEC->beginSideIndex();iSide<hvManager_HEC->endSideIndex();iSide++) { // loop over HV modules      
-      for (unsigned int iPhi=hvManager_HEC->beginPhiIndex();iPhi<hvManager_HEC->endPhiIndex();iPhi++) {
-	for (unsigned int iSampling=hvManager_HEC->beginSamplingIndex();iSampling<hvManager_HEC->endSamplingIndex();iSampling++) {
+    for (unsigned int iSide=hvManager_HEC.beginSideIndex();iSide<hvManager_HEC.endSideIndex();iSide++) { // loop over HV modules      
+      for (unsigned int iPhi=hvManager_HEC.beginPhiIndex();iPhi<hvManager_HEC.endPhiIndex();iPhi++) {
+	for (unsigned int iSampling=hvManager_HEC.beginSamplingIndex();iSampling<hvManager_HEC.endSamplingIndex();iSampling++) {
           float eta_min,eta_max;
           if (iSide==1) {
            eta_min = etamin_layer[iSampling];
@@ -1238,15 +1236,15 @@ StatusCode LArHVCondAlg::searchNonNominalHV_HEC(CaloAffectedRegionInfoVec *vAffe
            eta_max = -1.*etamin_layer[iSampling];
          }
 
-	  HECHVModuleConstLink hvMod = hvManager_HEC->getHVModule(iSide,iPhi,iSampling);
+	  const HECHVModule& hvMod = hvManager_HEC.getHVModule(iSide,iPhi,iSampling);
           ATH_MSG_DEBUG(" iSide,iPhi,iSampling " << iSide << " " << iPhi << " " << iSampling);
 
 	  double hv[4] = {0}; // 4 subgaps in HEC
-	  for (unsigned int iGap=0;iGap<hvMod->getNumSubgaps();iGap++) {
-	    HECHVSubgapConstLink subgap=hvMod->getSubgap(iGap);
-            const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), subgap->hvLineNo());
+	  for (unsigned int iGap=0;iGap<hvMod.getNumSubgaps();iGap++) {
+	    const HECHVSubgap& subgap=hvMod.getSubgap(iGap);
+            const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), subgap.hvLineNo());
             if(itrLine == hvlineidx.end()) { // error, could not find HVline index
-              ATH_MSG_ERROR("Do not have hvline: "<<subgap->hvLineNo()<<" in LArHVData !!!");
+              ATH_MSG_ERROR("Do not have hvline: "<<subgap.hvLineNo()<<" in LArHVData !!!");
               return StatusCode::FAILURE;
             }
 	    if(iGap<4) hv[iGap]=voltage[itrLine - hvlineidx.begin()];
@@ -1262,8 +1260,8 @@ StatusCode LArHVCondAlg::searchNonNominalHV_HEC(CaloAffectedRegionInfoVec *vAffe
           ATH_MSG_DEBUG(" HV values " << hv[0] << " " << hv[1] << " " << hv[2] << " " << hv[3] << " " 
                         << " isDead/isAffected " << isDead << " " << isAffected);
 
-          float phiMin = CaloPhiRange::fix(hvMod->getPhiMin());
-          float phiMax = CaloPhiRange::fix(hvMod->getPhiMax());
+          float phiMin = CaloPhiRange::fix(hvMod.getPhiMin());
+          float phiMax = CaloPhiRange::fix(hvMod.getPhiMax());
 
 
 	  if (isDead) { //stores it, DEAD means all hvs < threshold
@@ -1293,19 +1291,19 @@ StatusCode LArHVCondAlg::searchNonNominalHV_FCAL(CaloAffectedRegionInfoVec *vAff
   const LArHVManager *manager = nullptr;
   if (detStore()->retrieve(manager)==StatusCode::SUCCESS) {  
     
-    const FCALHVManager *hvManager_FCAL=manager->getFCALHVManager();
+    const FCALHVManager& hvManager_FCAL=manager->getFCALHVManager();
     
-    for (unsigned int iSide=hvManager_FCAL->beginSideIndex();iSide<hvManager_FCAL->endSideIndex();iSide++) { // loop over HV modules
+    for (unsigned int iSide=hvManager_FCAL.beginSideIndex();iSide<hvManager_FCAL.endSideIndex();iSide++) { // loop over HV modules
       float eta_min=3.1,eta_max=4.9;
       if (iSide==0) {
          eta_min=-4.9;
          eta_max=-3.1;
       }
-      for (unsigned int iSampling=hvManager_FCAL->beginSamplingIndex();iSampling<hvManager_FCAL->endSamplingIndex();iSampling++) {
+      for (unsigned int iSampling=hvManager_FCAL.beginSamplingIndex();iSampling<hvManager_FCAL.endSamplingIndex();iSampling++) {
         float HVnominal = HV_nominal("FCAL",(float)(iSampling));
-	for (unsigned int iSector=hvManager_FCAL->beginSectorIndex(iSampling);iSector<hvManager_FCAL->endSectorIndex(iSampling);iSector++) {
+	for (unsigned int iSector=hvManager_FCAL.beginSectorIndex(iSampling);iSector<hvManager_FCAL.endSectorIndex(iSampling);iSector++) {
 
-	  FCALHVModuleConstLink hvMod = hvManager_FCAL->getHVModule(iSide,iSector,iSampling);
+	  const FCALHVModule& hvMod = hvManager_FCAL.getHVModule(iSide,iSector,iSampling);
           ATH_MSG_DEBUG(" FCAL HVModule side,sampling,sector " << iSide << " " << iSampling << " " 
                         << iSector << "   HV nominal " << HVnominal);
  
@@ -1317,13 +1315,13 @@ StatusCode LArHVCondAlg::searchNonNominalHV_FCAL(CaloAffectedRegionInfoVec *vAff
           float phi_max = CaloPhiRange::fix(dphi+phi_min);
         
           ATH_MSG_DEBUG(" eta_min,eta_max,phi_min,phi_max " << eta_min << " " << eta_max << " " << phi_min 
-                        << " " << phi_max << "   number of lines " << hvMod->getNumHVLines());
+                        << " " << phi_max << "   number of lines " << hvMod.getNumHVLines());
           float hv[4] = {0};
-	  for (unsigned int iLine=0;iLine<hvMod->getNumHVLines();iLine++) {
-	    FCALHVLineConstLink hvline = hvMod->getHVLine(iLine);
-            const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), hvline->hvLineNo());
+	  for (unsigned int iLine=0;iLine<hvMod.getNumHVLines();iLine++) {
+	    const FCALHVLine& hvline = hvMod.getHVLine(iLine);
+            const std::vector<unsigned int>::const_iterator itrLine=std::find(hvlineidx.begin(), hvlineidx.end(), hvline.hvLineNo());
             if(itrLine == hvlineidx.end()) { // error, could not find HVline index
-              ATH_MSG_ERROR("Do not have hvline: "<<hvline->hvLineNo()<<" in LArHVData !!!");
+              ATH_MSG_ERROR("Do not have hvline: "<<hvline.hvLineNo()<<" in LArHVData !!!");
               return StatusCode::FAILURE;
             }
 	    if (iLine<4) hv[iLine] = voltage[itrLine - hvlineidx.begin()];
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx
index 522d7a9c9bf3..bb453b5bac37 100755
--- a/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx
@@ -270,8 +270,8 @@ LArHVPathologyDbCondAlg::fillElectMap(const CaloDetDescrManager* calodetdescrmgr
         list.clear();
         HVline = m_hvlineHelper->hv_line(hwid);
         for (unsigned int i=0;i<nsubgaps;i++) {
-          const HECHVSubgapConstLink subgap = cell->getSubgap(i);
-          if ((unsigned)subgap->hvLineNo()==HVline) {
+          const HECHVSubgap& subgap = cell->getSubgap(i);
+          if ((unsigned)subgap.hvLineNo()==HVline) {
             list.push_back(i);
           }
         }
@@ -291,7 +291,7 @@ LArHVPathologyDbCondAlg::fillElectMap(const CaloDetDescrManager* calodetdescrmgr
          list.clear();
          HVline = m_hvlineHelper->hv_line(hwid);
          for (unsigned int i=0;i<nlines;i++) {
-           const FCALHVLineConstLink line2 = tile->getHVLine(i);
+           const FCALHVLine* line2 = tile->getHVLine(i);
            if (line2) {
              if ((unsigned)line2->hvLineNo()==HVline) {
                list.push_back(i);
diff --git a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx
index 71f911e1e116..e887ef28dc02 100755
--- a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx
+++ b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx
@@ -189,8 +189,8 @@ public:
 
   std::map < SoNode *, const EMBHVElectrode*>  EMBHVMap;
   std::map < SoNode *, const EMECHVElectrode*> EMECHVMap;
-  std::map < SoNode *, FCALHVLineConstLink>      FCALHVMap;
-  std::map < SoNode *, HECHVSubgapConstLink>     HECHVMap;
+  std::map < SoNode *, const FCALHVLine*>      FCALHVMap;
+  std::map < SoNode *, const HECHVSubgap*>     HECHVMap;
 
   VP1CaloReadoutSystem::POSITION pos;
 
@@ -1024,14 +1024,14 @@ void VP1CaloReadoutSystem::createHV() {
 
 
   const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr();
-  const HECHVManager *  hecHVManager  = larHVManager->getHECHVManager();
-  for (unsigned int e=hecHVManager->beginSideIndex();e!=hecHVManager->endSideIndex();e++) {
-    for (unsigned int s=hecHVManager->beginSamplingIndex();s!=hecHVManager->endSamplingIndex();s++) {
-      for (unsigned int p=hecHVManager->beginPhiIndex();p!=hecHVManager->endPhiIndex();p++) {
-	HECHVModuleConstLink hecMod=hecHVManager->getHVModule(e,p,s);
-	for (unsigned int i=0;i<hecMod->getNumSubgaps();i++) {
-	  HECHVSubgapConstLink subgap = hecMod->getSubgap(i);
-	  double voltage = subgap->voltage();
+  const HECHVManager&  hecHVManager  = larHVManager->getHECHVManager();
+  for (unsigned int e=hecHVManager.beginSideIndex();e!=hecHVManager.endSideIndex();e++) {
+    for (unsigned int s=hecHVManager.beginSamplingIndex();s!=hecHVManager.endSamplingIndex();s++) {
+      for (unsigned int p=hecHVManager.beginPhiIndex();p!=hecHVManager.endPhiIndex();p++) {
+	const HECHVModule& hecMod=hecHVManager.getHVModule(e,p,s);
+	for (unsigned int i=0;i<hecMod.getNumSubgaps();i++) {
+	  const HECHVSubgap& subgap = hecMod.getSubgap(i);
+	  double voltage = subgap.voltage();
 	  double nominalVoltage = m_clockwork->ui.hecNominalSpinBox->value();
 	  bool outOfTolerance = fabs(voltage-nominalVoltage) > double (tolerance);
 	  bool missing        = voltage == -99999;
@@ -1052,8 +1052,8 @@ void VP1CaloReadoutSystem::createHV() {
 
 
 	  double z =  z0 + i*(z1-z0)/4;
-	  double phiMin = hecMod->getPhiMin();
-	  double phiMax = hecMod->getPhiMax();
+	  double phiMin = hecMod.getPhiMin();
+	  double phiMax = hecMod.getPhiMax();
 	  double rMax   = 2130;
 	  double rMin   = s==0 ? 371 : 474;
 
@@ -1077,88 +1077,84 @@ void VP1CaloReadoutSystem::createHV() {
 	  else {
 	    m_clockwork->hecNormalSep[s]->addChild(ls);
 	  }
-	  m_clockwork->HECHVMap[ls]=subgap;
+	  m_clockwork->HECHVMap[ls]=&subgap;
 
 	}
       }
     }
   }
 
-  const FCALHVManager * fcalHVManager = larHVManager->getFCALHVManager();
-  for (unsigned int e=fcalHVManager->beginSideIndex();e!=fcalHVManager->endSideIndex();e++) {
-    for (unsigned int s=fcalHVManager->beginSamplingIndex();s!=fcalHVManager->endSamplingIndex();s++) {
-      for (unsigned int x=fcalHVManager->beginSectorIndex(s);x!=fcalHVManager->endSectorIndex(s);x++) {
-	FCALHVModuleConstLink fcalMod=fcalHVManager->getHVModule(e,x,s);
-	if (fcalMod) {
-	  for (unsigned int l=0;l<fcalMod->getNumHVLines();l++) {
-	    FCALHVLineConstLink fcalLine=fcalMod->getHVLine(l);
-	    if (fcalLine) {
-	      double voltage = fcalLine->voltage();
-
-	      //
-	      // Determine whether this is in bounds, or not..
-	      //
-
-	      const QSpinBox *fcalSpin[] = {m_clockwork->ui.fcal1NominalSpinBox,m_clockwork->ui.fcal2NominalSpinBox,m_clockwork->ui.fcal3NominalSpinBox};
-	      const QSpinBox *spinBox=fcalSpin[s];
-	      double nominalVoltage = double (spinBox->value());
-
-	      bool outOfTolerance = fabs(voltage-nominalVoltage) > double(tolerance);
-	      bool missing        = voltage == -99999;
-
-	      //
-	      // Loop over every single tube in the system.  If the tube is associated with the HV Line then put a dot where the tube is:
-	      //
-	      const FCALDetectorManager *fcalManager=VP1DetInfo::fcalDetMgr();
-	      if (fcalManager) {
-		FCALDetectorManager::ConstIterator e;
-		for (e=fcalManager->beginFCAL();e!=fcalManager->endFCAL();  e++) {
-
-		  const FCALModule *fcalMod = *e;
-		  const HepGeom::Transform3D &xf =  Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
-
-		  SoTransform  *XF = VP1LinAlgUtils::toSoTransform(xf);
-		  SoSeparator  *sep = new SoSeparator();
-		  sep->addChild(XF);
-
-		  SoVertexProperty *vtxProperty = new SoVertexProperty();
-		  int cc=0;
-
-		  FCALModule::ConstIterator   t;
-		  for (t=fcalMod->beginTiles();t!=fcalMod->endTiles();t++) {
-
-		    double zf = fcalMod->getEndcapIndex()== 0 ?  +fcalMod->getFullDepthZ(*t)/2.0 : -fcalMod->getFullDepthZ(*t)/2.0;
-		    //		    double zc = 0;
-		    //              double zb = fcalMod->getEndcapIndex()== 0 ?  -fcalMod->getFullDepthZ(*t)/2.0 : +fcalMod->getFullDepthZ(*t)/2.0;
-
-		    double z=zf;
-		    //if (m_clockwork->pos==CENTER) z=zc;
-		    //if (m_clockwork->pos==BACK)   z=zb;
-
-		    for (unsigned int p=0;p<(*t).getNumTubes();p++) {
-		      FCALTubeConstLink   T    = (*t).getTube(p);
-		      FCALHVLineConstLink Line = T->getHVLine();
-		      if (Line==fcalLine) {
-			vtxProperty->vertex.set1Value(cc++,  SbVec3f(T->getXLocal(),T->getYLocal(),z));
-		      }
-		    }
-		  }
-		  SoPointSet *ps = new SoPointSet();
-		  ps->numPoints=cc;
-		  ps->vertexProperty=vtxProperty;
-		  sep->addChild(ps);
-		  if (missing) {
-		    m_clockwork->fcalMissingSep[fcalMod->getModuleIndex()-1]->addChild(sep);
-		  }
-		  else if (outOfTolerance) {
-		    m_clockwork->fcalBadSep[fcalMod->getModuleIndex()-1]->addChild(sep);
-		  }
-		  else {
-		    m_clockwork->fcalNormalSep[fcalMod->getModuleIndex()-1]->addChild(sep);
+  const FCALHVManager& fcalHVManager = larHVManager->getFCALHVManager();
+  for (unsigned int e=fcalHVManager.beginSideIndex();e!=fcalHVManager.endSideIndex();e++) {
+    for (unsigned int s=fcalHVManager.beginSamplingIndex();s!=fcalHVManager.endSamplingIndex();s++) {
+      for (unsigned int x=fcalHVManager.beginSectorIndex(s);x!=fcalHVManager.endSectorIndex(s);x++) {
+	const FCALHVModule& fcalMod=fcalHVManager.getHVModule(e,x,s);
+	for (unsigned int l=0;l<fcalMod.getNumHVLines();l++) {
+	  const FCALHVLine& fcalLine=fcalMod.getHVLine(l);
+	  double voltage = fcalLine.voltage();
+	    
+	  //
+	  // Determine whether this is in bounds, or not..
+	  //
+	  
+	  const QSpinBox *fcalSpin[] = {m_clockwork->ui.fcal1NominalSpinBox,m_clockwork->ui.fcal2NominalSpinBox,m_clockwork->ui.fcal3NominalSpinBox};
+	  const QSpinBox *spinBox=fcalSpin[s];
+	  double nominalVoltage = double (spinBox->value());
+	  
+	  bool outOfTolerance = fabs(voltage-nominalVoltage) > double(tolerance);
+	  bool missing        = voltage == -99999;
+	  
+	  //
+	  // Loop over every single tube in the system.  If the tube is associated with the HV Line then put a dot where the tube is:
+	  //
+	  const FCALDetectorManager *fcalManager=VP1DetInfo::fcalDetMgr();
+	  if (fcalManager) {
+	    FCALDetectorManager::ConstIterator e;
+	    for (e=fcalManager->beginFCAL();e!=fcalManager->endFCAL();  e++) {
+	      
+	      const FCALModule *fcalMod = *e;
+	      const HepGeom::Transform3D &xf =  Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform());
+	      
+	      SoTransform  *XF = VP1LinAlgUtils::toSoTransform(xf);
+	      SoSeparator  *sep = new SoSeparator();
+	      sep->addChild(XF);
+	      
+	      SoVertexProperty *vtxProperty = new SoVertexProperty();
+	      int cc=0;
+	      
+	      FCALModule::ConstIterator   t;
+	      for (t=fcalMod->beginTiles();t!=fcalMod->endTiles();t++) {
+		
+		double zf = fcalMod->getEndcapIndex()== 0 ?  +fcalMod->getFullDepthZ(*t)/2.0 : -fcalMod->getFullDepthZ(*t)/2.0;
+		//		    double zc = 0;
+		//              double zb = fcalMod->getEndcapIndex()== 0 ?  -fcalMod->getFullDepthZ(*t)/2.0 : +fcalMod->getFullDepthZ(*t)/2.0;
+		
+		double z=zf;
+		//if (m_clockwork->pos==CENTER) z=zc;
+		//if (m_clockwork->pos==BACK)   z=zb;
+		
+		for (unsigned int p=0;p<(*t).getNumTubes();p++) {
+		  FCALTubeConstLink   T    = (*t).getTube(p);
+		  const FCALHVLine& Line = T->getHVLine();
+		  if (&Line==&fcalLine) {
+		    vtxProperty->vertex.set1Value(cc++,  SbVec3f(T->getXLocal(),T->getYLocal(),z));
 		  }
-		  m_clockwork->FCALHVMap[ps]=fcalLine;
 		}
 	      }
+	      SoPointSet *ps = new SoPointSet();
+	      ps->numPoints=cc;
+	      ps->vertexProperty=vtxProperty;
+	      sep->addChild(ps);
+	      if (missing) {
+		m_clockwork->fcalMissingSep[fcalMod->getModuleIndex()-1]->addChild(sep);
+	      }
+	      else if (outOfTolerance) {
+		m_clockwork->fcalBadSep[fcalMod->getModuleIndex()-1]->addChild(sep);
+	      }
+	      else {
+		m_clockwork->fcalNormalSep[fcalMod->getModuleIndex()-1]->addChild(sep);
+	      }
+	      m_clockwork->FCALHVMap[ps]=&fcalLine;
 	    }
 	  }
 	}
@@ -1704,23 +1700,23 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick
 
   // HEC HV
   {
-    std::map < SoNode *, HECHVSubgapConstLink>::const_iterator p = m_clockwork->HECHVMap.find(mySelectedNode);
+    std::map < SoNode *, const HECHVSubgap*>::const_iterator p = m_clockwork->HECHVMap.find(mySelectedNode);
     if (p!=m_clockwork->HECHVMap.end()) {
 
-      HECHVSubgapConstLink subgap  = (*p).second;
+      const HECHVSubgap* subgap  = (*p).second;
       std::ostringstream outstream;
-      outstream << "Side: " << subgap->getModule()->getSideIndex() << " Phi: " << subgap->getModule()->getPhiIndex() << " Sampling: " << subgap->getModule()->getSamplingIndex() << " Subgap: " << subgap->getSubgapIndex() << "Voltage: " << subgap->voltage() << "; current: " << subgap->current();
+      outstream << "Side: " << subgap->getModule().getSideIndex() << " Phi: " << subgap->getModule().getPhiIndex() << " Sampling: " << subgap->getModule().getSamplingIndex() << " Subgap: " << subgap->getSubgapIndex() << "Voltage: " << subgap->voltage() << "; current: " << subgap->current();
       message (outstream.str().c_str());
     }
   }
   // FCAL HV
   {
-    std::map < SoNode *, FCALHVLineConstLink>::const_iterator p = m_clockwork->FCALHVMap.find(mySelectedNode);
+    std::map < SoNode *, const FCALHVLine*>::const_iterator p = m_clockwork->FCALHVMap.find(mySelectedNode);
     if (p!=m_clockwork->FCALHVMap.end()) {
 
-      FCALHVLineConstLink line  = (*p).second;
+      const FCALHVLine* line  = (*p).second;
       std::ostringstream outstream;
-      outstream << "Side: " << line->getModule()->getSideIndex() << " Sector: " << line->getModule()->getSectorIndex() << " Sampling: " << line->getModule()->getSamplingIndex() << " Line: " << line->getLineIndex() << "Voltage: " << line->voltage() << "; current: " << line->current();
+      outstream << "Side: " << line->getModule().getSideIndex() << " Sector: " << line->getModule().getSectorIndex() << " Sampling: " << line->getModule().getSamplingIndex() << " Line: " << line->getLineIndex() << "Voltage: " << line->voltage() << "; current: " << line->current();
       message (outstream.str().c_str());
     }
   }
@@ -1860,19 +1856,17 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick
 	highVoltageStream << "There are " << element->getNumSubgaps() << " subgaps. Status: " << std::endl;
 	message (highVoltageStream.str().c_str());
       }
-      std::set<HECHVModuleConstLink> modSet;
+      std::set<const HECHVModule*> modSet;
       for (unsigned int i=0;i<element->getNumSubgaps();i++) {
 	if (m_clockwork->ui.highVoltageCheckBox->isChecked()) {
 	  std::ostringstream highVoltageStream;
-	  highVoltageStream << i << " Status "  << element->getSubgap(i)->hvOn() << " voltage: " << element->getSubgap(i)->voltage() << " current: " << element->getSubgap(i)->current() <<  std::endl;
+	  highVoltageStream << i << " Status "  << element->getSubgap(i).hvOn() << " voltage: " << element->getSubgap(i).voltage() << " current: " << element->getSubgap(i).current() <<  std::endl;
 	  message(highVoltageStream.str().c_str());
 	}
 	//
 	// Now let's show the module, and where she is:
 	//
-	HECHVModuleConstLink module = element->getSubgap(i)->getModule();
-
-	if (!module) continue;
+	const HECHVModule& module = element->getSubgap(i).getModule();
 
 	if (!m_clockwork->ui.highVoltageCheckBox->isChecked()) continue;
 
@@ -1900,8 +1894,8 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick
 	const HepGeom::Transform3D &XF= Amg::EigenTransformToCLHEP(region->getAbsoluteTransform());
 	double z = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(HECCell::FRONT))).z();
 
-	double phiMin = module->getPhiMin();
-	double phiMax = module->getPhiMax();
+	double phiMin = module.getPhiMin();
+	double phiMax = module.getPhiMax();
 
 
 	double rMax=2130;
@@ -1910,8 +1904,8 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick
 	sep->addChild(white);
 	sep->addChild(drawStyle);
 	sep->addChild(lm);
-	if (modSet.find(module)==modSet.end()) {
-	  modSet.insert(module);
+	if (modSet.find(&module)==modSet.end()) {
+	  modSet.insert(&module);
 	  int cc=0;
 	  SoVertexProperty *vtxProperty = new SoVertexProperty();
 	  vtxProperty->vertex.set1Value(cc++,  SbVec3f(rMin*cos(phiMin),rMin*sin(phiMin)  ,z));
-- 
GitLab


From a27e5e442250b8763e1c8f2483afdb83f58a4344 Mon Sep 17 00:00:00 2001
From: pliu <pliu@cern.ch>
Date: Mon, 22 Apr 2019 11:09:55 -0700
Subject: [PATCH 021/129] ported new flags for IDPIXLUMI to master

---
 .../python/DxAODPixLumiJobProperties.py       | 34 +++++++++++++++++++
 .../PrimaryDPDMaker/share/DAOD_IDPIXLUMI.py   |  6 ++--
 2 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 PhysicsAnalysis/PrimaryDPDMaker/python/DxAODPixLumiJobProperties.py

diff --git a/PhysicsAnalysis/PrimaryDPDMaker/python/DxAODPixLumiJobProperties.py b/PhysicsAnalysis/PrimaryDPDMaker/python/DxAODPixLumiJobProperties.py
new file mode 100644
index 000000000000..be571a6ea75f
--- /dev/null
+++ b/PhysicsAnalysis/PrimaryDPDMaker/python/DxAODPixLumiJobProperties.py
@@ -0,0 +1,34 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+## @file PrimaryDPDMaker/python/DxAODPixLumiJobProperties.py
+## @brief Python module to hold common flags to configure xAOD-making jobOptions
+##
+
+""" DxAODPixLumiJobProperties
+    Python module to hold common flags to configure ID xAOD-making jobOptions.
+
+"""
+
+
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from AthenaCommon.JobProperties import jobproperties
+
+class DxAODPixLumiJobPropertyContainer(JobPropertyContainer):
+    """ The jobProperty container for DxAODPixLumi-making flags """
+jobproperties.add_Container(DxAODPixLumiJobPropertyContainer)
+
+class DumpPixelInfo(JobProperty):
+    """write out pixel info """
+    statusOn = True
+    allowedTypes = ["bool"]
+    StoredValue = True
+jobproperties.DxAODPixLumiJobPropertyContainer.add_JobProperty(DumpPixelInfo)
+
+class ModulesSelection(JobProperty):
+    """Z event selection based on DRAW ZMUMU"""
+    statusOn = True
+    allowedTypes = ['str']
+    StoredValue = "(PixelClusters.layer == 0) && ((PixelClusters.eta_module >= -10 && PixelClusters.eta_module <= -6) || (PixelClusters.eta_module >= 5 && PixelClusters.eta_module <= 9)) && (((PixelClusters.eta_module <= -7||PixelClusters.eta_module >= 6) && (PixelClusters.eta_pixel_index > 0 && (PixelClusters.eta_pixel_index + PixelClusters.sizeZ-1) < 79)) || ((PixelClusters.eta_module > -7 && PixelClusters.eta_module < 6) && (PixelClusters.eta_pixel_index > 0 && (PixelClusters.eta_pixel_index + PixelClusters.sizeZ - 1) < 159))) && (PixelClusters.phi_pixel_index > 0 && (PixelClusters.phi_pixel_index + PixelClusters.sizePhi-1) < 335)"
+jobproperties.DxAODPixLumiJobPropertyContainer.add_JobProperty(ModulesSelection)
+
+DxAODPixLumiFlags = jobproperties.DxAODPixLumiJobPropertyContainer
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DAOD_IDPIXLUMI.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DAOD_IDPIXLUMI.py
index 91ae4fbeffbe..81d24d3f1ec3 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DAOD_IDPIXLUMI.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DAOD_IDPIXLUMI.py
@@ -4,8 +4,10 @@
 ## Load common flags
 from AthenaCommon.JobProperties import jobproperties as athCommonFlags
 
+from PrimaryDPDMaker.DxAODPixLumiJobProperties import DxAODPixLumiFlags
+
 # Select active sub-systems
-dumpPixInfo=True
+dumpPixInfo = DxAODPixLumiFlags.DumpPixelInfo()
 
 # Print settings for main tools
 printIdTrkDxAODConf = True
@@ -105,7 +107,7 @@ thinningTools = []
 
 if dumpPixInfo: 
     from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackMeasurementThinning
-    thinning_expression = "(PixelClusters.layer == 0) && ((PixelClusters.eta_module >= -10 && PixelClusters.eta_module <= -5) || (PixelClusters.eta_module >= 4 && PixelClusters.eta_module <= 9))"
+    thinning_expression = DxAODPixLumiFlags.ModulesSelection()
     IDPIXLUMIThinningTool = DerivationFramework__TrackMeasurementThinning( name = "IDPIXLUMIThinningTool",
         ThinningService = IDPIXLUMIThinningHelper.ThinningSvc(),
         SelectionString = thinning_expression,
-- 
GitLab


From 369959979cb39a840b17e0a941309919492e493c Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Apr 2019 16:27:09 +0200
Subject: [PATCH 022/129] CaloCellCorrection: Preparing to make CaloDD
 immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
---
 .../CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx   | 4 +---
 .../CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h     | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx
index d25efaf6153d..6449966eba2c 100755
--- a/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx
+++ b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx
@@ -32,7 +32,6 @@ CaloCellNeighborsAverageCorr::CaloCellNeighborsAverageCorr(
 			     const std::string& name, 
 			     const IInterface* parent)
   :base_class(type, name, parent),
-   m_calo_dd_man(nullptr),
    m_calo_id(nullptr),
    m_tile_id(nullptr)
 {
@@ -66,8 +65,7 @@ StatusCode CaloCellNeighborsAverageCorr::initialize()
   ATH_MSG_INFO ( "Skip Dead Tile   = " << ((m_skipDeadTile)?"true":"false")   );
 
   
-  m_calo_dd_man  = CaloDetDescrManager::instance();
-  m_calo_id   = m_calo_dd_man->getCaloCell_ID();  
+  ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") );
   m_tile_id   = m_calo_id->tile_idHelper();
 
   ATH_MSG_INFO ( "CaloCellNeighborsAverageCorr initialize() end" );
diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h
index c3d0cc15568c..2f47c5b776b8 100755
--- a/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h
+++ b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h
@@ -40,7 +40,6 @@ public:
 
 private:
 
- const CaloDetDescrManager* m_calo_dd_man;
  const CaloCell_ID* m_calo_id;
  const TileID* m_tile_id;
  bool m_testMode;
-- 
GitLab


From ed0e2f2077e3018f7f71759a9e2cfbabab885678 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Apr 2019 16:27:38 +0200
Subject: [PATCH 023/129] CaloCalibHitRec: Preparing to make CaloDD immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
---
 Calorimeter/CaloCalibHitRec/CMakeLists.txt    |  3 +-
 .../CaloCalibHitRec/CalibHitToCaloCell.h      |  2 -
 .../CaloCalibClusterMomentsMaker.h            |  4 +-
 .../CaloCalibClusterMomentsMaker2.h           |  4 +-
 .../CaloCalibHitRec/CaloDmEnergy.h            |  3 -
 .../CaloCalibHitRec/CaloDmNeighbours.h        |  5 +-
 .../src/CalibHitToCaloCell.cxx                | 13 +--
 .../src/CaloCalibClusterMomentsMaker.cxx      | 18 ++--
 .../src/CaloCalibClusterMomentsMaker2.cxx     | 13 ++-
 .../CaloCalibHitRec/src/CaloDmEnergy.cxx      | 87 ++-----------------
 .../CaloCalibHitRec/src/CaloDmNeighbours.cxx  | 20 +++--
 11 files changed, 48 insertions(+), 124 deletions(-)

diff --git a/Calorimeter/CaloCalibHitRec/CMakeLists.txt b/Calorimeter/CaloCalibHitRec/CMakeLists.txt
index ae0c99da1eb3..cc0504e37e5d 100644
--- a/Calorimeter/CaloCalibHitRec/CMakeLists.txt
+++ b/Calorimeter/CaloCalibHitRec/CMakeLists.txt
@@ -16,6 +16,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/StoreGate
                           DetectorDescription/Identifier
                           Event/xAOD/xAODCaloEvent
+                          Control/CxxUtils
                           GaudiKernel
                           PRIVATE
                           Calorimeter/CaloDetDescr
@@ -35,7 +36,7 @@ atlas_add_component( CaloCalibHitRec
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDmDetDescr CaloGeoHelpers CaloIdentifier CaloRecLib CaloSimEvent AthenaBaseComps StoreGateLib SGtests Identifier xAODCaloEvent GaudiKernel CaloDetDescrLib CaloEvent AthenaKernel AtlasDetDescr LArRecEvent McParticleEvent TileEvent PathResolver )
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloDmDetDescr CaloGeoHelpers CaloIdentifier CaloRecLib CaloSimEvent AthenaBaseComps StoreGateLib SGtests Identifier xAODCaloEvent GaudiKernel CaloDetDescrLib CaloEvent AthenaKernel AtlasDetDescr LArRecEvent McParticleEvent TileEvent PathResolver CxxUtils )
 
 # Install files from the package:
 atlas_install_headers( CaloCalibHitRec )
diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CalibHitToCaloCell.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CalibHitToCaloCell.h
index 3a5e8a8edd10..dd7e8c4b2d89 100755
--- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CalibHitToCaloCell.h
+++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CalibHitToCaloCell.h
@@ -72,8 +72,6 @@ private:
     //const LArHEC_ID*    m_larHec_ID;
     //const LArFCAL_ID*   m_larFcal_ID;
 
-    const CaloDetDescrManager*   m_caloDDMgr;
-
     std::vector<LArCell*> m_Cells_Tot;
     std::vector<LArCell*> m_Cells_Vis;
     std::vector<LArCell*> m_Cells_Em;
diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h
index f83c3f4aca39..06fcbc1850af 100644
--- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h
+++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CALOCALIBCLUSTERMOMENTSMAKER_H
@@ -126,8 +126,6 @@ class CaloCalibClusterMomentsMaker: public AthAlgTool, virtual public CaloCluste
    * hits outside the calorimeter systems - i.e. dead material hits ... */
   SG::ReadHandleKeyArray<CaloCalibrationHitContainer> m_DMCalibrationHitContainerNames;
 
-  const CaloDetDescrManager* m_calo_dd_man; 
-
   const CaloCell_ID* m_calo_id;
 
   const CaloDM_ID*    m_caloDM_ID;
diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h
index 36df2b4c0e8e..c394ec6721ff 100644
--- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h
+++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CALOCALIBCLUSTERMOMENTSMAKER2_H
@@ -200,8 +200,6 @@ class CaloCalibClusterMomentsMaker2: public AthAlgTool, virtual public CaloClust
   /** ReadHandleKey for truth particle container */
   SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleContainerKey{this,"TruthParticles","TruthParticles","ReadHandleKey for truth particle container"};
   
-  const CaloDetDescrManager* m_calo_dd_man; 
-
   const CaloCell_ID* m_calo_id;
 
   const CaloDM_ID*    m_caloDM_ID;
diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmEnergy.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmEnergy.h
index 6e9153d108b7..f5cca40646f0 100644
--- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmEnergy.h
+++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmEnergy.h
@@ -143,7 +143,6 @@ class CaloDmEnergy
   private:
     int make_dmcell_vector(std::vector<const CaloCalibrationHitContainer *> &v_dmcchc);
     int get_key(Identifier id) const;
-    int get_calo_deta_dphi(Identifier &id_cel, double &deta_cel, double &dphi_cel);
 
     int m_max_dmhit;
     int m_max_cluster;
@@ -159,12 +158,10 @@ class CaloDmEnergy
 
     const CaloDmDescrManager *m_caloDmDescrManager;
     const CaloDmNeighbours* m_caloDmNeighbours;
-    const CaloDetDescrManager* m_caloDetDescrManager;
     const CaloDM_ID*    m_caloDM_ID;
     const CaloCell_ID*    m_caloCell_ID;
     const AtlasDetectorID* m_id_helper;
     StoreGateSvc* m_storeGate;
-    StoreGateSvc* m_detStore;
 
     CaloDmEnergy (const CaloDmEnergy&);
     CaloDmEnergy& operator= (const CaloDmEnergy&);
diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmNeighbours.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmNeighbours.h
index 0af4b3f19ab0..496a7e13f813 100644
--- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmNeighbours.h
+++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloDmNeighbours.h
@@ -14,6 +14,7 @@
 #define CALOCALIBHITREC_CALODMNEIGHBOURS_H
 
 #include "StoreGate/StoreGateSvc.h"
+#include "CxxUtils/CachedPointer.h"
 
 #include <string>
 
@@ -57,10 +58,12 @@ class CaloDmNeighbours {
     int generate_neighbour_file();
     int make_CaloSample2DmRegion_map();
 
+    const CaloDetDescrManager* getMgr() const;
+
     std::string m_DmNeighboursFileName;
 
     StoreGateSvc* m_detStore;
-    const CaloDetDescrManager* m_caloDetDescrManager; 
+    CxxUtils::CachedPointer<const CaloDetDescrManager> m_caloDetDescrManager; 
     const CaloDmDescrManager *m_caloDmDescrManager;
     const CaloDM_ID*    m_caloDM_ID;
     const CaloCell_ID*    m_caloCell_ID;
diff --git a/Calorimeter/CaloCalibHitRec/src/CalibHitToCaloCell.cxx b/Calorimeter/CaloCalibHitRec/src/CalibHitToCaloCell.cxx
index 873be4f9f791..ecc74c61685b 100755
--- a/Calorimeter/CaloCalibHitRec/src/CalibHitToCaloCell.cxx
+++ b/Calorimeter/CaloCalibHitRec/src/CalibHitToCaloCell.cxx
@@ -57,7 +57,6 @@ CalibHitToCaloCell::CalibHitToCaloCell(std::string name, ISvcLocator* pSvcLocato
      //m_larEm_ID(0),
      //m_larHec_ID(0),
      //m_larFcal_ID(0),
-     m_caloDDMgr(0),
      m_nchan(0)
 
 //	The names suggestion if one needs to have them
@@ -94,7 +93,6 @@ StatusCode CalibHitToCaloCell::initialize()
 
   ATH_CHECK(  detStore()->retrieve(m_caloCell_ID) );
   ATH_CHECK(  detStore()->retrieve(m_caloDM_ID) );
-  ATH_CHECK(  detStore()->retrieve(m_caloDDMgr, "CaloMgr") );
 
   if(m_caloCell_Tot   != "")    m_store_Tot   = true;   else m_store_Tot   = false;
   if(m_caloCell_Vis   != "")	m_store_Vis   = true;   else m_store_Vis   = false;
@@ -109,6 +107,9 @@ StatusCode CalibHitToCaloCell::initialize()
 /////////////////   EXECUTE   //////////////////////
 StatusCode CalibHitToCaloCell::execute()
 {
+    const CaloDetDescrManager* caloDDMgr = nullptr;
+    ATH_CHECK(  detStore()->retrieve(caloDDMgr, "CaloMgr") );
+
     // OUTPUT CONTAINERS
     CaloCellContainer* cnt   = 0;
     CaloCellContainer* cnt_1 = 0; 
@@ -177,7 +178,7 @@ StatusCode CalibHitToCaloCell::execute()
 		//check if this ID is LAr one
 		if(m_caloCell_ID->is_lar(id)) 
 		{
-		    const CaloDetDescrElement* caloDDE = m_caloDDMgr->get_element(id);
+		    const CaloDetDescrElement* caloDDE = caloDDMgr->get_element(id);
 		
 		    if(m_store_Tot) {
 			    LArCell* calibCell = new LArCell(caloDDE, id, Etot, 0., 0, 0, CaloGain::UNKNOWNGAIN );
@@ -287,7 +288,7 @@ StatusCode CalibHitToCaloCell::execute()
 		
                	    if(m_caloCell_ID->is_lar(id))
             	    {
-			const CaloDetDescrElement* caloDDE = m_caloDDMgr->get_element(id);
+			const CaloDetDescrElement* caloDDE = caloDDMgr->get_element(id);
                     	
                    	if(m_store_Tot) {
                         	LArCell* calibCell = new LArCell(caloDDE, id, Etot, 0., 0, 0, CaloGain::UNKNOWNGAIN );
@@ -472,7 +473,7 @@ StatusCode CalibHitToCaloCell::execute()
 
 	        if(m_caloCell_ID->is_tile(id))
 		{
-	            const CaloDetDescrElement* caloDDE = m_caloDDMgr->get_element(id);
+	            const CaloDetDescrElement* caloDDE = caloDDMgr->get_element(id);
 
 		    if(m_store_Tot) {
         		TileCell* calibCell = new TileCell(caloDDE, id, Etot, 0., 0, 0, CaloGain::UNKNOWNGAIN, 0.0, 0.0 );
@@ -578,7 +579,7 @@ StatusCode CalibHitToCaloCell::execute()
 
 	        if(m_caloCell_ID->is_tile(id))
 		{
-	            const CaloDetDescrElement* caloDDE = m_caloDDMgr->get_element(id);
+	            const CaloDetDescrElement* caloDDE = caloDDMgr->get_element(id);
 
 		    if(m_store_Tot) {
         		TileCell* calibCell = new TileCell(caloDDE, id, Etot, 0., 0, 0, CaloGain::UNKNOWNGAIN, 0.0, 0.0 );
diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx
index 23654fa3dbe5..16b02509968a 100644
--- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx
+++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------
@@ -59,7 +59,6 @@ CaloCalibClusterMomentsMaker::CaloCalibClusterMomentsMaker(const std::string& ty
 							   const std::string& name,
 							   const IInterface* parent)
   : AthAlgTool(type, name, parent), 
-    m_calo_dd_man(0),
     m_calo_id(0),
     m_caloDM_ID(0),
     m_caloDmDescrManager(0),
@@ -224,17 +223,11 @@ StatusCode CaloCalibClusterMomentsMaker::initialize()
     m_doDeadEnergySharing = true;
   }
 
-  // pointer to detector manager:
-  m_calo_dd_man = CaloDetDescrManager::instance(); 
-
   // dead material identifier description manager  
   m_caloDmDescrManager = CaloDmDescrManager::instance(); 
 
-  m_calo_id = m_calo_dd_man->getCaloCell_ID();
-
-  //---- initialize the StoreGateSvc ptr ----------------
-
-  ATH_CHECK(  detStore()->retrieve(m_caloDM_ID) );
+  ATH_CHECK( detStore()->retrieve(m_calo_id, "CaloCell_ID") ); 
+  ATH_CHECK( detStore()->retrieve(m_caloDM_ID) );
 
   // initialize distance tables
   for(int jeta = 0;jeta<m_n_eta_out;jeta++) {
@@ -289,6 +282,9 @@ CaloCalibClusterMomentsMaker::execute(const EventContext& ctx,
 {  
   ATH_MSG_DEBUG( "Executing " << name()  );
 
+  const CaloDetDescrManager* calo_dd_man = nullptr;
+  ATH_CHECK( detStore()->retrieve (calo_dd_man, "CaloMgr") );
+
   bool foundAllContainers (true);
   std::vector<const CaloCalibrationHitContainer *> v_cchc;
   for (const SG::ReadHandleKey<CaloCalibrationHitContainer>& key :
@@ -489,7 +485,7 @@ CaloCalibClusterMomentsMaker::execute(const EventContext& ctx,
 	    if ( !cellVector[otherSubDet][(unsigned int)myHashId] ) {
 	      // hit is not inside any cluster
 	      const CaloDetDescrElement* myCDDE = 
-                m_calo_dd_man->get_element(myId);
+                calo_dd_man->get_element(myId);
 	      if ( myCDDE ) {
 		int jeO = (int)floor(m_n_eta_out*(myCDDE->eta()/m_out_eta_max));
 		if ( jeO >= -m_n_eta_out && jeO < m_n_eta_out ) {
diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx
index a1b0f49fcb7d..1bda7a34440e 100644
--- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx
+++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------
@@ -57,7 +57,6 @@ CaloCalibClusterMomentsMaker2::CaloCalibClusterMomentsMaker2(const std::string&
 							   const std::string& name,
 							   const IInterface* parent)
   : AthAlgTool(type, name, parent), 
-    m_calo_dd_man(0),
     m_calo_id(0),
     m_caloDM_ID(0),
     m_caloDmDescrManager(0),
@@ -230,14 +229,10 @@ StatusCode CaloCalibClusterMomentsMaker2::initialize()
     m_doDeadEnergySharing = true;
   }
 
-  // pointer to detector manager:
-  m_calo_dd_man = CaloDetDescrManager::instance();
-
   // dead material identifier description manager
   m_caloDmDescrManager = CaloDmDescrManager::instance(); 
 
-  m_calo_id = m_calo_dd_man->getCaloCell_ID();
-
+  ATH_CHECK( detStore()->retrieve(m_calo_id, "CaloCell_ID") );
   ATH_CHECK( detStore()->retrieve(m_caloDM_ID) );
 
   // initialize distance tables
@@ -293,6 +288,8 @@ StatusCode
 CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx,
                                        xAOD::CaloClusterContainer *theClusColl) const
 {
+  const CaloDetDescrManager* calo_dd_man = nullptr;
+  ATH_CHECK( detStore()->retrieve (calo_dd_man, "CaloMgr") );
 
   bool foundAllContainers (true);
   std::vector<const CaloCalibrationHitContainer *> v_cchc;
@@ -494,7 +491,7 @@ CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx,
           if(pos == cellInfo.end() ) {
             // hit is not inside any cluster
             const CaloDetDescrElement* myCDDE = 
-              m_calo_dd_man->get_element(myId);
+              calo_dd_man->get_element(myId);
             int pid(0);
             if(useParticleID) pid = (*chIter)->particleID();
             if ( myCDDE ) {
diff --git a/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx b/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx
index 5771cd77e188..d8ab1f99a892 100644
--- a/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx
+++ b/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx
@@ -90,11 +90,9 @@ CaloDmEnergy::CaloDmEnergy(const CaloDmDescrManager *dmMgr):
   m_max_cluster(10000), m_apars_alpha(0.5), m_apars_r0(0.2),
   m_apars_clust_min_ener(200.0),m_apars_clust_min_ecalib(10.0), m_apars_cone_cut(0.5),
   m_caloDmNeighbours(0),
-  m_caloDetDescrManager(0),
   m_caloDM_ID(0),
   m_caloCell_ID(0),
-  m_id_helper(0),
-  m_detStore(0)
+  m_id_helper(0)
 {
   m_caloDmDescrManager = dmMgr;
   m_CalibrationContainerNamesDM.push_back("LArCalibrationHitDeadMaterial");
@@ -128,44 +126,14 @@ StatusCode CaloDmEnergy::initialize()
 
   ISvcLocator* svcLoc = Gaudi::svcLocator();
 
-  StatusCode sc = svcLoc->service("StoreGateSvc", m_storeGate);
-  if ( sc.isFailure() ) {
-    log << MSG::ERROR
-        << "Unable to get pointer to StoreGate Service" << endmsg;
-    return sc;
-  }
-
-  sc = svcLoc->service("DetectorStore", m_detStore);
-  if ( sc.isFailure() ) {
-    log << MSG::ERROR
-        << "Unable to get pointer to DetectorStore Service" << endmsg;
-    return sc;
-  }
-
-  // pointer to detector manager:
-  m_caloDetDescrManager  = CaloDetDescrManager::instance(); 
-
-  sc = m_detStore->retrieve(m_caloDM_ID);
-  if (sc.isFailure()) {
-    log << MSG::ERROR
-        << "Unable to retrieve caloDM_ID helper from DetectorStore" << endmsg;
-    return sc;
-  }
+  ATH_CHECK( svcLoc->service("StoreGateSvc", m_storeGate) );
 
-  sc = m_detStore->retrieve(m_caloCell_ID);
-  if (sc.isFailure()) {
-    log << MSG::ERROR
-        << "Unable to retrieve caloCell_ID helper from DetectorStore" << endmsg;
-    return sc;
-  }
+  StoreGateSvc* detStore = nullptr;
+  ATH_CHECK( svcLoc->service("DetectorStore", detStore) );
 
-  // retrieve ID helpers from det store
-  sc = m_detStore->retrieve(m_id_helper);
-  if (sc.isFailure()) {
-    log << MSG::ERROR
-        << "Unable to retrieve AtlasDetectorID helper from DetectorStore" << endmsg;
-    return sc;
-  }
+  ATH_CHECK( detStore->retrieve(m_caloDM_ID) );
+  ATH_CHECK( detStore->retrieve(m_caloCell_ID) );
+  ATH_CHECK( detStore->retrieve(m_id_helper) );
 
   // manager to get DM hash identifiers which are neighbours of given CaloCell
   m_caloDmNeighbours = new CaloDmNeighbours(m_caloDmDescrManager);
@@ -624,44 +592,3 @@ int CaloDmEnergy::get_area(Identifier id, float eta_in) const
   return nsmp;
 }
 
-
-
-/* **************************************************************************
-Get eta and phi size of calorimeter cells. If cell belongs to FCAL, 
-then deta, dphi size will be calculated, since DetectorDescription has
-deta=0 and dphi=0 for FCAL cells.
-************************************************************************** */
-int CaloDmEnergy::get_calo_deta_dphi(Identifier &id_cel, double &deta_cel, double &dphi_cel)
-{
-  dphi_cel=0;
-  deta_cel=0;
-  const CaloDetDescrElement* theCDDE = m_caloDetDescrManager->get_element(id_cel);
-  if(!theCDDE){
-    std::cout << "CaloDmEnergy::get_calo_deta_dphi() -> WARNING. Absent CDDE for " << m_id_helper->show_to_string(id_cel) << std::endl;
-    return 1;
-  }
-  deta_cel = theCDDE->deta();
-  dphi_cel = theCDDE->dphi();
-  float eta_cel = fabs(theCDDE->eta());
-  int subcalo = m_caloCell_ID->sub_calo(id_cel);
-  if ( (CaloCell_ID::SUBCALO) subcalo  == CaloCell_ID::LARFCAL) {
-    int nfcal = m_caloCell_ID->sampling(id_cel) - 1;
-    float dsize[3]={7.5,8.0,9.0}; // tube size (x or y) in mm for fcal1-3
-                  // ssize = 2.0*dsize*dsize*sqrt(3.0)/4.0;
-    float ssize[3]={48.713928, 55.425625, 70.148056}; // cell area in mm*mm for fcal1-3
-    float z = fabs(theCDDE->z());
-    float volume = theCDDE->volume();
-    float N = volume/(ssize[nfcal]*450.0); // number of tubes for given FCAL cell, 450. it's fcal length
-    float dr = sqrt(N)*dsize[nfcal]; // cell size
-    float dr_z = dr/z;
-    dphi_cel = dr_z*sinh(eta_cel);
-    deta_cel = dr_z*cosh(eta_cel);
-    if( eta_cel < 3.3) deta_cel *= 1.5;
-  } else if ( (CaloCell_ID::SUBCALO) subcalo == CaloCell_ID::LARHEC && eta_cel > 3.1) {
-    deta_cel *= 1.5;
-  } else if ( (CaloCell_ID::SUBCALO) subcalo == CaloCell_ID::LAREM && eta_cel > 3.1) {
-    deta_cel *= 1.5;
-  }
-  return 0;
-}
-
diff --git a/Calorimeter/CaloCalibHitRec/src/CaloDmNeighbours.cxx b/Calorimeter/CaloCalibHitRec/src/CaloDmNeighbours.cxx
index d2863953dfb4..c099bc0a23e4 100644
--- a/Calorimeter/CaloCalibHitRec/src/CaloDmNeighbours.cxx
+++ b/Calorimeter/CaloCalibHitRec/src/CaloDmNeighbours.cxx
@@ -48,8 +48,7 @@
 CaloDmNeighbours::CaloDmNeighbours() ctor
 ************************************************************************** */
 CaloDmNeighbours::CaloDmNeighbours(const CaloDmDescrManager *dmMgr)
-  : m_caloDetDescrManager(0),
-    m_caloDM_ID(0),
+  : m_caloDM_ID(0),
     m_caloCell_ID(0),
     m_larFcal_ID(0),
     m_larHec_ID(0),
@@ -83,9 +82,6 @@ int CaloDmNeighbours::initialize(std::string DmNeighboursFileName)
     return 1;
   }
 
-  // pointer to detector manager:
-  m_caloDetDescrManager  = CaloDetDescrManager::instance();
-
   sc = m_detStore->retrieve(m_caloDM_ID);
   if (sc.isFailure()) {
     log << MSG::ERROR
@@ -150,7 +146,7 @@ int CaloDmNeighbours::getNeighbours_DmHitsForCaloCell(const Identifier &cell_id,
 {
   neighbourList.clear();
 
-  const CaloDetDescrElement* theCDDE = m_caloDetDescrManager->get_element(cell_id);
+  const CaloDetDescrElement* theCDDE = getMgr()->get_element(cell_id);
   if (!theCDDE) return 1;
   float cell_eta = theCDDE->eta();
   int neta=int((cell_eta - CALOMAP_ETA_MIN)*(1./CALOMAP_DETA));
@@ -790,3 +786,15 @@ int CaloDmNeighbours::make_CaloSample2DmRegion_map()
   return 0;
 }
 
+
+const CaloDetDescrManager* CaloDmNeighbours::getMgr() const
+{
+  const CaloDetDescrManager* p = m_caloDetDescrManager.get();
+  if (!p) {
+    if (m_detStore->retrieve (p, "CaloMgr").isFailure()) {
+      return nullptr;
+    }
+    m_caloDetDescrManager.set (p);
+  }
+  return p;
+}
-- 
GitLab


From bf4eab154710754da8ab1e516696ce769071681b Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Apr 2019 16:33:03 +0200
Subject: [PATCH 024/129] L1TopoByteStream: SGTools->AthenaKernel

Adjust for headers moved from SGTools to AthenaKernel.
---
 Trigger/TrigT1/L1Topo/L1TopoByteStream/CMakeLists.txt         | 3 +--
 .../L1Topo/L1TopoByteStream/src/L1TopoByteStreamAuxCnv.cxx    | 4 ++--
 .../L1Topo/L1TopoByteStream/src/L1TopoByteStreamCnv.cxx       | 2 +-
 .../L1Topo/L1TopoByteStream/src/L1TopoByteStreamxAODCnv.cxx   | 4 ++--
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigT1/L1Topo/L1TopoByteStream/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoByteStream/CMakeLists.txt
index 1403820016bc..7d12bcb1067c 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoByteStream/CMakeLists.txt
+++ b/Trigger/TrigT1/L1Topo/L1TopoByteStream/CMakeLists.txt
@@ -11,7 +11,6 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthenaBaseComps
                           Control/AthenaKernel
-                          Control/SGTools
                           Control/StoreGate
                           Event/ByteStreamCnvSvcBase
                           Event/ByteStreamData
@@ -26,7 +25,7 @@ atlas_add_component( L1TopoByteStream
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test xAODTrigL1Calo L1TopoRDO )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test xAODTrigL1Calo L1TopoRDO )
 
 # Install files from the package:
 atlas_install_headers( L1TopoByteStream )
diff --git a/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamAuxCnv.cxx b/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamAuxCnv.cxx
index 3a5143795944..86244c092940 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamAuxCnv.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamAuxCnv.cxx
@@ -28,8 +28,8 @@
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/StatusCode.h"
 
-#include "SGTools/ClassID_traits.h"
-#include "SGTools/StorableConversions.h"
+#include "AthenaKernel/ClassID_traits.h"
+#include "AthenaKernel/StorableConversions.h"
 #include "StoreGate/StoreGateSvc.h"
 
 // ============================================================================
diff --git a/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamCnv.cxx b/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamCnv.cxx
index 2acce428a287..56c3f79a9b4e 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamCnv.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamCnv.cxx
@@ -11,7 +11,7 @@
 #include "ByteStreamData/RawEvent.h"
 #include "ByteStreamData/ROBData.h"
 
-#include "SGTools/StorableConversions.h"
+#include "AthenaKernel/StorableConversions.h"
 
 // Trigger include(s):
 #include "L1TopoRDO/L1TopoRDOCollection.h"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamxAODCnv.cxx b/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamxAODCnv.cxx
index 1ea5ad3c01b8..3d586680629d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamxAODCnv.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoByteStream/src/L1TopoByteStreamxAODCnv.cxx
@@ -19,8 +19,8 @@
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/StatusCode.h"
 
-#include "SGTools/ClassID_traits.h"
-#include "SGTools/StorableConversions.h"
+#include "AthenaKernel/ClassID_traits.h"
+#include "AthenaKernel/StorableConversions.h"
 #include "StoreGate/StoreGateSvc.h"
 
 #include "xAODTrigL1Calo/L1TopoRawDataContainer.h"
-- 
GitLab


From f6fb7f33b48fa430bc6f5acce71462c9f688b5d4 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 30 Apr 2019 16:26:26 +0200
Subject: [PATCH 025/129] AthenaExamples: Initial python3 port.

Initial python3 port.  Not yet complete: only what's needed for
basic athena/configuration jobs.
---
 .../AthenaExamples/AthExHelloWorld/python/HelloWorldConfig.py  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Control/AthenaExamples/AthExHelloWorld/python/HelloWorldConfig.py b/Control/AthenaExamples/AthExHelloWorld/python/HelloWorldConfig.py
index 0acbe4e02e39..046d502afd52 100644
--- a/Control/AthenaExamples/AthExHelloWorld/python/HelloWorldConfig.py
+++ b/Control/AthenaExamples/AthExHelloWorld/python/HelloWorldConfig.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
 
 
 from AthenaCommon.JobProperties import jobproperties
@@ -55,7 +56,7 @@ def HelloWorldCfg():
     pt.MyMessage="A public Message!"    
 
     result.addPublicTool(pt)
-    print pt
+    print (pt)
 
 
     HelloWorld.MyPublicHelloTool=pt
-- 
GitLab


From 9a807ebb5ba94e8c0b430aa9a9dfeb99c87f9e04 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Apr 2019 22:45:07 +0200
Subject: [PATCH 026/129] AthenaPoolUtilities: Additional pattern to ignore.

Ignore new geometry message.
Fixes test failures in master.
---
 .../AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh     | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
index 3ed8b1dde070..fa38dab588f0 100755
--- a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
@@ -239,6 +239,9 @@ PP="$PP"'|TrackCollectionCnv::initialize'
 # Ignore dumps from CondInputLoader.
 PP="$PP"'|ConditionStore\+/'
 
+# New messages from geometry...
+PP="$PP"'| TrackingGeometrySvc '
+
 
 test=$1
 if [ -z "$testStatus" ]; then
-- 
GitLab


From 7d52920083aaa7c367eab8497430b987cf528189 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Apr 2019 22:46:25 +0200
Subject: [PATCH 027/129] FastCaloSim: Update reference file.

Fix test failure in master.
---
 .../share/FastShowerCellBuilderTool_test.ref  | 164 +++++++++---------
 1 file changed, 83 insertions(+), 81 deletions(-)

diff --git a/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref b/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref
index 287f1ae08c5a..f1219cf0371a 100644
--- a/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref
+++ b/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref
@@ -1,15 +1,16 @@
-Thu Jan  3 00:21:53 EST 2019
+Tue Apr 30 20:45:09 CEST 2019
+Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/bc8ffe286d7] -- built on [2019-04-30T1645]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "FastCaloSim/FastShowerCellBuilderTool_test.py"
-SetGeometryVersion.py obtained major release version 21
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 4749 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5474 configurables from 49 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  sss-rel_0
+EventInfoMgtInit: Got release version  Athena-22.0.2
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -22,15 +23,16 @@ Py:TileInfoConf.     INFO Changing default TileCondToolNoiseSample configuration
 Py:TileInfoConf.     INFO Changing default TileCondToolTiming configuration to COOL source
 Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise for Opt.Filter without iterations
 Py:Athena            INFO Importing MagFieldServices.SetupField
-Py:ConfiguredFactory    INFO imported 88 confDb modules in 0.02 seconds
+Py:ConfiguredFactory    INFO imported 135 confDb modules in 1.71 seconds
+[ TrackingGeometrySvc ]     base material tag :  AtlasLayerMat_v21_
+[ TrackingGeometrySvc ]     translated to COOL:  /GLOBAL/TrackingGeo/LayerMaterialV2<tag>TagInfoMajor/AtlasLayerMat_v21_/GeoAtlas</tag>
+Py:ConfiguredFactory    INFO imported 135 confDb modules in 3.02 seconds
 Py:Athena            INFO Importing MagFieldServices.MagFieldServicesConfig
 Py:FastCaloSimFactory::configure:    INFO now configure the non-interacting propagator...
 Py:FastCaloSimFactory::configure:    INFO configure nono-interacting propagator finished
 Py:FastCaloSimFactory::configure:    INFO now configure the TimedExtrapolator...
-[ TrackingGeometrySvc ]     base material tag :  AtlasLayerMat_v21_
-[ TrackingGeometrySvc ]     translated to COOL:  /GLOBAL/TrackingGeo/LayerMaterialV2<tag>TagInfoMajor/AtlasLayerMat_v21_/GeoAtlas</tag>
 Py:FastCaloSimFactory::configure:    INFO configure TimedExtrapolator finished
-Py:FastCaloSimFactory::configure:    INFO ParticleParametrizationFile=/home/sss/nobackup/atlas/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root
+Py:FastCaloSimFactory::configure:    INFO ParticleParametrizationFile=/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root
 Py:FastCaloSimFactory::configure:    INFO all values:
 /***** Private AlgTool FastShowerCellBuilderTool/tool1 *********************************************
 |-AdditionalParticleParametrizationFileNames = []  (default: [])
@@ -68,7 +70,7 @@ Py:FastCaloSimFactory::configure:    INFO all values:
 |-MuonEnergyInCaloContainerName              = 'StoreGateSvc+FatrasDepositedMuonEnergyInCalo'
 |-OutputLevel                                = 0
 |-PartPropSvc                                = ServiceHandle('PartPropSvc')
-|-ParticleParametrizationFileName            = '/home/sss/nobackup/atlas/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root'
+|-ParticleParametrizationFileName            = '/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root'
 |                                            (default: '')
 |-RandomService                              = ServiceHandle('AthRNGSvc')
 |-RandomStreamName                           = 'FastCaloSimRnd'
@@ -80,21 +82,19 @@ Py:FastCaloSimFactory::configure:    INFO all values:
 |-use_Ekin_for_depositions                   = False
 \----- (End of Private AlgTool FastShowerCellBuilderTool/tool1) ------------------------------------
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Thu Jan  3 00:21:56 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
+                                          running on lxplus715.cern.ch on Tue Apr 30 20:45:47 2019
 ====================================================================================================================================
-ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 7301 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6961 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
@@ -102,20 +102,21 @@ AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version Athena
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Read replica configuration from /home/sss/atlas/rootaccess/build/share/dbreplica.config
-DBReplicaSvc         INFO No specific match for domain found - use default fallback
-DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus715.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
-PoolSvc              INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml
-PoolSvc              INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml
-PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolFileCatalog.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbFolder          INFO Inputfile tag override disabled for /GLOBAL/BField/Maps
@@ -149,9 +150,9 @@ IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/TIME/CHANNELOFFSET/PHY
 IOVDbSvc             INFO Added taginfo remove for /TILE/ONL01/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
-ClassIDSvc           INFO  getRegistryEntries: read 1699 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2042 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 95 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -204,7 +205,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
-ClassIDSvc           INFO  getRegistryEntries: read 2380 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2394 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 IdDictDetDescrCnv    INFO in initialize
 IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
@@ -243,7 +244,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /home/sss/atlas/rootaccess/build/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -255,15 +256,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
@@ -284,11 +285,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -345,11 +346,11 @@ TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.Tile
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
 PyComponentMgr       INFO Initializing PyComponentMgr...
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 5013 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2009 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO Initialisating started
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 161 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -363,21 +364,22 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /home/sss/atlas/rootaccess/build/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
 PartPropSvc          INFO No table format type specified for "PDGTABLE.MeV". Assuming PDG
+ --------------- HepPDT Version 2.06.01 --------------- 
 found 298 particles
 AthRNGSvc            INFO Creating engine ToolSvc.tool1/FastCaloSimRnd
 AtlasFieldSvc        INFO initialize() ...
 AtlasFieldSvc        INFO maps will be chosen reading COOL folder /GLOBAL/BField/Maps
-ClassIDSvc           INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1088 CLIDRegistry entries for module ALL
 AtlasFieldSvc        INFO magnet currents will be read from COOL folder /EXT/DCS/MAGNETS/SENSORDATA
 AtlasFieldSvc        INFO Booked callback for /EXT/DCS/MAGNETS/SENSORDATA
 AtlasFieldSvc        INFO initialize() successful
@@ -410,7 +412,7 @@ ToolSvc.tool1        INFO Building all maps
 ToolSvc.tool1        INFO Building all maps finished : n(total)=187652 n(volume>0)=179842 n(used)=177540
 ToolSvc.tool1        INFO ========================= Init volume all maps =========================
 ToolSvc.tool1        INFO McCollection=TruthEvent
-ToolSvc.tool1        INFO ==== LoadParametrizations from file : /home/sss/nobackup/atlas/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root ====
+ToolSvc.tool1        INFO ==== LoadParametrizations from file : /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root ====
 ToolSvc.tool1        INFO   LoadParametrizations : EnergyResults
 ToolSvc.tool1     WARNING Could fix some nan in input parametrization ParticleShape22_E200_eta236 (ParticleShape pdgid=22 E=200.0 eta=2.36): RMS(10,-1) is nan, fixed by removing correlation matrix, n=0 elements. 
 ToolSvc.tool1     WARNING Could fix some nan in input parametrization ParticleShape22_E200_eta264 (ParticleShape pdgid=22 E=200.0 eta=2.65): RMS(11,-2) is nan, fixed by removing correlation matrix, n=0 elements. 
@@ -437,10 +439,10 @@ ToolSvc.tool1        INFO      Shape  parametrization id=211 : 6637 parametrizat
 ToolSvc.tool1        INFO Invisible particles (n=1): (pdgid=0 -> Use TruthHelper class IsGenNonInteracting), 
 ToolSvc.tool1        INFO Reject ID truth particle vertices outside cylinder(s): [r=1070,z=800] [r=1030,z=3400] 
 ToolSvc.tool1        INFO Initialisating finished
-ClassIDSvc           INFO  getRegistryEntries: read 991 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1013 CLIDRegistry entries for module ALL
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 77 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 80 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -468,8 +470,8 @@ IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVD
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
-Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
-RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 AtlasFieldSvc        INFO reading magnetic field map filenames from COOL
 AtlasFieldSvc        INFO found map of type GlobalMap with soleCur=7730 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_7730_20400_14m.root)
 AtlasFieldSvc        INFO found map of type SolenoidMap with soleCur=7730 toroCur=0 (path file:MagneticFieldMaps/bfieldmap_7730_0_14m.root)
@@ -482,8 +484,8 @@ AtlasFieldSvc        INFO Trying to read from DCS: [channel name, index, value]
 AtlasFieldSvc        INFO Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20400
 AtlasFieldSvc        INFO Currents read from DCS: solenoid 7730 toroid 20400
 AtlasFieldSvc        INFO Initializing the field map (solenoidCurrent=7730 toroidCurrent=20400)
-AtlasFieldSvc        INFO reading the map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Initialized the field map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO reading the map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
 ToolSvc.Trackin...   INFO initialize()
 ToolSvc.Trackin...   INFO initialize() 
 ToolSvc.LayerAr...   INFO initialize()
@@ -524,11 +526,11 @@ ToolSvc.CaloTra...   INFO 2 volumes retrieved from TileVolumeBuilder
 ToolSvc.CaloTra...   INFO --------------- detailed output ---------------------------------------------------------- 
 LayerMaterialMa...   INFO LayerMaterialMapCnv::initialize()
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 2B8BB54A-2F81-7B49-8484-60F83666998E
-Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root
-RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root File version:60416
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root File version:60416
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
-Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
-RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
+Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
+RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to TileOfl02CalibCes-SIM-06 for folder /TILE/OFL02/CALIB/CES
@@ -551,7 +553,7 @@ TileBadChannels...   INFO TileBchStatus::isNoisy() is defined by: Large HF noise
 TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; No PMT connected; No HV; Channel masked for LV1 (unspecified); LV1 channel no gain; LV1 channel noisy; Channel disabled for LV1; 
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 1104 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1275 CLIDRegistry entries for module ALL
 AthRNGSvc         SUCCESS ToolSvc.tool1/FastCaloSimRnd 3630501711 90 3261692434 1073680638 823030377 1073723668 1868930291 1073677174 911996003 1073290479 3711715511 1072694548 2140068716 1072735951 539460630 1073178241 2282305494 1072708986 1641530683 1073202302 2631242835 1073321911 3961765294 1073467950 2626127931 1073272628 2396189536 1073590622 2374465580 1073564482 3416006862 1072800960 1352814095 1073333945 1932808853 1073111336 2004821113 1072722654 164197198 1072846416 751909680 1073721900 808721476 1073468761 690859097 1073483009 418699027 1073306662 1789296916 1073624469 2971093188 1072984953 2555298921 1072770453 3853840956 1073055738 3487439144 1073639698 1894545311 1072884286 626513571 1073631692 3421835136 1073307636 3985124064 1073729249 2607246495 1073094204 4090506844 1073695039 2410441688 1073487241 1069374412 1073423736 1760407317 1072765560 2827875924 1072827462 4146416168 1073037450 3197924302 1073718189 3551167333 1073676036 4115234429 1073230966 98903944 1073088578 4282482954 1073314928 2143692400 1073136393 3296550475 1072843872 3558803953 1073270281 3103842852 1073235469 1882909869 1073459859 916240561 1073339674 536539632 1073614296 1409495660 1073448151 358001842 1073483642 739667300 1073521338 3746187847 1072960505 2594847495 1073654670 3231825006 1073250176 3554125300 1073441586 889397564 1073010193 3102313462 1073424387 912563430 1073190059 2833054885 1073176909 2869107047 1073201355 4064975915 1073425934 3842344805 1073237417 2249570334 1073294265 933655068 1073661856 2823826967 1072983053 3187935985 1073666738 2012177277 1073511885 3705303978 1073354273 2263991526 1072860629 714897335 1073409664 3791090286 1072885706 3668090129 1072928433 4177473366 1073400077 4103000642 1072762422 1446170605 1072828225 2626904048 1073096349 787048638 1073597594 911588237 1072953144 271870086 1073290978 1047360370 1073346157 1872092527 1072822122 2841293698 1073002754 365773320 1073623173 3533126773 1073023548 1827082166 1073011537 769948162 1072741453 716869697 1073421964 950558058 1073688175 3654654741 1073077866 2148938756 1073636271 4042145415 1073729005 2295127568 1073051710 2538781685 1073500775 1382221002 1073134056 84184398 1072699157 1424487447 1073581512 419336873 1073657082 3569483343 1073003194 4070398286 1073300428 4070981007 1072944187 756286778 1073738055 2998212970 1073014133 462886270 1072731246 3544532359 1073371748 3720216818 1073530166 857383700 1073027294 2603143961 1073033720 3719393042 1073014678 3871031172 1073611172 3167825463 1073413837 3430927282 1073037455 2813514352 1073187562 1890932001 1072709290 3303417437 1073036901 1339564205 1073642312 2538448638 1073008042 1026462913 1073603981 1900392973 1072983365 4219218825 1073730572 729915534 1072743555 1592137825 1073699851 3580755983 1073180566 3646051161 1073621980 1888726728 1072884180 2759076898 1072988631 781657975 1072742798 539597383 1072933770 2862823903 1073461460 137639100 1073419163 1282995020 1073635629 2773321850 1073015233 864373926 1072783317 2945299790 1073564429 942801054 1073065933 469421843 1073736865 1205751158 1072817032 2557468817 1073741663 284681309 1073694428 3705796569 1073080815 2784424690 1073534939 87996075 1073165948 4251187390 1073694412 4133058395 1073171507 4148682519 1072914063 1438363651 1073586842 379154910 1072847866 1590169437 1072855295 3490089895 1073313887 2705421280 1073085513 1607354295 1072886471 2501280363 1073136524 1603739927 1072957178 1195334651 1072864186 3489732441 1073038891 1352657795 1072828769 19676344 1073018085 3103839646 1073314627 959564690 1073526279 1963499755 1073449889 250981548 1073668260 1777143703 1072842316 1134371421 1073057027 3860630533 1072887996 3065684433 1072813724 2169295742 1072773648 3514099379 1072862237 2637450043 1072749923 1458646333 1072947546 3991056209 1073352675 398024247 1073245696 456978228 1073685482 1275860529 1073446874 1104928121 1073349174 2709807511 1073414285 1001292837 1073391486 333779909 1072985692 3296251806 1073229593 4052332837 1073177524 3347382464 1072811729 1993826165 1072826950 2930738656 1072797162 3421648372 1073246843 159529425 1073067140 1822199323 1072821862 947562513 1072788222 2999108474 1073410975 3001267519 1073014979 2200426417 1072697229 3839301019 1073211197 653930178 1072821156 347931826 1073260473 3220160560 1072908029 2060537181 1073148903 1819201266 1072725052 752057633 1073712872 1284664544 1073018908 4061523052 1073715276 1678059209 1073120880 1563127687 1073397828 1073017791 1073448950 2160732782 1072736393 98102556 1073574247 2980862331 1073495372 10947338 1073388566 235712746 1073130536 1428538253 1073444911 1034331703 1073135276 1193514266 1073399517 2047530239 1073256035 1763468142 1073656778 95599117 1072831138 510292077 1073359403 2867275526 1073739478 1688604336 1073128745 1834286853 1073632701 1912869948 1073622452 2874594033 1073549554 2314352708 1073707463 1928987767 1073355679 156479999 1073107923 427377340 1073604020 3759005145 1073008275 2186399455 1073470828 27260339 1073631507 2972862105 1072875544 3306058547 1073674887 4243502 1073068761 4219093378 1072818031 2557302325 1073596249 296768555 1073125110 541062411 1073558141 8361674 1072788178 2747074052 1072706485 833875430 1072882109 2173602389 1072846141 1462039115 1073037234 1842330282 1073192077 1623547146 1072931134 718827894 1072939088 2939061236 1073584483 1164526291 1073138367 3530317869 1073444316 1933624563 1072996789 3306818729 1073206511 3465916374 1073208069 770688873 1073187945 1190230823 1072729827 2978207685 1073260241 1919240575 1072738920 4133661157 1073166622 3541555338 1073639985 3200451429 1073296053 2148722180 1073548242 2744498149 1073643883 1743594613 1073269305 3265447442 1073042739 3018353724 1073682837 1469213866 1073277068 4004154164 1073405891 1275293170 1072905879 4237407126 1073252636 808418950 1073598273 3352491937 1072753050 2120097613 1072889002 579900871 1073040505 3264609359 1073727315 741502134 1073187984 1392942119 1073154740 3769930099 1073043915 3825224772 1072940924 1112532450 1072821755 2547148240 1073167418 1931659309 1073124486 2849541086 1072819160 240941813 1072803712 3038640263 1073301050 963999170 1072908536 1707506099 1073606863 1877868468 1072821515 1065662759 1073287087 1700024633 1072995875 619690025 1073209278 2551852602 1072696157 2222723748 1072906116 1927104135 1073194953 2863380179 1073537077 2292713055 1072735008 2272466554 1073455406 2373215093 1073551764 3324063296 1073422970 2302478549 1073020979 1226262167 1073610915 3810494412 1072757930 3598016388 1072968968 3537807466 1072707226 1704779161 1073671798 3085424591 1073315979 585655719 1073193844 3060235115 1073091386 1863225538 1073616828 2550257447 1073138604 1041018708 1073698931 2550281390 1073091244 684679500 1073225758 1124361632 1072992252 3453512710 1072896846 2217085102 1073364366 2210679916 1072698927 313798325 1073055347 160295651 1073721031 2919317005 1073225837 2914657176 1073576644 3628120085 1073475641 1067340581 1073546013 340517196 1073724752 1127352683 1072769370 1492607570 1073392139 4135266509 1072867941 47699585 1072720565 2696229633 1072920700 4026883948 1073401517 1563530900 1073127246 2450531703 1073047787 3190069830 1073274034 654254270 1072925380 2415086862 1073508836 2610776490 1073236289 2122340525 1073009911 2785746802 1073338598 1350136126 1073311616 3970399521 1072852344 3106047532 1073554151 2582386806 1072695066 981697222 1072785304 3195759033 1073700288 2921106626 1073092172 183150695 1073252808 4099644845 1073456800 1288824535 1072940897 1563673146 1073411168 2496781743 1073338375 2962768285 1073223705 1576579287 1072922059 550057400 1073582928 2862331727 1073242743 2852012108 1072891435 2627580467 1073358635 3211577202 1073355904 3039848443 1073447954 3913185655 1073199284 2600647611 1073686940 827096734 1073585076 1554652000 1073406528 4165811413 1073244527 441484542 1072780555 2536639643 1073409915 2310341371 1073452160 114457467 1073379111 2815515709 1073106406 3442879574 1072805611 2247673049 1072875215 1461815981 1073341895 67919517 1073612505 4179474298 1072753058 2515614785 1073709826 124095440 1072847200 1645148762 1072916829 830435430 1073499794 3629871842 1073005476 2223287807 1073122271 3292803050 1072761672 3826188126 1073616228 3721761610 1073580536 3707133827 1073494701 1950134628 1072919780 1522092269 1073542864 1655081062 1073465610 811524494 1072839924 3516415211 1073710058 4222427839 2995058703 2624364569 3711061605 
 ToolSvc.tool1        INFO CaloEntrance not found 
 ToolSvc.tool1        INFO CaloEntrance not found 
@@ -561,12 +563,12 @@ ToolSvc.tool1        INFO CaloEntrance not found
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 TileInfoLoader       INFO Handling EndRun incident
 TileInfoLoader       INFO Removed TileInfo object from detector store.
-/home/sss/atlas...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
-/home/sss/atlas...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
-/home/sss/atlas...   INFO Database being retired...
+/cvmfs/atlas-co...   INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 2B8BB54A-2F81-7B49-8484-60F83666998E
+/cvmfs/atlas-co...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
@@ -577,28 +579,28 @@ AtlasTrackingGe...   INFO finalize() successful.
 AtlasFieldSvc        INFO finalize() successful
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     0.06 ))s
-IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.06 ))s
-IOVDbFolder          INFO Folder /GLOBAL/TrackingGeo/LayerMaterialV2 (PoolRef) db-read 1/1 objs/chan/bytes 1/1/231 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.06 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.06 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.01 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.00 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.00 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.00 ))s
-IOVDbSvc             INFO  bytes in ((      0.29 ))s
+IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     1.01 ))s
+IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     1.00 ))s
+IOVDbFolder          INFO Folder /GLOBAL/TrackingGeo/LayerMaterialV2 (PoolRef) db-read 1/1 objs/chan/bytes 1/1/231 ((     0.27 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.68 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.86 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.64 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.64 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.54 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.59 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.63 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.70 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     1.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.88 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.98 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.05 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.44 ))s
+IOVDbSvc             INFO  bytes in ((     10.91 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.06 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.10 ))s
-IOVDbSvc             INFO Connection COOLOFL_GLOBAL/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.06 ))s
-IOVDbSvc             INFO Connection COOLOFL_DCS/OFLP200 : nConnect: 2 nFolders: 1 ReadTime: ((     0.06 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.12 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     7.52 ))s
+IOVDbSvc             INFO Connection COOLOFL_GLOBAL/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.27 ))s
+IOVDbSvc             INFO Connection COOLOFL_DCS/OFLP200 : nConnect: 2 nFolders: 1 ReadTime: ((     1.01 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -619,9 +621,9 @@ ToolSvc.Trackin...   INFO finalize() successful
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot=  240 [ms] Ave/Min/Max=   80(+- 86.4)/    0/  200 [ms] #=  3
-cObj_ALL             INFO Time User   : Tot=  320 [ms] Ave/Min/Max= 18.8(+- 52.9)/    0/  220 [ms] #= 17
-ChronoStatSvc        INFO Time User   : Tot= 29.4  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 1.52  [s] Ave/Min/Max=0.507(+-0.688)/ 0.01/ 1.48  [s] #=  3
+cObj_ALL             INFO Time User   : Tot= 1.58  [s] Ave/Min/Max=0.0929(+-0.352)/    0/  1.5  [s] #= 17
+ChronoStatSvc        INFO Time User   : Tot= 50.7  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
-- 
GitLab


From 5405708bce19ca6e922a48bb5b0e7624a101f62a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 1 May 2019 00:34:15 +0200
Subject: [PATCH 028/129] TruthD3PDMaker: Fix configuration of
 MCTruthClassifier.

Update to work with current master.
---
 .../TruthD3PDMaker/python/MCTruthClassifierConfig.py          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/python/MCTruthClassifierConfig.py b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/python/MCTruthClassifierConfig.py
index 60c57aa9036e..4e0e51e2329c 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/python/MCTruthClassifierConfig.py
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/python/MCTruthClassifierConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # $Id$
 #
@@ -19,8 +19,10 @@ mckey = resolveSGKey ('DataVector<xAOD::TruthParticle_v1>', D3PDMakerFlags.Truth
 
 
 from TruthD3PDAnalysis import D3PDMCTruthClassifier
+from MCTruthClassifier import MCTruthClassifierBase
 D3PDMCTruthClassifier = D3PDMCTruthClassifier (name = 'D3PDMCTruthClassifier',
                                                xAODTruthParticleContainerName = mckey,
+                                               ParticleCaloExtensionTool=MCTruthClassifierBase.ClassifierParticleCaloExtensionTool,
                                                pTNeutralPartCut = 1e-3,
                                                OutputLevel = ERROR,
                                                partExtrConePhi = 0.6, #0.4
-- 
GitLab


From e71a9a248ebabff34489ddeda730c827ae28de54 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 30 Apr 2019 00:54:08 +0200
Subject: [PATCH 029/129] TFPersistification: Comply with ATLAS naming
 conventions.

Private data members should start with m_.
---
 .../TransFunctionPersistifier.h               |  8 +++---
 .../TransFunctionRecorder.h                   |  2 +-
 .../src/TransFunctionPersistifier.cpp         | 26 +++++++++----------
 .../src/TransFunctionRecorder.cpp             |  4 +--
 4 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionPersistifier.h b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionPersistifier.h
index 1ff9abeae073..2b9cab9853b3 100644
--- a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionPersistifier.h
+++ b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionPersistifier.h
@@ -48,16 +48,16 @@ class TransFunctionPersistifier {
  private:
 
   // Store the actual recorders, map them into the type name
-  std::map<std::string, const TransFunctionRecorder *> recorderMap;
+  std::map<std::string, const TransFunctionRecorder *> m_recorderMap;
 
   // Here is the result:
-  mutable std::string codedString;
+  mutable std::string m_codedString;
 
   // An ostringstream is used to build the coded string:
-  mutable std::ostringstream *stream;
+  mutable std::ostringstream *m_stream;
 
   // The GenFunctionPersistifier:
-  GenFunctionPersistifier fPersistifier;
+  GenFunctionPersistifier m_persistifier;
   
   // Deleted methods:
   TransFunctionPersistifier(const TransFunctionPersistifier &)               = delete;
diff --git a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionRecorder.h b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionRecorder.h
index cb28637844f5..d83f7cd5a87b 100644
--- a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionRecorder.h
+++ b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/TFPersistification/TransFunctionRecorder.h
@@ -33,7 +33,7 @@ class TransFunctionRecorder {
  private:
 
   // A pointer to the persistifier:
-  const TransFunctionPersistifier                               *persistifier;
+  const TransFunctionPersistifier                               *m_persistifier;
 
   // Deleted operations:
   TransFunctionRecorder(const TransFunctionRecorder &)               = delete;
diff --git a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionPersistifier.cpp b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionPersistifier.cpp
index c984ff001151..f1f2875efc2c 100644
--- a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionPersistifier.cpp
+++ b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionPersistifier.cpp
@@ -3,25 +3,25 @@
 #include "GeoModelKernel/GeoXF.h"
 
 const GenFunctionPersistifier * TransFunctionPersistifier::getGenFunctionPersistifier() const {
-  return &fPersistifier;
+  return &m_persistifier;
 }
 
 const std::string & TransFunctionPersistifier::getCodedString() const {
   
-  codedString=getStream().str();
-  delete stream;
-  stream=NULL;
-  return codedString;
+  m_codedString=getStream().str();
+  delete m_stream;
+  m_stream=NULL;
+  return m_codedString;
 }
 
 
 TransFunctionPersistifier::~TransFunctionPersistifier() {
-  delete stream;
-  for (auto i=recorderMap.begin(); i!=recorderMap.end();i++) {
+  delete m_stream;
+  for (auto i=m_recorderMap.begin(); i!=m_recorderMap.end();i++) {
     delete (*i).second;
   }
 }
-TransFunctionPersistifier::TransFunctionPersistifier():stream(NULL) {
+TransFunctionPersistifier::TransFunctionPersistifier():m_stream(NULL) {
   new PreMultRecorder(this);
   new PostMultRecorder(this);
   new PowRecorder(this);
@@ -29,18 +29,18 @@ TransFunctionPersistifier::TransFunctionPersistifier():stream(NULL) {
 }
 
 void TransFunctionPersistifier::add(const std::type_info & tInfo, const TransFunctionRecorder * recorder) {
-  recorderMap[tInfo.name()]=recorder;
+  m_recorderMap[tInfo.name()]=recorder;
 }
 
 std::ostringstream & TransFunctionPersistifier::getStream() const {
-  if (!stream) stream = new std::ostringstream();
-  return *stream;
+  if (!m_stream) m_stream = new std::ostringstream();
+  return *m_stream;
 }
 
 void TransFunctionPersistifier::persistify( const GeoXF::Function & f) const {
   
-  auto rIter = recorderMap.find(typeid(f).name());
-  if (rIter!=recorderMap.end()) {
+  auto rIter = m_recorderMap.find(typeid(f).name());
+  if (rIter!=m_recorderMap.end()) {
     const TransFunctionRecorder *recorder = (*rIter).second;
     recorder->execute(f);
   }
diff --git a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionRecorder.cpp b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionRecorder.cpp
index 5a08cc7a2d65..1a5373f7da35 100644
--- a/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionRecorder.cpp
+++ b/DetectorDescription/GeoModel/GeoModelStandalone/TFPersistification/src/TransFunctionRecorder.cpp
@@ -11,12 +11,12 @@
 
 #include <stdexcept>
 TransFunctionRecorder::TransFunctionRecorder(const std::type_info & info, TransFunctionPersistifier * persistifier):
-  persistifier(persistifier) {
+  m_persistifier(persistifier) {
   persistifier->add(info, this);
 }
 
 const TransFunctionPersistifier *TransFunctionRecorder::getPersistifier() const {
-  return persistifier;
+  return m_persistifier;
 }
 
 TransFunctionRecorder::~TransFunctionRecorder () {}
-- 
GitLab


From ed2df915f118a831fa06e49ed20a7131147f47a6 Mon Sep 17 00:00:00 2001
From: Mark Owen <mark.andrew.owen@cern.ch>
Date: Wed, 1 May 2019 10:38:04 +0100
Subject: [PATCH 030/129] Fix bug in error message in Deduplication.py

---
 Control/AthenaConfiguration/python/Deduplication.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/AthenaConfiguration/python/Deduplication.py b/Control/AthenaConfiguration/python/Deduplication.py
index 318a6f64b664..4a1238457899 100644
--- a/Control/AthenaConfiguration/python/Deduplication.py
+++ b/Control/AthenaConfiguration/python/Deduplication.py
@@ -78,7 +78,7 @@ def deduplicateComponent(newComp,comp):
                         continue
                     else:
                         raise DeduplicationFailed("PublicToolHandle / ServiceHandle '%s.%s' defined multiple times with conflicting values %s and %s" % \
-                                                  (comp.getJobOptName(),oldprop.getFullName(),newprop.getFullName()))
+                                                  (comp.getType(),comp.getJobOptName(),oldprop.getFullName(),newprop.getFullName()))
                         pass
                     #Case 2: A list of public tools (PublicToolHandleArray) or a list of service (ServiceHandelArray):
                 elif isinstance(oldprop,PublicToolHandleArray) or isinstance(oldprop,ServiceHandleArray):
-- 
GitLab


From 4399cd2c85ab80b654c7188f10de2b13c121bc89 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Wed, 1 May 2019 13:50:36 +0000
Subject: [PATCH 031/129] Cleanup of (I)SiDetElementsRoadMaker(_xk)

---
 .../ISiDetElementsRoadMaker.h                 |  16 +-
 .../SiDetElementsRoadMaker_xk.h               | 185 +++---
 .../src/SiDetElementsRoadMaker_xk.cxx         | 552 +++++++++---------
 3 files changed, 367 insertions(+), 386 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiDetElementsRoadMaker.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiDetElementsRoadMaker.h
index f683315f6d03..ee7122eb0ec8 100755
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiDetElementsRoadMaker.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiDetElementsRoadMaker.h
@@ -54,26 +54,26 @@ namespace InDet {
       ///////////////////////////////////////////////////////////////////
       // Main methods for road builder
       ///////////////////////////////////////////////////////////////////
-      
+
       virtual void detElementsRoad
 	(const std::list<const Trk::SpacePoint*>&,
-	std::list<const InDetDD::SiDetectorElement*>&)=0;
+	std::list<const InDetDD::SiDetectorElement*>&) const=0;
 
       virtual void detElementsRoad
 	(std::list<Amg::Vector3D>&,
-	 std::list<const InDetDD::SiDetectorElement*>&)=0;
-    
+	 std::list<const InDetDD::SiDetectorElement*>&) const=0;
+
       virtual void detElementsRoad
 	(const Trk::TrackParameters&,Trk::PropDirection, 
-	 std::list<const InDetDD::SiDetectorElement*>&)=0;
-      
+	 std::list<const InDetDD::SiDetectorElement*>&) const=0;
+ 
       ///////////////////////////////////////////////////////////////////
       // Print internal tool parameters and status
       ///////////////////////////////////////////////////////////////////
-     
+
       virtual MsgStream&    dump(MsgStream&    out) const=0;
       virtual std::ostream& dump(std::ostream& out) const=0;
-     
+
     };
   
   ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
index 1bbc11e50fbf..0f8168f92075 100755
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
@@ -24,6 +24,7 @@
 #include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h"
 #include "SiDetElementsRoadTool_xk/SiDetElementsLayerVectors_xk.h"
 #include "StoreGate/ReadCondHandleKey.h"
+#include "TrkExInterfaces/IPropagator.h"
 #include "TrkGeometry/MagneticFieldProperties.h"
 #include "TrkSurfaces/CylinderBounds.h"
 
@@ -38,119 +39,117 @@
 class MsgStream;
 class IMagFieldAthenaSvc;
 
-namespace Trk {
-
-  class IPropagator       ;
-}
-
 namespace InDet{
   /**
-  @class SiDetElementsRoadMaker_xk 
-  InDet::SiDetElementsRoadMaker_xk is algorithm which produce list of 
-  InDetDD::SiDetectorElement* sorted in propagation order according
-  global positions of the trajectory between perigee point and max radius
-  for direction along momentum.
-  @author Igor.Gavrilenko@cern.ch     
+     @class SiDetElementsRoadMaker_xk 
+     InDet::SiDetElementsRoadMaker_xk is algorithm which produce list of 
+     InDetDD::SiDetectorElement* sorted in propagation order according
+     global positions of the trajectory between perigee point and max radius
+     for direction along momentum.
+     @author Igor.Gavrilenko@cern.ch     
   */
 
 
   class SiDetElementsRoadMaker_xk : 
 
     virtual public ISiDetElementsRoadMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiDetElementsRoadMaker_xk
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiDetElementsRoadMaker_xk();
-      virtual StatusCode initialize();
-      virtual StatusCode finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Main methods for road builder
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiDetElementsRoadMaker_xk
+      (const std::string&, const std::string&, const IInterface*);
+    virtual ~SiDetElementsRoadMaker_xk() = default;
+    virtual StatusCode initialize();
+    virtual StatusCode finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Main methods for road builder
+    ///////////////////////////////////////////////////////////////////
       
-      virtual void detElementsRoad
-	(const std::list<const Trk::SpacePoint*>&,
-	 std::list<const InDetDD::SiDetectorElement*>&);
+    virtual void detElementsRoad
+      (const std::list<const Trk::SpacePoint*>&,
+       std::list<const InDetDD::SiDetectorElement*>&) const;
   
-      virtual void detElementsRoad
-	(std::list<Amg::Vector3D>&, 
-	 std::list<const InDetDD::SiDetectorElement*>&);
+    virtual void detElementsRoad
+      (std::list<Amg::Vector3D>&, 
+       std::list<const InDetDD::SiDetectorElement*>&) const;
 
-      virtual void detElementsRoad
-	(const Trk::TrackParameters&,Trk::PropDirection,
-	 std::list<const InDetDD::SiDetectorElement*>&);
+    virtual void detElementsRoad
+      (const Trk::TrackParameters&,
+       Trk::PropDirection,
+       std::list<const InDetDD::SiDetectorElement*>&) const;
 
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
 
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
+    MsgStream&    dump(MsgStream   & out) const;
+    std::ostream& dump(std::ostream& out) const;
 
-    protected:
+  protected:
       
-      ///////////////////////////////////////////////////////////////////
-      // Protected Data
-      ///////////////////////////////////////////////////////////////////
-
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle;
-      MagField::IMagFieldSvc*                m_fieldService{}      ;
-      ToolHandle<Trk::IPropagator>           m_proptool          ;  // Propagator     tool
-
-      bool                                 m_usePIX{}   ;
-      bool                                 m_useSCT{}   ;
-      bool                                 m_test{}     ;
-      int                                  m_outputlevel{};
-      int                                  m_nprint{}   ;
-      int                                  m_sizeroad{} ;
-      float                                m_width{}    ;  // Width of the road
-      double                               m_step {}    ;  // Max step allowed
-      Trk::CylinderBounds                  m_bounds{}   ;  //  
-      std::vector<SiDetElementsLayer_xk>   m_layer[3] ;  // Layers
-      std::string                          m_pix      ;  // PIX manager   location
-      std::string                          m_sct      ;  // SCT manager   location
-      std::string                          m_fieldmode;  // Mode of magnetic field
-      Trk::MagneticFieldMode               m_fieldModeEnum{Trk::FullField};
-      SG::ReadCondHandleKey<SiDetElementsLayerVectors_xk> m_layerVecKey{this, "LayerVecKey",
-          "SiDetElementsLayerVectors_xk", "Key of SiDetElementsLayerVectors_xk"};
-
-      // Mutex to protect the contents
-      mutable std::mutex m_mutex;
-      // Cache to store events for slots
-      mutable std::vector<EventContext::ContextEvt_t> m_cache;
-      // std::vector<SiDetElementsLayer_xk> for each event. This is not const.
-      mutable SiDetElementsLayerVectors_xk m_layerVectors[3];
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods
-      ///////////////////////////////////////////////////////////////////
-
-      void       mapDetectorElementsProduction();
-      float stepToDetElement
-	(const InDetDD::SiDetectorElement*&,Amg::Vector3D&,Amg::Vector3D&);
-
-      Trk::CylinderBounds getBound(const Trk::TrackParameters&);
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void getLayers(std::vector<SiDetElementsLayer_xk>* (&layer)[3]) const;
+    ///////////////////////////////////////////////////////////////////
+    // Protected Data
+    ///////////////////////////////////////////////////////////////////
+
+    ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+    PublicToolHandle<Trk::IPropagator> m_proptool{this, "PropagatorTool",
+        "Trk::RungeKuttaPropagator/InDetPropagator", "Propagator tool"};
+
+    SG::ReadCondHandleKey<SiDetElementsLayerVectors_xk> m_layerVecKey{this, "LayerVecKey",
+        "SiDetElementsLayerVectors_xk", "Key of SiDetElementsLayerVectors_xk"};
+
+    BooleanProperty m_usePIX{this, "usePixel", true};
+    BooleanProperty m_useSCT{this, "useSCT", true};
+    FloatProperty m_width{this, "RoadWidth", 20., "Width of the road"};
+    DoubleProperty m_step{this, "MaxStep", 40., "Max step allowed"};
+    StringProperty m_pix{this, "PixManagerLocation", "Pixel"};  // PIX manager   location
+    StringProperty m_sct{this, "SCTManagerLocation", "SCT"};  // SCT manager   location
+    StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid"};  // Mode of magnetic field
+
+    // Updated only in initialize
+    Trk::CylinderBounds                  m_bounds{};
+    std::vector<SiDetElementsLayer_xk>   m_layer[3]; // Layers
+    Trk::MagneticFieldMode               m_fieldModeEnum{Trk::FullField};
+    int                                  m_outputlevel{};
+
+    // This is not set by third detElementsRoad method but used by  first detElementsRoad method.
+    // This is not multithread safe.
+    mutable std::atomic_bool m_test{};
+
+    // Mutex to protect the contents
+    mutable std::mutex m_mutex;
+    // Cache to store events for slots
+    mutable std::vector<EventContext::ContextEvt_t> m_cache;
+    // std::vector<SiDetElementsLayer_xk> for each event. This is not const.
+    mutable SiDetElementsLayerVectors_xk m_layerVectors[3];
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////
+
+    void mapDetectorElementsProduction();
+    float stepToDetElement(const InDetDD::SiDetectorElement*&,
+                           Amg::Vector3D&, Amg::Vector3D&) const;
+
+    Trk::CylinderBounds getBound(const Trk::TrackParameters&) const;
+
+    MsgStream& dumpConditions(MsgStream& out) const;
+
+    void getLayers(std::vector<SiDetElementsLayer_xk>* (&layer)[3]) const;
   };
 
-  MsgStream&    operator << (MsgStream&   ,const SiDetElementsRoadMaker_xk&);
-  std::ostream& operator << (std::ostream&,const SiDetElementsRoadMaker_xk&); 
+  MsgStream&    operator << (MsgStream&   , const SiDetElementsRoadMaker_xk&);
+  std::ostream& operator << (std::ostream&, const SiDetElementsRoadMaker_xk&); 
 
 } // end of name space
 
 #endif // SiDetElementsRoadMaker_xk_H
-
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index c5b568f54647..2b12da062bfa 100755
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -17,11 +17,10 @@
 
 #include "InDetReadoutGeometry/SCT_DetectorManager.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "TrkExInterfaces/IPropagator.h"
-#include "TrkPrepRawData/PrepRawData.h"
 #include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h"
 #include "SiDetElementsRoadUtils_xk.h"
 #include "StoreGate/ReadCondHandle.h"
+#include "TrkPrepRawData/PrepRawData.h"
 
 #include <ostream>
 #include <iomanip>
@@ -31,37 +30,10 @@
 ///////////////////////////////////////////////////////////////////
 
 InDet::SiDetElementsRoadMaker_xk::SiDetElementsRoadMaker_xk
-(const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
-    m_proptool   ("Trk::RungeKuttaPropagator/InDetPropagator" )
+(const std::string& t, const std::string& n, const IInterface* p)
+  : AthAlgTool(t, n, p)
 {
-  m_usePIX      = true                       ;
-  m_useSCT      = true                       ;
-  m_sct         = "SCT"                      ;
-  m_pix         = "Pixel"                    ;
-  m_width       = 20.                        ;
-  m_step        = 40.                        ;
-  m_fieldmode   = "MapSolenoid"              ;
-
   declareInterface<ISiDetElementsRoadMaker>(this);
-  declareProperty("SCTManagerLocation"   ,m_sct        );
-  declareProperty("PixManagerLocation"   ,m_pix        );
-  declareProperty("RoadWidth"            ,m_width      );
-  declareProperty("MaxStep"              ,m_step       );
-  declareProperty("PropagatorTool"       ,m_proptool   );
-  declareProperty("MagneticFieldMode"    ,m_fieldmode  );
-  declareProperty("usePixel"             ,m_usePIX     );
-  declareProperty("useSCT"               ,m_useSCT     );
-  declareProperty("MagFieldSvc"        , m_fieldServiceHandle);
-}
-
-///////////////////////////////////////////////////////////////////
-// Destructor  
-///////////////////////////////////////////////////////////////////
-
-InDet::SiDetElementsRoadMaker_xk::~SiDetElementsRoadMaker_xk()
-{
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -70,26 +42,23 @@ InDet::SiDetElementsRoadMaker_xk::~SiDetElementsRoadMaker_xk()
 
 StatusCode InDet::SiDetElementsRoadMaker_xk::initialize()
 {
-  
   if (!m_usePIX && !m_useSCT) {
-    msg(MSG::FATAL) << "Please don't call this tool if usePixel and useSCT are false" << endmsg;
-    return StatusCode::SUCCESS;
+    ATH_MSG_FATAL("Please don't call this tool if usePixel and useSCT are false");
+    return StatusCode::FAILURE;
   }
  
   // Get magnetic field service
   //
-  if(m_fieldmode != "NoField" ) {
-    
-    ATH_CHECK( m_fieldServiceHandle.retrieve() );
-    m_fieldService = &*m_fieldServiceHandle;
+  if (m_fieldmode != "NoField") {
+    ATH_CHECK(m_fieldServiceHandle.retrieve());
   }
-  if(m_fieldmode == "NoField") m_fieldModeEnum = Trk::NoField;
-  else if(m_fieldmode == "MapSolenoid") m_fieldModeEnum = Trk::FastField;
+  if (m_fieldmode == "NoField") m_fieldModeEnum = Trk::NoField;
+  else if (m_fieldmode == "MapSolenoid") m_fieldModeEnum = Trk::FastField;
   else m_fieldModeEnum = Trk::FullField;
 
   // Get propagator tool
   //
-  ATH_CHECK ( m_proptool.retrieve());
+  ATH_CHECK(m_proptool.retrieve());
 
   // Get output print level
   //
@@ -110,7 +79,7 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::initialize()
 
 StatusCode InDet::SiDetElementsRoadMaker_xk::finalize()
 {
-   return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 
@@ -118,10 +87,9 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::finalize()
 // Dumps relevant information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiDetElementsRoadMaker_xk::dump( MsgStream& out ) const
+MsgStream& InDet::SiDetElementsRoadMaker_xk::dump(MsgStream& out) const
 {
   out<<"\n";
-  if(m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -129,45 +97,53 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dump( MsgStream& out ) const
 // Dumps conditions information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) const
+MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions(MsgStream& out) const
 {
   int n = 62-m_proptool.type().size();
-  std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
+  std::string s1;
+  for (int i=0; i<n; ++i) s1.append(" ");
+  s1.append("|");
 
-  std::string fieldmode[9] ={"NoField"       ,"ConstantField","SolenoidalField",
-			     "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
-			     "UndefinedField","AthenaField"  , "?????"         };
+  std::string fieldmode[9] = {"NoField"       , "ConstantField", "SolenoidalField",
+                              "ToroidalField" , "Grid3DField"  , "RealisticField" ,
+                              "UndefinedField", "AthenaField"  , "?????"         };
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-  if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+  if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
   Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
 
   int mode = fieldprop.magneticFieldMode();
-  if(mode<0 || mode>8 ) mode = 8; 
+  if (mode<0 || mode>8) mode = 8; 
 
-  n     = 62-fieldmode[mode].size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  n = 62-fieldmode[mode].size();
+  std::string s3;
+  for (int i=0; i<n; ++i) s3.append(" ");
+  s3.append("|");
 
-  n     = 62-m_sct.size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
+  n = 62-m_sct.size();
+  std::string s5;
+  for (int i=0; i<n; ++i) s5.append(" ");
+  s5.append("|");
 
-  n     = 62-m_pix.size();
-  std::string s6; for(int i=0; i<n; ++i) s6.append(" "); s6.append("|");
+  n = 62-m_pix.size();
+  std::string s6;
+  for (int i=0; i<n; ++i) s6.append(" ");
+  s6.append("|");
 
   std::vector<SiDetElementsLayer_xk>* layer[3];
   getLayers(layer);
 
   int maps = 0;
-  if(layer[0]->size()) ++maps;
-  if(layer[1]->size()) ++maps;
-  if(layer[2]->size()) ++maps;
+  if (layer[0]->size()) ++maps;
+  if (layer[1]->size()) ++maps;
+  if (layer[2]->size()) ++maps;
   out<<"|----------------------------------------------------------------------"
      <<"-------------------|"
      <<"\n";
-  if(m_useSCT) {
+  if (m_useSCT) {
     out<<"| SCT   detector manager  | "<<m_sct             <<s5<<"\n";
   }
-  if(m_usePIX) {
+  if (m_usePIX) {
     out<<"| Pixel detector manager  | "<<m_pix             <<s6<<"\n";
   }
   out<<"| Tool for propagation    | "<<m_proptool.type() <<s1<<"\n";
@@ -179,12 +155,12 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
      <<"-------------------|"
      <<"\n";
 
-  if(!maps || m_outputlevel==0) return out;
+  if (!maps || m_outputlevel==0) return out;
 
-  if(layer[1]->size()) {
+  if (layer[1]->size()) {
     int nl = layer[1]->size();
     int nc = 0;
-    for(unsigned int i=0; i!=layer[1]->size(); ++i) nc+=layer[1]->at(i).nElements();
+    for (unsigned int i=0; i!=layer[1]->size(); ++i) nc+=layer[1]->at(i).nElements();
     out<<"|----------------------------------------------------------------|"
        <<"\n";
     out<<"| Barrel map containt "
@@ -197,7 +173,7 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
-    for(unsigned int i=0; i!=layer[1]->size(); ++i) {
+    for (unsigned int i=0; i!=layer[1]->size(); ++i) {
       double zmin = layer[1]->at(i).z()-layer[1]->at(i).dz();
       double zmax = layer[1]->at(i).z()+layer[1]->at(i).dz();
       out<<"| "
@@ -213,11 +189,10 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
 
   }
-  if(layer[0]->size()) {
-
+  if (layer[0]->size()) {
     int nl = layer[0]->size();
     int nc = 0;
-    for(unsigned int i=0; i!=layer[0]->size(); ++i) nc+=layer[0]->at(i).nElements();
+    for (unsigned int i=0; i!=layer[0]->size(); ++i) nc+=layer[0]->at(i).nElements();
     out<<"|----------------------------------------------------------------|"
        <<"\n";
     out<<"| L.Endcap map containt"
@@ -231,7 +206,7 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
-    for(unsigned int i=0; i!=layer[0]->size(); ++i) {
+    for (unsigned int i=0; i!=layer[0]->size(); ++i) {
       double rmin = layer[0]->at(i).r()-layer[0]->at(i).dr();
       double rmax = layer[0]->at(i).r()+layer[0]->at(i).dr();
       out<<"| "
@@ -246,13 +221,13 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
   }
-  if(layer[2]->size()) {
+  if (layer[2]->size()) {
     int nl = layer[2]->size();
     int nc = 0;
-    for(unsigned int i=0; i!=layer[2]->size(); ++i) nc+=layer[2]->at(i).nElements();
+    for (unsigned int i=0; i!=layer[2]->size(); ++i) nc+=layer[2]->at(i).nElements();
     out<<"|----------------------------------------------------------------|"
        <<"\n";
-   out<<"| R.Endcap map containt"
+    out<<"| R.Endcap map containt"
        <<std::setw(3)<<nl<<" layers and"
        <<std::setw(5)<<nc<<" elements              |"
        <<"\n";
@@ -262,7 +237,7 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
        <<"\n";
     out<<"|------|-----------|------------|------------|------------|------|"
        <<"\n";
-    for(unsigned int i=0; i!=layer[2]->size(); ++i) {
+    for (unsigned int i=0; i!=layer[2]->size(); ++i) {
       double rmin = layer[2]->at(i).r()-layer[0]->at(i).dr();
       double rmax = layer[2]->at(i).r()+layer[0]->at(i).dr();
       out<<"| "
@@ -281,26 +256,11 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co
   return out;
 }
 
-///////////////////////////////////////////////////////////////////
-// Dumps event information into the MsgStream
-///////////////////////////////////////////////////////////////////
-
-MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpEvent( MsgStream& out ) const
-{
-  out<<"|---------------------------------------------------------------------|"
-     <<"\n";
-  out<<"| Road size               | "<<std::setw(12)<<m_sizeroad
-     <<"                              |"<<"\n";
-  out<<"|---------------------------------------------------------------------|"
-     <<"\n";
-  return out;
-}
-
 ///////////////////////////////////////////////////////////////////
 // Dumps relevant information into the ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::SiDetElementsRoadMaker_xk::dump( std::ostream& out ) const
+std::ostream& InDet::SiDetElementsRoadMaker_xk::dump(std::ostream& out) const
 {
   return out;
 }
@@ -309,8 +269,8 @@ std::ostream& InDet::SiDetElementsRoadMaker_xk::dump( std::ostream& out ) const
 // Overload of << operator MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiDetElementsRoadMaker_xk& se)
+MsgStream& InDet::operator <<
+(MsgStream& sl, const InDet::SiDetElementsRoadMaker_xk& se)
 { 
   return se.dump(sl); 
 }
@@ -319,8 +279,8 @@ MsgStream& InDet::operator    <<
 // Overload of << operator std::ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiDetElementsRoadMaker_xk& se)
+std::ostream& InDet::operator <<
+(std::ostream& sl, const InDet::SiDetElementsRoadMaker_xk& se)
 { 
   return se.dump(sl); 
 }   
@@ -331,13 +291,14 @@ std::ostream& InDet::operator <<
 
 void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 (const std::list<const Trk::SpacePoint*>& Sp,
- std::list<const InDetDD::SiDetectorElement*>& Road)
+ std::list<const InDetDD::SiDetectorElement*>& Road) const
 {
   if ((!m_usePIX && !m_useSCT)) return;
   
   std::list<Amg::Vector3D> G;
-  std::list<const Trk::SpacePoint*>::const_iterator s=Sp.begin(),se=Sp.end();
-  for(; s!=se; ++s) {G.push_back((*s)->globalPosition());}
+  for (const Trk::SpacePoint* s: Sp) {
+    G.push_back(s->globalPosition());
+  }
   detElementsRoad(G,Road);
 }
 
@@ -347,104 +308,108 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 
 void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 (std::list<Amg::Vector3D>& GP,
- std::list<const InDetDD::SiDetectorElement*>& Road) 
+ std::list<const InDetDD::SiDetectorElement*>& Road) const
 {  
   if (!m_usePIX && !m_useSCT) return;
 
   std::vector<SiDetElementsLayer_xk>* layer[3];
   getLayers(layer);
 
+
+  std::list<Amg::Vector3D>::iterator g=GP.begin(), ge=GP.end();
+  float Po[6] = {static_cast<float>((*g).x()), static_cast<float>((*g).y()), static_cast<float>((*g).z()),
+                 static_cast<float>(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y())), m_width, 0.};
   int n0 = 0;
+  for (; n0!=static_cast<int>(layer[0]->size()); ++n0) {
+    if (Po[2] > layer[0]->at(n0).z()) break;
+  }
   int n1 = 0;
+  for (; n1!=static_cast<int>(layer[1]->size()); ++n1) {
+    if (Po[3] < layer[1]->at(n1).r()) break;
+  }
   int n2 = 0;
-
-  std::list<Amg::Vector3D>::iterator g=GP.begin(),ge=GP.end();
-
-  float Po[6] = {float((*g).x()),float((*g).y()),float((*g).z()),
-		  float(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y())),m_width,0.};
-
-  for(; n0!=static_cast<int>(layer[0]->size()); ++n0) {if(Po[2] > layer[0]->at(n0).z()) break;}
-  for(; n1!=static_cast<int>(layer[1]->size()); ++n1) {if(Po[3] < layer[1]->at(n1).r()) break;}
-  for(; n2!=static_cast<int>(layer[2]->size()); ++n2) {if(Po[2] < layer[2]->at(n2).z()) break;}
+  for (; n2!=static_cast<int>(layer[2]->size()); ++n2) {
+    if (Po[2] < layer[2]->at(n2).z()) break;
+  }
 
   std::list<InDet::SiDetElementLink_xk*> lDE;
 
-  ++g; while(g!=ge) {
-
-    float  Pn[4] = {float((*g).x()),float((*g).y()),float((*g).z()),
-		    float(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y()))};
+  ++g;
+  while (g!=ge) {
+    float  Pn[4] = {static_cast<float>((*g).x()), static_cast<float>((*g).y()), static_cast<float>((*g).z()),
+		    static_cast<float>(sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y()))};
 
     float dx = Pn[0]-Po[0];
     float dy = Pn[1]-Po[1];
     float dz = Pn[2]-Po[2];
-    float st = sqrt(dx*dx+dy*dy+dz*dz); if(st <=0.) {++g; continue;}
+    float st = sqrt(dx*dx+dy*dy+dz*dz);
+    if (st <=0.) {
+      ++g;
+      continue;
+    }
     float ds = 1./st;
-    float A[3]= {dx*ds,dy*ds,dz*ds};
+    float A[3]= {dx*ds, dy*ds, dz*ds};
 
     // Min. radius test between this two points
     //    
     float at = A[0]*A[0]+A[1]*A[1];
     float dr = 0.                 ;
-    if(at!=0.) {
-
+    if (at!=0.) {
       float sm = -(A[0]*Po[0]+A[1]*Po[1])/at;
-      if(sm > 1. && sm < st) {
-	Pn[0]     = Po[0]+A[0]*sm;
-	Pn[1]     = Po[1]+A[1]*sm;
-	Pn[2]     = Po[2]+A[2]*sm;
-	Pn[3]     = sqrt(Pn[0]*Pn[0]+Pn[1]*Pn[1]);
-	dr        = 20.;
+      if (sm > 1. && sm < st) {
+	Pn[0] = Po[0]+A[0]*sm;
+	Pn[1] = Po[1]+A[1]*sm;
+	Pn[2] = Po[2]+A[2]*sm;
+	Pn[3] = sqrt(Pn[0]*Pn[0]+Pn[1]*Pn[1]);
+	dr    = 20.;
+      } else {
+        ++g;
       }
-      else ++g;
+    } else {
+      ++g;
     }
-    else ++g;
 
     // Barrel
     //
-    if(Pn[3]>Po[3]) {
-      for(; n1<static_cast<int>(layer[1]->size()); ++n1) {
-	if(Pn[3] < layer[1]->at(n1).r()) break;
-	layer[1]->at(n1).getBarrelDetElements(Po,A,lDE);
+    if (Pn[3]>Po[3]) {
+      for (; n1<static_cast<int>(layer[1]->size()); ++n1) {
+	if (Pn[3] < layer[1]->at(n1).r()) break;
+	layer[1]->at(n1).getBarrelDetElements(Po, A, lDE);
+      }
+    } else {
+      for (--n1; n1>=0; --n1) {
+	if (Pn[3] > layer[1]->at(n1).r()+dr) break; 
+	layer[1]->at(n1).getBarrelDetElements(Po, A, lDE);
       }
-    }
-    else     {
-      for(--n1; n1>=0; --n1) {
-	if(Pn[3] > layer[1]->at(n1).r()+dr) break; 
-	layer[1]->at(n1).getBarrelDetElements(Po,A,lDE);
-     }
       ++n1;
     }
 
     // Positive endcap
     //
-    if(Pn[2]>Po[2]) {
-
-      for(; n2<static_cast<int>(layer[2]->size()); ++n2) {
-	if(Pn[2] < layer[2]->at(n2).z()) break; 
-	layer[2]->at(n2).getEndcapDetElements(Po,A,lDE);
+    if (Pn[2]>Po[2]) {
+      for (; n2<static_cast<int>(layer[2]->size()); ++n2) {
+	if (Pn[2] < layer[2]->at(n2).z()) break; 
+	layer[2]->at(n2).getEndcapDetElements(Po, A, lDE);
       }
-    }
-    else     {
-      for(--n2; n2>=0; --n2) {
-	if(Pn[2] > layer[2]->at(n2).z()) break; 
-	layer[2]->at(n2).getEndcapDetElements(Po,A,lDE);
+    } else {
+      for (--n2; n2>=0; --n2) {
+	if (Pn[2] > layer[2]->at(n2).z()) break; 
+	layer[2]->at(n2).getEndcapDetElements(Po, A, lDE);
       }
       ++n2;
     }
 
     // Negative endcap
     //
-    if(Pn[2]<Po[2]) {
-
-      for(; n0<static_cast<int>(layer[0]->size()); ++n0) {
-	if(Pn[2] > layer[0]->at(n0).z()) break; 
-	layer[0]->at(n0).getEndcapDetElements(Po,A,lDE);
+    if (Pn[2]<Po[2]) {
+      for (; n0<static_cast<int>(layer[0]->size()); ++n0) {
+	if (Pn[2] > layer[0]->at(n0).z()) break; 
+	layer[0]->at(n0).getEndcapDetElements(Po, A, lDE);
       }
-    }
-    else   {
-      for(--n0; n0>=0; --n0) {
-	if(Pn[2] < layer[0]->at(n0).z()) break; 
-	layer[0]->at(n0).getEndcapDetElements(Po,A,lDE);
+    } else {
+      for (--n0; n0>=0; --n0) {
+	if (Pn[2] < layer[0]->at(n0).z()) break; 
+	layer[0]->at(n0).getEndcapDetElements(Po, A, lDE);
       } 
       ++n0;
     }
@@ -458,17 +423,18 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 
   // Sort list in propogation order
   //
-  std::list<InDet::SiDetElementLink_xk*>::iterator l=lDE.begin(),le=lDE.end(),n,m;
-  if(l==le) return;
+  std::list<InDet::SiDetElementLink_xk*>::iterator l=lDE.begin(), le=lDE.end(), n, m;
+  if (l==le) return;
 
   bool nc =true;
-  while(nc) {
-
+  while (nc) {
     nc =false; m=l; n=l;
-    for(++n; n!=le; ++n) {
-   
-      if( (*m)->way() > (*n)->way() ) {
-	InDet::SiDetElementLink_xk* d=(*m); (*m)=(*n); (*n)=d; nc=true;
+    for (++n; n!=le; ++n) {
+      if ((*m)->way() > (*n)->way()) {
+	InDet::SiDetElementLink_xk* d=(*m);
+        (*m)=(*n);
+        (*n)=d;
+        nc=true;
       }
       ++m;
     }
@@ -476,11 +442,12 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 
   // Fill list pointers to detector elements
   //
-  for(l=lDE.begin(); l!=le; ++l) {
-
-    if(m_test) {if((*l)->way() >= 0.) Road.push_back((*l)->detElement());}
-    else                              Road.push_back((*l)->detElement());
-
+  for (l=lDE.begin(); l!=le; ++l) {
+    if (m_test) {
+      if ((*l)->way() >= 0.) Road.push_back((*l)->detElement());
+    } else {
+      Road.push_back((*l)->detElement());
+    }
     (*l)->clearUsed();
   }
 }
@@ -490,38 +457,49 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiDetElementsRoadMaker_xk::detElementsRoad 
-(const Trk::TrackParameters& Tp,Trk::PropDirection D,
- std::list<const InDetDD::SiDetectorElement*>& R)
+(const Trk::TrackParameters& Tp, Trk::PropDirection D,
+ std::list<const InDetDD::SiDetectorElement*>& R) const
 {
   if (!m_usePIX && !m_useSCT) return;
   
-  double qp   = fabs(500.*Tp.parameters()[4]) ; if( qp < 1.e-10  ) qp = 1.e-10; 
-  double S    = m_step/qp                     ; if( S  > 1000.   ) S  = 1000. ;
-
-
-  m_test = true; if(D<0) {m_test = false; S=-S;}
+  double qp   = fabs(500.*Tp.parameters()[4]);
+  if (qp < 1.e-10) qp = 1.e-10; 
+  double S    = m_step/qp                    ;
+  if (S  > 1000. ) S  = 1000. ;
+
+  m_test = true;
+  if (D<0) {
+    m_test = false;
+    S=-S;
+  }
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-  if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+  if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
   Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
 
   std::list<Amg::Vector3D> G;
-  m_proptool->globalPositions(G,Tp,fieldprop,getBound(Tp),S,Trk::pion);
-  if(G.size()<2) return;
+  m_proptool->globalPositions(G, Tp, fieldprop,getBound(Tp), S, Trk::pion);
+  if (G.size()<2) return;
 
-  if(D > 0) {
-    std::list<Amg::Vector3D>::iterator g=G.begin(),gn,ge=G.end();
+  if (D > 0) {
+    std::list<Amg::Vector3D>::iterator g=G.begin(), gn, ge=G.end();
     float r0 = (*g).x()*(*g).x()+(*g).y()*(*g).y();
 
-    while(g!=ge) {
-      gn = g; if(++gn == ge) break;
+    while (g!=ge) {
+      gn = g;
+      if (++gn == ge) break;
       
       float r = (*gn).x()*(*gn).x()+(*gn).y()*(*gn).y();
       
-      if(r < r0) {r0 = r; G.erase(g++);} else break;
+      if (r < r0) {
+        r0 = r;
+        G.erase(g++);
+      } else {
+        break;
+      }
     }
   }
-  detElementsRoad(G,R);  
+  detElementsRoad(G, R);  
 }
 
 
@@ -531,153 +509,154 @@ void InDet::SiDetElementsRoadMaker_xk::detElementsRoad
 
 void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction() 
 {
-
   const double pi2=2.*M_PI, pi=M_PI;
 
   StatusCode sc;
 
   // Get  Pixel Detector Manager
   //
-  const InDetDD::PixelDetectorManager* pixmgr = 0;
-  if(m_usePIX) {
-    sc = detStore()->retrieve(pixmgr,m_pix);
+  const InDetDD::PixelDetectorManager* pixmgr = nullptr;
+  if (m_usePIX) {
+    sc = detStore()->retrieve(pixmgr, m_pix);
     if (sc.isFailure() || !pixmgr) {
-      msg(MSG::INFO)<<"Could not get PixelDetectorManager  !"<<endmsg; 
+      ATH_MSG_INFO("Could not get PixelDetectorManager  !");
       return;
     }
   }
   
   // Get  SCT Detector Manager
   //
-  const InDetDD::SCT_DetectorManager* sctmgr = 0;
-  if(m_useSCT) {
-    sc = detStore()->retrieve(sctmgr,m_sct);
+  const InDetDD::SCT_DetectorManager* sctmgr = nullptr;
+  if (m_useSCT) {
+    sc = detStore()->retrieve(sctmgr, m_sct);
     if (sc.isFailure() || !sctmgr) {
-      msg(MSG::INFO)<<"Could not get SCT_DetectorManager !"<<endmsg; 
+      ATH_MSG_INFO("Could not get SCT_DetectorManager !");
       return;
     }
   }
 
-  const PixelID* IDp = 0; 
-  const SCT_ID*  IDs = 0; 
+  const PixelID* IDp = nullptr;
+  const SCT_ID*  IDs = nullptr;
 
-  if (m_usePIX &&  detStore()->retrieve(IDp, "PixelID").isFailure()) {
-    msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg;
+  if (m_usePIX && detStore()->retrieve(IDp, "PixelID").isFailure()) {
+    ATH_MSG_FATAL("Could not get Pixel ID helper");
   }
   
-  if(m_useSCT && detStore()->retrieve(IDs, "SCT_ID").isFailure()) {
-    msg(MSG::FATAL) << "Could not get SCT ID helper" << endmsg;
+  if (m_useSCT && detStore()->retrieve(IDs, "SCT_ID").isFailure()) {
+    ATH_MSG_FATAL("Could not get SCT ID helper");
   }
 
 
-  if(!IDs && !IDp) return;
+  if (!IDs && !IDp) return;
 
-  InDetDD::SiDetectorElementCollection::const_iterator s,se;
+  InDetDD::SiDetectorElementCollection::const_iterator s, se;
   std::vector<InDetDD::SiDetectorElement*> pW[3];            
 
-  if(IDp) {
-
+  if (IDp) {
     // Loop over each wafer of pixels
     //
     s  =  pixmgr->getDetectorElementBegin();
     se =  pixmgr->getDetectorElementEnd  ();
 
     for (; s!=se; ++s) {
-
-      if     ((*s)->isBarrel()       ) pW[1].push_back((*s)); // Barrel
-      else if((*s)->center().z() > 0.) pW[2].push_back((*s)); // Right endcap
-      else                             pW[0].push_back((*s)); // Left  endcap
+      if      ((*s)->isBarrel()       ) pW[1].push_back((*s)); // Barrel
+      else if ((*s)->center().z() > 0.) pW[2].push_back((*s)); // Right endcap
+      else                              pW[0].push_back((*s)); // Left  endcap
     }
   }
 
-  if(IDs) {
-
+  if (IDs) {
     // Loop over each wafer of sct
     //
     s  = sctmgr->getDetectorElementBegin();
     se = sctmgr->getDetectorElementEnd  ();
 
     for (; s!=se; ++s) {
-
-      if     ((*s)->isBarrel()       ) pW[1].push_back((*s)); // Barrel
-      else if((*s)->center().z() > 0.) pW[2].push_back((*s)); // Right endcap
-      else                             pW[0].push_back((*s)); // Left  endcap
-   }
+      if      ((*s)->isBarrel()       ) pW[1].push_back((*s)); // Barrel
+      else if ((*s)->center().z() > 0.) pW[2].push_back((*s)); // Right endcap
+      else                              pW[0].push_back((*s)); // Left  endcap
+    }
   }
 
-  int nel = pW[0].size()+pW[1].size()+pW[2].size(); if(!nel) return;
+  int nel = pW[0].size()+pW[1].size()+pW[2].size();
+  if (!nel) return;
 
-  std::sort(pW[1].begin(),pW[1].end(),InDet::compDetElements_RAZ());
-  std::sort(pW[0].begin(),pW[0].end(),InDet::compDetElements_ZRA());
-  std::sort(pW[2].begin(),pW[2].end(),InDet::compDetElements_ZRA());
+  std::sort(pW[1].begin(), pW[1].end(), InDet::compDetElements_RAZ());
+  std::sort(pW[0].begin(), pW[0].end(), InDet::compDetElements_ZRA());
+  std::sort(pW[2].begin(), pW[2].end(), InDet::compDetElements_ZRA());
 
   double   mzmin [3];  // min Z coordinate 
   double   mzmax [3];  // max Z coordinate
   double   mrmin [3];  // min radius
   double   mrmax [3];  // max radius
  
-  for(int N=0; N!=3; ++N) {
-
+  for (int N=0; N!=3; ++N) {
     double P[40];
-    int im    = int(pW[N].size()-1); 
+    int im    = static_cast<int>(pW[N].size()-1); 
     int If    = 0      ;
     double z0 = 0.     ;
     double r0 = 0.     ;
-    mrmin[N] = 100000.; mrmax[N] =-100000.;
-    mzmin[N] = 100000.; mzmax[N] =-100000.;
+    mrmin[N] = 100000.;
+    mrmax[N] =-100000.;
+    mzmin[N] = 100000.;
+    mzmax[N] =-100000.;
     
-    for(int i = 0; i<= im; ++i) {
-     
-      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pW[N][i]),P); 
-
-      if( P[ 9] < mrmin[N] ) mrmin[N] = P[ 9]; 
-      if( P[10] > mrmax[N] ) mrmax[N] = P[10]; 
-      if( P[11] < mzmin[N] ) mzmin[N] = P[11]; 
-      if( P[12] > mzmax[N] ) mzmax[N] = P[12]; 
+    for (int i = 0; i<= im; ++i) {
+      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pW[N][i]), P); 
+
+      if (P[ 9] < mrmin[N]) mrmin[N] = P[ 9]; 
+      if (P[10] > mrmax[N]) mrmax[N] = P[10]; 
+      if (P[11] < mzmin[N]) mzmin[N] = P[11]; 
+      if (P[12] > mzmax[N]) mzmax[N] = P[12]; 
  
       double r    = P[0];
       double z    = P[1];
       bool   newl = false;
-      if(N==1) {
-	if(fabs(r-r0) > 10.) {newl=true; r0=r;      }
-      }
-      else     {
-	if(fabs(z-z0) >10.) {newl=true; r0=r; z0=z;}
+      if (N==1) {
+	if (fabs(r-r0) > 10.) {
+          newl=true;
+          r0=r;
+        }
+      } else {
+	if (fabs(z-z0) > 10.) {
+          newl=true;
+          r0=r;
+          z0=z;
+        }
       }
 
-      if(newl || i==im) {
-	
-	int Il = i-1; if(i==im) ++Il;
-
-	if(If<=Il) {
+      if (newl || i==im) {
+	int Il = i-1;
+        if (i==im) ++Il;
 
+	if (If<=Il) {
 	  double rmin = 100000., rmax =-100000.;
 	  double zmin = 100000., zmax =-100000.;
 	  double dfm  = 0.;
 
 	  std::vector<InDetDD::SiDetectorElement*> pE;
-	  for(int j=If; j<=Il; ++j) pE.push_back(pW[N][j]);
-	  std::sort(pE.begin(),pE.end(),InDet::compDetElements_A());
+	  for (int j=If; j<=Il; ++j) pE.push_back(pW[N][j]);
+	  std::sort(pE.begin(), pE.end(), InDet::compDetElements_A());
 	  
 	  InDet::SiDetElementsLayer_xk layer;
 
-	  for(unsigned int j=0; j!=pE.size(); ++j) {
-
-	    if(pE[j]) {
-
-	      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pE[j]),P);
+	  for (unsigned int j=0; j!=pE.size(); ++j) {
+	    if (pE[j]) {
+	      InDet::SiDetElementsRoadUtils_xk::detElementInformation(*(pE[j]), P);
 
-	      if( P[ 9] < rmin ) rmin = P[ 9]; 
-	      if( P[10] > rmax ) rmax = P[10]; 
-	      if( P[11] < zmin ) zmin = P[11]; 
-	      if( P[12] > zmax ) zmax = P[12]; 
+	      if (P[ 9] < rmin) rmin = P[ 9]; 
+	      if (P[10] > rmax) rmax = P[10]; 
+	      if (P[11] < zmin) zmin = P[11]; 
+	      if (P[12] > zmax) zmax = P[12]; 
 	      
-	      double df1 = fabs(P[13]-P[2]); if(df1>pi) df1 = fabs(df1-pi2); 
-	      double df2 = fabs(P[14]-P[2]); if(df2>pi) df2 = fabs(df2-pi2); 
-	      if(df1>dfm) dfm = df1;
-	      if(df2>dfm) dfm = df2;
+	      double df1 = fabs(P[13]-P[2]);
+              if (df1>pi) df1 = fabs(df1-pi2); 
+	      double df2 = fabs(P[14]-P[2]);
+              if (df2>pi) df2 = fabs(df2-pi2); 
+	      if (df1>dfm) dfm = df1;
+	      if (df2>dfm) dfm = df2;
 	      
-	      InDet::SiDetElementLink_xk link(pE[j],P);
+	      InDet::SiDetElementLink_xk link(pE[j], P);
 	      layer.add(link);
 	    }
 	  }
@@ -685,7 +664,7 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
 	  double dr =(rmax-rmin)*.5; 
 	  double z  =(zmax+zmin)*.5;
 	  double dz =(zmax-zmin)*.5;
-	  layer.set(r,dr,z,dz,dfm);
+	  layer.set(r, dr, z, dz, dfm);
 	  m_layer[N].push_back(layer);
 	}
 	If = i;
@@ -698,16 +677,17 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
   double zmi = +100000;
   double zma = -100000;
   double rma = -100000;
-  for(int i=0; i!=3; ++i) {
-    if(m_layer[i].size()) {
-      if(mzmin[i]<zmi) zmi=mzmin[i]; 
-      if(mzmax[i]>zma) zma=mzmax[i]; 
-      if(mrmax[i]>rma) rma=mrmax[i];
+  for (int i=0; i!=3; ++i) {
+    if (m_layer[i].size()) {
+      if (mzmin[i]<zmi) zmi=mzmin[i]; 
+      if (mzmax[i]>zma) zma=mzmax[i]; 
+      if (mrmax[i]>rma) rma=mrmax[i];
     }
   }
 
-  double hz = fabs(zma); if(hz<fabs(zmi)) hz = fabs(zmi);
-  const Trk::CylinderBounds CB(rma+20.,hz+20.);
+  double hz = fabs(zma);
+  if (hz<fabs(zmi)) hz = fabs(zmi);
+  const Trk::CylinderBounds CB(rma+20., hz+20.);
   m_bounds  = CB;
 }
 
@@ -716,12 +696,13 @@ void InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsProduction()
 ///////////////////////////////////////////////////////////////////
 
 float InDet::SiDetElementsRoadMaker_xk::stepToDetElement
-(const InDetDD::SiDetectorElement*& de,Amg::Vector3D& r,Amg::Vector3D& a) 
+(const InDetDD::SiDetectorElement*& de, Amg::Vector3D& r, Amg::Vector3D& a) const
 {
-  Amg::Vector3D R  = de->center();
-  Amg::Vector3D A  = de->normal();
-  double      D  = a.x()*A.x()+a.y()*A.y()+a.z()*A.z(); if(D==0.) return float(D);
-  return  float((A.x()*(R.x()-r.x())+A.y()*(R.y()-r.y())+A.z()*(R.z()-r.z()))/D);
+  Amg::Vector3D R = de->center();
+  Amg::Vector3D A = de->normal();
+  double D = a.x()*A.x()+a.y()*A.y()+a.z()*A.z();
+  if (D==0.) return static_cast<float>(D);
+  return static_cast<float>((A.x()*(R.x()-r.x())+A.y()*(R.y()-r.y())+A.z()*(R.z()-r.z()))/D);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -729,38 +710,39 @@ float InDet::SiDetElementsRoadMaker_xk::stepToDetElement
 ///////////////////////////////////////////////////////////////////
 
 Trk::CylinderBounds InDet::SiDetElementsRoadMaker_xk::getBound
-(const Trk::TrackParameters& Tp)
+(const Trk::TrackParameters& Tp) const
 {
   const double cor = 1.;
 
   double zfield = 0.;
-  if(m_fieldModeEnum!=Trk::NoField && m_fieldService->solenoidOn()) {
+  if (m_fieldModeEnum!=Trk::NoField && m_fieldServiceHandle->solenoidOn()) {
     const Amg::Vector3D& pos = Tp.position();
-    double f[3], p[3] ={pos[Amg::x],pos[Amg::y],pos[Amg::z]};
-    m_fieldService->getFieldZR(p,f);
-    zfield =  299.7925*f[2];
+    double f[3], p[3] = {pos[Amg::x], pos[Amg::y], pos[Amg::z]};
+    m_fieldServiceHandle->getFieldZR(p, f);
+    zfield = 299.7925*f[2];
   }
 
-  if( fabs(zfield) < .0000001    ) return m_bounds;
+  if (fabs(zfield) < .0000001) return m_bounds;
 
   const AmgVector(5)& Vp = Tp.parameters();
   
-  double cur  = zfield*Vp[4]/sin(Vp[3]);
+  double cur = zfield*Vp[4]/sin(Vp[3]);
 
-  if( fabs(cur)*m_bounds.r() < cor ) return m_bounds;
+  if (fabs(cur)*m_bounds.r() < cor) return m_bounds;
 
-  double rad  = 1./cur;
-  if(cor*fabs(rad) > m_bounds.r()  ) return m_bounds;
+  double rad = 1./cur;
+  if (cor*fabs(rad) > m_bounds.r()  ) return m_bounds;
 
-  const  Amg::Vector3D& Gp = Tp.position()  ;
+  const  Amg::Vector3D& Gp = Tp.position();
 
-  double S,C; sincos(Vp[2],&S,&C);
+  double S, C;
+  sincos(Vp[2], &S, &C);
 
-  double xc   = Gp.x()+S*rad;
-  double yc   = Gp.y()-C*rad;
-  double rm   = (sqrt(xc*xc+yc*yc)+fabs(rad))*cor;
-  if( rm          > m_bounds.r()   ) return m_bounds;
-  Trk::CylinderBounds CB(rm,m_bounds.halflengthZ());
+  double xc = Gp.x()+S*rad;
+  double yc = Gp.y()-C*rad;
+  double rm = (sqrt(xc*xc+yc*yc)+fabs(rad))*cor;
+  if (rm > m_bounds.r()) return m_bounds;
+  Trk::CylinderBounds CB(rm, m_bounds.halflengthZ());
   return CB;
 }
 
-- 
GitLab


From 9671d096be9ee2f995cc3f9f96cc2018394fdcdc Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Wed, 1 May 2019 13:52:36 +0000
Subject: [PATCH 032/129] Cleanup of SiCombinatorialTrackFinder_xk class

---
 .../SiCombinatorialTrackFinder_xk.h           | 132 ++--
 .../src/SiCombinatorialTrackFinder_xk.cxx     | 652 ++++++++----------
 2 files changed, 374 insertions(+), 410 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
index ab09c3e68cfa..76d909541fb2 100755
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -15,26 +17,28 @@
 #ifndef SiCombinatorialTrackFinder_xk_H
 #define SiCombinatorialTrackFinder_xk_H
 
-#include <list>
-#include <vector>
-#include <map>
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "StoreGate/ReadCondHandleKey.h"
-#include "StoreGate/ReadHandleKey.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 #include "InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "SiCombinatorialTrackFinderTool_xk/SiTrajectory_xk.h"
 #include "SiCombinatorialTrackFinderTool_xk/SiTools_xk.h"
 #include "SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h"
 #include "SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLinks_xk.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+#include <list>
+#include <map>
+#include <vector>
 
 class MsgStream          ;
 
-namespace InDet{
+namespace InDet {
 
   //class SiClusterContainer;
 
@@ -64,7 +68,7 @@ namespace InDet{
 
       SiCombinatorialTrackFinder_xk
 	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiCombinatorialTrackFinder_xk();
+      virtual ~SiCombinatorialTrackFinder_xk() = default;
       virtual StatusCode initialize();
       virtual StatusCode finalize  ();
 
@@ -113,62 +117,70 @@ namespace InDet{
       // Protected Data
       ///////////////////////////////////////////////////////////////////
 
-      ToolHandle<IInDetConditionsTool>        m_pixelCondSummaryTool;
-      ToolHandle<IInDetConditionsTool>    m_sctCondSummaryTool{this, "SctSummaryTool",
+      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle{this, "MagFieldSvc",
+          "AtlasFieldSvc"};
+      ToolHandle<IInDetConditionsTool> m_pixelCondSummaryTool{this, "PixelSummaryTool",
+          "PixelConditionsSummaryTool"};
+      ToolHandle<IInDetConditionsTool> m_sctCondSummaryTool{this, "SctSummaryTool",
           "InDetSCT_ConditionsSummaryTool/SCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions summary"};
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle;
-      ToolHandle<Trk::IPatternParametersPropagator> m_proptool   ;
-      ToolHandle<Trk::IPatternParametersUpdator>    m_updatortool;
-      ToolHandle<Trk::IRIO_OnTrackCreator>          m_riocreator ;
-      ToolHandle<Trk::IPRD_AssociationTool>         m_assoTool   ;
-
-      bool                           m_usePIX        ;
-      bool                           m_useSCT        ;
+      PublicToolHandle<Trk::IPatternParametersPropagator> m_proptool{this, "PropagatorTool",
+          "Trk::RungeKuttaPropagator/InDetPropagator"};
+      PublicToolHandle<Trk::IPatternParametersUpdator> m_updatortool{this, "UpdatorTool",
+          "Trk::KalmanUpdator_xk/InDetPatternUpdator"};
+      PublicToolHandle<Trk::IRIO_OnTrackCreator> m_riocreator{this, "RIOonTrackTool",
+          "Trk::RIO_OnTrackCreator/RIO_OnTrackCreator"};
+      PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssosiationTool",
+          "InDet::InDetPRD_AssociationToolGangedPixels"};
+
+      SG::ReadHandleKey<InDet::SiClusterContainer> m_pixcontainerkey{this, "PixelClusterContainer",
+          "PixelClusters"};
+      SG::ReadHandleKey<InDet::SiClusterContainer> m_sctcontainerkey{this, "SCT_ClusterContainer",
+          "SCT_Clusters"};
+      SG::ReadCondHandleKey<InDet::SiDetElementBoundaryLinks_xk> m_boundarySCTKey{this, "SCT_DetElementBoundaryLinks_xk",
+          "SCT_DetElementBoundaryLinks_xk", "Key of InDet::SiDetElementBoundaryLinks_xk for SCT"};
+      // For P->T converter of SCT_Clusters
+      SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey",
+          "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+
+      BooleanProperty m_usePIX{this, "usePixel", true};
+      BooleanProperty m_useSCT{this, "useSCT", true};
+      StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid", "Mode of magnetic field"};
+      StringProperty m_pixm{this, "PixManagerLocation", "Pixel", "PIX manager location"};
+      StringProperty m_sctm{this, "SCTManagerLocation", "SCT", "SCT manager location"};
+      DoubleProperty m_qualityCut{this, "TrackQualityCut", 9.3, "Simple track quality cut"};
+
+      SiTrajectory_xk                m_trajectory    ;  // Track trajector1
+      Trk::TrackInfo                 m_trackinfo     ;
+      InDet::SiTools_xk              m_tools         ;
+      Trk::MagneticFieldProperties   m_fieldprop     ; // Magnetic field properties
+      std::list<Trk::Track*>         m_tracks        ; // List found tracks
+      InDet::SiDetElementBoundaryLinks_xk m_boundaryPIX;
+
       int                            m_outputlevel   ;
       int                            m_nprint        ;  // Kind output information
-      int                            m_inputseeds    ;  // Number input seeds
+      int                            m_inputseeds{0};  // Number input seeds
       int                            m_goodseeds     ;  // Number accepted seeds
-      int                            m_findtracks    ;  // Number found tracks
+      int                            m_findtracks{0};  // Number found tracks
       int                            m_inittracks    ;  // Number initial tracks
       int                            m_roadbug       ;  // Number wrong DE roads
-      int                            m_cosmicTrack   ;  // Is it cosmic track (0 or 1)
-      SiTrajectory_xk                m_trajectory    ;  // Track trajector
-      std::string                    m_fieldmode     ;  // Mode of magnetic field
-//      std::string                    m_pixelname     ;  // Name container with pixels 
-//      std::string                    m_sctname       ;  // Name container with scts
-      std::string                    m_pixm          ;  // PIX manager   location
-      std::string                    m_sctm          ;  // SCT manager   location
       std::string                    m_callbackString;
-      Trk::TrackInfo                 m_trackinfo     ;
 
-      InDet::SiTools_xk              m_tools         ;
       bool                           m_pix           ;
       bool                           m_sct           ;
-      bool                           m_simpleTrack   ;
-      bool                           m_heavyion      ;
+      bool                           m_heavyion{false};
 
-      SG::ReadHandleKey<InDet::SiClusterContainer>  m_pixcontainerkey  ;
-      SG::ReadHandleKey<InDet::SiClusterContainer>  m_sctcontainerkey  ;
-      MagField::IMagFieldSvc*        m_fieldService  ;
-      Trk::MagneticFieldProperties   m_fieldprop     ; // Magnetic field properties
-      double                         m_xi2max        ; // max Xi2 for updators
-      double                         m_xi2maxNoAdd   ; // max Xi2 for clusters
-      double                         m_xi2maxlink    ; // max Xi2 for clusters
-      double                         m_pTmin         ; // min pT
-      double                         m_pTminBrem     ; // min pT for brem noise model
-      double                         m_qualityCut    ; // Simple track quality cut
-      int                            m_nholesmax     ; // Max number holes
-      int                            m_dholesmax     ; // Max holes gap
+      int                            m_cosmicTrack   ;  // Is it cosmic track (0 or 1)
       int                            m_nclusmin      ; // Min number clusters
       int                            m_nclusminb     ; // Min number clusters
       int                            m_nwclusmin     ; // Min number weighted clusters
-      std::list<Trk::Track*>         m_tracks        ; // List found tracks
-      InDet::SiDetElementBoundaryLinks_xk m_boundaryPIX;
-      SG::ReadCondHandleKey<InDet::SiDetElementBoundaryLinks_xk> m_boundarySCTKey{this, "SCT_DetElementBoundaryLinks_xk",
-          "SCT_DetElementBoundaryLinks_xk", "Key of InDet::SiDetElementBoundaryLinks_xk for SCT"};
-      // For P->T converter of SCT_Clusters
-      SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey",
-          "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
+      int                            m_nholesmax     ; // Max number holes
+      int                            m_dholesmax     ; // Max holes gap
+      bool                           m_simpleTrack{false};
+      double                         m_pTmin         ; // min pT
+      double                         m_pTminBrem     ; // min pT for brem noise model
+      double                         m_xi2max        ; // max Xi2 for updators
+      double                         m_xi2maxNoAdd   ; // max Xi2 for clusters
+      double                         m_xi2maxlink    ; // max Xi2 for clusters
 
       ///////////////////////////////////////////////////////////////////
       // Methods 
@@ -188,18 +200,18 @@ namespace InDet{
  
       void magneticFieldInit();
 
-      StatusCode mapDetectorElementsProduction(IOVSVC_CALLBACK_ARGS);
+      StatusCode mapDetectorElementsProduction(IOVSVC_CALLBACK_ARGS) ;
 
       bool spacePointsToClusters
 	(const std::list<const Trk::SpacePoint*>&,
-	 std::list<const InDet::SiCluster*>     &); 
+	 std::list<const InDet::SiCluster*>     &) const; 
 
       void detectorElementLinks
 	(std::list<const InDetDD::SiDetectorElement*>        &,
-	 std::list<const InDet::SiDetElementBoundaryLink_xk*>&);
+	 std::list<const InDet::SiDetElementBoundaryLink_xk*>&) const;
 
-      MsgStream&    dumpconditions(MsgStream&    out) const;
-      MsgStream&    dumpevent     (MsgStream&    out) const;
+      MsgStream& dumpconditions(MsgStream& out) const;
+      MsgStream& dumpevent     (MsgStream& out) const;
 
     };
 
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
index 5547a4f20da6..cb9ba40b2386 100755
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////
@@ -11,78 +11,34 @@
 // Version 1.0 12/04/2007 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <iostream>
-#include <iomanip>
-#include <utility>
-
 #include "SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h"
 
-#include "TrkTrack/TrackInfo.h"
 #include "EventInfo/TagInfo.h"
-#include "TrkToolInterfaces/IUpdator.h"
-#include "TrkToolInterfaces/IPRD_AssociationTool.h"
-#include "TrkMeasurementBase/MeasurementBase.h"
-#include "TrkToolInterfaces/IPatternParametersUpdator.h"
-#include "TrkExInterfaces/IPatternParametersPropagator.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
-#include "TrkGeometry/MagneticFieldProperties.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "StoreGate/ReadCondHandle.h"
 #include "StoreGate/ReadHandle.h"
+#include "TrkExInterfaces/IPatternParametersPropagator.h"
+#include "TrkGeometry/MagneticFieldProperties.h"
+#include "TrkMeasurementBase/MeasurementBase.h"
+#include "TrkToolInterfaces/IPatternParametersUpdator.h"
+#include "TrkToolInterfaces/IPRD_AssociationTool.h"
+#include "TrkToolInterfaces/IUpdator.h"
+#include "TrkTrack/TrackInfo.h"
+
+#include <iomanip>
+#include <iostream>
+#include <utility>
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk
-(const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p)                                           ,
-    m_pixelCondSummaryTool("PixelConditionsSummaryTool",this        ),
-    m_fieldServiceHandle("AtlasFieldSvc",n)                     ,
-    m_proptool   ("Trk::RungeKuttaPropagator/InDetPropagator"  ),
-    m_updatortool("Trk::KalmanUpdator_xk/InDetPatternUpdator"  ),
-    m_riocreator ("Trk::RIO_OnTrackCreator/RIO_OnTrackCreator" ),
-    m_assoTool   ("InDet::InDetPRD_AssociationToolGangedPixels"),
-    m_pixcontainerkey ("PixelClusters"),
-    m_sctcontainerkey ("SCT_Clusters")
+(const std::string& t, const std::string& n, const IInterface* p)
+  : AthAlgTool(t, n, p)
 {
-  m_usePIX      = true               ;
-  m_useSCT      = true               ;
-  m_simpleTrack = false              ;
-  m_heavyion    = false              ;
-  m_sctm        = "SCT"              ;
-  m_pixm        = "Pixel"            ;
-  m_fieldmode   = "MapSolenoid"      ;
-//  m_pixelname   = "PixelClusters"    ;
-//  m_sctname     = "SCT_Clusters"     ;
-  m_inputseeds  = 0                  ;
-  m_findtracks  = 0                  ;
-  m_qualityCut  = 9.3                ;
-  m_fieldService = 0                 ; 
   declareInterface<ISiCombinatorialTrackFinder>(this);
-
-  declareProperty("SCTManagerLocation"   ,m_sctm               );
-  declareProperty("PixManagerLocation"   ,m_pixm               );
-  declareProperty("PropagatorTool"       ,m_proptool           );
-  declareProperty("UpdatorTool"          ,m_updatortool        );
-  declareProperty("RIOonTrackTool"       ,m_riocreator         );
-  declareProperty("MagneticFieldMode"    ,m_fieldmode          );
-  declareProperty("PixelClusterContainer",m_pixcontainerkey    );
-  declareProperty("SCT_ClusterContainer" ,m_sctcontainerkey    ); 
-  declareProperty("AssosiationTool"      ,m_assoTool           );
-  declareProperty("usePixel"             ,m_usePIX             );
-  declareProperty("useSCT"               ,m_useSCT             );
-  declareProperty("PixelSummaryTool"     ,m_pixelCondSummaryTool);
-  declareProperty("TrackQualityCut"      ,m_qualityCut         );
-  declareProperty("MagFieldSvc"         , m_fieldServiceHandle );
-}
-
-///////////////////////////////////////////////////////////////////
-// Destructor  
-///////////////////////////////////////////////////////////////////
-
-InDet::SiCombinatorialTrackFinder_xk::~SiCombinatorialTrackFinder_xk()
-{
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -95,58 +51,52 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
   // Get RungeKutta propagator tool
   //
   if ( m_proptool.retrieve().isFailure() ) {
-    msg(MSG::FATAL) << "Failed to retrieve tool " << m_proptool << endmsg;
+    ATH_MSG_FATAL("Failed to retrieve tool " << m_proptool);
     return StatusCode::FAILURE;
   } else {
-    msg(MSG::INFO) << "Retrieved tool " << m_proptool << endmsg;
+    ATH_MSG_INFO("Retrieved tool " << m_proptool);
   }
 
   // Get updator tool
   //
   if ( m_updatortool.retrieve().isFailure() ) {
-    msg(MSG::FATAL) << "Failed to retrieve tool " << m_updatortool << endmsg;
+    ATH_MSG_FATAL("Failed to retrieve tool " << m_updatortool);
     return StatusCode::FAILURE;
   } else {
-    msg(MSG::INFO) << "Retrieved tool " << m_updatortool << endmsg;
+    ATH_MSG_INFO("Retrieved tool " << m_updatortool);
   }
 
   // Get RIO_OnTrack creator
   //
   if ( m_riocreator.retrieve().isFailure() ) {
-    msg(MSG::FATAL) << "Failed to retrieve tool " << m_riocreator << endmsg;
+    ATH_MSG_FATAL("Failed to retrieve tool " << m_riocreator);
     return StatusCode::FAILURE;
   } else {
-    msg(MSG::INFO) << "Retrieved tool " << m_riocreator << endmsg;
+    ATH_MSG_INFO("Retrieved tool " << m_riocreator);
   }
-  Trk::IRIO_OnTrackCreator* riocreator = &(*m_riocreator);
 
   // Get tool for track-prd association
   //
-  Trk::IPRD_AssociationTool* assoTool = 0;
-  if( !m_assoTool.retrieve().isFailure()) assoTool = &(*m_assoTool);
+  ATH_CHECK(m_assoTool.retrieve());
 
-  IInDetConditionsTool* pixcond = 0; 
-  if(m_usePIX ) {  
+  if (m_usePIX) {  
     if ( m_pixelCondSummaryTool.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_pixelCondSummaryTool << endmsg;
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_pixelCondSummaryTool);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_pixelCondSummaryTool << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_pixelCondSummaryTool);
     }
-    pixcond = &(*m_pixelCondSummaryTool); 
   }
 
   // Get SctConditionsSummaryTool
   //
-  IInDetConditionsTool* sctcond = nullptr;
   if (m_useSCT) {
     if ( m_sctCondSummaryTool.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_sctCondSummaryTool << endmsg;
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_sctCondSummaryTool);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_sctCondSummaryTool << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_sctCondSummaryTool);
     }
-    sctcond = &(*m_sctCondSummaryTool);
   } else {
     m_sctCondSummaryTool.disable();
   }
@@ -156,14 +106,14 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
   std::vector< std::string > tagInfoKeys =  detStore()->keys<TagInfo> ();
   std::string tagInfoKey = "";
 
-  if(tagInfoKeys.size()==0)
-    msg(MSG::WARNING) << " No TagInfo keys in DetectorStore "<< endmsg;
-   else {
-     if(tagInfoKeys.size() > 1) {
-       msg(MSG::WARNING) <<"More than one TagInfo key in the DetectorStore, using the first one "<< endmsg;
-     }
-     tagInfoKey = tagInfoKeys[0];
-   }
+  if (tagInfoKeys.size()==0) {
+    ATH_MSG_WARNING(" No TagInfo keys in DetectorStore ");
+  } else {
+    if (tagInfoKeys.size() > 1) {
+      ATH_MSG_WARNING("More than one TagInfo key in the DetectorStore, using the first one ");
+    }
+    tagInfoKey = tagInfoKeys[0];
+  }
 
   m_callbackString = tagInfoKey;
 
@@ -172,31 +122,29 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
   // register the Callback
   //
   StatusCode sc = detStore()->regFcn(&InDet::SiCombinatorialTrackFinder_xk::mapDetectorElementsProduction,
-				     this,tagInfoH,m_callbackString);
+				     this, tagInfoH, m_callbackString);
 
-  if(sc==StatusCode::SUCCESS) {
-      msg(MSG::INFO) << "Registered callback for geometry " << name() << endmsg;
-   } else {
-      msg(MSG::ERROR) << "Could not book callback for geometry " << name () << endmsg;
-      return StatusCode::FAILURE;
+  if (sc==StatusCode::SUCCESS) {
+    ATH_MSG_INFO("Registered callback for geometry " << name());
+  } else {
+    ATH_MSG_ERROR("Could not book callback for geometry " << name ());
+    return StatusCode::FAILURE;
   }
 
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ) {
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Set SiTools and conditions
   //
-  m_tools.setTools(&(*m_proptool),&(*m_updatortool),riocreator,assoTool,m_fieldService);
-  m_tools.setTools(pixcond,sctcond);
-
+  m_tools.setTools(&*m_proptool, &*m_updatortool, &*m_riocreator, &*m_assoTool, &*m_fieldServiceHandle);
+  m_tools.setTools(&*m_pixelCondSummaryTool, &*m_sctCondSummaryTool);
 
   // Setup callback for magnetic field
   //
-  magneticFieldInit();       
+  magneticFieldInit();
 
   // Set tool to trajectory
   //
@@ -220,7 +168,7 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
 
 StatusCode InDet::SiCombinatorialTrackFinder_xk::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -230,7 +178,7 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::finalize()
 MsgStream&  InDet::SiCombinatorialTrackFinder_xk::dump( MsgStream& out ) const
 {
   out<<std::endl;
-  if(m_nprint)  return dumpevent(out);
+  if (m_nprint)  return dumpevent(out);
   return dumpconditions(out);
 }
 
@@ -241,42 +189,55 @@ MsgStream&  InDet::SiCombinatorialTrackFinder_xk::dump( MsgStream& out ) const
 MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out ) const
 {
   int n = 62-m_proptool.type().size();
-  std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
+  std::string s1;
+  for (int i=0; i<n; ++i) s1.append(" ");
+  s1.append("|");
 
-  std::string fieldmode[9] ={"NoField"       ,"ConstantField","SolenoidalField",
-			     "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
-			     "UndefinedField","AthenaField"  , "?????"         };
+  std::string fieldmode[9] ={"NoField"       , "ConstantField", "SolenoidalField",
+			     "ToroidalField" , "Grid3DField"  , "RealisticField" ,
+			     "UndefinedField", "AthenaField"  , "?????"         };
 
   int mode = m_fieldprop.magneticFieldMode(); 
-  if(mode<0 || mode>8 ) mode = 8; 
+  if (mode<0 || mode>8 ) mode = 8; 
 
   n     = 62-fieldmode[mode].size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3;
+  for (int i=0; i<n; ++i) s3.append(" ");
+  s3.append("|");
 
   n     = 62-m_updatortool.type().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4;
+  for (int i=0; i<n; ++i) s4.append(" ");
+  s4.append("|");
 
   n     = 62-m_riocreator.type().size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
-
+  std::string s5;
+  for (int i=0; i<n; ++i) s5.append(" ");
+  s5.append("|");
 
   n     = 62-m_pixcontainerkey.key().size();
-  std::string s7; for(int i=0; i<n; ++i) s7.append(" "); s7.append("|");
+  std::string s7;
+  for (int i=0; i<n; ++i) s7.append(" ");
+  s7.append("|");
 
   n     = 62-m_sctcontainerkey.key().size();
-  std::string s8; for(int i=0; i<n; ++i) s8.append(" "); s8.append("|");
+  std::string s8;
+  for (int i=0; i<n; ++i) s8.append(" ");
+  s8.append("|");
 
   n     = 62-m_assoTool.type().size();
-  std::string s9; for(int i=0; i<n; ++i) s9.append(" "); s9.append("|");
+  std::string s9;
+  for (int i=0; i<n; ++i) s9.append(" ");
+  s9.append("|");
 
   out<<"|----------------------------------------------------------------------"
      <<"-------------------|"
-       <<std::endl;
-  if(m_usePIX) {
-    out<<"| Pixel clusters location | "<<m_pixcontainerkey.key()      <<s7<<std::endl;
+     <<std::endl;
+  if (m_usePIX) {
+    out<<"| Pixel clusters location | "<<m_pixcontainerkey.key() <<s7<<std::endl;
   }
-  if(m_useSCT) {
-    out<<"| SCT   clusters location | "<<m_sctcontainerkey.key()      <<s8<<std::endl;
+  if (m_useSCT) {
+    out<<"| SCT   clusters location | "<<m_sctcontainerkey.key() <<s8<<std::endl;
   }
   out<<"| Tool for propagation    | "<<m_proptool   .type()<<s1<<std::endl;
   out<<"| Tool for updator        | "<<m_updatortool.type()<<s4<<std::endl;
@@ -285,7 +246,7 @@ MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out
   out<<"| Magnetic field mode     | "<<fieldmode[mode]     <<s3<<std::endl;
   out<<"|----------------------------------------------------------------------"
      <<"-------------------|"
-      <<std::endl;
+     <<std::endl;
   return out;
 }
 
@@ -296,7 +257,7 @@ MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out
 MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpevent( MsgStream& out ) const
 {
   out<<"|---------------------------------------------------------------------|"
-       <<std::endl;
+     <<std::endl;
   out<<"| Min pT of track (MeV)   | "<<std::setw(12)<<std::setprecision(5)<<m_pTmin
      <<"                              |"<<std::endl;
   out<<"| Max Xi2 for cluster     | "<<std::setw(12)<<std::setprecision(5)<<m_xi2max
@@ -345,10 +306,10 @@ std::ostream& InDet::SiCombinatorialTrackFinder_xk::dump( std::ostream& out ) co
 // Overload of << operator MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiCombinatorialTrackFinder_xk& se)
+MsgStream& InDet::operator <<
+(MsgStream& sl,const InDet::SiCombinatorialTrackFinder_xk& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -356,7 +317,7 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiCombinatorialTrackFinder_xk& se)
+(std::ostream& sl,const InDet::SiCombinatorialTrackFinder_xk& se)
 {
   return se.dump(sl); 
 }   
@@ -371,7 +332,6 @@ void InDet::SiCombinatorialTrackFinder_xk::newEvent()
   m_pix = m_usePIX && m_pixcontainerkey.initialize().isSuccess();
   m_sct = m_useSCT && m_sctcontainerkey.initialize().isSuccess();
 
-
   // Erase statistic information
   //
   m_inputseeds = 0;
@@ -382,8 +342,8 @@ void InDet::SiCombinatorialTrackFinder_xk::newEvent()
 
   // Set track info
   //
-  m_trackinfo.setPatternRecognitionInfo( Trk::TrackInfo::SiSPSeededFinder);
-  m_cosmicTrack = 0; 
+  m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinder);
+  m_cosmicTrack = 0;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -391,9 +351,10 @@ void InDet::SiCombinatorialTrackFinder_xk::newEvent()
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiCombinatorialTrackFinder_xk::newEvent
-(Trk::TrackInfo info,const TrackQualityCuts& Cuts)
+(Trk::TrackInfo info, const TrackQualityCuts& Cuts)
 {
-  newEvent(); m_trackinfo = info;
+  newEvent();
+  m_trackinfo = info;
   
   // Get track qulaity cuts information
   //
@@ -402,10 +363,9 @@ void InDet::SiCombinatorialTrackFinder_xk::newEvent
   m_heavyion    = false;
   m_cosmicTrack =     0;
 
-  if     (info.patternRecoInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_Cosmic)) {
+  if (info.patternRecoInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_Cosmic)) {
     m_cosmicTrack = 1;
-  }
-  else if(info.patternRecoInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_HeavyIon)) {
+  } else if (info.patternRecoInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_HeavyIon)) {
     m_heavyion = true;
   }
   m_tools.setHeavyIon(m_heavyion);
@@ -417,11 +377,11 @@ void InDet::SiCombinatorialTrackFinder_xk::newEvent
 
 void InDet::SiCombinatorialTrackFinder_xk::endEvent()
 {
-
   // Print event information 
   //
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -435,37 +395,33 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
  std::list<const InDetDD::SiDetectorElement*>& DE,const TrackQualityCuts& Cuts)
 {
   m_tools.setBremNoise(false,false);
-  m_tracks.erase(m_tracks.begin(),m_tracks.end());
+  m_tracks.erase(m_tracks.begin(), m_tracks.end());
 
   ++m_inputseeds;
-  if(!m_pix && !m_sct) {
+  if (!m_pix && !m_sct) {
     return m_tracks;
   }
 
   // Get track qulaity cuts information
   //
   getTrackQualityCuts(Cuts);
-  std::multimap<const Trk::PrepRawData*,const Trk::Track*> PT;  
-  if(!findTrack(Tp,Sp,Gp,DE,PT)) return m_tracks;
+  std::multimap<const Trk::PrepRawData*,const Trk::Track*> PT;
+  if (!findTrack(Tp,Sp,Gp,DE,PT)) return m_tracks;
  
   m_trajectory.sortStep();
 
-  // Test ordering of the detector elements
-  /*
-  if(!m_trajectory.goodOrder()) {
-    std::cout<<"Wrond ordering detector elements on the trajectory= "<<std::endl;
-    std::cout<< m_trajectory <<std::endl;
-  }
-  */  
-
   // Trk::Track production
   //
-  Trk::Track* t = convertToTrack();  
-  ++m_findtracks; m_tracks.push_back(t);
+  Trk::Track* t = convertToTrack();
+  ++m_findtracks;
+  m_tracks.push_back(t);
 
-  if(!m_tools.multiTrack() || m_simpleTrack || Sp.size()<=2 || m_cosmicTrack || m_trajectory.pTfirst() < m_tools.pTmin()) return m_tracks;
+  if (!m_tools.multiTrack() || m_simpleTrack || Sp.size()<=2 || m_cosmicTrack || m_trajectory.pTfirst() < m_tools.pTmin()) return m_tracks;
 
-  while((t=convertToNextTrack())) {++m_findtracks; m_tracks.push_back(t);} 
+  while ((t=convertToNextTrack())) {
+    ++m_findtracks;
+    m_tracks.push_back(t);
+  }
   return m_tracks;
 }
 
@@ -473,42 +429,39 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
 // Main method for track finding using space points
 ///////////////////////////////////////////////////////////////////
 
-const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
+const std::list<Trk::Track*>& InDet::SiCombinatorialTrackFinder_xk::getTracks
 (const Trk::TrackParameters& Tp,
  const std::list<const Trk::SpacePoint*>& Sp,const std::list<Amg::Vector3D>& Gp,
  std::list<const InDetDD::SiDetectorElement*>& DE,
  std::multimap<const Trk::PrepRawData*,const Trk::Track*>& PT)
 {
-  m_tools.setBremNoise(false,false);
-  m_tracks.erase(m_tracks.begin(),m_tracks.end());
+  m_tools.setBremNoise(false, false);
+  m_tracks.erase(m_tracks.begin(), m_tracks.end());
 
   ++m_inputseeds;
-  if(!m_pix && !m_sct) {
+  if (!m_pix && !m_sct) {
     return m_tracks;
   }
 
-  if(!findTrack(Tp,Sp,Gp,DE,PT)     ) return m_tracks;
-  if(!m_trajectory.isNewTrack(PT)) return m_tracks;
+  if (!findTrack(Tp,Sp,Gp,DE,PT)) return m_tracks;
+  if (!m_trajectory.isNewTrack(PT)) return m_tracks;
 
   m_trajectory.sortStep();
 
-  // Test ordering of the detector elements
-  /*
-  if(!m_trajectory.goodOrder()) {
-    std::cout<<"Wrond ordering detector elements on the trajectory= "<<std::endl;
-    std::cout<< m_trajectory <<std::endl;
-  }
-  */  
-
   // Trk::Track production
   //
-  Trk::Track* t = convertToTrack(); if(!t) return m_tracks;
+  Trk::Track* t = convertToTrack();
+  if (t==nullptr) return m_tracks;
 
-  ++m_findtracks; m_tracks.push_back(t);
+  ++m_findtracks;
+  m_tracks.push_back(t);
 
-  if(!m_tools.multiTrack() || m_simpleTrack || Sp.size()<=2 || m_cosmicTrack || m_trajectory.pTfirst() < m_tools.pTmin()) return m_tracks;
+  if (!m_tools.multiTrack() || m_simpleTrack || Sp.size()<=2 || m_cosmicTrack || m_trajectory.pTfirst() < m_tools.pTmin()) return m_tracks;
 
-  while((t=convertToNextTrack())) {++m_findtracks; m_tracks.push_back(t);} 
+  while ((t=convertToNextTrack())) {
+    ++m_findtracks;
+    m_tracks.push_back(t);
+  } 
   return m_tracks;
 }
 
@@ -519,73 +472,80 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
 
 const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracksWithBrem
 (const Trk::TrackParameters& Tp,
- const std::list<const Trk::SpacePoint*>& Sp,const std::list<Amg::Vector3D>& Gp,
+ const std::list<const Trk::SpacePoint*>& Sp,
+ const std::list<Amg::Vector3D>& Gp,
  std::list<const InDetDD::SiDetectorElement*>& DE,
- std::multimap<const Trk::PrepRawData*,const Trk::Track*>& PT,
+ std::multimap<const Trk::PrepRawData*, const Trk::Track*>& PT,
  bool isCaloCompatible)
 {
   // Old information
   //
-  int mult    = 0; if(m_tools.multiTrack()) mult = 1; 
+  int mult = 0;
+  if (m_tools.multiTrack()) mult = 1;
   double Xi2m = m_tools.xi2multi();
 
-  m_tools.setBremNoise(false,true);
-  m_tracks.erase(m_tracks.begin(),m_tracks.end());
+  m_tools.setBremNoise(false, true);
+  m_tracks.erase(m_tracks.begin(), m_tracks.end());
 
   ++m_inputseeds;
-  if(!m_pix && !m_sct) {
+  if (!m_pix && !m_sct) {
     return m_tracks;
   }
 
-  bool  Q = findTrack(Tp,Sp,Gp,DE,PT); 
-  if(Q) Q = m_trajectory.isNewTrack(PT); 
-  int na  = 0;
-  if(Q) {
+  bool Q = findTrack(Tp,Sp,Gp,DE,PT);
+  if (Q) Q = m_trajectory.isNewTrack(PT);
+  int na = 0;
+  if (Q) {
 
     m_trajectory.sortStep();
 
     // Trk::Track production
     //
-    Trk::TrackInfo oldinfo = m_trackinfo; 
-    if(isCaloCompatible) m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
+    Trk::TrackInfo oldinfo = m_trackinfo;
+    if (isCaloCompatible) m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
 
     m_tools.setMultiTracks(0   ,Xi2m);
-    Trk::Track* t = convertToTrack(); m_trackinfo = oldinfo;
+    Trk::Track* t = convertToTrack();
+    m_trackinfo = oldinfo;
     m_tools.setMultiTracks(mult,Xi2m);
 
-    if(!t) return m_tracks;
-    ++m_findtracks; m_tracks.push_back(t);
-    na = m_trajectory.nclusters(); if(na >=12 && !m_trajectory.nclustersNoAdd()) return m_tracks;  
+    if (!t) return m_tracks;
+    ++m_findtracks;
+    m_tracks.push_back(t);
+    na = m_trajectory.nclusters();
+    if (na >=12 && !m_trajectory.nclustersNoAdd()) return m_tracks;
    
-    if(m_trajectory.pTfirst() <  m_pTminBrem) return m_tracks;
+    if (m_trajectory.pTfirst() <  m_pTminBrem) return m_tracks;
   }
-  if((*Sp.begin())->clusterList().second) return m_tracks;
+  if ((*Sp.begin())->clusterList().second) return m_tracks;
  
   // Repeat track finding using electron noise model
   //
   m_tools.setBremNoise(true,true);
-  if(!findTrack(Tp,Sp,Gp,DE,PT)  ) return m_tracks;
-  if(!m_trajectory.isNewTrack(PT)) return m_tracks;
+  if (!findTrack(Tp, Sp, Gp, DE, PT)) return m_tracks;
+  if (!m_trajectory.isNewTrack(PT)) return m_tracks;
   
   int nb = m_trajectory.nclusters();
-  if(nb <= na ) return m_tracks;
+  if (nb <= na ) return m_tracks;
   
   m_trajectory.sortStep();
 
   // Trk::Track production
   //
-  Trk::TrackInfo oldinfo = m_trackinfo; 
+  Trk::TrackInfo oldinfo = m_trackinfo;
   m_trackinfo.setTrackProperties(Trk::TrackInfo::BremFit          );
-  m_trackinfo.setTrackProperties(Trk::TrackInfo::BremFitSuccessful);       
-  if(isCaloCompatible) m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
+  m_trackinfo.setTrackProperties(Trk::TrackInfo::BremFitSuccessful);
+  if (isCaloCompatible) m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
 
   m_tools.setMultiTracks(0   ,Xi2m);
-  Trk::Track* t = convertToTrack();  m_trackinfo = oldinfo; 
+  Trk::Track* t = convertToTrack();
+  m_trackinfo = oldinfo;
   m_tools.setMultiTracks(mult,Xi2m);
 
-  if(!t) return m_tracks;
+  if (t==nullptr) return m_tracks;
 
-  ++m_findtracks; m_tracks.push_back(t);
+  ++m_findtracks;
+  m_tracks.push_back(t);
   return m_tracks;
 }
 
@@ -601,28 +561,26 @@ bool InDet::SiCombinatorialTrackFinder_xk::findTrack
 {
   // List detector element links preparation
   //
-  std::list<const InDet::SiDetElementBoundaryLink_xk*> DEL; 
-  detectorElementLinks(DE,DEL);
+  std::list<const InDet::SiDetElementBoundaryLink_xk*> DEL;
+  detectorElementLinks(DE, DEL);
 
   SG::ReadHandle<InDet::SiClusterContainer> pixcontainer(m_pixcontainerkey);
   SG::ReadHandle<InDet::SiClusterContainer> sctcontainer(m_sctcontainerkey);
 
   // List cluster preparation
   //
-  std::list<const InDet::SiCluster*> Cl; 
-  bool TWO     = false;
+  std::list<const InDet::SiCluster*> Cl;
+  bool TWO = false;
 
-  if     (Sp.size() > 1) {
-    if(!spacePointsToClusters(Sp,Cl)) {
+  if (Sp.size() > 1) {
+    if (!spacePointsToClusters(Sp,Cl)) {
       return false;
     }
-    if(Sp.size()<=2) TWO = true;
-  }
-  else if(Gp.size() > 2) {
-    if(!m_trajectory.globalPositionsToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Gp,DEL,PT,Cl)) return false;
-  }
-  else                   {
-    if(!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
+    if (Sp.size()<=2) TWO = true;
+  } else if (Gp.size() > 2) {
+    if (!m_trajectory.globalPositionsToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Gp,DEL,PT,Cl)) return false;
+  } else {
+    if (!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
   }
   ++m_goodseeds;
 
@@ -631,57 +589,56 @@ bool InDet::SiCombinatorialTrackFinder_xk::findTrack
   bool Qr;
   bool Q = m_trajectory.initialize(m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr);
 
-  if(!Q && Sp.size() < 2 && Gp.size() > 3) {
+  if (!Q && Sp.size() < 2 && Gp.size() > 3) {
 
     Cl.clear();
-    if(!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
-    if(!m_trajectory.initialize   (m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr)) return false;
-    Q=Qr=true;
+    if (!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
+    if (!m_trajectory.initialize   (m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr)) return false;
+    Q = Qr = true;
   }
 
-  if(!Qr) ++m_roadbug;
-  if(!Q) return false;
+  if (!Qr) ++m_roadbug;
+  if (!Q) return false;
   ++m_inittracks;
   bool pixseed = m_trajectory.isLastPixel();
-  int itmax    = 30; if(m_simpleTrack) itmax = 10; if(m_heavyion) itmax = 50;
+  int itmax    = 30;
+  if (m_simpleTrack) itmax = 10;
+  if (m_heavyion) itmax = 50;
 
   // Track finding
   //
-  if(pixseed) {      // Strategy for pixel seeds
-    
-    if(!m_trajectory.forwardExtension (false,itmax)) return false;
-    if(!m_trajectory.backwardSmoother (false)      ) return false;
-    if(!m_trajectory.backwardExtension(itmax)      ) return false;
-
-    if(m_trajectory.difference() > 0) {
-      if(!m_trajectory.forwardFilter()          ) return false;
-      if(!m_trajectory.backwardSmoother (false) ) return false;
+  if (pixseed) {      // Strategy for pixel seeds
+    if (!m_trajectory.forwardExtension (false,itmax)) return false;
+    if (!m_trajectory.backwardSmoother (false)      ) return false;
+    if (!m_trajectory.backwardExtension(itmax)      ) return false;
+
+    if (m_trajectory.difference() > 0) {
+      if (!m_trajectory.forwardFilter()          ) return false;
+      if (!m_trajectory.backwardSmoother (false) ) return false;
     } 
     int na = m_trajectory.nclustersNoAdd();
-    if(m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
-  }
-  else        {      // Strategy for mixed seeds
-
-    if(!m_trajectory.backwardSmoother(TWO)       ) return false;
-    if(!m_trajectory.backwardExtension(itmax)    ) return false;
-    if(!m_trajectory.forwardExtension(true,itmax)) return false;
+    if (m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
+  } else {      // Strategy for mixed seeds
+    if (!m_trajectory.backwardSmoother(TWO)       ) return false;
+    if (!m_trajectory.backwardExtension(itmax)    ) return false;
+    if (!m_trajectory.forwardExtension(true,itmax)) return false;
 
     int na = m_trajectory.nclustersNoAdd();
-    if(m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
-    if(!m_trajectory.backwardSmoother(false)    ) return false;
+    if (m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
+    if (!m_trajectory.backwardSmoother(false)    ) return false;
 
     na     = m_trajectory.nclustersNoAdd();
-    if(m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
+    if (m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
 
-    if(m_trajectory.difference() > 0) {
-      if(!m_trajectory.forwardFilter()         ) return false;
-      if(!m_trajectory.backwardSmoother (false)) return false;
+    if (m_trajectory.difference() > 0) {
+      if (!m_trajectory.forwardFilter()         ) return false;
+      if (!m_trajectory.backwardSmoother (false)) return false;
     }
   } 
 
-  if(m_trajectory.qualityOptimization()     <           (m_qualityCut*m_nclusmin)    ) return false;
-  if(m_trajectory.pTfirst  () < m_pTmin     && m_trajectory.nclusters() < m_nclusmin ) return false;
-  if(m_trajectory.nclusters() < m_nclusminb || m_trajectory.ndf      () < m_nwclusmin) return false;
+  if (m_trajectory.qualityOptimization()     <           (m_qualityCut*m_nclusmin)    ) return false;
+  if (m_trajectory.pTfirst  () < m_pTmin     && m_trajectory.nclusters() < m_nclusmin ) return false;
+  if (m_trajectory.nclusters() < m_nclusminb || m_trajectory.ndf      () < m_nwclusmin) return false;
   
   return true;
 }
@@ -691,27 +648,18 @@ bool InDet::SiCombinatorialTrackFinder_xk::findTrack
 ///////////////////////////////////////////////////////////////////
 
 Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToTrack()
- {
-  if(!m_simpleTrack) {
-
-    return new Trk::Track
-      (
-       m_trackinfo,
-       m_trajectory.convertToTrackStateOnSurface(m_cosmicTrack),
-       m_trajectory.convertToFitQuality()
-       );
-  }
-  else              {
-    
-    Trk::TrackInfo info = m_trackinfo; 
-    info.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinderSimple);
-    return new Trk::Track
-      (
-       info,
-       m_trajectory.convertToSimpleTrackStateOnSurface(m_cosmicTrack),
-       m_trajectory.convertToFitQuality()
-       );
+{
+  if (!m_simpleTrack) {
+    return new Trk::Track(m_trackinfo,
+                          m_trajectory.convertToTrackStateOnSurface(m_cosmicTrack),
+                          m_trajectory.convertToFitQuality());
   }
+
+  Trk::TrackInfo info = m_trackinfo;
+  info.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinderSimple);
+  return new Trk::Track(info,
+                        m_trajectory.convertToSimpleTrackStateOnSurface(m_cosmicTrack),
+                        m_trajectory.convertToFitQuality());
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -719,12 +667,13 @@ Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToTrack()
 ///////////////////////////////////////////////////////////////////
 
 Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToNextTrack()
-  {
-    DataVector<const Trk::TrackStateOnSurface>* tsos = m_trajectory.convertToNextTrackStateOnSurface();
-    if(!tsos) return 0;
-    return new Trk::Track
-      (m_trackinfo,tsos,m_trajectory.convertToFitQuality());
-  }
+{
+  DataVector<const Trk::TrackStateOnSurface>* tsos = m_trajectory.convertToNextTrackStateOnSurface();
+  if (tsos==nullptr) return nullptr;
+  return new Trk::Track(m_trackinfo,
+                        tsos,
+                        m_trajectory.convertToFitQuality());
+}
 
 ///////////////////////////////////////////////////////////////////
 // Callback function - get the magnetic field /
@@ -734,11 +683,9 @@ void InDet::SiCombinatorialTrackFinder_xk::magneticFieldInit()
 {
   // Build MagneticFieldProperties 
   //
-  Trk::MagneticFieldProperties* pMF = 0;
-  if     (m_fieldmode == "NoField"    ) pMF = new Trk::MagneticFieldProperties(Trk::NoField  );
-  else if(m_fieldmode == "MapSolenoid") pMF = new Trk::MagneticFieldProperties(Trk::FastField);
-  else                                  pMF = new Trk::MagneticFieldProperties(Trk::FullField);
-  m_fieldprop = *pMF; delete pMF;
+  if      (m_fieldmode == "NoField"    ) m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField  );
+  else if (m_fieldmode == "MapSolenoid") m_fieldprop = Trk::MagneticFieldProperties(Trk::FastField);
+  else                                   m_fieldprop = Trk::MagneticFieldProperties(Trk::FullField);
   m_tools.setTools(m_fieldprop);
 }
 
@@ -747,19 +694,19 @@ void InDet::SiCombinatorialTrackFinder_xk::magneticFieldInit()
 ///////////////////////////////////////////////////////////////////
 
 StatusCode InDet::SiCombinatorialTrackFinder_xk::mapDetectorElementsProduction 
-(IOVSVC_CALLBACK_ARGS_P(I,keys))
+(IOVSVC_CALLBACK_ARGS_P(I, keys))
 {
   (void) I;
 
-  StatusCode sc; 
+  StatusCode sc;
 
   // Get  Pixel Detector Manager
   //
   const InDetDD::PixelDetectorManager* pixmgr = 0;
-  if(m_usePIX) {
+  if (m_usePIX) {
     sc = detStore()->retrieve(pixmgr,m_pixm);
     if (sc.isFailure() || !pixmgr) {
-      msg(MSG::FATAL)<<"Could not get PixelDetectorManager  !"<<endmsg; 
+      ATH_MSG_FATAL("Could not get PixelDetectorManager  !");
       return StatusCode::FAILURE;
     }
   }
@@ -768,29 +715,31 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::mapDetectorElementsProduction
   //
   bool needsUpdate = false;
 
-  for (std::list<std::string>::const_iterator k=keys.begin(); k!=keys.end(); ++k) {
-    if ((*k) == m_callbackString) {needsUpdate = true; break;}
+  for (const std::string k: keys) {
+    if (k == m_callbackString) {
+      needsUpdate = true;
+      break;
+    }
   } 
-  if(!needsUpdate) return StatusCode::SUCCESS;
+  if (!needsUpdate) return StatusCode::SUCCESS;
 
-  m_boundaryPIX.erase(m_boundaryPIX.begin(),m_boundaryPIX.end()); 
+  m_boundaryPIX.erase(m_boundaryPIX.begin(), m_boundaryPIX.end());
   
-  const PixelID* IDp = 0; 
+  const PixelID* IDp = nullptr;
 
   if (m_usePIX && detStore()->retrieve(IDp, "PixelID").isFailure()) {
-    msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg;
+    ATH_MSG_FATAL("Could not get Pixel ID helper");
     return StatusCode::FAILURE;
   }
   
-  if(!IDp) return StatusCode::FAILURE;
+  if (!IDp) return StatusCode::FAILURE;
 
   InDetDD::SiDetectorElementCollection::const_iterator s,se;
 
   unsigned int npix = 0, minpixid = 1000000, maxpixid = 0;
 
-  if(IDp) {
-
-    std::map<IdentifierHash,const InDetDD::SiDetectorElement*> idd;
+  if (IDp) {
+    std::map<IdentifierHash, const InDetDD::SiDetectorElement*> idd;
 
     // Loop over each wafer of pixels
     //
@@ -801,17 +750,15 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::mapDetectorElementsProduction
      
       IdentifierHash id = (*s)->identifyHash();
       ++npix;
-      if(id > maxpixid) maxpixid = id;
-      if(id < minpixid) minpixid = id;
+      if (id > maxpixid) maxpixid = id;
+      if (id < minpixid) minpixid = id;
       idd.insert(std::make_pair(id,(*s)));
     }
-    if(idd.size()!= maxpixid+1 || minpixid!=0) return StatusCode::FAILURE;
+    if (idd.size()!= maxpixid+1 || minpixid!=0) return StatusCode::FAILURE;
     
     m_boundaryPIX.reserve(idd.size());
-    std::map<IdentifierHash,const InDetDD::SiDetectorElement*>::iterator i;
-
-    for(i = idd.begin(); i!=idd.end(); ++i) {
-
+    std::map<IdentifierHash, const InDetDD::SiDetectorElement*>::iterator i;
+    for (i = idd.begin(); i!=idd.end(); ++i) {
       InDet::SiDetElementBoundaryLink_xk dl((*i).second);
       m_boundaryPIX.push_back(dl);
     }
@@ -825,35 +772,31 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::mapDetectorElementsProduction
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::SiCombinatorialTrackFinder_xk::spacePointsToClusters
-(const std::list<const Trk::SpacePoint*>& Sp,std::list<const InDet::SiCluster*>& Sc)
+(const std::list<const Trk::SpacePoint*>& Sp, std::list<const InDet::SiCluster*>& Sc) const
 {
-  std::list<const Trk::SpacePoint*>::const_iterator s=Sp.begin(),se=Sp.end();
-
-  for(; s!=se; ++s) {
-
-     const Trk::PrepRawData* p = (*s)->clusterList().first ; 
-     
-     if(p) {
-       const InDet::SiCluster* c = static_cast<const InDet::SiCluster*>(p);
-       if(c) Sc.push_back(c);
-     }
-     p = (*s)->clusterList().second; 
-     if(p) {
-       const InDet::SiCluster* c = static_cast<const InDet::SiCluster*>(p);
-       if(c) Sc.push_back(c);
-     }
+  for (const Trk::SpacePoint* s: Sp) {
+    const Trk::PrepRawData* p = s->clusterList().first;
+    if (p) {
+      const InDet::SiCluster* c = static_cast<const InDet::SiCluster*>(p);
+      if (c) Sc.push_back(c);
+    }
+    p = s->clusterList().second;
+    if (p) {
+      const InDet::SiCluster* c = static_cast<const InDet::SiCluster*>(p);
+      if (c) Sc.push_back(c);
+    }
   }
 
   //  Detector elments test
   //
-  std::list<const InDet::SiCluster*>::iterator c = Sc.begin(),cn,ce = Sc.end();
+  std::list<const InDet::SiCluster*>::iterator c = Sc.begin(), cn, ce = Sc.end();
   
-  for(; c!=ce; ++c) {
+  for (; c!=ce; ++c) {
 
-    const InDetDD::SiDetectorElement* de = (*c)->detectorElement(); 
+    const InDetDD::SiDetectorElement* de = (*c)->detectorElement();
 
-    for(++(cn=c); cn!=ce; ++cn) {
-      if(de == (*cn)->detectorElement()) return false;
+    for (++(cn=c); cn!=ce; ++cn) {
+      if (de == (*cn)->detectorElement()) return false;
     }
 
   }
@@ -866,7 +809,7 @@ bool InDet::SiCombinatorialTrackFinder_xk::spacePointsToClusters
 
 void InDet::SiCombinatorialTrackFinder_xk::detectorElementLinks
 (std::list<const InDetDD::SiDetectorElement*>        & DE,
- std::list<const InDet::SiDetElementBoundaryLink_xk*>& DEL)
+ std::list<const InDet::SiDetElementBoundaryLink_xk*>& DEL) const
 {
   SG::ReadCondHandle<InDet::SiDetElementBoundaryLinks_xk> boundarySCTHandle(m_boundarySCTKey);
   const InDet::SiDetElementBoundaryLinks_xk* boundarySCT{*boundarySCTHandle};
@@ -874,13 +817,10 @@ void InDet::SiCombinatorialTrackFinder_xk::detectorElementLinks
     ATH_MSG_FATAL(m_boundarySCTKey.fullKey() << " returns null pointer");
   }
 
-  std::list<const InDetDD::SiDetectorElement*>::iterator d = DE.begin(),de = DE.end();
- 
-  for(; d!=de; ++d) {
- 
-    IdentifierHash id = (*d)->identifyHash();
-    if     ((*d)->isPixel() && id < m_boundaryPIX.size()) DEL.push_back(&m_boundaryPIX[id]);
-    else if((*d)->isSCT()   && boundarySCT && id < boundarySCT->size()) DEL.push_back(&(*boundarySCT)[id]);
+  for (const InDetDD::SiDetectorElement* d: DE) {
+    IdentifierHash id = d->identifyHash();
+    if (d->isPixel() && id < m_boundaryPIX.size()) DEL.push_back(&m_boundaryPIX[id]);
+    else if (d->isSCT() && boundarySCT && id < boundarySCT->size()) DEL.push_back(&(*boundarySCT)[id]);
   }
 }
 
@@ -893,43 +833,55 @@ void  InDet::SiCombinatorialTrackFinder_xk::getTrackQualityCuts
 {
   // Integer cuts
   //
-  int useasso,simpletrack,multitrack;
-  double xi2m;
-  if(!Cuts.getIntCut   ("MinNumberOfClusters" ,m_nclusmin   )) {m_nclusmin      =    7;}
-  if(!Cuts.getIntCut   ("MinNumberOfWClusters",m_nwclusmin  )) {m_nwclusmin     =    7;}
-  if(!Cuts.getIntCut   ("MaxNumberOfHoles"    ,m_nholesmax  )) {m_nholesmax     =    2;}
-  if(!Cuts.getIntCut   ("MaxHolesGae"         ,m_dholesmax  )) {m_dholesmax     =    2;}
-  if(!Cuts.getIntCut   ("UseAssociationTool"  ,useasso      )) {useasso         =    0;} 
-  if(!Cuts.getIntCut   ("CosmicTrack"         ,m_cosmicTrack)) {m_cosmicTrack   =    0;}
-  if(!Cuts.getIntCut   ("SimpleTrack"         ,simpletrack  )) {simpletrack     =    0;} 
-  if(!Cuts.getIntCut   ("doMultiTracksProd"   ,multitrack   )) {multitrack      =    0;}  
+  if (!Cuts.getIntCut   ("CosmicTrack"         ,m_cosmicTrack)) m_cosmicTrack   =    0;
+
+  if (!Cuts.getIntCut   ("MinNumberOfClusters" ,m_nclusmin   )) m_nclusmin      =    7;
+  m_nclusminb = m_nclusmin-1;
+  if (m_nclusminb < 3) m_nclusminb = 3;
+
+  if (!Cuts.getIntCut   ("MinNumberOfWClusters",m_nwclusmin  )) m_nwclusmin     =    7;
+
+  if (!Cuts.getIntCut   ("MaxNumberOfHoles"    ,m_nholesmax  )) m_nholesmax     =    2;
+  if (!Cuts.getIntCut   ("MaxHolesGae"         ,m_dholesmax  )) m_dholesmax     =    2;
+  if (!m_cosmicTrack) {
+    if (m_nholesmax > 2) m_nholesmax = 2;
+    if (m_dholesmax > 2) m_dholesmax = 2;
+  }
+  if (m_dholesmax > m_nholesmax) m_dholesmax = m_nholesmax;
+
+  int useasso;
+  if (!Cuts.getIntCut   ("UseAssociationTool"  ,useasso      )) useasso         =    0;
+
+  int simpletrack;
+  if (!Cuts.getIntCut   ("SimpleTrack"         ,simpletrack  )) simpletrack     =    0;
+  simpletrack ? m_simpleTrack = true : m_simpleTrack = false;
+
+  int multitrack;
+  if (!Cuts.getIntCut   ("doMultiTracksProd"   ,multitrack   )) multitrack      =    0;
  
   // Double cuts
   //
-  if(!Cuts.getDoubleCut("pTmin"              ,m_pTmin      )) {m_pTmin         = 500.;}
-  if(!Cuts.getDoubleCut("pTminBrem"          ,m_pTminBrem  )) {m_pTminBrem     =1000.;}
-  if(!Cuts.getDoubleCut("MaxXi2forCluster"   ,m_xi2max     )) {m_xi2max        =   9.;}
-  if(!Cuts.getDoubleCut("MaxXi2forOutlier"   ,m_xi2maxNoAdd)) {m_xi2maxNoAdd   =  25.;}
-  if(!Cuts.getDoubleCut("MaxXi2forSearch"    ,m_xi2maxlink )) {m_xi2maxlink    = 100.;}
-  if(!Cuts.getDoubleCut("MaxXi2MultiTracks"  ,xi2m         )) {xi2m            =   7.;}
+  if (!Cuts.getDoubleCut("pTmin"              ,m_pTmin      )) m_pTmin         = 500.;
+  if (!Cuts.getDoubleCut("pTminBrem"          ,m_pTminBrem  )) m_pTminBrem     =1000.;
 
-  simpletrack ? m_simpleTrack = true :  m_simpleTrack = false;
+  if (!Cuts.getDoubleCut("MaxXi2forCluster"   ,m_xi2max     )) m_xi2max        =   9.;
+  if (!Cuts.getDoubleCut("MaxXi2forOutlier"   ,m_xi2maxNoAdd)) m_xi2maxNoAdd   =  25.;
+  if (!m_cosmicTrack) {
+    if (m_xi2maxNoAdd > 25.) m_xi2maxNoAdd = 25.;
+  }
+  if (m_xi2maxNoAdd <= m_xi2max) m_xi2maxNoAdd = m_xi2max+5.;
 
-  if(!m_cosmicTrack) {
+  if (!Cuts.getDoubleCut("MaxXi2forSearch"    ,m_xi2maxlink )) m_xi2maxlink    = 100.;
 
-    if(   xi2m       > 7. ) xi2m          = 7.         ;
-    if(m_nholesmax   > 2  ) m_nholesmax   = 2          ; 
-    if(m_dholesmax   > 2  ) m_dholesmax   = 2          ;
-    if(m_xi2maxNoAdd > 25.) m_xi2maxNoAdd = 25.        ;
+  double xi2m;
+  if (!Cuts.getDoubleCut("MaxXi2MultiTracks"  ,xi2m         )) xi2m            =   7.;
+  if (!m_cosmicTrack) {
+    if (xi2m > 7.) xi2m = 7.;
   }
 
-  if(m_xi2maxNoAdd  <= m_xi2max   ) m_xi2maxNoAdd = m_xi2max+5.;
-  if(m_dholesmax    >  m_nholesmax) m_dholesmax   = m_nholesmax;
-  m_nclusminb = m_nclusmin-1; if(m_nclusminb < 3 ) m_nclusminb = 3;
-
-  m_tools.setXi2pTmin     (m_xi2max,m_xi2maxNoAdd,m_xi2maxlink,m_pTmin);
-  m_tools.setHolesClusters(m_nholesmax,m_dholesmax,m_nclusmin);
-  m_tools.setAssociation  (useasso);
-  m_tools.setMultiTracks  (multitrack,xi2m);
+  m_tools.setXi2pTmin(m_xi2max, m_xi2maxNoAdd, m_xi2maxlink, m_pTmin);
+  m_tools.setHolesClusters(m_nholesmax, m_dholesmax, m_nclusmin);
+  m_tools.setAssociation(useasso);
+  m_tools.setMultiTracks(multitrack, xi2m);
   m_trajectory.setParameters();
 }
-- 
GitLab


From 530dcab800d9c258921ef8c5c97595c9de830d42 Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Wed, 1 May 2019 14:04:15 +0000
Subject: [PATCH 033/129] CaloDetDescr: Preparing to make CaloDD immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
Change CaloDepthTool to retrieve CaloDD lazily, using CachedPointer.
---
 .../CaloDetDescr/CaloDetDescr/CaloDepthTool.h |  20 +--
 .../CaloDetDescr/CaloDetDescrManager.h        |   8 +-
 .../CaloDetDescr/src/CaloDepthTool.cxx        | 143 +++++++-----------
 .../CaloDetDescr/src/CaloDetDescrManager.cxx  |   6 +-
 .../TrigUpgradeTest/share/full_menu_build.ref |   6 +-
 .../TrigUpgradeTest/share/runMenuTest.ref     |   6 +-
 6 files changed, 74 insertions(+), 115 deletions(-)

diff --git a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h
index fd3c4cd115e3..d7aa087afdad 100755
--- a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h
+++ b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDepthTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -17,6 +17,7 @@
 
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "CaloGeoHelpers/CaloPhiRange.h"
+#include "CxxUtils/CachedPointer.h"
 
 class CaloDetDescrManager;
 class IMessageSvc;
@@ -52,7 +53,7 @@ public:
 		  const IInterface* parent); 
   /** @brief Destructor
    */
-  ~CaloDepthTool();
+  virtual ~CaloDepthTool();
 
   /** @brief Query interface
    */
@@ -60,11 +61,11 @@ public:
 
   /** @brief Tool Initialize
    */
-  StatusCode initialize();
+  virtual StatusCode initialize() override;
 
   /** @brief Tool Finalize
    */
-  StatusCode finalize();
+  virtual StatusCode finalize() override;
 
 public:
 
@@ -225,6 +226,7 @@ public:
    CaloDepthTool& operator= (const CaloDepthTool&); //> not implemented
 
 private:
+   const CaloDetDescrManager* caloMgr() const;
 
   std::string m_depth_choice;
 
@@ -234,21 +236,13 @@ private:
 
   /** DD manager
    */
-  const CaloDetDescrManager* m_calo_dd;
+  CxxUtils::CachedPointer<CaloDetDescrManager> m_calo_dd;
 
   /** Phi range helper object
    */
   CaloPhiRange m_range;
 
   double m_default;
-
-  /** Tool Service
-   */
-  IToolSvc* m_toolsvc;
-
-  /** Mesaage Service
-   */
-  IMessageSvc*  m_msgSvc;
 };
 
  
diff --git a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h
index cb360f2f43cc..38b297414d12 100755
--- a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h
+++ b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h
@@ -1,6 +1,6 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -295,14 +295,16 @@ class CaloDetDescrManager_Base
   
   /** @brief translate between the 2 ways to label a sub-detector: 
    */
+  static
   void build_sample (CaloCell_ID::SUBCALO subCalo, bool barrel,
 		     int sampling_or_module,
-		     CaloCell_ID::CaloSample& sample) const;
+		     CaloCell_ID::CaloSample& sample);
   /** @brief translate between the 2 ways to label a sub-detector: 
    */
+  static
   void decode_sample (CaloCell_ID::SUBCALO& subCalo, bool& barrel,
 		      int& sampling_or_module,
-		      CaloCell_ID::CaloSample sample) const;   
+		      CaloCell_ID::CaloSample sample);   
 
 
   // Iterator over detector descriptors.
diff --git a/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx b/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx
index dccd525ea196..87a36b3c1c62 100755
--- a/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx
+++ b/Calorimeter/CaloDetDescr/src/CaloDepthTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // ***************************************************************************
@@ -10,13 +10,9 @@
 
 #include "CaloDetDescr/CaloDepthTool.h"
 
-#include "GaudiKernel/Bootstrap.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/Property.h"
-#include "GaudiKernel/IService.h"
 #include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "StoreGate/StoreGateSvc.h"
 #include <vector>
 
@@ -43,7 +39,9 @@ CaloDepthTool::CaloDepthTool(const std::string& type,
 			     const std::string& name, 
 			     const IInterface* parent) :
   AthAlgTool(type, name, parent),
-  m_depth_choice("")
+  m_depth_choice(""),
+  m_calo_id(nullptr),
+  m_default(0)
 {
   declareInterface<CaloDepthTool>( this );
   declareProperty("DepthChoice", m_depth_choice,"choice of depth paramaterisation" );
@@ -55,68 +53,58 @@ CaloDepthTool::~CaloDepthTool()
 StatusCode
 CaloDepthTool::initialize()
 {
-  StatusCode sc = StatusCode::SUCCESS;
-
-
   // FIXME : in the old egammaqdepth class, the default was -999., but the
   //         CaloDetDescr convention is to return 0 
   m_default = 0.;
 
-  ISvcLocator* svcLoc = Gaudi::svcLocator( );
-  StatusCode status   = svcLoc->service( "MessageSvc", m_msgSvc );
-  
-  if ( status.isSuccess( ) ) {
-    MsgStream log(m_msgSvc, name() );
-    
-    log << MSG::DEBUG << " getting started " << endmsg;
+  ATH_MSG_DEBUG( " getting started " );
 
-    // Get the Calo geometry
-    status = detStore()->retrieve(m_calo_dd);
-    if(status.isFailure()) return status;
-    m_calo_id = m_calo_dd->getCaloCell_ID();
+  ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") );
     
-    // Get The ToolSvc
-    StatusCode s=service("ToolSvc",m_toolsvc);
-    if(s.isFailure())
-      {
-	log<<MSG::FATAL<<"Could not find ToolSvc. Exiting."<<endmsg;
-	return s;
-      }
-
-    if (m_depth_choice=="") {
-    log << MSG::INFO << " CaloDepthTool " << this->name() 
-	<< " successfully initialised, will provide entrance (default)" 
-	<< m_depth_choice << endmsg;
-    }
-    else{
-    log << MSG::INFO << " CaloDepthTool " << this->name() 
-	<< " successfully initialised, will provide " 
-	<< m_depth_choice << endmsg;
-    }
-    
-
+  if (m_depth_choice=="") {
+    ATH_MSG_INFO (" CaloDepthTool " << this->name() 
+                  << " successfully initialised, will provide entrance (default)" 
+                  << m_depth_choice );
   }
-
-  return sc;
+  else{
+    ATH_MSG_INFO(" CaloDepthTool " << this->name() 
+                 << " successfully initialised, will provide " 
+                 << m_depth_choice );
+  }
+  return StatusCode::SUCCESS;
 }
 
+
 StatusCode
 CaloDepthTool::finalize()
 {
-    StatusCode sc = StatusCode::SUCCESS;
-    return sc;
+    return StatusCode::SUCCESS;
 }
 
+
+const CaloDetDescrManager*
+CaloDepthTool::caloMgr() const
+{
+  const CaloDetDescrManager* caloMgr = m_calo_dd.get();
+  if (!caloMgr) {
+    if (detStore()->retrieve (caloMgr, "CaloMgr").isFailure()) {
+      ATH_MSG_ERROR ("Can't retrieve CaloDetDescrManager");
+      std::abort();
+    }
+    m_calo_dd.set (caloMgr);
+  }
+  return caloMgr;
+}
+
+
 // the generic methods to be used by clients :
 
 double 
 CaloDepthTool::radius(const CaloCell_ID::SUBCALO subcalo,const  int sampling_or_module,  const bool barrel,
 		      const double eta, const double phi ) const
 {
-  if (!m_calo_dd) return m_default;
-
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return radius(sample, eta, phi);
 }
 
@@ -178,9 +166,8 @@ double
 CaloDepthTool::deta (const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module,const bool barrel, 
 			const double eta ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return deta(sample, eta);
 }
 
@@ -188,10 +175,9 @@ double
 CaloDepthTool::deta (const CaloCell_ID::CaloSample sample,
                      const double eta ) const
 {
-  if (!m_calo_dd) return m_default;
   // FIXME : m_calo_dd->is_in not implemented for Tiles => will return 99999.
   double deta = 99999.;
-  /*bool result =*/ m_calo_dd->is_in(eta, 0., sample,deta);
+  /*bool result =*/ caloMgr()->is_in(eta, 0., sample,deta);
   return deta;
 }
 
@@ -203,9 +189,8 @@ double
 CaloDepthTool::egparametrized(const CaloCell_ID::SUBCALO subcalo,const  int sampling_or_module,  const bool barrel,
 		      const double eta, const double phi ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return egparametrized(sample, eta, phi);
 }
 
@@ -400,9 +385,8 @@ double
 CaloDepthTool::TBparametrized(const CaloCell_ID::SUBCALO subcalo,const  int sampling_or_module,  const bool barrel,
 		      const double eta, const double phi ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return TBparametrized(sample, eta, phi);
 }
 
@@ -442,9 +426,8 @@ double
 CaloDepthTool::entrance(const CaloCell_ID::SUBCALO subcalo,const int sampling_or_module, const bool barrel, 
 			  const double eta, const double phi ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return entrance(sample, eta, phi);
 }
 
@@ -472,9 +455,8 @@ double
 CaloDepthTool::middle(const CaloCell_ID::SUBCALO subcalo,const int sampling_or_module, const bool barrel, 
 			  const double eta, const double phi ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return middle(sample, eta, phi);
 }
 
@@ -500,9 +482,8 @@ double
 CaloDepthTool::exit(const CaloCell_ID::SUBCALO subcalo,const int sampling_or_module, const bool barrel, 
 			  const double eta, const double phi ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return exit(sample, eta, phi);
 }
 
@@ -528,9 +509,8 @@ double
 CaloDepthTool::flat(const CaloCell_ID::SUBCALO subcalo,const int sampling_or_module, const bool barrel,
 		      const int side ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return flat(sample, side);
 }
 
@@ -538,8 +518,6 @@ double
 CaloDepthTool::flat(const CaloCell_ID::CaloSample sample, const int side )
   const
 {
-  if (!m_calo_dd) return m_default;
-
   // FIXME : tiles is hardcoded !!!
   double radius = 2280.;
 
@@ -554,7 +532,7 @@ CaloDepthTool::flat(const CaloCell_ID::CaloSample sample, const int side )
 
   radius = m_default;
 
-  for (const CaloDetDescriptor* reg : m_calo_dd->calo_descriptors_range()) {
+  for (const CaloDetDescriptor* reg : caloMgr()->calo_descriptors_range()) {
     if (reg) {
       if ( reg->getSampling(0) == sample && reg->calo_sign()*side > 0) {
 	std::vector<double> depth;
@@ -587,9 +565,8 @@ double
 CaloDepthTool::depth(const CaloCell_ID::SUBCALO subcalo,const int sampling_or_module, const bool barrel,
 		      const int side ) const
 {
-  if (!m_calo_dd) return m_default;
   CaloCell_ID::CaloSample sample;
-  m_calo_dd->build_sample ( subcalo, barrel,sampling_or_module, sample);
+  CaloDetDescrManager::build_sample ( subcalo, barrel,sampling_or_module, sample);
   return depth(sample, side);
 }
 
@@ -597,8 +574,6 @@ double
 CaloDepthTool::depth(const CaloCell_ID::CaloSample sample, const int side )
   const
 {
-  if (!m_calo_dd) return m_default;
-
   // FIXME : tiles is hardcoded !!!
   double radius = 1970.;
 
@@ -613,7 +588,7 @@ CaloDepthTool::depth(const CaloCell_ID::CaloSample sample, const int side )
 
   radius = m_default;
     
-  for (const CaloDetDescriptor* reg : m_calo_dd->calo_descriptors_range()) {
+  for (const CaloDetDescriptor* reg : caloMgr()->calo_descriptors_range()) {
     if (reg) {
       if ( reg->getSampling(0) == sample && reg->calo_sign()*side > 0) {
 	std::vector<double> depth;
@@ -634,9 +609,7 @@ CaloDepthTool::get_entrance_radius(CaloCell_ID::CaloSample sample,
 					 double eta, double phi) const
 {
 
-  if (!m_calo_dd) return m_default;
-
-  const CaloDetDescrElement* elt = m_calo_dd->get_element(sample, eta, phi);
+  const CaloDetDescrElement* elt = caloMgr()->get_element(sample, eta, phi);
   if (!elt) return m_default;
   return (elt->r()-elt->dr());
 }
@@ -645,9 +618,7 @@ double
 CaloDepthTool::get_entrance_z(CaloCell_ID::CaloSample sample,
 				    double eta, double phi) const
 {
-  if (!m_calo_dd) return m_default;
-
-  const CaloDetDescrElement* elt = m_calo_dd->get_element(sample, eta, phi);
+  const CaloDetDescrElement* elt = caloMgr()->get_element(sample, eta, phi);
   if (!elt) return m_default;
   return (elt->z()-(elt->z()<0?-elt->dz():elt->dz()));
 }
@@ -656,9 +627,7 @@ double
 CaloDepthTool::get_middle_radius(CaloCell_ID::CaloSample sample,
 					 double eta, double phi) const
 {
-  if (!m_calo_dd) return m_default;
-
-  const CaloDetDescrElement* elt = m_calo_dd->get_element(sample, eta, phi);
+  const CaloDetDescrElement* elt = caloMgr()->get_element(sample, eta, phi);
   if (!elt) return m_default;
   return elt->r();
 }
@@ -667,9 +636,7 @@ double
 CaloDepthTool::get_middle_z(CaloCell_ID::CaloSample sample,
 				    double eta, double phi) const
 {
-  if (!m_calo_dd) return m_default;
-
-  const CaloDetDescrElement* elt = m_calo_dd->get_element(sample, eta, phi);
+  const CaloDetDescrElement* elt = caloMgr()->get_element(sample, eta, phi);
   if (!elt) return m_default;
   return elt->z();
 }
@@ -678,9 +645,7 @@ double
 CaloDepthTool::get_exit_radius(CaloCell_ID::CaloSample sample,
 			       double eta, double phi) const
 {
-  if (!m_calo_dd) return m_default;
-
-  const CaloDetDescrElement* elt = m_calo_dd->get_element(sample, eta, phi);
+  const CaloDetDescrElement* elt = caloMgr()->get_element(sample, eta, phi);
   if (!elt) return m_default;
   return (elt->r()+elt->dr());
 }
@@ -689,9 +654,7 @@ double
 CaloDepthTool::get_exit_z(CaloCell_ID::CaloSample sample,
 				    double eta, double phi) const
 {
-  if (!m_calo_dd) return m_default;
-
-  const CaloDetDescrElement* elt = m_calo_dd->get_element(sample, eta, phi);
+  const CaloDetDescrElement* elt = caloMgr()->get_element(sample, eta, phi);
   if (!elt) return m_default;
   return (elt->z()+(elt->z()<0?-elt->dz():elt->dz()));
 }
diff --git a/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx b/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx
index 4ae3085928a3..09f272f6020b 100755
--- a/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx
+++ b/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -1422,7 +1422,7 @@ const
 void CaloDetDescrManager_Base::build_sample (const CaloCell_ID::SUBCALO subCalo,
                                              const bool barrel,
                                              const int sampling_or_module,
-                                             CaloCell_ID::CaloSample& sample) const
+                                             CaloCell_ID::CaloSample& sample)
 {
   if ( subCalo == CaloCell_ID::LAREM ) {
     if ( barrel ) {
@@ -1465,7 +1465,7 @@ void CaloDetDescrManager_Base::build_sample (const CaloCell_ID::SUBCALO subCalo,
 void CaloDetDescrManager_Base::decode_sample (CaloCell_ID::SUBCALO& subCalo,
                                               bool& barrel,
                                               int& sampling_or_module,
-                                              const CaloCell_ID::CaloSample sample) const
+                                              const CaloCell_ID::CaloSample sample)
 {
   if ( sample == CaloCell_ID::PreSamplerB) {
     subCalo = CaloCell_ID::LAREM;
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref
index 384262f6b95f..2d331252facb 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref
@@ -202,15 +202,15 @@ TrigSignatureMoniMT                                INFO HLT_3j200 decisions
 TrigSignatureMoniMT                                INFO HLT_5j70_0eta240_L14J15       20        20        0         0         0         0         0         
 TrigSignatureMoniMT                                INFO HLT_5j70_0eta240_L14J15 decisions                    0         0         0         0         
 TrigSignatureMoniMT                                INFO HLT_e3_etcut                  20        20        18        17        0         0         17        
-TrigSignatureMoniMT                                INFO HLT_e3_etcut decisions                            54        343       0         0         
+TrigSignatureMoniMT                                INFO HLT_e3_etcut decisions                            54        342       0         0         
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step             20        20        18        0         0         0         18        
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step decisions                       54        0         0         0         
 TrigSignatureMoniMT                                INFO HLT_e3_etcut_mu6              20        20        10        0         0         0         1         
 TrigSignatureMoniMT                                INFO HLT_e3_etcut_mu6 decisions                        17        0         0         0         
 TrigSignatureMoniMT                                INFO HLT_e5_etcut                  20        20        17        16        0         0         16        
-TrigSignatureMoniMT                                INFO HLT_e5_etcut decisions                            50        330       0         0         
+TrigSignatureMoniMT                                INFO HLT_e5_etcut decisions                            50        329       0         0         
 TrigSignatureMoniMT                                INFO HLT_e7_etcut                  20        20        15        14        0         0         14        
-TrigSignatureMoniMT                                INFO HLT_e7_etcut decisions                            36        265       0         0         
+TrigSignatureMoniMT                                INFO HLT_e7_etcut decisions                            36        264       0         0         
 TrigSignatureMoniMT                                INFO HLT_g5_etcut                  20        20        17        17        0         0         17        
 TrigSignatureMoniMT                                INFO HLT_g5_etcut decisions                            50        50        0         0         
 TrigSignatureMoniMT                                INFO HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet20        20        0         0         0         0         0         
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref
index 06e1fb1c1590..30328f7781ab 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref
@@ -8,11 +8,11 @@ TrigSignatureMoniMT                                INFO HLT_2mu6_L1MU6 decisions
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_L1EM3       20        20        18        0         0         0         18        
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_L1EM3 decisions                    54        0         0         0         
 TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3            20        20        18        17        16        0         16        
-TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3 decisions                      54        343       47        0         
+TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3 decisions                      54        342       47        0         
 TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3            20        20        17        16        15        0         15        
-TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3 decisions                      50        330       45        0         
+TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3 decisions                      50        329       45        0         
 TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3            20        20        15        14        13        0         13        
-TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3 decisions                      36        265       31        0         
+TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3 decisions                      36        264       31        0         
 TrigSignatureMoniMT                                INFO HLT_mu20_ivar_L1MU6           20        20        3         2         2         0         2         
 TrigSignatureMoniMT                                INFO HLT_mu20_ivar_L1MU6 decisions                     3         2         2         0         
 TrigSignatureMoniMT                                INFO HLT_mu6Comb_L1MU6             20        20        3         2         0         0         2         
-- 
GitLab


From 9b3606952a7df1d08d4b94d245bf8f65f82fcc81 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Wed, 1 May 2019 14:13:57 +0000
Subject: [PATCH 034/129] Cleanup of SiSpacePointSeedMake package

---
 .../SiSpacePointForSeed.h                     |   7 +-
 .../SiSpacePointForSeedITK.h                  |   7 +-
 .../SiSpacePointsComparison.h                 |   4 +-
 .../SiSpacePointsProSeed.h                    |   4 +-
 .../SiSpacePointsProSeedITK.h                 |   4 +-
 .../SiSpacePointsSeedMaker_ATLxk.h            |   8 +-
 .../SiSpacePointsSeedMaker_BeamGas.h          | 573 ++++++++--------
 .../SiSpacePointsSeedMaker_Cosmic.h           | 572 ++++++++--------
 .../SiSpacePointsSeedMaker_HeavyIon.h         | 635 ++++++++---------
 .../SiSpacePointsSeedMaker_ITK.h              | 644 +++++++++---------
 .../SiSpacePointsSeedMaker_LowMomentum.h      | 580 ++++++++--------
 .../SiSpacePointsSeedMaker_Trigger.h          | 616 ++++++++---------
 .../src/SiSpacePointsSeedMaker_ATLxk.cxx      |  32 +-
 .../src/SiSpacePointsSeedMaker_BeamGas.cxx    | 170 ++---
 .../src/SiSpacePointsSeedMaker_Cosmic.cxx     | 146 ++--
 .../src/SiSpacePointsSeedMaker_HeavyIon.cxx   | 167 +----
 .../src/SiSpacePointsSeedMaker_ITK.cxx        | 193 ++----
 .../SiSpacePointsSeedMaker_LowMomentum.cxx    | 161 +----
 .../src/SiSpacePointsSeedMaker_Trigger.cxx    | 178 ++---
 19 files changed, 2075 insertions(+), 2626 deletions(-)
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsComparison.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx

diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
old mode 100755
new mode 100644
index 71f4587d3a78..8d831469829c
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -14,9 +14,10 @@
 
 #ifndef SiSpacePointForSeed_h
 #define SiSpacePointForSeed_h
-#include "TrkSpacePoint/SpacePoint.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
+
 #include "InDetPrepRawData/SiCluster.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkSpacePoint/SpacePoint.h"
 #include "TrkSurfaces/Surface.h"
 
 namespace InDet {
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
old mode 100755
new mode 100644
index 50db98e4f57b..1a06697da46a
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2017\9 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -14,9 +14,10 @@
 
 #ifndef SiSpacePointForSeedITK_h
 #define SiSpacePointForSeedITK_h
-#include "TrkSpacePoint/SpacePoint.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
+
 #include "InDetPrepRawData/SiCluster.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkSpacePoint/SpacePoint.h"
 #include "TrkSurfaces/Surface.h"
 
 namespace InDet {
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsComparison.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsComparison.h
old mode 100755
new mode 100644
index 76ef68eb673d..06409e475543
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsComparison.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsComparison.h
@@ -1,12 +1,12 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef  SiSpacePointsComparison_h
 #define  SiSpacePointsComparison_h
 
-#include "TrkSpacePoint/SpacePoint.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+#include "TrkSpacePoint/SpacePoint.h"
 
 namespace InDet{
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h
index 357e9e4d28d9..56de9c1ad357 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -15,8 +15,8 @@
 #ifndef SiSpacePointsProSeed_h
 #define SiSpacePointsProSeed_h
 
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 #include "SiSpacePointsSeed/SiSpacePointsSeed.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 
 namespace InDet {
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h
index a5551f1b7c17..0ca769dc559a 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -15,8 +15,8 @@
 #ifndef SiSpacePointsProSeedITK_h
 #define SiSpacePointsProSeedITK_h
 
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h"
 #include "SiSpacePointsSeed/SiSpacePointsSeed.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h"
 
 namespace InDet {
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
old mode 100755
new mode 100644
index 106fa6273248..8036fac97acf
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
@@ -120,9 +120,9 @@ namespace InDet {
     ///////////////////////////////////////////////////////////////////
     // Space points containers
     ///////////////////////////////////////////////////////////////////
-    SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixelKey{this, "SpacePointsPixelName", "PixelSpacePoints"};
-    SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCTKey{this, "SpacePointsSCTName", "SCT_SpacePoints"};
-    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapKey{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
 
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
 
@@ -290,7 +290,7 @@ namespace InDet {
     void newSeed(SiSpacePointForSeed*&, SiSpacePointForSeed*&, float);
 
     void newOneSeed(SiSpacePointForSeed*&, SiSpacePointForSeed*&,
-     SiSpacePointForSeed*&, float, float);
+                    SiSpacePointForSeed*&, float, float);
 
     void newOneSeedWithCurvaturesComparison
     (SiSpacePointForSeed*&, SiSpacePointForSeed*&, float);
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
old mode 100755
new mode 100644
index c4e7172f663c..de4f17631327
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -16,362 +18,359 @@
 #ifndef SiSpacePointsSeedMaker_BeamGas_H
 #define SiSpacePointsSeedMaker_BeamGas_H
 
+#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 
-#include "GaudiKernel/ServiceHandle.h"
+#include "BeamSpotConditionsData/BeamSpotData.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+#include <iosfwd>
 #include <list>
 #include <map>
 #include <vector>
-#include <iosfwd>
 
-class MsgStream   ;
+class MsgStream;
 
 namespace Trk {
-
-  class IPRD_AssociationTool; 
+  class IPRD_AssociationTool;
 }
 
 namespace InDet {
 
-
   class SiSpacePointsSeedMaker_BeamGas : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiSpacePointsSeedMaker_BeamGas
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiSpacePointsSeedMaker_BeamGas();
-      virtual StatusCode               initialize();
-      virtual StatusCode               finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initialize tool for new event or region
-      ///////////////////////////////////////////////////////////////////
-
-      void newEvent (int);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiSpacePointsSeedMaker_BeamGas
+    (const std::string&,const std::string&,const IInterface*);
+    virtual ~SiSpacePointsSeedMaker_BeamGas();
+    virtual StatusCode               initialize();
+    virtual StatusCode               finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initialize tool for new event or region
+    ///////////////////////////////////////////////////////////////////
+
+    void newEvent (int);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with two space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find2Sp (const std::list<Trk::Vertex>&);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with three space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find3Sp (const std::list<Trk::Vertex>&);
-      void find3Sp (const std::list<Trk::Vertex>&,const double*);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with variable number space points with or without vertex constraint
-      // Variable means (2,3,4,....) any number space points
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with two space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find2Sp (const std::list<Trk::Vertex>&);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with three space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find3Sp (const std::list<Trk::Vertex>&);
+    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with variable number space points with or without vertex constraint
+    // Variable means (2,3,4,....) any number space points
+    ///////////////////////////////////////////////////////////////////
  
-      void findVSp (const std::list<Trk::Vertex>&);
+    void findVSp (const std::list<Trk::Vertex>&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Iterator through seeds pseudo collection produced accordingly
-      // methods find    
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Iterator through seeds pseudo collection produced accordingly
+    // methods find    
+    ///////////////////////////////////////////////////////////////////
       
-      const SiSpacePointsSeed* next();
+    const SiSpacePointsSeed* next();
       
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
-
-    protected:
-  /**    @name Disallow default instantiation, copy, assignment */
-  //@{
-  SiSpacePointsSeedMaker_BeamGas() = delete;
-  SiSpacePointsSeedMaker_BeamGas(const SiSpacePointsSeedMaker_BeamGas&) = delete;
-  SiSpacePointsSeedMaker_BeamGas &operator=(const SiSpacePointsSeedMaker_BeamGas&) = delete;
-  //@}
-      ///////////////////////////////////////////////////////////////////
-      // Protected data and methods
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dump          (MsgStream   & out) const;
+    std::ostream& dump          (std::ostream& out) const;
+
+  protected:
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_BeamGas() = delete;
+    SiSpacePointsSeedMaker_BeamGas(const SiSpacePointsSeedMaker_BeamGas&) = delete;
+    SiSpacePointsSeedMaker_BeamGas &operator=(const SiSpacePointsSeedMaker_BeamGas&) = delete;
+    //@}
+    ///////////////////////////////////////////////////////////////////
+    // Protected data and methods
+    ///////////////////////////////////////////////////////////////////
       
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle ;
-      MagField::IMagFieldSvc*                m_fieldService{}       ;
-
-      ToolHandle<Trk::IPRD_AssociationTool>  m_assoTool           ;
-      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-
-      bool                        m_pixel {}                        ;
-      bool                        m_sct  {}                         ;
-      bool                        m_endlist  {}                     ;
-      bool                        m_useOverlap{}                    ;
-      bool                        m_useassoTool {}                  ;
-      int                         m_outputlevel{}                   ;
-      int                         m_nprint {}                       ;
-      int                         m_state {}                        ;
-      int                         m_nspoint{}                       ;
-      int                         m_mode {}                         ;
-      int                         m_nlist{}                         ;
-      int                         m_maxsize {}                      ;
-      float                       m_r1min{}                         ;
-      float                       m_r1max {}                        ;
-      float                       m_r2min {}                        ;
-      float                       m_r2max {}                        ;
-      float                       m_r3min {}                        ;
-      float                       m_r3max {}                        ;
-      float                       m_drmin  {}                       ;
-      float                       m_drmax {}                        ;
-      float                       m_rapcut {}                       ;
-      float                       m_dzdrmin{}                       ;
-      float                       m_dzdrmax{}                       ;
-      float                       m_zmin  {}                        ;
-      float                       m_zmax {}                         ;
-      float                       m_r_rmax{}                        ;
-      float                       m_r_rstep {}                      ;
-      float                       m_dzver {}                        ;
-      float                       m_dzdrver {}                      ;
-      float                       m_diver {}                        ;
-      float                       m_diverpps {}                     ;
-      float                       m_dazmax{}                        ;
-      float                       m_ptmin {}                        ;
-      float                       m_ipt  {}                         ;
-      float                       m_ipt2 {}                         ;
-      float                       m_COF {}                          ;
-      float                       m_K  {}                           ;
-
-      int m_r_size {}                                               ;
-      int m_rf_size  {}                                             ;
-      int m_rfz_size {}                                             ;
-      std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted          ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53] ; 
-      std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-      std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed       ;
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; 
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-      int m_ns{},m_nsaz {}                                            ;
-      int m_fNmax {}                                                ;
-      int m_fNmin {}                                                ;
-      int m_zMin {}                                                 ;
-      int  m_nr{}     ; int* m_r_index{}   ; int* m_r_map {}            ;
-      int  m_nrf {}   , m_rf_index   [ 53], m_rf_map   [ 53]        ;
-      int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]        ;
-      int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12]   ;
-      float m_sF {}                                                 ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Tables for 3 space points seeds search
-      ///////////////////////////////////////////////////////////////////
+    ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+
+    PublicToolHandle<Trk::IPRD_AssociationTool>  m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+
+    BooleanProperty m_pixel{this, "usePixel", true};
+    BooleanProperty m_sct{this, "useSCT""useSCT", true};
+    bool                        m_endlist  {true}                     ;
+    BooleanProperty m_useOverlap{this, "useOverlapSpCollection", true};
+    BooleanProperty m_useassoTool{this, "UseAssociationTool", true};
+    int                         m_outputlevel{}                   ;
+    int                         m_nprint {}                       ;
+    int                         m_state {0}                        ;
+    int                         m_nspoint{2}                       ;
+    int                         m_mode {0}                         ;
+    int                         m_nlist{0}                         ;
+    IntegerProperty m_maxsize{this, "maxSize", 20000};
+    FloatProperty m_r1min{this, "minRadius1", 0.};
+    FloatProperty m_r1max{this, "maxRadius1", 450.};
+    FloatProperty m_r2min{this, "minRadius2", 0.};
+    FloatProperty m_r2max{this, "maxRadius2", 600.};
+    FloatProperty m_r3min{this, "minRadius3", 0.};
+    FloatProperty m_r3max{this, "maxRadius3", 600.};
+    FloatProperty m_drmin{this, "mindRadius", 10.};
+    FloatProperty m_drmax{this, "maxdRadius", 270.};
+    FloatProperty m_rapcut{this, "RapidityCut", 5.3};
+    float                       m_dzdrmin{}                       ;
+    float                       m_dzdrmax{}                       ;
+    FloatProperty m_zmin{this, "minZ", -5000.};
+    FloatProperty m_zmax{this, "maxZ", +5000.};
+    FloatProperty m_r_rmax{this, "radMax", 600.};
+    FloatProperty m_r_rstep{this, "radStep", 2.};
+    FloatProperty m_dzver{this, "maxdZver", 5.};
+    FloatProperty m_dzdrver{this, "maxdZdRver", 0.02};
+    FloatProperty m_diver{this, "maxdImpact", 10.};
+    FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7};
+    float                       m_dazmax{.02}                        ;
+    FloatProperty m_ptmin{this, "pTmin", 1000.};
+    float                       m_ipt  {}                         ;
+    float                       m_ipt2 {}                         ;
+    float                       m_COF {}                          ;
+    float                       m_K  {}                           ;
+
+    int m_r_size {}                                               ;
+    int m_rf_size  {}                                             ;
+    int m_rfz_size {}                                             ;
+    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
+    std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed       ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
+
+    int m_ns{},m_nsaz {}                                            ;
+    int m_fNmax {}                                                ;
+    int m_fNmin {}                                                ;
+    int m_zMin {}                                                 ;
+    int  m_nr{}     ; int* m_r_index{nullptr}   ; int* m_r_map {nullptr}            ;
+    int  m_nrf {}   , m_rf_index   [ 53], m_rf_map   [ 53]        ;
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]        ;
+    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12]   ;
+    float m_sF {}                                                 ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Tables for 3 space points seeds search
+    ///////////////////////////////////////////////////////////////////
      
-      int                     m_maxsizeSP{}                         ;                    
-      InDet::SiSpacePointForSeed** m_SP {}                          ;
-      float               *  m_R {}                                 ;
-      float               *  m_Tz {}                                ;
-      float               *  m_Er {}                                ;
-      float               *  m_U {}                                 ;
-      float               *  m_V {}                                 ;
-      float               *  m_Zo{}                                 ; 
-
-      std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ; 
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
-
-      std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-      InDet::SiSpacePointsSeed*                      m_OneSeeds {}  ;
-      int                                            m_maxOneSize{} ;
-      int                                            m_nOneSeeds{}  ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Beam geometry
-      ///////////////////////////////////////////////////////////////////
+    IntegerProperty m_maxsizeSP{this, "maxSizeSP", 1500};
+    InDet::SiSpacePointForSeed** m_SP {nullptr}                          ;
+    float               *  m_R {nullptr}                                 ;
+    float               *  m_Tz {nullptr}                                ;
+    float               *  m_Er {nullptr}                                ;
+    float               *  m_U {nullptr}                                 ;
+    float               *  m_V {nullptr}                                 ;
+    float               *  m_Zo{nullptr}                                 ;
+
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
+
+    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
+    InDet::SiSpacePointsSeed*                      m_OneSeeds {nullptr}  ;
+    IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 5};
+    int                                            m_nOneSeeds{}  ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Beam geometry
+    ///////////////////////////////////////////////////////////////////
  
-      float m_xbeam[4];    // x,ax,ay,az - center and x-axis direction
-      float m_ybeam[4];    // y,ax,ay,az - center and y-axis direction
-      float m_zbeam[4];    // z,ax,ay,az - center and z-axis direction
+    float m_xbeam[4]{0., 1., 0., 0.}; // x,ax,ay,az - center and x-axis direction
+    float m_ybeam[4]{0., 0., 1., 0.}; // y,ax,ay,az - center and y-axis direction
+    float m_zbeam[4]{0., 0., 0., 1.}; // z,ax,ay,az - center and z-axis direction
 
-      ///////////////////////////////////////////////////////////////////
-      // Space points container
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Space points container
+    ///////////////////////////////////////////////////////////////////
       
-
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsSCT         ;
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsPixel       ;
-      SG::ReadHandle<SpacePointOverlapCollection> m_spacepointsOverlap     ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected methods
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void buildFrameWork()                                       ;
-      void buildBeamFrameWork()                                   ;
-
-      SiSpacePointForSeed* newSpacePoint
-	(const Trk::SpacePoint*const&)                            ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const float&)                                              ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&)                      ;
-
-      void newOneSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&,const float&)         ;
-      void fillSeeds()                                            ;
-
-      void fillLists     ()                                       ;
-      void erase         ()                                       ;
-      void production2Sp ()                                       ;
-      void production3Sp ()                                       ;
-      void production3Sp
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&)                                            ;
-			  
-      void findNext()                                             ;
-      bool isZCompatible     (float&)                             ;
-      void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-      bool isUsed(const Trk::SpacePoint*)                         ; 
-   };
+    SG::ReadHandleKey<SpacePointContainer>         m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer>         m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected methods
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dumpConditions(MsgStream   & out) const;
+    MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+    void buildFrameWork()                                       ;
+    void buildBeamFrameWork()                                   ;
+
+    SiSpacePointForSeed* newSpacePoint
+    (const Trk::SpacePoint*const&)                            ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const float&)                                              ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&)                      ;
+
+    void newOneSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&,const float&)         ;
+    void fillSeeds()                                            ;
+
+    void fillLists     ()                                       ;
+    void erase         ()                                       ;
+    void production2Sp ()                                       ;
+    void production3Sp ()                                       ;
+    void production3Sp
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&)                                            ;
+
+    void findNext()                                             ;
+    bool isZCompatible     (float&)                             ;
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    bool isUsed(const Trk::SpacePoint*)                         ;
+  };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_BeamGas&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_BeamGas&); 
+  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_BeamGas&);
 
   ///////////////////////////////////////////////////////////////////
   // Inline methods
   ///////////////////////////////////////////////////////////////////
 
   inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_BeamGas::next()
-    {
-      if(m_i_seed==m_i_seede) {
-	findNext(); if(m_i_seed==m_i_seede) return 0;
-      } 
-      return(*m_i_seed++);
-    }
+  {
+    if(m_i_seed==m_i_seede) {
+      findNext(); if(m_i_seed==m_i_seede) return 0;
+    } 
+    return(*m_i_seed++);
+  }
     
   inline bool SiSpacePointsSeedMaker_BeamGas::isZCompatible  
-    (float& Zv)
-    {
-      return  Zv > m_zmin && Zv < m_zmax;
-    }
+  (float& Zv)
+  {
+    return  Zv > m_zmin && Zv < m_zmax;
+  }
   
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline SiSpacePointForSeed* SiSpacePointsSeedMaker_BeamGas::newSpacePoint
-    (const Trk::SpacePoint*const& sp) 
-    {
-      SiSpacePointForSeed* sps;
+  (const Trk::SpacePoint*const& sp) 
+  {
+    SiSpacePointForSeed* sps;
 
-      float r[3]; convertToBeamFrameWork(sp,r);
+    float r[3]; convertToBeamFrameWork(sp,r);
 
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r);
     }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
+      m_i_spforseed = m_l_spforseed.end();
+    }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 2 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_BeamGas::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->setZVertex(double(z));
     }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
+      m_i_seede = m_l_seeds.end();
+    }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 3 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_BeamGas::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const Trk::SpacePoint*& p3,const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->add       (p3); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const Trk::SpacePoint*& p3,const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->add       (p3);
+      s->setZVertex(double(z));
     }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
+      m_i_seede = m_l_seeds.end();
+    }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // Fill seeds
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_BeamGas::fillSeeds ()
-    {
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-	l  = m_mapOneSeeds.begin(),
-	le = m_mapOneSeeds.end  ();
-
-      for(; l!=le; ++l) {
-
-	if(m_i_seede!=m_l_seeds.end()) {
-	  SiSpacePointsSeed* s = (*m_i_seede++);
-	  *s = *(*l).second;
-	}
-	else                  {
-	  m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
-	  m_i_seede = m_l_seeds.end(); 
-	}
+  {
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
+      l  = m_mapOneSeeds.begin(),
+      le = m_mapOneSeeds.end  ();
+
+    for(; l!=le; ++l) {
+
+      if(m_i_seede!=m_l_seeds.end()) {
+        SiSpacePointsSeed* s = (*m_i_seede++);
+        *s = *(*l).second;
+      }
+      else                  {
+        m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
+        m_i_seede = m_l_seeds.end();
       }
     }
+  }
   
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_BeamGas_H
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
old mode 100755
new mode 100644
index 708c4f29f8c9..a709d6f56dc9
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -16,361 +18,357 @@
 #ifndef SiSpacePointsSeedMaker_Cosmic_H
 #define SiSpacePointsSeedMaker_Cosmic_H
 
+#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 
-#include "GaudiKernel/ServiceHandle.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
 
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include <iosfwd>
 #include <list>
 #include <map>
 #include <vector>
 
-class MsgStream   ;
+class MsgStream;
 
 namespace Trk {
-  class IPRD_AssociationTool; 
+  class IPRD_AssociationTool;
 }
 
 namespace InDet {
 
-
   class SiSpacePointsSeedMaker_Cosmic : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiSpacePointsSeedMaker_Cosmic
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiSpacePointsSeedMaker_Cosmic();
-      virtual StatusCode               initialize();
-      virtual StatusCode               finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initialize tool for new event or region
-      ///////////////////////////////////////////////////////////////////
-
-      void newEvent (int);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiSpacePointsSeedMaker_Cosmic
+    (const std::string&,const std::string&,const IInterface*);
+    virtual ~SiSpacePointsSeedMaker_Cosmic();
+    virtual StatusCode               initialize();
+    virtual StatusCode               finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initialize tool for new event or region
+    ///////////////////////////////////////////////////////////////////
+
+    void newEvent (int);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with two space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find2Sp (const std::list<Trk::Vertex>&);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with three space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find3Sp (const std::list<Trk::Vertex>&);
-      void find3Sp (const std::list<Trk::Vertex>&,const double*);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with variable number space points with or without vertex constraint
-      // Variable means (2,3,4,....) any number space points
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with two space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find2Sp (const std::list<Trk::Vertex>&);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with three space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find3Sp (const std::list<Trk::Vertex>&);
+    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with variable number space points with or without vertex constraint
+    // Variable means (2,3,4,....) any number space points
+    ///////////////////////////////////////////////////////////////////
  
-      void findVSp (const std::list<Trk::Vertex>&);
+    void findVSp (const std::list<Trk::Vertex>&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Iterator through seeds pseudo collection produced accordingly
-      // methods find    
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Iterator through seeds pseudo collection produced accordingly
+    // methods find    
+    ///////////////////////////////////////////////////////////////////
       
-      const SiSpacePointsSeed* next();
+    const SiSpacePointsSeed* next();
       
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
 
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
+    MsgStream&    dump          (MsgStream   & out) const;
+    std::ostream& dump          (std::ostream& out) const;
 
-    protected:
+  protected:
 
-              /**    @name Disallow default instantiation, copy, assignment */
-  //@{
-  SiSpacePointsSeedMaker_Cosmic() = delete;
-  SiSpacePointsSeedMaker_Cosmic(const SiSpacePointsSeedMaker_Cosmic&) = delete;
-  SiSpacePointsSeedMaker_Cosmic &operator=(const SiSpacePointsSeedMaker_Cosmic&) = delete;
-  //@}
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_Cosmic() = delete;
+    SiSpacePointsSeedMaker_Cosmic(const SiSpacePointsSeedMaker_Cosmic&) = delete;
+    SiSpacePointsSeedMaker_Cosmic &operator=(const SiSpacePointsSeedMaker_Cosmic&) = delete;
+    //@}
       
-      ///////////////////////////////////////////////////////////////////
-      // Protected data and methods
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Protected data and methods
+    ///////////////////////////////////////////////////////////////////
       
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle ;
-      MagField::IMagFieldSvc*                m_fieldService {}      ;
-      ToolHandle<Trk::IPRD_AssociationTool>  m_assoTool           ;
-
-      bool                        m_pixel{}                          ;
-      bool                        m_sct     {}                       ;
-      bool                        m_endlist {}                       ;
-      bool                        m_useOverlap {}                    ;
-      bool                        m_useassoTool {}                   ;
-      bool                        m_checketa  {}                     ;
-      int                         m_outputlevel {}                   ;
-      int                         m_nprint {}                        ;
-      int                         m_state   {}                       ;
-      int                         m_nspoint {}                       ;
-      int                         m_mode {}                          ;
-      int                         m_nlist  {}                        ;
-      int                         m_maxsize {}                       ;
-      int                         m_nseeds {}                        ;
-      float                       m_ptmin {}                         ;
-      float                       m_drmin {}                         ;
-      float                       m_drmax {}                         ;
-      float                       m_rapcut {}                        ;
-      float                       m_dzdrmin {}                       ;
-      float                       m_dzdrmax {}                       ;
-      float                       m_zmin {}                          ;
-      float                       m_zmax {}                          ;
-      float                       m_r_rmax {}                        ;
-      float                       m_r_rstep {}                       ;
-      float                       m_diver {}                         ;
-      float                       m_dazmax  {}                       ;
-      float                       m_diverpps  {}                     ;
-      float                       m_diversss  {}                     ;
-      float                       m_etamin{} , m_etamax {}              ;
-      int m_r_size {}                                                ;
-      int m_rf_size {}                                               ;
-      int m_rfz_size {}                                              ;
-      std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted          ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53] ; 
-      std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-      std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed       ;
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; 
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-      int m_ns{} ,m_nsaz {}                                             ;
-      int m_fNmax  {}                                                ;
-      int m_fNmin{}                                                  ;
-      int m_zMin {}                                                  ;
-      int  m_nr{}      ; int* m_r_index{}    ; int* m_r_map{}              ;
-      int  m_nrf{}     , m_rf_index   [ 53], m_rf_map   [ 53]        ;
-      int  m_nrfz{}    , m_rfz_index  [583], m_rfz_map  [583]        ;
-      int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12] ;
-      float m_sF {}                                                  ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Tables for 3 space points seeds search
-      ///////////////////////////////////////////////////////////////////
+    ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+    PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
+
+    BooleanProperty m_pixel{this, "usePixel", true};
+    BooleanProperty m_sct{this, "useSCT", true};
+    bool m_endlist{true};
+    BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
+    BooleanProperty m_useassoTool{this, "UseAssociationTool", false};
+    BooleanProperty m_checketa{this, "checkEta", false};
+    int                         m_outputlevel {}                   ;
+    int                         m_nprint {}                        ;
+    bool m_state{0};
+    int m_nspoint{2};
+    int m_mode{0};
+    int m_nlist{0};
+    IntegerProperty m_maxsize{this, "maxSize", 100};
+    int                         m_nseeds {}                        ;
+    FloatProperty m_ptmin{this, "pTmin", 500.};
+    FloatProperty m_drmin{this, "mindRadius", 5.};
+    FloatProperty m_drmax{this, "maxdRadius", 1000.};
+    FloatProperty m_rapcut{this, "RapidityCut", 2.3};
+    float                       m_dzdrmin {}                       ;
+    float                       m_dzdrmax {}                       ;
+    FloatProperty m_zmin{this, "minZ", -10000.};
+    FloatProperty m_zmax{this, "maxZ", +10000.};
+    FloatProperty m_r_rmax{this, "radMax", 600.};
+    FloatProperty m_r_rstep{this, "radStep", 5.};
+    FloatProperty m_diver{this, "maxdImpact", 10.};
+    float                       m_dazmax  {}                       ;
+    FloatProperty m_diverpps{this, "maxdImpactPPS", 0.};
+    FloatProperty m_diversss{this, "maxdImpactSSS", 0.};
+    FloatProperty m_etamin{this, "etaMin", 0.};
+    FloatProperty m_etamax{this, "etaMax", 0.};
+    int m_r_size {}                                                ;
+    int m_rf_size {}                                               ;
+    int m_rfz_size {}                                              ;
+    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
+    std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed       ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
+
+    int m_ns{} ,m_nsaz {}                                             ;
+    int m_fNmax  {}                                                ;
+    int m_fNmin{}                                                  ;
+    int m_zMin {}                                                  ;
+    int  m_nr{}      ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrf{}     , m_rf_index   [ 53], m_rf_map   [ 53]        ;
+    int  m_nrfz{}    , m_rfz_index  [583], m_rfz_map  [583]        ;
+    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12] ;
+    float m_sF {}                                                  ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Tables for 3 space points seeds search
+    ///////////////////////////////////////////////////////////////////
      
-      int                     m_maxsizeSP   {}                       ;                    
-      InDet::SiSpacePointForSeed** m_SP   {}                         ;
-      float               *  m_R   {}                                ;
-      float               *  m_Tz {}                                 ;
-      float               *  m_Er {}                                 ;
-      float               *  m_U  {}                                 ;
-      float               *  m_V  {}                                 ;
-
-      std::multimap<float,InDet::SiSpacePointsSeed*>           m_l_seeds;
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seed ;
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seede;
-      InDet::SiSpacePointsSeed*                                m_seeds;
-
-      ///////////////////////////////////////////////////////////////////
-      // Space points container
-      ///////////////////////////////////////////////////////////////////
+    IntegerProperty m_maxsizeSP{this, "maxSizeSP", 1500};
+    InDet::SiSpacePointForSeed** m_SP{nullptr};
+    float               *  m_R{nullptr};
+    float               *  m_Tz{nullptr};
+    float               *  m_Er{nullptr};
+    float               *  m_U{nullptr};
+    float               *  m_V{nullptr};
+
+    std::multimap<float,InDet::SiSpacePointsSeed*>           m_l_seeds;
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seed ;
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seede;
+    InDet::SiSpacePointsSeed*                                m_seeds{nullptr};
+
+    ///////////////////////////////////////////////////////////////////
+    // Space points container
+    ///////////////////////////////////////////////////////////////////
       
-//      std::string                        m_spacepointsSCTname     ;
-//      std::string                        m_spacepointsPixelname   ;
-//      std::string                        m_spacepointsOverlapname ; 
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsSCT         ;
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsPixel       ;
-      SG::ReadHandle<SpacePointOverlapCollection> m_spacepointsOverlap     ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected methods
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void buildFrameWork()                                       ;
-
-      SiSpacePointForSeed* newSpacePoint
-	(const Trk::SpacePoint*const&)                            ;
-      SiSpacePointForSeed* newSpacePoint
-	(const Trk::SpacePoint*const&,const float*)               ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const float&)                                              ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&)                      ;
-      void fillLists     ()                                       ;
-      void erase         ()                                       ;
-      void production2Sp ()                                       ;
-      void production3Sp ()                                       ;
-      void production3Sp
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,float,float)                                     ;
-
-      void production3SpWithoutField()                            ;
-      void production3SpWithoutField
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,float)                                           ;
-
-
-			  
-      bool isUsed(const Trk::SpacePoint*)                         ; 
-   };
+    SG::ReadHandleKey<SpacePointContainer>         m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer>         m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected methods
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dumpConditions(MsgStream   & out) const;
+    MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+    void buildFrameWork()                                       ;
+
+    SiSpacePointForSeed* newSpacePoint
+    (const Trk::SpacePoint*const&)                            ;
+    SiSpacePointForSeed* newSpacePoint
+    (const Trk::SpacePoint*const&,const float*)               ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const float&)                                              ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&)                      ;
+    void fillLists     ()                                       ;
+    void erase         ()                                       ;
+    void production2Sp ()                                       ;
+    void production3Sp ()                                       ;
+    void production3Sp
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,float,float)                                     ;
+
+    void production3SpWithoutField()                            ;
+    void production3SpWithoutField
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,float)                                           ;
+
+
+     
+    bool isUsed(const Trk::SpacePoint*)                         ;
+  };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_Cosmic&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_Cosmic&); 
+  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_Cosmic&);
 
   ///////////////////////////////////////////////////////////////////
   // Inline methods
   ///////////////////////////////////////////////////////////////////
 
   inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_Cosmic::next()
-    {
-      if(m_i_seed==m_i_seede) return 0;
-      SiSpacePointsSeed* sp = (*m_i_seed).second; ++m_i_seed;
-      return(sp);
-    }
+  {
+    if(m_i_seed==m_i_seede) return 0;
+    SiSpacePointsSeed* sp = (*m_i_seed).second; ++m_i_seed;
+    return(sp);
+  }
     
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline SiSpacePointForSeed* SiSpacePointsSeedMaker_Cosmic::newSpacePoint
-    (const Trk::SpacePoint*const& sp) 
-    {
-      SiSpacePointForSeed* sps;
-
-      float r[3] = {float(sp->globalPosition().x()),
-		    float(sp->globalPosition().y()),
-		    float(sp->globalPosition().z())}; 
-
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+  (const Trk::SpacePoint*const& sp) 
+  {
+    SiSpacePointForSeed* sps;
+
+    float r[3] = {float(sp->globalPosition().x()),
+                  float(sp->globalPosition().y()),
+                  float(sp->globalPosition().z())};
+
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r);
+    }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
+      m_i_spforseed = m_l_spforseed.end();
     }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds with error correction
   ///////////////////////////////////////////////////////////////////
 
   inline SiSpacePointForSeed* SiSpacePointsSeedMaker_Cosmic::newSpacePoint
-    (const Trk::SpacePoint*const& sp,const float* sc) 
-    {
-      SiSpacePointForSeed* sps;
-
-      float r[3]; r[0]=sp->globalPosition().x(); r[1]=sp->globalPosition().y(); r[2]=sp->globalPosition().z(); 
-
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r,sc); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r,sc)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+  (const Trk::SpacePoint*const& sp,const float* sc) 
+  {
+    SiSpacePointForSeed* sps;
+
+    float r[3]; r[0]=sp->globalPosition().x(); r[1]=sp->globalPosition().y(); r[2]=sp->globalPosition().z();
+
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r,sc);
     }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r,sc)));
+      m_i_spforseed = m_l_spforseed.end();
+    }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 2 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_Cosmic::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const float& z) 
-    {
-
-      if(m_nseeds < m_maxsize) {
-
-	m_seeds[m_nseeds].erase     (  ); 
-	m_seeds[m_nseeds].add       (p1); 
-	m_seeds[m_nseeds].add       (p2); 
-	m_seeds[m_nseeds].setZVertex(0.);
-	m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
-	++m_nseeds;
-      }
-      else                     {
-
-	std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
-	if((*l).first <= z) return;
-	InDet::SiSpacePointsSeed* s = (*l).second;
-	m_l_seeds.erase((*l).first);
-
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->setZVertex(0.);
-	m_l_seeds.insert(std::make_pair(z,s));
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const float& z) 
+  {
+
+    if(m_nseeds < m_maxsize) {
+
+      m_seeds[m_nseeds].erase     (  );
+      m_seeds[m_nseeds].add       (p1);
+      m_seeds[m_nseeds].add       (p2);
+      m_seeds[m_nseeds].setZVertex(0.);
+      m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
+      ++m_nseeds;
     }
+    else                     {
+
+      std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
+      if((*l).first <= z) return;
+      InDet::SiSpacePointsSeed* s = (*l).second;
+      m_l_seeds.erase((*l).first);
+
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->setZVertex(0.);
+      m_l_seeds.insert(std::make_pair(z,s));
+    }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 3 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_Cosmic::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const Trk::SpacePoint*& p3,const float& z) 
-    {
-      if(m_nseeds < m_maxsize) {
-
-	m_seeds[m_nseeds].erase     (  ); 
-	m_seeds[m_nseeds].add       (p1); 
-	m_seeds[m_nseeds].add       (p2); 
-	m_seeds[m_nseeds].add       (p3); 
-	m_seeds[m_nseeds].setZVertex(0.);
-	m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
-	++m_nseeds;
-      }
-      else                     {
-
-	std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
-	if((*l).first <= z) return;
-	InDet::SiSpacePointsSeed* s = (*l).second;
-	m_l_seeds.erase((*l).first);
-
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->add       (p3); 
-	s->setZVertex(0.);
-	m_l_seeds.insert(std::make_pair(z,s));
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const Trk::SpacePoint*& p3,const float& z) 
+  {
+    if(m_nseeds < m_maxsize) {
+
+      m_seeds[m_nseeds].erase     (  );
+      m_seeds[m_nseeds].add       (p1);
+      m_seeds[m_nseeds].add       (p2);
+      m_seeds[m_nseeds].add       (p3);
+      m_seeds[m_nseeds].setZVertex(0.);
+      m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
+      ++m_nseeds;
+    }
+    else                     {
+
+      std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
+      if((*l).first <= z) return;
+      InDet::SiSpacePointsSeed* s = (*l).second;
+      m_l_seeds.erase((*l).first);
+
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->add       (p3);
+      s->setZVertex(0.);
+      m_l_seeds.insert(std::make_pair(z,s));
     }
+  }
   
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_Cosmic_H
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
old mode 100755
new mode 100644
index edbbf652958d..2176f41603f1
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -16,397 +18,400 @@
 #ifndef SiSpacePointsSeedMaker_HeavyIon_H
 #define SiSpacePointsSeedMaker_HeavyIon_H
 
+#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
 
-#include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
-#include "TrkSpacePoint/SpacePointContainer.h" 
-#include "TrkSpacePoint/SpacePointOverlapCollection.h"
 #include "BeamSpotConditionsData/BeamSpotData.h"
+#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+#include "TrkSpacePoint/SpacePointContainer.h" 
+#include "TrkSpacePoint/SpacePointOverlapCollection.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+#include <iosfwd>
 #include <list>
-#include <vector>
 #include <map>
-#include <iosfwd>
-
-class MsgStream   ;
+#include <vector>
 
+class MsgStream;
 
 namespace InDet {
 
-
   class SiSpacePointsSeedMaker_HeavyIon : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiSpacePointsSeedMaker_HeavyIon
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiSpacePointsSeedMaker_HeavyIon();
-      virtual StatusCode               initialize();
-      virtual StatusCode               finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initialize tool for new event or region
-      ///////////////////////////////////////////////////////////////////
-
-      void newEvent (int);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiSpacePointsSeedMaker_HeavyIon
+    (const std::string&,const std::string&,const IInterface*);
+    virtual ~SiSpacePointsSeedMaker_HeavyIon();
+    virtual StatusCode               initialize();
+    virtual StatusCode               finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initialize tool for new event or region
+    ///////////////////////////////////////////////////////////////////
+
+    void newEvent (int);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
      
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with two space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find2Sp (const std::list<Trk::Vertex>&);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with three space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find3Sp (const std::list<Trk::Vertex>&);
-      void find3Sp (const std::list<Trk::Vertex>&,const double*);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with variable number space points with or without vertex constraint
-      // Variable means (2,3,4,....) any number space points
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with two space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find2Sp (const std::list<Trk::Vertex>&);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with three space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find3Sp (const std::list<Trk::Vertex>&);
+    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with variable number space points with or without vertex constraint
+    // Variable means (2,3,4,....) any number space points
+    ///////////////////////////////////////////////////////////////////
  
-      void findVSp (const std::list<Trk::Vertex>&);
+    void findVSp (const std::list<Trk::Vertex>&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Iterator through seeds pseudo collection produced accordingly
-      // methods find    
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Iterator through seeds pseudo collection produced accordingly
+    // methods find    
+    ///////////////////////////////////////////////////////////////////
       
-      const SiSpacePointsSeed* next();
+    const SiSpacePointsSeed* next();
       
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
 
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
+    MsgStream&    dump          (MsgStream   & out) const;
+    std::ostream& dump          (std::ostream& out) const;
 
-    protected:
+  protected:
       
       
-  /**    @name Disallow default instantiation, copy, assignment */
-  //@{
-  SiSpacePointsSeedMaker_HeavyIon() = delete;
-  SiSpacePointsSeedMaker_HeavyIon(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
-  SiSpacePointsSeedMaker_HeavyIon &operator=(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
-  //@}     
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_HeavyIon() = delete;
+    SiSpacePointsSeedMaker_HeavyIon(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
+    SiSpacePointsSeedMaker_HeavyIon &operator=(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
+    //@}     
       
-      ///////////////////////////////////////////////////////////////////
-      // Protected data and methods
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Protected data and methods
+    ///////////////////////////////////////////////////////////////////
       
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle ;
-      MagField::IMagFieldSvc*                m_fieldService {}      ;
-
-      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-      bool                        m_pixel  {}                       ;
-      bool                        m_sct    {}                       ;
-      bool                        m_endlist {}                      ;
-      bool                        m_useOverlap {}                   ;
-      bool                        m_trigger  {}                     ;
-      bool                        m_izvertex  {}                    ;
-      int                         m_outputlevel  {}                 ;
-      int                         m_nprint  {}                      ;
-      int                         m_state {}                        ;
-      int                         m_nspoint {}                      ;
-      int                         m_mode   {}                       ;
-      int                         m_nlist  {}                       ;
-      int                         m_maxsize  {}                     ;
-      unsigned int                m_maxNumberVertices  {}           ;
-      float                       m_r1min{}, m_r1minv {}              ;
-      float                       m_r1max{}, m_r1maxv   {}            ;
-      float                       m_r2min{}, m_r2minv {}              ;
-      float                       m_r2max{}, m_r2maxv {}              ;
-      float                       m_r3min{}                         ;
-      float                       m_r3max{}                         ;
-      float                       m_drmin{}, m_drminv {}              ;
-      float                       m_drmax{}                         ;
-      float                       m_rapcut {}                       ;
-      float                       m_dzdrmin{}                       ;
-      float                       m_dzdrmax {}                      ;
-      float                       m_zmin{}                          ;
-      float                       m_zmax {}                         ;
-      float                       m_zminU  {}                       ;
-      float                       m_zmaxU  {}                       ;
-      float                       m_ftrig {}                        ;
-      float                       m_ftrigW {}                       ;
-      float                       m_r_rmax {}                       ;
-      float                       m_r_rstep  {}                     ;
-      float                       m_dzver  {}                       ;
-      float                       m_dzdrver {}                      ;
-      float                       m_diver   {}                      ;
-      float                       m_diverpps  {}                    ;
-      float                       m_diversss {}                     ;
-      float                       m_dazmax  {}                      ;
-      float                       m_ptmin  {}                       ;
-      float                       m_ipt   {}                        ;
-      float                       m_ipt2  {}                        ;
-      float                       m_COF {}                          ;
-      float                       m_K  {}                           ;
-      int m_r_size      {}                                            ;
-      int m_rf_size  {}                                               ;
-      int m_rfz_size  {}                                              ;
-      std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted  {}          ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
-      std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; 
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-      int m_ns{},m_nsaz{},m_nsazv {}                                    ;
-      int m_fNmax{},m_fvNmax {}                                       ;
-      int m_fNmin{},m_fvNmin    {}                                    ;
-      int m_zMin{}                                                  ;
-      int  m_nr{}     ; int* m_r_index{}   ; int* m_r_map{}                 ;
-      int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
-      int  m_nrfzv{}  , m_rfzv_index [300], m_rfzv_map [300]            ;
-      int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
-      int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
-      float m_sF{}                                                  ;
-      float m_sFv {}                                                ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Tables for 3 space points seeds search
-      ///////////////////////////////////////////////////////////////////
+    ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+    BooleanProperty m_pixel{this, "usePixel", true};
+    BooleanProperty m_sct{this, "useSCT", true};
+    bool                        m_endlist {true}                      ;
+    BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
+    bool                        m_trigger  {false}                     ;
+    bool                        m_izvertex  {}                    ;
+    int                         m_outputlevel  {}                 ;
+    int                         m_nprint  {}                      ;
+    int                         m_state {0}                        ;
+    int                         m_nspoint {2}                      ;
+    int                         m_mode   {0}                       ;
+    int                         m_nlist  {0}                       ;
+    IntegerProperty m_maxsize{this, "maxSize", 20000};
+    UnsignedIntegerProperty m_maxNumberVertices{this, "maxNumberVertices", 1};
+    FloatProperty m_r1min{this, "minRadius1", 0.};
+    FloatProperty m_r1minv{this, "minVRadius1", 0.};
+    FloatProperty m_r1max{this, "maxRadius1", 600.};
+    FloatProperty m_r1maxv{this, "maxVRadius1", 60.};
+    FloatProperty m_r2min{this, "minRadius2", 0.};
+    FloatProperty m_r2minv{this, "minVRadius2", 70.};
+    FloatProperty m_r2max{this, "maxRadius2", 600.};
+    FloatProperty m_r2maxv{this, "maxVRadius2", 200.};
+    FloatProperty m_r3min{this, "minRadius3", 0.};
+    FloatProperty m_r3max{this, "maxRadius3", 600.};
+    FloatProperty m_drmin{this, "mindRadius", 10.};
+    float m_drminv {20.}              ;
+    FloatProperty m_drmax{this, "maxdRadius", 270.};
+    FloatProperty m_rapcut{this, "RapidityCut", 2.7};
+    float                       m_dzdrmin{}                       ;
+    float                       m_dzdrmax {}                      ;
+    FloatProperty m_zmin{this, "minZ", -250.};
+    FloatProperty m_zmax{this, "maxZ", +250.};
+    float                       m_zminU  {}                       ;
+    float                       m_zmaxU  {}                       ;
+    float                       m_ftrig {}                        ;
+    float                       m_ftrigW {}                       ;
+    FloatProperty m_r_rmax{this, "radMax", 600.};
+    FloatProperty m_r_rstep{this, "radStep", 2.};
+    FloatProperty m_dzver{this, "maxdZver", 5.};
+    FloatProperty m_dzdrver{this, "maxdZdRver", 0.02};
+    FloatProperty m_diver{this, "maxdImpact", 10.};
+    FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7};
+    FloatProperty m_diversss{this, "maxdImpactSSS", 1000.};
+    float                       m_dazmax  {.02}                      ;
+    FloatProperty m_ptmin{this, "pTmin", 500.};
+    float                       m_ipt   {}                        ;
+    float                       m_ipt2  {}                        ;
+    float                       m_COF {}                          ;
+    float                       m_K  {}                           ;
+    int m_r_size      {}                                            ;
+    int m_rf_size  {}                                               ;
+    int m_rfz_size  {}                                              ;
+    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted  {nullptr}          ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
+
+    int m_ns{},m_nsaz{},m_nsazv {}                                    ;
+    int m_fNmax{},m_fvNmax {}                                       ;
+    int m_fNmin{},m_fvNmin    {}                                    ;
+    int m_zMin{}                                                  ;
+    int  m_nr{}     ; int* m_r_index{nullptr}   ; int* m_r_map{nullptr}                 ;
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
+    int  m_nrfzv{}  , m_rfzv_index [300], m_rfzv_map [300]            ;
+    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
+    int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
+    float m_sF{}                                                  ;
+    float m_sFv {}                                                ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Tables for 3 space points seeds search
+    ///////////////////////////////////////////////////////////////////
      
-      int    m_maxsizeSP {}                                         ;                    
-      InDet::SiSpacePointForSeed** m_SP  {}                         ;
-      float               *  m_Zo {}                                ; 
-      float               *  m_Tz {}                                ;
-      float               *  m_R  {}                                ;
-      float               *  m_U {}                                 ;
-      float               *  m_V  {}                                ;
-      float               *  m_Er {}                                ;
-
-      std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ; 
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
-
-      std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-      InDet::SiSpacePointsSeed*                      m_OneSeeds {}  ;
-      int                                            m_maxOneSize {};
-      int                                            m_nOneSeeds {} ;
-      std::list<float>                               m_l_vertex   ;
+    IntegerProperty m_maxsizeSP{this, "maxSizeSP", 4000};
+    InDet::SiSpacePointForSeed** m_SP  {nullptr}                         ;
+    float               *  m_Zo {nullptr}                                ;
+    float               *  m_Tz {nullptr}                                ;
+    float               *  m_R  {nullptr}                                ;
+    float               *  m_U {nullptr}                                 ;
+    float               *  m_V  {nullptr}                                ;
+    float               *  m_Er {nullptr}                                ;
+
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
+
+    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
+    InDet::SiSpacePointsSeed*                      m_OneSeeds {}  ;
+    IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 6};
+    int                                            m_nOneSeeds {} ;
+    std::list<float>                               m_l_vertex   ;
  
-      ///////////////////////////////////////////////////////////////////
-      // Beam geometry
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Beam geometry
+    ///////////////////////////////////////////////////////////////////
  
-      float m_xbeam[4];    // x,ax,ay,az - center and x-axis direction
-      float m_ybeam[4];    // y,ax,ay,az - center and y-axis direction
-      float m_zbeam[4];    // z,ax,ay,az - center and z-axis direction
-
-      ///////////////////////////////////////////////////////////////////
-      // Space points container
-      ///////////////////////////////////////////////////////////////////
-
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsSCT         ;
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsPixel       ;
-      SG::ReadHandle<SpacePointOverlapCollection> m_spacepointsOverlap     ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected methods
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void buildFrameWork()                                       ;
-      void buildBeamFrameWork()                                   ;
-
-      SiSpacePointForSeed* newSpacePoint
-	(const Trk::SpacePoint*const&)                            ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const float&)                                              ; 
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&)                      ;
-
-      void newOneSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&,const float&)         ;
-      void fillSeeds()                                            ;
-
-      void fillLists     ()                                       ;
-      void erase         ()                                       ;
-      void production2Sp ()                                       ;
-      void production3Sp ()                                       ;
-      void production3Sp
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&);
-      void production3SpTrigger
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&);
-     void production3SpNoVertex
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&);
-
-      bool newVertices(const std::list<Trk::Vertex>&)             ;
-      void findNext()                                             ;
-      bool isZCompatible     (float&,float&,float&)               ;
-      float dZVertexMin(float&)                                   ;
-      void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-   };
+    float m_xbeam[4]{0., 1., 0., 0.}; // x,ax,ay,az - center and x-axis direction
+    float m_ybeam[4]{0., 0., 1., 0.}; // y,ax,ay,az - center and y-axis direction
+    float m_zbeam[4]{0., 0., 0., 1.}; // z,ax,ay,az - center and z-axis direction
+
+    ///////////////////////////////////////////////////////////////////
+    // Space points container
+    ///////////////////////////////////////////////////////////////////
+
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected methods
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dumpConditions(MsgStream   & out) const;
+    MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+    void buildFrameWork()                                       ;
+    void buildBeamFrameWork()                                   ;
+
+    SiSpacePointForSeed* newSpacePoint
+    (const Trk::SpacePoint*const&)                            ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const float&)                                              ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&)                      ;
+
+    void newOneSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&,const float&)         ;
+    void fillSeeds()                                            ;
+
+    void fillLists     ()                                       ;
+    void erase         ()                                       ;
+    void production2Sp ()                                       ;
+    void production3Sp ()                                       ;
+    void production3Sp
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&);
+    void production3SpTrigger
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&);
+    void production3SpNoVertex
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&);
+
+    bool newVertices(const std::list<Trk::Vertex>&)             ;
+    void findNext()                                             ;
+    bool isZCompatible     (float&,float&,float&)               ;
+    float dZVertexMin(float&)                                   ;
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+  };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_HeavyIon&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_HeavyIon&); 
+  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_HeavyIon&);
 
   ///////////////////////////////////////////////////////////////////
   // Inline methods
   ///////////////////////////////////////////////////////////////////
 
   inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_HeavyIon::next()
-    {
-      if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
-      return(*m_i_seed++);
-    }
+  {
+    if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
+    return(*m_i_seed++);
+  }
 
   inline bool SiSpacePointsSeedMaker_HeavyIon::isZCompatible  
-    (float& Zv,float& R,float& T)
-    {
-      if(Zv < m_zmin || Zv > m_zmax) return false;
-      if(!m_izvertex               ) return true ;
+  (float& Zv,float& R,float& T)
+  {
+    if(Zv < m_zmin || Zv > m_zmax) return false;
+    if(!m_izvertex               ) return true ;
 
-      std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end(); 
+    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
 
-      float dZmin = fabs((*v)-Zv); ++v;
+    float dZmin = fabs((*v)-Zv); ++v;
 
-      for(; v!=ve; ++v) {
-	float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
-      }
-      return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+    for(; v!=ve; ++v) {
+      float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
     }
+    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+  }
 
   inline float SiSpacePointsSeedMaker_HeavyIon::dZVertexMin(float& Z)
-    {
-      float dZm = 1.E10;
-      std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+  {
+    float dZm = 1.E10;
+    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
 
-      for(; v!=ve; ++v) {float dZ = fabs((*v)-Z); if(dZ<dZm) dZm = dZ;}
-      return dZm;
-    }
+    for(; v!=ve; ++v) {float dZ = fabs((*v)-Z); if(dZ<dZm) dZm = dZ;}
+    return dZm;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline SiSpacePointForSeed* SiSpacePointsSeedMaker_HeavyIon::newSpacePoint
-    (const Trk::SpacePoint*const& sp) 
-    {
-      SiSpacePointForSeed* sps;
+  (const Trk::SpacePoint*const& sp) 
+  {
+    SiSpacePointForSeed* sps;
 
-      float r[3]; convertToBeamFrameWork(sp,r);
+    float r[3]; convertToBeamFrameWork(sp,r);
 
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r);
+    }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
+      m_i_spforseed = m_l_spforseed.end();
     }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 2 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_HeavyIon::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->setZVertex(double(z));
+    }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
+      m_i_seede = m_l_seeds.end();
     }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 3 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_HeavyIon::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const Trk::SpacePoint*& p3,const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->add       (p3); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const Trk::SpacePoint*& p3,const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->add       (p3);
+      s->setZVertex(double(z));
+    }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
+      m_i_seede = m_l_seeds.end();
     }
+  }
   
   ///////////////////////////////////////////////////////////////////
   // Fill seeds
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_HeavyIon::fillSeeds ()
-    {
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-	l  = m_mapOneSeeds.begin(),
-	le = m_mapOneSeeds.end  ();
-
-      for(; l!=le; ++l) {
-
-	if(m_i_seede!=m_l_seeds.end()) {
-	  SiSpacePointsSeed* s = (*m_i_seede++);
-	  *s = *(*l).second;
-	}
-	else                  {
-	  m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
-	  m_i_seede = m_l_seeds.end(); 
-	}
+  {
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
+      l  = m_mapOneSeeds.begin(),
+      le = m_mapOneSeeds.end  ();
+
+    for(; l!=le; ++l) {
+
+      if(m_i_seede!=m_l_seeds.end()) {
+        SiSpacePointsSeed* s = (*m_i_seede++);
+        *s = *(*l).second;
+      }
+      else                  {
+        m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
+        m_i_seede = m_l_seeds.end();
       }
     }
+  }
   
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_HeavyIon_H
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
old mode 100755
new mode 100644
index f5ded00128ac..291cb73ab189
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -16,25 +18,26 @@
 #ifndef SiSpacePointsSeedMaker_ITK_H
 #define SiSpacePointsSeedMaker_ITK_H
 
-
-#include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
-#include "TrkSpacePoint/SpacePointContainer.h" 
-#include "TrkSpacePoint/SpacePointOverlapCollection.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
 #include "BeamSpotConditionsData/BeamSpotData.h"
+#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h" 
+#include "TrkSpacePoint/SpacePointContainer.h" 
+#include "TrkSpacePoint/SpacePointOverlapCollection.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include <list>
-#include <vector>
 #include <map>
 #include <set>
 #include <iosfwd>
+#include <vector>
 
-class MsgStream   ;
-
+class MsgStream;
 
 namespace Trk {
   class IPRD_AssociationTool;
@@ -42,358 +45,362 @@ namespace Trk {
 
 namespace InDet {
 
-
   class SiSpacePointsSeedMaker_ITK : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiSpacePointsSeedMaker_ITK
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiSpacePointsSeedMaker_ITK();
-      virtual StatusCode               initialize();
-      virtual StatusCode               finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initialize tool for new event or region
-      ///////////////////////////////////////////////////////////////////
-
-      void newEvent (int);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiSpacePointsSeedMaker_ITK
+    (const std::string&,const std::string&,const IInterface*);
+    virtual ~SiSpacePointsSeedMaker_ITK();
+    virtual StatusCode               initialize();
+    virtual StatusCode               finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initialize tool for new event or region
+    ///////////////////////////////////////////////////////////////////
+
+    void newEvent (int);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with two space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find2Sp (const std::list<Trk::Vertex>&);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with three space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find3Sp (const std::list<Trk::Vertex>&);
-      void find3Sp (const std::list<Trk::Vertex>&,const double*);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with variable number space points with or without vertex constraint
-      // Variable means (2,3,4,....) any number space points
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with two space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find2Sp (const std::list<Trk::Vertex>&);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with three space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find3Sp (const std::list<Trk::Vertex>&);
+    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with variable number space points with or without vertex constraint
+    // Variable means (2,3,4,....) any number space points
+    ///////////////////////////////////////////////////////////////////
  
-      void findVSp (const std::list<Trk::Vertex>&);
+    void findVSp (const std::list<Trk::Vertex>&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Iterator through seeds pseudo collection produced accordingly
-      // methods find    
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Iterator through seeds pseudo collection produced accordingly
+    // methods find    
+    ///////////////////////////////////////////////////////////////////
       
-      const SiSpacePointsSeed* next();
+    const SiSpacePointsSeed* next();
       
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
 
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
+    MsgStream&    dump          (MsgStream   & out) const;
+    std::ostream& dump          (std::ostream& out) const;
 
-    protected:
+  protected:
       
-      ///////////////////////////////////////////////////////////////////
-      // Protected data and methods
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Protected data and methods
+    ///////////////////////////////////////////////////////////////////
   
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle ;
-      MagField::IMagFieldSvc*                m_fieldService{}       ;
+    ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
         
-      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-      bool                        m_pixel {}                        ;
-      bool                        m_sct  {}                         ;
-      bool                        m_endlist {}                      ;
-      bool                        m_useOverlap {}                   ;
-      bool                        m_useassoTool {}                  ;
-      bool                        m_trigger {}                      ;
-      bool                        m_checketa {}                     ;
-      bool                        m_isvertex {}                     ;
-      bool                        m_dbm   {}                        ;
-      int                         m_outputlevel  {}                 ;
-      int                         m_nprint   {}                     ;
-      int                         m_state    {}                     ;
-      int                         m_nspoint  {}                     ;
-      int                         m_mode     {}                     ;
-      int                         m_nlist     {}                    ;
-      int                         m_maxsize    {}                   ;
-      int                         m_iteration   {}                  ;
-      int                         m_iteration0    {}                ;
-      unsigned int                m_maxNumberVertices {}            ;
-      float                       m_etamin{}, m_etamax {}             ;
-      float                       m_r1min{}, m_r1minv {}              ;
-      float                       m_r1max{}, m_r1maxv {}              ;
-      float                       m_r2min{}, m_r2minv {}              ;
-      float                       m_r2max{}, m_r2maxv{}               ;
-      float                       m_r3min   {}                      ;
-      float                       m_r3max  {}                       ;
-      float                       m_drmin{}, m_drminv {}              ;
-      float                       m_drmax{}                         ;
-      float                       m_rapcut{}                        ;
-      float                       m_dzdrmin0 {}                     ;
-      float                       m_dzdrmax0 {}                     ;
-      float                       m_dzdrmin {}                      ;
-      float                       m_dzdrmax {}                      ;
-      float                       m_zmin {}                         ;
-      float                       m_zmax {}                         ;
-      float                       m_zminU {}                        ;
-      float                       m_zmaxU  {}                       ;
-      float                       m_zminB  {}                       ;
-      float                       m_zmaxB   {}                      ;
-      float                       m_ftrig    {}                     ;
-      float                       m_ftrigW  {}                      ;
-      float                       m_r_rmax  {}                      ;
-      float                       m_r_rmin  {}                      ;
-      float                       m_r_rstep {}                      ;
-      float                       m_dzver  {}                       ;
-      float                       m_dzdrver {}                      ;
-      float                       m_diver  {}                       ;
-      float                       m_diverpps {}                     ;
-      float                       m_diversss {}                     ;
-      float                       m_divermax {}                     ;
-      float                       m_dazmax {}                       ;
-      float                       m_ptmin  {}                       ;
-      float                       m_ipt    {}                       ;
-      float                       m_ipt2   {}                       ;
-      float                       m_COF    {}                       ;
-      float                       m_K      {}                       ;
-      float                       m_ipt2K   {}                      ;
-      float                       m_ipt2C   {}                      ;
-      float                       m_COFK   {}                       ;  
-      float                       m_umax    {}                      ;
-      float                       m_dzmaxPPP {}                     ;
-      int m_r_size {}                                               ;
-      int m_r_first  {}                                             ;
-      int m_rf_size  {}                                             ;
-      int m_rfz_size {}                                             ;
-      std::list<InDet::SiSpacePointForSeedITK*>* m_r_Sorted            ;
-      std::list<InDet::SiSpacePointForSeedITK*>  m_rfz_Sorted [   583] ;
-      std::list<InDet::SiSpacePointForSeedITK*>  m_rfzv_Sorted[   300] ;
-      std::list<InDet::SiSpacePointForSeedITK*>  m_l_spforseed         ;
-      std::list<InDet::SiSpacePointForSeedITK*>::iterator m_i_spforseed; 
-      std::list<InDet::SiSpacePointForSeedITK*>::iterator m_rMin  ;
-
-      int m_ns{},m_nsaz{},m_nsazv {}                                    ;
-      int m_fNmax{},m_fvNmax {}                                       ;
-      int m_fNmin{},m_fvNmin  {}                                      ;
-      int m_zMin{}                                                  ;
-      int  m_nr {}    ; int* m_r_index{}   ; int* m_r_map {}                ;
-      int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
-      int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300]            ;
-      int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
-      int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
-      float m_sF {}                                                 ;
-      float m_sFv {}                                                ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Tables for 3 space points seeds search
-      ///////////////////////////////////////////////////////////////////
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+    BooleanProperty m_pixel{this, "usePixel", true};
+    BooleanProperty m_sct{this, "useSCT", true};
+    bool                        m_endlist {true}                      ;
+    BooleanProperty m_useOverlap{this, "useOverlapSpCollection", true};
+    BooleanProperty m_useassoTool{this, "UseAssociationTool", false};
+    bool                        m_trigger {false}                      ;
+    BooleanProperty m_checketa{this, "checkEta", false};
+    bool                        m_isvertex {}                     ;
+    BooleanProperty m_dbm{this, "useDBM", false};
+    int                         m_outputlevel  {}                 ;
+    int                         m_nprint   {}                     ;
+    int                         m_state    {0}                     ;
+    int                         m_nspoint  {2}                     ;
+    int                         m_mode     {0}                     ;
+    int                         m_nlist     {0}                    ;
+    IntegerProperty m_maxsize{this, "maxSize", 50000};
+    int                         m_iteration   {}                  ;
+    int                         m_iteration0    {}                ;
+    UnsignedIntegerProperty m_maxNumberVertices{this, "maxNumberVertices", 99};
+    FloatProperty m_etamin{this, "etaMin", 0.};
+    FloatProperty m_etamax{this, "etaMax", 2.7};
+    FloatProperty m_r1min{this, "minRadius1", 0.};
+    FloatProperty m_r1minv{this, "minVRadius1", 0.};
+    FloatProperty m_r1max{this, "maxRadius1", 600.};
+    FloatProperty m_r1maxv{this, "maxVRadius1", 60.};
+    FloatProperty m_r2min{this, "minRadius2", 0.};
+    FloatProperty m_r2minv{this, "minVRadius2", 70.};
+    FloatProperty m_r2max{this, "maxRadius2", 600.};
+    FloatProperty m_r2maxv{this, "maxVRadius2", 200.};
+    FloatProperty m_r3min{this, "minRadius3", 0.};
+    FloatProperty m_r3max{this, "maxRadius3", 600.};
+    FloatProperty m_drmin{this, "mindRadius", 5.};
+    float m_drminv{20.};
+    FloatProperty m_drmax{this, "maxdRadius", 300.};
+    FloatProperty m_rapcut{this, "RapidityCut", 2.7};
+    float                       m_dzdrmin0 {}                     ;
+    float                       m_dzdrmax0 {}                     ;
+    float                       m_dzdrmin {}                      ;
+    float                       m_dzdrmax {}                      ;
+    FloatProperty m_zmin{this, "minZ", -250.};
+    FloatProperty m_zmax{this , "maxZ", +250.};
+    float                       m_zminU {}                        ;
+    float                       m_zmaxU  {}                       ;
+    float                       m_zminB  {}                       ;
+    float                       m_zmaxB   {}                      ;
+    float                       m_ftrig    {}                     ;
+    float                       m_ftrigW  {}                      ;
+    FloatProperty m_r_rmax{this, "radMax", 1100.};
+    FloatProperty m_r_rmin{this, "radMin", 0.};
+    FloatProperty m_r_rstep{this, "radStep", 2.};
+    FloatProperty m_dzver{this, "maxdZver", 5.};
+    FloatProperty m_dzdrver{this, "maxdZdRver", 0.02};
+    FloatProperty m_diver{this, "maxdImpact", 10.};
+    FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7};
+    FloatProperty m_diversss{this, "maxdImpactSSS", 20.};
+    FloatProperty m_divermax{this, "maxdImpactForDecays", 20.};
+    float                       m_dazmax{0.02};
+    FloatProperty m_ptmin{this, "pTmin", 500.};
+    float                       m_ipt    {}                       ;
+    float                       m_ipt2   {}                       ;
+    float                       m_COF    {}                       ;
+    float                       m_K      {}                       ;
+    float                       m_ipt2K   {}                      ;
+    float                       m_ipt2C   {}                      ;
+    float                       m_COFK   {}                       ;
+    FloatProperty m_umax{this, "minSeedsQuality", 0.};
+    FloatProperty m_dzmaxPPP{this, "dZmaxForPPPSeeds", 600.};
+    int m_r_size {}                                               ;
+    int m_r_first  {}                                             ;
+    int m_rf_size  {}                                             ;
+    int m_rfz_size {}                                             ;
+    std::list<InDet::SiSpacePointForSeedITK*>* m_r_Sorted{nullptr};
+    std::list<InDet::SiSpacePointForSeedITK*>  m_rfz_Sorted [   583] ;
+    std::list<InDet::SiSpacePointForSeedITK*>  m_rfzv_Sorted[   300] ;
+    std::list<InDet::SiSpacePointForSeedITK*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeedITK*>::iterator m_i_spforseed;
+    std::list<InDet::SiSpacePointForSeedITK*>::iterator m_rMin  ;
+
+    int m_ns{},m_nsaz{},m_nsazv {}                                    ;
+    int m_fNmax{},m_fvNmax {}                                       ;
+    int m_fNmin{},m_fvNmin  {}                                      ;
+    int m_zMin{}                                                  ;
+    int  m_nr {}    ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
+    int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300]            ;
+    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
+    int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
+    float m_sF {}                                                 ;
+    float m_sFv {}                                                ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Tables for 3 space points seeds search
+    ///////////////////////////////////////////////////////////////////
      
-      int    m_maxsizeSP {}                                         ;                    
-      InDet::SiSpacePointForSeedITK** m_SP {}                       ;
-      float               *  m_Zo   {}                              ; 
-      float               *  m_Tz   {}                              ;
-      float               *  m_R   {}                               ;
-      float               *  m_U   {}                               ;
-      float               *  m_V    {}                              ;
-      float               *  m_X    {}                              ;
-      float               *  m_Y    {}                              ;
-      float               *  m_Er   {}                              ;
-
-      InDet::SiSpacePointsSeed* m_seedOutput  {}                    ;
-
-      std::list<InDet::SiSpacePointsProSeedITK*>           m_l_seeds;
-      std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seed ; 
-      std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seede ;
-
-      std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_seeds          ;
-      std::multimap<float,InDet::SiSpacePointsProSeedITK*>::iterator m_seed ;
-
-      std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_mapOneSeeds;
-      InDet::SiSpacePointsProSeedITK*                      m_OneSeeds {}  ;
-      int                                               m_maxOneSize{} ;
-      int                                               m_nOneSeeds {} ;
-      int                                               m_fillOneSeeds{};
-      std::set<float>                                   m_l_vertex     ;
-      std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>> m_CmSp; 
-
-      ///////////////////////////////////////////////////////////////////
-      // Beam geometry
-      ///////////////////////////////////////////////////////////////////
+    IntegerProperty m_maxsizeSP{this, "maxSizeSP", 5000};
+    InDet::SiSpacePointForSeedITK** m_SP{nullptr};
+    float               *  m_Zo{nullptr};
+    float               *  m_Tz{nullptr};
+    float               *  m_R{nullptr};
+    float               *  m_U{nullptr};
+    float               *  m_V{nullptr};
+    float               *  m_X{nullptr};
+    float               *  m_Y{nullptr};
+    float               *  m_Er{nullptr};
+
+    InDet::SiSpacePointsSeed* m_seedOutput{nullptr};
+
+    std::list<InDet::SiSpacePointsProSeedITK*>           m_l_seeds;
+    std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seed ;
+    std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seede ;
+
+    std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_seeds          ;
+    std::multimap<float,InDet::SiSpacePointsProSeedITK*>::iterator m_seed ;
+
+    std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_mapOneSeeds;
+    InDet::SiSpacePointsProSeedITK*                   m_OneSeeds{nullptr};
+    IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 5};
+    int                                               m_nOneSeeds {} ;
+    int                                               m_fillOneSeeds{};
+    std::set<float>                                   m_l_vertex     ;
+    std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>> m_CmSp;
+
+    ///////////////////////////////////////////////////////////////////
+    // Beam geometry
+    ///////////////////////////////////////////////////////////////////
  
-      float m_xbeam[4];    // x,ax,ay,az - center and x-axis direction
-      float m_ybeam[4];    // y,ax,ay,az - center and y-axis direction
-      float m_zbeam[4];    // z,ax,ay,az - center and z-axis direction
-
-      ///////////////////////////////////////////////////////////////////
-      // Space points container
-      ///////////////////////////////////////////////////////////////////
-
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsSCT         ;
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsPixel       ;
-      SG::ReadHandle<SpacePointOverlapCollection> m_spacepointsOverlap     ;
-
-      ToolHandle<Trk::IPRD_AssociationTool>  m_assoTool           ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected methods
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void buildFrameWork()                                       ;
-      void buildBeamFrameWork()                                   ;
-
-      SiSpacePointForSeedITK* newSpacePoint
-	(const Trk::SpacePoint*const&)                            ;
-      void newSeed
-      (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float)         ; 
-
-      void newOneSeed
-	(SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,
-	 SiSpacePointForSeedITK*&,float,float)                       ;
-
-      void newOneSeedWithCurvaturesComparison
-	(SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float);
-
-      void fillSeeds()                                            ;
-      void fillLists     ()                                       ;
-      void erase         ()                                       ;
-      void production2Sp ()                                       ;
-      void production3Sp ()                                       ;
-      void production3SpSSS
-	(std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 int,int,int&);
-      void production3SpPPP
-	(std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 int,int,int&);
-      void production3SpTrigger
-	(std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
-	 int,int,int&);
+    float m_xbeam[4]{0., 1., 0., 0,}; // x,ax,ay,az - center and x-axis direction
+    float m_ybeam[4]{0., 0., 1., 0.}; // y,ax,ay,az - center and y-axis direction
+    float m_zbeam[4]{0., 0., 0., 1.}; // z,ax,ay,az - center and z-axis direction
+
+    ///////////////////////////////////////////////////////////////////
+    // Space points container
+    ///////////////////////////////////////////////////////////////////
+
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+
+    PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected methods
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dumpConditions(MsgStream   & out) const;
+    MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+    void buildFrameWork()                                       ;
+    void buildBeamFrameWork()                                   ;
+
+    SiSpacePointForSeedITK* newSpacePoint
+    (const Trk::SpacePoint*const&)                            ;
+    void newSeed
+    (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float)         ;
+
+    void newOneSeed
+    (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,
+     SiSpacePointForSeedITK*&,float,float)                       ;
+
+    void newOneSeedWithCurvaturesComparison
+    (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float);
+
+    void fillSeeds()                                            ;
+    void fillLists     ()                                       ;
+    void erase         ()                                       ;
+    void production2Sp ()                                       ;
+    void production3Sp ()                                       ;
+    void production3SpSSS
+    (std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     int,int,int&);
+    void production3SpPPP
+    (std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     int,int,int&);
+    void production3SpTrigger
+    (std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
+     int,int,int&);
  
-      bool newVertices(const std::list<Trk::Vertex>&)             ;
-      void findNext()                                             ;
-      bool isZCompatible     (float&,float&,float&)               ;
-      void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-      bool isUsed(const Trk::SpacePoint*); 
+    bool newVertices(const std::list<Trk::Vertex>&)             ;
+    void findNext()                                             ;
+    bool isZCompatible     (float&,float&,float&)               ;
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    bool isUsed(const Trk::SpacePoint*);
    
-   };
+  };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_ITK&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_ITK&); 
+  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_ITK&);
 
   ///////////////////////////////////////////////////////////////////
   // Inline methods
   ///////////////////////////////////////////////////////////////////
 
   inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_ITK::next()
-    {
-      if(m_nspoint==3) {
-	do {
-	  if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} ++m_i_seed;
-	} 
-	while(!(*m_seed++).second->set3(*m_seedOutput));
-	return(m_seedOutput);	
-      }
-      else             {
-	if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
-	(*m_i_seed++)->set2(*m_seedOutput); return(m_seedOutput);
-      }
-      return 0;
+  {
+    if(m_nspoint==3) {
+      do {
+        if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} ++m_i_seed;
+      } 
+      while(!(*m_seed++).second->set3(*m_seedOutput));
+      return(m_seedOutput);
+    }
+    else             {
+      if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
+      (*m_i_seed++)->set2(*m_seedOutput); return(m_seedOutput);
     }
+    return 0;
+  }
   
 
   inline bool SiSpacePointsSeedMaker_ITK::isZCompatible  
-    (float& Zv,float& R,float& T)
-    {
-      if(Zv < m_zminU || Zv > m_zmaxU) return false;
-      if(!m_isvertex) return true;
-
-      std::set<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end(); 
-
-      float dZmin = fabs((*v)-Zv); 
-      for(++v; v!=ve; ++v) {
-	float dZ = fabs((*v)-Zv); if(dZ >= dZmin) break; dZmin=dZ;
-      }
-      return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+  (float& Zv,float& R,float& T)
+  {
+    if(Zv < m_zminU || Zv > m_zmaxU) return false;
+    if(!m_isvertex) return true;
+
+    std::set<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+
+    float dZmin = fabs((*v)-Zv);
+    for(++v; v!=ve; ++v) {
+      float dZ = fabs((*v)-Zv); if(dZ >= dZmin) break; dZmin=dZ;
     }
+    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline SiSpacePointForSeedITK* SiSpacePointsSeedMaker_ITK::newSpacePoint
-    (const Trk::SpacePoint*const& sp) 
-    {
-      SiSpacePointForSeedITK* sps;
-
-      float r[15]; convertToBeamFrameWork(sp,r);
-
-      if(m_checketa) {
-
-	float z = (fabs(r[2])+m_zmax);
-	float x = r[0]*m_dzdrmin     ;
-	float y = r[1]*m_dzdrmin     ;
-	if((z*z )<(x*x+y*y)) return 0;
-      }
-
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeedITK(sp,r)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+  (const Trk::SpacePoint*const& sp) 
+  {
+    SiSpacePointForSeedITK* sps;
+
+    float r[15]; convertToBeamFrameWork(sp,r);
+
+    if(m_checketa) {
+
+      float z = (fabs(r[2])+m_zmax);
+      float x = r[0]*m_dzdrmin     ;
+      float y = r[1]*m_dzdrmin     ;
+      if((z*z )<(x*x+y*y)) return 0;
+    }
+
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r);
     }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeedITK(sp,r)));
+      m_i_spforseed = m_l_spforseed.end();
+    }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 2 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_ITK::newSeed
-    (SiSpacePointForSeedITK*& p1,SiSpacePointForSeedITK*& p2, float z) 
-    {
-      SiSpacePointForSeedITK* p3 = 0;
-
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsProSeedITK* s = (*m_i_seede++);
-	s->set(p1,p2,p3,z);
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsProSeedITK(p1,p2,p3,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (SiSpacePointForSeedITK*& p1,SiSpacePointForSeedITK*& p2, float z) 
+  {
+    SiSpacePointForSeedITK* p3 = 0;
+
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsProSeedITK* s = (*m_i_seede++);
+      s->set(p1,p2,p3,z);
+    }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsProSeedITK(p1,p2,p3,z));
+      m_i_seede = m_l_seeds.end();
     }
+  }
   
 } // end of name space
 
@@ -412,4 +419,3 @@ public:
 };
 
 #endif // SiSpacePointsSeedMaker_ITK_H
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
old mode 100755
new mode 100644
index 2d180da3c9b8..5367b650a3b5
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -16,376 +18,374 @@
 #ifndef SiSpacePointsSeedMaker_LowMomentum_H
 #define SiSpacePointsSeedMaker_LowMomentum_H
 
+#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 
-#include "GaudiKernel/ServiceHandle.h"
+#include "BeamSpotConditionsData/BeamSpotData.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include <list>
 #include <map>
 #include <vector>
 
-class MsgStream   ;
+class MsgStream;
 
 namespace Trk {
-  class IPRD_AssociationTool; 
+  class IPRD_AssociationTool;
 }
 
 namespace InDet {
 
-
   class SiSpacePointsSeedMaker_LowMomentum : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiSpacePointsSeedMaker_LowMomentum
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiSpacePointsSeedMaker_LowMomentum();
-      virtual StatusCode               initialize();
-      virtual StatusCode               finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initialize tool for new event or region
-      ///////////////////////////////////////////////////////////////////
-
-      void newEvent (int);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiSpacePointsSeedMaker_LowMomentum
+    (const std::string&,const std::string&,const IInterface*);
+    virtual ~SiSpacePointsSeedMaker_LowMomentum();
+    virtual StatusCode               initialize();
+    virtual StatusCode               finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initialize tool for new event or region
+    ///////////////////////////////////////////////////////////////////
+
+    void newEvent (int);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
+    void newRegion
+    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
        
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with two space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find2Sp (const std::list<Trk::Vertex>&);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with three space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find3Sp (const std::list<Trk::Vertex>&);
-      void find3Sp (const std::list<Trk::Vertex>&,const double*);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with variable number space points with or without vertex constraint
-      // Variable means (2,3,4,....) any number space points
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with two space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find2Sp (const std::list<Trk::Vertex>&);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with three space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find3Sp (const std::list<Trk::Vertex>&);
+    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with variable number space points with or without vertex constraint
+    // Variable means (2,3,4,....) any number space points
+    ///////////////////////////////////////////////////////////////////
  
-      void findVSp (const std::list<Trk::Vertex>&);
+    void findVSp (const std::list<Trk::Vertex>&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Iterator through seeds pseudo collection produced accordingly
-      // methods find    
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Iterator through seeds pseudo collection produced accordingly
+    // methods find    
+    ///////////////////////////////////////////////////////////////////
       
-      const SiSpacePointsSeed* next();
+    const SiSpacePointsSeed* next();
       
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
 
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
+    MsgStream&    dump          (MsgStream   & out) const;
+    std::ostream& dump          (std::ostream& out) const;
 
-    protected:
+  protected:
     
     
-        /**    @name Disallow default instantiation, copy, assignment */
-  //@{
-  SiSpacePointsSeedMaker_LowMomentum() = delete;
-  SiSpacePointsSeedMaker_LowMomentum(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
-  SiSpacePointsSeedMaker_LowMomentum &operator=(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
-  //@}    
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_LowMomentum() = delete;
+    SiSpacePointsSeedMaker_LowMomentum(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
+    SiSpacePointsSeedMaker_LowMomentum &operator=(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
+    //@}    
       
-      ///////////////////////////////////////////////////////////////////
-      // Protected data and methods
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Protected data and methods
+    ///////////////////////////////////////////////////////////////////
       
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle ;
-      MagField::IMagFieldSvc*                m_fieldService {}      ;
-
-      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-      bool                        m_pixel  {}                       ;
-      bool                        m_sct    {}                       ;
-      bool                        m_endlist  {}                     ;
-      bool                        m_useOverlap  {}                  ;
-      bool                        m_useassoTool {}                  ;
-      bool                        m_trigger  {}                     ;
-      int                         m_outputlevel  {}                 ;
-      int                         m_nprint {}                       ;
-      int                         m_state  {}                       ;
-      int                         m_nspoint  {}                     ;
-      int                         m_mode   {}                       ;
-      int                         m_nlist  {}                       ;
-      int                         m_maxsize {}                      ;
-      float                       m_r1min   {}                      ;
-      float                       m_r1max   {}                      ;
-      float                       m_r2min   {}                      ;
-      float                       m_r2max   {}                      ;
-      float                       m_r3min   {}                      ;
-      float                       m_r3max   {}                      ;
-      float                       m_drmin    {}                     ;
-      float                       m_drmax    {}                     ;
-      float                       m_rapcut   {}                     ;
-      float                       m_dzdrmin  {}                     ;
-      float                       m_dzdrmax  {}                     ;
-      float                       m_zmin    {}                      ;
-      float                       m_zmax     {}                     ;
-      float                       m_zminU   {}                      ;
-      float                       m_zmaxU   {}                      ;
-      float                       m_r_rmax   {}                     ;
-      float                       m_r_rstep  {}                     ;
-      float                       m_dzver    {}                     ;
-      float                       m_dzdrver {}                      ;
-      float                       m_diver   {}                      ;
-      float                       m_diverpps  {}                    ;
-      float                       m_dazmax   {}                     ;
-      float                       m_ptmin    {}                     ;
-      float                       m_ptmax    {}                     ;
-      float                       m_iptmin   {}                     ;
-      float                       m_iptmax   {}                     ;
-
-      int m_r_size   {}                                               ;
-      int m_rf_size   {}                                              ;
-      int m_rfz_size   {}                                             ;
-      std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted            ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [  220]  ;
-      std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; 
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
+    ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+    BooleanProperty m_pixel{this, "usePixel", true};
+    BooleanProperty m_sct{this, "useSCT", true};
+    bool m_endlist{true};
+    BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
+    BooleanProperty m_useassoTool{this, "UseAssociationTool", true};
+    bool                        m_trigger  {}                     ;
+    int                         m_outputlevel  {}                 ;
+    int                         m_nprint {}                       ;
+    int m_state{0};
+    int m_nspoint{2};
+    int m_mode{0};
+    int m_nlist{0};
+    IntegerProperty m_maxsize{this, "maxSize", 2000};
+    FloatProperty m_r1min{this, "minRadius1", 0.};
+    FloatProperty m_r1max{this, "maxRadius1", 600.};
+    FloatProperty m_r2min{this, "minRadius2", 0.};
+    FloatProperty m_r2max{this, "maxRadius2", 600.};
+    FloatProperty m_r3min{this, "minRadius3", 0.};
+    FloatProperty m_r3max{this, "maxRadius3", 600.};
+    FloatProperty m_drmin{this, "mindRadius", 10.};
+    FloatProperty m_drmax{this, "maxdRadius", 200.};
+    FloatProperty m_rapcut{this, "RapidityCut", 2.7};
+    float                       m_dzdrmin  {}                     ;
+    float                       m_dzdrmax  {}                     ;
+    FloatProperty m_zmin{this, "minZ", -250.};
+    FloatProperty m_zmax{this, "maxZ", +250.};
+    float                       m_zminU   {}                      ;
+    float                       m_zmaxU   {}                      ;
+    FloatProperty m_r_rmax{this, "radMax", 200.};
+    FloatProperty m_r_rstep{this, "radStep", 2.};
+    FloatProperty m_dzver{this, "maxdZver", 5.};
+    FloatProperty m_dzdrver{this, "maxdZdRver", 0.02};
+    FloatProperty m_diver{this, "maxdImpact", 7.};
+    FloatProperty m_diverpps{this, "maxdImpactPPS", 1.2};
+    float                       m_dazmax{0.02};
+    FloatProperty m_ptmin{this, "pTmin", 100.};
+    FloatProperty m_ptmax{this, "pTmax", 500.};
+    float                       m_iptmin   {}                     ;
+    float                       m_iptmax{1./400.};
+
+    int m_r_size   {}                                               ;
+    int m_rf_size   {}                                              ;
+    int m_rfz_size   {}                                             ;
+    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [  220]  ;
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
   
-      int m_ns{},m_nsaz  {}                                           ;
-      int m_fNmax  {}                                               ;
-      int m_fNmin  {}                                               ;
-      int m_zMin  {}                                                ;
-      int  m_nr  {}   ; int* m_r_index {}  ; int* m_r_map  {}               ;
-      int  m_nrfz {}  , m_rfz_index  [220], m_rfz_map  [220]            ;
-      int m_rfz_b[220],m_rfz_t[220],m_rfz_ib[220][9],m_rfz_it[220][9]     ;
-      float m_sF {}                                                ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Tables for 3 space points seeds search
-      ///////////////////////////////////////////////////////////////////
+    int m_ns{},m_nsaz  {}                                           ;
+    int m_fNmax  {}                                               ;
+    int m_fNmin  {}                                               ;
+    int m_zMin  {}                                                ;
+    int  m_nr  {}   ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [220], m_rfz_map  [220]            ;
+    int m_rfz_b[220],m_rfz_t[220],m_rfz_ib[220][9],m_rfz_it[220][9]     ;
+    float m_sF {}                                                ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Tables for 3 space points seeds search
+    ///////////////////////////////////////////////////////////////////
      
-      int                     m_maxsizeSP    {}                     ;                    
-      InDet::SiSpacePointForSeed** m_SP    {}                       ;
-      float                *  m_R    {}                             ;
-      float                *  m_Tz   {}                             ;
-      float                *  m_Er   {}                             ;
-      float                *  m_U    {}                             ;
-      float                *  m_V    {}                             ;
-      float                *  m_Zo    {}                            ; 
-
-      std::list<InDet::SiSpacePointsSeed*>           m_l_seeds      ;
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed       ; 
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede      ;
-
-      std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-      InDet::SiSpacePointsSeed*                       m_OneSeeds {} ;
-      int                                             m_maxOneSize{};
-      int                                             m_nOneSeeds {};
-      std::list<float>                                m_l_vertex  ;
+    IntegerProperty m_maxsizeSP{this, "maxSizeSP", 1500};
+    InDet::SiSpacePointForSeed** m_SP{nullptr};
+    float                *  m_R{nullptr};
+    float                *  m_Tz{nullptr};
+    float                *  m_Er{nullptr};
+    float                *  m_U{nullptr};
+    float                *  m_V{nullptr};
+    float                *  m_Zo{nullptr};
+
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds      ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed       ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede      ;
+
+    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
+    InDet::SiSpacePointsSeed*                       m_OneSeeds{nullptr};
+    IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 5};
+    int                                             m_nOneSeeds {};
+    std::list<float>                                m_l_vertex  ;
  
-      ///////////////////////////////////////////////////////////////////
-      // Beam geometry
-      ///////////////////////////////////////////////////////////////////
- 
-      float m_xbeam[4];    // x,ax,ay,az - center and x-axis direction
-      float m_ybeam[4];    // y,ax,ay,az - center and y-axis direction
-      float m_zbeam[4];    // z,ax,ay,az - center and z-axis direction
-
-      ///////////////////////////////////////////////////////////////////
-      // Space points container
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Beam geometry
+    ///////////////////////////////////////////////////////////////////
+    float m_xbeam[4]{0., 1., 0., 0.}; // x,ax,ay,az - center and x-axis direction
+    float m_ybeam[4]{0., 0., 1., 0.}; // y,ax,ay,az - center and y-axis direction
+    float m_zbeam[4]{0., 0., 0., 1.}; // z,ax,ay,az - center and z-axis direction
+
+    ///////////////////////////////////////////////////////////////////
+    // Space points container
+    ///////////////////////////////////////////////////////////////////
       
 
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsSCT         ;
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsPixel       ;
-      SG::ReadHandle<SpacePointOverlapCollection> m_spacepointsOverlap     ;
-
-      ToolHandle<Trk::IPRD_AssociationTool>  m_assoTool           ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected methods
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void buildFrameWork()                                       ;
-      void buildBeamFrameWork()                                   ;
-
-      SiSpacePointForSeed* newSpacePoint
-	(const Trk::SpacePoint*const&)                            ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const float&)                                              ;
-      void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&)                      ;
-
-      void newOneSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&,const float&)         ;
-      void fillSeeds()                                            ;
-
-      void fillLists     ()                                       ;
-      void erase         ()                                       ;
-      void production2Sp ()                                       ;
-      void production3Sp ()                                       ;
-      void production3Sp
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&,float)                                      ;
-			  
-      bool newVertices(const std::list<Trk::Vertex>&)             ;
-      void findNext()                                             ;
-      bool isZCompatible     (float&,float&,float&)               ;
-      void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-      bool isUsed(const Trk::SpacePoint*); 
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+
+    PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected methods
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dumpConditions(MsgStream   & out) const;
+    MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+    void buildFrameWork()                                       ;
+    void buildBeamFrameWork()                                   ;
+
+    SiSpacePointForSeed* newSpacePoint
+    (const Trk::SpacePoint*const&)                            ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const float&)                                              ;
+    void newSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&)                      ;
+
+    void newOneSeed
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&,const float&)         ;
+    void fillSeeds()                                            ;
+
+    void fillLists     ()                                       ;
+    void erase         ()                                       ;
+    void production2Sp ()                                       ;
+    void production3Sp ()                                       ;
+    void production3Sp
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&,float)                                      ;
+     
+    bool newVertices(const std::list<Trk::Vertex>&)             ;
+    void findNext()                                             ;
+    bool isZCompatible     (float&,float&,float&)               ;
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    bool isUsed(const Trk::SpacePoint*);
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_LowMomentum&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_LowMomentum&); 
+  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_LowMomentum&);
 
   ///////////////////////////////////////////////////////////////////
   // Inline methods
   ///////////////////////////////////////////////////////////////////
 
   inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_LowMomentum::next()
-    {
-      if(m_i_seed==m_i_seede) {
-	findNext(); 
-	if(m_i_seed==m_i_seede) return 0;
-      } 
-      return(*m_i_seed++);
-    }
+  {
+    if(m_i_seed==m_i_seede) {
+      findNext();
+      if(m_i_seed==m_i_seede) return 0;
+    } 
+    return(*m_i_seed++);
+  }
 
   inline bool SiSpacePointsSeedMaker_LowMomentum::isZCompatible  
-    (float& Zv,float& R,float& T)
-    {
-      if(Zv < m_zmin || Zv > m_zmax) return false;
+  (float& Zv,float& R,float& T)
+  {
+    if(Zv < m_zmin || Zv > m_zmax) return false;
 
-      std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end(); 
-      if(v==ve) return true;      
+    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+    if(v==ve) return true;
 
-      float dZmin = fabs((*v)-Zv); ++v;
+    float dZmin = fabs((*v)-Zv); ++v;
 
-      for(; v!=ve; ++v) {
-	float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
-      }
-      return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+    for(; v!=ve; ++v) {
+      float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
     }
+    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+  }
   
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline SiSpacePointForSeed* SiSpacePointsSeedMaker_LowMomentum::newSpacePoint
-    (const Trk::SpacePoint*const& sp) 
-    {
-      SiSpacePointForSeed* sps;
+  (const Trk::SpacePoint*const& sp) 
+  {
+    SiSpacePointForSeed* sps;
 
-      float r[3]; convertToBeamFrameWork(sp,r);
+    float r[3]; convertToBeamFrameWork(sp,r);
 
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r);
     }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
+      m_i_spforseed = m_l_spforseed.end();
+    }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 2 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_LowMomentum::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->setZVertex(double(z));
     }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
+      m_i_seede = m_l_seeds.end();
+    }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 3 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_LowMomentum::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const Trk::SpacePoint*& p3,const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->add       (p3); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+   const Trk::SpacePoint*& p3,const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->add       (p3);
+      s->setZVertex(double(z));
     }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
+      m_i_seede = m_l_seeds.end();
+    }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // Fill seeds
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_LowMomentum::fillSeeds ()
-    {
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-	l  = m_mapOneSeeds.begin(),
-	le = m_mapOneSeeds.end  ();
-
-      for(; l!=le; ++l) {
-
-	if(m_i_seede!=m_l_seeds.end()) {
-	  SiSpacePointsSeed* s = (*m_i_seede++);
-	  *s = *(*l).second;
-	}
-	else                  {
-	  m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
-	  m_i_seede = m_l_seeds.end(); 
-	}
+  {
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
+      l  = m_mapOneSeeds.begin(),
+      le = m_mapOneSeeds.end  ();
+
+    for(; l!=le; ++l) {
+
+      if(m_i_seede!=m_l_seeds.end()) {
+        SiSpacePointsSeed* s = (*m_i_seede++);
+        *s = *(*l).second;
+      }
+      else                  {
+        m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
+        m_i_seede = m_l_seeds.end();
       }
     }
+  }
   
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_LowMomentum_H
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
old mode 100755
new mode 100644
index 3c8fab6d6f8c..f2ce863faa03
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -16,301 +18,306 @@
 #ifndef SiSpacePointsSeedMaker_Trigger_H
 #define SiSpacePointsSeedMaker_Trigger_H
 
+#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 
-#include "GaudiKernel/ServiceHandle.h"
+#include "BeamSpotConditionsData/BeamSpotData.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include <list>
-#include <vector>
 #include <map>
-class MsgStream   ;
+#include <vector>
 
-namespace InDet {
+class MsgStream;
 
+namespace InDet {
 
   class SiSpacePointsSeedMaker_Trigger : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
-    {
-      ///////////////////////////////////////////////////////////////////
-      // Public methods:
-      ///////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    // Public methods:
+    ///////////////////////////////////////////////////////////////////
       
-    public:
+  public:
       
-      ///////////////////////////////////////////////////////////////////
-      // Standard tool methods
-      ///////////////////////////////////////////////////////////////////
-
-      SiSpacePointsSeedMaker_Trigger
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiSpacePointsSeedMaker_Trigger();
-      virtual StatusCode               initialize();
-      virtual StatusCode               finalize  ();
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initialize tool for new event or region
-      ///////////////////////////////////////////////////////////////////
-
-      void newEvent (int);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-      void newRegion
-	(const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    ///////////////////////////////////////////////////////////////////
+    // Standard tool methods
+    ///////////////////////////////////////////////////////////////////
+
+    SiSpacePointsSeedMaker_Trigger
+      (const std::string&,const std::string&,const IInterface*);
+    virtual ~SiSpacePointsSeedMaker_Trigger();
+    virtual StatusCode               initialize();
+    virtual StatusCode               finalize  ();
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initialize tool for new event or region
+    ///////////////////////////////////////////////////////////////////
+
+    void newEvent (int);
+    void newRegion
+      (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
+    void newRegion
+      (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with two space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find2Sp (const std::list<Trk::Vertex>&);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with three space points with or without vertex constraint
-      ///////////////////////////////////////////////////////////////////
-
-      void find3Sp (const std::list<Trk::Vertex>&);
-      void find3Sp (const std::list<Trk::Vertex>&,const double*);
-
-      ///////////////////////////////////////////////////////////////////
-      // Methods to initilize different strategies of seeds production
-      // with variable number space points with or without vertex constraint
-      // Variable means (2,3,4,....) any number space points
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with two space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find2Sp (const std::list<Trk::Vertex>&);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with three space points with or without vertex constraint
+    ///////////////////////////////////////////////////////////////////
+
+    void find3Sp (const std::list<Trk::Vertex>&);
+    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+
+    ///////////////////////////////////////////////////////////////////
+    // Methods to initilize different strategies of seeds production
+    // with variable number space points with or without vertex constraint
+    // Variable means (2,3,4,....) any number space points
+    ///////////////////////////////////////////////////////////////////
  
-      void findVSp (const std::list<Trk::Vertex>&);
+    void findVSp (const std::list<Trk::Vertex>&);
       
-      ///////////////////////////////////////////////////////////////////
-      // Iterator through seeds pseudo collection produced accordingly
-      // methods find    
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Iterator through seeds pseudo collection produced accordingly
+    // methods find    
+    ///////////////////////////////////////////////////////////////////
       
-      const SiSpacePointsSeed* next();
+    const SiSpacePointsSeed* next();
       
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dump          (MsgStream   & out) const;
-      std::ostream& dump          (std::ostream& out) const;
-
-    protected:
-        /**    @name Disallow default instantiation, copy, assignment */
-  //@{
-  SiSpacePointsSeedMaker_Trigger() = delete;
-  SiSpacePointsSeedMaker_Trigger(const SiSpacePointsSeedMaker_Trigger&) = delete;
-  SiSpacePointsSeedMaker_Trigger &operator=(const SiSpacePointsSeedMaker_Trigger&) = delete;
-  //@}
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected data and methods
-      ///////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    // Print internal tool parameters and status
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dump          (MsgStream   & out) const;
+    std::ostream& dump          (std::ostream& out) const;
+
+  protected:
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_Trigger() = delete;
+    SiSpacePointsSeedMaker_Trigger(const SiSpacePointsSeedMaker_Trigger&) = delete;
+    SiSpacePointsSeedMaker_Trigger &operator=(const SiSpacePointsSeedMaker_Trigger&) = delete;
+    //@}
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected data and methods
+    ///////////////////////////////////////////////////////////////////
       
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle ;
-      MagField::IMagFieldSvc*                m_fieldService  {}     ;
-
-      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-      bool                        m_pixel  {}                       ;
-      bool                        m_sct    {}                       ;
-      bool                        m_endlist  {}                     ;
-      bool                        m_useOverlap  {}                  ;
-      bool                        m_trigger   {}                    ;
-      int                         m_outputlevel {}                  ;
-      int                         m_nprint   {}                     ;
-      int                         m_state   {}                      ;
-      int                         m_nspoint  {}                     ;
-      int                         m_mode  {}                        ;
-      int                         m_nlist  {}                       ;
-      int                         m_maxsize {}                      ;
-      unsigned int                m_maxNumberVertices  {}           ;
-      float                       m_r1min{}, m_r1minv {}              ;
-      float                       m_r1max{}, m_r1maxv   {}            ;
-      float                       m_r2min{}, m_r2minv  {}             ;
-      float                       m_r2max{}, m_r2maxv {}              ;
-      float                       m_r3min  {}                       ;
-      float                       m_r3max  {}                       ;
-      float                       m_drmin{}, m_drminv {}              ;
-      float                       m_drmax     {}                    ;
-      float                       m_rapcut {}                       ;
-      float                       m_dzdrmin {}                      ;
-      float                       m_dzdrmax {}                      ;
-      float                       m_zmin  {}                        ;
-      float                       m_zmax  {}                        ;
-      float                       m_zminU {}                        ;
-      float                       m_zmaxU  {}                       ;
-      float                       m_zminB  {}                       ;
-      float                       m_zmaxB  {}                       ;
-      float                       m_ftrig  {}                       ;
-      float                       m_ftrigW {}                       ;
-      float                       m_r_rmax  {}                      ;
-      float                       m_r_rstep {}                      ;
-      float                       m_dzver   {}                      ;
-      float                       m_dzdrver {}                      ;
-      float                       m_diver    {}                     ;
-      float                       m_diverpps {}                     ;
-      float                       m_diversss {}                     ;
-      float                       m_dazmax   {}                     ;
-      float                       m_ptmin    {}                     ;
-      float                       m_ipt      {}                     ;
-      float                       m_ipt2     {}                     ;
-      float                       m_COF     {}                      ;
-      float                       m_K      {}                       ;
-      int m_r_size {}                                                 ;
-      int m_rf_size   {}                                              ;
-      int m_rfz_size  {}                                              ;
-      std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted            ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-      std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
-      std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; 
-      std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-      int m_ns{},m_nsaz{},m_nsazv   {}                                  ;
-      int m_fNmax{},m_fvNmax  {}                                      ;
-      int m_fNmin{},m_fvNmin{}                                        ;
-      int m_zMin  {}                                                ;
-      int  m_nr {}    ; int* m_r_index  {} ; int* m_r_map  {}               ;
-      int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
-      int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300]            ;
-      int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
-      int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
-      float m_sF {}                                                 ;
-      float m_sFv  {}                                               ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Tables for 3 space points seeds search
-      ///////////////////////////////////////////////////////////////////
+    ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+    BooleanProperty m_pixel{this, "usePixel", true};
+    BooleanProperty m_sct{this, "useSCT", true};
+    bool                        m_endlist{true};
+    BooleanProperty m_useOverlap{this, "useOverlapSpCollection", true};
+    bool                        m_trigger{false};
+    int                         m_outputlevel {}                  ;
+    int                         m_nprint   {}                     ;
+    int                         m_state{0};
+    int                         m_nspoint{2};
+    int                         m_mode{0};
+    int                         m_nlist{0};
+    IntegerProperty m_maxsize{this, "maxSize", 20000};
+    UnsignedIntegerProperty m_maxNumberVertices{this, "maxNumberVertices", 99};
+    FloatProperty m_r1min{this, "minRadius1", 0.};
+    FloatProperty m_r1minv{this, "minVRadius1", 0.};
+    FloatProperty m_r1max{this, "maxRadius1", 600.};
+    FloatProperty m_r1maxv{this, "maxVRadius1", 60.};
+    FloatProperty m_r2min{this, "minRadius2", 0.};
+    FloatProperty m_r2minv{this, "minVRadius2", 70.};
+    FloatProperty m_r2max{this, "maxRadius2", 600.};
+    FloatProperty m_r2maxv{this, "maxVRadius2", 200.};
+    FloatProperty m_r3min{this, "minRadius3", 0.};
+    FloatProperty m_r3max{this, "maxRadius3", 600.};
+    FloatProperty m_drmin{this, "mindRadius", 10.};
+    float m_drminv{20.};
+    FloatProperty m_drmax{this, "maxdRadius", 270.};
+    FloatProperty m_rapcut{this, "RapidityCut", 2.7};
+    float                       m_dzdrmin {}                      ;
+    float                       m_dzdrmax {}                      ;
+    FloatProperty m_zmin{this, "minZ", -250.};
+    FloatProperty m_zmax{this, "maxZ", +250.};
+    float                       m_zminU {}                        ;
+    float                       m_zmaxU  {}                       ;
+    float                       m_zminB  {}                       ;
+    float                       m_zmaxB  {}                       ;
+    float                       m_ftrig  {}                       ;
+    float                       m_ftrigW {}                       ;
+    FloatProperty m_r_rmax{this, "radMax", 600.};
+    FloatProperty m_r_rstep{this, "radStep", 2.};
+    FloatProperty m_dzver{this, "maxdZver", 5.};
+    FloatProperty m_dzdrver{this, "maxdZdRver", 0.02};
+    FloatProperty m_diver{this, "maxdImpact", 10.};
+    FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7};
+    FloatProperty m_diversss{this, "maxdImpactSSS", 1000.};
+    float                       m_dazmax{0.02};
+    FloatProperty m_ptmin{this, "pTmin", 500.};
+    float                       m_ipt      {}                     ;
+    float                       m_ipt2     {}                     ;
+    float                       m_COF     {}                      ;
+    float                       m_K      {}                       ;
+    int m_r_size {}                                                 ;
+    int m_rf_size   {}                                              ;
+    int m_rfz_size  {}                                              ;
+    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
+
+    int m_ns{},m_nsaz{},m_nsazv   {}                                  ;
+    int m_fNmax{},m_fvNmax  {}                                      ;
+    int m_fNmin{},m_fvNmin{}                                        ;
+    int m_zMin  {}                                                ;
+    int  m_nr {}    ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
+    int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300]            ;
+    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
+    int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
+    float m_sF {}                                                 ;
+    float m_sFv  {}                                               ;
+
+    ///////////////////////////////////////////////////////////////////
+    // Tables for 3 space points seeds search
+    ///////////////////////////////////////////////////////////////////
      
-      int    m_maxsizeSP   {}                                       ;                    
-      InDet::SiSpacePointForSeed** m_SP   {}                        ;
-      float               *  m_Zo    {}                             ; 
-      float               *  m_Tz   {}                              ;
-      float               *  m_R    {}                              ;
-      float               *  m_U    {}                              ;
-      float               *  m_V    {}                              ;
-      float               *  m_Er   {}                              ;
-
-      std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ; 
-      std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
-
-      std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-      std::multimap<float,InDet::SiSpacePointsSeed*> m_mapSeeds   ;
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seed;
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seede;
-
-      InDet::SiSpacePointsSeed*                      m_OneSeeds  {} ;
-      int                                            m_maxOneSize{} ;
-      int                                            m_nOneSeeds {} ;
-      std::list<float>                               m_l_vertex   ;
+    IntegerProperty m_maxsizeSP{this, "maxSizeSP", 1500};
+    InDet::SiSpacePointForSeed** m_SP{nullptr};
+    float               *  m_Zo{nullptr};
+    float               *  m_Tz{nullptr};
+    float               *  m_R{nullptr};
+    float               *  m_U{nullptr};
+    float               *  m_V{nullptr};
+    float               *  m_Er{nullptr};
+
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
+
+    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
+    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapSeeds   ;
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seed;
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seede;
+
+    InDet::SiSpacePointsSeed*                      m_OneSeeds{nullptr};
+    IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 3};
+    int                                            m_nOneSeeds {} ;
+    std::list<float>                               m_l_vertex   ;
  
-      ///////////////////////////////////////////////////////////////////
-      // Beam geometry
-      ///////////////////////////////////////////////////////////////////
- 
-      float m_xbeam[4];    // x,ax,ay,az - center and x-axis direction
-      float m_ybeam[4];    // y,ax,ay,az - center and y-axis direction
-      float m_zbeam[4];    // z,ax,ay,az - center and z-axis direction
-
-      ///////////////////////////////////////////////////////////////////
-      // Space points container
-      ///////////////////////////////////////////////////////////////////
-
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsSCT         ;
-      SG::ReadHandle<SpacePointContainer>         m_spacepointsPixel       ;
-      SG::ReadHandle<SpacePointOverlapCollection> m_spacepointsOverlap     ;
-
-      ///////////////////////////////////////////////////////////////////
-      // Protected methods
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dumpConditions(MsgStream   & out) const;
-      MsgStream&    dumpEvent     (MsgStream   & out) const;
-
-      void buildFrameWork()                                       ;
-      void buildBeamFrameWork()                                   ;
-
-      SiSpacePointForSeed* newSpacePoint
-	(const Trk::SpacePoint*const&)                            ;
-      void newSeed
+    ///////////////////////////////////////////////////////////////////
+    // Beam geometry
+    ///////////////////////////////////////////////////////////////////
+    float m_xbeam[4]{0., 1., 0., 0.}; // x,ax,ay,az - center and x-axis direction
+    float m_ybeam[4]{0., 0., 1., 0.}; // y,ax,ay,az - center and y-axis direction
+    float m_zbeam[4]{0., 0., 0., 1.}; // z,ax,ay,az - center and z-axis direction
+
+    ///////////////////////////////////////////////////////////////////
+    // Space points container
+    ///////////////////////////////////////////////////////////////////
+
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
+    SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
+    SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
+
+    ///////////////////////////////////////////////////////////////////
+    // Protected methods
+    ///////////////////////////////////////////////////////////////////
+
+    MsgStream&    dumpConditions(MsgStream   & out) const;
+    MsgStream&    dumpEvent     (MsgStream   & out) const;
+
+    void buildFrameWork()                                       ;
+    void buildBeamFrameWork()                                   ;
+
+    SiSpacePointForSeed* newSpacePoint
+      (const Trk::SpacePoint*const&)                            ;
+    void newSeed
       (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const float&)                                              ; 
+       const float&)                                              ;
 
-      void newOneSeed
+    void newOneSeed
       (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
        const Trk::SpacePoint*&,const float&,const float&)         ;
-      void fillSeeds()                                            ;
-
-      void fillLists     ()                                       ;
-      void erase         ()                                       ;
-      void production2Sp ()                                       ;
-      void production3Sp ()                                       ;
-      void production3Sp
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&);
-      void production3SpTrigger
-	(std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 std::list<InDet::SiSpacePointForSeed*>::iterator*,
-	 int,int,int&);
+    void fillSeeds()                                            ;
+
+    void fillLists     ()                                       ;
+    void erase         ()                                       ;
+    void production2Sp ()                                       ;
+    void production3Sp ()                                       ;
+    void production3Sp
+      (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       int,int,int&);
+    void production3SpTrigger
+      (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       std::list<InDet::SiSpacePointForSeed*>::iterator*,
+       int,int,int&);
  
-      bool newVertices(const std::list<Trk::Vertex>&)             ;
-      void findNext()                                             ;
-      bool isZCompatible     (float&,float&,float&)               ;
-      void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-      float dZVertexMin(float&)                                   ;
-   };
+    bool newVertices(const std::list<Trk::Vertex>&)             ;
+    void findNext()                                             ;
+    bool isZCompatible     (float&,float&,float&)               ;
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    float dZVertexMin(float&)                                   ;
+  };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_Trigger&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_Trigger&); 
+  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_Trigger&);
 
   ///////////////////////////////////////////////////////////////////
   // Inline methods
   ///////////////////////////////////////////////////////////////////
 
   inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_Trigger::next()
-    {
-      if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
-      if(m_mode==0 || m_mode==1) return(*m_i_seed++);
-      ++m_i_seed;
-      return (*m_seed++).second;
-    }
+  {
+    if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
+    if(m_mode==0 || m_mode==1) return(*m_i_seed++);
+    ++m_i_seed;
+    return (*m_seed++).second;
+  }
     
   inline bool SiSpacePointsSeedMaker_Trigger::isZCompatible  
     (float& Zv,float& R,float& T)
-    {
-      if(Zv < m_zmin || Zv > m_zmax) return false;
+  {
+    if(Zv < m_zmin || Zv > m_zmax) return false;
 
-      std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end(); 
-      if(v==ve) return true;      
+    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+    if(v==ve) return true;
 
-      float dZmin = fabs((*v)-Zv); ++v;
+    float dZmin = fabs((*v)-Zv); ++v;
 
-      for(; v!=ve; ++v) {
-	float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
-      }
-      return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+    for(; v!=ve; ++v) {
+      float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
     }
+    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+  }
 
   inline float SiSpacePointsSeedMaker_Trigger::dZVertexMin(float& Z)
-    {
-      std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-      if(v==ve) return 0.;
+  {
+    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+    if(v==ve) return 0.;
 
-      float dZm = 1.E10;
-      for(; v!=ve; ++v) {float dZ = fabs((*v)-Z); if(dZ<dZm) dZm = dZ;}
-      return dZm;
-    }
+    float dZm = 1.E10;
+    for(; v!=ve; ++v) {float dZ = fabs((*v)-Z); if(dZ<dZm) dZm = dZ;}
+    return dZm;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New space point for seeds 
@@ -318,78 +325,77 @@ namespace InDet {
 
   inline SiSpacePointForSeed* SiSpacePointsSeedMaker_Trigger::newSpacePoint
     (const Trk::SpacePoint*const& sp) 
-    {
-      SiSpacePointForSeed* sps;
+  {
+    SiSpacePointForSeed* sps;
 
-      float r[3]; convertToBeamFrameWork(sp,r);
+    float r[3]; convertToBeamFrameWork(sp,r);
 
-      if(m_i_spforseed!=m_l_spforseed.end()) {
-	sps = (*m_i_spforseed++); sps->set(sp,r); 
-      }
-      else                               {
-	m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-	m_i_spforseed = m_l_spforseed.end();	
-      }
-      
-      return sps;
+    if(m_i_spforseed!=m_l_spforseed.end()) {
+      sps = (*m_i_spforseed++); sps->set(sp,r);
+    }
+    else                               {
+      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
+      m_i_spforseed = m_l_spforseed.end();
     }
+      
+    return sps;
+  }
 
   ///////////////////////////////////////////////////////////////////
   // New 2 space points seeds 
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_Trigger::newSeed
-      (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-       const float& z) 
-    {
-      if(m_i_seede!=m_l_seeds.end()) {
-	SiSpacePointsSeed* s = (*m_i_seede++);
-	s->erase     (  ); 
-	s->add       (p1); 
-	s->add       (p2); 
-	s->setZVertex(double(z));
-      }
-      else                  {
-	m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-	m_i_seede = m_l_seeds.end(); 
-      }
+    (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+     const float& z) 
+  {
+    if(m_i_seede!=m_l_seeds.end()) {
+      SiSpacePointsSeed* s = (*m_i_seede++);
+      s->erase     (  );
+      s->add       (p1);
+      s->add       (p2);
+      s->setZVertex(double(z));
+    }
+    else                  {
+      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
+      m_i_seede = m_l_seeds.end();
     }
+  }
 
   ///////////////////////////////////////////////////////////////////
   // Fill seeds
   ///////////////////////////////////////////////////////////////////
 
   inline void SiSpacePointsSeedMaker_Trigger::fillSeeds ()
-    {
-      std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-	l  = m_mapOneSeeds.begin(),
-	le = m_mapOneSeeds.end  ();
-
-      for(; l!=le; ++l) {
-
-	float                     q  = (*l).first;
-	InDet::SiSpacePointsSeed* s0 = (*l).second;
-
-	if((*s0->spacePoints().rbegin())->clusterList().second) {
-	  (*s0->spacePoints().begin())->clusterList().second ? q+=1000. : q+=10000.;
-	}
-
-	if(m_i_seede!=m_l_seeds.end()) {
-	  InDet::SiSpacePointsSeed* s = (*m_i_seede++);
-	  *s = *s0;
-	  m_mapSeeds.insert(std::make_pair(q,s));
-	}
-	else                  {
-
-	  InDet::SiSpacePointsSeed* s = new InDet::SiSpacePointsSeed(*s0);
-	  m_l_seeds.push_back(s);
-	  m_i_seede = m_l_seeds.end(); 
-	  m_mapSeeds.insert(std::make_pair(q,s));
-	}
+  {
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
+      l  = m_mapOneSeeds.begin(),
+      le = m_mapOneSeeds.end  ();
+
+    for(; l!=le; ++l) {
+
+      float                     q  = (*l).first;
+      InDet::SiSpacePointsSeed* s0 = (*l).second;
+
+      if((*s0->spacePoints().rbegin())->clusterList().second) {
+        (*s0->spacePoints().begin())->clusterList().second ? q+=1000. : q+=10000.;
+      }
+
+      if(m_i_seede!=m_l_seeds.end()) {
+        InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+        *s = *s0;
+        m_mapSeeds.insert(std::make_pair(q,s));
+      }
+      else                  {
+
+        InDet::SiSpacePointsSeed* s = new InDet::SiSpacePointsSeed(*s0);
+        m_l_seeds.push_back(s);
+        m_i_seede = m_l_seeds.end();
+        m_mapSeeds.insert(std::make_pair(q,s));
       }
     }
+  }
   
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_Trigger_H
-
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
old mode 100755
new mode 100644
index e028af342e64..b3d8fee00eb1
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
@@ -71,6 +71,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::initialize()
 {
   StatusCode sc = AlgTool::initialize();
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get beam geometry
   //
   ATH_CHECK(m_beamSpotKey.initialize());
@@ -109,10 +113,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::initialize()
     ATH_MSG_DEBUG(*this);
   }
 
-  ATH_CHECK(m_spacepointsPixelKey.initialize(m_pixel));
-  ATH_CHECK(m_spacepointsSCTKey.initialize(m_sct));
-  ATH_CHECK(m_spacepointsOverlapKey.initialize(m_useOverlap));
-
   return sc;
 }
 
@@ -176,7 +176,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(int iteration)
   m_r_first = 0;
   if (!m_dbm && m_pixel) {
 
-    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixelKey};
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
     if (spacepointsPixel.isValid()) {
 
       for (const SpacePointCollection* spc: *spacepointsPixel) {
@@ -210,7 +210,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(int iteration)
   //
   if (!m_dbm && m_sct) {
 
-    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCTKey};
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
     if (spacepointsSCT.isValid()) {
 
       for (const SpacePointCollection* spc: *spacepointsSCT) {
@@ -235,7 +235,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(int iteration)
     //
     if (m_useOverlap && !m_checketa) {
 
-      SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlapKey};
+      SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
       if (spacepointsOverlap.isValid()) {
   
         for (const Trk::SpacePoint* sp: *spacepointsOverlap) {
@@ -260,7 +260,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(int iteration)
   //
   if (m_dbm) {
 
-    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixelKey};
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
     if (spacepointsPixel.isValid()) {
 
       for (const SpacePointCollection* spc: *spacepointsPixel) {
@@ -341,7 +341,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
   //
   if (m_pixel && !vPixel.empty()) {
 
-    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixelKey};
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
     if ( spacepointsPixel.isValid() ) {
       SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
@@ -369,7 +369,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
   //
   if (m_sct && !vSCT.empty()) {
 
-    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCTKey};
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
     if (spacepointsSCT.isValid()) {
 
       SpacePointContainer::const_iterator spce = spacepointsSCT->end();
@@ -580,15 +580,15 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dump( MsgStream& out ) const
 
 MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixelKey.key().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2;
   for (int i=0; i<n; ++i) s2.append(" ");
   s2.append("|");
-  n     = 42-m_spacepointsSCTKey.key().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3;
   for (int i=0; i<n; ++i) s3.append(" ");
   s3.append("|");
-  n     = 42-m_spacepointsOverlapKey.key().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4;
   for (int i=0; i<n; ++i) s4.append(" ");
   s4.append("|");
@@ -600,11 +600,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions( MsgStream& out )
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixelKey.key() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCTKey.key()<<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlapKey.key()<<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
      <<std::endl;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
      <<std::endl;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
old mode 100755
new mode 100644
index 0d0a737a4c00..0b02bb08a9e4
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,12 +12,12 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
+#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h"
 
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h"
 
+#include <iomanip>
+#include <ostream>
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
@@ -25,98 +25,9 @@
 
 InDet::SiSpacePointsSeedMaker_BeamGas::SiSpacePointsSeedMaker_BeamGas
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p)                                      ,
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
-    m_assoTool("InDet::InDetPRD_AssociationToolGangedPixels"),
-    m_spacepointsSCT("SCT_SpacePoints"),
-    m_spacepointsPixel("PixelSpacePoints"),
-    m_spacepointsOverlap("OverlapSpacePoints")
+  : AthAlgTool(t,n,p)
 {
-  m_useassoTool = true  ;
-  m_useOverlap= true    ;
-  m_state     = 0       ;
-  m_pixel     = true    ;
-  m_sct       = true    ;
-  m_state     = 0       ;
-  m_nspoint   = 2       ;
-  m_mode      = 0       ;
-  m_nlist     = 0       ;
-  m_endlist   = true    ;
-  m_maxsize   = 20000   ;
-  m_ptmin     = 1000.   ;
-  m_r1min     = 0.      ; 
-  m_r1max     = 450.    ; 
-  m_r2min     = 0.      ; 
-  m_r2max     = 600.    ; 
-  m_r3min     = 0.      ;
-  m_r3max     = 600.    ;
-  m_drmin     = 10.     ;
-  m_drmax     = 270.    ;    
-  m_rapcut    = 5.3     ;
-  m_zmin      = -5000.  ;
-  m_zmax      = +5000.  ;
-  m_dzver     = 5.      ;
-  m_dzdrver   = .02     ;
-  m_diver     = 10.     ;
-  m_diverpps  =  1.7    ;
-  m_dazmax    = .02     ;
-  m_r_rmax      = 600.  ;
-  m_r_rstep     =  2.   ;
-  m_r_Sorted    = 0     ;
-  m_r_index     = 0     ;
-  m_r_map       = 0     ;    
-  m_maxsizeSP = 1500    ;
-  m_maxOneSize= 5       ;
-  m_SP        = 0       ;
-  m_R         = 0       ;
-  m_Tz        = 0       ;
-  m_Er        = 0       ;
-  m_U         = 0       ;
-  m_V         = 0       ;
-  m_Zo        = 0       ;
-  m_OneSeeds  = 0       ;
-
-  m_xbeam[0]  = 0.      ; m_xbeam[1]= 1.; m_xbeam[2]=0.; m_xbeam[3]=0.;
-  m_ybeam[0]  = 0.      ; m_ybeam[1]= 0.; m_ybeam[2]=1.; m_ybeam[3]=0.;
-  m_zbeam[0]  = 0.      ; m_zbeam[1]= 0.; m_zbeam[2]=0.; m_zbeam[3]=1.;
-  
-
-//  m_spacepointsSCT         = 0                   ;
-//  m_spacepointsPixel       = 0                   ;
-//  m_spacepointsOverlap     = 0                   ;
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
-  declareProperty("AssociationTool"       ,m_assoTool              );
-  declareProperty("usePixel"              ,m_pixel                 );
-  declareProperty("useSCT"                ,m_sct                   );
-  declareProperty("pTmin"                 ,m_ptmin                 );
-  declareProperty("radMax"                ,m_r_rmax                  );
-  declareProperty("radStep"               ,m_r_rstep                 );
-  declareProperty("maxSize"               ,m_maxsize               );
-  declareProperty("maxSizeSP"             ,m_maxsizeSP             );
-  declareProperty("minZ"                  ,m_zmin                  );
-  declareProperty("maxZ"                  ,m_zmax                  );
-  declareProperty("minRadius1"            ,m_r1min                 );
-  declareProperty("minRadius2"            ,m_r2min                 );
-  declareProperty("minRadius3"            ,m_r3min                 );
-  declareProperty("maxRadius1"            ,m_r1max                 );
-  declareProperty("maxRadius2"            ,m_r2max                 );
-  declareProperty("maxRadius3"            ,m_r3max                 );
-  declareProperty("mindRadius"            ,m_drmin                 );
-  declareProperty("maxdRadius"            ,m_drmax                 );
-  declareProperty("RapidityCut"           ,m_rapcut                );
-  declareProperty("maxdZver"              ,m_dzver                 );
-  declareProperty("maxdZdRver"            ,m_dzdrver               );
-  declareProperty("maxdImpact"            ,m_diver                 );
-  declareProperty("maxdImpactPPS"         ,m_diverpps              );
-  declareProperty("maxSeedsForSpacePoint" ,m_maxOneSize            );
-  declareProperty("SpacePointsSCTName"    ,m_spacepointsSCT    );
-  declareProperty("SpacePointsPixelName"  ,m_spacepointsPixel  );
-  declareProperty("SpacePointsOverlapName",m_spacepointsOverlap);
-  declareProperty("useOverlapSpCollection", m_useOverlap           );
-  declareProperty("UseAssociationTool"    ,m_useassoTool           ); 
-  declareProperty("MagFieldSvc"           , m_fieldServiceHandle   );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -159,6 +70,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
 {
   StatusCode sc = AlgTool::initialize(); 
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get beam geometry
   //
   ATH_CHECK(m_beamSpotKey.initialize());
@@ -170,7 +85,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Get tool for track-prd association
   //
@@ -220,8 +134,8 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
   }
   else m_K = 2./(300.* 5. );
 
@@ -233,13 +147,11 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
   //
   if(m_pixel) {
 
-//    m_spacepointsPixel = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-    if(m_spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -265,10 +177,11 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
   //
   if(m_sct) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -293,12 +206,11 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
     //
     if(m_useOverlap) {
 
-//      m_spacepointsOverlap = 0;
-//      sc = evtStore()->retrieve(m_spacepointsOverlap,m_spacepointsOverlapname);
-      if(m_spacepointsOverlap.isValid()) {
+      SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
+      if(spacepointsOverlap.isValid()) {
 	
-	SpacePointOverlapCollection::const_iterator sp  = m_spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = m_spacepointsOverlap->end  ();
+	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
+	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
 	
 	for (; sp!=spe; ++sp) {
 
@@ -331,8 +243,8 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
   }
   else m_K = 2./(300.* 5. );
 
@@ -344,12 +256,10 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
   //
   if(m_pixel && vPixel.size()) {
 
-//    m_spacepointsPixel   = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
 
@@ -357,7 +267,7 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
       //
       for(; l!=le; ++l) {
 	
-	SpacePointContainer::const_iterator  w =  m_spacepointsPixel->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -380,12 +290,10 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
   //
   if(m_sct && vSCT.size()) {
 
-//    m_spacepointsSCT     = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsSCT,m_spacepointsSCTname);
-
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
 
@@ -393,7 +301,7 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
       //
       for(; l!=le; ++l) {
 
-	SpacePointContainer::const_iterator  w =  m_spacepointsSCT->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -530,11 +438,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dump( MsgStream& out ) const
 
 MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixel.name().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
-  n     = 42-m_spacepointsSCT.name().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 42-m_spacepointsOverlap.name().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
@@ -542,11 +450,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dumpConditions( MsgStream& out
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixel.name() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCT.name() <<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key() <<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.name() <<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key() <<s4
      <<std::endl;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
      <<std::endl;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
old mode 100755
new mode 100644
index 75ae690abc8a..63888d037625
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,11 +12,12 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
+#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h"
 
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h"
+
+#include <iomanip>
+#include <ostream>
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
@@ -24,77 +25,9 @@
 
 InDet::SiSpacePointsSeedMaker_Cosmic::SiSpacePointsSeedMaker_Cosmic
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p)                                         ,
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
-    m_assoTool("InDet::InDetPRD_AssociationToolGangedPixels"),
-    m_spacepointsSCT("SCT_SpacePoints"),
-    m_spacepointsPixel("PixelSpacePoints"),
-    m_spacepointsOverlap("OverlapSpacePoints")
+  : AthAlgTool(t,n,p)
 {
-  m_useassoTool = false ;
-  m_useOverlap= false   ;
-  m_state     = 0       ;
-  m_pixel     = true    ;
-  m_sct       = true    ;
-  m_state     = 0       ;
-  m_nspoint   = 2       ;
-  m_mode      = 0       ;
-  m_nlist     = 0       ;
-  m_endlist   = true    ;
-  m_maxsize   = 100     ;
-  m_ptmin     = 500.    ;
-  m_drmin     = 5.      ;
-  m_drmax     = 1000.   ; 
-  m_rapcut    = 2.3     ;
-  m_zmin      = -10000. ;
-  m_zmax      = +10000. ;
-  m_diver     = 10.     ;
-  m_r_rmax      = 600.  ;
-  m_r_rstep     =  5.   ;
-  m_r_Sorted    = 0     ;
-  m_r_index     = 0     ;
-  m_r_map       = 0     ;    
-  m_maxsizeSP = 1500    ;
-  m_SP        = 0       ;
-  m_R         = 0       ;
-  m_Tz        = 0       ;
-  m_Er        = 0       ;
-  m_U         = 0       ;
-  m_V         = 0       ;
-  m_seeds     = 0       ;
-  
-
-//  m_spacepointsSCT         = 0                   ;
-//  m_spacepointsPixel       = 0                   ;
-//  m_spacepointsOverlap     = 0                   ;
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
-  declareProperty("AssociationTool"       ,m_assoTool              );
-  declareProperty("usePixel"              ,m_pixel                 );
-  declareProperty("useSCT"                ,m_sct                   );
-  declareProperty("pTmin"                 ,m_ptmin                 );
-  declareProperty("radMax"                ,m_r_rmax                  );
-  declareProperty("radStep"               ,m_r_rstep                 );
-  declareProperty("maxSize"               ,m_maxsize               );
-  declareProperty("maxSizeSP"             ,m_maxsizeSP             );
-  declareProperty("minZ"                  ,m_zmin                  );
-  declareProperty("maxZ"                  ,m_zmax                  );
-  declareProperty("mindRadius"            ,m_drmin                 );
-  declareProperty("maxdRadius"            ,m_drmax                 );
-  declareProperty("RapidityCut"           ,m_rapcut                );
-  declareProperty("maxdImpact"            ,m_diver                 );
-  declareProperty("maxdImpactPPS"         ,m_diverpps              );
-  declareProperty("maxdImpactSSS"         ,m_diversss              );
-  declareProperty("etaMin"                ,m_etamin                );
-  declareProperty("etaMax"                ,m_etamax                );  
-  declareProperty("checkEta"              ,m_checketa              );
-  declareProperty("SpacePointsSCTName"    ,m_spacepointsSCT    );
-  declareProperty("SpacePointsPixelName"  ,m_spacepointsPixel  );
-  declareProperty("SpacePointsOverlapName",m_spacepointsOverlap);
-  declareProperty("useOverlapSpCollection", m_useOverlap           );
-  declareProperty("UseAssociationTool"    ,m_useassoTool           ); 
-  declareProperty("MagFieldSvc"           , m_fieldServiceHandle   );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -131,6 +64,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
 {
   StatusCode sc = AlgTool::initialize(); 
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get magnetic field service
   //
   if( !m_fieldServiceHandle.retrieve() ){
@@ -138,7 +75,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Get tool for track-prd association
   //
@@ -194,13 +130,11 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
   //
   if(m_pixel) {
 
-//    m_spacepointsPixel = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-    if(m_spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -227,10 +161,11 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
   //
   if(m_sct) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -256,12 +191,11 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
     //
     if(m_useOverlap) {
 
-//      m_spacepointsOverlap = 0;
-//      sc = evtStore()->retrieve(m_spacepointsOverlap,m_spacepointsOverlapname);
-      if(m_spacepointsOverlap.isValid()) {
+      SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
+      if(spacepointsOverlap.isValid()) {
 	
-	SpacePointOverlapCollection::const_iterator sp  = m_spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = m_spacepointsOverlap->end  ();
+	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
+	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
 	
 	for (; sp!=spe; ++sp) {
 
@@ -300,12 +234,10 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
   //
   if(m_pixel && vPixel.size()) {
 
-//    m_spacepointsPixel   = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
 
@@ -313,7 +245,7 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
       //
       for(; l!=le; ++l) {
 	
-	SpacePointContainer::const_iterator  w =  m_spacepointsPixel->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -336,12 +268,10 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
   //
   if(m_sct && vSCT.size()) {
 
-//    m_spacepointsSCT     = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsSCT,m_spacepointsSCTname);
-
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
 
@@ -349,7 +279,7 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
       //
       for(; l!=le; ++l) {
 
-	SpacePointContainer::const_iterator  w =  m_spacepointsSCT->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -493,21 +423,21 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dump( MsgStream& out ) const
 
 MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixel.name().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
-  n     = 42-m_spacepointsSCT.name().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 42-m_spacepointsOverlap.name().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
 
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixel.name() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCT.name()<<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.name() <<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key() <<s4
      <<std::endl;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
@@ -849,8 +779,8 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp()
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); K = 2./(300.*f[2]);
   }
   if(!K) return production3SpWithoutField();
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
old mode 100755
new mode 100644
index af7d7b0cfeca..c15057cfe539
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,115 +12,20 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
-
 #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h"
 
+#include <iomanip>
+#include <ostream>
+
 ///////////////////////////////////////////////////////////////////
 // Constructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::SiSpacePointsSeedMaker_HeavyIon::SiSpacePointsSeedMaker_HeavyIon
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n),
-  m_spacepointsSCT("SCT_SpacePoints"),
-  m_spacepointsPixel("PixelSpacePoints"),
-  m_spacepointsOverlap("OverlapSpacePoints")
+  : AthAlgTool(t,n,p)
 {
-
-  m_useOverlap= true    ;
-  m_state     = 0       ;
-  m_pixel     = true    ;
-  m_sct       = true    ;
-  m_trigger   = false   ;
-  m_state     = 0       ;
-  m_nspoint   = 2       ;
-  m_mode      = 0       ;
-  m_nlist     = 0       ;
-  m_endlist   = true    ;
-  m_maxsize   = 20000   ;
-  m_ptmin     =  500.   ;
-  m_r1min     = 0.      ; m_r1minv     = 0.  ; 
-  m_r1max     = 600.    ; m_r1maxv     = 60. ;
-  m_r2min     = 0.      ; m_r2minv     = 70. ;
-  m_r2max     = 600.    ; m_r2maxv     = 200.;
-  m_r3min     = 0.      ;
-  m_r3max     = 600.    ;
-  m_drmin     = 10.     ; m_drminv     = 20. ;    
-  m_drmax     = 270.    ;    
-  m_rapcut    = 2.7     ;
-  m_zmin      = -250.   ;
-  m_zmax      = +250.   ;
-  m_dzver     = 5.      ;
-  m_dzdrver   = .02     ;
-  m_diver     = 10.     ;
-  m_diverpps  =  1.7    ;
-  m_diversss  =  1000   ;
-  m_dazmax    = .02     ;
-  m_r_rmax      = 600.    ;
-  m_r_rstep     =  2.     ;
-  m_r_Sorted    = 0       ;
-  m_r_index     = 0       ;
-  m_r_map       = 0       ;    
-  m_maxsizeSP = 4000    ;
-  m_maxOneSize= 6       ;
-  m_SP        = 0       ;
-  m_R         = 0       ;
-  m_Tz        = 0       ;
-  m_Er        = 0       ;
-  m_U         = 0       ;
-  m_V         = 0       ;
-  m_Zo        = 0       ;
-  m_OneSeeds  = 0       ;
-  m_maxNumberVertices = 1;
- 
-  m_xbeam[0]  = 0.      ; m_xbeam[1]= 1.; m_xbeam[2]=0.; m_xbeam[3]=0.;
-  m_ybeam[0]  = 0.      ; m_ybeam[1]= 0.; m_ybeam[2]=1.; m_ybeam[3]=0.;
-  m_zbeam[0]  = 0.      ; m_zbeam[1]= 0.; m_zbeam[2]=0.; m_zbeam[3]=1.;
-  
-
-//  m_spacepointsSCT         = 0                   ;
-//  m_spacepointsPixel       = 0                   ;
-//  m_spacepointsOverlap     = 0                   ;
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
-  declareProperty("usePixel"              ,m_pixel                 );
-  declareProperty("useSCT"                ,m_sct                   );
-  declareProperty("pTmin"                 ,m_ptmin                 );
-  declareProperty("radMax"                ,m_r_rmax                  );
-  declareProperty("radStep"               ,m_r_rstep                 );
-  declareProperty("maxSize"               ,m_maxsize               );
-  declareProperty("maxSizeSP"             ,m_maxsizeSP             );
-  declareProperty("minZ"                  ,m_zmin                  );
-  declareProperty("maxZ"                  ,m_zmax                  );
-  declareProperty("minRadius1"            ,m_r1min                 );
-  declareProperty("minRadius2"            ,m_r2min                 );
-  declareProperty("minRadius3"            ,m_r3min                 );
-  declareProperty("maxRadius1"            ,m_r1max                 );
-  declareProperty("maxRadius2"            ,m_r2max                 );
-  declareProperty("maxRadius3"            ,m_r3max                 );
-  declareProperty("mindRadius"            ,m_drmin                 );
-  declareProperty("maxdRadius"            ,m_drmax                 );
-  declareProperty("minVRadius1"           ,m_r1minv                );
-  declareProperty("maxVRadius1"           ,m_r1maxv                );
-  declareProperty("minVRadius2"           ,m_r2minv                );
-  declareProperty("maxVRadius2"           ,m_r2maxv                );
-  declareProperty("RapidityCut"           ,m_rapcut                );
-  declareProperty("maxdZver"              ,m_dzver                 );
-  declareProperty("maxdZdRver"            ,m_dzdrver               );
-  declareProperty("maxdImpact"            ,m_diver                 );
-  declareProperty("maxdImpactPPS"         ,m_diverpps              );
-  declareProperty("maxdImpactSSS"         ,m_diversss              );
-  declareProperty("maxSeedsForSpacePoint" ,m_maxOneSize            );
-  declareProperty("maxNumberVertices"     ,m_maxNumberVertices     );
-  declareProperty("SpacePointsSCTName"    ,m_spacepointsSCT    );
-  declareProperty("SpacePointsPixelName"  ,m_spacepointsPixel  );
-  declareProperty("SpacePointsOverlapName",m_spacepointsOverlap);
-  declareProperty("useOverlapSpCollection", m_useOverlap           );
-  declareProperty("MagFieldSvc"           , m_fieldServiceHandle   );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -163,6 +68,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::initialize()
 {
   StatusCode sc = AlgTool::initialize(); 
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get beam geometry
   //
   ATH_CHECK(m_beamSpotKey.initialize());
@@ -174,7 +83,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::initialize()
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Build framework
   //
@@ -211,8 +119,8 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newEvent (int)
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
   }
   else m_K = 2./(300.* 5. );
 
@@ -225,13 +133,11 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newEvent (int)
   //
   if(m_pixel) {
 
-//    m_spacepointsPixel = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -256,10 +162,11 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newEvent (int)
   //
   if(m_sct) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -297,8 +204,8 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
   }
   else m_K = 2./(300.* 5. );
  
@@ -311,12 +218,10 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
   //
   if(m_pixel && vPixel.size()) {
 
-//    m_spacepointsPixel   = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
 
@@ -324,7 +229,7 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
       //
       for(; l!=le; ++l) {
 	
-	SpacePointContainer::const_iterator  w =  m_spacepointsPixel->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -346,12 +251,10 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
   //
   if(m_sct && vSCT.size()) {
 
-//    m_spacepointsSCT     = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsSCT,m_spacepointsSCTname);
-
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
 
@@ -359,7 +262,7 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
       //
       for(; l!=le; ++l) {
 
-	SpacePointContainer::const_iterator  w =  m_spacepointsSCT->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -506,11 +409,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dump( MsgStream& out ) const
 
 MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixel.name().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
-  n     = 42-m_spacepointsSCT.name().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 42-m_spacepointsOverlap.name().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
@@ -518,11 +421,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dumpConditions( MsgStream& ou
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixel.name() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCT.name()<<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.name()<<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
      <<std::endl;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
      <<std::endl;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
old mode 100755
new mode 100644
index f7f008d2084f..fe74fccf4f8f
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
      
@@ -13,11 +13,12 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
+#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h"
 
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h"
+
+#include <iomanip>
+#include <ostream>
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
@@ -25,123 +26,9 @@
 
 InDet::SiSpacePointsSeedMaker_ITK::SiSpacePointsSeedMaker_ITK
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n),    
-    m_spacepointsSCT("SCT_SpacePoints"),
-    m_spacepointsPixel("PixelSpacePoints"),
-    m_spacepointsOverlap("OverlapSpacePoints"),
-    m_assoTool("InDet::InDetPRD_AssociationToolGangedPixels")
+  : AthAlgTool(t,n,p)
 {
-
-  m_useassoTool = false ;
-  m_useOverlap= true    ;
-  m_state     = 0       ;
-  m_pixel     = true    ;
-  m_sct       = true    ;
-  m_trigger   = false   ;
-  m_checketa  = false   ;
-  m_dbm       = false   ;
-  m_state     = 0       ;
-  m_nspoint   = 2       ;
-  m_mode      = 0       ;
-  m_nlist     = 0       ;
-  m_endlist   = true    ;
-  m_maxsize   = 50000   ;
-  m_ptmin     =  500.   ;
-  m_etamin    = 0.      ; m_etamax     = 2.7 ;
-  m_r1min     = 0.      ; m_r1minv     = 0.  ; 
-  m_r1max     = 600.    ; m_r1maxv     = 60. ;
-  m_r2min     = 0.      ; m_r2minv     = 70. ;
-  m_r2max     = 600.    ; m_r2maxv     = 200.;
-  m_r3min     = 0.      ;
-  m_r3max     = 600.    ;
-  m_drmin     = 5.      ; m_drminv     = 20. ;    
-  m_drmax     = 300.    ;    
-  m_rapcut    = 2.7     ;
-  m_zmin      = -250.   ;
-  m_zmax      = +250.   ;
-  m_dzver     = 5.      ;
-  m_dzdrver   = .02     ;
-  m_diver     = 10.     ;
-  m_diverpps  =  1.7    ;
-  m_diversss  =  20     ;
-  m_divermax  =  20.    ;
-  m_dazmax    = .02     ;
-  m_r_rmax      = 1100. ;
-  m_r_rmin      = 0.    ;
-  m_umax      = 0.      ;
-  m_r_rstep     =  2.   ;
-  m_dzmaxPPP  = 600.    ; 
-  m_r_Sorted    = 0     ;
-  m_r_index     = 0     ;
-  m_r_map       = 0     ;    
-  m_maxsizeSP = 5000    ;
-  m_maxOneSize= 5       ;
-  m_SP        = 0       ;
-  m_R         = 0       ;
-  m_Tz        = 0       ;
-  m_Er        = 0       ;
-  m_U         = 0       ;
-  m_V         = 0       ;
-  m_X         = 0       ;
-  m_Y         = 0       ;
-  m_Zo        = 0       ;
-  m_OneSeeds  = 0       ;
-  m_seedOutput= 0       ;
-  m_maxNumberVertices = 99;
- 
-  m_xbeam[0]  = 0.      ; m_xbeam[1]= 1.; m_xbeam[2]=0.; m_xbeam[3]=0.;
-  m_ybeam[0]  = 0.      ; m_ybeam[1]= 0.; m_ybeam[2]=1.; m_ybeam[3]=0.;
-  m_zbeam[0]  = 0.      ; m_zbeam[1]= 0.; m_zbeam[2]=0.; m_zbeam[3]=1.;
-  
-
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
-  declareProperty("AssociationTool"       ,m_assoTool              );
-  declareProperty("usePixel"              ,m_pixel                 );
-  declareProperty("useSCT"                ,m_sct                   );
-  declareProperty("checkEta"              ,m_checketa              );
-  declareProperty("useDBM"                ,m_dbm                   );
-  declareProperty("etaMin"                ,m_etamin                );
-  declareProperty("etaMax"                ,m_etamax                );  
-  declareProperty("pTmin"                 ,m_ptmin                 );
-  declareProperty("radMax"                ,m_r_rmax                );
-  declareProperty("radMin"                ,m_r_rmin                );
-  declareProperty("radStep"               ,m_r_rstep               );
-  declareProperty("maxSize"               ,m_maxsize               );
-  declareProperty("maxSizeSP"             ,m_maxsizeSP             );
-  declareProperty("minZ"                  ,m_zmin                  );
-  declareProperty("maxZ"                  ,m_zmax                  );
-  declareProperty("minRadius1"            ,m_r1min                 );
-  declareProperty("minRadius2"            ,m_r2min                 );
-  declareProperty("minRadius3"            ,m_r3min                 );
-  declareProperty("maxRadius1"            ,m_r1max                 );
-  declareProperty("maxRadius2"            ,m_r2max                 );
-  declareProperty("maxRadius3"            ,m_r3max                 );
-  declareProperty("mindRadius"            ,m_drmin                 );
-  declareProperty("maxdRadius"            ,m_drmax                 );
-  declareProperty("minVRadius1"           ,m_r1minv                );
-  declareProperty("maxVRadius1"           ,m_r1maxv                );
-  declareProperty("minVRadius2"           ,m_r2minv                );
-  declareProperty("maxVRadius2"           ,m_r2maxv                );
-  declareProperty("RapidityCut"           ,m_rapcut                );
-  declareProperty("maxdZver"              ,m_dzver                 );
-  declareProperty("maxdZdRver"            ,m_dzdrver               );
-  declareProperty("maxdImpact"            ,m_diver                 );
-  declareProperty("maxdImpactPPS"         ,m_diverpps              );
-  declareProperty("maxdImpactSSS"         ,m_diversss              );
-  declareProperty("maxdImpactForDecays"   ,m_divermax              );
-  declareProperty("minSeedsQuality"       ,m_umax                  );
-  declareProperty("dZmaxForPPPSeeds"      ,m_dzmaxPPP              );
-  declareProperty("maxSeedsForSpacePoint" ,m_maxOneSize            );
-  declareProperty("maxNumberVertices"     ,m_maxNumberVertices     );
-  declareProperty("SpacePointsSCTName"    ,m_spacepointsSCT        );
-  declareProperty("SpacePointsPixelName"  ,m_spacepointsPixel      );
-  declareProperty("SpacePointsOverlapName",m_spacepointsOverlap    );
-  declareProperty("useOverlapSpCollection",m_useOverlap            );
-  declareProperty("UseAssociationTool"    ,m_useassoTool           ); 
-  declareProperty("MagFieldSvc"           ,m_fieldServiceHandle    );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -187,6 +74,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_ITK::initialize()
 {
   StatusCode sc = AlgTool::initialize(); 
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get beam geometry
   //
   ATH_CHECK(m_beamSpotKey.initialize());
@@ -198,7 +89,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_ITK::initialize()
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Get tool for track-prd association
   //
@@ -258,8 +148,8 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
     buildBeamFrameWork();
 
     double f[3], gP[3] ={10.,10.,0.}; 
-    if(m_fieldService->solenoidOn()) {
-      m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+    if(m_fieldServiceHandle->solenoidOn()) {
+      m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
     }
     else m_K = 2./(300.* 5. );
 
@@ -284,13 +174,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
   m_r_first = 0;
   if(m_pixel) {
 
-//    m_spacepointsPixel = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-    if(m_spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -318,10 +206,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
   //
   if(m_sct) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -346,12 +235,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
     //
     if(m_useOverlap) {
 
-//      m_spacepointsOverlap = 0;
-//      sc = evtStore()->retrieve(m_spacepointsOverlap,m_spacepointsOverlapname);
-      if(m_spacepointsOverlap.isValid()) {
+      SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
+      if(spacepointsOverlap.isValid()) {
 	
-	SpacePointOverlapCollection::const_iterator sp  = m_spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = m_spacepointsOverlap->end  ();
+	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
+	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
 	
 	for (; sp!=spe; ++sp) {
 
@@ -391,8 +279,8 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-      m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+      m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
     }
   else m_K = 2./(300.* 5. );
 
@@ -415,12 +303,10 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
   //
   if(m_pixel && vPixel.size()) {
 
-//    m_spacepointsPixel   = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
 
@@ -428,7 +314,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
       //
       for(; l!=le; ++l) {
 	
-	SpacePointContainer::const_iterator  w =  m_spacepointsPixel->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -449,9 +335,10 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
   //
   if(m_sct && vSCT.size()) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
 
@@ -459,7 +346,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
       //
       for(; l!=le; ++l) {
 
-	SpacePointContainer::const_iterator  w =  m_spacepointsSCT->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -652,11 +539,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dump( MsgStream& out ) const
 
 MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixel.name().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
-  n     = 42-m_spacepointsSCT.name().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 42-m_spacepointsOverlap.name().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
@@ -664,11 +551,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dumpConditions( MsgStream& out ) c
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixel.name() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCT.name()<<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.name()<<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
      <<std::endl;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
      <<std::endl;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
old mode 100755
new mode 100644
index 5f8bf943ce00..85e9474ec6ec
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,12 +12,12 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
+#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h"
 
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h"
 
+#include <iomanip>
+#include <ostream>
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
@@ -25,102 +25,9 @@
 
 InDet::SiSpacePointsSeedMaker_LowMomentum::SiSpacePointsSeedMaker_LowMomentum
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
-    m_spacepointsSCT("SCT_SpacePoints"),
-    m_spacepointsPixel("PixelSpacePoints"),
-    m_spacepointsOverlap("OverlapSpacePoints"),
-    m_assoTool("InDet::InDetPRD_AssociationToolGangedPixels")
+  : AthAlgTool(t,n,p)
 {
-  m_useassoTool = true    ;
-  m_useOverlap  = true    ;
-  m_state       = 0       ;
-  m_pixel       = true    ;
-  m_sct         = true    ;
-  m_nspoint     = 2       ;
-  m_mode        = 0       ;
-  m_nlist       = 0       ;
-  m_endlist     = true    ;
-  m_maxsize     = 2000    ;
-  m_ptmin       = 100.    ;
-  m_ptmax       =  500.   ;
-  m_r1min       = 0.      ; 
-  m_r1max       = 600.    ; 
-  m_r2min       = 0.      ; 
-  m_r2max       = 600.    ; 
-  m_r3min       = 0.      ;
-  m_r3max       = 600.    ;
-  m_drmin       = 10.     ; 
-  m_drmax       = 200.    ;    
-  m_rapcut      = 2.7     ;
-  m_zmin        = -250.   ;
-  m_zmax        = +250.   ;
-  m_dzver       = 5.      ;
-  m_dzdrver     = .02     ;
-  m_diver       =  7.     ;
-  m_diverpps    =  1.2    ;
-  m_dazmax      = .02     ;
-  m_iptmax      = 1./400. ;
-  m_r_rmax        = 200.  ;
-  m_r_rstep       =  2.   ;
-  m_r_Sorted      = 0     ;
-  m_r_index       = 0     ;
-  m_r_map         = 0     ;    
-  m_maxsizeSP   = 1500    ;
-  m_maxOneSize  = 5       ;
-  m_SP          = 0       ;
-  m_R           = 0       ;
-  m_Tz          = 0       ;
-  m_Er          = 0       ;
-  m_U           = 0       ;
-  m_V           = 0       ;
-  m_Zo          = 0       ;
-  m_OneSeeds    = 0       ;
-
-  m_xbeam[0]    = 0.      ; m_xbeam[1]= 1.; m_xbeam[2]=0.; m_xbeam[3]=0.;
-  m_ybeam[0]    = 0.      ; m_ybeam[1]= 0.; m_ybeam[2]=1.; m_ybeam[3]=0.;
-  m_zbeam[0]    = 0.      ; m_zbeam[1]= 0.; m_zbeam[2]=0.; m_zbeam[3]=1.;
-  
-//  m_spacepointsSCTname     = "SCT_SpacePoints"   ;
-//  m_spacepointsPixelname   = "PixelSpacePoints"  ;
-//  m_spacepointsOverlapname = "OverlapSpacePoints"; 
-//  m_spacepointsSCT         = 0                   ;
-//  m_spacepointsPixel       = 0                   ;
-//  m_spacepointsOverlap     = 0                   ;
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
-  declareProperty("AssociationTool"       ,m_assoTool              );
-  declareProperty("usePixel"              ,m_pixel                 );
-  declareProperty("useSCT"                ,m_sct                   );
-  declareProperty("pTmin"                 ,m_ptmin                 );
-  declareProperty("pTmax"                 ,m_ptmax                 );
-  declareProperty("radMax"                ,m_r_rmax                  );
-  declareProperty("radStep"               ,m_r_rstep                 );
-  declareProperty("maxSize"               ,m_maxsize               );
-  declareProperty("maxSizeSP"             ,m_maxsizeSP             );
-  declareProperty("minZ"                  ,m_zmin                  );
-  declareProperty("maxZ"                  ,m_zmax                  );
-  declareProperty("minRadius1"            ,m_r1min                 );
-  declareProperty("minRadius2"            ,m_r2min                 );
-  declareProperty("minRadius3"            ,m_r3min                 );
-  declareProperty("maxRadius1"            ,m_r1max                 );
-  declareProperty("maxRadius2"            ,m_r2max                 );
-  declareProperty("maxRadius3"            ,m_r3max                 );
-  declareProperty("mindRadius"            ,m_drmin                 );
-  declareProperty("maxdRadius"            ,m_drmax                 );
-  declareProperty("RapidityCut"           ,m_rapcut                );
-  declareProperty("maxdZver"              ,m_dzver                 );
-  declareProperty("maxdZdRver"            ,m_dzdrver               );
-  declareProperty("maxdImpact"            ,m_diver                 );
-  declareProperty("maxdImpactPPS"         ,m_diverpps              );
-  declareProperty("maxSeedsForSpacePoint" ,m_maxOneSize            );
-  declareProperty("SpacePointsSCTName"    ,m_spacepointsSCT    );
-  declareProperty("SpacePointsPixelName"  ,m_spacepointsPixel  );
-  declareProperty("SpacePointsOverlapName",m_spacepointsOverlap);
-  declareProperty("useOverlapSpCollection", m_useOverlap           );
-  declareProperty("UseAssociationTool"    ,m_useassoTool           ); 
-  declareProperty("MagFieldSvc"           , m_fieldServiceHandle   );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -163,6 +70,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
 {
   StatusCode sc = AlgTool::initialize(); 
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get beam geometry
   //
   ATH_CHECK(m_beamSpotKey.initialize());
@@ -174,7 +85,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Get tool for track-prd association
   //
@@ -230,13 +140,11 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newEvent (int)
   //
   if(m_pixel) {
 
-//    m_spacepointsPixel = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -263,10 +171,11 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newEvent (int)
   //
   if(m_sct) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -311,12 +220,10 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
   //
   if(m_pixel && vPixel.size()) {
 
-//    m_spacepointsPixel   = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
 
@@ -324,7 +231,7 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
       //
       for(; l!=le; ++l) {
 	
-	SpacePointContainer::const_iterator  w =  m_spacepointsPixel->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -348,12 +255,10 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
   //
   if(m_sct && vSCT.size()) {
 
-//    m_spacepointsSCT     = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsSCT,m_spacepointsSCTname);
-
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
 
@@ -361,7 +266,7 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
       //
       for(; l!=le; ++l) {
 
-	SpacePointContainer::const_iterator  w =  m_spacepointsSCT->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -502,22 +407,22 @@ MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dump( MsgStream& out ) con
 
 MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixel.name().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
-  n     = 42-m_spacepointsSCT.name().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 42-m_spacepointsOverlap.name().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixel.name() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCT.name()<<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.name()<<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
      <<std::endl;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
      <<std::endl;
@@ -1016,8 +921,8 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp()
   float K = 0.;
   double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); K = 2./(300.*f[2]);
   }
   else K = 2./(300.* 5. );
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
old mode 100755
new mode 100644
index ac16f482e420..49d78720bc8f
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -12,117 +12,20 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
-
 #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h"
 
+#include <iomanip>
+#include <ostream>
+
 ///////////////////////////////////////////////////////////////////
 // Constructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::SiSpacePointsSeedMaker_Trigger::SiSpacePointsSeedMaker_Trigger
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n),
-    m_spacepointsSCT("SCT_SpacePoints"),
-    m_spacepointsPixel("PixelSpacePoints"),
-    m_spacepointsOverlap("OverlapSpacePoints")
+  : AthAlgTool(t,n,p)
 {
-
-  m_useOverlap= true    ;
-  m_state     = 0       ;
-  m_pixel     = true    ;
-  m_sct       = true    ;
-  m_trigger   = false   ;
-  m_state     = 0       ;
-  m_nspoint   = 2       ;
-  m_mode      = 0       ;
-  m_nlist     = 0       ;
-  m_endlist   = true    ;
-  m_maxsize   = 20000   ;
-  m_ptmin     =  500.   ;
-  m_r1min     = 0.      ; m_r1minv     = 0.  ; 
-  m_r1max     = 600.    ; m_r1maxv     = 60. ;
-  m_r2min     = 0.      ; m_r2minv     = 70. ;
-  m_r2max     = 600.    ; m_r2maxv     = 200.;
-  m_r3min     = 0.      ;
-  m_r3max     = 600.    ;
-  m_drmin     = 10.     ; m_drminv     = 20. ;    
-  m_drmax     = 270.    ;    
-  m_rapcut    = 2.7     ;
-  m_zmin      = -250.   ;
-  m_zmax      = +250.   ;
-  m_dzver     = 5.      ;
-  m_dzdrver   = .02     ;
-  m_diver     = 10.     ;
-  m_diverpps  =  1.7    ;
-  m_diversss  =  1000.  ;
-  m_dazmax    = .02     ;
-  m_r_rmax      = 600.  ;
-  m_r_rstep     =  2.   ;
-  m_r_Sorted    = 0     ;
-  m_r_index     = 0     ;
-  m_r_map       = 0     ;    
-  m_maxsizeSP = 1500    ;
-  m_maxOneSize= 3       ;
-  m_SP        = 0       ;
-  m_R         = 0       ;
-  m_Tz        = 0       ;
-  m_Er        = 0       ;
-  m_U         = 0       ;
-  m_V         = 0       ;
-  m_Zo        = 0       ;
-  m_OneSeeds  = 0       ;
-  m_maxNumberVertices = 99;
- 
-  m_xbeam[0]  = 0.      ; m_xbeam[1]= 1.; m_xbeam[2]=0.; m_xbeam[3]=0.;
-  m_ybeam[0]  = 0.      ; m_ybeam[1]= 0.; m_ybeam[2]=1.; m_ybeam[3]=0.;
-  m_zbeam[0]  = 0.      ; m_zbeam[1]= 0.; m_zbeam[2]=0.; m_zbeam[3]=1.;
-  
-//  m_spacepointsSCTname     = "SCT_SpacePoints"   ;
-//  m_spacepointsPixelname   = "PixelSpacePoints"  ;
-//  m_spacepointsOverlapname = "OverlapSpacePoints"; 
-//  m_spacepointsSCT         = 0                   ;
-//  m_spacepointsPixel       = 0                   ;
-//  m_spacepointsOverlap     = 0                   ;
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
-  declareProperty("usePixel"              ,m_pixel                 );
-  declareProperty("useSCT"                ,m_sct                   );
-  declareProperty("pTmin"                 ,m_ptmin                 );
-  declareProperty("radMax"                ,m_r_rmax                  );
-  declareProperty("radStep"               ,m_r_rstep                 );
-  declareProperty("maxSize"               ,m_maxsize               );
-  declareProperty("maxSizeSP"             ,m_maxsizeSP             );
-  declareProperty("minZ"                  ,m_zmin                  );
-  declareProperty("maxZ"                  ,m_zmax                  );
-  declareProperty("minRadius1"            ,m_r1min                 );
-  declareProperty("minRadius2"            ,m_r2min                 );
-  declareProperty("minRadius3"            ,m_r3min                 );
-  declareProperty("maxRadius1"            ,m_r1max                 );
-  declareProperty("maxRadius2"            ,m_r2max                 );
-  declareProperty("maxRadius3"            ,m_r3max                 );
-  declareProperty("mindRadius"            ,m_drmin                 );
-  declareProperty("maxdRadius"            ,m_drmax                 );
-  declareProperty("minVRadius1"           ,m_r1minv                );
-  declareProperty("maxVRadius1"           ,m_r1maxv                );
-  declareProperty("minVRadius2"           ,m_r2minv                );
-  declareProperty("maxVRadius2"           ,m_r2maxv                );
-  declareProperty("RapidityCut"           ,m_rapcut                );
-  declareProperty("maxdZver"              ,m_dzver                 );
-  declareProperty("maxdZdRver"            ,m_dzdrver               );
-  declareProperty("maxdImpact"            ,m_diver                 );
-  declareProperty("maxdImpactPPS"         ,m_diverpps              );
-  declareProperty("maxdImpactSSS"         ,m_diversss              );
-  declareProperty("maxSeedsForSpacePoint" ,m_maxOneSize            );
-  declareProperty("maxNumberVertices"     ,m_maxNumberVertices     );
-  declareProperty("SpacePointsSCTName"    ,m_spacepointsSCT        );
-  declareProperty("SpacePointsPixelName"  ,m_spacepointsPixel      );
-  declareProperty("SpacePointsOverlapName",m_spacepointsOverlap    );
-  declareProperty("useOverlapSpCollection", m_useOverlap           );
-  declareProperty("MagFieldSvc"           , m_fieldServiceHandle   );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -165,6 +68,10 @@ StatusCode InDet::SiSpacePointsSeedMaker_Trigger::initialize()
 {
   StatusCode sc = AlgTool::initialize(); 
 
+  ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
+  ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
+  ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap));
+
   // Get beam geometry
   //
   ATH_CHECK(m_beamSpotKey.initialize());
@@ -176,7 +83,6 @@ StatusCode InDet::SiSpacePointsSeedMaker_Trigger::initialize()
     return StatusCode::FAILURE;
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-  m_fieldService = &*m_fieldServiceHandle;
 
   // Build framework
   //
@@ -213,8 +119,8 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
 
   double f[3], gP[3] ={10.,10.,0.}; 
 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
   }
   else m_K = 2./(300.* 5. );
 
@@ -227,13 +133,11 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
   //
   if(m_pixel) {
 
-//    m_spacepointsPixel = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -259,10 +163,11 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
   //
   if(m_sct) {
 
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       for(; spc != spce; ++spc) {
 
@@ -287,12 +192,11 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
     //
     if(m_useOverlap) {
 
-//      m_spacepointsOverlap = 0;
-//      sc = evtStore()->retrieve(m_spacepointsOverlap,m_spacepointsOverlapname);
-      if(m_spacepointsOverlap.isValid()) {
+      SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
+      if(spacepointsOverlap.isValid()) {
 	
-	SpacePointOverlapCollection::const_iterator sp  = m_spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = m_spacepointsOverlap->end  ();
+	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
+	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
 	
 	for (; sp!=spe; ++sp) {
 
@@ -326,8 +230,8 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
   buildBeamFrameWork();
 
   double f[3], gP[3] ={10.,10.,0.}; 
-  if(m_fieldService->solenoidOn()) {
-    m_fieldService->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if(m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
   }
   else m_K = 2./(300.* 5. );
 
@@ -340,12 +244,10 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
   //
   if(m_pixel && vPixel.size()) {
 
-//    m_spacepointsPixel   = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname);
-    
-    if(m_spacepointsPixel.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
+    if(spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
 
@@ -353,7 +255,7 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
       //
       for(; l!=le; ++l) {
 	
-	SpacePointContainer::const_iterator  w =  m_spacepointsPixel->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -376,12 +278,10 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
   //
   if(m_sct && vSCT.size()) {
 
-//    m_spacepointsSCT     = 0;
-//    StatusCode sc = evtStore()->retrieve(m_spacepointsSCT,m_spacepointsSCTname);
-
-    if(m_spacepointsSCT.isValid()) {
+    SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
+    if(spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
+      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
 
       std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
 
@@ -389,7 +289,7 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
       //
       for(; l!=le; ++l) {
 
-	SpacePointContainer::const_iterator  w =  m_spacepointsSCT->indexFind((*l));
+	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
 	if(w==spce) continue;
 	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
 
@@ -553,11 +453,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dump( MsgStream& out ) const
 
 MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_spacepointsPixel.name().size();
+  int n = 42-m_spacepointsPixel.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
-  n     = 42-m_spacepointsSCT.name().size();
+  n     = 42-m_spacepointsSCT.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 42-m_spacepointsOverlap.name().size();
+  n     = 42-m_spacepointsOverlap.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
@@ -565,11 +465,11 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dumpConditions( MsgStream& out
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Pixel    space points   | "<<m_spacepointsPixel.name() <<s2
+  out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
      <<std::endl;
-  out<<"| SCT      space points   | "<<m_spacepointsSCT.name() <<s3
+  out<<"| SCT      space points   | "<<m_spacepointsSCT.key() <<s3
      <<std::endl;
-  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.name() <<s4
+  out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key() <<s4
      <<std::endl;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
      <<std::endl;
-- 
GitLab


From f3a3aed53e5bb4e9e984a6d89dbe0532a00f5777 Mon Sep 17 00:00:00 2001
From: John Baines <john.baines@cern.ch>
Date: Wed, 1 May 2019 17:50:57 +0200
Subject: [PATCH 035/129] sweep !22997 !22217 to master and add fix for
 ATR-19709

---
 .../FTK_DataProviderSvc/CMakeLists.txt        |   1 +
 .../FTK_DataProviderSvc/FTK_DataProviderSvc.h |   8 +-
 .../src/FTK_DataProviderSvc.cxx               | 345 ++++++++----------
 .../FTK_RecExample/python/FTKJobProperties.py | 146 ++++++++
 .../FTK_RecExample/share/FTKRec_jobOptions.py |  32 +-
 5 files changed, 307 insertions(+), 225 deletions(-)
 create mode 100644 Trigger/TrigFTK/FTK_RecExample/python/FTKJobProperties.py

diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt b/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt
index 7c9e6800cee2..d94ff45ab20b 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt
@@ -28,6 +28,7 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/GeoPrimitives
                           DetectorDescription/IRegionSelector
                           DetectorDescription/RoiDescriptor
+			  InnerDetector/InDetConditions/InDetBeamSpotService
                           Event/EventInfo
                           Generators/GeneratorObjects
                           InnerDetector/InDetConditions/PixelConditionsServices
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
index 3aed26ae32fb..c5112fdf07aa 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
@@ -37,6 +37,7 @@
 
 /// Forward Declarations ///
 class AtlasDetectorID;
+class IBeamCondSvc;
 class PixelID;
 class SCT_ID;
 class Identifier;
@@ -139,7 +140,8 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
 
  bool fillVertexContainerCache(bool withRefit, xAOD::TrackParticleContainer*);
 
- 
+ bool makeDummyVertex(bool withRefit);
+
  const Trk::RIO_OnTrack* createPixelCluster(const IdentifierHash hash, const FTK_RawPixelCluster& raw_pixel_cluster,  const Trk::TrackParameters& trkPerigee);
  const Trk::RIO_OnTrack* createSCT_Cluster(const IdentifierHash hash, const FTK_RawSCT_Cluster& raw_sct_cluster, const Trk::TrackParameters& trkPerigee);
  
@@ -162,6 +164,9 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
 
   std::string m_RDO_key;
   StoreGateSvc* m_storeGate;
+
+  ServiceHandle<IBeamCondSvc> m_BeamCondSvc;
+
   const PixelID* m_pixelId;
   const SCT_ID*  m_sctId;
   
@@ -172,6 +177,7 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
   SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
   SG::ReadCondHandleKey<PixelCalib::PixelOfflineCalibData> m_clusterErrorKey{this, "PixelOfflineCalibData", "PixelOfflineCalibData", "Output key of pixel cluster"};
 
+
   ToolHandle<IFTK_UncertaintyTool> m_uncertaintyTool;
   ToolHandle<Trk::ITrackFitter> m_trackFitter;
   ToolHandle<Trk::ITrackSummaryTool> m_trackSumTool;
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
index c1a8f892a435..e36f9c036168 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
@@ -7,6 +7,8 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
+#include "StoreGate/ReadCondHandle.h"
+#include "InDetBeamSpotService/IBeamCondSvc.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
 #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
 #include "InDetReadoutGeometry/SCT_BarrelModuleSideDesign.h"
@@ -25,7 +27,6 @@
 #include "TrkEventPrimitives/ParamDefs.h"
 #include "TrkTrackSummary/TrackSummary.h"
 #include "StoreGate/DataHandle.h"
-#include "StoreGate/ReadCondHandle.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h"
 #include "InDetRIO_OnTrack/PixelClusterOnTrack.h"
@@ -94,6 +95,7 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   AthService(name, svc),
   m_RDO_key("FTK_RDO_Tracks"),
   m_storeGate(0),
+  m_BeamCondSvc("BeamCondSvc", name),
   m_pixelId(0),
   m_sctId(0),
   m_pixelManager(0),
@@ -161,9 +163,9 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   m_doVertexSorting(true),
   m_processAuxTracks(false), 
   m_getHashIDfromConstants(false)
-
+  
 {
-
+  
   declareProperty("TrackCollectionName",m_trackCacheName);
   declareProperty("TrackParticleContainerName",m_trackParticleCacheName);
   declareProperty("VertexContainerName",m_vertexCacheName);
@@ -177,6 +179,7 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   declareProperty("ROTcreatorTool",m_ROTcreator);
   declareProperty("RawVertexFinderTool",m_RawVertexFinderTool);
   declareProperty("VertexCollectionSortingTool",m_VertexCollectionSortingTool );
+  declareProperty("BeamCondSvc", m_BeamCondSvc);
   declareProperty("doVertexSorting",m_doVertexSorting );
   declareProperty("doTruth",m_doTruth);
   declareProperty("PixelTruthName",m_ftkPixelTruthName);
@@ -206,7 +209,7 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   declareProperty("DoVertexing",m_doVertexing, "Enable Vertexing methods");
   declareProperty("ProcessAuxTracks",m_processAuxTracks, "process Aux Tracks ");
   declareProperty("HashIDfromConstants",m_getHashIDfromConstants, "Get HashID from Constants");
-
+  
 }
 
 FTK_DataProviderSvc::~FTK_DataProviderSvc(){
@@ -253,13 +256,20 @@ StatusCode FTK_DataProviderSvc::initialize() {
   }
 
   ATH_CHECK(service( "StoreGateSvc", m_storeGate ));
+  ATH_CHECK(m_BeamCondSvc.retrieve());
   StoreGateSvc* detStore;
   ATH_CHECK(service("DetectorStore", detStore));
   ATH_CHECK(m_clusterErrorKey.initialize());
   ATH_CHECK(detStore->retrieve(m_pixelId, "PixelID"));
   ATH_CHECK(detStore->retrieve(m_sctId, "SCT_ID"));
-  ATH_CHECK(detStore->retrieve(m_pixelManager,"Pixel"));
   ATH_CHECK(detStore->retrieve(m_id_helper, "AtlasID"));
+  ATH_CHECK(detStore->retrieve(m_pixelManager,"Pixel"));
+  ATH_CHECK(m_pixelLorentzAngleTool.retrieve());
+  ATH_CHECK(m_sctLorentzAngleTool.retrieve());
+
+  // ReadCondHandleKey
+  ATH_CHECK(m_SCTDetEleCollKey.initialize());
+  
   ATH_MSG_INFO( " getting UncertaintyTool with name " << m_uncertaintyTool.name());
   ATH_CHECK(m_uncertaintyTool.retrieve());
   ATH_MSG_INFO( " getting TrackFitter tool with name " << m_trackFitter.name());
@@ -292,12 +302,6 @@ StatusCode FTK_DataProviderSvc::initialize() {
     ATH_MSG_INFO( " getting ROTcreator tool with name " << m_ROTcreator.name());
     ATH_CHECK(m_ROTcreator.retrieve());
   }
-  ATH_CHECK(m_pixelLorentzAngleTool.retrieve());
-  ATH_CHECK(m_sctLorentzAngleTool.retrieve());
-
-  // ReadCondHandleKey
-  ATH_CHECK(m_SCTDetEleCollKey.initialize());
-
   // Register incident handler
   ServiceHandle<IIncidentSvc> iincSvc( "IncidentSvc", name());
   ATH_CHECK(iincSvc.retrieve());
@@ -310,14 +314,12 @@ StatusCode FTK_DataProviderSvc::initialize() {
   ATH_MSG_INFO( "SCT_ClusterContainer name : " << m_SCT_ClusterContainerName);
   ATH_MSG_INFO( "PRD Truth SCT name: " << m_ftkSctTruthName);
   ATH_MSG_INFO( "PRD Truth Pixel name : " << m_ftkPixelTruthName);
-
   if (m_processAuxTracks) {
     ATH_MSG_INFO( "Processing AUX format tracks ");
   }
   if (m_getHashIDfromConstants) {
     ATH_MSG_INFO( "getting HashId from Constants ");
   }
-
   ATH_MSG_INFO( "Correcting for FTK training beamspot at x " <<  m_trainingBeamspotX <<" y " << 	m_trainingBeamspotY
       << " z " <<  m_trainingBeamspotZ << " TiltX " << m_trainingBeamspotTiltX << "TiltY " << m_trainingBeamspotTiltY );
   ATH_MSG_INFO( " Pixel Barrel Phi Offsets (pixels): " << m_pixelBarrelPhiOffsets);
@@ -361,6 +363,7 @@ StatusCode FTK_DataProviderSvc::finalize() {
 }
 
 
+
 unsigned int FTK_DataProviderSvc::nTrackParticleErrors(const bool withRefit) {
 
   unsigned int nErrors=0;
@@ -479,10 +482,7 @@ xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const
               if (tp !=nullptr) {
                 m_refit_tp_map[ftk_track_index] = (int) m_refit_tp->size()-1;
                 tpcont->push_back(tp);
-              } else {
-		m_nErrors++;
-		m_refit_tp_map[ftk_track_index]=-2;
-	      }
+              }
             } else { //trackLink not valid
               ATH_MSG_ERROR ("invalid ElementLink to m_refit_track_map["<<ftk_track_index<<"] = " << m_refit_track_map[ftk_track_index]);
               m_refit_tp_map[ftk_track_index]=-2;
@@ -576,22 +576,17 @@ StatusCode FTK_DataProviderSvc::fillTrackParticleCache(const bool withRefit){
               m_refit_tp_map[ftk_track_index] = (int) m_refit_tp->size()-1;
               ATH_MSG_VERBOSE("TrackParticle from refitted track added to cache at index " << m_refit_tp_map[ftk_track_index]
                   << "  created from FTK track at index " << ftk_track_index);
-	    } else {
-	      m_refit_tp_map[ftk_track_index]=-2;
-	      m_nErrors++;
-	      ATH_MSG_DEBUG("Failed to create TrackParticle from refitted track at index "<< m_refit_track_map[ftk_track_index] << 
-			      " from FTK track at index "  << ftk_track_index);
-	    }
-	    
-	  } else { // trackLink not Valid
-	    ATH_MSG_ERROR ("invalid ElementLink to m_refit_track_map["<<ftk_track_index<<"] = "<< m_refit_track_map[ftk_track_index]);
+            } else {
+              ATH_MSG_DEBUG ("Failed to create TrackParticle refitted track with index " << ftk_track_index);
+              m_refit_tp_map[ftk_track_index]=-2;
+            }
+	  } else {
+	    ATH_MSG_WARNING ("invalid ElementLink to m_refit_track_map["<<ftk_track_index<<"] = "<< m_refit_track_map[ftk_track_index]);
 	    m_refit_tp_map[ftk_track_index]=-2;
-	    m_nErrors++;
           }
         } else { // track==nullptr
           ATH_MSG_VERBOSE("Setting m_refit_tp_map["<<  ftk_track_index <<"]=-2");
           m_refit_tp_map[ftk_track_index] = -2;
-	  m_nErrors++;
         }
       }
 
@@ -618,20 +613,16 @@ StatusCode FTK_DataProviderSvc::fillTrackParticleCache(const bool withRefit){
               ATH_MSG_VERBOSE("TrackParticle from converted track added to cache at index " << m_conv_tp_map[ftk_track_index]
                   << "  created from FTK track at index " << ftk_track_index);
             } else {
-	      ATH_MSG_DEBUG("Failed to create TrackParticle from converted track at index "<< m_conv_track_map[ftk_track_index] << 
-			      " from FTK track at index "  << ftk_track_index);
+	      ATH_MSG_DEBUG("Failed to create TrackParticle for converted track with ftk_track_index" << ftk_track_index);
 	      m_conv_tp_map[ftk_track_index] = -2;
-	      m_nErrors++;
 	    }
           } else {
             ATH_MSG_ERROR ("invalid ElementLink to m_conv_track_map["<<ftk_track_index<<"] = "<< m_conv_track_map[ftk_track_index]);
             m_conv_tp_map[ftk_track_index] = -2;
-	    m_nErrors++;
           }
         } else { // track== nullptr
           ATH_MSG_VERBOSE("Setting m_conv_tp_map["<<  ftk_track_index <<"]=-2");
           m_conv_tp_map[ftk_track_index] = -2;
-	  m_nErrors++;
         }
       }
 
@@ -713,8 +704,6 @@ StatusCode FTK_DataProviderSvc::fillTrackCache(const bool withRefit) {
       } else {
         ATH_MSG_VERBOSE("Setting m_conv_track_map["<<  ftk_track_index <<"]=-2");
         m_conv_track_map[ftk_track_index]=-2;
-	m_nErrors++;
-
       }
     }
     if (m_conv_track_map[ftk_track_index]>-1 && withRefit && m_refit_track_map[ftk_track_index]==-1) { // need to do refit
@@ -724,7 +713,6 @@ StatusCode FTK_DataProviderSvc::fillTrackCache(const bool withRefit) {
         ATH_MSG_VERBOSE("fillTrackCache: refit failed - refitted track coresponding to FTK track with index " << ftk_track_index << " has NOT added to  output collection");
         m_refit_track_map[ftk_track_index] = -2; // flag so we don't try to refit again
         ATH_MSG_VERBOSE("Setting m_refit_track_map["<<  ftk_track_index <<"]=-2");
-	m_nErrors++;
       } else {
         ATH_MSG_VERBOSE( "fillTrackCache: Track Refit SUCEEDED ");
         ATH_MSG_VERBOSE( "fillTrackCache:  adding refitted track to cache at index " <<  m_refit_tracks->size() << " corresponding to FTK track " << ftk_track_index);
@@ -860,63 +848,58 @@ bool FTK_DataProviderSvc::fillVertexContainerCache(bool withRefit, xAOD::TrackPa
   xAOD::VertexAuxContainer* myVertexAuxContainer = nullptr;
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> myVxContainers = std::make_pair( myVertexContainer, myVertexAuxContainer );
   
-  if (tps->size() > 1) {
-    ATH_MSG_DEBUG( "fillVertexContainerCache: finding vertices from " << tps->size() << " TrackParticles ");
-    
-    std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> theXAODContainers = m_VertexFinderTool->findVertex(tps);
+  ATH_MSG_DEBUG( "fillVertexContainerCache: finding vertices from " << tps->size() << " TrackParticles ");
+  
+  std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> theXAODContainers = m_VertexFinderTool->findVertex(tps);
+  
+  if (theXAODContainers.first != nullptr) {
     
-    if (theXAODContainers.first != nullptr) {
+    if (theXAODContainers.first->size() >1 && m_doVertexSorting) {
+      ATH_MSG_DEBUG( "doing vertex sorting");
+      myVxContainers = m_VertexCollectionSortingTool->sortVertexContainer(*theXAODContainers.first);
+      delete theXAODContainers.first; 
+      delete theXAODContainers.second; 
+    } else {
+      ATH_MSG_DEBUG( "NOT doing vertex sorting");
       
-      if (theXAODContainers.first->size() >1 && m_doVertexSorting) {
-	ATH_MSG_DEBUG( "doing vertex sorting");
-	myVxContainers = m_VertexCollectionSortingTool->sortVertexContainer(*theXAODContainers.first);
-	delete theXAODContainers.first; 
-	delete theXAODContainers.second; 
-      } else {
-	ATH_MSG_DEBUG( "NOT doing vertex sorting");
-
-	myVxContainers.first = theXAODContainers.first;
-	myVxContainers.second = theXAODContainers.second;
-      }
-      if (myVxContainers.first != nullptr && myVxContainers.first->hasStore()) gotVertices=true;
+      myVxContainers.first = theXAODContainers.first;
+      myVxContainers.second = theXAODContainers.second;
     }
-  }
-  if (!gotVertices) {
-    ATH_MSG_DEBUG( "failed to make vertices, creating empty collection");
-    myVxContainers.first = new  xAOD::VertexContainer();
-    myVxContainers.second = new  xAOD::VertexAuxContainer();
-    myVxContainers.first->setStore( myVxContainers.second);
-    gotVertices=true;
-  }
+    if (myVxContainers.first != nullptr && myVxContainers.first->hasStore()) {
+      gotVertices=true;
   
-  std::string cacheName= m_vertexCacheName;
-  if (withRefit) cacheName+="Refit";
+      std::string cacheName= m_vertexCacheName;
+      if (withRefit) cacheName+="Refit";
   
-  StatusCode sc = m_storeGate->record(myVxContainers.first, cacheName);
-  if (sc.isFailure()) {
-    ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexCollection " << cacheName );
-    delete(myVxContainers.first);
-    delete(myVxContainers.second);
-    gotVertices=false;
-  } else {
-    sc = m_storeGate->record(myVxContainers.second, cacheName+"Aux.");
-    if (sc.isFailure()) {
-      ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexAuxCollection " << cacheName );
-      delete(myVxContainers.second);
-      gotVertices=false;
-    }
-  }
+      StatusCode sc = m_storeGate->record(myVxContainers.first, cacheName);
+      if (sc.isFailure()) {
+	ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexCollection " << cacheName );
+	delete(myVxContainers.first);
+	delete(myVxContainers.second);
+	gotVertices=false;
+      } else {
+	sc = m_storeGate->record(myVxContainers.second, cacheName+"Aux.");
+	if (sc.isFailure()) {
+	  ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexAuxCollection " << cacheName );
+	  delete(myVxContainers.second);
+	  gotVertices=false;
+	}
+      }
   
-  if (gotVertices) {
-    if (withRefit) {
-      m_refit_vertex = myVxContainers.first;
-    } else {
-      m_conv_vertex = myVxContainers.first;
+      if (gotVertices) {
+	if (withRefit) {
+	  m_refit_vertex = myVxContainers.first;
+	} else {
+	  m_conv_vertex = myVxContainers.first;
+	}
+    
+	ATH_MSG_DEBUG( "fillVertexContainerCache: got "<< myVxContainers.first->size() << " vertices");
+      }
     }
     
-    ATH_MSG_DEBUG( "fillVertexContainerCache: got "<< myVxContainers.first->size() << " vertices");
   }
-    
+   
+  if (!gotVertices) gotVertices = makeDummyVertex(withRefit);
   return gotVertices;
 }
 
@@ -928,118 +911,49 @@ xAOD::VertexContainer* FTK_DataProviderSvc::getVertexContainer(const bool withRe
    xAOD::VertexContainer* userVertex = new xAOD::VertexContainer(SG::VIEW_ELEMENTS);
 #endif
 
-   bool doVertexing = m_doVertexing;
-   if (this->nRawTracks() <2) doVertexing = false;
-   if (doVertexing) {
-     if (fillTrackParticleCache(withRefit).isSuccess()) {
-       if (withRefit && m_refit_tp->size()<2) doVertexing=false;
-       if ((!withRefit) && m_conv_tp->size()<2) doVertexing=false;
-     }
-   }
-   if (!doVertexing) {
-
-     // must always create a VertexContainer in StoreGate
-     
-     std::string cacheName= m_vertexCacheName;
-     if (withRefit) cacheName+="Refit";
-     if (!m_storeGate->contains<xAOD::VertexContainer>(cacheName)) {
-       xAOD::VertexContainer* vertex = new xAOD::VertexContainer();
-       xAOD::VertexAuxContainer* vertexAux =new xAOD::VertexAuxContainer();
-       vertex->setStore(vertexAux);
-      StatusCode sc = m_storeGate->record(vertex, cacheName);
-      if (sc.isFailure()) {
-	ATH_MSG_DEBUG( "getVertexContainer: Failed to record VertexCollection " << cacheName );
-	delete(vertex);
-	delete(vertexAux);
-      } else {
-	sc = m_storeGate->record(vertexAux, cacheName+"Aux.");
-	if (sc.isFailure()) {
-	  ATH_MSG_DEBUG( "getVertexContainer: Failed to record VertexAuxCollection " << cacheName );
-	  delete(vertexAux);
-	} else {
-	  ATH_MSG_DEBUG( "recorded empty VertexContainer in storegate");
-	}
-      }
-     }	  
-     return userVertex;
-   }
 
-   if (withRefit) { // get vertex from refitted tracks
-     if (!m_got_refit_vertex) {
-       ATH_MSG_DEBUG( "getVertexContainer: filling VertexContainer from refitted tracks ");
-      m_got_refit_vertex = fillVertexContainerCache(withRefit, m_refit_tp);
-     }
-     if (m_got_refit_vertex) {
-       ATH_MSG_DEBUG( "getVertexContainer: cache contains " << m_refit_vertex->size() <<  " vertices from refitted tracks");
-       for (auto pv = m_refit_vertex->begin(); pv != m_refit_vertex->end(); ++pv) {
-	 userVertex->push_back(*pv);
-       }
-     }
-   } else {   // get vertex from converted tracks
-     if (!m_got_conv_vertex) {
-       ATH_MSG_DEBUG( "getVertexContainer: filling VertexContainer from converted tracks ");
-       m_got_conv_vertex = fillVertexContainerCache(withRefit, m_conv_tp);
-     }
-     if (m_got_conv_vertex) {
-       ATH_MSG_DEBUG( "getVertexContainer: cache contains " << m_conv_vertex->size() <<  " vertices from converted tracks");
-       for (auto pv = m_conv_vertex->begin(); pv != m_conv_vertex->end(); ++pv) {
-	 userVertex->push_back(*pv);
-       }
-     }
-   }
+   StatusCode sc = this->getVertexContainer(userVertex,withRefit);
+   if (sc.isFailure()) ATH_MSG_DEBUG(" No Vertices created");
    return userVertex;
 }
   
 
 StatusCode FTK_DataProviderSvc::getVertexContainer(xAOD::VertexContainer* userVertex, const bool withRefit){
 
-  if ((!m_doVertexing) || fillTrackParticleCache(withRefit).isFailure()) {
-    // must always create a VertexContainer in StroreGate
-    
-    std::string cacheName= m_vertexCacheName;
-    if (withRefit) cacheName+="Refit";
-    if (!m_storeGate->contains<xAOD::VertexContainer>(cacheName)) {
-      xAOD::VertexContainer* vertex = new xAOD::VertexContainer();
-      xAOD::VertexAuxContainer* vertexAux =new xAOD::VertexAuxContainer();
-      vertex->setStore(vertexAux);
-      StatusCode sc = m_storeGate->record(vertex, cacheName);
-      if (sc.isFailure()) {
-	ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexCollection " << cacheName );
-	delete(vertex);
-	delete(vertexAux);
-      } else {
-	sc = m_storeGate->record(vertexAux, cacheName+"Aux.");
-	if (sc.isFailure()) {
-	  ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexAuxCollection " << cacheName );
-	  delete(vertexAux);
-	}
-      }
+  bool doVertexing = m_doVertexing;
+  if (this->nRawTracks() <2) doVertexing = false;
+  if (doVertexing) {
+    if (fillTrackParticleCache(withRefit).isSuccess()) {
+      if (withRefit && m_refit_tp->size()<2) doVertexing=false;
+      if ((!withRefit) && m_conv_tp->size()<2) doVertexing=false;
     }
-    
-    return StatusCode::SUCCESS;
   }
+  
 
   if (withRefit) { // get vertex from refitted tracks
     if (!m_got_refit_vertex) {
-      ATH_MSG_DEBUG( "getVertexContainer: filling VertexContainer from refitted tracks ");
-      m_got_refit_vertex = fillVertexContainerCache(withRefit, m_refit_tp);
+      if (doVertexing) {
+	ATH_MSG_DEBUG( "getVertexContainer: filling VertexContainer from refitted tracks ");
+	m_got_refit_vertex = fillVertexContainerCache(withRefit, m_refit_tp);
+      } else m_got_refit_vertex = makeDummyVertex(withRefit);
     }
     if (m_got_refit_vertex) {
       ATH_MSG_DEBUG( "getVertexContainer: cache contains " << m_refit_vertex->size() <<  " vertices from refitted tracks");
       for (auto pv = m_refit_vertex->begin(); pv != m_refit_vertex->end(); ++pv) {
-        userVertex->push_back(new xAOD::Vertex(*(*pv)));
+	userVertex->push_back(*pv);
       }
     }
   } else {   // get vertex from converted tracks
     if (!m_got_conv_vertex) {
-      ATH_MSG_DEBUG( "getVertexContainer: filling VertexContainer from converted tracks ");
-      m_got_conv_vertex = fillVertexContainerCache(withRefit, m_conv_tp);
+      if (doVertexing) {
+	ATH_MSG_DEBUG( "getVertexContainer: filling VertexContainer from converted tracks ");
+	m_got_conv_vertex = fillVertexContainerCache(withRefit, m_conv_tp);
+      } else m_got_conv_vertex = makeDummyVertex(withRefit);
     }
     if (m_got_conv_vertex) {
       ATH_MSG_DEBUG( "getVertexContainer: cache contains " << m_conv_vertex->size() <<  " vertices from converted tracks");
       for (auto pv = m_conv_vertex->begin(); pv != m_conv_vertex->end(); ++pv) {
-	xAOD::Vertex* vert = new xAOD::Vertex(*(*pv));
-        userVertex->push_back(vert);
+	userVertex->push_back(*pv);
       }
     }
   }
@@ -1047,6 +961,46 @@ StatusCode FTK_DataProviderSvc::getVertexContainer(xAOD::VertexContainer* userVe
 
 }
 
+bool FTK_DataProviderSvc::makeDummyVertex(bool withRefit) {
+
+  std::string cacheName= m_vertexCacheName;
+  if (withRefit) cacheName+="Refit";
+  if (m_storeGate->contains<xAOD::VertexContainer>(cacheName)) return true;
+  
+  xAOD::VertexContainer* theVxContainer =new xAOD::VertexContainer();
+  xAOD::VertexAuxContainer* theVxAuxContainer = new xAOD::VertexAuxContainer(); 
+  theVxContainer->setStore(theVxAuxContainer);
+  // Add the dummy vertex
+  xAOD::Vertex *dummyvtx = new xAOD::Vertex();
+  theVxContainer->push_back(dummyvtx);  // put vertex in container so it has Aux store
+  dummyvtx->setVertexType(xAOD::VxType::NoVtx);  // now safe to set member variable
+  dummyvtx->vxTrackAtVertex() = std::vector<Trk::VxTrackAtVertex>();
+  dummyvtx->setPosition( m_BeamCondSvc->beamVtx().position() );
+  dummyvtx->setCovariancePosition( m_BeamCondSvc->beamVtx().covariancePosition() );
+  ATH_MSG_DEBUG("Adding Dummy Vertex at position of Beam Vertex (x,y,z)= "  << m_BeamCondSvc->beamVtx().position().x() << ", "  << m_BeamCondSvc->beamVtx().position().y() << ", " << m_BeamCondSvc->beamVtx().position().z());
+    
+  StatusCode sc = m_storeGate->record(theVxContainer, cacheName);
+  if (sc.isFailure()) {
+    ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexCollection " << cacheName );
+    delete(theVxContainer);
+    delete(theVxAuxContainer);
+    return false;
+  } else {
+    sc = m_storeGate->record(theVxAuxContainer, cacheName+"Aux.");
+    if (sc.isFailure()) {
+      ATH_MSG_DEBUG( "fillVertexContainerCache: Failed to record VertexAuxCollection " << cacheName );
+      delete(theVxAuxContainer);
+      return false;
+    }
+  }
+  if (withRefit) {
+    m_refit_vertex = theVxContainer;
+  } else {
+    m_conv_vertex = theVxContainer;
+  }
+  return true;
+}
+
 
 
 TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit, unsigned int& nErrors){
@@ -1178,7 +1132,6 @@ Trk::Track* FTK_DataProviderSvc::getCachedTrack(const unsigned int ftk_track_ind
         m_trackSumTool->updateTrack(*track);
       } else {
         m_conv_track_map[ftk_track_index] = -2;
-	m_nErrors++;
         ATH_MSG_VERBOSE( "getCachedTrack: conversion failed, marking ftk track with index " << ftk_track_index << " as bad");
       }
 
@@ -1206,8 +1159,6 @@ Trk::Track* FTK_DataProviderSvc::getCachedTrack(const unsigned int ftk_track_ind
     if (refitTrack == nullptr) {
       ATH_MSG_VERBOSE( "getCachedTrack:  failed to retrieve refitted track with index " << m_refit_track_map[ftk_track_index] << " corresponding to FTK track " << ftk_track_index);
       m_refit_track_map[ftk_track_index] = -2;
-      m_nErrors++;
-
     }
 
   } else if (m_conv_track_map[ftk_track_index] != -2 && m_refit_track_map[ftk_track_index]!=-2){
@@ -1217,7 +1168,6 @@ Trk::Track* FTK_DataProviderSvc::getCachedTrack(const unsigned int ftk_track_ind
     if(newRefitTrack == nullptr ) {
       ATH_MSG_DEBUG("getCachedTrack: refit failed - refitted track coresponding to FTK track with index " << ftk_track_index << " has NOT added to  output collection");
       m_refit_track_map[ftk_track_index] = -2;
-      m_nErrors++;
       return nullptr;
     } else {
       ATH_MSG_VERBOSE( "getCachedTrack: Track Refit SUCEEDED");
@@ -1258,7 +1208,6 @@ void FTK_DataProviderSvc::getFTK_RawTracksFromSG(){
   
   // new event - get the tracks from StoreGate
   if (!m_storeGate->contains<FTK_RawTrackContainer>(m_RDO_key)) {
-    
     ATH_MSG_DEBUG( "getFTK_RawTracksFromSG: FTK tracks  "<< m_RDO_key <<" not found in StoreGate !");
   } else {    
     
@@ -1576,6 +1525,8 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
   // Create the SCT Clusters
   //
 
+
+
   std::vector<const Trk::RIO_OnTrack*> SCT_Clusters;
 
   ATH_MSG_VERBOSE( "   ConvertTrack: SCTClusterLoop: SCT Clusters size = " << track.getSCTClusters().size());
@@ -1708,6 +1659,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
 
 const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const IdentifierHash hash, const FTK_RawSCT_Cluster& raw_cluster, const Trk::TrackParameters& trkPerigee) {
 
+
   const int rawStripCoord= raw_cluster.getHitCoord();
   int clusterWidth=raw_cluster.getHitWidth();
 
@@ -1726,8 +1678,6 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const IdentifierH
 
   const InDetDD::SiDetectorElement* pDE = getSCTDetectorElement(hash);
 
-  //const InDetDD::SiDetectorElement* pDE = m_SCT_Manager->getDetectorElement(hash);
-
   ATH_MSG_VERBOSE( " SCT FTKHit HitCoord rawStripCoord" << rawStripCoord << " hashID 0x" << std::hex << hash << std::dec << " " << m_id_helper->print_to_string(pDE->identify()));
 
   Identifier wafer_id = m_sctId->wafer_id(hash);
@@ -1768,7 +1718,8 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const IdentifierH
 
   const double width((double(nStrips)/double(nStrips+1))*( lastStripPos.xPhi()-firstStripPos.xPhi()));
   const InDetDD::SiLocalPosition centre((firstStripPos+lastStripPos)/2.0);
-
+  
+  // Cluster is created without the Lorentz shift. The cluster on track includes the shift
   Amg::Vector2D localPos(centre.xPhi(),  centre.xEta());
 
   ATH_MSG_VERBOSE(" centre.xPhi() " << centre.xPhi()  << " centre.xEta() " << centre.xEta());
@@ -1779,6 +1730,8 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const IdentifierH
   ATH_MSG_VERBOSE(" creating SiWidth with nstrips   = " << clusterWidth << " width " << width << " stripLength " << stripLength);
   InDet::SiWidth siWidth(Amg::Vector2D(clusterWidth,1), Amg::Vector2D(width,stripLength) );
 
+  Amg::Vector2D position(localPos[Trk::locX], localPos[Trk::locY]);
+
   Amg::MatrixX* cov = new Amg::MatrixX(2,2);
   cov->setZero();
 
@@ -1803,7 +1756,7 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const IdentifierH
     ATH_MSG_VERBOSE(" pDE->sinStereoLocal(localPos) " << pDE->sinStereoLocal(localPos) << " pDE->phiPitch(localPos) " << pDE->phiPitch(localPos) << " pDE->phiPitch() " << pDE->phiPitch() << " siWidth.phiR() " << siWidth.phiR() << " siWidth.z() " << siWidth.z() );
   }
 
-  InDet::SCT_Cluster* pCL = new InDet::SCT_Cluster(strip_id, localPos, rdoList, siWidth, pDE, cov);
+  InDet::SCT_Cluster* pCL = new InDet::SCT_Cluster(strip_id, position, rdoList, siWidth, pDE, cov);
   ATH_MSG_VERBOSE("covariance " << (*cov)(0,0) << ", " << (*cov)(0,1));
   ATH_MSG_VERBOSE("           " << (*cov)(1,0) << ", " << (*cov)(1,1)) ;
 
@@ -1818,18 +1771,16 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const IdentifierH
     pColl->push_back(pCL);
 
     if (m_correctSCTClusters) {
-      //	  const Trk::PrepRawData* cluster = sct_cluster;
       sct_cluster_on_track= m_ROTcreator->correct(*pCL,trkPerigee);
     }
-    
-    if (!m_correctSCTClusters || sct_cluster_on_track == nullptr) {
-      
+
+     if (!m_correctSCTClusters || sct_cluster_on_track == nullptr) {
       const double shift = m_sctLorentzAngleTool->getLorentzShift(hash);
-      Amg::Vector2D locPosShifted(pCL->localPosition()[Trk::locX]+shift,pCL->localPosition()[Trk::locY]);
+      Amg::Vector2D locPos(pCL->localPosition()[Trk::locX]+shift,pCL->localPosition()[Trk::locY]);
       ATH_MSG_VERBOSE("locX "<< pCL->localPosition()[Trk::locX] << " locY " << pCL->localPosition()[Trk::locY] << " lorentz shift " << shift);
-      
+
       sct_cluster_on_track = new InDet::SCT_ClusterOnTrack (pCL,
-							    locPosShifted,
+							    locPos,
 							    pCL->localCovariance(),
 							    idHash,
 							    pCL->globalPosition(),m_broadSCT_Errors); // last parameter: isbroad=true
@@ -1867,6 +1818,9 @@ float FTK_DataProviderSvc::dphi(const float p1, const float p2) const {
   return diff1;
 }
 
+
+
+
 const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const IdentifierHash hash, const FTK_RawPixelCluster& raw_pixel_cluster,  const Trk::TrackParameters& trkPerigee) {
 
   Identifier wafer_id = m_pixelId->wafer_id(hash); // Need to set up this tool
@@ -1940,8 +1894,6 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const Identifie
   }
 
 
-  //  double shift = pixelDetectorElement->getLorentzCorrection();
-
   ATH_MSG_VERBOSE( "Cluster position phiPos, etaPos "<<  phiPos << ", " << etaPos);
 
   if ( etaPos >  design->length()/2.) {
@@ -1989,6 +1941,7 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const Identifie
 
   InDet::SiWidth siWidth(Amg::Vector2D(phiWidth,etaWidth),Amg::Vector2D(phiW,etaW));
 
+  //  Amg::Vector2D position(phiPos+shift,etaPos);
   Amg::Vector2D position(phiPos,etaPos);
 
   //  ATH_MSG_VERBOSE("FTK_DataProviderSvc::createPixelCluster: local coordinates phiPos, etaPos"<<  phiPos+shift << ", " << etaPos << " includes Lorentz shift " << shift);
@@ -2008,18 +1961,17 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const Identifie
 
   ATH_MSG_VERBOSE("Setting defaulterrors (*cov)(0,0) " <<  (*cov)(0,0) << " (*cov)(1,1)" << (*cov)(1,1) );
 
-  ATH_MSG_VERBOSE("Using offlineCalibSvc" );
   const Amg::Vector2D& colRow = siWidth.colRow();
   double averageZPitch = siWidth.z()/colRow.y();
   ATH_MSG_VERBOSE(" siWidth.colRow() " << siWidth.colRow());
   ATH_MSG_VERBOSE(" siWidth.z() " << siWidth.z() <<   " colRow.y() " << colRow.y() << "  averageZpitch " << averageZPitch  );
-  
-  
+
+
   // use parameterization only if the cluster does not
   // contain long pixels or ganged pixels
   // Also require calibration service is available....
   
-  double eta = -std::log(std::tan(trkPerigee.parameters()[Trk::theta]/2.));
+  double eta = std::fabs(std::log(std::tan(trkPerigee.parameters()[Trk::theta]/2.)));
   
   
   if(averageZPitch > 399*micrometer && averageZPitch < 401*micrometer){
@@ -2044,7 +1996,7 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const Identifie
   }
 
   InDet::PixelCluster* pixel_cluster = new InDet::PixelCluster(pixel_id, position, rdoList, siWidth,
-      pixelDetectorElement, cov);
+							       pixelDetectorElement, cov);
   ATH_MSG_VERBOSE("covariance " << (*cov)(0,0) << ", " << (*cov)(0,1));
   ATH_MSG_VERBOSE("           " << (*cov)(1,0) << ", " <<   (*cov)(1,1)) ;
 
@@ -2066,7 +2018,6 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const Identifie
     if (!m_correctPixelClusters || pixel_cluster_on_track==nullptr) {
       const double shift = m_pixelLorentzAngleTool->getLorentzShift(hash);
       Amg::Vector2D locPos(pixel_cluster->localPosition()[Trk::locX]+shift,pixel_cluster->localPosition()[Trk::locY]);
-
       ATH_MSG_VERBOSE("locX "<< pixel_cluster->localPosition()[Trk::locX] << " locY " << pixel_cluster->localPosition()[Trk::locY] << " lorentz shift " << shift);
       pixel_cluster_on_track=new InDet::PixelClusterOnTrack (pixel_cluster,
 							     locPos,
@@ -2246,6 +2197,7 @@ void FTK_DataProviderSvc::handle(const Incident& incident) {
     for (auto& it :  m_nFailedPixelClusters) it=0;
     for (auto& it :  m_nMissingSCTClusters) it=0;
     for (auto& it :  m_nMissingPixelClusters) it=0;
+
   }
 }
 
@@ -2282,4 +2234,3 @@ const InDetDD::SiDetectorElement* FTK_DataProviderSvc::getSCTDetectorElement(con
   if (not condData.isValid()) return nullptr;
   return condData->getDetectorElement(hash);
 }
-
diff --git a/Trigger/TrigFTK/FTK_RecExample/python/FTKJobProperties.py b/Trigger/TrigFTK/FTK_RecExample/python/FTKJobProperties.py
new file mode 100644
index 000000000000..9806bd659119
--- /dev/null
+++ b/Trigger/TrigFTK/FTK_RecExample/python/FTKJobProperties.py
@@ -0,0 +1,146 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+##
+## @file FTK_RecExample/python/FTKJobProperties.py
+## @purpose Allow configuration of FTK settings via JobProperties
+
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
+
+class Enabled(JobProperty):
+  statusOn=True
+  allowedTypes=['bool']
+  StoredValue=True
+  
+  def set_On_NoDoAction(self, obj):
+    """ Sets statusOn equals to True w/o _do_action.
+    """
+    if not(obj._locked):
+      obj.__dict__['statusOn']=True
+    else:
+      obj._log.info('The JobProperty %s is blocked' % obj.__name__)
+ 
+  def set_Off_NoDoAction(self, obj):
+    """ Sets statusOn equals to False w/o _undo_action.
+    """
+    if not(obj._locked):
+      obj.__dict__['statusOn']=False
+    else:
+      obj._log.info('The JobProperty %s is blocked' % obj.__name__)
+ 
+  def _do_action(self):
+    for obj in self._the_same_context_objects():
+      self.set_On_NoDoAction(obj)
+
+  def _undo_action(self):
+    for obj in self._the_same_context_objects():
+      self.set_Off_NoDoAction(obj)
+ 
+  def _the_same_context_objects(self):
+    context = self._context_name.partition('.'+self.__name__)
+    objects = list()
+
+    for i in self.__class__._nInstancesContextDict.keys():
+      oname = self.__class__._nInstancesContextDict[i].__name__
+      ocontext = self.__class__._nInstancesContextDict[i]._context_name.partition('.'+oname)
+      if context !=  ocontext:
+        #print ocontext
+        if context[0] == ocontext[0]:
+          objects.append(self.__class__._nInstancesContextDict[i])
+    return objects
+
+class FTKFlagsJobProperty(JobProperty):
+  """ This class stores if a user changed a property once in the variable setByUser
+  """
+  setByUser = False
+  
+  def _do_action (self):
+    self.setByUser = True
+ 
+  def _undo_action (self):
+    self.setByUser = True
+        
+  def get_Value(self):
+    if (self.allowedTypes[0] == 'bool'):
+      return self.statusOn and self.StoredValue
+    else:
+      return self.StoredValue
+
+class doPrintConfigurables(FTKFlagsJobProperty):
+  """if this is on the all the print lines are activated"""
+  statusOn     = True
+  allowedTypes = ['bool']
+  StoredValue  = True
+
+class doSmearing(FTKFlagsJobProperty):
+  """ Simulate FTK tracks by smearing HLT tracks """
+  statusOn=True
+  allowedTypes=['bool']
+  StoredValue=False
+
+class doTruthLinks(FTKFlagsJobProperty):
+  """ Create Duplicate xAOD collections with Truth Links """
+  statusOn=True
+  allowedTypes=['bool']
+  StoredValue=False
+
+class doDetailedTruth(FTKFlagsJobProperty):
+  """ Add Additional parameters to TruthParticles """
+  statusOn=True
+  allowedTypes=['bool']
+  StoredValue=False
+
+ 
+class FTKJobProperties(JobPropertyContainer):
+  """Container for the FTK flags
+  """
+
+  def __init__(self, context=''):
+     #allow specifying context (used by the trigger) 
+     JobPropertyContainer.__init__(self,context)
+   
+  def checkThenSet (self, jp, value):
+    # checks if a variable has been changed by the user before
+    if not jp.setByUser:
+      jp.set_Value (value)
+       
+  def setupDefaults(self):
+    self.checkThenSet(self.doSmearing   , False)
+
+
+  def init(self):
+    #Method to do the final setup of the flags according to user input before.
+    #This method MUST ONLY BE CALLED once in FTK_RecExample/FTKRec_jobOptions.py!!
+    if not self.Enabled:
+      print 'FTKFlags.init(): FTK flags are disabled. Locking container and not doing anything else.'
+    else:
+      print 'Initializing FTKJobProperties with DetFlags, GlobalFlags and other high level flags.'
+      # THIS METHOD MUST BE THE FIRST TO BE CALLED. DO NOT MOVE IT OR ADD THINGS IN FRONT
+      self.setupDefaults()
+      
+  def printInfo(self) :
+    print '****** FTK Flags ********************************************************'
+    if self.doSmearing() :
+      print '*'
+      print '* --------------------> FTK tracks will be simulated by smearing HLT tracks'
+      print '*'
+
+
+     
+## adding the container to the general top-level container
+jobproperties.add_Container(FTKJobProperties)
+
+## adding FTK flags to the FTKJobProperties container
+_list_FTKJobProperties = [Enabled,
+                          doPrintConfigurables,
+                          doSmearing,
+                          doTruthLinks,
+                          doDetailedTruth
+                          ]
+
+for j in _list_FTKJobProperties: 
+  jobproperties.FTKJobProperties.add_JobProperty(j)
+
+#define shortcut
+## Note: you still have to import it:
+## >>> from FTK_RecExample.FTKJobProperties import FTKFlags
+FTKFlags = jobproperties.FTKJobProperties
diff --git a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
index 0ec272d12781..47b747bc778f 100644
--- a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
+++ b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
@@ -1,9 +1,12 @@
 include.block('FTK_RecExample/FTKRec_jobOptions.py')
 
+from FTK_RecExample.FTKJobProperties import FTKFlags
+FTKFlags.init()
+
 from RecExConfig.RecFlags import rec
 from AthenaCommon.BeamFlags import jobproperties
  
-if rec.doFTK():
+if rec.doFTK() and (globalflags.InputFormat() == 'bytestream' or rec.readRDO):
     from AthenaCommon.GlobalFlags import GlobalFlags
     if rec.doFTK() and globalflags.InputFormat() == 'bytestream':
         ByteStreamAddressProviderSvc = Service( "ByteStreamAddressProviderSvc")
@@ -38,7 +41,7 @@ if rec.doFTK():
     alg += FTK_RDO_Reader 
     
 
-    if rec.doTruth() and (rec.doWriteAOD() or rec.doWriteESD()):
+    if FTKFlags.doTruthLinks() and rec.doTruth() and (rec.doWriteAOD() or rec.doWriteESD()):
         include ('FTK_RecExample/ConfiguredFTK_TrackTruth.py')
         FTK_TracksTruth = ConfiguredFTK_TrackTruth(Tracks="FTK_TrackCollection",
                                                 TracksTruth = "FTK_Tracks_TruthCollection",
@@ -68,28 +71,3 @@ if rec.doFTK():
         FTKRefitTrackParticleCnvAlg.PrintIDSummaryInfo = True
         topSequence += FTKRefitTrackParticleCnvAlg
 
-        augmentation_tools = []
-        from DerivationFrameworkInDet.DerivationFrameworkInDetConf import (DerivationFramework__TrackParametersForTruthParticles)
-
-        TruthDecor = DerivationFramework__TrackParametersForTruthParticles(
-           name="TruthTPDecor",
-           TruthParticleContainerName="TruthParticles",
-           DecorationPrefix="")
-        augmentation_tools.append(TruthDecor)
-
-        # Set up derivation framework
-        from AthenaCommon import CfgMgr
-        
-        theFTKseq = CfgMgr.AthSequencer("FTKSeq")
-        from DerivationFrameworkCore.DerivationFrameworkCoreConf import (
-            DerivationFramework__CommonAugmentation)
-        
-        from AthenaCommon.AppMgr import ToolSvc
-        ToolSvc += DerivationFramework__TrackParametersForTruthParticles('TruthTPDecor')
-        theFTKseq += CfgMgr.DerivationFramework__CommonAugmentation(
-          "TSOS_Kernel",
-          AugmentationTools=augmentation_tools,
-          OutputLevel=INFO)
-        topSequence += theFTKseq
-
-
-- 
GitLab


From 40fcc26b66fbd9ac7a7583fc3e950d30d9e2fa45 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 1 May 2019 17:35:05 +0100
Subject: [PATCH 036/129] Try to change some dynamic_cast to the kind manual
 RTTI provided by the Trk::Surface

---
 .../src/InDetTrackHoleSearchTool.cxx          | 36 ++++++++++++-------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
index dd71686355e4..95f87757994e 100644
--- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
@@ -303,13 +303,15 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
     // get sct volume
     const Trk::TrackingVolume* sctVolume = trackingGeometry->trackingVolume("InDet::Detectors::SCT::Barrel"); 
     //get BoundarySurface for cylinder between sct and trt
-    const Trk::CylinderSurface* sctCylinder = dynamic_cast<const Trk::CylinderSurface*>
-      (sctVolume->boundarySurfaces()[Trk::tubeOuterCover].getPtr());
+    const Trk::CylinderSurface* sctCylinder = nullptr;
+    const Trk::Surface* sctSurface= &(sctVolume->boundarySurfaces()[Trk::tubeOuterCover].getPtr()->surfaceRepresentation());
+    if(sctSurface->type()==Trk::Surface::Cylinder){
+      sctCylinder= static_cast<const Trk::CylinderSurface*> (sctSurface);
+    }
     if (!sctCylinder) {
       ATH_MSG_ERROR ("cast to CylinderSurface failed, should never happen !");
       return false;
     }
-
     // extrapolate track to cylinder; take this as starting point for hole search
 
     if (firstsipar) {
@@ -326,14 +328,20 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
       ATH_MSG_DEBUG("no start parameters on SCT cylinder, try TRT ec disc");
       // get BoundarySurface for disk which encloses TRT ECs
       // depending on track origin use neg or pos EC
-      const Trk::DiscSurface* trtDisc;
+      const Trk::DiscSurface* trtDisc=nullptr;
       // inverse logic: tracks with theta < M_PI/2 have origin in negative EC
       if (firstsipar->parameters()[Trk::theta] < M_PI/2.) {
         const Trk::TrackingVolume* trtVolume = trackingGeometry->trackingVolume("InDet::Detectors::TRT::NegativeEndcap");
-        trtDisc = dynamic_cast<const Trk::DiscSurface*> (trtVolume->boundarySurfaces()[Trk::negativeFaceXY].getPtr());
+        const Trk::Surface* trtSurface = &(trtVolume->boundarySurfaces()[Trk::negativeFaceXY].getPtr()->surfaceRepresentation());
+        if(trtSurface->type()==Trk::Surface::Disc){
+          trtDisc = static_cast<const Trk::DiscSurface*> (trtSurface);
+        }
       } else {
         const Trk::TrackingVolume* trtVolume = trackingGeometry->trackingVolume("InDet::Detectors::TRT::PositiveEndcap");  
-        trtDisc = dynamic_cast<const Trk::DiscSurface*> (trtVolume->boundarySurfaces()[Trk::positiveFaceXY].getPtr());
+        const Trk::Surface* trtSurface = &(trtVolume->boundarySurfaces()[Trk::positiveFaceXY].getPtr()->surfaceRepresentation());
+        if(trtSurface->type()==Trk::Surface::Disc){
+          trtDisc = static_cast<const Trk::DiscSurface*> (trtSurface);
+        }
       }
       // extrapolate track to disk
       startParameters = m_extrapolator->extrapolate(*firstsipar,
@@ -382,7 +390,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
   if (m_cosmic) {
     while (iterTSOS!=track.trackStateOnSurfaces()->end()
            && (!(*iterTSOS)->type(Trk::TrackStateOnSurface::Measurement)
-               || !dynamic_cast<const Trk::PlaneSurface*>(&(*iterTSOS)->measurementOnTrack()->associatedSurface()))) {
+               || (*iterTSOS)->measurementOnTrack()->associatedSurface().type()!=Trk::Surface::Plane)) {
       iterTSOS++;
     }
   }
@@ -401,7 +409,12 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
         ((*iterTSOS)->type(Trk::TrackStateOnSurface::Perigee) && m_cosmic)) {
       hasID=false;
       per=nullptr;
-      if (m_cosmic && (*iterTSOS)->trackParameters()) per=dynamic_cast<const Trk::Perigee*>((*iterTSOS)->trackParameters());
+      const Trk::TrackParameters* tmpParam= (*iterTSOS)->trackParameters();
+      if (m_cosmic && tmpParam) {
+        if(tmpParam->associatedSurface().type()==Trk::Surface::Perigee){
+          per=static_cast<const Trk::Perigee*>(tmpParam) ;
+        }
+      }
       if ((*iterTSOS)->measurementOnTrack() != nullptr
           && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement() != nullptr
           && (*iterTSOS)->measurementOnTrack()->associatedSurface().associatedDetectorElement()->identify() != 0) { 
@@ -452,7 +465,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
             id2 = (thisParameters->associatedSurface()).associatedDetectorElement()->identify();
           } else {
             ATH_MSG_VERBOSE("Surface has no detector element ID, skip it");
-            if (dynamic_cast<const Trk::Perigee*>(thisParameters)) {
+            if(thisParameters->associatedSurface().type()==Trk::Surface::Perigee){
               delete startParameters;
               startParameters = thisParameters->clone();
             }
@@ -462,10 +475,9 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
           // check if it is Si or Pixel
           if (!(m_atlasId->is_pixel(id2) || m_atlasId->is_sct(id2))) {
             ATH_MSG_VERBOSE("Surface is not Pixel or SCT, stop loop over parameters in this step");
-          
             // for collisions, we want to stop at the first trt measurement; whereas for cosmics not
             // here we will have trt measurements on the track before the first si measurement!
-            if (dynamic_cast<const Trk::Perigee*>(thisParameters)) {
+            if(thisParameters->associatedSurface().type()==Trk::Surface::Perigee){
               delete startParameters;
               startParameters = thisParameters->clone();
             }
@@ -543,7 +555,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track,
       
     Trk::CylinderVolumeBounds* cylinderBounds = new Trk::CylinderVolumeBounds(560, 2750); 
     // don't delete the cylinderBounds -> it's taken care of by Trk::VOlume (see Trk::SharedObject)
-    Trk::Volume* boundaryVol = new Trk::Volume(0, dynamic_cast<Trk::VolumeBounds*>(cylinderBounds)); 
+    Trk::Volume* boundaryVol = new Trk::Volume(0, cylinderBounds); 
     // extrapolate this parameter blindly to search for more Si hits (not very fast, I know)
     const std::vector<const Trk::TrackParameters*>* paramList = m_extrapolator->extrapolateBlindly(*startParameters,
                                                                                                    Trk::alongMomentum,
-- 
GitLab


From 839c8d1aacf8ca01894da170bc0493f60abf8d4e Mon Sep 17 00:00:00 2001
From: Jovan Mitrevski <jovan.mitrevski@cern.ch>
Date: Wed, 1 May 2019 19:26:35 +0000
Subject: [PATCH 037/129] Add new configs for egammaTrackTools and some
 TrackToCalo tools (ParticleCaloExtensionTool)

---
 .../RecoTools/TrackToCalo/CMakeLists.txt      |  1 +
 .../TrackToCalo/python/TrackToCaloConfig.py   | 44 +++++++++++
 .../python/egammaTrackToolsConfig.py          | 77 +++++++++++++++++++
 .../python/egammaTrackToolsFactories.py       |  8 +-
 .../src/EMExtrapolationTools.h                |  4 +-
 5 files changed, 128 insertions(+), 6 deletions(-)
 create mode 100644 Reconstruction/RecoTools/TrackToCalo/python/TrackToCaloConfig.py
 create mode 100644 Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py

diff --git a/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt b/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
index ebf49b98fe36..9f69ff39c852 100644
--- a/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
+++ b/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
@@ -56,3 +56,4 @@ atlas_add_component( TrackToCalo
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                      LINK_LIBRARIES ${EIGEN_LIBRARIES} CaloEvent CaloGeoHelpers GeoPrimitives xAODCaloEvent GaudiKernel ParticleCaloExtension RecoToolInterfaces TrackCaloClusterRecTools TrkCaloExtension TrkParametersIdentificationHelpers CaloDetDescrLib CaloIdentifier CaloUtilsLib AthenaBaseComps AtlasDetDescr FourMomUtils xAODMuon xAODTracking xAODTruth TrkSurfaces TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces TrackToCaloLib )
 
+atlas_install_python_modules( python/*.py )
diff --git a/Reconstruction/RecoTools/TrackToCalo/python/TrackToCaloConfig.py b/Reconstruction/RecoTools/TrackToCalo/python/TrackToCaloConfig.py
new file mode 100644
index 000000000000..ae294f673d56
--- /dev/null
+++ b/Reconstruction/RecoTools/TrackToCalo/python/TrackToCaloConfig.py
@@ -0,0 +1,44 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+__doc__ = "Tool configuration for the track to calo tools."
+
+#---------------------------------------
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+
+from TrkExTools.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
+from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__ParticleCaloCellAssociationTool
+
+def ParticleCaloExtensionToolCfg(flags, **kwargs):
+    acc=ComponentAccumulator()
+
+    if "Extrapolator" not in kwargs:
+        extrapAcc = AtlasExtrapolatorCfg(flags)
+        kwargs["Extrapolator"] = extrapAcc.popPrivateTools()
+        acc.merge(extrapAcc)
+
+    caloExtensionTool = Trk__ParticleCaloExtensionTool(**kwargs)
+
+    acc.setPrivateTools(caloExtensionTool)
+    return acc
+
+def ParticleCaloCellAssociationToolCfg(flags, **kwargs):
+    acc=ComponentAccumulator()
+
+    if "ParticleCaloExtensionTool" not in kwargs:
+        pcExtrapToolAcc = ParticleCaloExtensionToolCfg(flags)
+        kwargs["ParticleCaloExtensionTool"] = pcExtrapToolAcc.popPrivateTools()
+        acc.merge(pcExtrapToolAcc)
+
+    # should this be a more global flag? It depends on whether you are in AOD
+    kwargs.setdefault("CaloCellContainer", flag.Egamma.Keys.Input.CaloCells)
+
+    cellAssocTool = Rec__ParticleCaloCellAssociationTool(**kwargs)
+
+    acc.setPrivateTools(cellAssocTool)
+    return acc
+
+# Still to do, ParticleCaloClusterAssociationToolCfg and MuonCaloEnergyToolCfg
+# They still have public tools
+
+#---------------------------------------
+
diff --git a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py
new file mode 100644
index 000000000000..e27546698576
--- /dev/null
+++ b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsConfig.py
@@ -0,0 +1,77 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+__doc__ = "Tool configuration to instantiate all egammaCaloTools with default configuration"
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from TrkExTools.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
+from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
+from egammaTrackTools.egammaTrackToolsConf import EMExtrapolationTools
+
+def EMExtrapolationToolsCfg(flags, **kwargs):
+    acc=ComponentAccumulator()
+
+    if "Extrapolator" not in kwargs:
+        extrapAcc = AtlasExtrapolatorCfg(flags)
+        kwargs["Extrapolator"] = extrapAcc.popPrivateTools()
+        acc.merge(extrapAcc)
+
+    if "PerigeeCaloExtensionTool" not in kwargs:
+        perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags,
+                                                            name="PerigeeCaloExtensionTool",
+                                                            Extrapolator = kwargs["Extrapolator"],
+                                                            ParticleType = "electron",
+                                                            StartFromPerigee = True)
+        kwargs["PerigeeCaloExtensionTool"] = perigeeCaloExtrapAcc.popPrivateTools()
+        acc.merge(perigeeCaloExtrapAcc)
+
+    if "LastCaloExtensionTool" not in kwargs:
+        lastCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags,
+                                                         name="LastCaloExtensionTool",
+                                                         ParticleType = "electron",
+                                                         Extrapolator = kwargs["Extrapolator"])
+
+        kwargs["LastCaloExtensionTool"] = lastCaloExtrapAcc.popPrivateTools()
+        acc.merge(lastCaloExtrapAcc)
+    
+    
+
+    emExtrapolationTools = EMExtrapolationTools(**kwargs)
+    acc.setPrivateTools(emExtrapolationTools)
+    return acc
+
+def EMExtrapolationToolsCacheCfg(flags, **kwargs):
+    kwargs.setdefault("name", "EMExtrapolationToolsCache")
+    kwargs.setdefault("useCaching", True)
+    return EMExtrapolationToolsCfg(flags, **kwargs)
+
+
+# egammaTrkRefitterTool also needs a config, but depends on some tracking that is not ready
+
+# CaloCluster_OnTrackBuilder is currently not used at all
+
+
+if __name__ == "__main__":
+
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import DEBUG
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior = 1
+    log.setLevel(DEBUG)
+
+    ConfigFlags.Input.isMC = True
+    ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/myRDO.pool.root"]
+    ConfigFlags.lock()
+
+    cfg = ComponentAccumulator()
+    cfg.printConfig()
+    acc = EMExtrapolationToolsCfg(ConfigFlags)
+    acc.popPrivateTools()
+    cfg.merge(acc)
+    acc = EMExtrapolationToolsCacheCfg(ConfigFlags)
+    acc.popPrivateTools()
+    cfg.merge(acc)
+
+    f = open("egmvatools.pkl", "w")
+    cfg.store(f)
+    f.close()
diff --git a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py
index 5f8023227662..82ccb3a7616c 100644
--- a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py
+++ b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py
@@ -20,15 +20,15 @@ EMParticleCaloExtensionTool =  ToolFactory (CfgMgr.Trk__ParticleCaloExtensionToo
 
 EMExtrapolationTools = ToolFactory( egammaTrackToolsConf.EMExtrapolationTools,
                                     name ="EMExtrapolationTools",
-                                    LastCaloExtentionTool=EMLastCaloExtensionTool,
-                                    PerigeeCaloExtentionTool = EMParticleCaloExtensionTool,
+                                    LastCaloExtensionTool=EMLastCaloExtensionTool,
+                                    PerigeeCaloExtensionTool = EMParticleCaloExtensionTool,
                                     Extrapolator=egammaExtrapolator,
                                     useCaching=False)
 
 EMExtrapolationToolsCache = ToolFactory( egammaTrackToolsConf.EMExtrapolationTools,
                                          name ="EMExtrapolationToolsCache",
-                                         LastCaloExtentionTool=EMLastCaloExtensionTool,
-                                         PerigeeCaloExtentionTool = EMParticleCaloExtensionTool,
+                                         LastCaloExtensionTool=EMLastCaloExtensionTool,
+                                         PerigeeCaloExtensionTool = EMParticleCaloExtensionTool,
                                          Extrapolator=egammaExtrapolator,
                                          GSFPerigeeCache='GSFPerigeeCaloExtension',
                                          GSFLastCache='GSFLastCaloExtension',
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
index 282bd62f3e8d..32e9a57c4d1a 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.h
@@ -136,10 +136,10 @@ private:
   int getTRTsection(const xAOD::TrackParticle* trkPB) const;
 
   ToolHandle<Trk::IParticleCaloExtensionTool> m_lastParticleCaloExtensionTool {this,
-    "LastCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMLastCaloExtensionTool"};
+    "LastCaloExtensionTool", "Trk::ParticleCaloExtensionTool/EMLastCaloExtensionTool"};
 
   ToolHandle<Trk::IParticleCaloExtensionTool> m_perigeeParticleCaloExtensionTool {this,
-    "PerigeeCaloExtentionTool", "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"};
+    "PerigeeCaloExtensionTool", "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"};
 
   ToolHandle<Trk::IExtrapolator> m_extrapolator {this, 
     "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
-- 
GitLab


From 519069c75e74654738a37a6907ebf5197319f612 Mon Sep 17 00:00:00 2001
From: John Kenneth Anders <john.kenneth.anders@cern.ch>
Date: Wed, 1 May 2019 09:53:55 +0000
Subject: [PATCH 038/129] Merge branch '21.0-autconfig-2019' into '21.0'

Add data19 and data20 cosmics projects to autoconfiguration

See merge request atlas/athena!23056

(cherry picked from commit 6c2545409fc19cf7ec1ca8db8eb422e70ea4f03b)

31b68008 Add data19 and data20 cosmics projects
---
 .../RecExample/RecExConfig/python/AutoConfiguration.py       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py b/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
index b90cb19f36a6..5acd9f17f991 100644
--- a/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
+++ b/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
@@ -1,3 +1,4 @@
+
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 ##=============================================================================
@@ -24,7 +25,9 @@ KnownCosmicsProjects=frozenset(["data08_calocomm","data08_muoncomm","data08_cos"
                                 "data15_calib","data15_calocomm","data15_cos","data15_idcomm","data15_larcomm","data15_muoncomm","data15_tilecomm",
                                 "data16_calib","data16_calocomm","data16_cos","data16_idcomm","data16_larcomm","data16_muoncomm","data16_tilecomm",
                                 "data17_calib","data17_calocomm","data17_cos","data17_idcomm","data17_larcomm","data17_muoncomm","data17_tilecomm",
-                                "data18_calib","data18_calocomm","data18_cos","data18_idcomm","data18_larcomm","data18_muoncomm","data18_tilecomm"
+                                "data18_calib","data18_calocomm","data18_cos","data18_idcomm","data18_larcomm","data18_muoncomm","data18_tilecomm",
+                                "data19_calib","data19_calocomm","data19_cos","data19_idcomm","data19_larcomm","data19_muoncomm","data19_tilecomm",
+                                "data20_calib","data20_calocomm","data20_cos","data20_idcomm","data20_larcomm","data20_muoncomm","data20_tilecomm",
                                 ])
 
 # Abandon the single-beam reconstruction all together, 26 February 2011 
-- 
GitLab


From 66202daa9cbae4923fdcb851f71e86d7a682e8bb Mon Sep 17 00:00:00 2001
From: John Kenneth Anders <john.kenneth.anders@cern.ch>
Date: Wed, 1 May 2019 11:22:45 +0000
Subject: [PATCH 039/129] Merge branch 'jet-validation-update-201904' into
 '21.0'

Physics Validation Jet monitoring substructure added

See merge request atlas/athena!22970

(cherry picked from commit c5568c0595d47724ed5d130a415ee1a28b5d3e37)

7666613a jetValidation monitoring substructure added
aae78ead unnecessary blank spaces deleted; original variables uncommented
2aa781b5 debugged
---
 .../Jet/JetMonitoring/python/JetHistoTools.py |  26 +--
 .../python/PhysicsValidationHistos.py         | 148 +++++++++---------
 2 files changed, 93 insertions(+), 81 deletions(-)

diff --git a/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py b/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py
index d27963b3e5b2..0564d269448b 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py
@@ -24,6 +24,13 @@ compactSpecification = {
 #
 #  Jet moments added from https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/Run2JetMoments/
 #
+
+    #newly added Substructure variables:	
+    "DetectorEta"      : (("DetectorEta;DetectorEta;",100,-5,5),("DetectorEta","float")),
+    "NTrimSubjets"     : (("NTrimSubjets;NTrimSubjets;",20,0,20),("NTrimSubjets","int")),
+    "TrackSumPt"      : (("TrackSumPt;TrackSumPt;",80,0,8000),("TrackSumPt","float")),
+    "TrackSumMass"     : (("TrackSumMass;TrackSumMass;",100,0,10000),("TrackSumMass","float")), 
+    "Qw"      : (("Qw;Qw;",100,0,100000),("Qw","float")),	
     "KtDR"             : (("KtDR;KtDR;",100,0,10),("KtDR","float")),
 #
     "Tau1"             : (("Tau1;Tau1;",100,0,1.0),("Tau1","float")),
@@ -42,23 +49,23 @@ compactSpecification = {
     "Dip23"            : (("Dip23;Dip23;",100,-1,2),("Dip23","float")),
     "DipExcl12"        : (("DipExcl12;DipExcl12;",100,-1,2),("DipExcl12","float")),
 #
-    "Split12"          : (("Split12;Split12;",100,0,5000),("Split12","float")),
-    "Split23"          : (("Split23;Split23;",100,0,5000),("Split23","float")),
-    "Split34"          : (("Split34;Split34;",100,0,5000),("Split34","float")),
+    "Split12"          : (("Split12;Split12;",100,0,70000),("Split12","float")),
+    "Split23"          : (("Split23;Split23;",60,0,24000),("Split23","float")),
+    "Split34"          : (("Split34;Split34;",100,0,10000),("Split34","float")),
 #
     "ZCut12"           : (("ZCut12;ZCut12;",100,0,1.0),("ZCut12","float")),
     "ZCut23"           : (("ZCut23;ZCut23;",100,0,1.0),("ZCut23","float")),
     "ZCut34"           : (("ZCut34;ZCut34;",100,0,1.0),("ZCut34","float")),
 #
-    "Angularity"       : (("Angularity;Angularity;",100,-.1,.1), ("Angularity","float")),
+    "Angularity"       : (("Angularity;Angularity;",50,-.1,.1), ("Angularity","float")),
 #
     "PlanarFlow"       : (("PlanarFlow;PlanarFlow;",100,-1,1.1),("PlanarFlow","float")),
 #
     "Mu12"             : (("Mu12;Mu12;",100,0,1.0),("Mu12","float")),
 #
-    "ECF1"             : (("ECF1;ECF1;",100,0,10000),("ECF1","float")),
-    "ECF2"             : (("ECF2;ECF2;",100,0,10000),("ECF2","float")),
-    "ECF3"             : (("ECF3;ECF3;",100,0,10000),("ECF3","float")),
+    "ECF1"             : (("ECF1;ECF1;",50,0,200000),("ECF1","float")),
+    "ECF2"             : (("ECF2;ECF2;",100,0,2e10),("ECF2","float")),
+    "ECF3"             : (("ECF3;ECF3;",100,0,1e14),("ECF3","float")),
     "ECF1_Beta2"       : (("ECF1_Beta2;ECF1_Beta2;",100,-1,1),("ECF1_Beta2","float")),
     "ECF2_Beta2"       : (("ECF2_Beta2;ECF2_Beta2;",100,-1,1),("ECF2_Beta2","float")),
     "ECF3_Beta2"       : (("ECF3_Beta2;ECF3_Beta2;",100,-1,1),("ECF3_Beta2","float")),
@@ -112,16 +119,13 @@ compactSpecification = {
     'JVFCorr'          : (("Jet JVT JVFCorr;;", 120, -1.2, 1.2) , ("JVFCorr","float" ) ),
     'Jvt'              : (("Jet JVT;;", 70, -0.2, 1.2) , ("Jvt","float" ) ),
     'JvtRpt'           : (("Jet JVT Rpt;;", 75, 0, 1.5) , ("JvtRpt","float" ) ),
-
     "SumPtTrkPt500"    : (("Sum Pt of all tracks above 0.5 GeV:SumPt(p_{T}>0.5 GeV);", 100,0,200), ("SumPtTrkPt500", "vector<float>", "gev") ),
     "SumPtTrkPt500[0]" : (("Sum Pt of tracks from PV0 above 0.5 GeV:SumPt(p_{T}>0.5 GeV);", 100,0,200), ("SumPtTrkPt500[0]", "vector<float>", "gev") ),
     "NumTrkPt500[0]"   : (("Number of tracks from PV0 above 0.5 GeV:N_{tracks}(p_{T}>0.5 GeV);", 100,0,100), ("NumTrkPt500[0]", "vector<int>") ),
     "NumTrkPt1000[0]"    : (("Number of all tracks above 1 GeV:N_{tracks}(p_{T}>1 GeV);", 100,0,100), ("NumTrkPt1000[0]", "vector<int>") ),
     "TrackWidthPt1000[0]": (("Width from tracks from PV0 above 1 GeV:Track Width(p_{T}>1 GeV);", 75,0.,1.5), ("TrackWidthPt1000[0]", "vector<float>") ),
-
     "ActiveArea"       : (("Active Area;Area;", 80, 0, 0.8), ("ActiveArea", "float") ),
     "ActiveArea15"     : (("Active Area;Area;", 80, 0, 1.5), ("ActiveArea", "float") ),
-
     "BchCorrDotx"      : (("BchCorrDotx:BchCorrDotx;",50,0,1), ("BchCorrDotx", "float") ),
     "BchCorrCell"      : (("BchCorrCell:BchCorrCell;",50,0,1), ("BchCorrCell", "float") ),
     ## Jet Cleaning variables ##
@@ -257,3 +261,5 @@ def selectionAndHistos( selectType, histos, selectionName="", histoNameSuffix=""
     return selTool
 
 
+
+
diff --git a/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py b/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py
index 039d22628a03..fd6a09ece051 100644
--- a/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py
+++ b/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py
@@ -43,11 +43,11 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
         return containerfiller
 
     filler.HistoTools += [
-        
+
         # Draw a set of histo for a particular jet selection :
         selectionAndHistos( "leadingjet" , [ "basickinematics", ] ),
         selectionAndHistos( "subleadingjet" , [ "basickinematics"] ),
-
+        selectionAndHistos("40000<pt<50000",["pt"]),
         jhm.Width,
 
         # distances between 2 leading jets.
@@ -56,7 +56,7 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
 
     if "Topo" in container or "PFlow" in container:
         filler.HistoTools += [
-
+         
             # jet states
             jhm.basickinematics_emscale,
             jhm.basickinematics_constscale,
@@ -96,7 +96,7 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
             jhm.TileExt0,
             jhm.TileExt1,
 
-            ]
+	     ]
         
         if refcontainer:
             # efficiency
@@ -105,61 +105,68 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
 
         if "Trimmed" in container:
             filler.HistoTools += [
-                jhm.KtDR,
-                jhm.Tau1,
-                jhm.Tau2,
-                jhm.Tau3,
-                jhm.Tau1_wta,
-                jhm.Tau2_wta,
-                jhm.Tau3_wta,
-                jhm.Tau21,
-                jhm.Tau32,
-                jhm.Tau21_wta,
-                jhm.Tau32_wta,
-                jhm.Dip12,
-                jhm.Dip13,
-                jhm.Dip23,
-                jhm.DipExcl12,
-                jhm.Split12,
-                jhm.Split23,
-                jhm.Split34,
-                jhm.ZCut12,
-                jhm.ZCut23,
-                jhm.ZCut34,
-                jhm.Angularity,
-                jhm.PlanarFlow,
-                jhm.Mu12,
-                jhm.ECF1,
-                jhm.ECF2,
-                jhm.ECF3,
-                jhm.ECF1_Beta2,
-                jhm.ECF2_Beta2,
-                jhm.ECF3_Beta2,
-                jhm.C1,
-                jhm.C2,
-                jhm.D2,
-                jhm.C1_Beta2,
-                jhm.C2_Beta2,
-                jhm.D2_Beta2,
-                jhm.ThrustMin,
-                jhm.ThrustMaj,
-                jhm.FoxWolfram0,
-                jhm.FoxWolfram1,
-                jhm.FoxWolfram2,
-                jhm.FoxWolfram3,
-                jhm.FoxWolfram4,
-                jhm.Sphericity,
-                jhm.Aplanarity,
-                jhm.PullMag,
-                jhm.PullPhi,
-                jhm.Pull_C00,
-                jhm.Pull_C01,
-                jhm.Pull_C10,
-                jhm.Pull_C11,
-                jhm.Charge,
-                jhm.ShowerDeconstructionW,
-                jhm.ShowerDeconstructionTop,
-                jhm.Volatility,
+               
+              #main list of substrcture variables
+              jhm.ECF1,
+              jhm.ECF2,
+              jhm.ECF3,
+              jhm.Tau1_wta,
+              jhm.Tau2_wta,
+              jhm.Tau3_wta,
+              jhm.Split12,
+              jhm.Split23,
+              jhm.NTrimSubjets,
+              jhm.DetectorEta,
+              jhm.TrackSumPt,
+              jhm.TrackSumMass,      
+              jhm.Qw,
+              jhm.PlanarFlow,
+              jhm.FoxWolfram2,
+              jhm.FoxWolfram0,
+              jhm.Angularity,
+              jhm.Aplanarity,
+              jhm.KtDR,
+              jhm.ZCut12,
+              
+              # other substructure variables:
+               jhm.Tau21,
+               jhm.Tau32,
+               jhm.Tau21_wta,
+               jhm.Tau32_wta,
+               jhm.Dip12,
+               jhm.Dip13,
+               jhm.Dip23,
+               jhm.DipExcl12,
+               jhm.Split34,
+               jhm.ZCut23,
+               jhm.ZCut34,
+               jhm.Mu12,
+               jhm.ECF1_Beta2,
+               jhm.ECF2_Beta2,
+               jhm.ECF3_Beta2,
+               jhm.C1,
+               jhm.C2,
+               jhm.D2,
+               jhm.C1_Beta2,
+               jhm.C2_Beta2,
+               jhm.D2_Beta2,
+               jhm.ThrustMin,
+               jhm.ThrustMaj,
+               jhm.FoxWolfram1,
+               jhm.FoxWolfram3,
+               jhm.FoxWolfram4,
+               jhm.Sphericity,
+               jhm.Aplanarity,
+               jhm.PullMag,
+               jhm.PullPhi,
+               jhm.Pull_C00,
+               jhm.Pull_C01,
+               jhm.Pull_C10,
+               jhm.Pull_C11,
+               jhm.Charge,
+               jhm.ShowerDeconstructionW,
+               jhm.ShowerDeconstructionTop,
+               jhm.Volatility,
                 ]
 
     #filler.OutputLevel =2 
@@ -176,15 +183,15 @@ globalSelection = ""
 ###
 
 athenaMonTool = JetMonitoringTool(HistoTools = [
-    commonPhysValTool( "AntiKt4LCTopoJets", akt4refContainer ,globalSelection = globalSelection),
-    commonPhysValTool( "AntiKt4EMTopoJets", akt4refContainer ,globalSelection = globalSelection),
+   commonPhysValTool( "AntiKt4LCTopoJets", akt4refContainer ,globalSelection = globalSelection),
+   commonPhysValTool( "AntiKt4EMTopoJets", akt4refContainer ,globalSelection = globalSelection),
 #   the containers that are commented out are kept so as to make it possible to swicth them on in the future if needed
-#   commonPhysValTool( "AntiKt10LCTopoJets" ),
-#   commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
-#   commonPhysValTool( "AntiKt2PV0TrackJets" ),
-    commonPhysValTool( "AntiKt4EMPFlowJets" ),
-    commonPhysValTool( "AntiKt4TruthJets" ),
-#    commonPhysValTool( "AntiKt10TruthJets" ),
+   #commonPhysValTool( "AntiKt10LCTopoJets" ),
+    commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
+   #commonPhysValTool( "AntiKt10PV0TracksJets" ),
+   #commonPhysValTool( "AntiKt10TruthJets" ),
+    commonPhysValTool( "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" ),
+   #commonPhysValTool( "AntiKt10TruthWZJets" ),
     ], IntervalType=8) # 8 == HistoGroupBase::all
 
 
@@ -193,14 +200,13 @@ if (isMC==False):
     commonPhysValTool( "AntiKt4LCTopoJets", akt4refContainer ,globalSelection = globalSelection),
     commonPhysValTool( "AntiKt4EMTopoJets", akt4refContainer ,globalSelection = globalSelection),
 #   the containers that are commented out are kept so as to make it possible to swicth them on in the future if needed
-#    commonPhysValTool( "AntiKt10LCTopoJets" ),
-#    commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
+    commonPhysValTool( "AntiKt10LCTopoJets" ),
+    commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
 #    commonPhysValTool( "AntiKt2PV0TrackJets" ),
-    commonPhysValTool( "AntiKt4EMPFlowJets" ),
+#    commonPhysValTool( "AntiKt4EMPFlowJets" ),
     ], IntervalType=8) # 8 == HistoGroupBase::all
 
 #ToolSvc += athenaMonTool
 
 def athenaPhysValTool():
     return athenaMonTool
-
-- 
GitLab


From 4652a6b295a7b508395bcde37701fe65d5d1752a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 1 May 2019 16:03:45 +0200
Subject: [PATCH 040/129] SGTools: Remove some unused forwarding headers.

Remove some now-unused forwarding headers: BaseInfo.h, DataBucket.h, DataBucketBase.h.
---
 Control/SGTools/SGTools/BaseInfo.h       | 25 ------------------------
 Control/SGTools/SGTools/DataBucket.h     | 14 -------------
 Control/SGTools/SGTools/DataBucketBase.h | 13 ------------
 3 files changed, 52 deletions(-)
 delete mode 100755 Control/SGTools/SGTools/BaseInfo.h
 delete mode 100755 Control/SGTools/SGTools/DataBucket.h
 delete mode 100755 Control/SGTools/SGTools/DataBucketBase.h

diff --git a/Control/SGTools/SGTools/BaseInfo.h b/Control/SGTools/SGTools/BaseInfo.h
deleted file mode 100755
index 0e822347bc14..000000000000
--- a/Control/SGTools/SGTools/BaseInfo.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// This file's extension implies that it's C, but it's really -*- C++ -*-.
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: BaseInfo.h,v 1.11 2008-12-15 16:22:45 ssnyder Exp $
-
-/**
- * @file  SGTools/BaseInfo.h
- * @author scott snyder
- * @date Nov 2005
- * @brief Provide an interface for finding inheritance information
- *        at run time.
- */
-
-#ifndef SGTOOLS_BASEINFO_H
-#define SGTOOLS_BASEINFO_H
-
-
-#include "AthenaKernel/BaseInfo.h"
-
-
-#endif // not SGTOOLS_BASEINFO_H
-
diff --git a/Control/SGTools/SGTools/DataBucket.h b/Control/SGTools/SGTools/DataBucket.h
deleted file mode 100755
index 0999f001c6f4..000000000000
--- a/Control/SGTools/SGTools/DataBucket.h
+++ /dev/null
@@ -1,14 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SGTOOLS_DATABUCKET_H
-#define SGTOOLS_DATABUCKET_H
-
-
-#include "AthenaKernel/DataBucket.h"
-
-
-#endif // SGTOOLS_DATABUCKET_H
diff --git a/Control/SGTools/SGTools/DataBucketBase.h b/Control/SGTools/SGTools/DataBucketBase.h
deleted file mode 100755
index 073414b88d2c..000000000000
--- a/Control/SGTools/SGTools/DataBucketBase.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SGTOOLS_DATABUCKETBASE_H
-#define SGTOOLS_DATABUCKETBASE_H
-
-
-#include "AthenaKernel/DataBucketBase.h"
-
-
-#endif
-
-- 
GitLab


From 1b04fc115f36887b8fc9227d93d11441f712bb00 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 1 May 2019 16:05:23 +0200
Subject: [PATCH 041/129] tauRecTools: Preparing to make CaloDD immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
---
 Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx | 8 +-------
 Reconstruction/tauRecTools/src/TauPi0CreateROI.h   | 6 +-----
 Reconstruction/tauRecTools/src/TauShotFinder.cxx   | 6 ++----
 Reconstruction/tauRecTools/src/TauShotFinder.h     | 3 +--
 4 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx b/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx
index 19e24691a079..c57b7aa43c13 100644
--- a/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx
+++ b/Reconstruction/tauRecTools/src/TauPi0CreateROI.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAOD_ANALYSIS
@@ -34,8 +34,6 @@ using std::string;
 
 TauPi0CreateROI::TauPi0CreateROI(   const string& name ) :
      TauRecToolBase(name)
-    , m_calo_dd_man(NULL)
-    , m_calo_id(NULL)
 {
 }
    
@@ -51,10 +49,6 @@ StatusCode TauPi0CreateROI::initialize() {
     // retrieve tools
     ATH_MSG_DEBUG( "Retrieving tools" );
     
-    // initialize calo cell geo
-    m_calo_dd_man  = CaloDetDescrManager::instance();
-    m_calo_id      = m_calo_dd_man->getCaloCell_ID();
-
     ATH_CHECK( m_caloCellInputContainer.initialize() );
 
     return StatusCode::SUCCESS;
diff --git a/Reconstruction/tauRecTools/src/TauPi0CreateROI.h b/Reconstruction/tauRecTools/src/TauPi0CreateROI.h
index e2532b33090a..ab2aaa0245f2 100644
--- a/Reconstruction/tauRecTools/src/TauPi0CreateROI.h
+++ b/Reconstruction/tauRecTools/src/TauPi0CreateROI.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TAUREC_TAUPI0CREATEROI_H
@@ -51,10 +51,6 @@ private:
     /** @brief store cell in output container */ 
     void storeCell(const CaloCell* /* cell*/, CaloCellContainer& cellContainer);
 
-    /** @brief calo cell navigation */
-    const CaloDetDescrManager* m_calo_dd_man;
-    const CaloCell_ID* m_calo_id;
-  
     /** @brief hash map in order to keep track, which cells have been added to output cell container*/
     std::vector<CaloCell*> m_addedCellsMap;
 
diff --git a/Reconstruction/tauRecTools/src/TauShotFinder.cxx b/Reconstruction/tauRecTools/src/TauShotFinder.cxx
index 4e36d847130a..7e922dbae042 100644
--- a/Reconstruction/tauRecTools/src/TauShotFinder.cxx
+++ b/Reconstruction/tauRecTools/src/TauShotFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAOD_ANALYSIS
@@ -42,7 +42,6 @@ using std::string;
 TauShotFinder::TauShotFinder(   const string& name ) :
     TauRecToolBase(name)
     , m_caloWeightTool("H1WeightToolCSC12Generic")
-    , m_calo_dd_man(NULL)
     , m_calo_id(NULL)
     , m_pt1(0)
     , m_pt3(0)
@@ -75,8 +74,7 @@ StatusCode TauShotFinder::initialize() {
     ATH_CHECK( m_caloCellInputContainer.initialize() );
 
     // initialize calo cell geo
-    m_calo_dd_man  = CaloDetDescrManager::instance();
-    m_calo_id      = m_calo_dd_man->getCaloCell_ID();
+    ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") );
 
     /*
     //---------------------------------------------------------------------
diff --git a/Reconstruction/tauRecTools/src/TauShotFinder.h b/Reconstruction/tauRecTools/src/TauShotFinder.h
index 7293d92a7d97..9dbc93010559 100644
--- a/Reconstruction/tauRecTools/src/TauShotFinder.h
+++ b/Reconstruction/tauRecTools/src/TauShotFinder.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TAUREC_TAUSHOTFINDER_H
@@ -63,7 +63,6 @@ private:
     
     /** @brief new shot PFO container and name */
     /** @brief calo cell navigation */
-    const CaloDetDescrManager* m_calo_dd_man;
     const CaloCell_ID* m_calo_id;
 
     /** @brief readers */
-- 
GitLab


From b60b4ab15e9c313b2b018c2b35d59b9631563c5f Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 1 May 2019 16:05:43 +0200
Subject: [PATCH 042/129] LArMonTools: Preparing to make CaloDD immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
---
 .../LArMonTools/src/LArCosmicsMonTool.cxx     | 49 +++--------
 .../LArMonTools/src/LArCosmicsMonTool.h       |  4 +-
 .../LArMonTools/src/LArCoverage.cxx           | 46 ++--------
 LArCalorimeter/LArMonTools/src/LArCoverage.h  |  1 -
 .../src/LArHVCorrectionMonTool.cxx            | 19 ++---
 .../LArMonTools/src/LArHVCorrectionMonTool.h  |  1 -
 .../LArMonTools/src/LArRODMonTool.cxx         | 63 +++++++-------
 .../LArMonTools/src/LArRODMonTool.h           | 10 ++-
 .../LArMonTools/src/LArRawChannelMonTool.cxx  | 83 +++----------------
 .../LArMonTools/src/LArRawChannelMonTool.h    | 26 +-----
 10 files changed, 82 insertions(+), 220 deletions(-)

diff --git a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx
index ca473e0c533d..e947c7cbe2f2 100644
--- a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx
@@ -64,7 +64,6 @@ LArCosmicsMonTool::LArCosmicsMonTool(const std::string& type,
   m_LArFCAL_IDHelper	= NULL;
   m_LArHEC_IDHelper	= NULL;
   m_caloIdMgr		= NULL;
-  m_CaloDetDescrMgr	= NULL;
   m_larPedestal		= NULL;
 
   m_hMuonMapEMDig	= NULL;
@@ -101,45 +100,17 @@ StatusCode
 LArCosmicsMonTool::initialize()
 {
   ATH_MSG_INFO( "Initialize LArCosmicsMonTool" );
-  StatusCode sc;
-  
-  sc = detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID");
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL( "Could not get LArOnlineIDHelper" );
-    return sc;
-  }
-  
+ 
   // Retrieve ID helpers
-  sc =  detStore()->retrieve( m_caloIdMgr );
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL( "Could not get CaloIdMgr" );
-    return sc;
-  }
+  ATH_CHECK(  detStore()->retrieve( m_caloIdMgr ) );
   m_LArEM_IDHelper   = m_caloIdMgr->getEM_ID();
   m_LArHEC_IDHelper  = m_caloIdMgr->getHEC_ID();
   m_LArFCAL_IDHelper = m_caloIdMgr->getFCAL_ID();
   
-  // CaloDetDescrMgr gives "detector description", including real positions of cells
-  sc = detStore()->retrieve(m_CaloDetDescrMgr);
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL( "Could not get CaloDetDescrMgr ");
-    return sc;
-  }
-  
+  ATH_CHECK( detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID") );
   ATH_CHECK( m_badChannelMask.retrieve() );
-  
-  // Get LAr Cabling Service
-  sc=m_larCablingService.retrieve();
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( "Could not retrieve LArCablingService" );
-    return StatusCode::FAILURE;
-  }
-  
-  // initialize monitoring bookkeeping info
-  sc = this->initMonInfo();
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( "Could not initialize monitoring bookkeeping info" );
-  }
+  ATH_CHECK( m_larCablingService.retrieve() );
+  ATH_CHECK( this->initMonInfo() );
   
   // End Initialize
   ManagedMonitorToolBase::initialize().ignore();
@@ -249,7 +220,8 @@ LArCosmicsMonTool::fillHistograms() {
   // Increment event counter
   m_eventsCounter++;
   
-  
+  const CaloDetDescrManager* ddman = nullptr;
+  ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
   
   
   /////////////////////////////////
@@ -288,7 +260,7 @@ LArCosmicsMonTool::fillHistograms() {
     
     // Get Physical Coordinates     
     float eta = 0; float phi = 0;
-    sc = returnEtaPhiCoord(offlineID, eta, phi);
+    sc = returnEtaPhiCoord(ddman, offlineID, eta, phi);
     if(sc.isFailure()) {
       ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates" );
       continue;
@@ -439,10 +411,11 @@ StatusCode LArCosmicsMonTool::initMonInfo()
 }
 
 /*---------------------------------------------------------*/
-StatusCode LArCosmicsMonTool::returnEtaPhiCoord(Identifier offlineID,float& eta,float& phi)
+StatusCode LArCosmicsMonTool::returnEtaPhiCoord(const CaloDetDescrManager* ddman,
+                                                Identifier offlineID,float& eta,float& phi)
 {
   // Get Calo detector description element to retrieve true eta/phi
-  const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID);
+  const CaloDetDescrElement* caloDetElement = ddman->get_element(offlineID);
   
   if(caloDetElement == 0 ){
     return StatusCode::FAILURE;
diff --git a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h
index fd5b76ffdcba..a3b9235df01f 100644
--- a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h
+++ b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h
@@ -86,7 +86,6 @@ class LArCosmicsMonTool: public ManagedMonitorToolBase
   const LArFCAL_ID*  m_LArFCAL_IDHelper;
   const LArHEC_ID*   m_LArHEC_IDHelper;
   const CaloIdManager*       m_caloIdMgr;
-  const CaloDetDescrManager* m_CaloDetDescrMgr;
   const ILArPedestal* m_larPedestal;
 
 
@@ -118,7 +117,8 @@ class LArCosmicsMonTool: public ManagedMonitorToolBase
   std::string sampling_str(int sampling);
 
   // To get physical coordinates
-  StatusCode returnEtaPhiCoord(Identifier offlineID,float& eta,float& phi);
+  StatusCode returnEtaPhiCoord(const CaloDetDescrManager* ddmgr,
+                               Identifier offlineID,float& eta,float& phi);
 
   // Muon Seeds with Digits
   TH2F* m_hMuonMapEMDig; TH2F* m_hMuonMapHECDig; TH2F* m_hMuonMapFCALDig;
diff --git a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx
index ec3557509fd0..c9194ed5dbcb 100644
--- a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx
@@ -77,7 +77,6 @@ LArCoverage::LArCoverage(const std::string& type,
   m_LArFCAL_IDHelper	= NULL;
   m_LArHEC_IDHelper	= NULL;
   m_caloIdMgr		= NULL;
-  m_CaloDetDescrMgr	= NULL;
   m_hBadChannelsBarrelA = NULL;
   m_hBadChannelsBarrelC = NULL;
   m_hBadChannelsEndcapA = NULL;
@@ -96,47 +95,17 @@ StatusCode
 LArCoverage::initialize()
 {
   ATH_MSG_INFO( "Initialize LArCoverage" );
-  StatusCode sc;
-
-  sc = detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID");
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL( "Could not get LArOnlineIDHelper" );
-    return sc;
-  }
   
-  // Retrieve ID helpers
-  sc =  detStore()->retrieve( m_caloIdMgr );
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL( "Could not get CaloIdMgr" );
-    return sc;
-  }
+  ATH_CHECK(  detStore()->retrieve( m_caloIdMgr ) );
   m_LArEM_IDHelper   = m_caloIdMgr->getEM_ID();
   m_LArHEC_IDHelper  = m_caloIdMgr->getHEC_ID();
   m_LArFCAL_IDHelper = m_caloIdMgr->getFCAL_ID();
    
-  // CaloDetDescrMgr gives "detector description", including real positions of cells
-  sc = detStore()->retrieve(m_CaloDetDescrMgr);
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL( "Could not get CaloDetDescrMgr ");
-    return sc;
-  }
-
+  ATH_CHECK( detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID") );
   ATH_CHECK( m_BCKey.initialize() );
   ATH_CHECK( m_BFKey.initialize() );
-
-  // Get bad-channel mask
-  sc=m_badChannelMask.retrieve();
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( "Could not retrieve BadChannelMask" << m_badChannelMask);
-    return StatusCode::FAILURE;
-  }
-   
-  // Get LAr Cabling Service
-  sc=m_larCablingService.retrieve();
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( "Could not retrieve LArCablingService" );
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( m_badChannelMask.retrieve() );
+  ATH_CHECK( m_larCablingService.retrieve() );
    
   // LArOnlineIDStrHelper
   m_strHelper = new  LArOnlineIDStrHelper(m_LArOnlineIDHelper);
@@ -581,6 +550,9 @@ LArCoverage::fillHistograms()
 
   if(m_eventsCounter > m_nevents ) return StatusCode::SUCCESS;
 
+  const CaloDetDescrManager* ddman = nullptr;
+  ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
+
   // Retrieve Raw Channels Container
   
   SG::ReadHandle<LArRawChannelContainer> pRawChannelsContainer(m_rawChannelsKey);
@@ -612,7 +584,7 @@ LArCoverage::fillHistograms()
     
     // Get Physical Coordinates
     float etaChan = 0; float phiChan = 0.;
-    const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID);
+    const CaloDetDescrElement* caloDetElement = ddman->get_element(offlineID);
     if(caloDetElement == 0 ){
       ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
       continue; 
@@ -788,7 +760,7 @@ LArCoverage::fillHistograms()
   // Fill known missing FEBs with -1
   //
   
-  FillKnownMissingFEBs(m_CaloDetDescrMgr);
+  FillKnownMissingFEBs(ddman);
 
   //
   // Fix for Cosmetic : Fill "empty bins" in plots 
diff --git a/LArCalorimeter/LArMonTools/src/LArCoverage.h b/LArCalorimeter/LArMonTools/src/LArCoverage.h
index ada669d77e3d..368e524a1ffe 100644
--- a/LArCalorimeter/LArMonTools/src/LArCoverage.h
+++ b/LArCalorimeter/LArMonTools/src/LArCoverage.h
@@ -78,7 +78,6 @@ private:
   const LArFCAL_ID*  m_LArFCAL_IDHelper;
   const LArHEC_ID*   m_LArHEC_IDHelper;
   const CaloIdManager*       m_caloIdMgr;
-  const CaloDetDescrManager* m_CaloDetDescrMgr;
 
   LArOnlineIDStrHelper* m_strHelper;
   ITHistSvc* m_rootStore;
diff --git a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
index de8a7a68dc33..1199808b0675 100644
--- a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
@@ -43,7 +43,6 @@ LArHVCorrectionMonTool::LArHVCorrectionMonTool(const std::string& type,
     m_LArFCAL_IDHelper(0),
     m_LArHEC_IDHelper(0),
     m_caloIdMgr(0),
-    m_CaloDetDescrMgr(0),
     m_strHelper(0),
     m_rootStore(0),
     m_larCablingService("LArCablingLegacyService"),
@@ -89,7 +88,6 @@ StatusCode LArHVCorrectionMonTool::initialize()
   m_LArHEC_IDHelper  = idHelper->hec_idHelper();
   m_LArFCAL_IDHelper = idHelper->fcal_idHelper();
   
-  ATH_CHECK( detStore()->retrieve(m_CaloDetDescrMgr) );
   ATH_CHECK( m_larCablingService.retrieve() );
 
   ATH_CHECK( m_scaleCorrKey.initialize() );
@@ -238,22 +236,17 @@ StatusCode
 LArHVCorrectionMonTool::fillHistograms()
 {
   ATH_MSG_DEBUG( "in fillHists()" );
-  const EventContext& ctx = Gaudi::Hive::currentContext();
   
   m_eventsCounter++;
   
   if(m_eventsCounter == 1){ // Fill only at the beginning of LB. m_eventsCounter is reset at the begining of each LB.
+
+    const CaloDetDescrManager* ddman = nullptr;
+    ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
     
     // Retrieve event information
-    const xAOD::EventInfo* thisEventInfo;
-    if (evtStore()->retrieve(thisEventInfo).isFailure()) {
-      ATH_MSG_ERROR( "Failed to retrieve EventInfo object" );
-      return StatusCode::FAILURE;
-    }
-    //const DataHandle<EventInfo> event_info;
-    //EventID::number_type bunch_crossing_id = event_info->event_ID()->bunch_crossing_id();
-    //EventID::number_type lumi_block        = event_info->event_ID()->lumi_block();
-    int lumi_block = thisEventInfo->lumiBlock();
+    const EventContext& ctx = Gaudi::Hive::currentContext();
+    int lumi_block = ctx.eventID().lumi_block();
     
     // Counter for deviating channels in each partition
     float nonNominal[] = {0.,0.,0.,0.,0.,0.,0.,0.};
@@ -285,7 +278,7 @@ LArHVCorrectionMonTool::fillHistograms()
       
       // Get Physical Coordinates
       float etaChan = 0; float phiChan = 0.;
-      const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID);
+      const CaloDetDescrElement* caloDetElement = ddman->get_element(offlineID);
       if(caloDetElement == 0 ){
 	ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	continue; 
diff --git a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h
index 48a6889588d6..f503eca3ca07 100644
--- a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h
+++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h
@@ -77,7 +77,6 @@ class LArHVCorrectionMonTool: public ManagedMonitorToolBase
   const LArFCAL_ID*  m_LArFCAL_IDHelper;
   const LArHEC_ID*   m_LArHEC_IDHelper;
   const CaloIdManager*       m_caloIdMgr;
-  const CaloDetDescrManager* m_CaloDetDescrMgr;
 
   LArOnlineIDStrHelper* m_strHelper;
   ITHistSvc* m_rootStore;
diff --git a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx
index 3156c1ee1353..611c6a9c36c3 100755
--- a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // ********************************************************************
@@ -159,7 +159,6 @@ LArRODMonTool::LArRODMonTool(const std::string& type,
   m_last_lb = -1;
   m_curr_lb = -1;
 
-  m_calo_description_mgr=nullptr;
   m_hsize=0;
 }
 
@@ -201,12 +200,6 @@ LArRODMonTool::initialize() {
 
   ATH_CHECK(m_cablingKey.initialize());
 
-  sc = detStore()->retrieve(m_calo_description_mgr);
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( "Unable to find CeloDetDescrManager " );
-    return StatusCode::FAILURE;
-  }
-
   if (m_skipKnownProblematicChannels) { 
     sc=m_badChannelMask.retrieve();
     if (sc.isFailure()) {
@@ -711,6 +704,23 @@ StatusCode LArRODMonTool::fillHistograms() {
   
   SG::ReadHandle<LArDigitContainer> pLArDigitContainer(m_digitContainerKey);
 
+  const CaloDetDescrManager* ddman = nullptr;
+  ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
+
+  SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
+  const LArOnOffIdMapping* cabling=*cablingHdl;
+
+  SG::ReadCondHandle<ILArOFC>         ofcHdl{m_keyOFC};
+  const ILArOFC* ofcs=*ofcHdl;
+
+  SG::ReadCondHandle<ILArShape>       shapeHdl{m_keyShape};
+  const ILArShape* shapes=*shapeHdl;
+
+  SG::ReadCondHandle<ILArHVScaleCorr> hvScaleCorrHdl{m_keyHVScaleCorr};
+  const ILArHVScaleCorr* hvScaleCorrs=*hvScaleCorrHdl;
+
+  SG::ReadCondHandle<LArADC2MeV> adc2MeVHdl{m_adc2mevKey};
+  const LArADC2MeV* adc2mev=*adc2MeVHdl;
 
   if (m_doCheckSum || m_doRodStatus) {
     FebStatus_Check();
@@ -796,7 +806,11 @@ StatusCode LArRODMonTool::fillHistograms() {
       }
     }
 
-    if ((maxSamples-minSamples) > m_adc_th || m_adc_th <= 0) compareChannels(idDig,(*rcDigIt),(*rcBSIt),dig).ignore();
+    if ((maxSamples-minSamples) > m_adc_th || m_adc_th <= 0) {
+      compareChannels(ddman, cabling, ofcs, shapes,
+                      hvScaleCorrs, pedestals, adc2mev,
+                      idDig,(*rcDigIt),(*rcBSIt),dig).ignore();
+    }
     else {
       if (dig) ATH_MSG_DEBUG( "Samples : "<< maxSamples << " " << minSamples );
     }      
@@ -1017,29 +1031,16 @@ void LArRODMonTool::closeDumpfiles() {
   }
 }
 
-StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawChannel& rcDig, const LArRawChannel& rcBS, const LArDigit* dig) {
+StatusCode LArRODMonTool::compareChannels(const CaloDetDescrManager* ddman,
+                                          const LArOnOffIdMapping* cabling,
+                                          const ILArOFC* ofcs,
+                                          const ILArShape* shapes,
+                                          const ILArHVScaleCorr* hvScaleCorrs,
+                                          const ILArPedestal* pedestals,
+                                          const LArADC2MeV* adc2mev,
+                                          const HWIdentifier chid,const LArRawChannel& rcDig, const LArRawChannel& rcBS, const LArDigit* dig) {
   ATH_MSG_DEBUG( " I am entering compareChannels method" );
 
-
-  SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
-  const LArOnOffIdMapping* cabling=*cablingHdl;
-
-  SG::ReadCondHandle<ILArOFC>         ofcHdl{m_keyOFC};
-  const ILArOFC* ofcs=*ofcHdl;
-
-  SG::ReadCondHandle<ILArShape>       shapeHdl{m_keyShape};
-  const ILArShape* shapes=*shapeHdl;
-
-  SG::ReadCondHandle<ILArHVScaleCorr> hvScaleCorrHdl{m_keyHVScaleCorr};
-  const ILArHVScaleCorr* hvScaleCorrs=*hvScaleCorrHdl;
-
-  SG::ReadCondHandle<ILArPedestal>    pedestalHdl{m_keyPedestal};
-  const ILArPedestal* pedestals=*pedestalHdl;
-
-  SG::ReadCondHandle<LArADC2MeV> adc2MeVHdl{m_adc2mevKey};
-  const LArADC2MeV* adc2mev=*adc2MeVHdl;
-
-
   const int slot_fD = m_LArOnlineIDHelper->slot(chid);
   const  int feedthrough_fD = m_LArOnlineIDHelper->feedthrough(chid);
   const float timeOffline = rcDig.time()/m_unit_offline - m_timeOffset*m_BC;
@@ -1232,7 +1233,7 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh
          const float ped = pedestals->pedestal(chid,rcDig.gain());
          ATH_MSG_INFO( "Escale: "<<escale<<" intercept: "<<ramp0<<" pedestal: "<<ped<<" gain: "<<rcDig.gain() );
          const Identifier cellid=cabling->cnvToIdentifier(chid);
-         const CaloDetDescrElement* cellDDE = m_calo_description_mgr->get_element(cellid); 
+         const CaloDetDescrElement* cellDDE = ddman->get_element(cellid); 
          const float noise=m_calo_noise_tool->totalNoiseRMS(cellDDE,rcDig.gain(),20.);
          ATH_MSG_INFO( "Noise for mu=20: "<<noise);
          ATH_MSG_INFO( "HVScaleCorr: "<<hvscale);
diff --git a/LArCalorimeter/LArMonTools/src/LArRODMonTool.h b/LArCalorimeter/LArMonTools/src/LArRODMonTool.h
index d548203693a1..8d313c354916 100644
--- a/LArCalorimeter/LArMonTools/src/LArRODMonTool.h
+++ b/LArCalorimeter/LArMonTools/src/LArRODMonTool.h
@@ -160,7 +160,14 @@ private:
 
   bool FebStatus_Check();
 
-  StatusCode compareChannels(const HWIdentifier chid, const LArRawChannel& rcDig, const LArRawChannel& rcBS, const LArDigit* dig=NULL);
+  StatusCode compareChannels(const CaloDetDescrManager* ddman,
+                             const LArOnOffIdMapping* cabling,
+                             const ILArOFC* ofcs,
+                             const ILArShape* shapes,
+                             const ILArHVScaleCorr* hvScaleCorrs,
+                             const ILArPedestal* pedestals,
+                             const LArADC2MeV* adc2mev,
+                             const HWIdentifier chid, const LArRawChannel& rcDig, const LArRawChannel& rcBS, const LArDigit* dig=NULL);
 
   class ERRCOUNTER {
   public:
@@ -216,7 +223,6 @@ private:
   ToolHandle<ICaloNoiseTool>       m_calo_noise_tool;
 
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping CDO"};
-  const CaloDetDescrManager *m_calo_description_mgr;
 
   // Output files names
   std::string m_DigitsFileName;
diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx
index 2350d3b2a82d..40748b4c0bdf 100644
--- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx
@@ -100,9 +100,8 @@ LArRawChannelMonTool::LArRawChannelMonTool( const std::string & type,
   , m_noise_burst_nChannel_thresholds( 8, 10 )
   , m_n_lumi_blocks( 1500 )
   , m_lar_online_id_ptr ( 0 )
-  , m_calo_description_mgr_ptr( 0 )
   , m_calo_id_mgr_ptr( 0 )
-  , m_cabel_service_tool ( "LArCablingLegacyService" )
+  , m_cable_service_tool ( "LArCablingLegacyService" )
   , m_masking_tool ( "BadLArRawChannelMask" )
   , m_atlas_ready( false )
   , m_lar_online_id_str_helper_ptr ( 0 )
@@ -176,74 +175,15 @@ StatusCode LArRawChannelMonTool::initialize()
 
   m_interval        = intervalStringToEnum( m_interval_str );
 
-  // --- non-trivial ManagedMonitorToolBase intialize routine ---
-  if ( ManagedMonitorToolBase::initialize().isSuccess() ) {
+  ATH_CHECK( ManagedMonitorToolBase::initialize() );
 
-    ATH_MSG_DEBUG( "initialized ManagedMonitorToolBase" );
+  ATH_CHECK( detStore()->retrieve( m_lar_online_id_ptr, "LArOnlineID" ) );
+  ATH_CHECK( detStore()->retrieve( m_calo_id_mgr_ptr ) );
+  ATH_CHECK( m_cable_service_tool.retrieve() );
+  ATH_CHECK( m_calo_noise_tool.retrieve() );
+  ATH_CHECK( m_masking_tool.retrieve() );
+  ATH_CHECK( m_filterAtlasReady_tools.retrieve() );
 
-  } else {
-
-    ATH_MSG_FATAL( "Unable to initialize ManagedMonitorToolBase"
-		    );
-    return StatusCode::FAILURE;
-
-  }
-
-  // --- get LArOnlineID ---
-  if ( detStore()->retrieve( m_lar_online_id_ptr, "LArOnlineID" ).isSuccess() ) {
-
-    ATH_MSG_DEBUG( "connected non-tool: LArOnlineID" );
-
-  } else {
-
-    ATH_MSG_FATAL( "unable to connect non-tool: LArOnlineID" );
-    return StatusCode::FAILURE;
-
-  }
-
-
-
-  // --- get CaloDetDescrManager ---
-  if ( detStore()->retrieve( m_calo_description_mgr_ptr ).isSuccess() ) {
-
-    ATH_MSG_DEBUG( "connected non-tool: CaloDetDescrManager " );
-
-  } else {
-
-    ATH_MSG_FATAL( "unable to connect non-tool: CaloDetDescrMgr "
-	);
-    return StatusCode::FAILURE;
-
-  }
-
-  // --- get CaloIDManager ---
-  if ( detStore()->retrieve( m_calo_id_mgr_ptr ).isSuccess() ) {
-
-    ATH_MSG_DEBUG( "connected non-tool: CaloIdManager" );
-
-  } else {
-
-    ATH_MSG_FATAL( "unable to connect non-tool: CaloIdManager "
-	);
-    return StatusCode::FAILURE;
-
-  }
-
-
-  // --- get LArCablingService ---
-  if ( !RetrieveHandle( m_cabel_service_tool ) ) return StatusCode::FAILURE;
-
-  // --- get CaloNoiseTool ---
-  if ( !RetrieveHandle( m_calo_noise_tool ) ) return StatusCode::FAILURE;
-
-  // --- get bad channel mask ---
-  if ( !RetrieveHandle( m_masking_tool ) ) return StatusCode::FAILURE;
-
-   StatusCode sc = m_filterAtlasReady_tools.retrieve();
-   if( !sc ) {
-     ATH_MSG_ERROR("Could Not Retrieve AtlasFilterTool " << m_filterAtlasReady_tools);
-     return StatusCode::FAILURE;
-   }
   // ---
   // Get Michel's LArOnlineIDStrHelper: All names are Expert view
   m_lar_online_id_str_helper_ptr = new
@@ -1258,6 +1198,9 @@ StatusCode LArRawChannelMonTool::fillHistograms()
   // --- check set in bookHistogram ---
   if ( !m_has_lar_raw_channels ) return StatusCode::SUCCESS;
 
+  const CaloDetDescrManager *ddman = nullptr;
+  ATH_CHECK( detStore()->retrieve (ddman, "CaloMgr") );
+
   // --- retrieve raw channels ---
   const LArRawChannelContainer *raw_channels = 0;
   if ( !evtStore()->retrieve( raw_channels, m_LArRawChannel_container_key ).isSuccess() ) {
@@ -1445,8 +1388,8 @@ StatusCode LArRawChannelMonTool::fillHistograms()
 
     try {
 
-      offline_id = m_cabel_service_tool->cnvToIdentifier( hardware_id );
-      calo_element_ptr   = m_calo_description_mgr_ptr->get_element( offline_id );
+      offline_id = m_cable_service_tool->cnvToIdentifier( hardware_id );
+      calo_element_ptr   = ddman->get_element( offline_id );
 
       // --- skip unconnected channels ---
       if ( !calo_element_ptr ) continue;
diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h
index 499c8529e82d..5d399caebad8 100644
--- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h
+++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h
@@ -145,10 +145,9 @@ class LArRawChannelMonTool: public ManagedMonitorToolBase
 
   // --- tools ---
   const LArOnlineID         *m_lar_online_id_ptr; //!< LAr online structure
-  const CaloDetDescrManager *m_calo_description_mgr_ptr;
   const CaloIdManager       *m_calo_id_mgr_ptr; //!< offline calo structure
 
-  ToolHandle<LArCablingLegacyService>    m_cabel_service_tool;//!< LAr connections
+  ToolHandle<LArCablingLegacyService>    m_cable_service_tool;//!< LAr connections
   ToolHandle<ICaloNoiseTool>       m_calo_noise_tool;   //!< Calorimeter noise
   ToolHandle<ILArBadChannelMasker> m_masking_tool;      //!< LAr Masking
 
@@ -267,30 +266,7 @@ class LArRawChannelMonTool: public ManagedMonitorToolBase
 			  const std::string& merge = "");
 
   LArMonTools::IHistoProxyBase * createLWHistProxy(LWHist*h);
-
-  //! Helper function to connect handles
-  /*!
-    Helper function to connects gaudi handles and reports progress.
-    \param handle is a ToolHandle or a ServiceHandle
-  */
-  template <class HANDLE> bool RetrieveHandle( const HANDLE& handle );
-
-
 };
 
 
-/* -------------------------------------------------------------------------- */
-template <class HANDLE>
-bool LArRawChannelMonTool::RetrieveHandle( const HANDLE& handle )
-{
-  if ( handle.retrieve().isSuccess() ) {
-    msg(MSG::DEBUG) << "successfully retrieved: " << handle << endmsg;
-  } else {
-    msg(MSG::ERROR) << "unable to retrieve: " << handle << endmsg;
-    return false;
-  }
-  return true;
-}
-
-
 #endif // LAR_RAW_CHANNEL_MON_TOOL_H
-- 
GitLab


From c56a47cebc4da42025d889b5722b1a31c62dd491 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 29 Apr 2019 18:11:05 +0200
Subject: [PATCH 043/129] TrigT2CaloCommon: Remove use of ICaloLumiBCIDTool.

Replace uses of the obsolete ICaloLumiBCIDTool with reading CaloBCIDAverage
from SG.  Needed in order to finally remove CaloLumiBCIDTool.
---
 .../TrigT2CaloCommon/ITrigCaloDataAccessSvc.h |  2 +
 .../TrigT2CaloCommon/LArCellCont.h            | 13 ++---
 .../python/TrigT2CaloCommonConfig.py          |  8 ++-
 .../share/testDataAccessService.py            |  3 ++
 .../TrigT2CaloCommon/src/LArCellCont.cxx      | 54 ++++++++-----------
 .../src/TestCaloDataAccess.cxx                | 27 ++++++----
 .../TrigT2CaloCommon/src/TestCaloDataAccess.h |  9 +++-
 .../src/TrigCaloDataAccessSvc.cxx             | 31 ++++++-----
 .../src/TrigCaloDataAccessSvc.h               | 14 +++--
 .../TrigT2CaloCommon/src/TrigDataAccess.cxx   | 37 +++++++------
 .../TrigT2CaloCommon/src/TrigDataAccess.h     | 10 ++--
 11 files changed, 112 insertions(+), 96 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
index 33a22a1bb84d..e100a9321910 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
@@ -30,6 +30,7 @@ class ITrigCaloDataAccessSvc: virtual public IService {
    * @brief downloads the LAr data for an RoI and makes sure the cache collection is filled wiht decoded cells   
    */
   virtual StatusCode loadCollections( const EventContext& context,
+                                      const CaloBCIDAverage* avg,
                                       const IRoiDescriptor& roi,
                                       const DETID detId, const int sampling,
                                       LArTT_Selector<LArCellCont>& loadedCells ) = 0;
@@ -82,6 +83,7 @@ class ITrigCaloDataAccessSvc: virtual public IService {
 */
   
   virtual StatusCode loadFullCollections ( const EventContext& context,
+                                           const CaloBCIDAverage* avg,
                                            ConstDataVector<CaloCellContainer>& cont ) = 0;
 
         /* /\** */
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h
index ab8f291d823c..24257769731e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h
@@ -22,7 +22,6 @@
 #include "LArCabling/LArCablingLegacyService.h"
 #include "LArByteStream/Hid2RESrcID.h"
 #include "Identifier/HWIdentifier.h"
-#include "CaloInterface/ICaloLumiBCIDTool.h"
 
 #include <vector>
 
@@ -30,6 +29,7 @@ class EventInfo;
 //class StoreGateSvc;
 class ILArBadChannelMasker;
 class ILArBadFebMasker;
+class CaloBCIDAverage;
 static std::vector<float> corrBCIDref_example;
 
 /** Class which contains statically allocated LArCellCollections */
@@ -63,7 +63,8 @@ class LArCellCont : public std::vector<LArCellCollection*>
   /** method to apply correction based on the luminosity
   *  to the energy
   */
-  void applyBCIDCorrection(const unsigned int& rodid);
+  void applyBCIDCorrection(const CaloBCIDAverage* avg,
+                           const unsigned int& rodid);
 
   /** destructor */
   virtual ~LArCellCont() { };
@@ -76,10 +77,6 @@ class LArCellCont : public std::vector<LArCellCollection*>
   void eventNumber ( const unsigned int eN ) { m_event=eN; };
   /** sets LumiBlock and BCID */
   void lumiBlock_BCID(const unsigned int lumi_block, const unsigned int BCID);
-  /** has to retrieve the pointer before in TrigDataAccess */
-  void setCaloLumiBCIDPointer( ICaloLumiBCIDTool* caloLumiBCIDTool ) {
-    m_caloLumiBCIDTool = caloLumiBCIDTool;
-  }
   
   /** List of Missing ROBs */
   const std::vector<uint32_t>& MissingROBs( void ) {
@@ -117,9 +114,7 @@ private:
 	/** reference to the corrections for a given BCID */
 	std::vector<float>& m_corrBCIDref;
 	/** update BCID dependent correction table */
-	void updateBCID();
-	/** CaloLumiBCIDTool pointer */
-	ICaloLumiBCIDTool* m_caloLumiBCIDTool;
+	void updateBCID(const CaloBCIDAverage* avg);
 	/** index table */
 	std::map<HWIdentifier,int> m_indexset;
         /** current lumi_block */
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py
index 03a7a986123e..8bbd309208de 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py
@@ -31,11 +31,9 @@ class TrigDataAccess(_TrigDataAccess):
                     svcMgr += LArFlatConditionSvc()
                     svcMgr.LArFlatConditionSvc.OFCInput="/LAR/ElecCalibFlat/OFC"
                     svcMgr.ProxyProviderSvc.ProviderNames += [ "LArFlatConditionSvc" ]
-                    
-                from CaloTools.CaloLumiBCIDToolDefault import CaloLumiBCIDToolDefault
-                theCaloLumiBCIDTool = CaloLumiBCIDToolDefault()
-                svcMgr.ToolSvc += theCaloLumiBCIDTool
-                self.CaloLumiBCIDTool = theCaloLumiBCIDTool
+
+                from CaloRec.CaloBCIDAvgAlgDefault import CaloBCIDAvgAlgDefault
+                CaloBCIDAvgAlgDefault()
                 self.ApplyOffsetCorrection = True
             else:
                 log.info('Disable HLT calo offset correction')
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
index c32240a15d21..fc4701e93a2a 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
@@ -2,6 +2,9 @@
 #  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
 
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+TriggerFlags.doCaloOffsetCorrection = False
+
 include("TrigUpgradeTest/testHLT_MT.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx
index 3e6ce6c58cfb..6c32c2b64765 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx
@@ -14,18 +14,16 @@
 #include "LArBadChannelTool/LArBadFebMasker.h"
 #include "CaloUtils/CaloCellCorrection.h"
 #include "GaudiKernel/ListItem.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
 #include "LArElecCalib/ILArMCSymTool.h"
-#include "CaloInterface/ICaloLumiBCIDTool.h"
+#include "CaloEvent/CaloBCIDAverage.h"
 #include <iostream>
 //#include <time.h>
 
-LArCellCont::LArCellCont() : m_event(0), m_corrBCIDref( corrBCIDref_example ), m_caloLumiBCIDTool(nullptr), m_lumi_block(0), m_bcid(5000), m_larCablingSvc(nullptr), m_BCIDcache(false)
+LArCellCont::LArCellCont() : m_event(0), m_corrBCIDref( corrBCIDref_example ), m_lumi_block(0), m_bcid(5000), m_larCablingSvc(nullptr), m_BCIDcache(false)
 {}
 
 StatusCode
-LArCellCont::initialize(bool applyOffsetCorrection) {
+LArCellCont::initialize(bool /*applyOffsetCorrection*/) {
 
 #ifdef TRIGLARCELLDEBUG
 std::cout << "LArCellCont \t\t DEBUG \t in initialize" << std::endl;
@@ -95,16 +93,6 @@ if (sc.isFailure()){
    return StatusCode::FAILURE;
  }
 
-ICaloLumiBCIDTool* iclbt=0;
- if ( applyOffsetCorrection ) {
-   if ( toolSvc->retrieveTool("ICaloLumiBCIDTool/CaloLumiBCIDToolDefault", iclbt).isFailure() ) {
-     std::cout << "could not retrieve the tool" << std::endl;
-   } else {
-     std::cout << "Tool retrieved from within LArCellCont" << std::endl;
-     m_caloLumiBCIDTool= iclbt;
-   }
- }
-
 LArRoI_Map* roiMap;
 if(StatusCode::SUCCESS != toolSvc->retrieveTool("LArRoI_Map", roiMap ) )
      {std::cout << " Can't get AlgTool LArRoI_Map " << std::endl;
@@ -135,7 +123,6 @@ std::vector<uint32_t> RobsFromMissingFeb;
 
 //std::map<HWIdentifier,int> m_indexset;
 int count = 0;
-//ToolHandle<ILArMCSymTool>  larmcsym ("LArMCSymTool");
 ILArMCSymTool*  larmcsym;
 if ( (toolSvc->retrieveTool("LArMCSymTool",larmcsym)).isFailure() ) {
     std::cout << "did not managed to retrieve LArMCSymTool" << std::endl;
@@ -307,13 +294,15 @@ LArCellCont::find(const unsigned int& rodid) const{
 	return m_it;
 }
 
-void LArCellCont::applyBCIDCorrection(const unsigned int& rodid){
+void LArCellCont::applyBCIDCorrection(const CaloBCIDAverage* avg,
+                                      const unsigned int& rodid)
+{
   int idx = m_hash(rodid);
   m_it = (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+idx);
   LArCellCollection* col = (*m_it);
   unsigned int itsize = col->size();
   std::vector<int>& hashTab = m_hashSym[idx];
-  if ( !m_BCIDcache ) { updateBCID(); m_BCIDcache=true; m_corrBCIDref = m_corrBCID[0]; }
+  if ( !m_BCIDcache ) { updateBCID(avg); m_BCIDcache=true; m_corrBCIDref = m_corrBCID[0]; }
   for(unsigned int i=0; i< itsize; ++i){
     float cor = m_corrBCIDref[ hashTab[i] ];
     LArCell* cell = col->operator[](i);
@@ -342,26 +331,25 @@ void LArCellCont::lumiBlock_BCID(const unsigned int lumi_block, const unsigned i
   }    
 }
 
-void LArCellCont::updateBCID() {
+void LArCellCont::updateBCID(const CaloBCIDAverage* avg) {
   //std::clock_t startT,endT;
   //startT = clock();
-  int bcid=m_bcid;
   std::map<HWIdentifier,int>::const_iterator end = m_indexset.end  ();
   int indexsetmax = m_indexset.size();
   //m_corrBCID.resize(1);
-  if ( (m_larCablingSvc == 0) || (m_caloLumiBCIDTool==0) ) return;
-    std::vector<float>& BCID0=m_corrBCID[0];
-    BCID0.resize(indexsetmax+1);
-    std::map<HWIdentifier,int>::const_iterator beg = m_indexset.begin();
-    for( ; beg != end ; ++beg ) {
-      HWIdentifier hwid = (*beg).first;
-      int idx = (*beg).second;
-      if ( idx < (int)BCID0.size() ){
-	Identifier id = m_larCablingSvc->cnvToIdentifier(hwid);
-	float corr = m_caloLumiBCIDTool->average(id,bcid);
-	BCID0[idx] = corr;
-      }
-    } // end of HWID
+  if ( (m_larCablingSvc == 0) || (avg==0) ) return;
+  std::vector<float>& BCID0=m_corrBCID[0];
+  BCID0.resize(indexsetmax+1);
+  std::map<HWIdentifier,int>::const_iterator beg = m_indexset.begin();
+  for( ; beg != end ; ++beg ) {
+    HWIdentifier hwid = (*beg).first;
+    int idx = (*beg).second;
+    if ( idx < (int)BCID0.size() ){
+      Identifier id = m_larCablingSvc->cnvToIdentifier(hwid);
+      float corr = avg->average(id);
+      BCID0[idx] = corr;
+    }
+  } // end of HWID
   //endT = clock();
   //std::cout << "Total time [ms] " << (double)(endT-startT) << " for " << m_indexset.size() << " x " << maxBCID << std::endl;
   return; 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx
index d953b5da363e..8754d3692445 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx
@@ -11,6 +11,7 @@
 #include "TrigT2CaloCommon/LArCellCont.h"
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 #include "CaloEvent/CaloConstCellContainer.h"
+#include "StoreGate/ReadHandle.h"
 #include "TestCaloDataAccess.h"
 #include <sys/time.h>
 
@@ -28,10 +29,13 @@
 
 class AskForRoI : public ParallelCallTest {
 public:
-  AskForRoI( const EventContext& context, const ServiceHandle<ITrigCaloDataAccessSvc>& svc,  	     
+  AskForRoI( const EventContext& context,
+             const CaloBCIDAverage* avg,
+             const ServiceHandle<ITrigCaloDataAccessSvc>& svc,  	     
 	     MsgStream& msg,
 	     const TrigRoiDescriptor& roi ) 
     : m_context( context ),
+      m_avg( avg ),
       m_svc( svc ),
       m_msg( msg ),
       m_roi ( roi ) {
@@ -49,13 +53,13 @@ public:
     else{
       // keep this for test reasons
       //usleep (5000);
-      return m_svc->loadCollections( m_context, m_roi, TTEM, 2, sel );    
+      return m_svc->loadCollections( m_context, m_avg, m_roi, TTEM, 2, sel );    
     }
   }
 
   StatusCode request( ConstDataVector<CaloCellContainer>& c ) const {
     if ( m_roi.isFullscan() ){
-      return m_svc->loadFullCollections( m_context, c );
+      return m_svc->loadFullCollections( m_context, m_avg, c );
     }
     else{
       std::cout << "wrong RoI descriptor used for FS" << std::endl;
@@ -180,6 +184,7 @@ public:
 
 private:
   const EventContext& m_context;
+  const CaloBCIDAverage* m_avg;
   const ServiceHandle<ITrigCaloDataAccessSvc>& m_svc;
   MsgStream& m_msg;
   MsgStream& msg(){ return m_msg; }
@@ -213,11 +218,14 @@ TestCaloDataAccess::~TestCaloDataAccess() {}
 
 StatusCode TestCaloDataAccess::initialize() {
   CHECK( m_dataAccessSvc.retrieve() );
+  CHECK( m_bcidAvgKey.initialize() );
   return StatusCode::SUCCESS;
 }
 
 void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const{
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
+
   std::default_random_engine generator;
   std::normal_distribution<double> N1(0.0, 1.7);
   std::normal_distribution<double> N2(0.0, 0.2);
@@ -233,7 +241,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
   TrigRoiDescriptor roi( RoI_eta1, RoI_eta1-width, RoI_eta1+width, // eta
 			 RoI_phi1, RoI_phi1-width, RoI_phi1+width, // phi
 			 0 );
-  AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
+  AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
   allRoIs.push_back( afr );
 
   chance = U(generator);
@@ -245,7 +253,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
     TrigRoiDescriptor roi( RoI_eta2, RoI_eta2-width, RoI_eta2+width, // eta
 			   RoI_phi2, RoI_phi2-width, RoI_phi2+width, // phi
 			   0 );
-    AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
+    AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
     allRoIs.push_back( afr );
   }
 
@@ -261,7 +269,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
       TrigRoiDescriptor roi( RoI_eta3, RoI_eta3-width, RoI_eta3+width, // eta
                              RoI_phi3, RoI_phi3-width, RoI_phi3+width, // phi
                              0 );
-      AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
+      AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
       allRoIs.push_back( afr );
     }
   }
@@ -269,7 +277,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
   chance = U(generator);
   if ( chance > 0.6 ) {
     TrigRoiDescriptor roi( true );
-    AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
+    AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
     allRoIs.push_back( afr );
   }
 
@@ -277,6 +285,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
 
 void TestCaloDataAccess::emulateFixedRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const{
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
   std::vector<TrigRoiDescriptor> rois;
   TrigRoiDescriptor roi1( 0.7, 0.7-0.1, 0.7+0.1, // eta
 			  0.1, 0.1-0.1, 0.1+0.1, // phi
@@ -296,10 +305,10 @@ void TestCaloDataAccess::emulateFixedRoIs( const EventContext& context, std::vec
   rois.push_back(roi4);
   TrigRoiDescriptor roi5( true );
   for( int i=0;i<std::min(m_nFixedRoIs,4);++i) {
-    AskForRoI* t1 = new AskForRoI( context, m_dataAccessSvc, msg(), rois[i]);
+    AskForRoI* t1 = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), rois[i]);
     allRoIs.push_back(t1);
   }
-  AskForRoI* t6 = new AskForRoI( context, m_dataAccessSvc, msg(), roi5);  // FS
+  AskForRoI* t6 = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi5);  // FS
   allRoIs.push_back(t6);
 
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h
index 2773288de16e..4ed8a1743285 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 #ifndef TrigT2CaloCommon_TestCaloDataAccess_h
 #define TrigT2CaloCommon_TestCaloDataAccess_h
@@ -8,6 +8,8 @@
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "TrigT2CaloCommon/ITrigCaloDataAccessSvc.h"
+#include "CaloEvent/CaloBCIDAverage.h"
+#include "StoreGate/ReadHandleKey.h"
 
 
 /**
@@ -32,7 +34,10 @@ class TestCaloDataAccess
   TestCaloDataAccess();
   void emulateRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const;
   void emulateFixedRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const;
-  ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc; 
+  ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc;
+
+  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 
   int m_nFixedRoIs;
   bool m_emulateRoIs;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx
index 689fda41a0a3..39ba98c2c6ad 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx
@@ -49,14 +49,16 @@ StatusCode TrigCaloDataAccessSvc::finalize() {
 }
 
 
-unsigned int TrigCaloDataAccessSvc::prepareFullCollections( const EventContext& context ) {
-
-  return prepareLArFullCollections( context );
-  
+unsigned int
+TrigCaloDataAccessSvc::prepareFullCollections( const EventContext& context,
+                                               const CaloBCIDAverage* avg)
+{
+  return prepareLArFullCollections( context, avg );
 }
 
 
 StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context,
+                                                    const CaloBCIDAverage* avg,
                                                     const IRoiDescriptor& roi,
                                                     const DETID detID,
                                                     const int sampling,
@@ -65,7 +67,7 @@ StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context,
   std::vector<IdentifierHash> requestHashIDs;  
 
   ATH_MSG_DEBUG( "LArTT requested for event " << context << " and RoI " << roi );  
-  unsigned int sc = prepareLArCollections( context, roi, sampling, detID );
+  unsigned int sc = prepareLArCollections( context, avg, roi, sampling, detID );
 
   if ( sc ) return StatusCode::FAILURE;
   
@@ -140,6 +142,7 @@ StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context,
 
 
 StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& context,
+                                                        const CaloBCIDAverage* avg,
                                                         ConstDataVector<CaloCellContainer>& cont ) {
 
 
@@ -153,7 +156,7 @@ StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& cont
   m_robDataProvider->addROBData( m_vrodid32tile );
   }
 
-  unsigned int sc = prepareLArFullCollections( context );
+  unsigned int sc = prepareLArFullCollections( context, avg );
   if ( sc ) return StatusCode::FAILURE;
 
   sc = prepareTileFullCollections( context );
@@ -172,8 +175,10 @@ StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& cont
 }
 
 
-unsigned int TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContext& context ) {
-
+unsigned int
+TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContext& context,
+                                                  const CaloBCIDAverage* avg)
+{
   ATH_MSG_DEBUG( "Full Col " << " requested for event " << context );
   if ( !m_lateInitDone && lateInit() ) {
     return 0x1; // dummy code
@@ -200,7 +205,7 @@ unsigned int TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContex
         m_robDataProvider->getROBData( context, vrodid32fullDet, robFrags );      
       }
       
-      status |= convertROBs( robFrags, ( cache->larContainer ) );
+      status |= convertROBs( avg, robFrags, ( cache->larContainer ) );
       
       if ( vrodid32fullDet.size() != robFrags.size() ) {
         ATH_MSG_DEBUG( "Missing ROBs, requested " << vrodid32fullDet.size() << " obtained " << robFrags.size() );
@@ -389,7 +394,8 @@ unsigned int TrigCaloDataAccessSvc::lateInit() { // non-const this thing
   return 0x0;
 }
 
-unsigned int TrigCaloDataAccessSvc::convertROBs( const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, 
+unsigned int TrigCaloDataAccessSvc::convertROBs( const CaloBCIDAverage* avg,
+                                                 const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, 
                                                LArCellCont* larcell ) {
 
   unsigned int status(0);
@@ -436,7 +442,7 @@ unsigned int TrigCaloDataAccessSvc::convertROBs( const std::vector<const OFFLINE
 	  // TB the converter has state
 	  status |= (m_larDecoder->report_error());
 
-	  if ( m_applyOffsetCorrection ) larcell->applyBCIDCorrection( sourceID );
+	  if ( m_applyOffsetCorrection ) larcell->applyBCIDCorrection( avg, sourceID );
 	} 
 	
       }
@@ -528,6 +534,7 @@ void TrigCaloDataAccessSvc::clearMissing( const std::vector<uint32_t>& request,
 
 
 unsigned int TrigCaloDataAccessSvc::prepareLArCollections( const EventContext& context,
+                                                           const CaloBCIDAverage* avg,
                                                          const IRoiDescriptor& roi,
                                                          const int sampling,
                                                          DETID detector ) {
@@ -562,7 +569,7 @@ unsigned int TrigCaloDataAccessSvc::prepareLArCollections( const EventContext& c
   // same in prepareLArFullCollections
   cache->larContainer->eventNumber( context.evt() );
   
-  unsigned int status = convertROBs( robFrags, ( cache->larContainer ) );
+  unsigned int status = convertROBs( avg, robFrags, ( cache->larContainer ) );
 
   if ( requestROBs.size() != robFrags.size() ) {
     ATH_MSG_DEBUG( "Missing ROBs, requested " << requestROBs.size() << " obtained " << robFrags.size() );
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h
index ff28aa31d295..28193ca5c5f4 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TrigT2CaloCommon_TrigCaloDataAccessSvc_h
@@ -35,6 +35,7 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
   virtual StatusCode finalize() override;
   
   virtual StatusCode loadCollections ( const EventContext& context,
+                                       const CaloBCIDAverage* avg,
                                        const IRoiDescriptor& roi,
                                        const DETID detID,
                                        const int sampling,
@@ -48,6 +49,7 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
 
   
   virtual StatusCode loadFullCollections ( const EventContext& context,
+                                           const CaloBCIDAverage* avg,
                                            ConstDataVector<CaloCellContainer>& cont ) override;
   
  private:
@@ -108,7 +110,8 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
   unsigned int lateInit();
   bool m_lateInitDone = false;
 
-  unsigned int convertROBs(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, LArCellCont* larcell );
+  unsigned int convertROBs(const CaloBCIDAverage* avg,
+                           const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, LArCellCont* larcell );
   unsigned int convertROBs( const std::vector<IdentifierHash>& rIds, TileCellCont* tilecell );
 
 
@@ -130,6 +133,7 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
    * @brief LAr TT collections preparation code
    **/
   unsigned int prepareLArCollections( const EventContext& context,
+                                      const CaloBCIDAverage* avg,
 				const IRoiDescriptor& roi, 
 				const int sampling,
 				DETID detector );
@@ -138,9 +142,11 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
 				const IRoiDescriptor& roi, 
 				DETID detector );
 
-  unsigned int prepareFullCollections( const EventContext& context );
+  unsigned int prepareFullCollections( const EventContext& context,
+                                       const CaloBCIDAverage* avg );
 
-  unsigned int prepareLArFullCollections( const EventContext& context );
+  unsigned int prepareLArFullCollections( const EventContext& context,
+                                          const CaloBCIDAverage* avg );
   unsigned int prepareTileFullCollections( const EventContext& context );
 
   std::vector<uint32_t> m_vrodid32fullDet;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
index 429c5d13f85b..0ec3a570064c 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
@@ -40,8 +40,6 @@
 #include "CaloDetDescr/CaloDetDescrManager.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "CaloInterface/ICaloLumiBCIDTool.h"
-#include "LArElecCalib/ILArMCSymTool.h"
 #include "LArIdentifier/LArIdManager.h"
 #include "LArIdentifier/LArOnlineID.h"
 
@@ -148,20 +146,8 @@ StatusCode TrigDataAccess::initialize()
 	// luminosity tool
 	if ( m_applyOffsetCorrection ) {
 	  ATH_MSG_INFO("Apply BCID/<mu> dependent offset correction");
-	  if ( m_caloLumiBCIDTool.retrieve().isFailure() ) {
-	    ATH_MSG_FATAL("Could not find m_caloLumiBCID");
-	    return StatusCode::FAILURE;
-	  }
-	  //
-	  //if ( m_lumiTool.retrieve().isFailure() ) {
-	  //  (*m_log) << MSG::FATAL << "Could not find m_lumiTool" <<endmsg;
-	  //  return StatusCode::FAILURE;
-	  //} else {
-	  //  std::cout << "Retrieve lumiTool successfully" << std::endl;
-	  //}
 	} else {
 	  ATH_MSG_INFO("No BCID/<mu> dependent offset correction");
-	  m_caloLumiBCIDTool.disable();
 	}
 
         ATH_CHECK(m_lardecoder.retrieve());
@@ -169,6 +155,8 @@ StatusCode TrigDataAccess::initialize()
         ATH_CHECK(m_zdcdecoder.retrieve());
         ATH_CHECK(m_zdcrectool.retrieve());
 
+        ATH_CHECK( m_bcidAvgKey.initialize(m_applyOffsetCorrection) );
+
 	return StatusCode::SUCCESS;
 } // End of initialize
 
@@ -552,6 +540,11 @@ StatusCode TrigDataAccess::LoadCollections (
 		LArTT_Selector<LArCellCont>::const_iterator& Begin,
 		LArTT_Selector<LArCellCont>::const_iterator& End,
 		const unsigned int /*sample*/, bool /*prepare*/) {
+        const CaloBCIDAverage* avg = nullptr;
+        if (m_applyOffsetCorrection) {
+          avg = SG::makeHandle (m_bcidAvgKey).get();
+        }
+
 	if (msgLvl(MSG::VERBOSE)) {
           ATH_MSG_VERBOSE( "m_rIds.size() in LoadColl = " << m_rIds.size() );
           for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
@@ -605,7 +598,7 @@ StatusCode TrigDataAccess::LoadCollections (
         	  } else { // End of if small size
         	        m_lardecoder->setRobFrag(m_robFrags[i]);
         	        m_lardecoder->fillCollectionHLT(roddata1,roddatasize,*col);
-		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(source_id);
+		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(avg, source_id);
 		        // Accumulates inferior byte from ROD Decoder
 		        m_error|=m_lardecoder->report_error();
 		  } //roddatasize < 3
@@ -847,6 +840,11 @@ StatusCode TrigDataAccess::LoadFullCollections (
                 LArTT_Selector<LArCellCont>::const_iterator& Begin,
                 LArTT_Selector<LArCellCont>::const_iterator& End,
                 const DETID detid, bool /*prepare*/) {
+        const CaloBCIDAverage* avg = nullptr;
+        if (m_applyOffsetCorrection) {
+          avg = SG::makeHandle (m_bcidAvgKey).get();
+        }
+
         if (msgLvl(MSG::VERBOSE)) {
           ATH_MSG_VERBOSE( "m_rIds.size() in LoadColl = " << m_rIds.size() );
 	  for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
@@ -942,7 +940,7 @@ StatusCode TrigDataAccess::LoadFullCollections (
 		  else {
                         m_lardecoder->setRobFrag(m_robFrags[i]);
                         m_lardecoder->fillCollectionHLT(roddata1,roddatasize,*col);
-		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(source_id);
+		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(avg, source_id);
 		        // Accumulates inferior byte from ROD Decoder
                         m_error|=m_lardecoder->report_error();
 		  }
@@ -1206,6 +1204,11 @@ StatusCode TrigDataAccess::LoadFullCollections (
 StatusCode TrigDataAccess::LoadFullCollections (
 		CaloCellContainer::const_iterator& Begin,
                 CaloCellContainer::const_iterator& End){
+        const CaloBCIDAverage* avg = nullptr;
+        if (m_applyOffsetCorrection) {
+          avg = SG::makeHandle (m_bcidAvgKey).get();
+        }
+
         if (msgLvl(MSG::VERBOSE)) {
           ATH_MSG_VERBOSE( "m_rIds.size() in LoadColl = " << m_rIds.size() );
 	  for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
@@ -1266,7 +1269,7 @@ StatusCode TrigDataAccess::LoadFullCollections (
                 else {
                       m_lardecoder->setRobFrag(m_robFrags[i]);
                       m_lardecoder->fillCollectionHLT(roddata1,roddatasize,*col);
-		      if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(source_id);
+		      if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(avg, source_id);
                       // Accumulates inferior byte from ROD Decoder
                       m_error|=m_lardecoder->report_error();
                 }
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
index 2afd63361139..e725c0012e48 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
@@ -57,6 +57,7 @@
 #include "GaudiKernel/IIncidentListener.h"
 #include "GaudiKernel/Incident.h"
 #include "ZdcEvent/ZdcDigitsCollection.h"
+#include "CaloEvent/CaloBCIDAverage.h"
 
 // Roi information
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
@@ -72,7 +73,6 @@ class LArRoI_Map;
 class IROBDataProviderSvc;
 class StoreGateSvc;
 class T2CaloConfig;
-class ICaloLumiBCIDTool;
 
 /** Class that provides access to data for
     Calorimeter LVL2 Algorithms */
@@ -89,8 +89,7 @@ public:
     m_tiledecoder("TileROD_Decoder/TileROD_Decoder"),
     m_zdcdecoder("ZdcByteStreamReadV1V2Tool/ZdcByteStreamTool"),
     m_zdcrectool("ZdcRecChannelTool/ZdcByteChannelTool"), 
-    m_applyOffsetCorrection(true),
-    m_caloLumiBCIDTool("ICaloLumiBCIDTool/CaloLumiBCIDToolDefault")
+    m_applyOffsetCorrection(true)
     //m_lumiTool("LuminosityTool")
     //		 m_present_etamin(-10.0),
     //		 m_present_etamax(10.0),
@@ -106,7 +105,6 @@ public:
     declareProperty("ZdcByteStreamReadV1V2Tool",m_zdcdecoder,"ZdcByteStreamReadV1V2Tool for ByteStream Conversion");
     declareProperty("ZdcRecTool",m_zdcrectool,"ZdcRecTool for RawChannel rec");
     declareProperty("ApplyOffsetCorrection",m_applyOffsetCorrection,"Apply offset correction or not (false by default)"); 
-    declareProperty("CaloLumiBCIDTool",m_caloLumiBCIDTool,"Tool for BCID pileup offset average correction"); 
     //declareProperty("LuminosityTool",m_lumiTool,"Luminosity Tool"); 
     // New property for MET slice
     declareProperty("loadFullCollections",  m_usefullcoll=false);
@@ -390,7 +388,6 @@ private:
   ToolHandle<ZdcRecChannelTool> m_zdcrectool;
   /** CaloLumiCorrection */
   bool m_applyOffsetCorrection;
-  ToolHandle<ICaloLumiBCIDTool> m_caloLumiBCIDTool;
   //ToolHandle<ILuminosityTool> m_lumiTool;
   /** robFragments pointers */
   std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> m_robFrags;
@@ -437,6 +434,9 @@ private:
   uint32_t m_numberOfTileRoses;
 
   TileROD_Decoder::D0CellsHLT m_d0cells;
+
+  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
-- 
GitLab


From 83a5952d33df3dad967a23a05404ad2610e440ae Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 29 Apr 2019 18:11:34 +0200
Subject: [PATCH 044/129] TrigCaloRec: Remove use of ICaloLumiBCIDTool.

Replace uses of the obsolete ICaloLumiBCIDTool with reading CaloBCIDAverage
from SG.  Needed in order to finally remove CaloLumiBCIDTool.
---
 .../TrigCaloRec/src/HLTCaloCellMaker.cxx      | 25 +++++++++++--------
 .../TrigCaloRec/src/HLTCaloCellMaker.h        |  6 ++++-
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
index 0b7ca1ab7f0b..52918e19f3ed 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 /*
  *   */
@@ -42,6 +42,7 @@ StatusCode HLTCaloCellMaker::initialize() {
   else
     ATH_CHECK( m_cellContainerVKey.initialize() );
   ATH_CHECK( m_tileEMScaleKey.initialize() );
+  ATH_CHECK( m_bcidAvgKey.initialize() );
   CHECK( m_dataAccessSvc.retrieve() );
   return StatusCode::SUCCESS;
 }
@@ -52,6 +53,8 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
   auto roisHandle = SG::makeHandle( m_roiCollectionKey );
   const TrigRoiDescriptorCollection* roiCollection = roisHandle.cptr();
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
+
   // datahandle 
   if ( m_roiMode ) {
     if ( roiCollection->size() > 1 ) 
@@ -62,7 +65,7 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       ATH_MSG_INFO ( "Running on RoI " << *roiDescriptor<< " FS="<<roiDescriptor->isFullscan());
       if ( roiDescriptor->isFullscan() ) {
-        ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *cdv ));
+        ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, avg.cptr(), *cdv ));
 	cdv->setHasCalo(CaloCell_ID::LAREM);
 	cdv->setHasCalo(CaloCell_ID::LARHEC);
 	cdv->setHasCalo(CaloCell_ID::LARFCAL);
@@ -73,14 +76,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
 	// TT EM PART
 	for(int sampling=0;sampling<4;sampling++){
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, sampling, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTEM, sampling, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LAREM);
 	// TT HEC PART
 	for(int sampling=0;sampling<4;sampling++){
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTHEC, sampling, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTHEC, sampling, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LARHEC);
@@ -94,14 +97,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
 	// TT FCAL EM PART
 	{
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALEM, 0, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALEM, 0, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LARFCAL);
 	// TT FCAL HAD PART
 	for(int sampling=0;sampling<2;sampling++){
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALHAD, sampling, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALHAD, sampling, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LARFCAL);
@@ -121,7 +124,7 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       if ( roiDescriptor->isFullscan() ) {
 	auto c = std::make_unique<CaloConstCellContainer >(SG::VIEW_ELEMENTS);
-	ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *c ));
+	ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, avg.cptr(), *c ));
 	cellContainerV->push_back( c.release()->asDataVector() );
 		
       } else {
@@ -130,14 +133,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
         // TT EM PART
         for(int sampling=0;sampling<4;sampling++){
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, sampling, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTEM, sampling, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LAREM);
         // TT HEC PART
         for(int sampling=0;sampling<4;sampling++){
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTHEC, sampling, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTHEC, sampling, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LARHEC);
@@ -151,14 +154,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
         // TT FCAL EM PART
         {
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALEM, 0, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALEM, 0, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LARFCAL);
         // TT FCAL HAD PART
         for(int sampling=0;sampling<2;sampling++){
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALHAD, sampling, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALHAD, sampling, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LARFCAL);
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
index 963106c53d75..9758240d2561 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 /*
  *   */
@@ -28,6 +28,7 @@
 #include "CaloEvent/CaloCellContainerVector.h"
 #include "AthContainers/ConstDataVector.h"
 #include "CaloEvent/CaloConstCellContainer.h"
+#include "CaloEvent/CaloBCIDAverage.h"
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
 #include "TileConditions/TileEMScale.h"
 
@@ -53,6 +54,9 @@ class HLTCaloCellMaker: public AthReentrantAlgorithm {
 
 	ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc;
 	bool m_roiMode;
+
+        SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+        { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
-- 
GitLab


From b0d087fd91de01ac56392fd818e9ad05f5016bca Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 29 Apr 2019 18:12:09 +0200
Subject: [PATCH 045/129] TrigT2CaloEgamma: Remove use of ICaloLumiBCIDTool.

Replace uses of the obsolete ICaloLumiBCIDTool with reading CaloBCIDAverage
from SG.  Needed in order to finally remove CaloLumiBCIDTool.
---
 .../TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx     | 14 ++++++++++++--
 .../TrigT2CaloEgamma/src/EgammaReEmEnFex.h       | 12 ++++++++++++
 .../TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx    | 15 ++++++++++++++-
 .../TrigT2CaloEgamma/src/EgammaReHadEnFex.h      | 11 +++++++++++
 .../TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx    | 16 +++++++++++++++-
 .../TrigT2CaloEgamma/src/EgammaReSamp1Fex.h      |  9 +++++++++
 .../TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx    | 14 +++++++++++++-
 .../TrigT2CaloEgamma/src/EgammaReSamp2Fex.h      |  9 +++++++++
 8 files changed, 95 insertions(+), 5 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
index 76d7cd841a52..90e1bd90dfaa 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
@@ -17,6 +17,7 @@
 #include "EgammaReEmEnFex.h"
 #include "T2CalibrationEgamma.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
+#include "StoreGate/ReadHandle.h"
 
 EgammaReEmEnFex::EgammaReEmEnFex(const std::string& type, const std::string& name,
                                  const IInterface* parent) :
@@ -34,6 +35,13 @@ EgammaReEmEnFex::~EgammaReEmEnFex()
   delete m_calib;
 }
 
+StatusCode EgammaReEmEnFex::initialize()
+{
+  ATH_CHECK( IReAlgToolCalo::initialize() );
+  ATH_CHECK( m_bcidAvgKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
 StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                     const CaloDetDescrElement*& caloDDE,
                                     const EventContext& context) const
@@ -46,8 +54,10 @@ StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const I
   // Region Selector, sampling 0
   int sampling = 0;
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
+
   LArTT_Selector<LArCellCont> sel;
-  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel) );
 
   double deta = 0.; // eta difference current cell - seed
   double dphi = 0.; // phi difference current cell - seed
@@ -108,7 +118,7 @@ StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const I
   sampling = 3;
 
   LArTT_Selector<LArCellCont> sel3;
-  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel3) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel3) );
   /*
           if ( m_saveCells ){
              m_data->storeCells(iBegin,iEnd,*m_CaloCellContPoint,m_cellkeepthr);
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
index 5fa4d7c9309f..189e78e74b6b 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
@@ -18,6 +18,9 @@
 #define TRIGT2CALOEGAMMA_EGAMMAEMENFEXRE_H
 
 #include "TrigT2CaloCommon/IReAlgToolCalo.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "CaloEvent/CaloBCIDAverage.h"
+
 
 /** Feature extraction Tool for LVL2 Calo. EM Presampler and
 	third EM Calorimeter sample. */
@@ -28,6 +31,10 @@ class EgammaReEmEnFex: public IReAlgToolCalo {
 
     virtual ~EgammaReEmEnFex();
 
+
+    virtual StatusCode initialize() override;
+
+
     /** @brief execute feature extraction for the EM Calorimeter
     *   second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -37,6 +44,11 @@ class EgammaReEmEnFex: public IReAlgToolCalo {
                                const IRoiDescriptor& roi,
                                const CaloDetDescrElement*& caloDDE,
                                const EventContext& context) const override;
+
+
+private:
+  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx
index e6eebc6916b5..8c12eba71885 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx
@@ -16,6 +16,7 @@
 #include "EgammaReHadEnFex.h"
 #include "CaloGeoHelpers/CaloSampling.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
+#include "StoreGate/ReadHandle.h"
 #include <math.h>
 
 EgammaReHadEnFex::EgammaReHadEnFex(const std::string& type, const std::string& name,
@@ -23,6 +24,16 @@ EgammaReHadEnFex::EgammaReHadEnFex(const std::string& type, const std::string& n
     IReAlgToolCalo(type, name, parent)
 {}
 
+
+StatusCode EgammaReHadEnFex::initialize()
+{
+  ATH_CHECK( IReAlgToolCalo::initialize() );
+  ATH_CHECK( m_bcidAvgKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
+
 StatusCode EgammaReHadEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                      const CaloDetDescrElement*& /*caloDDE*/,
                                      const EventContext& context) const
@@ -43,10 +54,12 @@ StatusCode EgammaReHadEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const
 
   int ncells = 0;
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
+
   for (unsigned int sampling = 0; sampling < 3; sampling++) {
 
     LArTT_Selector<LArCellCont> sel;
-    ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTHEC, sampling, sel) );
+    ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTHEC, sampling, sel) );
 
     for (const LArCell* larcell : sel) {
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
index 0cc6b1fb8349..ded1859ce86c 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
@@ -18,6 +18,8 @@
 #define TRIGT2CALOEGAMMA_EGAMMAHADENFEXRE_H
 
 #include "TrigT2CaloCommon/IReAlgToolCalo.h"
+#include "CaloEvent/CaloBCIDAverage.h"
+#include "StoreGate/ReadHandleKey.h"
 
 /** Feature extraction Tool for LVL2 Calo. Hadronic EndCaps
 	and Tile Calorimeter. All Samples */
@@ -26,6 +28,10 @@ public:
     EgammaReHadEnFex(const std::string & type, const std::string & name, 
                      const IInterface* parent);
 
+
+    virtual StatusCode initialize() override;
+
+
     /** @brief execute feature extraction for the EM Calorimeter
     *   second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -35,6 +41,11 @@ public:
                                const IRoiDescriptor& roi,
                                const CaloDetDescrElement*& caloDDE,
                                const EventContext& context) const override;
+
+
+private:
+  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx
index 4cfd19522a18..07802968ee3c 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx
@@ -16,6 +16,8 @@
 
 #include "EgammaReSamp1Fex.h"
 #include "CaloGeoHelpers/CaloSampling.h"
+#include "StoreGate/ReadHandle.h"
+
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
 
@@ -29,6 +31,16 @@ EgammaReSamp1Fex::EgammaReSamp1Fex(const std::string& type, const std::string& n
     IReAlgToolCalo(type, name, parent)
 {}
 
+
+StatusCode EgammaReSamp1Fex::initialize()
+{
+  ATH_CHECK( IReAlgToolCalo::initialize() );
+  ATH_CHECK( m_bcidAvgKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
+
 StatusCode EgammaReSamp1Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                      const CaloDetDescrElement*& caloDDE,
                                      const EventContext& context) const
@@ -38,11 +50,13 @@ StatusCode EgammaReSamp1Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const
 
   ATH_MSG_DEBUG("in execute(TrigEMCluster &)");
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
+
   // Region Selector, sampling 1
   int sampling = 1;
 
   LArTT_Selector<LArCellCont> sel;
-  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel) );
 
   double totalEnergy = 0;
   double etaEnergyS1 = 0;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
index 4b60e6f421a0..70af372548f3 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
@@ -21,6 +21,8 @@
 #define TRIGT2CALOEGAMMA_CALOSAMP1FEXEGAMMARE_H
 
 #include "TrigT2CaloCommon/IReAlgToolCalo.h"
+#include "CaloEvent/CaloBCIDAverage.h"
+#include "StoreGate/ReadHandleKey.h"
 
 class IRoiDescriptor;
 
@@ -30,6 +32,8 @@ class EgammaReSamp1Fex: public IReAlgToolCalo {
     EgammaReSamp1Fex(const std::string & type, const std::string & name,
                      const IInterface* parent);
 
+    virtual StatusCode initialize() override;
+
     /** @brief execute feature extraction for the EM Calorimeter
     *   second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -39,6 +43,11 @@ class EgammaReSamp1Fex: public IReAlgToolCalo {
                                const IRoiDescriptor& roi,
                                const CaloDetDescrElement*& caloDDE,
                                const EventContext& context ) const override;
+
+
+private:
+    SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+    { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx
index a4e0dd52055b..54cf99debc7e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx
@@ -18,6 +18,7 @@
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
 #include "xAODTrigCalo/TrigEMCluster.h"
+#include "StoreGate/ReadHandle.h"
 
 EgammaReSamp2Fex::EgammaReSamp2Fex(const std::string& type, const std::string& name,
                                    const IInterface* parent) :
@@ -25,6 +26,15 @@ EgammaReSamp2Fex::EgammaReSamp2Fex(const std::string& type, const std::string& n
 {
 }
 
+
+StatusCode EgammaReSamp2Fex::initialize()
+{
+  ATH_CHECK( IReAlgToolCalo::initialize() );
+  ATH_CHECK( m_bcidAvgKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
 StatusCode EgammaReSamp2Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                      const CaloDetDescrElement*& caloDDE,
                                      const EventContext& context) const
@@ -34,8 +44,10 @@ StatusCode EgammaReSamp2Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const
   // Region Selector, sampling 2
   int sampling = 2;
 
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
+
   LArTT_Selector<LArCellCont> sel;
-  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel) );
 
   double energyEta = 0.;
   double energyPhi = 0.;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
index b14388a0e059..25565221c12e 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
@@ -22,6 +22,8 @@
 #include "GaudiKernel/AlgTool.h"
 #include "CaloGeoHelpers/CaloSampling.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
+#include "CaloEvent/CaloBCIDAverage.h"
+#include "StoreGate/ReadHandleKey.h"
 
 class IRoiDesciptor;
 
@@ -31,6 +33,10 @@ class EgammaReSamp2Fex: public IReAlgToolCalo {
     EgammaReSamp2Fex(const std::string & type, const std::string & name,
                      const IInterface* parent);
 
+
+    virtual StatusCode initialize() override;
+
+
     /** @brief execute feature extraction for the EM Calorimeter
     *	second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -46,6 +52,9 @@ class EgammaReSamp2Fex: public IReAlgToolCalo {
 
     Gaudi::Property<float> m_maxHotCellDeta{this, "MaxDetaHotCell", 1.0};
     Gaudi::Property<float> m_maxHotCellDphi{this, "MaxDphiHotCell", 1.0};
+
+    SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
+    { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 inline double EgammaReSamp2Fex::etaSizeLArEMSamp2(double cellEta, int calo) const{
-- 
GitLab


From eec27761e6f8045184f82b5c3f100a8ea6b0ed4c Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 29 Apr 2019 18:21:15 +0200
Subject: [PATCH 046/129] TrigUpgradeTest: Disable configuration of offset
 correction for tests.

---
 Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
index 75bc12030ecb..e855d7d95d49 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -119,6 +119,7 @@ jobproperties.Beam.beamType = 'collisions'
 jobproperties.Beam.bunchSpacing = 25
 globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200'
 athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline)
+TriggerFlags.doCaloOffsetCorrection = False
 
 log.info('Configured the following global flags:')
 globalflags.print_JobProperties()
-- 
GitLab


From eea2ecdafc6a6fd7c5f0f9d29094463bad7af337 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 1 May 2019 16:09:50 +0200
Subject: [PATCH 047/129] tauEvent: SGTools->AthenaKernel

Adjust for headers moved from SGTools to AthenaKernel.
---
 Reconstruction/tauEvent/CMakeLists.txt                 | 8 ++++----
 Reconstruction/tauEvent/src/Tau1P3PDetails.cxx         | 4 ++--
 Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx    | 4 ++--
 Reconstruction/tauEvent/src/TauCommonDetails.cxx       | 4 ++--
 Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx  | 4 ++--
 Reconstruction/tauEvent/src/TauPi0Details.cxx          | 4 ++--
 Reconstruction/tauEvent/src/TauRecDetails.cxx          | 4 ++--
 Reconstruction/tauEvent/src/TauRecExtraDetails.cxx     | 4 ++--
 Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h | 4 ++--
 Reconstruction/tauEvent/tauEvent/TauJetContainer.h     | 4 ++--
 10 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/Reconstruction/tauEvent/CMakeLists.txt b/Reconstruction/tauEvent/CMakeLists.txt
index 7855e05ff2a1..d247feb0d90b 100644
--- a/Reconstruction/tauEvent/CMakeLists.txt
+++ b/Reconstruction/tauEvent/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Calorimeter/CaloIdentifier
                           Control/AthLinks
                           Control/Navigation
-                          Control/SGTools
+                          Control/AthenaKernel
                           Event/EventKernel
                           Event/FourMom
                           Event/NavFourMom
@@ -35,19 +35,19 @@ atlas_add_library( tauEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation SGTools EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( tauEventDict
                       tauEvent/tauEventDict.h
                       tauEvent/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation SGTools EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent
                       ELEMENT_LINKS Analysis::TauJetContainer  Analysis::TauDetailsContainer )
 
 atlas_add_dictionary( tauEnumsDict
                       tauEvent/tauEnumsDict.h
                       tauEvent/selectionEnums.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation SGTools EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent )
 
diff --git a/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx b/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx
index e431f7d8320b..effd478060c8 100644
--- a/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx
+++ b/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file Tau1P3PDetails.cxx DEPRECATED DO NOT USE
@@ -18,7 +18,7 @@
 /// $Id: Tau1P3PDetails.cxx,v 1.12 2009-05-20 13:10:37 slai Exp $
 
 #include "tauEvent/Tau1P3PDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx b/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx
index 54e195c455ea..a5ebf62c7574 100644
--- a/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx
+++ b/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file Tau1P3PExtraDetails.cxx DEPRECATED DO NOT USE
@@ -18,7 +18,7 @@
 /// $Id: Tau1P3PExtraDetails.cxx,v 1.8 2009-01-17 01:34:16 tburgess Exp $
 
 #include "tauEvent/Tau1P3PExtraDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/src/TauCommonDetails.cxx b/Reconstruction/tauEvent/src/TauCommonDetails.cxx
index 7c2eeb232884..3a8bfdc3820e 100644
--- a/Reconstruction/tauEvent/src/TauCommonDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauCommonDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /// @file TauCommonDetails.cxx
@@ -20,7 +20,7 @@
 #include "tauEvent/TauCommonDetails.h"
 //Other includes
 #include "AthLinks/ElementLink.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "VxVertex/RecVertex.h"
 //C/C++ includes
 #include <string>
diff --git a/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx b/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx
index 4f685c7341cb..929663241aa5 100644
--- a/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauCommonExtraDetails.cxx
@@ -17,7 +17,7 @@
 #include "tauEvent/TauCommonExtraDetails.h"
 //Other includes
 #include "CaloEvent/CaloCellContainer.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "AthLinks/ElementLink.h"
 //C/C++ includes
 #include <string>
diff --git a/Reconstruction/tauEvent/src/TauPi0Details.cxx b/Reconstruction/tauEvent/src/TauPi0Details.cxx
index 7700ebb47425..ac45e30030c6 100644
--- a/Reconstruction/tauEvent/src/TauPi0Details.cxx
+++ b/Reconstruction/tauEvent/src/TauPi0Details.cxx
@@ -1,10 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // implementation of TauPi0Details
 
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "tauEvent/TauPi0Details.h"
 #include "tauEvent/TauPi0Candidate.h"
 #include "tauEvent/TauPi0Cluster.h"
diff --git a/Reconstruction/tauEvent/src/TauRecDetails.cxx b/Reconstruction/tauEvent/src/TauRecDetails.cxx
index 196de936c6cd..0e0f56df1f64 100644
--- a/Reconstruction/tauEvent/src/TauRecDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauRecDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauRecDetails.cxx  DEPRECATED DO NOT USE
@@ -16,7 +16,7 @@
 /// $Id: TauRecDetails.cxx,v 1.11 2009-05-20 13:10:37 slai Exp $
 
 #include "tauEvent/TauRecDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx b/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx
index a51cad21cbbd..b144ffaef526 100644
--- a/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauRecExtraDetails.cxx  DEPRECATED DO NOT USE
@@ -18,7 +18,7 @@
 /// $Id: TauRecExtraDetails.cxx,v 1.8 2009-01-17 11:16:25 tburgess Exp $
 
 #include "tauEvent/TauRecExtraDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h b/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h
index 20677e9907b1..1252d4b6ff00 100644
--- a/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h
+++ b/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauDetailsContainer.h
@@ -19,7 +19,7 @@
 #define TAU_DETAILS_CONTAINER_ANALYSIS_H
 
 #include "AthContainers/DataVector.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "tauEvent/TauDetails.h"
 
 namespace Analysis
diff --git a/Reconstruction/tauEvent/tauEvent/TauJetContainer.h b/Reconstruction/tauEvent/tauEvent/TauJetContainer.h
index 7b09d431cee1..1122cc3e663f 100644
--- a/Reconstruction/tauEvent/tauEvent/TauJetContainer.h
+++ b/Reconstruction/tauEvent/tauEvent/TauJetContainer.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------------
@@ -14,7 +14,7 @@
 #define TAU_CONTAINER_ANALYSIS_H
 
 #include "AthContainers/DataVector.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "tauEvent/TauJet.h"
 
 #include "NavFourMom/IParticleContainer.h"
-- 
GitLab


From 6f193bc4ad8974243a8ac3093ba87c7502bce997 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Thu, 2 May 2019 10:21:08 +0200
Subject: [PATCH 048/129] RpcDataPreparator: Code cleanup and optimization

- Remove unnecessary `InterfaceID` declarations
- Move properties to header file
- Remove unnecessary includes
- Calling base class initialize/finalize is not necessary
- Remove event/detector store handles and use them from base class
- Use range-based for loops
- Use `vector::reserve` where possible
- Do not import namespaces (`using namespace xyz`)
- Optimize eta/phi calculation:
  - Use `r^2` to avoid redundant `sqr(sqrt(...))` calculation
  - Use helper to wrap phi
  - Use `M_PI` from `cmath` instead of `CLHEP`
---
 .../TrigL2MuonSA/RpcDataPreparator.h          |  25 +--
 .../TrigL2MuonSA/src/RpcDataPreparator.cxx    | 170 +++++-------------
 2 files changed, 48 insertions(+), 147 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
index e72a0b755969..7d4afc9b0e9e 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
@@ -55,21 +55,14 @@ namespace TrigL2MuonSA {
 
 class RpcDataPreparator: public AthAlgTool
 {
-   public:
-      
-      static const InterfaceID& interfaceID();
-
    public:
 
       RpcDataPreparator(const std::string& type, 
 			const std::string& name,
 			const IInterface*  parent);
     
-      ~RpcDataPreparator();
-    
-      virtual StatusCode initialize();
-      virtual StatusCode finalize  ();
-    
+      virtual StatusCode initialize() override;
+
       StatusCode prepareData(const TrigRoiDescriptor*    p_roids,
 			     unsigned int roiWord,
 			     TrigL2MuonSA::RpcHits&      rpcHits,
@@ -80,11 +73,6 @@ class RpcDataPreparator: public AthAlgTool
       void setRoIBasedDataAccess(bool use_RoIBasedDataAccess);
 
  private:
-		       
-      // Reference to StoreGateSvc;
-      ServiceHandle<StoreGateSvc>   m_storeGateSvc;
-      ServiceHandle<ActiveStoreSvc> m_activeStore;
-      
       // Region Selector
       ServiceHandle<IRegSelSvc> m_regionSelector;
 
@@ -97,10 +85,13 @@ class RpcDataPreparator: public AthAlgTool
       const RpcIdHelper* m_rpcIdHelper;
 
       // handles to the RoI driven data access
-      ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool;
-      ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider;
+      ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool{
+       this, "RpcRawDataProvider", "Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool"};
+
+      ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider{
+       this, "RpcPrepDataProvider", "Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool"};
       
-      ToolHandle <Muon::MuonIdHelperTool>  m_idHelperTool;  //!< Pointer to concrete tool
+      ToolHandle <Muon::MuonIdHelperTool> m_idHelperTool{"Muon::MuonIdHelperTool/MuonIdHelperTool"};
 
       SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_rpcPrepContainerKey{
        this, "RpcPrepDataContainer", "RPC_Measurements", "Name of the RPCContainer to read in"};
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx
index 4fb61bd36a1d..68e384407c86 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx
@@ -1,39 +1,19 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <iostream>
+#include <cmath>
 
 #include "TrigL2MuonSA/RpcDataPreparator.h"
+#include "TrigL2MuonSA/RpcData.h"
+#include "TrigL2MuonSA/RecMuonRoIUtils.h"
 
-#include "StoreGate/StoreGateSvc.h"
-
-#include "CLHEP/Units/PhysicalConstants.h"
-
-#include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
-#include "MuonPrepRawData/MuonPrepDataContainer.h"
+#include "Identifier/IdentifierHash.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
-#include "MuonContainerManager/MuonRdoContainerAccess.h"
-#include "Identifier/IdentifierHash.h"
-
 #include "RPCcablingInterface/IRPCcablingServerSvc.h"
-
-#include "TrigL2MuonSA/RpcData.h"
-#include "TrigL2MuonSA/RecMuonRoIUtils.h"
-
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-
-using namespace Muon;
-using namespace MuonGM;
-using namespace SG;
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-static const InterfaceID IID_RpcDataPreparator("IID_RpcDataPreparator", 1, 0);
-
-const InterfaceID& TrigL2MuonSA::RpcDataPreparator::interfaceID() { return IID_RpcDataPreparator; }
+#include "TrigSteeringEvent/PhiHelper.h"
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
@@ -42,22 +22,7 @@ TrigL2MuonSA::RpcDataPreparator::RpcDataPreparator(const std::string& type,
                                                    const std::string& name,
                                                    const IInterface*  parent): 
    AthAlgTool(type,name,parent),
-   m_storeGateSvc( "StoreGateSvc", name ),
-   m_activeStore( "ActiveStoreSvc", name ),
-   m_regionSelector( "RegSelSvc", name ),
-   m_rawDataProviderTool("Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool"),
-   m_rpcPrepDataProvider("Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool"),
-   m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool")
-{
-   declareInterface<TrigL2MuonSA::RpcDataPreparator>(this);
-   declareProperty("RpcRawDataProvider", m_rawDataProviderTool);
-   declareProperty("RpcPrepDataProvider", m_rpcPrepDataProvider);
-}
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-TrigL2MuonSA::RpcDataPreparator::~RpcDataPreparator() 
+   m_regionSelector( "RegSelSvc", name )
 {
 }
 
@@ -66,26 +31,11 @@ TrigL2MuonSA::RpcDataPreparator::~RpcDataPreparator()
 
 StatusCode TrigL2MuonSA::RpcDataPreparator::initialize()
 {
-   // Get a message stream instance
-  ATH_MSG_DEBUG("Initializing RpcDataPreparator - package version " << PACKAGE_VERSION);
-   
-   StatusCode sc;
-   sc = AthAlgTool::initialize();
-   if (!sc.isSuccess()) {
-     ATH_MSG_ERROR("Could not initialize the AthAlgTool base class.");
-      return sc;
-   }
-   
-   ATH_CHECK( m_storeGateSvc.retrieve() ); 
-
    // Locate RegionSelector
    ATH_CHECK( m_regionSelector.retrieve() );
    ATH_MSG_DEBUG("Retrieved service RegionSelector");
 
-   ServiceHandle<StoreGateSvc> detStore("DetectorStore", name()); 
-   ATH_CHECK( detStore.retrieve() );
-   ATH_MSG_DEBUG("Retrieved DetectorStore.");
-   ATH_CHECK( detStore->retrieve( m_muonMgr ) );
+   ATH_CHECK( detStore()->retrieve( m_muonMgr ) );
    ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore.");
    m_rpcIdHelper = m_muonMgr->rpcIdHelper();
   
@@ -95,17 +45,10 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::initialize()
    ATH_CHECK( m_idHelperTool.retrieve() );
    ATH_MSG_DEBUG("Retrieved " << m_idHelperTool);
 
-   // Retrieve ActiveStore
-   ATH_CHECK( m_activeStore.retrieve() );
-   ATH_MSG_DEBUG("Retrieved ActiveStoreSvc."); 
-
    // Retreive PRC raw data provider tool
    ATH_MSG_DEBUG("Decode BS set to " << m_decodeBS);
-   if (m_rawDataProviderTool.retrieve(DisableTool{ !m_decodeBS }).isFailure()) {
-     msg (MSG::FATAL) << "Failed to retrieve " << m_rawDataProviderTool << endmsg;
-     return StatusCode::FAILURE;
-   } else
-     msg (MSG::INFO) << "Retrieved Tool " << m_rawDataProviderTool << endmsg;
+   ATH_CHECK( m_rawDataProviderTool.retrieve(DisableTool{ !m_decodeBS }) );
+   ATH_MSG_DEBUG("Retrieved Tool " << m_rawDataProviderTool);
 
    // Retrieve the RPC cabling service
    ServiceHandle<IRPCcablingServerSvc> RpcCabGet ("RPCcablingServerSvc", name());
@@ -119,8 +62,7 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::initialize()
    } 
    
    ATH_CHECK(m_rpcPrepContainerKey.initialize());
-   
-   // 
+
    return StatusCode::SUCCESS; 
 }
 
@@ -130,14 +72,13 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::initialize()
 void TrigL2MuonSA::RpcDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess)
 {
   m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;
-  return;
 }
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
 StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*    p_roids,
-							unsigned int roiWord,
+                                                        unsigned int roiWord,
                                                         TrigL2MuonSA::RpcHits&      rpcHits,
                                                         ToolHandle<RpcPatFinder>*   rpcPatFinder)
 {
@@ -179,7 +120,7 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*
 
    std::vector<const Muon::RpcPrepDataCollection*> rpcCols;
    std::vector<IdentifierHash> rpcHashList;
-   std::vector<IdentifierHash>  rpcHashList_cache;
+   std::vector<IdentifierHash> rpcHashList_cache;
 
    if (m_use_RoIBasedDataAccess) {
 
@@ -223,60 +164,41 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*
    if (!rpcHashList.empty()) {
      
      // Get RPC container
-     const RpcPrepDataContainer* rpcPrds;
-     if (m_activeStore) {		//m_activeStore->m_storeGateSvc
-       auto rpcPrepContainerHandle = SG::makeHandle(m_rpcPrepContainerKey);
-       rpcPrds = rpcPrepContainerHandle.cptr();                                 
-       if (!rpcPrepContainerHandle.isValid()) {
-         ATH_MSG_ERROR("Cannot retrieve RPC PRD Container key: " << m_rpcPrepContainerKey.key());
-         return StatusCode::FAILURE;
-       } else {
-         ATH_MSG_DEBUG(" RPC PRD Container retrieved with key: " << m_rpcPrepContainerKey.key());
-       }         
-     } else {
-       ATH_MSG_ERROR("Null pointer to ActiveStore");
+     const Muon::RpcPrepDataContainer* rpcPrds;
+     auto rpcPrepContainerHandle = SG::makeHandle(m_rpcPrepContainerKey);
+     rpcPrds = rpcPrepContainerHandle.cptr();
+     if (!rpcPrepContainerHandle.isValid()) {
+       ATH_MSG_ERROR("Cannot retrieve RPC PRD Container key: " << m_rpcPrepContainerKey.key());
        return StatusCode::FAILURE;
+     } else {
+       ATH_MSG_DEBUG("RPC PRD Container retrieved with key: " << m_rpcPrepContainerKey.key());
      }
-     // Get RPC collections
 
-     RpcPrepDataContainer::const_iterator RPCcoll;
-     for(std::vector<IdentifierHash>::const_iterator idit = rpcHashList.begin(); idit != rpcHashList.end(); ++idit) {
+     // Get RPC collections
+     for(const IdentifierHash& id : rpcHashList) {
 
-       RPCcoll = rpcPrds->indexFind(*idit);
+       Muon::RpcPrepDataContainer::const_iterator RPCcoll = rpcPrds->indexFind(id);
 
        if( RPCcoll == rpcPrds->end() ) {
          continue;
        }
 
-       if( (*RPCcoll)->size() == 0)    {
+       if( (*RPCcoll)->size() == 0) {
          ATH_MSG_DEBUG("Empty RPC list");
          continue;
        }
 
-       rpcHashList_cache.push_back(*idit);
-       
+       rpcHashList_cache.push_back(id);
        rpcCols.push_back(*RPCcoll);
-
-       if (rpcCols.empty()) {
-         ATH_MSG_DEBUG("No Rpc data collections selected");
-       }
      }
    }
 
-   std::vector< const RpcPrepDataCollection*>::const_iterator it = rpcCols.begin();
-   std::vector< const RpcPrepDataCollection*>::const_iterator it_end = rpcCols.end();
+   for( const Muon::RpcPrepDataCollection* rpc : rpcCols ){
 
-   for( ;it!=it_end;++it ){
-     Muon::RpcPrepDataCollection::const_iterator cit_begin = (*it)->begin();
-     Muon::RpcPrepDataCollection::const_iterator cit_end = (*it)->end();
-     if (cit_begin == cit_end) return StatusCode::SUCCESS;
-     
-     Muon::RpcPrepDataCollection::const_iterator cit = cit_begin;   
-     
-     cit = cit_begin;   
-     for( ; cit!=cit_end;++cit ) {
-       const Muon::RpcPrepData* prd = *cit;
-       Identifier id = prd->identify();
+     rpcHits.reserve( rpcHits.size() + rpc->size() );
+     for( const Muon::RpcPrepData* prd : *rpc ) {
+
+       const Identifier id = prd->identify();
 
        const int doubletR      = m_rpcIdHelper->doubletR(id);
        const int doubletPhi    = m_rpcIdHelper->doubletPhi(id);
@@ -328,15 +250,15 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*
        lutDigit.stationName = stationName;
        lutDigit.layer       = layer;
        
-       float r = sqrt(hitx*hitx+hity*hity);
+       const float r2 = hitx*hitx+hity*hity;
        float phi = atan(hity/hitx);
-       if (hitx<0 && hity>0) phi = phi + CLHEP::pi;
-       if (hitx<0 && hity<0) phi = phi - CLHEP::pi;
-       float l = sqrt(hitz*hitz+r*r);
-       float tan = sqrt( (l-hitz)/(l+hitz) );
-       float eta = -log(tan);
-       float deta = p_roids->eta() - eta;
-       float dphi = acos(cos( p_roids->phi() - phi ) );
+       if (hitx<0 && hity>0) phi += M_PI;
+       if (hitx<0 && hity<0) phi -= M_PI;
+       const float l = sqrt(hitz*hitz+r2);
+       const float tan = sqrt( (l-hitz)/(l+hitz) );
+       const float eta = -log(tan);
+       const float deta = fabs(p_roids->eta() - eta);
+       const float dphi = fabs(HLT::wrapPhi(p_roids->phi() - phi));
 
        lutDigit.eta = eta;
        lutDigit.phi = phi;
@@ -344,10 +266,10 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*
        rpcHits.push_back(lutDigit);
        
        if (m_use_RoIBasedDataAccess) {
-         if ( fabs(deta)<0.1 && fabs(dphi)<0.1)
+         if ( deta<0.1 && dphi<0.1)
            (*rpcPatFinder)->addHit(stationName, stationEta, measuresPhi, gasGap, doubletR, hitx, hity, hitz);
        } else {
-         if ( fabs(deta)<0.15 && fabs(dphi)<0.1)
+         if ( deta<0.15 && dphi<0.1)
            (*rpcPatFinder)->addHit(stationName, stationEta, measuresPhi, gasGap, doubletR, hitx, hity, hitz);
        }
      }
@@ -355,15 +277,3 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*
 
   return StatusCode::SUCCESS;
 }
-
-// --------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------
-
-StatusCode TrigL2MuonSA::RpcDataPreparator::finalize()
-{
-  ATH_MSG_DEBUG("Finalizing RpcDataPreparator - package version " << PACKAGE_VERSION);
-   
-   StatusCode sc = AthAlgTool::finalize(); 
-   return sc;
-}
-
-- 
GitLab


From 17dc17d455fe9bea73632a398448ebb562020736 Mon Sep 17 00:00:00 2001
From: sherwood <peter.sherwood@cern.ch>
Date: Thu, 2 May 2019 10:24:54 +0000
Subject: [PATCH 049/129] Unittests and debug

---
 .../TrigHLTJetHypo/src/DijetConditionMT.cxx   |  24 +-
 .../TrigHLTJetHypoUnitTests/CMakeLists.txt    |   4 +-
 .../MaximumBipartiteGroupsMatcherMTTest.cxx   | 359 ++++++++++++++++++
 ...BipartiteGroupsMatcherMTTest_BadConfig.cxx | 199 ++++++++++
 .../src/MaximumBipartiteGroupsMatcherTest.cxx |  60 ++-
 .../src/MockJetWithLorentzVector.h            |  10 +-
 6 files changed, 625 insertions(+), 31 deletions(-)
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx
index ca663fc39280..406b2544a94e 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx
@@ -61,21 +61,29 @@ DijetConditionMT::isSatisfied(const HypoJetVector& ips,
   if (m_detaMin > adeta or adeta >= m_detaMax){pass = false;}
 
    if(visitor){
-    visitor->visit(this,
-                   std::to_string(dphi)+ " " +
-                   std::to_string(mass) + " " +
-                   std::to_string(adeta) + " " +
-                   std::to_string(pass) +
-                   '\n');
+     std::stringstream ss;
+     const void* address = static_cast<const void*>(this);
+     ss << "Condition: " << address << " "
+        << dphi <<  " " <<  mass <<  " "  << adeta <<  " " 
+        <<std::boolalpha << pass <<  " jets: ";
+     for(auto ip : ips){
+       address = static_cast<const void*>(ip);
+       ss << address << " ";  
+     }
+     ss << '\n';
+     visitor->visit(this, ss.str());
    }
   return pass;
 
 }
 
 std::string DijetConditionMT::toString() const noexcept {
-  std::stringstream ss;
-  ss << "DijetConditionMT: "
 
+
+  std::stringstream ss;
+  const void* address = static_cast<const void*>(this);
+  ss << "DijetConditionMT: " << address << " "
+    
      << " mass min: " 
      << m_massMin
      << " mass max: " 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt
index 95aefaf50a23..e46817645720 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt
@@ -29,7 +29,9 @@ atlas_add_test( TrigHLTJetHypoUnitTests
    src/FlowNetworkTest.cxx
    src/LlpCleanerTest.cxx
    src/LooseCleanerTest.cxx
-   src/MaximumBipartiteMatcherTest.cxx
+   src/MaximumBipartiteGroupsMatcherTest.cxx
+   src/MaximumBipartiteGroupsMatcherMTTest.cxx
+   src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx
    src/MultiJetMatcherTest.cxx
    src/OrderedCollectionsMatcherTest.cxx
    src/SelectedJetsMatcherTest.cxx
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx
new file mode 100644
index 000000000000..6f217f14b3f2
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx
@@ -0,0 +1,359 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/../src//MaximumBipartiteGroupsMatcherMT.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+#include "TrigHLTJetHypo/../src/ConditionsDefsMT.h"
+#include "TrigHLTJetHypo/../src/conditionsFactoryMT.h"
+#include "TrigHLTJetHypo/../src/ConditionDebugVisitor.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+#include "./MockJetWithLorentzVector.h"
+#include "./TLorentzVectorFactory.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+#include <TLorentzVector.h>
+#include <memory>
+#include <iostream>
+
+
+/*
+ * MaximumBipartiteMatcher functionality tested:
+ * 0 fail if no jet vector indices
+ * 1 fail if no if there are fewer passing jets than conditions
+ * 2 pass if there are at least as many passing jets as conditions
+ * 3 conditions are ordered by threshold
+ * 4 jets are ordered by Et
+ *
+ * Mocked objects:
+ * - jet: will be ordered on ET, need TLorentzVector, hence
+ *        MockJetWithLorentzVector
+ * - ICondition
+ */
+
+using ::testing::Return;
+using ::testing::_;
+using ::testing::SetArgReferee;
+
+
+class MaximumBipartiteGroupsMatcherMTTest: public ::testing::Test {
+public:
+  MaximumBipartiteGroupsMatcherMTTest() {
+
+
+    std::vector<double> etaMins{-1., -1., -1.};
+    std::vector<double> etaMaxs{1., 1, 1.};
+    std::vector<double> thresholds{100., 120, 140.};
+    std::vector<int> asymmetricEtas{0, 0, 0, 0};
+
+    m_conditions = conditionsFactoryEtaEtMT(etaMins, etaMaxs,
+                                            thresholds, asymmetricEtas);
+    m_nconditions = m_conditions.size();
+  }
+
+  ConditionsMT m_conditions;
+  int m_nconditions;
+};
+
+HypoJetGroupVector makeJetGroupsMT(HypoJetIter b, HypoJetIter e){
+  CombinationsGrouper g(1);  // single jet groups
+  return g.group(b, e);
+}
+                                 
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, zeroInputJets){
+  /* test with 0 jets - fails, no passed for failed jets */
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+
+  HypoJetVector jets;
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+  
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, tooFewSelectedJets){
+  /* pass fewer jets than indicies. Fails, all jets are bad */
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl);
+  MockJetWithLorentzVector jet1{tl};
+
+  HypoJetVector jets{&jet0, &jet1};
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, oneSelectedJet){
+  /* 1 jet1 over highest threshold - check good/bad jet list, fail. */
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl);
+  MockJetWithLorentzVector jet1{tl};
+  MockJetWithLorentzVector jet2{tl};
+
+  eta = 0;
+  et = 150;
+  auto tl0 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl0};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, twoSelectedJets){
+  /* 2 jets over repsective thresholds - check good/bad jet list, fail. */
+
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 139;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 5.;
+  et = 100.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = 0;
+  et = 150;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, threeSelectedJets){
+  /* 3 jets over repsective thresholds - check good/bad jet list, pass.
+     Expect no failed jets (alg stops on success) and no checks on the
+     unused jet*/
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 139;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 0.5;
+  et = 141.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = -0.2;
+  et = 101.;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_TRUE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, fourSelectedJets){
+  /* 4 jets over repsective thresholds - check good/bad jet list, pass.
+     Expect no failed jets (alg stops on success) and no checks on the
+     unused jet*/
+
+  double eta{-0.6};
+  double et{180.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 139;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 0.5;
+  et = 175.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = -0.2;
+  et = 101.;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_TRUE(pass);
+}
+
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, overlappingEtaRegions){
+  /* 4 jets over repsective thresholds - check good/bad jet list, pass.
+     Expect no failed jets (alg stops on success) and no checks on the
+     unused jet*/
+
+  std::vector<double> etaMins{-1.00, -1.00, -0.25, -0.25};
+  std::vector<double> etaMaxs{ 0.25,  0.25,  1.00,  1.00};
+  std::vector<double> thresholds{100., 80, 140., 90.};
+  std::vector<int> asymmetricEtas{0, 0, 0, 0};
+
+  auto conditions = conditionsFactoryEtaEtMT(etaMins, etaMaxs,
+                                             thresholds, asymmetricEtas);
+  int nconditions = conditions.size();
+
+  double eta{0.1};
+  double et{180.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 101;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 0.1;
+  et = 91.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = 0.1;
+  et = 81.;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+  EXPECT_CALL(jet0, eta()).Times(nconditions);
+  EXPECT_CALL(jet1, eta()).Times(nconditions);
+  EXPECT_CALL(jet2, eta()).Times(nconditions);
+  EXPECT_CALL(jet3, eta()).Times(nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(nconditions);
+  EXPECT_CALL(jet1, et()).Times(nconditions);
+  EXPECT_CALL(jet2, et()).Times(nconditions);
+  EXPECT_CALL(jet3, et()).Times(nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_TRUE(pass);
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx
new file mode 100644
index 000000000000..0d63c0c18c79
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx
@@ -0,0 +1,199 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/../src//MaximumBipartiteGroupsMatcherMT.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+#include "TrigHLTJetHypo/../src/ConditionsDefsMT.h"
+#include "TrigHLTJetHypo/../src/conditionsFactoryMT.h"
+#include "TrigHLTJetHypo/../src/ConditionDebugVisitor.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+#include "./MockJetWithLorentzVector.h"
+#include "./TLorentzVectorFactory.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+#include <TLorentzVector.h>
+#include <memory>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <limits>
+#include <algorithm>
+
+
+/*
+ * MaximumBipartiteMatcher functionality tested:
+ * 0 fail if no jet vector indices
+ * 1 fail if no if there are fewer passing jets than conditions
+ * 2 pass if there are at least as many passing jets as conditions
+ * 3 conditions are ordered by threshold
+ * 4 jets are ordered by Et
+ *
+ * Mocked objects:
+ * - jet: will be ordered on ET, need TLorentzVector, hence
+ *        MockJetWithLorentzVector
+ * - ICondition
+ */
+
+using ::testing::Return;
+using ::testing::_;
+using ::testing::SetArgReferee;
+
+
+class MaximumBipartiteGroupsMatcherMTTest_BadConfig: public ::testing::Test {
+public:
+  MaximumBipartiteGroupsMatcherMTTest_BadConfig() {
+  }
+
+  ConditionsMT m_conditions;
+  int m_nconditions;
+  bool m_debug{false};
+  
+  HypoJetGroupVector makeJetGroupsMT(HypoJetIter b, HypoJetIter e){
+    CombinationsGrouper g(2);  // dijet groups
+    return g.group(b, e);
+  }
+
+  void makeConditions(const std::vector<double>& detaMins,
+                      const std::vector<double>& detaMaxs){
+    std::vector<double> massMins{0., 0.};
+    std::vector<double> massMaxs{
+      std::numeric_limits<double>::max(),
+        std::numeric_limits<double>::max(),
+        };
+
+
+    std::vector<double> dphiMins{0., 0.};
+    std::vector<double> dphiMaxs{
+      std::numeric_limits<double>::max(),
+        std::numeric_limits<double>::max(),
+        };
+
+
+    m_conditions = conditionsFactoryDijetMT(massMins, massMaxs,
+                                            detaMins, detaMaxs,
+                                            dphiMins, dphiMaxs);
+    m_nconditions = m_conditions.size();
+  }
+};
+
+
+HypoJetVector makeHypoJets(const std::vector<double>& etas) {
+
+  HypoJetVector jets;
+  jets.resize(etas.size());
+
+  auto factory = TLorentzVectorFactory();
+
+  auto dst = jets.begin();
+  auto make_jet = [&factory](double eta){
+    return new MockJetWithLorentzVector(factory.make(eta, 10.));
+  };
+
+  std::transform(etas.begin(),
+                 etas.end(),
+                 dst,
+                 make_jet);
+
+  return jets;
+}
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest_BadConfig, bad0){
+  /* (j0, j1) -> c0
+     (j0, j2) -> c0
+     (j0, j1) -> c1
+     Passes, but should fail as j0 is shared.
+  */
+
+  auto out = std::make_unique<std::ofstream>(nullptr);
+  if (m_debug){out.reset(new std::ofstream("BadConfig_bad0.log"));}
+
+  std::vector<double> detaMins{3.6, 5.5};
+  
+  std::vector<double> detaMaxs{
+    std::numeric_limits<double>::max(),
+      std::numeric_limits<double>::max(),
+      };
+  makeConditions(detaMins, detaMaxs);
+
+
+  if(out){
+    for(const auto& c : m_conditions){*out << c.toString();}
+  }
+
+  std::vector<double> etas{-5.0, 1.0, -1.0, -2.5};
+  EXPECT_TRUE(etas.size() == 4);
+  
+  auto jets = makeHypoJets(etas);
+  EXPECT_TRUE(jets.size() == 4);
+  if(m_debug){
+    for(const auto & j: jets){*out<< j << " " << j->toString() <<'\n';}
+  }
+  EXPECT_TRUE(m_conditions.size() == 2);
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  EXPECT_TRUE(groups.size() == 6);
+  auto visitor = std::unique_ptr<IConditionVisitor>();
+  visitor.reset(new ConditionDebugVisitor);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  if(out){
+    *out << "dumping visitor\n";
+    *out << visitor->toString();   
+  }
+  
+  for(auto j : jets){delete j;}
+  EXPECT_TRUE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest_BadConfig, bad1){
+  /* (j0, j3) -> c0
+     (j0, j1) -> c1
+     Passes, but should fail as j0 is shared.
+  */
+
+  auto out = std::make_unique<std::ofstream>(nullptr);
+  if (m_debug){out.reset(new std::ofstream("BadConfig_bad1.log"));}
+
+  std::vector<double> detaMins{3.6, 5.5};
+  
+  std::vector<double> detaMaxs{4.5, 6.5};
+  makeConditions(detaMins, detaMaxs);
+
+
+  if(out){
+    for(const auto& c : m_conditions){*out << c.toString();}
+  }
+
+  std::vector<double> etas{-5.0, 1.0, -1.0, -2.5};
+  EXPECT_TRUE(etas.size() == 4);
+  
+  auto jets = makeHypoJets(etas);
+  EXPECT_TRUE(jets.size() == 4);
+  if(m_debug){
+    for(const auto & j: jets){*out<<j<< " " << j->toString() <<'\n';}
+  }
+  EXPECT_TRUE(m_conditions.size() == 2);
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  EXPECT_TRUE(groups.size() == 6);
+  auto visitor = std::unique_ptr<IConditionVisitor>();
+  visitor.reset(new ConditionDebugVisitor);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  if(out){
+    *out << "dumping visitor\n";
+    *out << visitor->toString();   
+  }
+  
+  for(auto j : jets){delete j;}
+  EXPECT_TRUE(pass);
+}
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx
index 9007660739a8..baaebf52e9ea 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx
@@ -5,7 +5,9 @@
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/MaximumBipartiteGroupsMatcher.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
-#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
 #include "./MockJetWithLorentzVector.h"
 #include "./TLorentzVectorFactory.h"
 #include "gtest/gtest.h"
@@ -43,24 +45,30 @@ public:
     std::vector<double> etaMins{-1., -1., -1.};
     std::vector<double> etaMaxs{1., 1, 1.};
     std::vector<double> thresholds{100., 120, 140.};
+    std::vector<int> asymmetricEtas{0, 0, 0, 0};
 
-    m_conditions = conditionsFactory(etaMins, etaMaxs, thresholds);
-    m_name = "testOrderedConditionsMatcher";
+    m_conditions = conditionsFactoryEtaEt(etaMins, etaMaxs,
+                                          thresholds, asymmetricEtas);
     m_nconditions = m_conditions.size();
   }
 
   Conditions m_conditions;
   int m_nconditions;
-  std::string m_name;
 };
 
-
+HypoJetGroupVector makeJetGroups(HypoJetIter b, HypoJetIter e){
+  CombinationsGrouper g(1);  // single jet groups
+  return g.group(b, e);
+}
+                                 
 TEST_F(MaximumBipartiteGroupsMatcherTest, zeroInputJets){
   /* test with 0 jets - fails, no passed for failed jets */
 
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+
   HypoJetVector jets;
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+  matcher.match(groups.begin(), groups.end());
   
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(0));
@@ -81,9 +89,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, tooFewSelectedJets){
   MockJetWithLorentzVector jet1{tl};
 
   HypoJetVector jets{&jet0, &jet1};
+  auto groups = makeJetGroups(jets.begin(), jets.end());
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(0));
@@ -121,8 +130,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, oneSelectedJet){
   EXPECT_CALL(jet2, et()).Times(m_nconditions);
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(1));
@@ -172,8 +183,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, twoSelectedJets){
   EXPECT_CALL(jet2, et()).Times(m_nconditions);
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(2));
@@ -224,8 +237,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, threeSelectedJets){
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
   EXPECT_CALL(jet0, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_TRUE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(3));
@@ -275,8 +290,9 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, fourSelectedJets){
   EXPECT_CALL(jet2, et()).Times(m_nconditions);
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_TRUE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(3));
@@ -293,9 +309,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, overlappingEtaRegions){
   std::vector<double> etaMins{-1.00, -1.00, -0.25, -0.25};
   std::vector<double> etaMaxs{ 0.25,  0.25,  1.00,  1.00};
   std::vector<double> thresholds{100., 80, 140., 90.};
+  std::vector<int> asymmetricEtas{0, 0, 0, 0};
 
-  auto conditions = conditionsFactory(etaMins, etaMaxs, thresholds);
-  std::string name = "overlappingRegionsMatcher";
+  auto conditions = conditionsFactoryEtaEt(etaMins, etaMaxs,
+                                           thresholds, asymmetricEtas);
   int nconditions = conditions.size();
 
   double eta{0.1};
@@ -335,8 +352,9 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, overlappingEtaRegions){
   EXPECT_CALL(jet2, et()).Times(nconditions);
   EXPECT_CALL(jet3, et()).Times(nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(conditions, name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_TRUE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(4));
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h
index e11c90f1f46d..3400b54eeabd 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h
@@ -31,9 +31,17 @@ public:
   MOCK_CONST_METHOD0(et, double());
   MOCK_CONST_METHOD0(rapidity, double());
   TLorentzVector p4() const {return m_lv;}
+  std::string toString() const {
+    double etav = eta();
+    double etv = et();
+    std::string s = "et: " + std::to_string(etv) +
+      " eta: " + std::to_string(etav);
+    return s;
+  }
+
   MOCK_CONST_METHOD0(position, unsigned int());
   MOCK_CONST_METHOD2(getAttribute, bool (const std::string&, float&));
-  MOCK_CONST_METHOD0(toString, std::string());
+  // MOCK_CONST_METHOD0(toString, std::string());
 
  private:
   TLorentzVector m_lv;
-- 
GitLab


From 6767dd1cad5d229987cff277f29cb7bafa4c07e7 Mon Sep 17 00:00:00 2001
From: John Kenneth Anders <john.kenneth.anders@cern.ch>
Date: Wed, 1 May 2019 11:22:45 +0000
Subject: [PATCH 050/129] Merge branch 'jet-validation-update-201904' into
 '21.0'

Physics Validation Jet monitoring substructure added

See merge request atlas/athena!22970

(cherry picked from commit c5568c0595d47724ed5d130a415ee1a28b5d3e37)

7666613a jetValidation monitoring substructure added
aae78ead unnecessary blank spaces deleted; original variables uncommented
2aa781b5 debugged
---
 .../Jet/JetMonitoring/python/JetHistoTools.py |  26 +--
 .../python/PhysicsValidationHistos.py         | 148 +++++++++---------
 2 files changed, 93 insertions(+), 81 deletions(-)

diff --git a/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py b/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py
index d27963b3e5b2..0564d269448b 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetHistoTools.py
@@ -24,6 +24,13 @@ compactSpecification = {
 #
 #  Jet moments added from https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/Run2JetMoments/
 #
+
+    #newly added Substructure variables:	
+    "DetectorEta"      : (("DetectorEta;DetectorEta;",100,-5,5),("DetectorEta","float")),
+    "NTrimSubjets"     : (("NTrimSubjets;NTrimSubjets;",20,0,20),("NTrimSubjets","int")),
+    "TrackSumPt"      : (("TrackSumPt;TrackSumPt;",80,0,8000),("TrackSumPt","float")),
+    "TrackSumMass"     : (("TrackSumMass;TrackSumMass;",100,0,10000),("TrackSumMass","float")), 
+    "Qw"      : (("Qw;Qw;",100,0,100000),("Qw","float")),	
     "KtDR"             : (("KtDR;KtDR;",100,0,10),("KtDR","float")),
 #
     "Tau1"             : (("Tau1;Tau1;",100,0,1.0),("Tau1","float")),
@@ -42,23 +49,23 @@ compactSpecification = {
     "Dip23"            : (("Dip23;Dip23;",100,-1,2),("Dip23","float")),
     "DipExcl12"        : (("DipExcl12;DipExcl12;",100,-1,2),("DipExcl12","float")),
 #
-    "Split12"          : (("Split12;Split12;",100,0,5000),("Split12","float")),
-    "Split23"          : (("Split23;Split23;",100,0,5000),("Split23","float")),
-    "Split34"          : (("Split34;Split34;",100,0,5000),("Split34","float")),
+    "Split12"          : (("Split12;Split12;",100,0,70000),("Split12","float")),
+    "Split23"          : (("Split23;Split23;",60,0,24000),("Split23","float")),
+    "Split34"          : (("Split34;Split34;",100,0,10000),("Split34","float")),
 #
     "ZCut12"           : (("ZCut12;ZCut12;",100,0,1.0),("ZCut12","float")),
     "ZCut23"           : (("ZCut23;ZCut23;",100,0,1.0),("ZCut23","float")),
     "ZCut34"           : (("ZCut34;ZCut34;",100,0,1.0),("ZCut34","float")),
 #
-    "Angularity"       : (("Angularity;Angularity;",100,-.1,.1), ("Angularity","float")),
+    "Angularity"       : (("Angularity;Angularity;",50,-.1,.1), ("Angularity","float")),
 #
     "PlanarFlow"       : (("PlanarFlow;PlanarFlow;",100,-1,1.1),("PlanarFlow","float")),
 #
     "Mu12"             : (("Mu12;Mu12;",100,0,1.0),("Mu12","float")),
 #
-    "ECF1"             : (("ECF1;ECF1;",100,0,10000),("ECF1","float")),
-    "ECF2"             : (("ECF2;ECF2;",100,0,10000),("ECF2","float")),
-    "ECF3"             : (("ECF3;ECF3;",100,0,10000),("ECF3","float")),
+    "ECF1"             : (("ECF1;ECF1;",50,0,200000),("ECF1","float")),
+    "ECF2"             : (("ECF2;ECF2;",100,0,2e10),("ECF2","float")),
+    "ECF3"             : (("ECF3;ECF3;",100,0,1e14),("ECF3","float")),
     "ECF1_Beta2"       : (("ECF1_Beta2;ECF1_Beta2;",100,-1,1),("ECF1_Beta2","float")),
     "ECF2_Beta2"       : (("ECF2_Beta2;ECF2_Beta2;",100,-1,1),("ECF2_Beta2","float")),
     "ECF3_Beta2"       : (("ECF3_Beta2;ECF3_Beta2;",100,-1,1),("ECF3_Beta2","float")),
@@ -112,16 +119,13 @@ compactSpecification = {
     'JVFCorr'          : (("Jet JVT JVFCorr;;", 120, -1.2, 1.2) , ("JVFCorr","float" ) ),
     'Jvt'              : (("Jet JVT;;", 70, -0.2, 1.2) , ("Jvt","float" ) ),
     'JvtRpt'           : (("Jet JVT Rpt;;", 75, 0, 1.5) , ("JvtRpt","float" ) ),
-
     "SumPtTrkPt500"    : (("Sum Pt of all tracks above 0.5 GeV:SumPt(p_{T}>0.5 GeV);", 100,0,200), ("SumPtTrkPt500", "vector<float>", "gev") ),
     "SumPtTrkPt500[0]" : (("Sum Pt of tracks from PV0 above 0.5 GeV:SumPt(p_{T}>0.5 GeV);", 100,0,200), ("SumPtTrkPt500[0]", "vector<float>", "gev") ),
     "NumTrkPt500[0]"   : (("Number of tracks from PV0 above 0.5 GeV:N_{tracks}(p_{T}>0.5 GeV);", 100,0,100), ("NumTrkPt500[0]", "vector<int>") ),
     "NumTrkPt1000[0]"    : (("Number of all tracks above 1 GeV:N_{tracks}(p_{T}>1 GeV);", 100,0,100), ("NumTrkPt1000[0]", "vector<int>") ),
     "TrackWidthPt1000[0]": (("Width from tracks from PV0 above 1 GeV:Track Width(p_{T}>1 GeV);", 75,0.,1.5), ("TrackWidthPt1000[0]", "vector<float>") ),
-
     "ActiveArea"       : (("Active Area;Area;", 80, 0, 0.8), ("ActiveArea", "float") ),
     "ActiveArea15"     : (("Active Area;Area;", 80, 0, 1.5), ("ActiveArea", "float") ),
-
     "BchCorrDotx"      : (("BchCorrDotx:BchCorrDotx;",50,0,1), ("BchCorrDotx", "float") ),
     "BchCorrCell"      : (("BchCorrCell:BchCorrCell;",50,0,1), ("BchCorrCell", "float") ),
     ## Jet Cleaning variables ##
@@ -257,3 +261,5 @@ def selectionAndHistos( selectType, histos, selectionName="", histoNameSuffix=""
     return selTool
 
 
+
+
diff --git a/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py b/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py
index 039d22628a03..fd6a09ece051 100644
--- a/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py
+++ b/Reconstruction/Jet/JetValidation/python/PhysicsValidationHistos.py
@@ -43,11 +43,11 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
         return containerfiller
 
     filler.HistoTools += [
-        
+
         # Draw a set of histo for a particular jet selection :
         selectionAndHistos( "leadingjet" , [ "basickinematics", ] ),
         selectionAndHistos( "subleadingjet" , [ "basickinematics"] ),
-
+        selectionAndHistos("40000<pt<50000",["pt"]),
         jhm.Width,
 
         # distances between 2 leading jets.
@@ -56,7 +56,7 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
 
     if "Topo" in container or "PFlow" in container:
         filler.HistoTools += [
-
+         
             # jet states
             jhm.basickinematics_emscale,
             jhm.basickinematics_constscale,
@@ -96,7 +96,7 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
             jhm.TileExt0,
             jhm.TileExt1,
 
-            ]
+	     ]
         
         if refcontainer:
             # efficiency
@@ -105,61 +105,68 @@ def commonPhysValTool(container, refcontainer="", onlyKinematics = False, global
 
         if "Trimmed" in container:
             filler.HistoTools += [
-                jhm.KtDR,
-                jhm.Tau1,
-                jhm.Tau2,
-                jhm.Tau3,
-                jhm.Tau1_wta,
-                jhm.Tau2_wta,
-                jhm.Tau3_wta,
-                jhm.Tau21,
-                jhm.Tau32,
-                jhm.Tau21_wta,
-                jhm.Tau32_wta,
-                jhm.Dip12,
-                jhm.Dip13,
-                jhm.Dip23,
-                jhm.DipExcl12,
-                jhm.Split12,
-                jhm.Split23,
-                jhm.Split34,
-                jhm.ZCut12,
-                jhm.ZCut23,
-                jhm.ZCut34,
-                jhm.Angularity,
-                jhm.PlanarFlow,
-                jhm.Mu12,
-                jhm.ECF1,
-                jhm.ECF2,
-                jhm.ECF3,
-                jhm.ECF1_Beta2,
-                jhm.ECF2_Beta2,
-                jhm.ECF3_Beta2,
-                jhm.C1,
-                jhm.C2,
-                jhm.D2,
-                jhm.C1_Beta2,
-                jhm.C2_Beta2,
-                jhm.D2_Beta2,
-                jhm.ThrustMin,
-                jhm.ThrustMaj,
-                jhm.FoxWolfram0,
-                jhm.FoxWolfram1,
-                jhm.FoxWolfram2,
-                jhm.FoxWolfram3,
-                jhm.FoxWolfram4,
-                jhm.Sphericity,
-                jhm.Aplanarity,
-                jhm.PullMag,
-                jhm.PullPhi,
-                jhm.Pull_C00,
-                jhm.Pull_C01,
-                jhm.Pull_C10,
-                jhm.Pull_C11,
-                jhm.Charge,
-                jhm.ShowerDeconstructionW,
-                jhm.ShowerDeconstructionTop,
-                jhm.Volatility,
+               
+              #main list of substrcture variables
+              jhm.ECF1,
+              jhm.ECF2,
+              jhm.ECF3,
+              jhm.Tau1_wta,
+              jhm.Tau2_wta,
+              jhm.Tau3_wta,
+              jhm.Split12,
+              jhm.Split23,
+              jhm.NTrimSubjets,
+              jhm.DetectorEta,
+              jhm.TrackSumPt,
+              jhm.TrackSumMass,      
+              jhm.Qw,
+              jhm.PlanarFlow,
+              jhm.FoxWolfram2,
+              jhm.FoxWolfram0,
+              jhm.Angularity,
+              jhm.Aplanarity,
+              jhm.KtDR,
+              jhm.ZCut12,
+              
+              # other substructure variables:
+               jhm.Tau21,
+               jhm.Tau32,
+               jhm.Tau21_wta,
+               jhm.Tau32_wta,
+               jhm.Dip12,
+               jhm.Dip13,
+               jhm.Dip23,
+               jhm.DipExcl12,
+               jhm.Split34,
+               jhm.ZCut23,
+               jhm.ZCut34,
+               jhm.Mu12,
+               jhm.ECF1_Beta2,
+               jhm.ECF2_Beta2,
+               jhm.ECF3_Beta2,
+               jhm.C1,
+               jhm.C2,
+               jhm.D2,
+               jhm.C1_Beta2,
+               jhm.C2_Beta2,
+               jhm.D2_Beta2,
+               jhm.ThrustMin,
+               jhm.ThrustMaj,
+               jhm.FoxWolfram1,
+               jhm.FoxWolfram3,
+               jhm.FoxWolfram4,
+               jhm.Sphericity,
+               jhm.Aplanarity,
+               jhm.PullMag,
+               jhm.PullPhi,
+               jhm.Pull_C00,
+               jhm.Pull_C01,
+               jhm.Pull_C10,
+               jhm.Pull_C11,
+               jhm.Charge,
+               jhm.ShowerDeconstructionW,
+               jhm.ShowerDeconstructionTop,
+               jhm.Volatility,
                 ]
 
     #filler.OutputLevel =2 
@@ -176,15 +183,15 @@ globalSelection = ""
 ###
 
 athenaMonTool = JetMonitoringTool(HistoTools = [
-    commonPhysValTool( "AntiKt4LCTopoJets", akt4refContainer ,globalSelection = globalSelection),
-    commonPhysValTool( "AntiKt4EMTopoJets", akt4refContainer ,globalSelection = globalSelection),
+   commonPhysValTool( "AntiKt4LCTopoJets", akt4refContainer ,globalSelection = globalSelection),
+   commonPhysValTool( "AntiKt4EMTopoJets", akt4refContainer ,globalSelection = globalSelection),
 #   the containers that are commented out are kept so as to make it possible to swicth them on in the future if needed
-#   commonPhysValTool( "AntiKt10LCTopoJets" ),
-#   commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
-#   commonPhysValTool( "AntiKt2PV0TrackJets" ),
-    commonPhysValTool( "AntiKt4EMPFlowJets" ),
-    commonPhysValTool( "AntiKt4TruthJets" ),
-#    commonPhysValTool( "AntiKt10TruthJets" ),
+   #commonPhysValTool( "AntiKt10LCTopoJets" ),
+    commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
+   #commonPhysValTool( "AntiKt10PV0TracksJets" ),
+   #commonPhysValTool( "AntiKt10TruthJets" ),
+    commonPhysValTool( "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" ),
+   #commonPhysValTool( "AntiKt10TruthWZJets" ),
     ], IntervalType=8) # 8 == HistoGroupBase::all
 
 
@@ -193,14 +200,13 @@ if (isMC==False):
     commonPhysValTool( "AntiKt4LCTopoJets", akt4refContainer ,globalSelection = globalSelection),
     commonPhysValTool( "AntiKt4EMTopoJets", akt4refContainer ,globalSelection = globalSelection),
 #   the containers that are commented out are kept so as to make it possible to swicth them on in the future if needed
-#    commonPhysValTool( "AntiKt10LCTopoJets" ),
-#    commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
+    commonPhysValTool( "AntiKt10LCTopoJets" ),
+    commonPhysValTool( "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" ),
 #    commonPhysValTool( "AntiKt2PV0TrackJets" ),
-    commonPhysValTool( "AntiKt4EMPFlowJets" ),
+#    commonPhysValTool( "AntiKt4EMPFlowJets" ),
     ], IntervalType=8) # 8 == HistoGroupBase::all
 
 #ToolSvc += athenaMonTool
 
 def athenaPhysValTool():
     return athenaMonTool
-
-- 
GitLab


From 542b49ddf38ef542aaa133b65d74d1c6fb1e04a7 Mon Sep 17 00:00:00 2001
From: John Kenneth Anders <john.kenneth.anders@cern.ch>
Date: Wed, 1 May 2019 09:53:55 +0000
Subject: [PATCH 051/129] Merge branch '21.0-autconfig-2019' into '21.0'

Add data19 and data20 cosmics projects to autoconfiguration

See merge request atlas/athena!23056

(cherry picked from commit 6c2545409fc19cf7ec1ca8db8eb422e70ea4f03b)

31b68008 Add data19 and data20 cosmics projects
---
 .../RecExample/RecExConfig/python/AutoConfiguration.py       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py b/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
index b90cb19f36a6..5acd9f17f991 100644
--- a/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
+++ b/Reconstruction/RecExample/RecExConfig/python/AutoConfiguration.py
@@ -1,3 +1,4 @@
+
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 ##=============================================================================
@@ -24,7 +25,9 @@ KnownCosmicsProjects=frozenset(["data08_calocomm","data08_muoncomm","data08_cos"
                                 "data15_calib","data15_calocomm","data15_cos","data15_idcomm","data15_larcomm","data15_muoncomm","data15_tilecomm",
                                 "data16_calib","data16_calocomm","data16_cos","data16_idcomm","data16_larcomm","data16_muoncomm","data16_tilecomm",
                                 "data17_calib","data17_calocomm","data17_cos","data17_idcomm","data17_larcomm","data17_muoncomm","data17_tilecomm",
-                                "data18_calib","data18_calocomm","data18_cos","data18_idcomm","data18_larcomm","data18_muoncomm","data18_tilecomm"
+                                "data18_calib","data18_calocomm","data18_cos","data18_idcomm","data18_larcomm","data18_muoncomm","data18_tilecomm",
+                                "data19_calib","data19_calocomm","data19_cos","data19_idcomm","data19_larcomm","data19_muoncomm","data19_tilecomm",
+                                "data20_calib","data20_calocomm","data20_cos","data20_idcomm","data20_larcomm","data20_muoncomm","data20_tilecomm",
                                 ])
 
 # Abandon the single-beam reconstruction all together, 26 February 2011 
-- 
GitLab


From 82920068e479c22b0a20c7251bb5ec5e797afe38 Mon Sep 17 00:00:00 2001
From: sherwood <peter.sherwood@cern.ch>
Date: Thu, 2 May 2019 10:24:54 +0000
Subject: [PATCH 052/129] Unittests and debug

---
 .../TrigHLTJetHypo/src/DijetConditionMT.cxx   |  24 +-
 .../TrigHLTJetHypoUnitTests/CMakeLists.txt    |   4 +-
 .../MaximumBipartiteGroupsMatcherMTTest.cxx   | 359 ++++++++++++++++++
 ...BipartiteGroupsMatcherMTTest_BadConfig.cxx | 199 ++++++++++
 .../src/MaximumBipartiteGroupsMatcherTest.cxx |  60 ++-
 .../src/MockJetWithLorentzVector.h            |  10 +-
 6 files changed, 625 insertions(+), 31 deletions(-)
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx
index ca663fc39280..406b2544a94e 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/DijetConditionMT.cxx
@@ -61,21 +61,29 @@ DijetConditionMT::isSatisfied(const HypoJetVector& ips,
   if (m_detaMin > adeta or adeta >= m_detaMax){pass = false;}
 
    if(visitor){
-    visitor->visit(this,
-                   std::to_string(dphi)+ " " +
-                   std::to_string(mass) + " " +
-                   std::to_string(adeta) + " " +
-                   std::to_string(pass) +
-                   '\n');
+     std::stringstream ss;
+     const void* address = static_cast<const void*>(this);
+     ss << "Condition: " << address << " "
+        << dphi <<  " " <<  mass <<  " "  << adeta <<  " " 
+        <<std::boolalpha << pass <<  " jets: ";
+     for(auto ip : ips){
+       address = static_cast<const void*>(ip);
+       ss << address << " ";  
+     }
+     ss << '\n';
+     visitor->visit(this, ss.str());
    }
   return pass;
 
 }
 
 std::string DijetConditionMT::toString() const noexcept {
-  std::stringstream ss;
-  ss << "DijetConditionMT: "
 
+
+  std::stringstream ss;
+  const void* address = static_cast<const void*>(this);
+  ss << "DijetConditionMT: " << address << " "
+    
      << " mass min: " 
      << m_massMin
      << " mass max: " 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt
index 95aefaf50a23..e46817645720 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/CMakeLists.txt
@@ -29,7 +29,9 @@ atlas_add_test( TrigHLTJetHypoUnitTests
    src/FlowNetworkTest.cxx
    src/LlpCleanerTest.cxx
    src/LooseCleanerTest.cxx
-   src/MaximumBipartiteMatcherTest.cxx
+   src/MaximumBipartiteGroupsMatcherTest.cxx
+   src/MaximumBipartiteGroupsMatcherMTTest.cxx
+   src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx
    src/MultiJetMatcherTest.cxx
    src/OrderedCollectionsMatcherTest.cxx
    src/SelectedJetsMatcherTest.cxx
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx
new file mode 100644
index 000000000000..6f217f14b3f2
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest.cxx
@@ -0,0 +1,359 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/../src//MaximumBipartiteGroupsMatcherMT.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+#include "TrigHLTJetHypo/../src/ConditionsDefsMT.h"
+#include "TrigHLTJetHypo/../src/conditionsFactoryMT.h"
+#include "TrigHLTJetHypo/../src/ConditionDebugVisitor.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+#include "./MockJetWithLorentzVector.h"
+#include "./TLorentzVectorFactory.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+#include <TLorentzVector.h>
+#include <memory>
+#include <iostream>
+
+
+/*
+ * MaximumBipartiteMatcher functionality tested:
+ * 0 fail if no jet vector indices
+ * 1 fail if no if there are fewer passing jets than conditions
+ * 2 pass if there are at least as many passing jets as conditions
+ * 3 conditions are ordered by threshold
+ * 4 jets are ordered by Et
+ *
+ * Mocked objects:
+ * - jet: will be ordered on ET, need TLorentzVector, hence
+ *        MockJetWithLorentzVector
+ * - ICondition
+ */
+
+using ::testing::Return;
+using ::testing::_;
+using ::testing::SetArgReferee;
+
+
+class MaximumBipartiteGroupsMatcherMTTest: public ::testing::Test {
+public:
+  MaximumBipartiteGroupsMatcherMTTest() {
+
+
+    std::vector<double> etaMins{-1., -1., -1.};
+    std::vector<double> etaMaxs{1., 1, 1.};
+    std::vector<double> thresholds{100., 120, 140.};
+    std::vector<int> asymmetricEtas{0, 0, 0, 0};
+
+    m_conditions = conditionsFactoryEtaEtMT(etaMins, etaMaxs,
+                                            thresholds, asymmetricEtas);
+    m_nconditions = m_conditions.size();
+  }
+
+  ConditionsMT m_conditions;
+  int m_nconditions;
+};
+
+HypoJetGroupVector makeJetGroupsMT(HypoJetIter b, HypoJetIter e){
+  CombinationsGrouper g(1);  // single jet groups
+  return g.group(b, e);
+}
+                                 
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, zeroInputJets){
+  /* test with 0 jets - fails, no passed for failed jets */
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+
+  HypoJetVector jets;
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+  
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, tooFewSelectedJets){
+  /* pass fewer jets than indicies. Fails, all jets are bad */
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl);
+  MockJetWithLorentzVector jet1{tl};
+
+  HypoJetVector jets{&jet0, &jet1};
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, oneSelectedJet){
+  /* 1 jet1 over highest threshold - check good/bad jet list, fail. */
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl);
+  MockJetWithLorentzVector jet1{tl};
+  MockJetWithLorentzVector jet2{tl};
+
+  eta = 0;
+  et = 150;
+  auto tl0 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl0};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, twoSelectedJets){
+  /* 2 jets over repsective thresholds - check good/bad jet list, fail. */
+
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 139;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 5.;
+  et = 100.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = 0;
+  et = 150;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_FALSE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, threeSelectedJets){
+  /* 3 jets over repsective thresholds - check good/bad jet list, pass.
+     Expect no failed jets (alg stops on success) and no checks on the
+     unused jet*/
+
+  double eta{5};
+  double et{100.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 139;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 0.5;
+  et = 141.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = -0.2;
+  et = 101.;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_TRUE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, fourSelectedJets){
+  /* 4 jets over repsective thresholds - check good/bad jet list, pass.
+     Expect no failed jets (alg stops on success) and no checks on the
+     unused jet*/
+
+  double eta{-0.6};
+  double et{180.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 139;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 0.5;
+  et = 175.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = -0.2;
+  et = 101.;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+  EXPECT_CALL(jet0, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet1, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet2, eta()).Times(m_nconditions);
+  EXPECT_CALL(jet3, eta()).Times(m_nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(m_nconditions);
+  EXPECT_CALL(jet1, et()).Times(m_nconditions);
+  EXPECT_CALL(jet2, et()).Times(m_nconditions);
+  EXPECT_CALL(jet3, et()).Times(m_nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_TRUE(pass);
+}
+
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest, overlappingEtaRegions){
+  /* 4 jets over repsective thresholds - check good/bad jet list, pass.
+     Expect no failed jets (alg stops on success) and no checks on the
+     unused jet*/
+
+  std::vector<double> etaMins{-1.00, -1.00, -0.25, -0.25};
+  std::vector<double> etaMaxs{ 0.25,  0.25,  1.00,  1.00};
+  std::vector<double> thresholds{100., 80, 140., 90.};
+  std::vector<int> asymmetricEtas{0, 0, 0, 0};
+
+  auto conditions = conditionsFactoryEtaEtMT(etaMins, etaMaxs,
+                                             thresholds, asymmetricEtas);
+  int nconditions = conditions.size();
+
+  double eta{0.1};
+  double et{180.};
+
+  auto factory = TLorentzVectorFactory();
+  auto tl0 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet0(tl0);
+
+  eta = 0.1;
+  et = 101;
+  auto tl1 = factory.make(eta, et);
+
+  MockJetWithLorentzVector jet1{tl1};
+
+
+  eta = 0.1;
+  et = 91.;
+  auto tl2 = factory.make(eta, et);
+  MockJetWithLorentzVector jet2{tl2};
+
+  eta = 0.1;
+  et = 81.;
+  auto tl3 = factory.make(eta, et);
+  MockJetWithLorentzVector jet3{tl3};
+
+  HypoJetVector jets{&jet0, &jet1, &jet2, &jet3};
+
+  EXPECT_CALL(jet0, eta()).Times(nconditions);
+  EXPECT_CALL(jet1, eta()).Times(nconditions);
+  EXPECT_CALL(jet2, eta()).Times(nconditions);
+  EXPECT_CALL(jet3, eta()).Times(nconditions);
+
+  EXPECT_CALL(jet0, et()).Times(nconditions);
+  EXPECT_CALL(jet1, et()).Times(nconditions);
+  EXPECT_CALL(jet2, et()).Times(nconditions);
+  EXPECT_CALL(jet3, et()).Times(nconditions);
+
+  MaximumBipartiteGroupsMatcherMT matcher(conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  auto visitor = std::unique_ptr<IConditionVisitor>(nullptr);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  EXPECT_TRUE(pass);
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx
new file mode 100644
index 000000000000..0d63c0c18c79
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherMTTest_BadConfig.cxx
@@ -0,0 +1,199 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/../src//MaximumBipartiteGroupsMatcherMT.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+#include "TrigHLTJetHypo/../src/ConditionsDefsMT.h"
+#include "TrigHLTJetHypo/../src/conditionsFactoryMT.h"
+#include "TrigHLTJetHypo/../src/ConditionDebugVisitor.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+#include "./MockJetWithLorentzVector.h"
+#include "./TLorentzVectorFactory.h"
+#include "gtest/gtest.h"
+#include "gmock/gmock.h"
+
+#include <TLorentzVector.h>
+#include <memory>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <limits>
+#include <algorithm>
+
+
+/*
+ * MaximumBipartiteMatcher functionality tested:
+ * 0 fail if no jet vector indices
+ * 1 fail if no if there are fewer passing jets than conditions
+ * 2 pass if there are at least as many passing jets as conditions
+ * 3 conditions are ordered by threshold
+ * 4 jets are ordered by Et
+ *
+ * Mocked objects:
+ * - jet: will be ordered on ET, need TLorentzVector, hence
+ *        MockJetWithLorentzVector
+ * - ICondition
+ */
+
+using ::testing::Return;
+using ::testing::_;
+using ::testing::SetArgReferee;
+
+
+class MaximumBipartiteGroupsMatcherMTTest_BadConfig: public ::testing::Test {
+public:
+  MaximumBipartiteGroupsMatcherMTTest_BadConfig() {
+  }
+
+  ConditionsMT m_conditions;
+  int m_nconditions;
+  bool m_debug{false};
+  
+  HypoJetGroupVector makeJetGroupsMT(HypoJetIter b, HypoJetIter e){
+    CombinationsGrouper g(2);  // dijet groups
+    return g.group(b, e);
+  }
+
+  void makeConditions(const std::vector<double>& detaMins,
+                      const std::vector<double>& detaMaxs){
+    std::vector<double> massMins{0., 0.};
+    std::vector<double> massMaxs{
+      std::numeric_limits<double>::max(),
+        std::numeric_limits<double>::max(),
+        };
+
+
+    std::vector<double> dphiMins{0., 0.};
+    std::vector<double> dphiMaxs{
+      std::numeric_limits<double>::max(),
+        std::numeric_limits<double>::max(),
+        };
+
+
+    m_conditions = conditionsFactoryDijetMT(massMins, massMaxs,
+                                            detaMins, detaMaxs,
+                                            dphiMins, dphiMaxs);
+    m_nconditions = m_conditions.size();
+  }
+};
+
+
+HypoJetVector makeHypoJets(const std::vector<double>& etas) {
+
+  HypoJetVector jets;
+  jets.resize(etas.size());
+
+  auto factory = TLorentzVectorFactory();
+
+  auto dst = jets.begin();
+  auto make_jet = [&factory](double eta){
+    return new MockJetWithLorentzVector(factory.make(eta, 10.));
+  };
+
+  std::transform(etas.begin(),
+                 etas.end(),
+                 dst,
+                 make_jet);
+
+  return jets;
+}
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest_BadConfig, bad0){
+  /* (j0, j1) -> c0
+     (j0, j2) -> c0
+     (j0, j1) -> c1
+     Passes, but should fail as j0 is shared.
+  */
+
+  auto out = std::make_unique<std::ofstream>(nullptr);
+  if (m_debug){out.reset(new std::ofstream("BadConfig_bad0.log"));}
+
+  std::vector<double> detaMins{3.6, 5.5};
+  
+  std::vector<double> detaMaxs{
+    std::numeric_limits<double>::max(),
+      std::numeric_limits<double>::max(),
+      };
+  makeConditions(detaMins, detaMaxs);
+
+
+  if(out){
+    for(const auto& c : m_conditions){*out << c.toString();}
+  }
+
+  std::vector<double> etas{-5.0, 1.0, -1.0, -2.5};
+  EXPECT_TRUE(etas.size() == 4);
+  
+  auto jets = makeHypoJets(etas);
+  EXPECT_TRUE(jets.size() == 4);
+  if(m_debug){
+    for(const auto & j: jets){*out<< j << " " << j->toString() <<'\n';}
+  }
+  EXPECT_TRUE(m_conditions.size() == 2);
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  EXPECT_TRUE(groups.size() == 6);
+  auto visitor = std::unique_ptr<IConditionVisitor>();
+  visitor.reset(new ConditionDebugVisitor);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  if(out){
+    *out << "dumping visitor\n";
+    *out << visitor->toString();   
+  }
+  
+  for(auto j : jets){delete j;}
+  EXPECT_TRUE(pass);
+}
+
+
+TEST_F(MaximumBipartiteGroupsMatcherMTTest_BadConfig, bad1){
+  /* (j0, j3) -> c0
+     (j0, j1) -> c1
+     Passes, but should fail as j0 is shared.
+  */
+
+  auto out = std::make_unique<std::ofstream>(nullptr);
+  if (m_debug){out.reset(new std::ofstream("BadConfig_bad1.log"));}
+
+  std::vector<double> detaMins{3.6, 5.5};
+  
+  std::vector<double> detaMaxs{4.5, 6.5};
+  makeConditions(detaMins, detaMaxs);
+
+
+  if(out){
+    for(const auto& c : m_conditions){*out << c.toString();}
+  }
+
+  std::vector<double> etas{-5.0, 1.0, -1.0, -2.5};
+  EXPECT_TRUE(etas.size() == 4);
+  
+  auto jets = makeHypoJets(etas);
+  EXPECT_TRUE(jets.size() == 4);
+  if(m_debug){
+    for(const auto & j: jets){*out<<j<< " " << j->toString() <<'\n';}
+  }
+  EXPECT_TRUE(m_conditions.size() == 2);
+  MaximumBipartiteGroupsMatcherMT matcher(m_conditions);
+  auto groups = makeJetGroupsMT(jets.begin(), jets.end());
+  EXPECT_TRUE(groups.size() == 6);
+  auto visitor = std::unique_ptr<IConditionVisitor>();
+  visitor.reset(new ConditionDebugVisitor);
+  
+  bool pass = matcher.match(groups.begin(), groups.end(), visitor);
+
+  if(out){
+    *out << "dumping visitor\n";
+    *out << visitor->toString();   
+  }
+  
+  for(auto j : jets){delete j;}
+  EXPECT_TRUE(pass);
+}
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx
index 9007660739a8..baaebf52e9ea 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MaximumBipartiteGroupsMatcherTest.cxx
@@ -5,7 +5,9 @@
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/MaximumBipartiteGroupsMatcher.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
-#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
 #include "./MockJetWithLorentzVector.h"
 #include "./TLorentzVectorFactory.h"
 #include "gtest/gtest.h"
@@ -43,24 +45,30 @@ public:
     std::vector<double> etaMins{-1., -1., -1.};
     std::vector<double> etaMaxs{1., 1, 1.};
     std::vector<double> thresholds{100., 120, 140.};
+    std::vector<int> asymmetricEtas{0, 0, 0, 0};
 
-    m_conditions = conditionsFactory(etaMins, etaMaxs, thresholds);
-    m_name = "testOrderedConditionsMatcher";
+    m_conditions = conditionsFactoryEtaEt(etaMins, etaMaxs,
+                                          thresholds, asymmetricEtas);
     m_nconditions = m_conditions.size();
   }
 
   Conditions m_conditions;
   int m_nconditions;
-  std::string m_name;
 };
 
-
+HypoJetGroupVector makeJetGroups(HypoJetIter b, HypoJetIter e){
+  CombinationsGrouper g(1);  // single jet groups
+  return g.group(b, e);
+}
+                                 
 TEST_F(MaximumBipartiteGroupsMatcherTest, zeroInputJets){
   /* test with 0 jets - fails, no passed for failed jets */
 
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+
   HypoJetVector jets;
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+  matcher.match(groups.begin(), groups.end());
   
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(0));
@@ -81,9 +89,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, tooFewSelectedJets){
   MockJetWithLorentzVector jet1{tl};
 
   HypoJetVector jets{&jet0, &jet1};
+  auto groups = makeJetGroups(jets.begin(), jets.end());
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(0));
@@ -121,8 +130,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, oneSelectedJet){
   EXPECT_CALL(jet2, et()).Times(m_nconditions);
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(1));
@@ -172,8 +183,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, twoSelectedJets){
   EXPECT_CALL(jet2, et()).Times(m_nconditions);
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_FALSE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(2));
@@ -224,8 +237,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, threeSelectedJets){
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
   EXPECT_CALL(jet0, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_TRUE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(3));
@@ -275,8 +290,9 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, fourSelectedJets){
   EXPECT_CALL(jet2, et()).Times(m_nconditions);
   EXPECT_CALL(jet3, et()).Times(m_nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(m_conditions, m_name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(m_conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_TRUE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(3));
@@ -293,9 +309,10 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, overlappingEtaRegions){
   std::vector<double> etaMins{-1.00, -1.00, -0.25, -0.25};
   std::vector<double> etaMaxs{ 0.25,  0.25,  1.00,  1.00};
   std::vector<double> thresholds{100., 80, 140., 90.};
+  std::vector<int> asymmetricEtas{0, 0, 0, 0};
 
-  auto conditions = conditionsFactory(etaMins, etaMaxs, thresholds);
-  std::string name = "overlappingRegionsMatcher";
+  auto conditions = conditionsFactoryEtaEt(etaMins, etaMaxs,
+                                           thresholds, asymmetricEtas);
   int nconditions = conditions.size();
 
   double eta{0.1};
@@ -335,8 +352,9 @@ TEST_F(MaximumBipartiteGroupsMatcherTest, overlappingEtaRegions){
   EXPECT_CALL(jet2, et()).Times(nconditions);
   EXPECT_CALL(jet3, et()).Times(nconditions);
 
-  MaximumBipartiteGroupsMatcher matcher(conditions, name);
-  matcher.match(jets.begin(), jets.end());
+  MaximumBipartiteGroupsMatcher matcher(conditions);
+  auto groups = makeJetGroups(jets.begin(), jets.end());
+  matcher.match(groups.begin(), groups.end());
 
   EXPECT_TRUE(matcher.pass());
   EXPECT_EQ(matcher.passedJets().size(), static_cast<unsigned int>(4));
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h
index e11c90f1f46d..3400b54eeabd 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/src/MockJetWithLorentzVector.h
@@ -31,9 +31,17 @@ public:
   MOCK_CONST_METHOD0(et, double());
   MOCK_CONST_METHOD0(rapidity, double());
   TLorentzVector p4() const {return m_lv;}
+  std::string toString() const {
+    double etav = eta();
+    double etv = et();
+    std::string s = "et: " + std::to_string(etv) +
+      " eta: " + std::to_string(etav);
+    return s;
+  }
+
   MOCK_CONST_METHOD0(position, unsigned int());
   MOCK_CONST_METHOD2(getAttribute, bool (const std::string&, float&));
-  MOCK_CONST_METHOD0(toString, std::string());
+  // MOCK_CONST_METHOD0(toString, std::string());
 
  private:
   TLorentzVector m_lv;
-- 
GitLab


From b65c71fc07f7cc88ffe5c962fac7fb8479ff8af0 Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk>
Date: Tue, 11 Dec 2018 13:42:18 +0000
Subject: [PATCH 053/129] Minimal changes required to make the run 3
 configuration work with current run 3 configuration syntax. Update input file
 to be taken from cvmfs, to make this configuration useable by anyone outside
 Sheffield.

---
 .../eflowRec/python/PFRun3Config.py           | 21 +++++++------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/Reconstruction/eflowRec/python/PFRun3Config.py b/Reconstruction/eflowRec/python/PFRun3Config.py
index 001dac680058..ab0ce95592ed 100644
--- a/Reconstruction/eflowRec/python/PFRun3Config.py
+++ b/Reconstruction/eflowRec/python/PFRun3Config.py
@@ -8,18 +8,11 @@ def PFCfg(inputFlags,**kwargs):
     #Some such items may be best placed elsewehere (e.g. put magnetic field setup in magnetic field git folder etc)
     result=ComponentAccumulator()
 
-    from TrkDetDescrSvc.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
-    acc, geom_svc = TrackingGeometrySvcCfg(inputFlags)
-    result.merge(acc)
-
-    from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg
-    result.addCondAlgo(SCT_AlignCondAlg(name = "SCT_AlignCondAlg",UseDynamicAlignFolders = False))
-
-    from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DetectorElementCondAlg
-    result.addCondAlgo(SCT_DetectorElementCondAlg(name = "SCT_DetectorElementCondAlg"))
+    from StoreGate.StoreGateConf import StoreGateSvc
+    result.addService(StoreGateSvc("DetectorStore"))
     
-    from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
-    result.merge(MuonGeoModelCfg(inputFlags))    
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    result.mergeAll(GeoModelCfg(inputFlags))
 
     from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
     result.addService(GeometryDBSvc("InDetGeometryDBSvc"))
@@ -35,7 +28,7 @@ def PFCfg(inputFlags,**kwargs):
     from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatTool
     result.getService("GeoModelSvc").DetectorTools += [ InDetServMatTool() ]
 
-    from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline,IOVDbSvcCfg
+    from IOVDbSvc.IOVDbSvcConfig import addFolders,IOVDbSvcCfg
     result.merge(addFolders(inputFlags,['/GLOBAL/BField/Maps <noover/>'],'GLOBAL_OFL'))
     result.merge(addFolders(inputFlags,['/EXT/DCS/MAGNETS/SENSORDATA'],'DCS_OFL'))
     
@@ -47,9 +40,9 @@ def PFCfg(inputFlags,**kwargs):
     result.addService(MagField__AtlasFieldSvc("AtlasFieldSvc",**kwargs))
 
     #load folders needed for Run2 ID alignment
-    result.merge(addFoldersSplitOnline(inputFlags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
+    result.merge(addFolders(inputFlags,['/Indet/Align'],'INDET_OFL'))
     result.merge(addFolders(inputFlags,['/TRT/Align'],'TRT_OFL'))
-
+                 
     #load folders needed for IBL
     result.merge(addFolders(inputFlags,['/Indet/IBLDist'],'INDET_OFL'))
 
-- 
GitLab


From fad52468902b8965f8e6f8aeb78fe39256fe28ef Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk>
Date: Tue, 11 Dec 2018 14:02:32 +0000
Subject: [PATCH 054/129] Add configuration of some of the tracking geometry
 and muon geometry.

---
 Reconstruction/eflowRec/python/PFRun3Config.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Reconstruction/eflowRec/python/PFRun3Config.py b/Reconstruction/eflowRec/python/PFRun3Config.py
index ab0ce95592ed..b847fd8e1788 100644
--- a/Reconstruction/eflowRec/python/PFRun3Config.py
+++ b/Reconstruction/eflowRec/python/PFRun3Config.py
@@ -14,6 +14,13 @@ def PFCfg(inputFlags,**kwargs):
     from AtlasGeoModel.GeoModelConfig import GeoModelCfg
     result.mergeAll(GeoModelCfg(inputFlags))
 
+    from TrkDetDescrSvc.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
+    acc, geom_svc = TrackingGeometrySvcCfg(inputFlags)
+    result.merge(acc)
+
+    from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
+    result.merge(MuonGeoModelCfg(inputFlags))    
+
     from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
     result.addService(GeometryDBSvc("InDetGeometryDBSvc"))
     
-- 
GitLab


From f966e777c2360ea884a7b22589dc2726141e7314 Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk>
Date: Tue, 11 Dec 2018 14:46:34 +0000
Subject: [PATCH 055/129] Add required SCT conditions algorithms. Adjust way in
 which we add InDet/Align conditions folders, to fix a crash. Update
 Conditions tag for the new input file.

---
 Reconstruction/eflowRec/python/PFRun3Config.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Reconstruction/eflowRec/python/PFRun3Config.py b/Reconstruction/eflowRec/python/PFRun3Config.py
index b847fd8e1788..3ed129b48a9e 100644
--- a/Reconstruction/eflowRec/python/PFRun3Config.py
+++ b/Reconstruction/eflowRec/python/PFRun3Config.py
@@ -18,6 +18,12 @@ def PFCfg(inputFlags,**kwargs):
     acc, geom_svc = TrackingGeometrySvcCfg(inputFlags)
     result.merge(acc)
 
+    from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg
+    result.addCondAlgo(SCT_AlignCondAlg(name = "SCT_AlignCondAlg",UseDynamicAlignFolders = False))
+
+    from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DetectorElementCondAlg
+    result.addCondAlgo(SCT_DetectorElementCondAlg(name = "SCT_DetectorElementCondAlg"))
+    
     from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
     result.merge(MuonGeoModelCfg(inputFlags))    
 
@@ -35,7 +41,7 @@ def PFCfg(inputFlags,**kwargs):
     from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatTool
     result.getService("GeoModelSvc").DetectorTools += [ InDetServMatTool() ]
 
-    from IOVDbSvc.IOVDbSvcConfig import addFolders,IOVDbSvcCfg
+    from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline,IOVDbSvcCfg
     result.merge(addFolders(inputFlags,['/GLOBAL/BField/Maps <noover/>'],'GLOBAL_OFL'))
     result.merge(addFolders(inputFlags,['/EXT/DCS/MAGNETS/SENSORDATA'],'DCS_OFL'))
     
@@ -47,9 +53,9 @@ def PFCfg(inputFlags,**kwargs):
     result.addService(MagField__AtlasFieldSvc("AtlasFieldSvc",**kwargs))
 
     #load folders needed for Run2 ID alignment
-    result.merge(addFolders(inputFlags,['/Indet/Align'],'INDET_OFL'))
+    result.merge(addFoldersSplitOnline(inputFlags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
     result.merge(addFolders(inputFlags,['/TRT/Align'],'TRT_OFL'))
-                 
+
     #load folders needed for IBL
     result.merge(addFolders(inputFlags,['/Indet/IBLDist'],'INDET_OFL'))
 
-- 
GitLab


From e02f1a4e8a933932513a335fca7b47e8db99ae42 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Thu, 2 May 2019 12:03:18 +0000
Subject: [PATCH 056/129] static --> static const for GeometryStatistics

---
 .../TrkDetDescrUtils/GeometryStatics.h           | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/GeometryStatics.h b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/GeometryStatics.h
index 0bfe9cfe16fd..f380f8d188cd 100755
--- a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/GeometryStatics.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/GeometryStatics.h
@@ -17,22 +17,22 @@ namespace Trk {
 
 // transformations
 
-  static Amg::Transform3D s_idTransform = Amg::Transform3D::Identity();          //!< idendity transformation
-  static Amg::Rotation3D s_idRotation = Amg::Rotation3D::Identity();            //!< idendity rotation
+  alignas(16) static const Amg::Transform3D s_idTransform = Amg::Transform3D::Identity();          //!< idendity transformation
+  alignas(16) static const Amg::Rotation3D s_idRotation = Amg::Rotation3D::Identity();            //!< idendity rotation
   
   // axis system
   
-  static Amg::Vector3D s_xAxis(1,0,0);        //!< global x Axis;
-  static Amg::Vector3D s_yAxis(0,1,0);        //!< global y Axis;
-  static Amg::Vector3D s_zAxis(0,0,1);        //!< global z Axis;
+  alignas(16) static const Amg::Vector3D s_xAxis(1,0,0);        //!< global x Axis;
+  alignas(16) static const Amg::Vector3D s_yAxis(0,1,0);        //!< global y Axis;
+  alignas(16) static const Amg::Vector3D s_zAxis(0,0,1);        //!< global z Axis;
   
   // origin
   
-  static Amg::Vector3D s_origin(0,0,0);       //!< origin position
+  alignas(16) static const Amg::Vector3D s_origin(0,0,0);       //!< origin position
   
-  static double helper[9] = {0.,1.,0.,1.,0.,0.,0.,0.,-1.};
+  static const double helper[9] = {0.,1.,0.,1.,0.,0.,0.,0.,-1.};
   
-  static Amg::RotationMatrix3D s_idRotationZinverse(helper);
+  alignas(16) static const Amg::RotationMatrix3D s_idRotationZinverse(helper);
 
 }
 
-- 
GitLab


From 68704a49829e5951f961789c039c74ded2dd5733 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Thu, 2 May 2019 12:33:52 +0000
Subject: [PATCH 057/129] Change const std::list<Trk::Track*>& T =
 m_trackmaker->getTracks(seed->spacePoints()) to std::list<Trk::Track*> T =
 std::move(m_trackmaker->getTracks(seed->spacePoints()))

---
 .../src/SiSPSeededTrackFinder.cxx             |   6 +-
 .../InDetRecToolInterfaces/ISiTrackMaker.h    |   6 +-
 .../SiTrackMakerTool_xk/SiTrackMaker_xk.h     | 192 +++--
 .../src/SiTrackMaker_xk.cxx                   | 772 ++++++++----------
 .../src/SiTrigSPSeededTrackFinder.cxx         |   5 +-
 .../src/TrigFastTrackFinder.cxx               |   2 +-
 .../src/TrigL2PattRecoStrategyC.cxx           |   4 +-
 7 files changed, 475 insertions(+), 512 deletions(-)

diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
index 47d21aa7bd34..d60da680bc03 100644
--- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
@@ -130,7 +130,8 @@ StatusCode InDet::SiSPSeededTrackFinder::oldStrategy()
   //
   while ((seed = m_seedsmaker->next())) {
     ++counter[kNSeeds];
-    for (Trk::Track* t: m_trackmaker->getTracks(seed->spacePoints())) {
+    std::list<Trk::Track*> trackList = std::move(m_trackmaker->getTracks(seed->spacePoints()));
+    for (Trk::Track* t: trackList) {
       qualityTrack.insert(std::make_pair(-trackQuality(t), t));
     }
     if (not ZVE and (counter[kNSeeds] >= m_maxNumberSeeds)) {
@@ -212,7 +213,8 @@ StatusCode InDet::SiSPSeededTrackFinder::newStrategy()
   while ((seed = m_seedsmaker->next())) {
     ++counter[kNSeeds];
     bool firstTrack{true};
-    for (Trk::Track* t: m_trackmaker->getTracks(seed->spacePoints())) {
+    std::list<Trk::Track*> trackList = std::move(m_trackmaker->getTracks(seed->spacePoints()));
+    for (Trk::Track* t: trackList) {
       qualityTrack.insert(std::make_pair(-trackQuality(t), t));
 
       if (firstTrack and not m_ITKGeometry) {
diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h
index ce2f07c6c970..9493d7d1af8c 100755
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -53,9 +53,9 @@ namespace InDet {
       // Main methods for track-finding
       ///////////////////////////////////////////////////////////////////
 
-      virtual const std::list<Trk::Track*>& 
+      virtual std::list<Trk::Track*>
 	getTracks(const std::list<const Trk::SpacePoint*>&)=0;
-      virtual const std::list<Trk::Track*>& 
+      virtual std::list<Trk::Track*>
 	getTracks(const Trk::TrackParameters&,const std::list<Amg::Vector3D>&)=0;
       
       virtual void newEvent    (bool,bool)=0;
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
index 7acb7332ff81..5ed14138fcef 100755
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
@@ -15,21 +17,23 @@
 #ifndef SiTrackMaker_xk_H
 #define SiTrackMaker_xk_H
 
-
-#include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetRecToolInterfaces/ISiTrackMaker.h"
-#include "InDetRecToolInterfaces/ISiDetElementsRoadMaker.h" 
-#include "InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "BeamSpotConditionsData/BeamSpotData.h"
 #include "InDetRecToolInterfaces/ISeedToTrackConversionTool.h"
-#include "TrkGeometry/MagneticFieldProperties.h"
+#include "InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h"
+#include "InDetRecToolInterfaces/ISiDetElementsRoadMaker.h"
+#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TrkCaloClusterROI/CaloClusterROI_Collection.h"
-#include "BeamSpotConditionsData/BeamSpotData.h"
+#include "TrkGeometry/MagneticFieldProperties.h"
 
-#include <list>
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+#include <array>
 #include <iosfwd>
+#include <list>
 
 class MsgStream;
 
@@ -59,8 +63,8 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
 
       SiTrackMaker_xk
-	(const std::string&,const std::string&,const IInterface*);
-      virtual ~SiTrackMaker_xk();
+      (const std::string&,const std::string&,const IInterface*);
+      virtual ~SiTrackMaker_xk() = default;
       virtual StatusCode initialize();
       virtual StatusCode finalize  ();
 
@@ -68,11 +72,11 @@ namespace InDet{
       // Main methods for local track finding
       ///////////////////////////////////////////////////////////////////
       
-      virtual const std::list<Trk::Track*>&
-	getTracks(const std::list<const Trk::SpacePoint*>&);
+      virtual std::list<Trk::Track*>
+      getTracks(const std::list<const Trk::SpacePoint*>&);
 
-      virtual const std::list<Trk::Track*>& 
-	getTracks(const Trk::TrackParameters&,const std::list<Amg::Vector3D>&);
+      virtual std::list<Trk::Track*>
+      getTracks(const Trk::TrackParameters&,const std::list<Amg::Vector3D>&);
 
       virtual void newEvent    (bool,bool);
       virtual void newTrigEvent(bool,bool);
@@ -96,94 +100,110 @@ namespace InDet{
       // Protected Data
       ///////////////////////////////////////////////////////////////////
 
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle  ;
-      MagField::IMagFieldSvc*                m_fieldService  {}      ;
-      ToolHandle<InDet::ISiDetElementsRoadMaker>     m_roadmaker   ;
-      ToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder;
-      ToolHandle<InDet::ISeedToTrackConversionTool>  m_seedtrack   ;
-      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
-
-      int                            m_nprint{}        ;  // Kind output information
-      int                            m_inputseeds{}    ;  // Number input seeds
-      int                            m_goodseeds{}     ;  // Number good  seeds
-      int                            m_findtracks{}    ;  // Numbe found tracks
-      int                            m_seedsfilter{}   ;  // Level of seeds filer
-      unsigned int                   m_wrongcluster{}  ;  // Max lentgh of thtrack
-      std::string                    m_fieldmode     ;  // Mode of magnetic field
-      Trk::MagneticFieldMode         m_fieldModeEnum{Trk::FullField};
-      std::string                    m_patternName   ;  // Name of the pattern recognition
-      SG::ReadHandleKey<CaloClusterROI_Collection> m_caloCluster;
-      SG::ReadHandleKey<CaloClusterROI_Collection> m_caloHad;
+      ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
+      PublicToolHandle<InDet::ISiDetElementsRoadMaker> m_roadmaker{this, "RoadTool", "InDet::SiDetElementsRoadMaker_xk"};
+      PublicToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder{this, "CombinatorialTrackFinder", "InDet::SiCombinatorialTrackFinder_xk"};
+      PublicToolHandle<InDet::ISeedToTrackConversionTool> m_seedtrack{this, "SeedToTrackConversion", "InDet::SeedToTrackConversionTool"};
+
+      SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
+      SG::ReadHandleKey<CaloClusterROI_Collection> m_caloCluster{this, "InputClusterContainerName", "InDetCaloClusterROIs"};
+      SG::ReadHandleKey<CaloClusterROI_Collection> m_caloHad{this, "InputHadClusterContainerName", "InDetHadCaloClusterROIs"};
+
+      IntegerProperty m_seedsfilter{this, "SeedsFilterLevel", 2, "Level of seeds filer"};
+      UnsignedIntegerProperty m_wrongcluster{this, "GoodSeedClusterCount", 10, "Max lentgh of thtrack"};
+      StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid", "Mode of magnetic field"};
+      StringProperty m_patternName{this, "TrackPatternRecoInfo", "SiSPSeededFinder", "Name of the pattern recognition"};
+      BooleanProperty m_usePix{this, "usePixel", true, "flags to set whether to use pixel/sct cluster, irrespective of what is in event"};
+      BooleanProperty m_useSct{this, "useSCT", true};
+      BooleanProperty m_useassoTool{this, "UseAssociationTool", false, "Use prd-track association tool"};
+      BooleanProperty m_cosmicTrack{this, "CosmicTrack", false, "Is it cosmic track"};
+      BooleanProperty m_multitracks{this, "doMultiTracksProd", false};
+      BooleanProperty m_useBremModel{this, "useBremModel", false};
+      BooleanProperty m_useCaloSeeds{this, "doCaloSeededBrem", false};
+      BooleanProperty m_useSSSfilter{this, "useSSSseedsFilter", true};
+      BooleanProperty m_useHClusSeed{this, "doHadCaloSeedSSS", false, "Hadronic Calorimeter Seeds"};
+      BooleanProperty m_ITKGeomtry{this, "ITKGeometry", false, "ITK geometry"};
+      BooleanProperty m_seedsegmentsWrite{this, "SeedSegmentsWrite", false, "Call seed to track conversion"};
+      DoubleProperty m_xi2max{this, "Xi2max", 15., "max Xi2 for updators"};
+      DoubleProperty m_xi2maxNoAdd{this, "Xi2maxNoAdd", 35., "max Xi2 for clusters"};
+      DoubleProperty m_xi2maxlink{this, "Xi2maxlink", 200., "max Xi2 for clusters"};
+      DoubleProperty m_pTmin{this, "pTmin", 500., "min pT"};
+      DoubleProperty m_pTminBrem{this, "pTminBrem", 1000., "min pT for Brem mode"};
+      DoubleProperty m_pTminSSS{this, "pTminSSS", 1000., "min pT for SSS filtering"};
+      DoubleProperty m_distmax{this, "MaxDistanceForSCTsp", 5.};
+      DoubleProperty m_xi2multitracks{this, "Xi2maxMultiTracks", 3., "max Xi2 for multi tracks"};
+      IntegerProperty m_nholesmax{this, "nHolesMax", 2, "Max number holes"};
+      IntegerProperty m_dholesmax{this, "nHolesGapMax", 2, "Max holes gap"};
+      IntegerProperty m_nclusmin{this, "nClustersMin", 6,  "Min number clusters"};
+      IntegerProperty m_nwclusmin{this, "nWeightedClustersMin", 6, "Min umber weighted clusters(pix=2 sct=1)"};
+      DoubleProperty m_phiWidth{this, "phiWidth", 0.3};
+      DoubleProperty m_etaWidth{this, "etaWidth", 0.3};
+
+      // Updated only in initialize method
       Trk::TrackInfo                 m_trackinfo     ;
-      bool                           m_pix{}           ;
-      bool                           m_sct{}           ;
-      bool                           m_dbm{}           ;
-      bool                           m_usePix {}       ; //flags to set whether to use pixel/sct cluster, irrespective of what is in event
-      bool                           m_useSct {}       ;
-      bool                           m_useassoTool{}   ; // Use prd-track association tool
-      bool                           m_cosmicTrack{}   ; // Is it cosmic track
-      bool                           m_simpleTrack{}   ; // Is it simple output track
-      bool                           m_multitracks{}   ;
-      bool                           m_useBremModel{}  ;
-      bool                           m_useCaloSeeds{}  ;
-      bool                           m_useSSSfilter{}  ;
-      bool                           m_useHClusSeed{}  ; // Hadronic Calorimeter Seeds 
-      bool                           m_sss{}           ; // True if SSS seed without filter 
-      bool                           m_ITKGeomtry{}    ; // ITK geometry
-      bool                        m_seedsegmentsWrite{}; // Call seed to track conversion
-      bool                           m_heavyion{}      ; // Is it heavy ion events
-      double                         m_xi2max{}        ; // max Xi2 for updators
-      double                         m_xi2maxNoAdd{}   ; // max Xi2 for clusters
-      double                         m_xi2maxlink{}    ; // max Xi2 for clusters
-      double                         m_pTmin{}         ; // min pT
-      double                         m_pTminBrem{}     ; // min pT for Brem mode
-      double                         m_pTminSSS{}      ; // min pT for SSS filtering
-      double                         m_distmax {}      ; // 
-      double                         m_xi2multitracks{}; // max Xi2 for multi tracks
-      int                            m_nholesmax {}    ; // Max number holes
-      int                            m_dholesmax {}    ; // Max holes gap
-      int                            m_nclusmin {}     ; // Min number clusters
-      int                            m_nwclusmin {}    ; // Min umber weighted clusters(pix=2 sct=1)
-      InDet::TrackQualityCuts        m_trackquality  ;
-      std::list<Trk::Track*>         m_tracks        ; // List found tracks
-      std::multimap<const Trk::PrepRawData*,const Trk::Track*> m_clusterTrack;
+      bool                           m_heavyion{false}; // Is it heavy ion events
+      Trk::MagneticFieldMode         m_fieldModeEnum{Trk::FullField};
+
+      // Counters
+      int                            m_inputseeds{0}; // Number input seeds
+      int                            m_goodseeds{0}; // Number good  seeds
+      int                            m_findtracks{0};  // Numbe found tracks
+
+      // Flag for dump method
+      int                            m_nprint{}; // Kind output information
+
+      // Updated by many methods
+      std::multimap<const Trk::PrepRawData*, const Trk::Track*> m_clusterTrack;
+
+      // Updated only by newEvent and newTrigEvent methods
+      bool                           m_pix{false};
+      bool                           m_sct{false};
+
+      // Updated ony by newEvent method
       std::list<double>              m_caloF         ;
       std::list<double>              m_caloR         ;
       std::list<double>              m_caloZ         ;
       std::list<double>              m_hadF          ;
       std::list<double>              m_hadR          ;
       std::list<double>              m_hadZ          ;
-      double m_phiWidth  {}                            ;
-      double m_etaWidth  {}                            ;
-      double m_p[9]                                  ;
       double m_xybeam[2]                             ;
 
+      // Caches for the getTracks method with two arguments.
+      // These have to be dropped.
+      bool m_dbm{false};
+      std::array<double, 9> m_par;
+
       ///////////////////////////////////////////////////////////////////
       // Methods 
       ///////////////////////////////////////////////////////////////////
 
  
-      const Trk::TrackParameters* getAtaPlane
-	(bool,const std::list<const Trk::SpacePoint*>&);
-      const Trk::TrackParameters* getAtaPlaneDBM
-	(const std::list<const Trk::SpacePoint*>&);
+      const Trk::TrackParameters* getAtaPlane(bool,
+                                              const std::list<const Trk::SpacePoint*>&,
+                                              std::array<double, 9>& par) const;
+      const Trk::TrackParameters* getAtaPlaneDBM(const std::list<const Trk::SpacePoint*>&,
+                                                 std::array<double, 9>& par) const;
 
       bool globalPositions(const Trk::SpacePoint*,const Trk::SpacePoint*,const Trk::SpacePoint*,
-			   double*,double*,double*);
+                           double*,double*,double*) const;
 
-      bool globalPosition(const Trk::SpacePoint*,double*,double*);
-      void globalDirections(double*,double*,double*,double*,double*,double*);
-      void setTrackQualityCuts();
-      void detectorElementsSelection(std::list<const InDetDD::SiDetectorElement*>&);
+      bool globalPosition(const Trk::SpacePoint*,double*,double*) const;
+      void globalDirections(double*,double*,double*,double*,double*,double*) const;
+      InDet::TrackQualityCuts setTrackQualityCuts(bool simpleTrack);
+       void detectorElementsSelection(std::list<const InDetDD::SiDetectorElement*>&, bool dbm) const;
       bool newSeed    (const std::list<const Trk::SpacePoint*>&);
-      bool isNewTrack(Trk::Track*);
-      bool isCaloCompatible   ();
-      bool isHadCaloCompatible();
-      bool isDBMSeeds(const Trk::SpacePoint*);
-      void clusterTrackMap(Trk::Track*);
-
-      MsgStream&    dumpconditions(MsgStream&    out) const;
-      MsgStream&    dumpevent     (MsgStream&    out) const;
+      bool isNewTrack(Trk::Track*,
+                      const std::multimap<const Trk::PrepRawData*,
+                                          const Trk::Track*>& clusterTrack) const;
+      bool isCaloCompatible(const std::array<double, 9>& par) const;
+      bool isHadCaloCompatible(const std::array<double, 9>& par) const;
+      bool isDBMSeeds(const Trk::SpacePoint*) const;
+      void clusterTrackMap(Trk::Track*,
+                           std::multimap<const Trk::PrepRawData*,
+                                         const Trk::Track*>& clusterTrack) const;
+
+      MsgStream& dumpconditions(MsgStream&    out) const;
+      MsgStream& dumpevent     (MsgStream&    out) const;
     };
 
     MsgStream&    operator << (MsgStream&   ,const SiTrackMaker_xk&);
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
index 9a3df362002e..80f600d8265a 100755
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
@@ -11,15 +11,14 @@
 // Version 1.0 21/04/2004 I.Gavrilenko
 ///////////////////////////////////////////////////////////////////
 
-#include <ostream>
-#include <iomanip>
-
-#include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "InDetPrepRawData/SiClusterContainer.h"
 #include "SiTrackMakerTool_xk/SiTrackMaker_xk.h"
 
+#include "InDetPrepRawData/SiClusterContainer.h"
 #include "TrkCaloClusterROI/CaloClusterROI.h"
+#include "TrkRIO_OnTrack/RIO_OnTrack.h"
 
+#include <iomanip>
+#include <ostream>
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
@@ -27,98 +26,9 @@
 
 InDet::SiTrackMaker_xk::SiTrackMaker_xk
 (const std::string& t,const std::string& n,const IInterface* p)
-  : AthAlgTool(t,n,p)                                        ,
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
-    m_roadmaker   ("InDet::SiDetElementsRoadMaker_xk"    ),
-    m_tracksfinder("InDet::SiCombinatorialTrackFinder_xk"),
-    m_seedtrack   ("InDet::SeedToTrackConversionTool"    ),
-    m_caloCluster("InDetCaloClusterROIs"),
-    m_caloHad("InDetHadCaloClusterROIs")
+  : AthAlgTool(t,n,p)
 {
-  m_fieldmode    = "MapSolenoid"      ;
-  m_patternName  = "SiSPSeededFinder" ; 
-  m_pix          = false              ;
-  m_sct          = false              ;
-  m_usePix       = true               ;
-  m_useSct       = true               ;
-  m_useassoTool  = false              ;
-  m_cosmicTrack  = false              ;    
-  m_simpleTrack  = false              ;
-  m_multitracks  = false              ;
-  m_useBremModel = false              ;
-  m_useCaloSeeds = false              ;
-  m_useHClusSeed = false              ;
-  m_useSSSfilter = true               ;
-  m_ITKGeomtry   = false              ;
-  m_heavyion     = false              ;
-  m_xi2max       = 15.                ;
-  m_xi2maxNoAdd  = 35.                ;
-  m_xi2maxlink   = 200.               ;
-  m_xi2multitracks = 3.               ;
-  m_pTmin        = 500.               ;
-  m_pTminBrem    = 1000.              ;
-  m_pTminSSS     = 1000.              ;
-  m_distmax      = 5.                 ;
-  m_nholesmax    = 2                  ;
-  m_dholesmax    = 2                  ;
-  m_nclusmin     = 6                  ;
-  m_nwclusmin    = 6                  ;              
-  m_wrongcluster = 10                 ; 
-  m_inputseeds   = 0                  ;
-  m_goodseeds    = 0                  ;
-  m_findtracks   = 0                  ;
-  m_seedsfilter  = 2                  ;
-  m_phiWidth     = .3                 ;
-  m_etaWidth     = .3                 ;
-  m_seedsegmentsWrite = false;
-//  m_inputClusterContainerName    = "InDetCaloClusterROIs"   ;
-//  m_inputHadClusterContainerName = "InDetHadCaloClusterROIs";
-
   declareInterface<ISiTrackMaker>(this);
-
-  declareProperty("RoadTool"                ,m_roadmaker   );
-  declareProperty("CombinatorialTrackFinder",m_tracksfinder);
-  declareProperty("SeedToTrackConversion"   ,m_seedtrack   );
-  declareProperty("Xi2max"                  ,m_xi2max      );
-  declareProperty("Xi2maxNoAdd"             ,m_xi2maxNoAdd );
-  declareProperty("Xi2maxlink"              ,m_xi2maxlink  );
-  declareProperty("pTmin"                   ,m_pTmin       );
-  declareProperty("pTminBrem"               ,m_pTminBrem   );
-  declareProperty("pTminSSS"                ,m_pTminSSS    );
-  declareProperty("MaxDistanceForSCTsp"     ,m_distmax     );
-  declareProperty("nHolesMax"               ,m_nholesmax   );
-  declareProperty("nHolesGapMax"            ,m_dholesmax   );
-  declareProperty("nClustersMin"            ,m_nclusmin    );
-  declareProperty("nWeightedClustersMin"    ,m_nwclusmin   );
-  declareProperty("MagneticFieldMode"       ,m_fieldmode   );
-  declareProperty("SeedsFilterLevel"        ,m_seedsfilter );
-  declareProperty("GoodSeedClusterCount"    ,m_wrongcluster);
-  declareProperty("UseAssociationTool"      ,m_useassoTool );
-  declareProperty("CosmicTrack"             ,m_cosmicTrack );
-  declareProperty("TrackPatternRecoInfo"    ,m_patternName );
-  declareProperty("doMultiTracksProd"       ,m_multitracks );
-  declareProperty("Xi2maxMultiTracks"       ,m_xi2multitracks);
-  declareProperty("useBremModel"            ,m_useBremModel); 
-  declareProperty("useSSSseedsFilter"       ,m_useSSSfilter); 
-  declareProperty("doCaloSeededBrem"        ,m_useCaloSeeds);
-  declareProperty("doHadCaloSeedSSS"        ,m_useHClusSeed);
-  declareProperty("phiWidth"                ,m_phiWidth    );
-  declareProperty("etaWidth"                ,m_etaWidth    );
-  declareProperty("InputClusterContainerName"   , m_caloCluster   );
-  declareProperty("InputHadClusterContainerName", m_caloHad );
-  declareProperty("MagFieldSvc"             , m_fieldServiceHandle);
-  declareProperty("useSCT"                  , m_useSct);
-  declareProperty("usePixel"                , m_usePix);
-  declareProperty("ITKGeometry"             , m_ITKGeomtry);
-  declareProperty("SeedSegmentsWrite"       , m_seedsegmentsWrite);
-}
-
-///////////////////////////////////////////////////////////////////
-// Destructor  
-///////////////////////////////////////////////////////////////////
-
-InDet::SiTrackMaker_xk::~SiTrackMaker_xk()
-{
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -133,17 +43,16 @@ StatusCode InDet::SiTrackMaker_xk::initialize()
 
   // Get magnetic field service
   //
-  if(m_fieldmode != "NoField" ) {
+  if (m_fieldmode != "NoField" ) {
     
-    if( !m_fieldServiceHandle.retrieve() ){
+    if ( !m_fieldServiceHandle.retrieve() ){
       ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
       return StatusCode::FAILURE;
     }    
     ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-    m_fieldService = &*m_fieldServiceHandle;
   }
-  if(m_fieldmode == "NoField") m_fieldModeEnum = Trk::NoField;
-  else if(m_fieldmode == "MapSolenoid") m_fieldModeEnum = Trk::FastField;
+  if (m_fieldmode == "NoField") m_fieldModeEnum = Trk::NoField;
+  else if (m_fieldmode == "MapSolenoid") m_fieldModeEnum = Trk::FastField;
   else m_fieldModeEnum = Trk::FullField;
 
   // Get detector elements road maker tool
@@ -166,17 +75,15 @@ StatusCode InDet::SiTrackMaker_xk::initialize()
 
   // Get seed to track conversion tool
   //
-  if(m_seedsegmentsWrite) {
-
-    if(m_seedtrack.retrieve().isFailure()) {
+  if (m_seedsegmentsWrite) {
+    if (m_seedtrack.retrieve().isFailure()) {
       ATH_MSG_FATAL( "Failed to retrieve tool " << m_seedtrack );
       return StatusCode::FAILURE;
 
     } else {
       ATH_MSG_INFO( "Retrieved tool " << m_seedtrack );
     }
-  }
-  else {
+  } else {
     m_seedtrack.disable();
   }
 
@@ -184,37 +91,31 @@ StatusCode InDet::SiTrackMaker_xk::initialize()
 
   // TrackpatternRecoInfo preparation 
   //
-  if     (m_patternName == "SiSpacePointsSeedMaker_Cosmic"     )  {
+  if        (m_patternName == "SiSpacePointsSeedMaker_Cosmic"     )  {
     m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_Cosmic     );
-  }
-  else if(m_patternName == "SiSpacePointsSeedMaker_HeavyIon"   )  {
-    m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_HeavyIon   ); m_heavyion = true;
-  }
-  else if(m_patternName == "SiSpacePointsSeedMaker_LowMomentum")  {
+  } else if (m_patternName == "SiSpacePointsSeedMaker_HeavyIon"   )  {
+    m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_HeavyIon   );
+    m_heavyion = true;
+  } else if (m_patternName == "SiSpacePointsSeedMaker_LowMomentum")  {
     m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_LowMomentum);
-  }
-  else if(m_patternName == "SiSpacePointsSeedMaker_BeamGas"    )  {
+  } else if (m_patternName == "SiSpacePointsSeedMaker_BeamGas"    )  {
     m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_BeamGas    );
-  }     
-  else if(m_patternName == "SiSpacePointsSeedMaker_ForwardTracks"    )  {
-    m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_ForwardTracks    );
-  }
-  else if(m_patternName == "SiSpacePointsSeedMaker_LargeD0"    )  {
+  } else if (m_patternName == "SiSpacePointsSeedMaker_ForwardTracks"    )  {
+    m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_ForwardTracks);
+  } else if (m_patternName == "SiSpacePointsSeedMaker_LargeD0"    )  {
     m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_LargeD0    );
-  } 
-  else if(m_patternName == "SiSpacePointsSeedMaker_SLHCConversionTracks")  {
+  } else if (m_patternName == "SiSpacePointsSeedMaker_SLHCConversionTracks")  {
     m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_SLHCConversionTracks);
-  }
-  else                                                            {
+  } else {
     m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinder                  );
   } 
 
-  if(m_cosmicTrack)  m_seedsfilter = 3;
+  if (m_cosmicTrack) m_seedsfilter = 3;
 
-  ATH_CHECK( m_caloCluster.initialize(m_useBremModel && m_useCaloSeeds));
-  ATH_CHECK( m_caloHad.initialize( !m_useSSSfilter && m_useHClusSeed) );
+  ATH_CHECK(m_caloCluster.initialize(m_useBremModel && m_useCaloSeeds));
+  ATH_CHECK(m_caloHad.initialize( !m_useSSSfilter && m_useHClusSeed) );
   
-  if(m_pTmin < 20.) m_pTmin = 20.;
+  if (m_pTmin < 20.) m_pTmin = 20.;
   return StatusCode::SUCCESS;
 }
 
@@ -224,7 +125,7 @@ StatusCode InDet::SiTrackMaker_xk::initialize()
 
 StatusCode InDet::SiTrackMaker_xk::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -234,7 +135,7 @@ StatusCode InDet::SiTrackMaker_xk::finalize()
 MsgStream&  InDet::SiTrackMaker_xk::dump( MsgStream& out ) const
 {
   out<<std::endl;
-  if(m_nprint)  return dumpevent(out);
+  if (m_nprint) return dumpevent(out);
   return dumpconditions(out);
 }
 
@@ -246,27 +147,27 @@ MsgStream& InDet::SiTrackMaker_xk::dumpconditions( MsgStream& out ) const
 {
 
   int n      = 62-m_tracksfinder.type().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
 
   std::string fieldmode[9] ={"NoField"       ,"ConstantField","SolenoidalField",
-			     "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
-			     "UndefinedField","AthenaField"  , "?????"         };
+                             "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
+                             "UndefinedField","AthenaField"  , "?????"         };
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-  if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+  if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
   Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
   int mode = fieldprop.magneticFieldMode();
-  if(mode<0 || mode>8 ) mode = 8; 
+  if (mode<0 || mode>8 ) mode = 8; 
 
   n     = 62-fieldmode[mode].size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
 
   n     = 62-m_roadmaker.type().size();
-  std::string s6; for(int i=0; i<n; ++i) s6.append(" "); s6.append("|");
+  std::string s6; for (int i=0; i<n; ++i) s6.append(" "); s6.append("|");
 
   out<<"|----------------------------------------------------------------------"
      <<"-------------------|"
-       <<std::endl;
+     <<std::endl;
   out<<"| Tool for road builder   | "<<m_roadmaker  .type() <<s6<<std::endl;
   out<<"} Tool for track finding  | "<<m_tracksfinder.type()<<s4<<std::endl;
   out<<"| Use association tool ?  | "
@@ -295,7 +196,7 @@ MsgStream& InDet::SiTrackMaker_xk::dumpconditions( MsgStream& out ) const
      <<"                                                  |"<<std::endl;
   out<<"|----------------------------------------------------------------------"
      <<"-------------------|"
-      <<std::endl;
+     <<std::endl;
   return out;
 }
 
@@ -307,7 +208,7 @@ MsgStream& InDet::SiTrackMaker_xk::dumpconditions( MsgStream& out ) const
 MsgStream& InDet::SiTrackMaker_xk::dumpevent( MsgStream& out ) const
 {
   out<<"|---------------------------------------------------------------------|"
-       <<std::endl;
+     <<std::endl;
   out<<"| Number input seeds      | "<<std::setw(12)<<m_inputseeds
      <<"                              |"<<std::endl;
   out<<"| Number good  seeds      | "<<std::setw(12)<<m_goodseeds 
@@ -333,7 +234,7 @@ std::ostream& InDet::SiTrackMaker_xk::dump( std::ostream& out ) const
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiTrackMaker_xk& se)
+(MsgStream& sl,const InDet::SiTrackMaker_xk& se)
 { 
   return se.dump(sl); 
 }
@@ -343,7 +244,7 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiTrackMaker_xk& se)
+(std::ostream& sl,const InDet::SiTrackMaker_xk& se)
 {
   return se.dump(sl); 
 }   
@@ -355,22 +256,22 @@ std::ostream& InDet::operator <<
 void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
 {
   SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-  if(beamSpotHandle.isValid()) { m_xybeam[0] = beamSpotHandle->beamPos()[0]; m_xybeam[1] = beamSpotHandle->beamPos()[1];}
-  else       {                   m_xybeam[0] =    0.;                        m_xybeam[1] =    0.;}
+  if (beamSpotHandle.isValid()) { m_xybeam[0] = beamSpotHandle->beamPos()[0]; m_xybeam[1] = beamSpotHandle->beamPos()[1]; }
+  else                          { m_xybeam[0] = 0.;                           m_xybeam[1] = 0.;                           }
   
   m_pix          = PIX && m_usePix;
   m_sct          = SCT && m_useSct;
-  m_simpleTrack  = false;
+  bool simpleTrack  = false;
 
-  setTrackQualityCuts();
+  InDet::TrackQualityCuts trackquality = std::move(setTrackQualityCuts(simpleTrack));
 
   // New event for track finder tool
   //
-  m_tracksfinder->newEvent(m_trackinfo,m_trackquality);
+  m_tracksfinder->newEvent(m_trackinfo, trackquality);
 
   // Erase cluster to track association
   //
-  if(m_seedsfilter) m_clusterTrack.clear();
+  if (m_seedsfilter) m_clusterTrack.clear();
 
   // Erase statistic information
   //
@@ -380,19 +281,16 @@ void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
 
   // Retrieve 
   //
-  if(m_useBremModel && m_useCaloSeeds) {
+  if (m_useBremModel && m_useCaloSeeds) {
 
     m_caloF.clear();
     m_caloR.clear();
     m_caloZ.clear();
 
-//    const CaloClusterROI_Collection* calo = 0;    
-//    StatusCode sc = evtStore()->retrieve(calo,m_inputClusterContainerName);
- 
     if (!m_caloCluster.key().empty()) {
       SG::ReadHandle<CaloClusterROI_Collection> calo_cluster(m_caloCluster);
-      if(calo_cluster.isValid()) {
-        for(const Trk::CaloClusterROI *c : * calo_cluster) {
+      if (calo_cluster.isValid()) {
+        for (const Trk::CaloClusterROI *c : * calo_cluster) {
           m_caloF.push_back( c->globalPosition().phi ());
           m_caloR.push_back( c->globalPosition().perp());
           m_caloZ.push_back( c->globalPosition().z   ());
@@ -401,19 +299,16 @@ void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
     }
   }
 
-  if(!m_useSSSfilter && m_useHClusSeed) {
+  if (!m_useSSSfilter && m_useHClusSeed) {
 
     m_hadF.clear();
     m_hadR.clear();
     m_hadZ.clear();
 
-//    const CaloClusterROI_Collection* calo = 0;
-//    StatusCode sc = evtStore()->retrieve(calo,m_inputHadClusterContainerName);
-  
     if (!m_caloHad.key().empty()) {
       SG::ReadHandle<CaloClusterROI_Collection> calo_had(m_caloHad);
-      if(calo_had.isValid()) {
-        for(const Trk::CaloClusterROI *c : * calo_had) {
+      if (calo_had.isValid()) {
+        for (const Trk::CaloClusterROI *c : * calo_had) {
           m_hadF.push_back( c->globalPosition().phi ());
           m_hadR.push_back( c->globalPosition().perp());
           m_hadZ.push_back( c->globalPosition().z   ());
@@ -421,7 +316,7 @@ void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
       }
     }
   }
-  if(m_seedsegmentsWrite) m_seedtrack->newEvent(m_trackinfo,m_patternName);
+  if (m_seedsegmentsWrite) m_seedtrack->newEvent(m_trackinfo,m_patternName);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -432,17 +327,17 @@ void InDet::SiTrackMaker_xk::newTrigEvent(bool PIX,bool SCT)
 {
   m_pix          = PIX && m_usePix;
   m_sct          = SCT && m_useSct;
-  m_simpleTrack  = true;
+  bool simpleTrack  = true;
 
-  setTrackQualityCuts();
+  InDet::TrackQualityCuts trackquality = std::move(setTrackQualityCuts(simpleTrack));
 
   // New event for track finder tool
   //
-  m_tracksfinder->newEvent(m_trackinfo,m_trackquality);
+  m_tracksfinder->newEvent(m_trackinfo, trackquality);
 
   // Erase cluster to track association
   //
-  if(m_seedsfilter) m_clusterTrack.clear(); 
+  if (m_seedsfilter) m_clusterTrack.clear(); 
 
   // Erase statistic information
   //
@@ -466,12 +361,13 @@ void InDet::SiTrackMaker_xk::endEvent()
   m_clusterTrack.clear();
 
   // end event for seed to track tool
-  if(m_seedsegmentsWrite) m_seedtrack->endEvent();
+  if (m_seedsegmentsWrite) m_seedtrack->endEvent();
  
   // Print event information 
   //
   if (msgLevel()<=0) {
-    m_nprint=1; ATH_MSG_DEBUG((*this));
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -479,123 +375,139 @@ void InDet::SiTrackMaker_xk::endEvent()
 // Main method for track finding using space points
 ///////////////////////////////////////////////////////////////////
 
-const std::list<Trk::Track*>& InDet::SiTrackMaker_xk::getTracks
+std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
 (const std::list<const Trk::SpacePoint*>& Sp)
 {
   ++m_inputseeds;
-  m_tracks.clear();
-  if(!m_pix && !m_sct) return m_tracks;
+  std::list<Trk::Track*> tracks;
+  if (!m_pix && !m_sct) return tracks;
   
-  bool good;  m_sss = false; 
+  bool good;
   !m_seedsfilter ? good=true : good=newSeed(Sp);  
 
-  if(!good) return m_tracks;
+  if (!good) return tracks;
 
-  m_dbm = isDBMSeeds(*Sp.begin());
+  bool dbm = isDBMSeeds(*Sp.begin());
+  m_dbm = dbm; // Cache dbm for another getTracks method.
 
   // Get initial parameters estimation
-  // 
-  const Trk::TrackParameters* Tp = getAtaPlane(m_sss && m_useHClusSeed,Sp);
-  if(!Tp) return m_tracks;
+  //
+  bool sss = false;
+  std::array<double, 9> par;
+  const Trk::TrackParameters* Tp = nullptr;
+  if (dbm) Tp = getAtaPlaneDBM(Sp, par);
+  else Tp = getAtaPlane(sss && m_useHClusSeed, Sp, par);
+  m_par = par; // Cache par for another getTracks method.
+  if (!Tp) return tracks;
   ++m_goodseeds;
 
   // Get detector elements road
   //
   std::list<const InDetDD::SiDetectorElement*> DE;
-  if(!m_cosmicTrack) m_roadmaker->detElementsRoad(*Tp,Trk::alongMomentum,   DE);
-  else               m_roadmaker->detElementsRoad(*Tp,Trk::oppositeMomentum,DE);
+  if (!m_cosmicTrack) m_roadmaker->detElementsRoad(*Tp,Trk::alongMomentum,   DE);
+  else                m_roadmaker->detElementsRoad(*Tp,Trk::oppositeMomentum,DE);
 
-  if(!m_pix || !m_sct || m_dbm) detectorElementsSelection(DE);
+  if (!m_pix || !m_sct || m_dbm) detectorElementsSelection(DE, dbm);
 
-  if( int(DE.size())  <   m_nclusmin) {delete Tp; return m_tracks;} 
+  if ( static_cast<int>(DE.size())  <   m_nclusmin) {
+    delete Tp;
+    return tracks;
+  }
 
   std::list<Amg::Vector3D> Gp;
   
   // Find possible list of tracks using space points space points information
   //
-  if     (!m_useBremModel      ) {
-    m_tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,m_clusterTrack);
-  }
-  else if(!m_useCaloSeeds      ) {
-    m_tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,m_clusterTrack,false);
-  }
-  else if(  isCaloCompatible() ) {
-    m_tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,m_clusterTrack,true);
-  }
-  else                           {
-    m_tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,m_clusterTrack);
+  if (!m_useBremModel) {
+    tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,m_clusterTrack);
+  } else if (!m_useCaloSeeds) {
+    tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,m_clusterTrack,false);
+  } else if (isCaloCompatible(par)) {
+    tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,m_clusterTrack,true);
+  } else {
+    tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,m_clusterTrack);
   }
   
-  if(m_seedsfilter) {
-
-    std::list<Trk::Track*>::iterator t = m_tracks.begin();
-    while(t!=m_tracks.end()) {
-
-      if(!isNewTrack((*t))) {delete (*t); m_tracks.erase(t++);}
-      else                  {clusterTrackMap((*t++));         }
+  if (m_seedsfilter) {
+    std::list<Trk::Track*>::iterator t = tracks.begin();
+    while (t!=tracks.end()) {
+      if (!isNewTrack((*t), m_clusterTrack)) {
+        delete (*t);
+        tracks.erase(t++);
+      } else {
+        clusterTrackMap((*t++), m_clusterTrack);
+      }
     }
   }
-  m_findtracks+=m_tracks.size();
+  m_findtracks+=tracks.size();
 
   // Call seed to track execution
   //
-  if(m_seedsegmentsWrite) m_seedtrack->executeSiSPSeedSegments(Tp,m_tracks.size(),Sp);
+  if (m_seedsegmentsWrite) m_seedtrack->executeSiSPSeedSegments(Tp,tracks.size(),Sp);
 
   delete Tp;
-  return m_tracks;
+  return tracks;
 }
 
 ///////////////////////////////////////////////////////////////////
 // Main method for track finding using space points
 ///////////////////////////////////////////////////////////////////
 
-const std::list<Trk::Track*>& InDet::SiTrackMaker_xk::getTracks
+std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
 (const Trk::TrackParameters& Tp,const std::list<Amg::Vector3D>& Gp)
 {
   ++m_inputseeds;
-  m_tracks.clear();
-  if(!m_pix && !m_sct) return m_tracks;
+  std::list<Trk::Track*> tracks;
+  if (!m_pix && !m_sct) return tracks;
 
   ++m_goodseeds;
 
   // Get detector elements road
   //
   std::list<const InDetDD::SiDetectorElement*> DE;
-  if(!m_cosmicTrack) m_roadmaker->detElementsRoad(Tp,Trk::alongMomentum,   DE);
-  else               m_roadmaker->detElementsRoad(Tp,Trk::oppositeMomentum,DE);
+  if (!m_cosmicTrack) m_roadmaker->detElementsRoad(Tp,Trk::alongMomentum,   DE);
+  else                m_roadmaker->detElementsRoad(Tp,Trk::oppositeMomentum,DE);
 
-  if(!m_pix || !m_sct) detectorElementsSelection(DE);
+  // In this method, isDBMSeeds method is not called and dbm is not determined.
+  // However, dbm is required for detectorElementsSelection.
+  // Cached value of dbm is used.
+  bool dbm = m_dbm;
+  if (!m_pix || !m_sct) detectorElementsSelection(DE, dbm);
 
-  if( int(DE.size())  <   m_nclusmin) return m_tracks; 
+  if (static_cast<int>(DE.size()) < m_nclusmin) return tracks; 
 
   // Find possible list of tracks with trigger track parameters or global positions
   //
   std::list<const Trk::SpacePoint*>  Sp;
   
-  if     (!m_useBremModel      ) {
-    m_tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,m_clusterTrack);
-  }
-  else if(!m_useCaloSeeds      ) {
-    m_tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,m_clusterTrack,false);
-  }
-  else if(  isCaloCompatible() ) {
-    m_tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,m_clusterTrack,true);
-  }
-  else                           {
-    m_tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,m_clusterTrack);
+  // In this method, getAtaPlane method is not called and par is not determined.
+  // However, par is required for isCaloCompatible.
+  // Cached value of par is used.
+  std::array<double, 9> par = m_par;
+
+  if (!m_useBremModel) {
+    tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,m_clusterTrack);
+  } else if (!m_useCaloSeeds) {
+    tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,m_clusterTrack,false);
+  } else if (isCaloCompatible(par)) {
+    tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,m_clusterTrack,true);
+  } else {
+    tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,m_clusterTrack);
   }
   
-  if(m_seedsfilter) {
-
-    std::list<Trk::Track*>::iterator t = m_tracks.begin();
-    while(t!=m_tracks.end()) {
-
-      if(!isNewTrack((*t))) {delete (*t); m_tracks.erase(t++);}
-      else                  {clusterTrackMap((*t++));         }
+  if (m_seedsfilter) {
+    std::list<Trk::Track*>::iterator t = tracks.begin();
+    while (t!=tracks.end()) {
+      if (!isNewTrack((*t), m_clusterTrack)) {
+        delete (*t);
+        tracks.erase(t++);
+      } else {
+        clusterTrackMap((*t++), m_clusterTrack);
+      }
     }
   }
-  m_findtracks+=m_tracks.size();
-  return m_tracks;
+  m_findtracks+=tracks.size();
+  return tracks;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -603,24 +515,24 @@ const std::list<Trk::Track*>& InDet::SiTrackMaker_xk::getTracks
 ///////////////////////////////////////////////////////////////////
 
 const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
-(bool sss,const std::list<const Trk::SpacePoint*>& SP)
+(bool sss,const std::list<const Trk::SpacePoint*>& SP, std::array<double, 9>& par) const
 {
-  if(m_dbm) return getAtaPlaneDBM(SP);
-
   std::list<const Trk::SpacePoint*>::const_iterator is=SP.begin(),ise=SP.end(),is0,is1,is2;  
-  if(is==ise) return 0;
+  if (is==ise) return nullptr;
 
-  const Trk::PrepRawData*       cl  = (*is)->clusterList().first;
-  if(!cl) return 0;
-  const Trk::PlaneSurface*      pla = 
+  const Trk::PrepRawData* cl  = (*is)->clusterList().first;
+  if (!cl) return nullptr;
+  const Trk::PlaneSurface* pla = 
     static_cast<const Trk::PlaneSurface*>(&cl->detectorElement()->surface());
-  if(!pla) return 0;
+  if (!pla) return nullptr;
 
-  is0 = is; if(++is==ise) return 0; 
-  is1 = is; if(++is==ise) return 0;
+  is0 = is;
+  if (++is==ise) return nullptr;
+  is1 = is;
+  if (++is==ise) return nullptr;
   is2 = is ;
   double p0[3],p1[3],p2[3]; 
-  if(!globalPositions((*is0),(*is1),(*is2),p0,p1,p2)) return 0;
+  if (!globalPositions((*is0),(*is1),(*is2),p0,p1,p2)) return nullptr;
 
   double x0 = p0[0]   ;
   double y0 = p0[1]   ;
@@ -649,46 +561,44 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
   double Ay[3] = {Tp(0,1),Tp(1,1),Tp(2,1)}; 
   double D [3] = {Tp(0,3),Tp(1,3),Tp(2,3)}; 
   
-  double   d[3] = {x0-D[0],y0-D[1],z0-D[2]}            ;
+  double   d[3] = {x0-D[0],y0-D[1],z0-D[2]};
 
-  m_p[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
-  m_p[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
+  par[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
+  par[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-  if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+  if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
   Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
-  if(fieldprop.magneticFieldMode() > 0) {
+  if (fieldprop.magneticFieldMode() > 0) {
 
-    double H[3],gP[3] ={x0,y0,z0}; m_fieldService->getFieldZR(gP,H);
+    double H[3],gP[3] ={x0,y0,z0}; m_fieldServiceHandle->getFieldZR(gP,H);
 
-    if(fabs(H[2])>.0001) {
-      m_p[2] = atan2(b+a*A,a-b*A);
-      m_p[3] = atan2(1.,T)       ;  
-      m_p[5] = -C/(300.*H[2])    ;
-    }
-    else {
+    if (fabs(H[2])>.0001) {
+      par[2] = atan2(b+a*A,a-b*A);
+      par[3] = atan2(1.,T)       ;  
+      par[5] = -C/(300.*H[2])    ;
+    } else {
       T    =  z2*sqrt(r2)  ;
-      m_p[2] = atan2(y2,x2);
-      m_p[3] = atan2(1.,T) ;
-      m_p[5] = 1./m_pTmin  ;
+      par[2] = atan2(y2,x2);
+      par[3] = atan2(1.,T) ;
+      par[5] = 1./m_pTmin  ;
     }
-  }
-  else {
-      T    = z2*sqrt(r2)   ;
-      m_p[2] = atan2(y2,x2);
-      m_p[3] = atan2(1.,T) ;
-      m_p[5] = 1./m_pTmin  ;
+  } else {
+    T    = z2*sqrt(r2)   ;
+    par[2] = atan2(y2,x2);
+    par[3] = atan2(1.,T) ;
+    par[5] = 1./m_pTmin  ;
   }
   
-  if(fabs(m_p[5])*m_pTmin > 1.1) return 0;
-  m_p[4] = m_p[5]/sqrt(1.+T*T);
-  m_p[6] = x0                              ;
-  m_p[7] = y0                              ;
-  m_p[8] = z0                              ;
+  if (fabs(par[5])*m_pTmin > 1.1) return nullptr;
+  par[4] = par[5]/sqrt(1.+T*T);
+  par[6] = x0                              ;
+  par[7] = y0                              ;
+  par[8] = z0                              ;
 
-  if(sss && !isHadCaloCompatible()) return 0;
+  if (sss && !isHadCaloCompatible(par)) return nullptr;
 
-  return pla->createTrackParameters(m_p[0],m_p[1],m_p[2],m_p[3],m_p[4],0); 
+  return pla->createTrackParameters(par[0],par[1],par[2],par[3],par[4],0); 
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -696,22 +606,24 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
 ///////////////////////////////////////////////////////////////////
 
 const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlaneDBM
-(const std::list<const Trk::SpacePoint*>& SP)
+(const std::list<const Trk::SpacePoint*>& SP, std::array<double, 9>& par) const
 {
   std::list<const Trk::SpacePoint*>::const_iterator is=SP.begin(),ise=SP.end(),is0,is1,is2;  
-  if(is==ise) return 0;
+  if (is==ise) return nullptr;
 
-  const Trk::PrepRawData*       cl  = (*is)->clusterList().first;
-  if(!cl) return 0;
-  const Trk::PlaneSurface*      pla = 
+  const Trk::PrepRawData* cl = (*is)->clusterList().first;
+  if (!cl) return nullptr;
+  const Trk::PlaneSurface* pla = 
     static_cast<const Trk::PlaneSurface*>(&cl->detectorElement()->surface());
-  if(!pla) return 0;
+  if (!pla) return nullptr;
 
-  is0 = is; if(++is==ise) return 0; 
-  is1 = is; if(++is==ise) return 0;
-  is2 = is ;
+  is0 = is;
+  if (++is==ise) return nullptr;
+  is1 = is;
+  if (++is==ise) return nullptr;
+  is2 = is;
   double p0[3],p1[3],p2[3]; 
-  if(!globalPositions((*is0),(*is1),(*is2),p0,p1,p2)) return 0;
+  if (!globalPositions((*is0),(*is1),(*is2),p0,p1,p2)) return nullptr;
 
   double x0 = m_xybeam[0]-p0[0];
   double y0 = m_xybeam[1]-p0[1];
@@ -739,100 +651,108 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlaneDBM
   
   double   d[3] = {p0[0]-D[0],p0[1]-D[1],p0[2]-D[2]};
 
-  m_p[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
-  m_p[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
+  par[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
+  par[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-  if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+  if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
   Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
-  if(fieldprop.magneticFieldMode() > 0) {
-
-    double H[3],gP[3] ={p0[0],p0[1],p0[2]}; m_fieldService->getFieldZR(gP,H);
-
-    if(fabs(H[2])>.0001) {
-      m_p[2] = atan2(b+a*A,a-b*A);
-      m_p[3] = atan2(1.,T)       ;  
-      m_p[5] = -C/(300.*H[2])    ;
-    }
-    else {
+  if (fieldprop.magneticFieldMode() > 0) {
+    double H[3],gP[3] ={p0[0],p0[1],p0[2]};
+    m_fieldServiceHandle->getFieldZR(gP,H);
+
+    if (fabs(H[2])>.0001) {
+      par[2] = atan2(b+a*A,a-b*A);
+      par[3] = atan2(1.,T)       ;  
+      par[5] = -C/(300.*H[2])    ;
+    } else {
       T    =  z2*sqrt(r2)  ;
-      m_p[2] = atan2(y2,x2);
-      m_p[3] = atan2(1.,T) ;
-      m_p[5] = 1./1000.    ;
+      par[2] = atan2(y2,x2);
+      par[3] = atan2(1.,T) ;
+      par[5] = 1./1000.    ;
     }
-  }
-  else {
-      T    = z2*sqrt(r2)   ;
-      m_p[2] = atan2(y2,x2);
-      m_p[3] = atan2(1.,T) ;
-      m_p[5] = 1./1000     ;
+  } else {
+    T    = z2*sqrt(r2)   ;
+    par[2] = atan2(y2,x2);
+    par[3] = atan2(1.,T) ;
+    par[5] = 1./1000     ;
   }
 
-  if(fabs(m_p[5])*20. > 1.1) return 0;
-  m_p[4] = m_p[5]/sqrt(1.+T*T);
-  m_p[6] = p0[0]                           ;
-  m_p[7] = p0[1]                           ;
-  m_p[8] = p0[2]                           ;
-  return pla->createTrackParameters(m_p[0],m_p[1],m_p[2],m_p[3],m_p[4],0); 
+  if (fabs(par[5])*20. > 1.1) return nullptr;
+  par[4] = par[5]/sqrt(1.+T*T);
+  par[6] = p0[0]                           ;
+  par[7] = p0[1]                           ;
+  par[8] = p0[2]                           ;
+  return pla->createTrackParameters(par[0],par[1],par[2],par[3],par[4],0); 
 }
 
 ///////////////////////////////////////////////////////////////////
 // Set track quality cuts
 ///////////////////////////////////////////////////////////////////
 
-void  InDet::SiTrackMaker_xk::setTrackQualityCuts()
+InDet::TrackQualityCuts InDet::SiTrackMaker_xk::setTrackQualityCuts(bool simpleTrack)
 {
+  InDet::TrackQualityCuts trackquality;
   // Integer cuts
   //
-  m_trackquality.setIntCut   ("MinNumberOfClusters" ,m_nclusmin   );
-  m_trackquality.setIntCut   ("MinNumberOfWClusters",m_nwclusmin  );
-  m_trackquality.setIntCut   ("MaxNumberOfHoles"    ,m_nholesmax  ); 
-  m_trackquality.setIntCut   ("MaxHolesGae"         ,m_dholesmax  ); 
-
-  if( m_useassoTool ) m_trackquality.setIntCut   ("UseAssociationTool",1);
-  else                m_trackquality.setIntCut   ("UseAssociationTool",0);
-  if( m_cosmicTrack ) m_trackquality.setIntCut   ("CosmicTrack"       ,1); 
-  else                m_trackquality.setIntCut   ("CosmicTrack"       ,0);
-  if(m_simpleTrack  ) m_trackquality.setIntCut   ("SimpleTrack"       ,1);
-  else                m_trackquality.setIntCut   ("SimpleTrack"       ,0);
-  if(m_multitracks  ) m_trackquality.setIntCut   ("doMultiTracksProd" ,1);
-  else                m_trackquality.setIntCut   ("doMultiTracksProd" ,0);
+  trackquality.setIntCut("MinNumberOfClusters" ,m_nclusmin   );
+  trackquality.setIntCut("MinNumberOfWClusters",m_nwclusmin  );
+  trackquality.setIntCut("MaxNumberOfHoles"    ,m_nholesmax  ); 
+  trackquality.setIntCut("MaxHolesGae"         ,m_dholesmax  ); 
+
+  if (m_useassoTool) trackquality.setIntCut("UseAssociationTool",1);
+  else               trackquality.setIntCut("UseAssociationTool",0);
+  if (m_cosmicTrack) trackquality.setIntCut("CosmicTrack"       ,1); 
+  else               trackquality.setIntCut("CosmicTrack"       ,0);
+  if (simpleTrack)   trackquality.setIntCut("SimpleTrack"       ,1);
+  else               trackquality.setIntCut("SimpleTrack"       ,0);
+  if (m_multitracks) trackquality.setIntCut("doMultiTracksProd" ,1);
+  else               trackquality.setIntCut("doMultiTracksProd" ,0);
 
   // Double cuts
   //
-  m_trackquality.setDoubleCut("pTmin"              ,m_pTmin      );
-  m_trackquality.setDoubleCut("pTminBrem"          ,m_pTminBrem  );
-  m_trackquality.setDoubleCut("MaxXi2forCluster"   ,m_xi2max     );
-  m_trackquality.setDoubleCut("MaxXi2forOutlier"   ,m_xi2maxNoAdd);
-  m_trackquality.setDoubleCut("MaxXi2forSearch"    ,m_xi2maxlink );
-  m_trackquality.setDoubleCut("MaxXi2MultiTracks"  ,m_xi2multitracks);
+  trackquality.setDoubleCut("pTmin"              ,m_pTmin      );
+  trackquality.setDoubleCut("pTminBrem"          ,m_pTminBrem  );
+  trackquality.setDoubleCut("MaxXi2forCluster"   ,m_xi2max     );
+  trackquality.setDoubleCut("MaxXi2forOutlier"   ,m_xi2maxNoAdd);
+  trackquality.setDoubleCut("MaxXi2forSearch"    ,m_xi2maxlink );
+  trackquality.setDoubleCut("MaxXi2MultiTracks"  ,m_xi2multitracks);
+
+  return trackquality;
 }
 
 ///////////////////////////////////////////////////////////////////
 // Detector elements selection
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiTrackMaker_xk::detectorElementsSelection(std::list<const InDetDD::SiDetectorElement*>& DE)
+void InDet::SiTrackMaker_xk::detectorElementsSelection(std::list<const InDetDD::SiDetectorElement*>& DE, bool dbm) const
 {
   std::list<const InDetDD::SiDetectorElement*>::iterator d = DE.begin();
-  if(!m_dbm) {
-
-    while(d!=DE.end()) {
-
-      if     ((*d)->isPixel()) {if(!m_pix) {d = DE.erase(d); continue;}}
-      else if(   !m_sct      ) {            d = DE.erase(d); continue; }
+  if (!dbm) {
+    while (d!=DE.end()) {
+      if ((*d)->isPixel()) {
+        if (!m_pix) {
+          d = DE.erase(d);
+          continue;
+        }
+      } else if (!m_sct) {
+        d = DE.erase(d);
+        continue;
+      }
       ++d;
     }
-  }
-  else      {
-    while(d!=DE.end()) {
-
-      if(!(*d)->isDBM() ) {
-
-	if((*d)->isSCT() || (*d)->isEndcap())       {d = DE.erase(d); continue;}
-	const Amg::Transform3D& T  = (*d)->surface().transform();	
-	if(T(0,3)*T(0,3)+T(1,3)*T(1,3) > (43.*43) ) {d = DE.erase(d); continue;}
-
+  } else {
+    while (d!=DE.end()) {
+      if (!(*d)->isDBM() ) {
+        if ((*d)->isSCT() || (*d)->isEndcap()) {
+          d = DE.erase(d);
+          continue;
+        }
+        const Amg::Transform3D& T = (*d)->surface().transform(); 
+        if (T(0,3)*T(0,3)+T(1,3)*T(1,3) > (43.*43) ) {
+          d = DE.erase(d);
+          continue;
+        }
       }
       ++d;
     }
@@ -850,20 +770,29 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
   std::list<const Trk::SpacePoint*>::const_iterator s=Sp.begin(),se=Sp.end();
 
   int n = 0;
-  for(s = Sp.begin(); s!=se; ++s) {
+  for (s = Sp.begin(); s!=se; ++s) {
 
     const Trk::PrepRawData* p = (*s)->clusterList().first; 
    
-    for(pt = m_clusterTrack.find(p); pt!=pte; ++pt) {if((*pt).first!=p) break; trackseed.insert((*pt).second);} ++n;
+    for (pt = m_clusterTrack.find(p); pt!=pte; ++pt) {
+      if ((*pt).first!=p) break;
+      trackseed.insert((*pt).second);
+    }
+    ++n;
 
-    p = (*s)->clusterList().second; if(!p) continue;
+    p = (*s)->clusterList().second;
+    if (!p) continue;
 
-    for(pt = m_clusterTrack.find(p); pt!=pte; ++pt) {if((*pt).first!=p) break; trackseed.insert((*pt).second);} ++n;
+    for (pt = m_clusterTrack.find(p); pt!=pte; ++pt) {
+      if ((*pt).first!=p) break;
+      trackseed.insert((*pt).second);
+    }
+    ++n;
 
   }
-  if(trackseed.empty()) return true;
+  if (trackseed.empty()) return true;
 
-  if(m_ITKGeomtry && n!=3 && n!=6) return false;
+  if (m_ITKGeomtry && n!=3 && n!=6) return false;
  
   std::multiset<const Trk::Track*>::iterator t = trackseed.begin(), te = trackseed.end();
 
@@ -873,21 +802,35 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
   int               nt  = 1                                ;
   int               t3  = 0                                ;
 
-  for(++t; t!=te; ++t) {
-
-    if((*t) == tr) {++nt; continue;}
-    if (nt  == n ) {++t3; unsigned int ns =  tr->measurementsOnTrack()->size(); if(ns > nsm3) nsm3 = ns;} 
+  for (++t; t!=te; ++t) {
+    if ((*t) == tr) {
+      ++nt;
+      continue;
+    }
+    if (nt  == n) {
+      ++t3;
+      unsigned int ns =  tr->measurementsOnTrack()->size();
+      if (ns > nsm3) nsm3 = ns;
+    }
     tr = (*t); nt = 1;
-    unsigned int ns = tr->measurementsOnTrack()->size(); if(ns > nsm) nsm = ns;
+    unsigned int ns = tr->measurementsOnTrack()->size();
+    if (ns > nsm) nsm = ns;
+  }
+  if (nt == n) {
+    ++t3;
+    unsigned int ns =  tr->measurementsOnTrack()->size();
+    if (ns > nsm3) nsm3 = ns;
   }
-  if(nt == n) {++t3; unsigned int ns =  tr->measurementsOnTrack()->size(); if(ns > nsm3) nsm3 = ns;}
 
-  if(m_heavyion) {if(n==3 || t3 <=0) return true; return false;}
+  if (m_heavyion) {
+    if (n==3 || t3 <=0) return true;
+    return false;
+  }
 
-  if( (m_ITKGeomtry && t3 > 0) || nsm3 > 13 || t3 > 2) return false;
+  if ( (m_ITKGeomtry && t3 > 0) || nsm3 > 13 || t3 > 2) return false;
 
-  if( !m_cosmicTrack && n==3 && m_sct && (*Sp.begin())->r() > 43. ) return true;
-  if(t3 > 0) return false;
+  if ( !m_cosmicTrack && n==3 && m_sct && (*Sp.begin())->r() > 43. ) return true;
+  if (t3 > 0) return false;
   return true;
 }
 
@@ -895,15 +838,16 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
 // Clusters-track multimap production
 ///////////////////////////////////////////////////////////////////
 
-void  InDet::SiTrackMaker_xk::clusterTrackMap(Trk::Track* Tr)
+void  InDet::SiTrackMaker_xk::clusterTrackMap(Trk::Track* Tr,
+                                              std::multimap<const Trk::PrepRawData*, const Trk::Track*>& clusterTrack) const
 {
   DataVector<const Trk::MeasurementBase>::const_iterator 
     m  = Tr->measurementsOnTrack()->begin(), 
     me = Tr->measurementsOnTrack()->end  ();
 
-  for(; m!=me; ++m) {
-    const Trk::PrepRawData* prd = ((const Trk::RIO_OnTrack*)(*m))->prepRawData();
-    if(prd) m_clusterTrack.insert(std::make_pair(prd,Tr));
+  for (; m!=me; ++m) {
+    const Trk::PrepRawData* prd = static_cast<const Trk::RIO_OnTrack*>(*m)->prepRawData();
+    if (prd) clusterTrack.insert(std::make_pair(prd,Tr));
   }
 }
  
@@ -911,41 +855,41 @@ void  InDet::SiTrackMaker_xk::clusterTrackMap(Trk::Track* Tr)
 // Test is it new track
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isNewTrack(Trk::Track* Tr)
+bool InDet::SiTrackMaker_xk::isNewTrack(Trk::Track* Tr,
+                                        const std::multimap<const Trk::PrepRawData*, const Trk::Track*>& clusterTrack) const
 {
   const Trk::PrepRawData* prd   [100];
   std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator 
     ti,t[100],te = m_clusterTrack.end();
 
-  int     n   = 0    ;
+  int n = 0;
 
   DataVector<const Trk::MeasurementBase>::const_iterator 
     m  = Tr->measurementsOnTrack()->begin(), 
     me = Tr->measurementsOnTrack()->end  ();
 
-  for(; m!=me; ++m) {
+  for (; m!=me; ++m) {
   
-    const Trk::PrepRawData* pr = ((const Trk::RIO_OnTrack*)(*m))->prepRawData();
-    if(pr) {
+    const Trk::PrepRawData* pr = static_cast<const Trk::RIO_OnTrack*>(*m)->prepRawData();
+    if (pr) {
       prd[n] =pr;
-      t  [n] = m_clusterTrack.find(prd[n]); if(t[n]==te) return true; ++n;
+      t  [n] = clusterTrack.find(prd[n]);
+      if (t[n]==te) return true;
+      ++n;
     }
   }
 
-  if(!n) return true;
+  if (!n) return true;
   int nclt = n;
   
-  for(int i=0; i!=n; ++i) {
-
+  for (int i=0; i!=n; ++i) {
     int nclmax = 0;
-
-    for(ti=t[i]; ti!=te; ++ti) {
-
-      if( (*ti).first != prd[i] ) break;
+    for (ti=t[i]; ti!=te; ++ti) {
+      if ( (*ti).first != prd[i] ) break;
       int ncl = (*ti).second->measurementsOnTrack()->size();
-      if(ncl > nclmax) nclmax = ncl;
+      if (ncl > nclmax) nclmax = ncl;
     }   
-    if(nclt > nclmax) return true;
+    if (nclt > nclmax) return true;
   }
   return false;
 }
@@ -956,7 +900,7 @@ bool InDet::SiTrackMaker_xk::isNewTrack(Trk::Track* Tr)
 
 bool InDet::SiTrackMaker_xk::globalPositions
 (const Trk::SpacePoint* s0,const Trk::SpacePoint* s1,const Trk::SpacePoint* s2,
- double* p0,double* p1,double* p2)
+ double* p0,double* p1,double* p2) const
 {
 
   p0[0] = s0->globalPosition().x(); 
@@ -971,15 +915,15 @@ bool InDet::SiTrackMaker_xk::globalPositions
   p2[1] = s2->globalPosition().y(); 
   p2[2] = s2->globalPosition().z(); 
  
-  if(!s0->clusterList().second && !s1->clusterList().second && !s2->clusterList().second) return true;
+  if (!s0->clusterList().second && !s1->clusterList().second && !s2->clusterList().second) return true;
 
   double dir0[3],dir1[3],dir2[3]; 
 
   globalDirections(p0,p1,p2,dir0,dir1,dir2);
 
-  if(s0->clusterList().second && !globalPosition(s0,dir0,p0)) return false;
-  if(s1->clusterList().second && !globalPosition(s1,dir1,p1)) return false;
-  if(s2->clusterList().second && !globalPosition(s2,dir2,p2)) return false;
+  if (s0->clusterList().second && !globalPosition(s0,dir0,p0)) return false;
+  if (s1->clusterList().second && !globalPosition(s1,dir1,p1)) return false;
+  if (s2->clusterList().second && !globalPosition(s2,dir2,p2)) return false;
   
   return true;
 }
@@ -989,7 +933,7 @@ bool InDet::SiTrackMaker_xk::globalPositions
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::SiTrackMaker_xk::globalPosition
-(const Trk::SpacePoint* sp, double* dir,double* p)
+(const Trk::SpacePoint* sp, double* dir,double* p) const
 {
   const Trk::PrepRawData*  c0  = sp->clusterList().first;
   const Trk::PrepRawData*  c1  = sp->clusterList().second;
@@ -1019,12 +963,12 @@ bool InDet::SiTrackMaker_xk::globalPosition
   double du    = a0[0]*u[0]+a0[1]*u[1]+a0[2]*u[2];
   double dv    = a1[0]*v[0]+a1[1]*v[1]+a1[2]*v[2];
 
-  if(du==0. || dv==0.) return false;
+  if (du==0. || dv==0.) return false;
 
   double s0 = (dr[0]*u[0]+dr[1]*u[1]+dr[2]*u[2])/du;
   double s1 =-(dr[0]*v[0]+dr[1]*v[1]+dr[2]*v[2])/dv;
 
-  if(s0 < -d0 || s0 > 1.+d0 ||  s1 < -d0 || s1 > 1.+d0) return false;
+  if (s0 < -d0 || s0 > 1.+d0 ||  s1 < -d0 || s1 > 1.+d0) return false;
 
   p[0] = e0.first.x()+s0*a0[0]; 
   p[1] = e0.first.y()+s0*a0[1]; 
@@ -1037,29 +981,28 @@ bool InDet::SiTrackMaker_xk::globalPosition
 // Test is it track with calo seed compatible
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isCaloCompatible()
+bool InDet::SiTrackMaker_xk::isCaloCompatible(const std::array<double, 9>& par) const
 {
   const double pi = M_PI, pi2 = 2.*M_PI;
 
-  if(m_caloF.empty()) return false;   
+  if (m_caloF.empty()) return false;   
 
-  std::list<double>::iterator f = m_caloF.begin(), fe = m_caloF.end();
-  std::list<double>::iterator r = m_caloR.begin();
-  std::list<double>::iterator z = m_caloZ.begin();
+  std::list<double>::const_iterator f = m_caloF.begin(), fe = m_caloF.end();
+  std::list<double>::const_iterator r = m_caloR.begin();
+  std::list<double>::const_iterator z = m_caloZ.begin();
 
-  double F = m_p[2]                           ;
-  double E = -log(tan(.5*m_p[3]))             ;
-  double R = sqrt(m_p[6]*m_p[6]+m_p[7]*m_p[7]);
-  double Z = m_p[8]                           ;                           
+  double F = par[2]                           ;
+  double E = -log(tan(.5*par[3]))             ;
+  double R = sqrt(par[6]*par[6]+par[7]*par[7]);
+  double Z = par[8]                           ;                           
   
-  for(; f!=fe; ++f) {
+  for (; f!=fe; ++f) {
     double df = fabs(F-(*f));
-    if(df > pi        ) df = fabs(pi2-df);
-    if(df < m_phiWidth) {
-      
+    if (df > pi) df = fabs(pi2-df);
+    if (df < m_phiWidth) {
       double dR = (*r)-R;
       double dZ = (*z)-Z;
-      if(fabs(E-atanh(dZ/sqrt(dR*dR+dZ*dZ)) ) < m_etaWidth) return true;
+      if (fabs(E-atanh(dZ/sqrt(dR*dR+dZ*dZ)) ) < m_etaWidth) return true;
     }
     ++r; ++z;
   }
@@ -1070,31 +1013,31 @@ bool InDet::SiTrackMaker_xk::isCaloCompatible()
 // Test track is compatible withi had calo seed
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isHadCaloCompatible()
+bool InDet::SiTrackMaker_xk::isHadCaloCompatible(const std::array<double, 9>& par) const
 {
   const double pi = M_PI, pi2 = 2.*M_PI;
 
-  if(m_hadF.empty() || fabs(m_p[5])*m_pTminSSS > 1.) return false;   
+  if (m_hadF.empty() || fabs(par[5])*m_pTminSSS > 1.) return false;   
 
-  std::list<double>::iterator f = m_hadF.begin(), fe = m_hadF.end();
-  std::list<double>::iterator r = m_hadR.begin();
-  std::list<double>::iterator z = m_hadZ.begin();
+  std::list<double>::const_iterator f = m_hadF.begin(), fe = m_hadF.end();
+  std::list<double>::const_iterator r = m_hadR.begin();
+  std::list<double>::const_iterator z = m_hadZ.begin();
 
-  double F = m_p[2]                           ;
-  double E = -log(tan(.5*m_p[3]))             ;
-  double R = sqrt(m_p[6]*m_p[6]+m_p[7]*m_p[7]);
-  double Z = m_p[8]                           ;                           
+  double F = par[2]                           ;
+  double E = -log(tan(.5*par[3]))             ;
+  double R = sqrt(par[6]*par[6]+par[7]*par[7]);
+  double Z = par[8]                           ;                           
   
-  for(; f!=fe; ++f) {
+  for (; f!=fe; ++f) {
     double df = fabs(F-(*f));
-    if(df > pi        ) df = fabs(pi2-df);
-    if(df < m_phiWidth) {
-      
+    if (df > pi) df = fabs(pi2-df);
+    if (df < m_phiWidth) {
       double dR = (*r)-R;
       double dZ = (*z)-Z;
-      if(fabs(E-atanh(dZ/sqrt(dR*dR+dZ*dZ)) ) < m_etaWidth) return true;
+      if (fabs(E-atanh(dZ/sqrt(dR*dR+dZ*dZ))) < m_etaWidth) return true;
     }
-    ++r; ++z;
+    ++r;
+    ++z;
   }
   return false;
 }
@@ -1103,7 +1046,7 @@ bool InDet::SiTrackMaker_xk::isHadCaloCompatible()
 // Test is it DBM seed
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isDBMSeeds(const Trk::SpacePoint* s)
+bool InDet::SiTrackMaker_xk::isDBMSeeds(const Trk::SpacePoint* s) const
 {
   const InDetDD::SiDetectorElement* de= 
     static_cast<const InDetDD::SiDetectorElement*>(s->clusterList().first->detectorElement());
@@ -1115,7 +1058,7 @@ bool InDet::SiTrackMaker_xk::isDBMSeeds(const Trk::SpacePoint* s)
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiTrackMaker_xk::globalDirections
-(double* p0,double* p1,double* p2,double* d0,double* d1,double* d2)
+(double* p0,double* p1,double* p2,double* d0,double* d1,double* d2) const
 {
   double x01 = p1[0]-p0[0]      ;
   double y01 = p1[1]-p0[1]      ;
@@ -1150,4 +1093,3 @@ void InDet::SiTrackMaker_xk::globalDirections
   d1[0] = Sa   +Sb*A0; d1[1]= Sb   -Sa*A0; d1[2]=Ce;  
   d2[0] = Sa*C2-Sb*S2; d2[1]= Sa*S2+Sb*C2; d2[2]=Ce;  
 }
-
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx
index 7701c93dc630..edf80344fb8d 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/SiTrigSPSeededTrackFinder.cxx
@@ -349,7 +349,7 @@ HLT::ErrorCode InDet::SiTrigSPSeededTrackFinder::hltExecute(const HLT::TriggerEl
       }
       if(doTiming()) m_timerSeedProcessing->start();
       ++m_nseeds;
-      const std::list<Trk::Track*>& T = m_trackmaker->getTracks(seed->spacePoints());
+      std::list<Trk::Track*> T = std::move(m_trackmaker->getTracks(seed->spacePoints()));
       
       if (m_fastTracking){
 	      for(std::list<Trk::Track*>::const_iterator t=T.begin(); t!=T.end(); ++t) {
@@ -537,8 +537,7 @@ HLT::ErrorCode InDet::SiTrigSPSeededTrackFinder::hltExecute(const HLT::TriggerEl
       }
       
 	  
-	const std::list<Trk::Track*>& T = 
-	  m_trackmaker->getTracks(*perig, gpList);//dummyp); //
+      std::list<Trk::Track*> T = std::move(m_trackmaker->getTracks(*perig, gpList));//dummyp); //
 	  
 	  
 	if(doTiming()){
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
index 934ba2930851..367ade168fe1 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
@@ -755,7 +755,7 @@ StatusCode TrigFastTrackFinder::findTracks(const TrigRoiDescriptor& roi,
 
       ++m_nSeeds;
 
-      const std::list<Trk::Track*>& tracks = m_trackMaker->getTracks(spList);
+      std::list<Trk::Track*> tracks = std::move(m_trackMaker->getTracks(spList));
 
       for(std::list<Trk::Track*>::const_iterator t=tracks.begin(); t!=tracks.end(); ++t) {
         if((*t)) {
diff --git a/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyC.cxx b/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyC.cxx
index 9575d2708baa..68d78d46bb2f 100644
--- a/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyC.cxx
+++ b/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyC.cxx
@@ -332,7 +332,7 @@ HLT::ErrorCode TrigL2PattRecoStrategyC::findTracks(const std::vector<const TrigS
 
     ++m_nseeds;
     if(m_timers) m_timer[5]->resume();
-    const std::list<Trk::Track*>& T = m_trackmaker->getTracks(seed->spacePoints()); 
+    std::list<Trk::Track*> T = std::move(m_trackmaker->getTracks(seed->spacePoints())); 
     if(m_timers) m_timer[5]->pause();
     if(m_timers) m_timer[6]->resume();
     for(std::list<Trk::Track*>::const_iterator t=T.begin(); t!=T.end(); ++t) {
@@ -484,7 +484,7 @@ HLT::ErrorCode TrigL2PattRecoStrategyC::findTracks(const std::vector<const TrigS
 
     ++m_nseeds;
     if(m_timers) m_timer[5]->resume();
-    const std::list<Trk::Track*>& T = m_trackmaker->getTracks(seed->spacePoints()); 
+    std::list<Trk::Track*> T = std::move(m_trackmaker->getTracks(seed->spacePoints()));
     if(m_timers) m_timer[5]->pause();
     if(m_timers) m_timer[6]->resume();
     for(std::list<Trk::Track*>::const_iterator t=T.begin(); t!=T.end(); ++t) {
-- 
GitLab


From 790ca3a02ef9ed7e19cd54a7c342a07704fcdc56 Mon Sep 17 00:00:00 2001
From: Piotr Sarna <piotr.sarna@cern.ch>
Date: Thu, 2 May 2019 12:35:19 +0000
Subject: [PATCH 058/129] Representation converter for monitored scalar

---
 .../AthenaMonitoring/MonitoredScalar.h        |  20 ++-
 .../test/MonitoredScalarTestSuite.cxx         | 129 ++++++++++++++++++
 2 files changed, 142 insertions(+), 7 deletions(-)
 create mode 100644 Control/AthenaMonitoring/test/MonitoredScalarTestSuite.cxx

diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h
index cb4cb9507a7d..e25fb4b0a46a 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h
@@ -16,21 +16,24 @@ namespace Monitored {
    *
    * Monitoring for any double-convertable scalar
    *
-   * @param name         Name of monitored quantity
-   * @param defaultValue default value assigned to the monitored scalar
+   * @param name            Name of monitored quantity
+   * @param defaultValue    Default value assigned to the monitored scalar
+   * @param valueTransform  Optional transformation applied to value
    *
    * \code
-   *   auto phi = Monitored::Scalar("phi", 4.2);       // deduced double
-   *   auto eta = Monitored::Scalar<float>("eta", 0);  // explicit float
+   *   auto phi = Monitored::Scalar("phi", 4.2);                                                        // deduced double
+   *   auto eta = Monitored::Scalar<float>("eta", 0);                                                   // explicit float
+   *   auto theta = Monitored::Scalar<double>("theta", 0.0, [](double value) { return value * 1000; }); // with transformation
    * \endcode
    */
   template <class T> class Scalar : public IMonitoredVariable {
   public:
     static_assert(std::is_convertible<T, double>::value, "Value must be convertable to double");
 
-    Scalar(std::string name, const T& defaultValue = {}) :
+    Scalar(std::string name, const T& defaultValue = {}, std::function<double(const T&)> valueTransform = {}) :
         IMonitoredVariable(std::move(name)),
-        m_value(defaultValue)
+        m_value(defaultValue),
+        m_valueTransform(valueTransform)
     {}
     Scalar(Scalar&&) = default;
     Scalar(Scalar const&) = delete;
@@ -51,10 +54,13 @@ namespace Monitored {
     T operator--() { return --m_value; }
     T operator--(int) { return m_value--; }
 
-    const std::vector<double> getVectorRepresentation() const override { return {double(m_value)}; }
+    const std::vector<double> getVectorRepresentation() const override { 
+      return { m_valueTransform ? m_valueTransform(m_value) : static_cast<double>(m_value) };
+    }
 
   private:
     T m_value;
+    std::function<double(const T&)> m_valueTransform;
   };
 
 } // namespace Monitored
diff --git a/Control/AthenaMonitoring/test/MonitoredScalarTestSuite.cxx b/Control/AthenaMonitoring/test/MonitoredScalarTestSuite.cxx
new file mode 100644
index 000000000000..da757bf390c6
--- /dev/null
+++ b/Control/AthenaMonitoring/test/MonitoredScalarTestSuite.cxx
@@ -0,0 +1,129 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#undef NDEBUG
+#include <cassert>
+#include <iostream>
+#include <list>
+#include <functional>
+#include <memory>
+
+#include "TestTools/expect.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
+#include "AthenaMonitoring/MonitoredScalar.h"
+
+using namespace std;
+using namespace Monitored;
+
+#define REGISTER_TEST_CASE(TEST_CASE_NAME) registerTestCase(&MonitoredScalarTestSuite::TEST_CASE_NAME, #TEST_CASE_NAME)
+
+class MonitoredScalarTestSuite {
+  // ==================== All registered test cases ====================
+  private:
+    list<function<void(void)>> registeredTestCases() {
+      return {
+        REGISTER_TEST_CASE(test_shouldDeduceValueTypeAndReturnOriginalValue),
+        REGISTER_TEST_CASE(test_shouldAcceptExplicitValueTypeAndReturnOriginalValue),
+        REGISTER_TEST_CASE(test_shouldAcceptCustomTypeAndReturnOriginalValue),
+        REGISTER_TEST_CASE(test_shouldAllowToProvideRepresentationConverter),
+        REGISTER_TEST_CASE(test_shouldAllowToChangeUnderlayingValue),
+        REGISTER_TEST_CASE(test_shouldReturnSingleElementVectorRepresentation),
+      };
+    }
+
+  // ==================== Test code ====================
+  private:
+    void beforeEach() { }
+
+    void afterEach() { }
+
+    void test_shouldDeduceValueTypeAndReturnOriginalValue() { 
+      auto phi = Monitored::Scalar("phi", 4.123456789012345); 
+
+      assert(phi == 4.123456789012345);
+    }
+
+    void test_shouldAcceptExplicitValueTypeAndReturnOriginalValue() { 
+      auto phi = Monitored::Scalar<float>("phi", 4.1234567f); 
+
+      assert(phi == 4.1234567f);
+    }
+
+    void test_shouldAcceptCustomTypeAndReturnOriginalValue() { 
+      auto phi = Monitored::Scalar("phi", TestValue(4.123456789012345)); 
+
+      assert(TestValue(4.123456789012345) == phi);
+    }
+
+    void test_shouldAllowToProvideRepresentationConverter() { 
+      auto phi = Monitored::Scalar<double>("phi", 4.123456789012345, [](double value) { return value * 1000; }); 
+      std::vector<double> representation = phi.getVectorRepresentation();
+
+      assert(phi == 4.123456789012345);
+      assert(representation[0] == 4123.456789012345);
+    }
+
+    void test_shouldAllowToChangeUnderlayingValue() { 
+      auto phi = Monitored::Scalar("phi", 4.2); 
+
+      phi = 5.5;
+
+      assert(phi == 5.5);
+    }
+
+    void test_shouldReturnSingleElementVectorRepresentation() { 
+      auto phi = Monitored::Scalar("phi", 4.2); 
+      std::vector<double> representation = phi.getVectorRepresentation();
+
+      assert(size(representation) == 1);
+      assert(representation[0] == 4.2);
+    }
+
+  // ==================== Helper methods ====================
+  private:
+    class TestValue {
+    public:
+      TestValue(double value) : m_value(value) {}
+      operator double() const { return m_value; }
+      bool operator==(const TestValue &other) const { return m_value == other.m_value; }
+    private:
+      double m_value;
+    };
+
+  // ==================== Initialization & run ====================
+  public:
+    MonitoredScalarTestSuite() 
+      : m_log(Athena::getMessageSvc(), "MonitoredScalarTestSuite") { }
+
+    void run() {
+      for (function<void(void)> testCase : registeredTestCases()) {
+        testCase();
+      }
+    }
+
+  // ==================== Test case registration ====================
+  private:
+    typedef void (MonitoredScalarTestSuite::*TestCase)(void);
+
+    function<void(void)> registerTestCase(TestCase testCase, string testCaseName) {
+      return [this, testCase, testCaseName]() {
+        m_log << MSG::INFO << "Current test case: " << testCaseName << endmsg;
+        beforeEach();
+        invoke(testCase, this);
+        afterEach();
+      };
+    }
+
+  // ==================== Properties ====================
+  private:
+    MsgStream m_log;
+};
+
+int main() {
+  MonitoredScalarTestSuite().run();
+
+  return 0;
+}
-- 
GitLab


From 5bef5579ee830cfc0cc1eca2484125feea45a28d Mon Sep 17 00:00:00 2001
From: Fernando Monticelli <fernando.monticelli@cern.ch>
Date: Thu, 2 May 2019 12:49:30 +0000
Subject: [PATCH 059/129] Merge branch '22_FixCaloPrecisionHypoLoop' of
 https://gitlab.cern.ch:8443/fernando/athena into 22_FixCaloPrecisionHypoLoop

---
 .../src/TrigEgammaPrecisionCaloHypoAlgMT.cxx  | 34 ++++++++++++-------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionCaloHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionCaloHypoAlgMT.cxx
index 0b4e1bbe8b1c..2e1ceb10870a 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionCaloHypoAlgMT.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionCaloHypoAlgMT.cxx
@@ -68,20 +68,30 @@ StatusCode TrigEgammaPrecisionCaloHypoAlgMT::execute( const EventContext& contex
     auto clusterHandle = ViewHelper::makeHandle( *(viewELInfo.link), m_clustersKey, context);
     ATH_CHECK( clusterHandle.isValid() );
     ATH_MSG_DEBUG ( "Cluster handle size: " << clusterHandle->size() << "..." );
-    
-    auto d = newDecisionIn( decisions, name() );
-
-
-    toolInput.emplace_back( d, roi, clusterHandle.cptr()->at(0), previousDecision );
-
-    {
-      	 auto el = ViewHelper::makeLink( *(viewELInfo.link), clusterHandle, 0 );
-      	 ATH_CHECK( el.isValid() );
-      	 d->setObjectLink( "feature",  el );
+    // Loop over the clusterHandles
+    size_t validclusters=0;
+    for (size_t cl=0; cl< clusterHandle->size(); cl++){
+	{
+	    auto el = ViewHelper::makeLink( *(viewELInfo.link), clusterHandle, cl );
+	    ATH_MSG_DEBUG ( "Checking el.isValid()...");
+	    if( !el.isValid() ) {
+		ATH_MSG_DEBUG ( "ClusterHandle in position " << cl << " -> invalid ElemntLink!. Skipping...");
+	    }
+	    ATH_CHECK(el.isValid());
+
+	    ATH_MSG_DEBUG ( "ClusterHandle in position " << cl << " processing...");
+	    auto d = newDecisionIn( decisions, name() );
+	    d->setObjectLink( "feature",  el );
+	    TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter );
+	    d->setObjectLink( "roi", roiELInfo.link );
+	    toolInput.emplace_back( d, roi, clusterHandle.cptr()->at(cl), previousDecision );
+	    validclusters++;
+
+
+	}
     }
-    d->setObjectLink( "roi", roiELInfo.link );
+    ATH_MSG_DEBUG( "Clusters with valid links: " << validclusters );
     
-    TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter );
     ATH_MSG_DEBUG( "roi, cluster, previous decision to new decision " << counter << " for roi " );
     counter++;
 
-- 
GitLab


From 3cea07f823796a5895a70cb9438a7c2b4c7eaa9a Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Thu, 2 May 2019 12:53:13 +0000
Subject: [PATCH 060/129] added MET EDM to the config

---
 Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt    |  3 ++-
 .../TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx |  3 +++
 .../TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h   |  4 +++-
 .../TrigEDMConfig/python/TriggerEDMRun3.py             |  7 +++++++
 .../TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py  | 10 +++++++---
 5 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt
index 3d88e13fef4b..1bc57ba17a6d 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt
+++ b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt
@@ -21,6 +21,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Trigger/TrigDataAccess/TrigSerializeResult
                           Event/xAOD/xAODTrigMuon
                           Event/xAOD/xAODMuon
+			  Event/xAOD/xAODTrigMissingET
                           Trigger/TrigSteer/DecisionHandling
                           Control/AthenaMonitoring
                           Trigger/TrigMonitoring/TrigCostMonitorMT
@@ -37,7 +38,7 @@ atlas_add_library( TrigOutputHandlingLib
                    PUBLIC_HEADERS TrigOutputHandling
                    INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
                    LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES}  GaudiKernel AthViews AthenaBaseComps TrigSteeringEvent TrigSerializeResultLib
-                   xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon DecisionHandlingLib AthenaMonitoringLib TrigPartialEventBuildingLib TrigSerializeTPLib AthContainersRoot )
+                   xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon xAODTrigMissingET DecisionHandlingLib AthenaMonitoringLib TrigPartialEventBuildingLib TrigSerializeTPLib AthContainersRoot )
 
 atlas_add_component( TrigOutputHandling
                      src/components/*.cxx
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
index f8f69ccd1deb..e475f5eca3f5 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
@@ -52,12 +52,14 @@ StatusCode HLTEDMCreator::initialize()
   INIT_XAOD( TrigElectronContainer ); 
   INIT_XAOD( TrigPhotonContainer );
   INIT_XAOD( TrackParticleContainer );
+  INIT_XAOD( TrigMissingETContainer );
 
   INIT_XAOD( L2StandAloneMuonContainer );
   INIT_XAOD( L2CombinedMuonContainer );
   INIT_XAOD( L2IsoMuonContainer );
   INIT_XAOD( MuonContainer );
 
+
 #undef INIT
 #undef INIT_XAOD
 
@@ -265,6 +267,7 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
   CREATE_XAOD( TrigEMClusterContainer, TrigEMClusterAuxContainer )
   CREATE_XAOD( TrigCaloClusterContainer, TrigCaloClusterAuxContainer )
   CREATE_XAOD( TrackParticleContainer, TrackParticleAuxContainer )
+  CREATE_XAOD( TrigMissingETContainer, TrigMissingETAuxContainer )
 
   CREATE_XAOD( L2StandAloneMuonContainer, L2StandAloneMuonAuxContainer );
   CREATE_XAOD( L2CombinedMuonContainer, L2CombinedMuonAuxContainer );
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
index 703117b3c16e..53f1cfa7f882 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
@@ -30,6 +30,8 @@
 #include "xAODTrigCalo/TrigCaloClusterAuxContainer.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/TrackParticleAuxContainer.h"
+#include "xAODTrigMissingET/TrigMissingETContainer.h"
+#include "xAODTrigMissingET/TrigMissingETAuxContainer.h"
 
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h"
 #include "xAODTrigMuon/L2StandAloneMuonAuxContainer.h"
@@ -98,7 +100,7 @@ class HLTEDMCreator: public extends<AthAlgTool, IHLTOutputTool>  {
   DEF_XAOD_KEY( TrigElectronContainer );
   DEF_XAOD_KEY( TrigPhotonContainer );
   DEF_XAOD_KEY( TrackParticleContainer );
-
+  DEF_XAOD_KEY( TrigMissingETContainer );
   DEF_XAOD_KEY( L2StandAloneMuonContainer );
   DEF_XAOD_KEY( L2CombinedMuonContainer );
   DEF_XAOD_KEY( L2IsoMuonContainer );
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index 40722e734597..ca1276d52487 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -76,6 +76,13 @@ TriggerHLTList = [
     ('xAOD::TrackParticleAuxContainer#HLT_xAODTracks_MuonFSAux.',          'BS ESD AODFULL', 'Muon'),
 
 
+    # MET
+    ('xAOD::TrigMissingETContainer#HLT_MET',                               'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
+    ('xAOD::TrigMissingETAuxContainer#HLT_METAux.',                        'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
+    ('xAOD::TrigMissingETContainer#HLT_MET_mht',                           'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
+    ('xAOD::TrigMissingETAuxContainer#HLT_MET_mhtAux.',                    'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
+
+
     ('EventInfo#ByteStreamEventInfo',              'ESD', 'Misc'),
     ('ROIB::RoIBResult#*',                         'ESD', 'Misc'),
 ]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py
index 639648828908..feb4f914f391 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py
@@ -3,7 +3,7 @@
 #
 from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
 from AthenaCommon.CFElements import seqAND 
-
+from TrigEDMConfig.TriggerEDMRun3 import recordable
 
 def metCellAthSequence(ConfigFlags):
     from TrigT2CaloCommon.CaloDef import clusterFSInputMaker
@@ -27,7 +27,8 @@ def metCellRecoSequence():
     metAlg = EFMissingETAlgMT( name="EFMET" )
     helperTool = EFMissingETFromHelperMT("theHelperTool")
     flagsTool = EFMissingETFlagsMT("theFlagsTool")
-    metAlg.METContainerKey = "HLT_MET"
+    metAlg.METContainerKey = recordable("HLT_MET")
+
     
     #///////////////////////////////////////////
     # Setup monitoring for EFMissingETAlg
@@ -90,6 +91,8 @@ def metClusterRecoSequence():
     metAlg = EFMissingETAlgMT( name="EFMET" )
     helperTool = EFMissingETFromHelperMT("theHelperTool")
     metAlg.METContainerKey = "HLT_MET"
+    metAlg.METContainerKey = recordable("HLT_MET")
+
     
         #///////////////////////////////////////////
         # Setup monitoring for EFMissingETAlg
@@ -149,7 +152,8 @@ def metJetRecoSequence(RoIs = 'FSJetRoI'):
     from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromHelperMT
     metAlg = EFMissingETAlgMT( name="EFMET" )
     helperTool = EFMissingETFromHelperMT("theHelperTool")
-    metAlg.METContainerKey = "HLT_MET_mht"
+    metAlg.METContainerKey = recordable("HLT_MET_mht")
+
     
     #///////////////////////////////////////////
     # Setup monitoring for EFMissingETAlg
-- 
GitLab


From 9af08b8713d11f6d874294bbfa883917ddf863f2 Mon Sep 17 00:00:00 2001
From: John Derek Chapman <chapman@hep.phy.cam.ac.uk>
Date: Thu, 2 May 2019 12:55:49 +0000
Subject: [PATCH 061/129] Revert "Merge branch 'test.FastCaloSim-20190501' into
 'master'"

This reverts merge request !23097
---
 .../share/FastShowerCellBuilderTool_test.ref  | 164 +++++++++---------
 1 file changed, 81 insertions(+), 83 deletions(-)

diff --git a/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref b/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref
index f1219cf0371a..287f1ae08c5a 100644
--- a/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref
+++ b/Simulation/FastShower/FastCaloSim/share/FastShowerCellBuilderTool_test.ref
@@ -1,16 +1,15 @@
-Tue Apr 30 20:45:09 CEST 2019
-Preloading tcmalloc_minimal.so
+Thu Jan  3 00:21:53 EST 2019
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/bc8ffe286d7] -- built on [2019-04-30T1645]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "FastCaloSim/FastShowerCellBuilderTool_test.py"
-SetGeometryVersion.py obtained major release version 22
+SetGeometryVersion.py obtained major release version 21
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 5474 configurables from 49 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 4749 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  Athena-22.0.2
+EventInfoMgtInit: Got release version  sss-rel_0
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
 Py:Athena            INFO including file "TileConditions/TileConditions_jobOptions.py"
 Py:TileInfoConf.     INFO Adding TileCablingSvc to ServiceMgr
@@ -23,16 +22,15 @@ Py:TileInfoConf.     INFO Changing default TileCondToolNoiseSample configuration
 Py:TileInfoConf.     INFO Changing default TileCondToolTiming configuration to COOL source
 Py:TileConditions_jobOptions.py    INFO Adjusting TileInfo to return cell noise for Opt.Filter without iterations
 Py:Athena            INFO Importing MagFieldServices.SetupField
-Py:ConfiguredFactory    INFO imported 135 confDb modules in 1.71 seconds
-[ TrackingGeometrySvc ]     base material tag :  AtlasLayerMat_v21_
-[ TrackingGeometrySvc ]     translated to COOL:  /GLOBAL/TrackingGeo/LayerMaterialV2<tag>TagInfoMajor/AtlasLayerMat_v21_/GeoAtlas</tag>
-Py:ConfiguredFactory    INFO imported 135 confDb modules in 3.02 seconds
+Py:ConfiguredFactory    INFO imported 88 confDb modules in 0.02 seconds
 Py:Athena            INFO Importing MagFieldServices.MagFieldServicesConfig
 Py:FastCaloSimFactory::configure:    INFO now configure the non-interacting propagator...
 Py:FastCaloSimFactory::configure:    INFO configure nono-interacting propagator finished
 Py:FastCaloSimFactory::configure:    INFO now configure the TimedExtrapolator...
+[ TrackingGeometrySvc ]     base material tag :  AtlasLayerMat_v21_
+[ TrackingGeometrySvc ]     translated to COOL:  /GLOBAL/TrackingGeo/LayerMaterialV2<tag>TagInfoMajor/AtlasLayerMat_v21_/GeoAtlas</tag>
 Py:FastCaloSimFactory::configure:    INFO configure TimedExtrapolator finished
-Py:FastCaloSimFactory::configure:    INFO ParticleParametrizationFile=/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root
+Py:FastCaloSimFactory::configure:    INFO ParticleParametrizationFile=/home/sss/nobackup/atlas/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root
 Py:FastCaloSimFactory::configure:    INFO all values:
 /***** Private AlgTool FastShowerCellBuilderTool/tool1 *********************************************
 |-AdditionalParticleParametrizationFileNames = []  (default: [])
@@ -70,7 +68,7 @@ Py:FastCaloSimFactory::configure:    INFO all values:
 |-MuonEnergyInCaloContainerName              = 'StoreGateSvc+FatrasDepositedMuonEnergyInCalo'
 |-OutputLevel                                = 0
 |-PartPropSvc                                = ServiceHandle('PartPropSvc')
-|-ParticleParametrizationFileName            = '/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root'
+|-ParticleParametrizationFileName            = '/home/sss/nobackup/atlas/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root'
 |                                            (default: '')
 |-RandomService                              = ServiceHandle('AthRNGSvc')
 |-RandomStreamName                           = 'FastCaloSimRnd'
@@ -82,19 +80,21 @@ Py:FastCaloSimFactory::configure:    INFO all values:
 |-use_Ekin_for_depositions                   = False
 \----- (End of Private AlgTool FastShowerCellBuilderTool/tool1) ------------------------------------
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus715.cern.ch on Tue Apr 30 20:45:47 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Thu Jan  3 00:21:56 2019
 ====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 6961 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7301 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
@@ -102,21 +102,20 @@ AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version Athena
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus715.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /home/sss/atlas/rootaccess/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
-PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
-PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
-PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
+PoolSvc              INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml
+PoolSvc              INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolFileCatalog.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray([])
 IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
-IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-RUN12-SDR-35 set from joboptions
 IOVDbFolder          INFO Read from meta data only for folder /TagInfo
 IOVDbFolder          INFO Inputfile tag override disabled for /GLOBAL/BField/Maps
@@ -150,9 +149,9 @@ IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /TILE/OFL02/TIME/CHANNELOFFSET/PHY
 IOVDbSvc             INFO Added taginfo remove for /TILE/ONL01/STATUS/ADC
 IOVDbSvc             INFO Added taginfo remove for /LAR/LArCellPositionShift
-ClassIDSvc           INFO  getRegistryEntries: read 2042 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1699 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 17 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 95 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9 CLIDRegistry entries for module ALL
 DetDescrCnvSvc       INFO  initializing 
 DetDescrCnvSvc       INFO Found DetectorStore service
 DetDescrCnvSvc       INFO  filling proxies for detector managers 
@@ -205,7 +204,7 @@ BarrelConstruction   INFO   Use sagging in geometry  ? 0
   multi-layered version of absorbers activated, mlabs == 1
 ================================================
 EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
-ClassIDSvc           INFO  getRegistryEntries: read 2394 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2380 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileTBID helper object in the detector store
 IdDictDetDescrCnv    INFO in initialize
 IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
@@ -244,7 +243,7 @@ TileDddbManager      INFO n_tileSwitches = 1
 ClassIDSvc           INFO  getRegistryEntries: read 213 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /home/sss/atlas/rootaccess/build/share/TileNeighbour_reduced.txt
 TileHWIDDetDesc...   INFO in createObj: creating a TileHWID helper object in the detector store
 TileHWID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -256,15 +255,15 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsPrev-April2011.txt
 CaloIDHelper_ID...   INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 LArMiniFCAL_ID       INFO  initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID.
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 TileDetDescrMan...   INFO Entering create_elements()
-ClassIDSvc           INFO  getRegistryEntries: read 66 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
 TileInfoLoader       INFO Initializing....TileInfoLoader
 TileInfoLoader       INFO New ATLAS geometry detected: ATLAS-R2-2016-01-00-01 (010001) version 10001
 TileInfoLoader       INFO Changing TTL1 calib from 4.1 to 6.9
@@ -285,11 +284,11 @@ TileInfoLoader       INFO Sampling fraction for E2 cells 1/107
 TileInfoLoader       INFO Sampling fraction for E3 cells 1/97
 TileInfoLoader       INFO Sampling fraction for E4 cells 1/75
 TileInfoLoader       INFO Sampling fraction for E4' cells 1/75
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulsehi_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulselo_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulse_adder_tower_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulse_adder_muonRcv_physics.dat
-TileInfoLoader       INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/pulse_adder_muon_physics.dat
+TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulsehi_physics.dat
+TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulselo_physics.dat
+TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulse_adder_tower_physics.dat
+TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulse_adder_muonRcv_physics.dat
+TileInfoLoader       INFO Reading file  /home/sss/atlas/rootaccess/build/share/pulse_adder_muon_physics.dat
 CaloIDHelper_ID...   INFO in createObj: creating a CaloLVL1_ID helper object in the detector store
 CaloLVL1_ID          INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -346,11 +345,11 @@ TileSampleNoise...   INFO Creating TileCondProxyCool(TileSampleNoiseCondAlg.Tile
 TileTimingCondA...   INFO Creating TileCondProxyCool(TileTimingCondAlg.TileCondProxyCool_AdcOffset) for folder: "/TILE/OFL02/TIME/CHANNELOFFSET/PHY"
 PyComponentMgr       INFO Initializing PyComponentMgr...
 testalg1             INFO Initializing testalg1...
-ClassIDSvc           INFO  getRegistryEntries: read 2009 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 5013 CLIDRegistry entries for module ALL
 ToolSvc.tool1        INFO Initialisating started
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 161 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -364,22 +363,21 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_SuperCell_ID helper ob
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
 CaloIDHelper_ID...   INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-29T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /home/sss/atlas/rootaccess/build/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
 PartPropSvc          INFO No table format type specified for "PDGTABLE.MeV". Assuming PDG
- --------------- HepPDT Version 2.06.01 --------------- 
 found 298 particles
 AthRNGSvc            INFO Creating engine ToolSvc.tool1/FastCaloSimRnd
 AtlasFieldSvc        INFO initialize() ...
 AtlasFieldSvc        INFO maps will be chosen reading COOL folder /GLOBAL/BField/Maps
-ClassIDSvc           INFO  getRegistryEntries: read 1088 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1128 CLIDRegistry entries for module ALL
 AtlasFieldSvc        INFO magnet currents will be read from COOL folder /EXT/DCS/MAGNETS/SENSORDATA
 AtlasFieldSvc        INFO Booked callback for /EXT/DCS/MAGNETS/SENSORDATA
 AtlasFieldSvc        INFO initialize() successful
@@ -412,7 +410,7 @@ ToolSvc.tool1        INFO Building all maps
 ToolSvc.tool1        INFO Building all maps finished : n(total)=187652 n(volume>0)=179842 n(used)=177540
 ToolSvc.tool1        INFO ========================= Init volume all maps =========================
 ToolSvc.tool1        INFO McCollection=TruthEvent
-ToolSvc.tool1        INFO ==== LoadParametrizations from file : /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root ====
+ToolSvc.tool1        INFO ==== LoadParametrizations from file : /home/sss/nobackup/atlas/ReleaseData/v20/FastCaloSim/v1/ParticleEnergyParametrization.root ====
 ToolSvc.tool1        INFO   LoadParametrizations : EnergyResults
 ToolSvc.tool1     WARNING Could fix some nan in input parametrization ParticleShape22_E200_eta236 (ParticleShape pdgid=22 E=200.0 eta=2.36): RMS(10,-1) is nan, fixed by removing correlation matrix, n=0 elements. 
 ToolSvc.tool1     WARNING Could fix some nan in input parametrization ParticleShape22_E200_eta264 (ParticleShape pdgid=22 E=200.0 eta=2.65): RMS(11,-2) is nan, fixed by removing correlation matrix, n=0 elements. 
@@ -439,10 +437,10 @@ ToolSvc.tool1        INFO      Shape  parametrization id=211 : 6637 parametrizat
 ToolSvc.tool1        INFO Invisible particles (n=1): (pdgid=0 -> Use TruthHelper class IsGenNonInteracting), 
 ToolSvc.tool1        INFO Reject ID truth particle vertices outside cylinder(s): [r=1070,z=800] [r=1030,z=3400] 
 ToolSvc.tool1        INFO Initialisating finished
-ClassIDSvc           INFO  getRegistryEntries: read 1013 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 991 CLIDRegistry entries for module ALL
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 80 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 77 CLIDRegistry entries for module ALL
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CES'
 CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/TILE/OFL02/CALIB/CIS/FIT/LIN'
@@ -470,8 +468,8 @@ IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LARAlign-IOVD
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
-Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
-RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
+Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root
+RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000057.gen.COND/cond09_mc.000057.gen.COND._0001.pool.root File version:52200
 AtlasFieldSvc        INFO reading magnetic field map filenames from COOL
 AtlasFieldSvc        INFO found map of type GlobalMap with soleCur=7730 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_7730_20400_14m.root)
 AtlasFieldSvc        INFO found map of type SolenoidMap with soleCur=7730 toroCur=0 (path file:MagneticFieldMaps/bfieldmap_7730_0_14m.root)
@@ -484,8 +482,8 @@ AtlasFieldSvc        INFO Trying to read from DCS: [channel name, index, value]
 AtlasFieldSvc        INFO Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20400
 AtlasFieldSvc        INFO Currents read from DCS: solenoid 7730 toroid 20400
 AtlasFieldSvc        INFO Initializing the field map (solenoidCurrent=7730 toroidCurrent=20400)
-AtlasFieldSvc        INFO reading the map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO reading the map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO Initialized the field map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
 ToolSvc.Trackin...   INFO initialize()
 ToolSvc.Trackin...   INFO initialize() 
 ToolSvc.LayerAr...   INFO initialize()
@@ -526,11 +524,11 @@ ToolSvc.CaloTra...   INFO 2 volumes retrieved from TileVolumeBuilder
 ToolSvc.CaloTra...   INFO --------------- detailed output ---------------------------------------------------------- 
 LayerMaterialMa...   INFO LayerMaterialMapCnv::initialize()
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 2B8BB54A-2F81-7B49-8484-60F83666998E
-Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root
-RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root File version:60416
+Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root
+RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000126.gen.COND/cond09_mc.000126.gen.COND._0001.pool.root File version:60416
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
-Domain[ROOT_All]     INFO                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
-RootDatabase.open    INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
+Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
+RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_TILE/OFLP200
 IOVDbFolder          INFO HVS tag OFLCOND-RUN12-SDR-35 resolved to TileOfl02CalibCes-SIM-06 for folder /TILE/OFL02/CALIB/CES
@@ -553,7 +551,7 @@ TileBadChannels...   INFO TileBchStatus::isNoisy() is defined by: Large HF noise
 TileBadChannels...   INFO TileBchStatus::isNoGainL1() is defined by: ADC dead; No PMT connected; No HV; Channel masked for LV1 (unspecified); LV1 channel no gain; LV1 channel noisy; Channel disabled for LV1; 
 TileBadChannels...   INFO TileBchStatus::isBadTiming() is defined by: Bad timing; Online bad timing; 
 TileBadChannels...   INFO No drawer trips probabilities found in DB
-ClassIDSvc           INFO  getRegistryEntries: read 1275 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1104 CLIDRegistry entries for module ALL
 AthRNGSvc         SUCCESS ToolSvc.tool1/FastCaloSimRnd 3630501711 90 3261692434 1073680638 823030377 1073723668 1868930291 1073677174 911996003 1073290479 3711715511 1072694548 2140068716 1072735951 539460630 1073178241 2282305494 1072708986 1641530683 1073202302 2631242835 1073321911 3961765294 1073467950 2626127931 1073272628 2396189536 1073590622 2374465580 1073564482 3416006862 1072800960 1352814095 1073333945 1932808853 1073111336 2004821113 1072722654 164197198 1072846416 751909680 1073721900 808721476 1073468761 690859097 1073483009 418699027 1073306662 1789296916 1073624469 2971093188 1072984953 2555298921 1072770453 3853840956 1073055738 3487439144 1073639698 1894545311 1072884286 626513571 1073631692 3421835136 1073307636 3985124064 1073729249 2607246495 1073094204 4090506844 1073695039 2410441688 1073487241 1069374412 1073423736 1760407317 1072765560 2827875924 1072827462 4146416168 1073037450 3197924302 1073718189 3551167333 1073676036 4115234429 1073230966 98903944 1073088578 4282482954 1073314928 2143692400 1073136393 3296550475 1072843872 3558803953 1073270281 3103842852 1073235469 1882909869 1073459859 916240561 1073339674 536539632 1073614296 1409495660 1073448151 358001842 1073483642 739667300 1073521338 3746187847 1072960505 2594847495 1073654670 3231825006 1073250176 3554125300 1073441586 889397564 1073010193 3102313462 1073424387 912563430 1073190059 2833054885 1073176909 2869107047 1073201355 4064975915 1073425934 3842344805 1073237417 2249570334 1073294265 933655068 1073661856 2823826967 1072983053 3187935985 1073666738 2012177277 1073511885 3705303978 1073354273 2263991526 1072860629 714897335 1073409664 3791090286 1072885706 3668090129 1072928433 4177473366 1073400077 4103000642 1072762422 1446170605 1072828225 2626904048 1073096349 787048638 1073597594 911588237 1072953144 271870086 1073290978 1047360370 1073346157 1872092527 1072822122 2841293698 1073002754 365773320 1073623173 3533126773 1073023548 1827082166 1073011537 769948162 1072741453 716869697 1073421964 950558058 1073688175 3654654741 1073077866 2148938756 1073636271 4042145415 1073729005 2295127568 1073051710 2538781685 1073500775 1382221002 1073134056 84184398 1072699157 1424487447 1073581512 419336873 1073657082 3569483343 1073003194 4070398286 1073300428 4070981007 1072944187 756286778 1073738055 2998212970 1073014133 462886270 1072731246 3544532359 1073371748 3720216818 1073530166 857383700 1073027294 2603143961 1073033720 3719393042 1073014678 3871031172 1073611172 3167825463 1073413837 3430927282 1073037455 2813514352 1073187562 1890932001 1072709290 3303417437 1073036901 1339564205 1073642312 2538448638 1073008042 1026462913 1073603981 1900392973 1072983365 4219218825 1073730572 729915534 1072743555 1592137825 1073699851 3580755983 1073180566 3646051161 1073621980 1888726728 1072884180 2759076898 1072988631 781657975 1072742798 539597383 1072933770 2862823903 1073461460 137639100 1073419163 1282995020 1073635629 2773321850 1073015233 864373926 1072783317 2945299790 1073564429 942801054 1073065933 469421843 1073736865 1205751158 1072817032 2557468817 1073741663 284681309 1073694428 3705796569 1073080815 2784424690 1073534939 87996075 1073165948 4251187390 1073694412 4133058395 1073171507 4148682519 1072914063 1438363651 1073586842 379154910 1072847866 1590169437 1072855295 3490089895 1073313887 2705421280 1073085513 1607354295 1072886471 2501280363 1073136524 1603739927 1072957178 1195334651 1072864186 3489732441 1073038891 1352657795 1072828769 19676344 1073018085 3103839646 1073314627 959564690 1073526279 1963499755 1073449889 250981548 1073668260 1777143703 1072842316 1134371421 1073057027 3860630533 1072887996 3065684433 1072813724 2169295742 1072773648 3514099379 1072862237 2637450043 1072749923 1458646333 1072947546 3991056209 1073352675 398024247 1073245696 456978228 1073685482 1275860529 1073446874 1104928121 1073349174 2709807511 1073414285 1001292837 1073391486 333779909 1072985692 3296251806 1073229593 4052332837 1073177524 3347382464 1072811729 1993826165 1072826950 2930738656 1072797162 3421648372 1073246843 159529425 1073067140 1822199323 1072821862 947562513 1072788222 2999108474 1073410975 3001267519 1073014979 2200426417 1072697229 3839301019 1073211197 653930178 1072821156 347931826 1073260473 3220160560 1072908029 2060537181 1073148903 1819201266 1072725052 752057633 1073712872 1284664544 1073018908 4061523052 1073715276 1678059209 1073120880 1563127687 1073397828 1073017791 1073448950 2160732782 1072736393 98102556 1073574247 2980862331 1073495372 10947338 1073388566 235712746 1073130536 1428538253 1073444911 1034331703 1073135276 1193514266 1073399517 2047530239 1073256035 1763468142 1073656778 95599117 1072831138 510292077 1073359403 2867275526 1073739478 1688604336 1073128745 1834286853 1073632701 1912869948 1073622452 2874594033 1073549554 2314352708 1073707463 1928987767 1073355679 156479999 1073107923 427377340 1073604020 3759005145 1073008275 2186399455 1073470828 27260339 1073631507 2972862105 1072875544 3306058547 1073674887 4243502 1073068761 4219093378 1072818031 2557302325 1073596249 296768555 1073125110 541062411 1073558141 8361674 1072788178 2747074052 1072706485 833875430 1072882109 2173602389 1072846141 1462039115 1073037234 1842330282 1073192077 1623547146 1072931134 718827894 1072939088 2939061236 1073584483 1164526291 1073138367 3530317869 1073444316 1933624563 1072996789 3306818729 1073206511 3465916374 1073208069 770688873 1073187945 1190230823 1072729827 2978207685 1073260241 1919240575 1072738920 4133661157 1073166622 3541555338 1073639985 3200451429 1073296053 2148722180 1073548242 2744498149 1073643883 1743594613 1073269305 3265447442 1073042739 3018353724 1073682837 1469213866 1073277068 4004154164 1073405891 1275293170 1072905879 4237407126 1073252636 808418950 1073598273 3352491937 1072753050 2120097613 1072889002 579900871 1073040505 3264609359 1073727315 741502134 1073187984 1392942119 1073154740 3769930099 1073043915 3825224772 1072940924 1112532450 1072821755 2547148240 1073167418 1931659309 1073124486 2849541086 1072819160 240941813 1072803712 3038640263 1073301050 963999170 1072908536 1707506099 1073606863 1877868468 1072821515 1065662759 1073287087 1700024633 1072995875 619690025 1073209278 2551852602 1072696157 2222723748 1072906116 1927104135 1073194953 2863380179 1073537077 2292713055 1072735008 2272466554 1073455406 2373215093 1073551764 3324063296 1073422970 2302478549 1073020979 1226262167 1073610915 3810494412 1072757930 3598016388 1072968968 3537807466 1072707226 1704779161 1073671798 3085424591 1073315979 585655719 1073193844 3060235115 1073091386 1863225538 1073616828 2550257447 1073138604 1041018708 1073698931 2550281390 1073091244 684679500 1073225758 1124361632 1072992252 3453512710 1072896846 2217085102 1073364366 2210679916 1072698927 313798325 1073055347 160295651 1073721031 2919317005 1073225837 2914657176 1073576644 3628120085 1073475641 1067340581 1073546013 340517196 1073724752 1127352683 1072769370 1492607570 1073392139 4135266509 1072867941 47699585 1072720565 2696229633 1072920700 4026883948 1073401517 1563530900 1073127246 2450531703 1073047787 3190069830 1073274034 654254270 1072925380 2415086862 1073508836 2610776490 1073236289 2122340525 1073009911 2785746802 1073338598 1350136126 1073311616 3970399521 1072852344 3106047532 1073554151 2582386806 1072695066 981697222 1072785304 3195759033 1073700288 2921106626 1073092172 183150695 1073252808 4099644845 1073456800 1288824535 1072940897 1563673146 1073411168 2496781743 1073338375 2962768285 1073223705 1576579287 1072922059 550057400 1073582928 2862331727 1073242743 2852012108 1072891435 2627580467 1073358635 3211577202 1073355904 3039848443 1073447954 3913185655 1073199284 2600647611 1073686940 827096734 1073585076 1554652000 1073406528 4165811413 1073244527 441484542 1072780555 2536639643 1073409915 2310341371 1073452160 114457467 1073379111 2815515709 1073106406 3442879574 1072805611 2247673049 1072875215 1461815981 1073341895 67919517 1073612505 4179474298 1072753058 2515614785 1073709826 124095440 1072847200 1645148762 1072916829 830435430 1073499794 3629871842 1073005476 2223287807 1073122271 3292803050 1072761672 3826188126 1073616228 3721761610 1073580536 3707133827 1073494701 1950134628 1072919780 1522092269 1073542864 1655081062 1073465610 811524494 1072839924 3516415211 1073710058 4222427839 2995058703 2624364569 3711061605 
 ToolSvc.tool1        INFO CaloEntrance not found 
 ToolSvc.tool1        INFO CaloEntrance not found 
@@ -563,12 +561,12 @@ ToolSvc.tool1        INFO CaloEntrance not found
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 TileInfoLoader       INFO Handling EndRun incident
 TileInfoLoader       INFO Removed TileInfo object from detector store.
-/cvmfs/atlas-co...   INFO Database being retired...
+/home/sss/atlas...   INFO Database being retired...
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
+/home/sss/atlas...   INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EACFEBD4-9BD2-E211-848A-02163E006B20
-/cvmfs/atlas-co...   INFO Database being retired...
+/home/sss/atlas...   INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 2B8BB54A-2F81-7B49-8484-60F83666998E
-/cvmfs/atlas-co...   INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
@@ -579,28 +577,28 @@ AtlasTrackingGe...   INFO finalize() successful.
 AtlasFieldSvc        INFO finalize() successful
 PyComponentMgr       INFO Finalizing PyComponentMgr...
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     1.01 ))s
-IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     1.00 ))s
-IOVDbFolder          INFO Folder /GLOBAL/TrackingGeo/LayerMaterialV2 (PoolRef) db-read 1/1 objs/chan/bytes 1/1/231 ((     0.27 ))s
-IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.68 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.86 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.64 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.64 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.54 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.59 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.63 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.70 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     1.00 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.88 ))s
-IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.98 ))s
-IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.05 ))s
-IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.44 ))s
-IOVDbSvc             INFO  bytes in ((     10.91 ))s
+IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     0.06 ))s
+IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.06 ))s
+IOVDbFolder          INFO Folder /GLOBAL/TrackingGeo/LayerMaterialV2 (PoolRef) db-read 1/1 objs/chan/bytes 1/1/231 ((     0.00 ))s
+IOVDbFolder          INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CES (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/103344 ((     0.06 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/CIS/FIT/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/80 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/EMS (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/92 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/FIBER (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/940 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/LIN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/72 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/CALIB/LAS/NLN (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/NOISE/SAMPLE (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/641476 ((     0.01 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/97884 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/OFL02/TIME/CHANNELOFFSET/PHY (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/96 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TILE/ONL01/STATUS/ADC (AttrListColl) db-read 1/1 objs/chan/bytes 277/277/76 ((     0.00 ))s
+IOVDbFolder          INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.00 ))s
+IOVDbSvc             INFO  bytes in ((      0.29 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.12 ))s
-IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     7.52 ))s
-IOVDbSvc             INFO Connection COOLOFL_GLOBAL/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     1.27 ))s
-IOVDbSvc             INFO Connection COOLOFL_DCS/OFLP200 : nConnect: 2 nFolders: 1 ReadTime: ((     1.01 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.06 ))s
+IOVDbSvc             INFO Connection COOLOFL_TILE/OFLP200 : nConnect: 2 nFolders: 11 ReadTime: ((     0.10 ))s
+IOVDbSvc             INFO Connection COOLOFL_GLOBAL/OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.06 ))s
+IOVDbSvc             INFO Connection COOLOFL_DCS/OFLP200 : nConnect: 2 nFolders: 1 ReadTime: ((     0.06 ))s
 TileInfoLoader       INFO TileInfoLoader::finalize()
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
@@ -621,9 +619,9 @@ ToolSvc.Trackin...   INFO finalize() successful
 *****Chrono*****     INFO ****************************************************************************************************
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
-cObjR_ALL            INFO Time User   : Tot= 1.52  [s] Ave/Min/Max=0.507(+-0.688)/ 0.01/ 1.48  [s] #=  3
-cObj_ALL             INFO Time User   : Tot= 1.58  [s] Ave/Min/Max=0.0929(+-0.352)/    0/  1.5  [s] #= 17
-ChronoStatSvc        INFO Time User   : Tot= 50.7  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot=  240 [ms] Ave/Min/Max=   80(+- 86.4)/    0/  200 [ms] #=  3
+cObj_ALL             INFO Time User   : Tot=  320 [ms] Ave/Min/Max= 18.8(+- 52.9)/    0/  220 [ms] #= 17
+ChronoStatSvc        INFO Time User   : Tot= 29.4  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
-- 
GitLab


From 77a6e01a24d29cfb695423308bb6f826705d790f Mon Sep 17 00:00:00 2001
From: Joao Victor Da Fonseca Pinto <joao.victor.da.fonseca.pinto@cern.ch>
Date: Thu, 2 May 2019 12:58:07 +0000
Subject: [PATCH 062/129] Add ringer feature extraction into the fast calo
 reconstruction trigger step

---
 .../TrigT2CaloCommon/Calo_Def.h               |   0
 .../TrigT2CaloCommon/IAlgToolCalo.h           |   0
 .../TrigT2CaloCommon/IReAlgToolCalo.h         |   4 +-
 .../TrigT2CaloCommon/IT2GeometryTool.h        |   0
 .../TrigT2CaloCommon/ITrigCaloDataAccessSvc.h |   0
 .../TrigT2CaloCommon/ITrigDataAccess.h        |   0
 .../TrigT2CaloCommon/LArRodIdHash.h           |   0
 .../TrigT2CaloCommon/T2Calibration.h          |   0
 .../TrigT2CaloCommon/T2CaloBase.h             |   0
 .../TrigT2CaloCommon/T2CaloConfig.h           |   0
 .../TrigT2CaloCommon/T2GeometryTool.h         |   0
 .../TrigT2CaloCommon/python/CaloDef.py        |  12 +-
 .../TrigT2CaloCommon/src/IAlgToolCalo.cxx     |   0
 .../TrigT2CaloCommon/src/IReAlgToolCalo.cxx   |   0
 .../TrigT2CaloCommon/src/T2Calibration.cxx    |   0
 .../TrigT2CaloCommon/src/T2CaloBase.cxx       |   0
 .../TrigT2CaloCommon/src/T2GeometryTool.cxx   |   0
 .../TrigT2CaloCommon/src/TrigDataAccess.cxx   |   0
 .../TrigT2CaloCommon/src/TrigDataAccess.h     |   0
 .../src/TrigDataAccessATLFAST.cxx             |   0
 .../src/TrigDataAccessATLFAST.h               |   0
 .../python/TrigT2CaloEgammaConfig.py          |  95 +--
 .../python/TrigT2CaloEgammaMTConfig.py        |  42 +-
 .../python/TrigT2CaloEgammaMonitoring.py      |   0
 .../TrigT2CaloEgamma/python/__init__.py       |   0
 .../{ => src}/ATLAS_CHECK_THREAD_SAFETY       |   0
 .../TrigT2CaloEgamma/src/EgammaAllFex.cxx     | 170 +++---
 .../TrigT2CaloEgamma/src/EgammaAllFex.h       |   0
 .../TrigT2CaloEgamma/src/EgammaEmEnFex.h      |   0
 .../TrigT2CaloEgamma/src/EgammaHadEnFex.h     |   0
 .../TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx  |  23 +-
 .../TrigT2CaloEgamma/src/EgammaReEmEnFex.h    |   0
 .../TrigT2CaloEgamma/src/EgammaReHadEnFex.h   |   0
 .../TrigT2CaloEgamma/src/EgammaReSamp1Fex.h   |   0
 .../TrigT2CaloEgamma/src/EgammaReSamp2Fex.h   |   0
 .../TrigT2CaloEgamma/src/EgammaSamp1Fex.h     |   0
 .../TrigT2CaloEgamma/src/EgammaSamp2Fex.h     |   0
 .../TrigT2CaloEgamma/src/PhiComps.h           |  37 ++
 .../TrigT2CaloEgamma/src/RingerFex.h          |   0
 .../TrigT2CaloEgamma/src/RingerReFex.cxx      | 555 ++++++++++++++++++
 .../TrigT2CaloEgamma/src/RingerReFex.h        | 127 ++++
 .../src/T2CalibrationEgamma.h                 |   0
 .../TrigT2CaloEgamma/src/T2CaloEgamma.h       |   0
 .../src/T2CaloEgammaReFastAlgo.cxx            |   1 +
 .../src/T2CaloEgammaReFastAlgo.h              |  75 ++-
 .../components/TrigT2CaloEgamma_entries.cxx   |   2 +
 .../TrigUpgradeTest/CMakeLists.txt            |   3 +
 .../TrigUpgradeTest/share/CaloRinger.py       |  51 ++
 .../TrigUpgradeTest/share/egammaRinger.py     |  92 +++
 .../test/test_calo_ringer_only_data.sh        |   7 +
 .../TrigUpgradeTest/test/test_ringer_chain.sh |   5 +
 51 files changed, 1111 insertions(+), 190 deletions(-)
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/Calo_Def.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IReAlgToolCalo.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IT2GeometryTool.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigDataAccess.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArRodIdHash.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2Calibration.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloConfig.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2GeometryTool.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IReAlgToolCalo.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2Calibration.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2GeometryTool.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMonitoring.py
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/__init__.py
 rename Trigger/TrigAlgorithms/TrigT2CaloEgamma/{ => src}/ATLAS_CHECK_THREAD_SAFETY (100%)
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h
 create mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/PhiComps.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h
 create mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
 create mode 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CalibrationEgamma.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h
 mode change 100755 => 100644 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
 create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
 create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/Calo_Def.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/Calo_Def.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IReAlgToolCalo.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IReAlgToolCalo.h
old mode 100755
new mode 100644
index 844ee8755479..140db636653b
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IReAlgToolCalo.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IReAlgToolCalo.h
@@ -34,6 +34,8 @@
 #include "TrigT2CaloCommon/T2GeometryTool.h"
 #include "xAODTrigCalo/TrigEMCluster.h"
 
+#include <memory>
+
 /** Base Class for Tools used for Egamma and Tau Feature Extraction Algorithms */
 class IReAlgToolCalo : public AthAlgTool {
 public:
@@ -64,7 +66,7 @@ protected:
 
   /** Objects will need T2Calibration. So far, a given tool will
   not need more than one of such objects. */
-  T2Calibration* m_calib{nullptr};
+  std::unique_ptr<T2Calibration> m_calib;
 
   /** Input objects to calibration. This will be changed in such
   a way the the calibration tool will have to know alone about
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IT2GeometryTool.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IT2GeometryTool.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigDataAccess.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigDataAccess.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArRodIdHash.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArRodIdHash.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2Calibration.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2Calibration.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloBase.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloConfig.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2CaloConfig.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2GeometryTool.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/T2GeometryTool.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
index 9f8326e4811b..c6b2a187b156 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
@@ -41,10 +41,10 @@ def _algoHLTTopoClusterLC(inputEDM="CellsClusters", OutputLevel=ERROR) :
    algo.OutputLevel=OutputLevel
    return algo
 
-def _algoL2Egamma(inputEDM="EMRoIs",OutputLevel=ERROR):
+def _algoL2Egamma(inputEDM="EMRoIs",OutputLevel=ERROR,doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_L2CaloRinger"):
     setMinimalCaloSetup()
     from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_ReFastAlgo
-    algo=T2CaloEgamma_ReFastAlgo("FastCaloL2EgammaAlg")
+    algo=T2CaloEgamma_ReFastAlgo("FastCaloL2EgammaAlg", doRinger=doRinger, RingerKey=RingerKey)
     algo.RoIs=inputEDM
     from TrigEDMConfig.TriggerEDMRun3 import recordable
     algo.ClustersName=recordable("HLT_L2CaloEMClusters")
@@ -56,8 +56,8 @@ def _algoL2Egamma(inputEDM="EMRoIs",OutputLevel=ERROR):
 ##### SEQUENCES
 ####################################
 
-def fastCaloRecoSequence(InViewRoIs):
-    fastCaloAlg = _algoL2Egamma(inputEDM=InViewRoIs)
+def fastCaloRecoSequence(InViewRoIs, doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_L2CaloRinger"):
+    fastCaloAlg = _algoL2Egamma(inputEDM=InViewRoIs, doRinger=doRinger, ClustersName=ClustersName, RingerKey=RingerKey)
     fastCaloInViewSequence = seqAND( 'fastCaloInViewSequence', [fastCaloAlg] )
     sequenceOut = fastCaloAlg.ClustersName
     return (fastCaloInViewSequence, sequenceOut)
@@ -74,14 +74,14 @@ def fastCaloEVCreator():
     return (fastCaloViewsMaker, InViewRoIs)
 
 
-def createFastCaloSequence(EMRoIDecisions):
+def createFastCaloSequence(EMRoIDecisions, doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_L2CaloRinger"):
     """Used for standalone testing"""
     (fastCaloViewsMaker, InViewRoIs) = fastCaloEVCreator()
     # connect to RoIs
     fastCaloViewsMaker.InputMakerInputDecisions =  [ EMRoIDecisions ]         
     fastCaloViewsMaker.InputMakerOutputDecisions = [ EMRoIDecisions + "IMOUTPUT"]
 
-    (fastCaloInViewSequence, sequenceOut) = fastCaloRecoSequence(InViewRoIs)
+    (fastCaloInViewSequence, sequenceOut) = fastCaloRecoSequence(InViewRoIs, doRinger=doRinger, ClustersName=ClustersName, RingerKey=RingerKey)
      
     fastCaloSequence = seqAND("fastCaloSequence", [fastCaloViewsMaker, fastCaloInViewSequence ])
     return (fastCaloSequence, sequenceOut)
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IReAlgToolCalo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IReAlgToolCalo.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2Calibration.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2Calibration.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2CaloBase.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2GeometryTool.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/T2GeometryTool.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
old mode 100755
new mode 100644
index 1c3ebda4705b..014899401a46
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
@@ -10,6 +10,7 @@ from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReSamp1Fex
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReSamp2Fex
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReEmEnFex
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReHadEnFex
+from TrigT2CaloEgamma.TrigT2CaloEgammaConf import RingerReFex
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgamma
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaReFastAlgo
 
@@ -354,38 +355,49 @@ class RingerFexConfig( RingerFex ):
     self.NMaxCells = [320, 512, 272, 128, 128, 128, 128]
 
 
-class RingerFexEndCapConfig( RingerFex ):
+class RingerReFexConfig( RingerReFex ):
+  
   __slots__ = []
-  def __init__(self, name = "RingerFexEndCapConfig"):
-    super(RingerFexEndCapConfig, self).__init__(name)
-
-    self.HltFeature = "HLT_TrigT2CaloEgamma"
-    self.Feature = "TrigT2CaloEgamma"
-    self.EtaBins = [1.54, 2.5] # bin pairs: min < eta <= max
-    self.GlobalCenter = False
-    self.EtaSearchWindowSize = 0.1
-    self.PhiSearchWindowSize = 0.1
-    self.HistLabel = 'EndCap'
-
-    from TrigT2CaloEgamma.RingerConstants import Layer
-
-    # FIXME The EM1 from 1.8->2.5 granularity is 0.025/4=0.006250. However, from 1.57 to
-    # 1.8 it should be 0.025/6
-    # FIXME The HAD3 has segmentation of 0.1 x 0.1 from 1.8->2.5, whereas this is also not true from 1.57 to 1.8, being from 0.2 x 0.1
-    self.DEtaRings = [0.0, 0.006250, 0.025, 0.05, 0.1, 0.1, 0.1]
-    self.DPhiRings = [0.0,  0.098174770424681, 0.024543692606170, 0.024543692606170, 0.098174770424681, 0.098174770424681, 0.098174770424681]
-    self.NRings = [0, 32, 8, 8, 4, 4, 4]
-    self.LayersRings = [
-                        #Layer.PreSamplerB,Layer.PreSamplerE,
-                        Layer.EMB1,       Layer.EME1,
-                        Layer.EMB2,       Layer.EME2,
-                        Layer.EMB3,       Layer.EME3,
-                        Layer.HEC0,       Layer.TileBar0, Layer.TileGap2, Layer.TileExt0,
-                        Layer.HEC1,       Layer.HEC2,     Layer.TileBar1, Layer.TileGap0, Layer.TileExt1,
-                        Layer.HEC3,       Layer.TileBar2, Layer.TileGap1, Layer.TileExt2
-                        ]
-    self.NLayersRings = [0, 2, 2, 2, 4, 5, 4]
-    self.NMaxCells = [0, 272, 128, 128, 128, 128]
+  
+  def __init__(self, name = "RingerReMaker"):
+    super(RingerReFex, self).__init__(name)
+    self.EtaBins              = [0.0000, 999.999] # bin pairs: min < eta <= max, PS,barrel,crack,endcap
+    self.GlobalCenter         = False
+    self.RingerKey            = "L2CaloRings"
+    self.EtaSearchWindowSize  = 0.1
+    self.PhiSearchWindowSize  = 0.1
+    self.DEtaRings            = [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.1]
+    self.DPhiRings            = [0.098174770424681, 0.098174770424681, 0.024543692606170, 0.024543692606170, 
+                                 0.098174770424681, 0.098174770424681, 0.098174770424681]
+    self.NRings               = [8, 64, 8, 8, 4, 4, 4]
+    self.NLayersRings         = [2, 2, 2, 2, 4, 5, 4]
+    self.NMaxCells            = [320, 512, 272, 128, 128, 128, 128]
+    self.UseHad               = True
+    from RingerConstants import Layer
+    self.LayersRings          = [
+                                 Layer.PreSamplerB,Layer.PreSamplerE,
+                                 Layer.EMB1,       Layer.EME1,
+                                 Layer.EMB2,       Layer.EME2,
+                                 Layer.EMB3,       Layer.EME3,
+                                 Layer.HEC0,       Layer.TileBar0, Layer.TileGap2, Layer.TileExt0,
+                                 Layer.HEC1,       Layer.HEC2,     Layer.TileBar1, Layer.TileGap0, Layer.TileExt1,
+                                 Layer.HEC3,       Layer.TileBar2, Layer.TileGap1, Layer.TileExt2
+                                ]
+
+
+
+    from TriggerJobOpts.TriggerFlags import TriggerFlags
+    if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring():
+      from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool,defineHistogram
+      monTool = GenericMonitoringTool('MonTool')
+      monTool.Histograms +=[
+                              defineHistogram( "TIME_total", title="Total Time;time[ms]",xbins=50, xmin=0,
+                              xmax=5,type='TH1F', path='EXPERT'),
+                              defineHistogram( "TIME_load_cells", title="Load Cells Time;time[ms]",xbins=50, xmin=0,
+                              xmax=5,type='TH1F', path='EXPERT'),
+                   
+                              ]
+      self.MonTool = monTool
 
 
 class T2CaloEgamma_Ringer (T2CaloEgamma_eGamma):
@@ -400,7 +412,7 @@ class T2CaloEgamma_Ringer (T2CaloEgamma_eGamma):
 
 class T2CaloEgamma_ReFastAlgo (T2CaloEgammaReFastAlgo):
    __slots__ = []
-   def __init__ (self, name="T2CaloEgamma_ReFastAlgo"):
+   def __init__ (self, name="T2CaloEgamma_ReFastAlgo", ClustersName="HLT_L2CaloEMClusters", doRinger=False, RingerKey="HLT_L2CaloRinger"):
        super(T2CaloEgamma_ReFastAlgo, self).__init__(name)
        # here put your customizations
        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
@@ -418,10 +430,23 @@ class T2CaloEgamma_ReFastAlgo (T2CaloEgammaReFastAlgo):
        samph = EgammaReHadEnFexConfig("ReFaAlgoHadEnFexConfig",
                                       trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc,
                                       ExtraInputs=[( 'LArOnOffIdMapping' , 'ConditionStore+LArOnOffIdMap' )])
-       # temporary fix for Tile
-       samph.ExtraInputs += [('TileEMScale','ConditionStore+TileEMScale'),('TileBadChannels','ConditionStore+TileBadChannels')]
-
+       
+       samph.ExtraInputs=[('TileEMScale','ConditionStore+TileEMScale'),('TileBadChannels','ConditionStore+TileBadChannels')]
+       
        self.IReAlgToolList = [ samp2, samp1, sampe, samph ]
+       
+       if doRinger:
+         from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerReFexConfig
+         from AthenaCommon.Constants import DEBUG
+         ringer = RingerReFexConfig('ReFaAlgoRingerFexConfig')
+         #ringer.RingsKey= recordable("L2CaloRinger")
+         ringer.OutputLevel = DEBUG
+         ringer.RingerKey= RingerKey #"HLT_L2CaloRinger"
+         ringer.trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc
+         ringer.ClustersName = ClustersName
+         #ToolSvc+=ringer
+         self.IReAlgToolList+= [ringer]
+ 
 
        self.EtaWidth = 0.2
        self.PhiWidth = 0.2
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
index f5423ff19d4d..d79887d98b7a 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
@@ -6,7 +6,8 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from CaloTools.CaloLumiBCIDConfig import CaloLUMIBCIDToolCfg
 
 
-def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs"):
+def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False):
+
     acc = ComponentAccumulator()
     # configure calo data access
     from TrigT2CaloCommon.TrigCaloDataAccessConfig import trigCaloDataAccessSvcCfg
@@ -36,33 +37,44 @@ def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs"):
     samph.ExtraInputs=[('TileEMScale','ConditionStore+TileEMScale'),('TileBadChannels','ConditionStore+TileBadChannels')]
     acc.addPublicTool( samph )
 
-    #from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerFexConfig
-    #ring = RingerFexConfig('RingsMaker')
-    #ring.RingsKey='CaloRings'
-    #acc.addPublicTool( ring )
-
-    __fex_tools = [ samp2, samp1, sampe, samph] #, ring ]
-    for t in __fex_tools:
-        t.trigDataAccessMT = cdaSvc # set data access svc
-
-    
     alg = T2CaloEgammaReFastAlgo("FastEMCaloAlgo")
     from TrigEDMConfig.TriggerEDMRun3 import recordable
-
-    alg.IReAlgToolList = __fex_tools
     alg.ClustersName   = recordable('HLT_L2CaloEMClusters')
     alg.RoIs           = roisKey
     alg.EtaWidth       = 0.2
     alg.PhiWidth       = 0.2
 
+
+    __fex_tools = [ samp2, samp1, sampe, samph] #, ring ]
+   
+    from AthenaCommon.Constants import DEBUG
+    if doRinger:
+      from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerReFexConfig
+      ringer = RingerReFexConfig('FaAlgoRingerFexConfig')
+      ringer.OutputLevel=DEBUG
+      #ringer.RingsKey= recordable("L2CaloRinger")
+      ringer.RingerKey= "HLT_L2CaloRinger"
+      ringer.ClustersName = alg.ClustersName
+      acc.addPublicTool( ringer )
+      __fex_tools.append(ringer)
+ 
+    alg.IReAlgToolList = __fex_tools
+    
+    for t in __fex_tools:
+        t.trigDataAccessMT = cdaSvc # set data access svc
+        t.OutputLevel = DEBUG
+
+    
     # set calibration
-    from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationBarrelConfig, EgammaHitsCalibrationBarrelConfig, EgammaGapCalibrationConfig, EgammaTransitionRegionsConfig
+    from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationBarrelConfig, EgammaHitsCalibrationBarrelConfig, \
+                                                              EgammaGapCalibrationConfig, EgammaTransitionRegionsConfig
     alg.CalibListBarrel  = [EgammaSshapeCalibrationBarrelConfig()]
     alg.CalibListBarrel += [EgammaHitsCalibrationBarrelConfig()]
     alg.CalibListBarrel += [EgammaGapCalibrationConfig()]
     alg.CalibListBarrel += [EgammaTransitionRegionsConfig()]
 
-    from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationEndcapConfig, EgammaHitsCalibrationEndcapConfig, EgammaGapCalibrationConfig
+    from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaSshapeCalibrationEndcapConfig, EgammaHitsCalibrationEndcapConfig, \
+                                                              EgammaGapCalibrationConfig
     alg.CalibListEndcap  = [EgammaSshapeCalibrationEndcapConfig()]
     alg.CalibListEndcap += [EgammaHitsCalibrationEndcapConfig()]
     alg.CalibListEndcap += [EgammaGapCalibrationConfig()]
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMonitoring.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMonitoring.py
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/__init__.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/__init__.py
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Trigger/TrigAlgorithms/TrigT2CaloEgamma/ATLAS_CHECK_THREAD_SAFETY
rename to Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx
index ddc0c273b751..2309df4e5dfd 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.cxx
@@ -29,8 +29,8 @@ EgammaAllFex::EgammaAllFex(const std::string & type, const std::string & name,
 		   declareProperty("IncludeHad",  m_includeHad = false );
 #ifndef NDEBUG
 	// Create Geometry object
-        // 0 -> CaloType EM, 2 -> Second Layer
-//        m_geometry[0] = new T2Geometry(0,2);
+  // 0 -> CaloType EM, 2 -> Second Layer
+  // m_geometry[0] = new T2Geometry(0,2);
 #endif
 }
 
@@ -67,89 +67,89 @@ StatusCode EgammaAllFex::execute(xAOD::TrigEMCluster &rtrigEmCluster,
 
 	// Time to access RegionSelector
 
-     for(DETID dd = TTEM; dd <= TTHEC; dd=(DETID)( ((int)dd)+1) ){
-	for(int sampling=0;sampling<4;sampling++) {
-	// Get detector offline ID's for Collections
-	if (!m_timersvc.empty()) m_timer[1]->resume();
-	m_data->RegionSelector(sampling, roi, dd);
-
-	// Finished to access RegionSelector
-	if (!m_timersvc.empty()) m_timer[1]->pause();
-	// Time to access Collection (and ByteStreamCnv ROBs)
-	if (!m_timersvc.empty()) m_timer[2]->resume();
-	if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() ){
-		if (!m_timersvc.empty()) {
-		m_timer[3]->stop();      
-		m_timer[2]->stop();      
-		m_timer[1]->stop();      
-		m_timer[0]->stop();      
-		}
-		return StatusCode::SUCCESS;
-	}
-	m_error|=m_data->report_error();
-	if ( m_saveCells && !m_error ){
-	   m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr);
-        }
-	// Finished to access Collection
-	if (!m_timersvc.empty()) m_timer[2]->pause();      
-	// Algorithmic time
-	if (!m_timersvc.empty()) m_timer[3]->resume();
-
-  for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) {
-
-    const LArCell* larcell = (*m_it);
-    double energyCell = larcell->energy();
-    totalEnergy += energyCell;
-    if( dd==TTEM) totalEnergyEM += energyCell;
-    //samp = CaloSampling::getSampling(*larcell);
-    samp = larcell->caloDDE()->getSampling();
-    rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell);
-    rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell);
-    ncells++;
-
-  }  // end of loop over sampling
-  if (!m_timersvc.empty()) m_timer[3]->pause();
-  } // end of loop over all samples   
-  } // end of loop over DetID
-
-// TileCAL
-	if (!m_timersvc.empty()) m_timer[1]->resume();      
-        m_data->RegionSelector(0, roi, TILE);
-        // Finished to access RegionSelector
-        if (!m_timersvc.empty()) m_timer[1]->stop();
-
-        for (unsigned int iR=0;iR<m_data->TileContSize();iR++) {
-
-        // Time to access Collection (and ByteStreamCnv ROBs)
-        if (!m_timersvc.empty()) m_timer[2]->resume();
-        if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() ){
-
-                if (!m_timersvc.empty()) {
-			m_timer[3]->stop();
-			m_timer[2]->stop();
-			m_timer[0]->stop();
-		}
-                return StatusCode::SUCCESS;
-        }
-        m_error|=m_data->report_error();
-        // Finished to access Collection
-        if (!m_timersvc.empty()) m_timer[2]->pause();
-        // Algorithmic time
-        if (!m_timersvc.empty()) m_timer[3]->resume();
-
-  for(m_itt = m_itBegin;m_itt != m_itEnd; ++m_itt) {
-
-    const TileCell* tilecell = (*m_itt);
-    double energyCell = tilecell->energy();
-    totalEnergy += energyCell;
-    //samp = CaloSampling::getSampling(*tilecell);
-    samp = tilecell->caloDDE()->getSampling();
-    rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell);
-    rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell);
-    ncells++;
-
-  }  // end of loop over sampling
-  if (!m_timersvc.empty()) m_timer[3]->pause();
+  for(DETID dd = TTEM; dd <= TTHEC; dd=(DETID)( ((int)dd)+1) ){
+	  for(int sampling=0;sampling<4;sampling++) {
+	    // Get detector offline ID's for Collections
+	    if (!m_timersvc.empty()) m_timer[1]->resume();
+	    m_data->RegionSelector(sampling, roi, dd);
+
+	    // Finished to access RegionSelector
+	    if (!m_timersvc.empty()) m_timer[1]->pause();
+	    // Time to access Collection (and ByteStreamCnv ROBs)
+	    if (!m_timersvc.empty()) m_timer[2]->resume();
+	    if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() ){
+	    	if (!m_timersvc.empty()) {
+	    	m_timer[3]->stop();      
+	    	m_timer[2]->stop();      
+	    	m_timer[1]->stop();      
+	    	m_timer[0]->stop();      
+	    	}
+	    	return StatusCode::SUCCESS;
+	    }
+	    m_error|=m_data->report_error();
+	    if ( m_saveCells && !m_error ){
+	       m_data->storeCells(m_iBegin,m_iEnd,*m_CaloCellContPoint,m_cellkeepthr);
+            }
+	    // Finished to access Collection
+	    if (!m_timersvc.empty()) m_timer[2]->pause();      
+	    // Algorithmic time
+	    if (!m_timersvc.empty()) m_timer[3]->resume();
+
+      for(m_it = m_iBegin;m_it != m_iEnd; ++m_it) {
+
+        const LArCell* larcell = (*m_it);
+        double energyCell = larcell->energy();
+        totalEnergy += energyCell;
+        if( dd==TTEM) totalEnergyEM += energyCell;
+        //samp = CaloSampling::getSampling(*larcell);
+        samp = larcell->caloDDE()->getSampling();
+        rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell);
+        rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell);
+        ncells++;
+
+      }  // end of loop over sampling
+      if (!m_timersvc.empty()) m_timer[3]->pause();
+      } // end of loop over all samples   
+    } // end of loop over DetID
+
+    // TileCAL
+	  if (!m_timersvc.empty()) m_timer[1]->resume();      
+          m_data->RegionSelector(0, roi, TILE);
+          // Finished to access RegionSelector
+          if (!m_timersvc.empty()) m_timer[1]->stop();
+
+          for (unsigned int iR=0;iR<m_data->TileContSize();iR++) {
+
+          // Time to access Collection (and ByteStreamCnv ROBs)
+          if (!m_timersvc.empty()) m_timer[2]->resume();
+          if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() ){
+
+                  if (!m_timersvc.empty()) {
+	  		m_timer[3]->stop();
+	  		m_timer[2]->stop();
+	  		m_timer[0]->stop();
+	  	}
+                  return StatusCode::SUCCESS;
+          }
+          m_error|=m_data->report_error();
+          // Finished to access Collection
+          if (!m_timersvc.empty()) m_timer[2]->pause();
+          // Algorithmic time
+          if (!m_timersvc.empty()) m_timer[3]->resume();
+
+    for(m_itt = m_itBegin;m_itt != m_itEnd; ++m_itt) {
+
+      const TileCell* tilecell = (*m_itt);
+      double energyCell = tilecell->energy();
+      totalEnergy += energyCell;
+      //samp = CaloSampling::getSampling(*tilecell);
+      samp = tilecell->caloDDE()->getSampling();
+      rtrigEmCluster.setEnergy(samp,rtrigEmCluster.energy(samp) + energyCell);
+      rtrigEmCluster.setRawEnergy(samp,rtrigEmCluster.rawEnergy(samp) + energyCell);
+      ncells++;
+
+    }  // end of loop over sampling
+    if (!m_timersvc.empty()) m_timer[3]->pause();
   } // end of loop over Tile drawers
 
     
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaAllFex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaEmEnFex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaHadEnFex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
index 76d7cd841a52..280435f69d69 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
@@ -18,20 +18,23 @@
 #include "T2CalibrationEgamma.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
 
-EgammaReEmEnFex::EgammaReEmEnFex(const std::string& type, const std::string& name,
-                                 const IInterface* parent) :
-    IReAlgToolCalo(type, name, parent)
-{
-  declareProperty("QlCorrectionLimit", m_limit);
-  declareProperty("QlCorrectionDimension", m_dimension);
-  declareProperty("QlCorrection", m_correction);
-  // Calibration object
-  m_calib = new T2CalibrationEgamma();
+
+EgammaReEmEnFex::EgammaReEmEnFex(const std::string & type, const std::string & name, 
+                   const IInterface* parent): IReAlgToolCalo(type, name, parent)
+		   {
+  declareProperty( "QlCorrectionLimit",
+		    m_limit );
+  declareProperty( "QlCorrectionDimension",
+		    m_dimension );
+  declareProperty( "QlCorrection",
+		    m_correction );
+	// Calibration object
+  m_calib=std::make_unique<T2CalibrationEgamma>();
 }
 
+
 EgammaReEmEnFex::~EgammaReEmEnFex()
 {
-  delete m_calib;
 }
 
 StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp1Fex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaSamp2Fex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/PhiComps.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/PhiComps.h
new file mode 100644
index 000000000000..f274711ba5a2
--- /dev/null
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/PhiComps.h
@@ -0,0 +1,37 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef PHICOMPS_H
+#define PHICOMPS_H
+
+
+#include <cmath> // for M_PI
+
+namespace Ringer{
+  /**
+   * Helper function to identify wrap around cases.
+   * if reverse_wrap = true, then we check for reverse wrap_arround.
+   */
+  inline bool check_wrap_around(const double phi_center, const bool reverse_wrap) {
+    if (reverse_wrap) return (phi_center < (1.0 - M_PI)); // 1.0 is the PI_THRESHOLD
+    else return (phi_center > (M_PI - 1.0));
+  }
+  
+  /**
+   * Helper function to fix wrap around cases.
+   * if reverse_wrap = true, then we fix reverse wrap_arround cases.
+   */
+  inline double fix_wrap_around(const double phi_value, const bool reverse_wrap) {
+    if (reverse_wrap) {
+      if (phi_value > 0.)  return (phi_value - 2*M_PI);
+    } else {
+      if (phi_value < 0.) return (phi_value + 2*M_PI);
+    }
+    return phi_value;
+  }
+
+}
+
+#endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerFex.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
new file mode 100644
index 000000000000..7aefa42bbb41
--- /dev/null
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
@@ -0,0 +1,555 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+/*******************************************************
+ * Author: Denis Damazio
+ * Revision
+ *    Joao Victor Pinto, jodafons@cern.ch
+ *    werner freund,     wsfreund@cern.ch
+ *
+ * Implements the RingerFex.
+ *******************************************************/
+
+#include <vector>
+#include <map>
+#include <cmath>
+#include <numeric>
+#include "RingerReFex.h"
+#include "TrigTimeAlgs/TrigTimer.h"
+#include "xAODTrigCalo/TrigEMCluster.h"
+#include "xAODTrigRinger/TrigRingerRings.h"
+#include "xAODTrigCalo/TrigEMClusterContainer.h"
+#include "xAODTrigCalo/TrigEMClusterAuxContainer.h"
+#include "xAODTrigRinger/TrigRingerRings.h"
+#include "xAODTrigRinger/TrigRingerRingsContainer.h"
+#include "xAODTrigRinger/TrigRingerRingsAuxContainer.h"
+#include "TrigT2CaloCommon/IReAlgToolCalo.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+#include "AthenaMonitoring/Monitored.h"
+#include "PhiComps.h"
+using namespace Monitored;
+
+
+//!=================================================================================
+
+RingerReFex::RingerReFex(const std::string& type, const std::string& name, const IInterface* parent) 
+  : IReAlgToolCalo(type, name, parent)
+
+{}
+
+//!=================================================================================
+
+bool RingerReFex::configurationInvalid(){
+
+  if ((m_nRings.size() != m_dphiRings.size()) || (m_nRings.size() != m_detaRings.size()) || 
+      (m_nRings.size() != m_nlayersRings.size())) {
+    ATH_MSG_FATAL( "Wrong cnfiguration: Sizes of two properties do not match." );
+    return true;
+  }
+
+  if((m_etaBins.size() < 2) || (m_etaBins.size()%2 != 0)){
+    ATH_MSG_FATAL( "Wrong eta range configuration. Size must be equal or more than two." );
+    return true;
+  }
+  return false;
+}
+
+//!=================================================================================
+
+StatusCode RingerReFex::initialize() 
+{
+
+  if (IReAlgToolCalo::initialize().isFailure()) {
+    ATH_MSG_FATAL( "Could not initialize base tool IReAlgToolCalo." );
+    return StatusCode::FAILURE;
+  }
+  
+  if(configurationInvalid()){
+    return StatusCode::FAILURE;
+  }
+
+  ATH_CHECK( m_ringerContainerKey.initialize() );
+  ATH_CHECK( m_clusterContainerKey.initialize() );
+
+  m_maxRingsAccumulated = std::accumulate(m_nRings.begin(), m_nRings.end(), 0);
+
+  if (!m_monTool.empty()){
+    ATH_MSG_DEBUG("Retrieving monTool");
+    CHECK(m_monTool.retrieve());
+  }else{
+    ATH_MSG_INFO("No monTool configured. NO MONITORING");
+  }
+
+
+
+
+
+  ATH_MSG_DEBUG( "Ringer algorithm initialization completed successfully." );
+  ATH_MSG_DEBUG( "User parameters are:                                          " );
+  ATH_MSG_DEBUG( "Using Global Center               : " << m_global_center        );
+  ATH_MSG_DEBUG( "Using Hadronic cells              : " << m_useHad          );
+  ATH_MSG_DEBUG( "Search Window in Eta              : " << m_etaSearchWindowSize  );
+  ATH_MSG_DEBUG( "Search Window in Phi              : " << m_phiSearchWindowSize  );
+
+  return StatusCode::SUCCESS;
+}
+
+
+//!=================================================================================
+
+
+// Calculates the maximum energy cell in a CaloCell collection.
+inline void RingerReFex::maxCell ( const std::vector<const CaloCell*>& vcell, 
+			                double& eta, 
+                      double& phi, 
+                      const double eta_ref, 
+			                const double phi_ref, 
+                      const double eta_window, 
+			                const double phi_window) const 
+{
+  double current = -999e30;
+  const CaloCell* c = 0;
+  const CaloCell* cit = 0;
+  const double etamin = eta_ref - (0.5 * eta_window);
+  const double etamax = eta_ref + (0.5 * eta_window);
+  const double phimin = phi_ref - (0.5 * phi_window);
+  const double phimax = phi_ref + (0.5 * phi_window);
+
+  //are we, possibly at the wrap-around region for phi?
+  bool wrap = Ringer::check_wrap_around(phi_ref, false);
+  bool reverse_wrap = Ringer::check_wrap_around(phi_ref, true);
+
+  //get at least the first cell, in case of panic (all zeroes for instance)
+  for (std::vector<const CaloCell*>::const_iterator it = vcell.begin(); it != vcell.end(); ++it) {
+    if(!*it) continue;
+    cit = *it;
+    double this_eta = cit->eta();
+    double this_phi = cit->phi();
+    if (this_eta > etamin && this_eta < etamax){
+      double phi_use = this_phi; //use this value for phi (wrap protection)
+      if (wrap) phi_use = Ringer::fix_wrap_around(phi_use, false);
+      if (reverse_wrap) phi_use = Ringer::fix_wrap_around(phi_use, true);
+      if (phi_use > phimin && phi_use < phimax){
+        if (cit->energy() > current) {
+          c = cit;
+          current = cit->energy();
+        }
+      }
+    }
+  } // end of loop over cells
+  if (!c) {
+    eta = eta_ref;
+    phi = phi_ref;
+  }
+  else {
+    eta = c->eta();
+    phi = c->phi();
+  }
+}
+
+
+
+
+//!=================================================================================
+
+StatusCode RingerReFex::execute(xAOD::TrigEMCluster &rtrigEmCluster, 
+                              const IRoiDescriptor& roi, 
+                              const CaloDetDescrElement*& , 
+                              const EventContext& context) const
+{
+
+  
+  auto total_time = Monitored::Timer("TIME_total");
+  auto load_cells_time = Monitored::Timer("TIME_load_cells");
+  auto mon = Monitored::Group(m_monTool, total_time, load_cells_time);
+  
+  total_time.start();
+
+  double my_eta             = rtrigEmCluster.eta();
+  double my_phi             = rtrigEmCluster.phi();
+ 
+
+  // Check if the cluster is in the Eta region
+  bool accept=false; 
+  for(unsigned i=0; i<m_etaBins.size();i+=2){
+    if((abs(my_eta) > m_etaBins[i]) && (abs(my_eta) <= m_etaBins[i+1]))  accept=true;
+  }  
+  if(!accept)
+    return StatusCode::SUCCESS;
+
+  
+  
+  bool wrap                 = Ringer::check_wrap_around(rtrigEmCluster.phi(), false);
+  bool reverse_wrap         = Ringer::check_wrap_around(rtrigEmCluster.phi(), true);
+
+
+
+
+
+  // Use this vector to hold HEC and TILE cells for 
+  // the last three ring sets
+  std::vector<const CaloCell*> vecTemp_for_tile;
+ 
+
+  // Create all seven ring sets that will be used
+  // to build the ringer shape
+  std::vector<RingerReFex::RingSet> rset;
+  // Create all ring sets here.
+  unsigned int lc = 0; // layer count 
+  for (unsigned int i = 0; i < m_nRings.size(); ++i) {  
+    std::vector<CaloSampling::CaloSample> samples;
+    for (unsigned int j = lc; j < lc + m_nlayersRings[i]; ++j){
+      samples.push_back( static_cast<CaloSampling::CaloSample>(m_layersRings[j]) );
+    }
+    rset.push_back( RingerReFex::RingSet( m_nRings[i], m_maxCells[i], m_detaRings[i], m_dphiRings[i], samples ) );
+    lc += m_nlayersRings[i];
+  }
+
+
+
+  unsigned int rs = 0;
+  const CaloCell *it_tmp = nullptr;
+  // Getting LAr cells and populating RingSets
+  // Code has to be repetitve to make it really fast
+  // Fist loop will be: TTEM for PS, EM1, EM2 and EM3 for the first 
+  // four ringsets. After that we will loop over TTHEC. Four loops
+  // once again to fill the vec temp for tile. This cells will be
+  // distributed for your respective ring set in the end.
+  for (unsigned det = TTEM; det <= TTHEC; det++){
+    for (int sampling = 0; sampling < 4; ++sampling, rs++) {
+      
+      if(rs==7)  rs--;
+      
+      // This vector will hold all calo cells
+      std::vector<const CaloCell*> vecTemp;
+      vecTemp.reserve( rset.at(rs).maxCells() );
+
+      /** iterators to LArCells. To be used when online
+      LArCellCont (fast ByteStream Decoder) are to be used.
+      Used as input for TrigDataAccess::LoadCollections */
+      LArTT_Selector<LArCellCont> sel;
+      LArTT_Selector<LArCellCont>::const_iterator it, itBegin, itEnd;
+  
+      load_cells_time.start();
+
+      // If !(!(useHad==False) and det=!TTHEC) True
+      // If !(!(useHad==False) and det==TTHEC) False
+      // If !(!(useHad==True) and det==??) True
+      // If we dont use hadronic cells, we will skip the load collection
+      // and the ringg set will be empty. This will effect the ring set 4,5 and 6.
+      if( !(!m_useHad && det==TTHEC) ){
+      
+        if( m_dataSvc->loadCollections( context, roi, static_cast<DETID>(det), sampling, sel ).isFailure() )
+        {
+          ATH_MSG_ERROR( "Failure while trying to retrieve cell information for the "<< det <<" calorimeter." );
+          return StatusCode::FAILURE;
+        }
+
+      }
+
+      load_cells_time.stop();
+
+      itBegin = sel.begin();
+      itEnd   = sel.end();
+ 
+      if(rs < 4){ // For TTEM sampling (first 4 ring sets)
+
+        if(!m_global_center){
+          double current = -999e30;
+          double this_eta = 0.0;
+          double this_phi = 0.0;
+          const CaloCell* c = nullptr;
+          // Note that etamin (calculated above) is different from etamin (Region Selector)!
+          const double etamin = rtrigEmCluster.eta() - (0.5 * m_etaSearchWindowSize);
+          const double etamax = rtrigEmCluster.eta() + (0.5 * m_etaSearchWindowSize);
+          const double phimin = rtrigEmCluster.phi() - (0.5 * m_phiSearchWindowSize);
+          const double phimax = rtrigEmCluster.phi() + (0.5 * m_phiSearchWindowSize);         
+
+ 
+          // Loop over cells
+          for(it = itBegin; it != itEnd; ++it) 
+          {
+            if(!*it) continue;
+
+            // LAr object to CaloCell
+            it_tmp = static_cast<const CaloCell*>(*it);
+
+            if( !rset.at(rs).belongs( it_tmp ) ) continue;
+
+            vecTemp.push_back(it_tmp);
+            this_eta = it_tmp->eta();
+            this_phi = it_tmp->phi();
+            
+            
+            if ( this_eta >  etamin && this_eta < etamax ){
+              double phi_use = this_phi; //use this value for phi (wrap protection)
+              if (wrap) phi_use = Ringer::fix_wrap_around(phi_use, false);
+              if (reverse_wrap) phi_use = Ringer::fix_wrap_around(phi_use, true);
+              if ( phi_use > phimin && phi_use < phimax ){
+                if (it_tmp->energy() > current) {
+                  c = it_tmp;
+                  current = c->energy();
+                }
+              }
+            } 
+            
+          }
+
+          if (!c) {
+            my_eta = rtrigEmCluster.eta();
+            my_phi = rtrigEmCluster.phi();
+          }else {
+            my_eta = c->eta();
+            my_phi = c->phi();
+          }
+
+        }else{
+          for( it = itBegin; it != itEnd; ++it) {
+            // LAr object to CaloCell
+
+            if(!*it)  continue;
+            it_tmp = static_cast<const CaloCell *> (*it);
+
+            if( !rset.at(rs).belongs( it_tmp ) ) continue;
+            vecTemp.push_back(it_tmp);
+          }
+
+        }
+
+        // Skip if there is no cells to add
+        if ( !vecTemp.empty() )
+          rset.at(rs).push_back(vecTemp, my_eta, my_phi);
+      
+      } // end if rs < 4
+      else{ // rs = 4, 5, 6
+        // this part will hold the HEC calo sample
+        for(it = itBegin; it != itEnd; ++it) {
+          if(!*it) continue;
+          it_tmp = static_cast<const CaloCell *> (*it);
+          vecTemp_for_tile.push_back(it_tmp);
+        } // end of loop over cells
+      } // end if rs >= 4
+
+    } // end of loop over samplings
+  } // end of loop over detectors
+
+
+
+  const TileCell *itt_tmp = nullptr;
+  // Get all cells for the Tile calorimeter. After this loop we
+  // will have HEC and TILE samples inside of the vecTemp_for_Tile
+  //for (unsigned int iR=0;iR<m_dataSvc->TileContSize(); ++iR) 
+  if(m_useHad){   
+    /** iterators to TileCells. To be used when on/offline
+    TileCellCont/IDC (fast/slow ByteStream Decoder) are to be used.
+    Used as input for TrigDataAccess::LoadCollections */
+    TileCellCollection sel;
+    TileCellCollection::const_iterator itt, ittBegin, ittEnd;
+ 
+    load_cells_time.start();
+    if( m_dataSvc->loadCollections( context, roi, sel ).isFailure() ){
+      ATH_MSG_ERROR( "Error retrieving TileCalorimeter cells!" );
+      return StatusCode::FAILURE;
+    }
+    load_cells_time.stop();
+
+    ittBegin = sel.begin();
+    ittEnd = sel.end();
+    for(itt = ittBegin; itt != ittEnd; ++itt) 
+    {
+      if(!*itt)  continue;
+
+      itt_tmp = *itt;
+      vecTemp_for_tile.push_back(static_cast<const CaloCell *>(itt_tmp));
+    } // end of loop over cells
+  }
+  //} // end of loop over containers
+
+  
+  // Fill the last three ringsets with HEC and TILE cells
+  rs = 4; const CaloCell *ct_tmp=nullptr;
+  for (std::vector<RingerReFex::RingSet>::iterator jt=rset.begin()+rs; jt!=rset.end(); ++jt, rs++) {
+    
+    std::vector<const CaloCell*> vecTemp;
+    vecTemp.reserve( jt->maxCells() );
+    for (std::vector<const CaloCell *>::const_iterator ct = vecTemp_for_tile.begin(); ct != vecTemp_for_tile.end(); ++ct) {
+      ct_tmp = static_cast<const CaloCell *> (*ct);
+      if( !jt->belongs( ct_tmp ) ) continue;
+	    vecTemp.push_back(ct_tmp);
+    }
+    // Skip if there is no cells to add
+    if ( vecTemp.empty() ) continue;    
+
+    if (!m_global_center) {
+      double my_eta2, my_phi2;
+      maxCell(vecTemp, my_eta2, my_phi2, rtrigEmCluster.eta(), rtrigEmCluster.phi(), m_etaSearchWindowSize, m_phiSearchWindowSize);
+      jt->push_back( vecTemp, my_eta2, my_phi2 );
+    }else {
+      jt->push_back( vecTemp, rtrigEmCluster.eta(), rtrigEmCluster.phi() );
+    }
+
+  } // end of loop over ringsets
+ 
+
+
+  
+  std::vector<float> ref_rings;
+  ref_rings.reserve( m_maxRingsAccumulated );
+  // Fill the rings energy to the xAOD object
+  for (std::vector<RingerReFex::RingSet>::iterator jt=rset.begin(); jt!=rset.end(); ++jt) {
+    ref_rings.insert(ref_rings.end(), jt->pattern().begin(), jt->pattern().end());
+  } 
+  
+
+  
+  //Create the container to attach all rings
+  SG::WriteHandle<xAOD::TrigRingerRingsContainer> ringsCollection = SG::WriteHandle<xAOD::TrigRingerRingsContainer>( m_ringerContainerKey, context );
+  ATH_CHECK( ringsCollection.record( std::make_unique<xAOD::TrigRingerRingsContainer>(),  std::make_unique<xAOD::TrigRingerRingsAuxContainer>() ) );
+  auto ptrigRingerRings= new xAOD::TrigRingerRings();
+  ringsCollection->push_back( ptrigRingerRings );  
+  ptrigRingerRings->setRings(ref_rings);
+  auto clusLink = ElementLink<xAOD::TrigEMClusterContainer>(m_clusterContainerKey.key(),0,context);
+  ptrigRingerRings->setEmClusterLink( clusLink  );
+
+  if(msgLvl(MSG::DEBUG))
+    printRings(rset, ptrigRingerRings);
+  
+ 
+  total_time.stop();
+  
+  return StatusCode::SUCCESS;
+}
+
+
+void RingerReFex::printRings( std::vector<RingSet> &rset, xAOD::TrigRingerRings *ring )
+const {
+
+  ATH_MSG_DEBUG("--------------- Cluster Information  ----------------");
+  for(unsigned rs=0; rs<rset.size(); ++rs){
+    ATH_MSG_DEBUG("RingSet number is: " << rs);  
+    for(unsigned i=0;i<rset.at(rs).samples().size();i++)
+      ATH_MSG_DEBUG("   Calo layer ID is : "<< rset.at(rs).samples()[i] );
+      ATH_MSG_DEBUG("search eta window: " << m_etaSearchWindowSize << " search phi window: " << m_phiSearchWindowSize);
+    ATH_MSG_DEBUG("deta: " << m_detaRings[rs] << " dphi: " << m_dphiRings[rs]);
+    ATH_MSG_DEBUG("Pattern has size equal than: " << rset.at(rs).pattern().size());
+    for(unsigned i=0;i<rset.at(rs).pattern().size();++i)
+      ATH_MSG_DEBUG("   Ring " << i << " energy:  " << rset.at(rs).pattern()[i] << " MeVs.");
+  }// Loop over ringSets
+
+  //ATH_MSG_DEBUG("Rings energy: ");
+  //for(unsigned i=0;i<ref_rings.size();++i)
+  //  ATH_MSG_DEBUG("   Ring " <<i<< "  =  "<<ref_rings.at(i) << "  MeV");
+  ATH_MSG_DEBUG("Cluster test link:");
+  auto c = ring->emCluster();
+  ATH_MSG_DEBUG("et = "<< c->et() << " eta = " << c->eta()  << " roiword = " << c->RoIword());
+  ATH_MSG_DEBUG("---------------- End of information -----------------");
+ 
+
+}
+
+//!=================================================================================
+//!=================================================================================
+//!=================================================================================
+//!=================================================================================
+//!=================================================================================
+//!=================================================================================
+//!=================================================================================
+//!=================================================================================
+
+
+RingerReFex::RingSet::RingSet (unsigned int maxRings, 
+                    unsigned int maxCells, 
+                    double etasz, 
+                    double phisz, 
+                    const std::vector<CaloSampling::CaloSample> &samples)
+    : m_etasz(etasz),
+      m_phisz(phisz),
+      m_maxCells(maxCells),
+      m_rings(maxRings),
+      m_samples(samples),
+      m_cachedOverEtasize(1/etasz),
+      m_cachedOverPhisize(1/phisz)
+{}
+  
+  
+RingerReFex::RingSet::~RingSet()
+{}
+ 
+
+bool RingerReFex::RingSet::belongs( const CaloCell *c ) const
+{
+  for (std::vector<CaloSampling::CaloSample>::const_iterator kt=m_samples.begin(); kt!=m_samples.end(); ++kt) 
+  {
+    if ( c->caloDDE()->getSampling() == static_cast<CaloSampling::CaloSample>(*kt) )
+      return true;
+  }
+  return false;
+}
+
+ 
+void RingerReFex::RingSet::push_back( const std::vector<const CaloCell*>& c, 
+                                      const double eta_center, const double phi_center)
+{ 
+  if( m_rings.empty() ||  m_samples.empty())  return;
+
+  //typedef std::vector<CaloSampling::CaloSample> samp_type;
+  // Used later to multiply by the ring energy and get Et instead of E
+  const double one_over = 1 / std::cosh(std::fabs(eta_center));
+  
+  //are we, possibly at the wrap-around region for phi?
+  const bool wrap = Ringer::check_wrap_around(phi_center, false);
+  const bool reverse_wrap = Ringer::check_wrap_around(phi_center, true);
+
+  // Loop over all cells
+  for (std::vector<const CaloCell*>::const_iterator it=c.begin(); it!=c.end(); ++it) {
+   
+
+    if( !(*it) ){ 
+      continue;
+    }
+
+    // if I get here, is because I have to include the cell energy. It
+    // calculates which ring the cells should be added to, then, it adds
+    // up the cell value there and goes to the next cell. No need to do
+    // anything later, because the sums are already correct!
+    double phi_use = (*it)->phi(); //use this value for phi (wrap protection)
+    if (wrap) phi_use = Ringer::fix_wrap_around(phi_use, false);
+    else if (reverse_wrap) phi_use = Ringer::fix_wrap_around(phi_use, true);
+    
+    // Measure delta eta and delta phi to find out on which ring we are
+    unsigned int i = 0;
+    const double deltaEta = ((*it)->eta() - eta_center)*m_cachedOverEtasize;
+    const double deltaPhi = (phi_use - phi_center)*m_cachedOverPhisize;
+    const double deltaGreater = std::max(fabs(deltaEta), fabs(deltaPhi));
+    i = static_cast<unsigned int>( std::floor (deltaGreater) );
+    // Certain compilers have problems with round(), so let's do it ourselves
+    if ( (deltaGreater - (double) i) > 0.5) ++i;
+    
+    if (i < m_rings.size()) {
+      //give us Et instead of E
+      m_rings[i] += (*it)->energy();
+    }    
+  }
+
+  for (unsigned i=0; i < m_rings.size(); i++) 
+  {
+    m_rings[i] *= one_over;
+  }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
new file mode 100644
index 000000000000..b95eec8fd0da
--- /dev/null
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
@@ -0,0 +1,127 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef RINGERREFEX_H
+#define RINGERREFEX_H
+
+
+#include <string>
+#include "xAODTrigRinger/TrigRingerRings.h"
+#include "CaloGeoHelpers/CaloSampling.h"
+#include "CaloEvent/CaloCell.h"
+#include "TrigT2CaloCommon/IReAlgToolCalo.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "xAODTrigRinger/TrigRingerRings.h"
+#include "xAODTrigRinger/TrigRingerRingsContainer.h"
+#include "xAODTrigRinger/TrigRingerRingsAuxContainer.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+#include "PhiComps.h"
+
+/*
+ * This is the Ringer's tool. It creates the rings which are put into
+ * RingerRings and then looked by a multi-variable hypothesis making
+ * algorithm or regular LVL2 decision is taken by TrigL2CaloHypo.
+ * The number, sampling and widths of the rings is fully
+ * configurable.
+ */
+class RingerReFex : public IReAlgToolCalo 
+{
+
+  public:
+
+    // This class is very usefull since this select each ring the energy cell will be added give
+    // the center (hottest position) and the current cell position
+    // Helper class used to build ringsets
+    class RingSet {
+      public:
+
+        RingSet(unsigned int max, unsigned int maxCells, double etasz, double phisz, const std::vector<CaloSampling::CaloSample> &samples);
+        virtual ~RingSet();
+        
+        void push_back(const std::vector<const CaloCell *>& c, const double eta_center, const double phi_center);
+        
+        void clear(void){ 
+          for(unsigned int i = 0; i < m_rings.size(); ++i) 
+            m_rings[i] = 0;
+        }
+        
+        inline const double& eta_size(void) const { return m_etasz; }
+        inline const double& phi_size(void) const { return m_phisz; }
+        inline size_t        maxCells(void) const { return m_maxCells; } 
+        inline size_t        size(void) const { return m_rings.size(); }
+
+        const std::vector<double>& pattern(void) const { return m_rings; };     
+        const std::vector<CaloSampling::CaloSample>& samples(void) const { return m_samples; }
+        bool belongs( const CaloCell *c ) const;
+      
+      private:
+
+        double m_etasz; // the width of rings, in eta
+        double m_phisz; // the width of rings, in phi
+        size_t m_maxCells; // the amount of cells to gather
+        size_t m_maxRings; // the amount of rings to gather
+        // The vector of rings that will be used to hold the sum energy
+        std::vector<double>  m_rings; // my current values
+        std::vector<CaloSampling::CaloSample> m_samples; ///< I'm good for those
+        float m_cachedOverEtasize; ///< cached value of 1/m_config.eta_size() for optimizations
+        float m_cachedOverPhisize; ///< cached value of 1/m_config.phi_size() for optimizations  
+        
+
+    };
+
+
+  public: 
+
+    RingerReFex (const std::string& type, const std::string& name, const IInterface* parent);
+    virtual ~RingerReFex() { }
+
+    using IReAlgToolCalo::execute;
+
+    virtual StatusCode initialize() override;
+    
+    virtual StatusCode execute(xAOD::TrigEMCluster &rtrigEmCluster, 
+                               const IRoiDescriptor& roi, 
+                               const CaloDetDescrElement*& /*caloDDE*/,
+                               const EventContext& context) const override;
+
+
+  
+  private:
+  
+    ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool"};
+    SG::WriteHandleKey<xAOD::TrigRingerRingsContainer> m_ringerContainerKey {this, "RingerKey", "HLT_L2CaloRinger", "TrigRingerRings container key"};
+    SG::ReadHandleKey<xAOD::TrigEMClusterContainer>    m_clusterContainerKey {this, "ClustersName", "HLT_L2CaloEMClusters", "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,  ""};
+    Gaudi::Property<double>  m_etaSearchWindowSize  {this, "EtaSearchWindowSize", 0.1,  ""};
+    Gaudi::Property<double>  m_phiSearchWindowSize  {this, "PhiSearchWindowSize", 0.1,  ""};
+    Gaudi::Property<std::vector<float>>  m_detaRings  {this, "DEtaRings", {},  ""};
+    Gaudi::Property<std::vector<float>>  m_dphiRings  {this, "DPhiRings", {},  ""};
+    Gaudi::Property<std::vector<unsigned int>>  m_nRings  {this, "NRings", {},  ""};
+    Gaudi::Property<std::vector<unsigned int>>  m_layersRings  {this, "LayersRings", {},  ""};
+    Gaudi::Property<std::vector<unsigned int>>  m_nlayersRings  {this, "NLayersRings", {},  ""};
+    Gaudi::Property<std::vector<unsigned int>>  m_maxCells  {this, "NMaxCells", {},  ""};
+    
+    unsigned int              m_maxRingsAccumulated;
+    
+    bool configurationInvalid();
+
+
+    // Calculates the maximum energy cell in a CaloCell collection.
+    inline void maxCell ( const std::vector<const CaloCell*>& vcell, 
+    			                double& eta, 
+                          double& phi, 
+                          const double eta_ref, 
+    			                const double phi_ref, 
+                          const double eta_window, 
+    			                const double phi_window) const ;
+
+
+    void printRings( std::vector<RingSet> &, xAOD::TrigRingerRings * ) const;
+
+};
+#endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CalibrationEgamma.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CalibrationEgamma.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgamma.h
old mode 100755
new mode 100644
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx
index 67ae6c69a3d5..f1a9fa526e0c 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx
@@ -187,3 +187,4 @@ StatusCode T2CaloEgammaReFastAlgo::execute(const EventContext& context) const
 
   return StatusCode::SUCCESS;
 }
+
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
old mode 100755
new mode 100644
index 34ac06cac561..0e5026f2598d
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
@@ -18,7 +18,6 @@
 
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "IRegionSelector/IRegSelSvc.h"
 #include "StoreGate/ReadHandleKey.h"
@@ -37,43 +36,43 @@ class IReAlgToolCalo;
     IReAlgToolCalos and produces the TrigEMCluster output. */
 class T2CaloEgammaReFastAlgo : public AthReentrantAlgorithm {
 
-public:
-  T2CaloEgammaReFastAlgo(const std::string& name, ISvcLocator* pSvcLocator);
-
-  virtual StatusCode initialize() override;
-  virtual StatusCode execute(const EventContext& context) const override;
-  /** calculate zo mass */
-  // float calculateZ0(const float etaLayer1, const float etaLayer2);
-
-private:
-  ServiceHandle<IRegSelSvc> m_regionSelector;
-
-  // Properties:
-  Gaudi::Property<float> m_l1eta{this, "L1ForceEta", -10.0, "Forced LVL1 eta"};
-  Gaudi::Property<float> m_l1phi{this, "L1ForcePhi", -10.0, "Forced LVL1 phi"};
-  Gaudi::Property<double> m_etaWidth{this, "EtaWidth", 0.1, "Eta Width of the Region of Interest"};
-  Gaudi::Property<double> m_phiWidth{this, "PhiWidth", 0.1, "Phi Width of the Region of Interest"};
-
-  Gaudi::Property<bool> m_storeCells{this, "StoreCells", false,
-                                     "store cells in container attached to RoI"};
-
-  ToolHandleArray<IEgammaCalibration> m_calibsBarrel{
-      this, "CalibListBarrel", {}, "list of calib tools for the Barrel clusters"};
-  ToolHandleArray<IEgammaCalibration> m_calibsEndcap{
-      this, "CalibListEndcap", {}, "list of calib tools for the EndCap clusters"};
-
-  Gaudi::Property<std::vector<float>> m_rhoEta{
-      this, "RhoEta", {}, "Variables to calculate Z0 position"};
-  Gaudi::Property<std::vector<float>> m_zEta{
-      this, "ZEta", {}, "Variables to calculate Z0 position"};
-
-  ToolHandleArray<IReAlgToolCalo> m_emAlgTools{
-      this, "IReAlgToolList", {}, "list of ReAlgToolCalos for feature extraction"};
-
-  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{
-    this, "RoIs", "OutputRoIs", "input RoIs"};
-  SG::WriteHandleKey<xAOD::TrigEMClusterContainer> m_clusterContainerKey{
-      this, "ClustersName", "CaloClusters", "Calo cluster container"};
+  public:
+    T2CaloEgammaReFastAlgo(const std::string& name, ISvcLocator* pSvcLocator);
+  
+    virtual StatusCode initialize() override;
+    virtual StatusCode execute(const EventContext& context) const override;
+    /** calculate zo mass */
+    // float calculateZ0(const float etaLayer1, const float etaLayer2);
+  
+  private:
+    ServiceHandle<IRegSelSvc> m_regionSelector;
+  
+    // Properties:
+    Gaudi::Property<float> m_l1eta{this, "L1ForceEta", -10.0, "Forced LVL1 eta"};
+    Gaudi::Property<float> m_l1phi{this, "L1ForcePhi", -10.0, "Forced LVL1 phi"};
+    Gaudi::Property<double> m_etaWidth{this, "EtaWidth", 0.1, "Eta Width of the Region of Interest"};
+    Gaudi::Property<double> m_phiWidth{this, "PhiWidth", 0.1, "Phi Width of the Region of Interest"};
+  
+    Gaudi::Property<bool> m_storeCells{this, "StoreCells", false,
+                                       "store cells in container attached to RoI"};
+  
+    ToolHandleArray<IEgammaCalibration> m_calibsBarrel{
+        this, "CalibListBarrel", {}, "list of calib tools for the Barrel clusters"};
+    ToolHandleArray<IEgammaCalibration> m_calibsEndcap{
+        this, "CalibListEndcap", {}, "list of calib tools for the EndCap clusters"};
+  
+    Gaudi::Property<std::vector<float>> m_rhoEta{
+        this, "RhoEta", {}, "Variables to calculate Z0 position"};
+    Gaudi::Property<std::vector<float>> m_zEta{
+        this, "ZEta", {}, "Variables to calculate Z0 position"};
+  
+    ToolHandleArray<IReAlgToolCalo> m_emAlgTools{
+        this, "IReAlgToolList", {}, "list of ReAlgToolCalos for feature extraction"};
+  
+    SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{
+      this, "RoIs", "OutputRoIs", "input RoIs"};
+    SG::WriteHandleKey<xAOD::TrigEMClusterContainer> m_clusterContainerKey{
+        this, "ClustersName", "CaloClusters", "Calo cluster container"};
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx
index 674603a49ecc..69e1d3fad951 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/components/TrigT2CaloEgamma_entries.cxx
@@ -9,6 +9,7 @@
 #include "../EgammaReEmEnFex.h"
 #include "../EgammaReHadEnFex.h"
 #include "../RingerFex.h"
+#include "../RingerReFex.h"
 #include "../EgammaAllFex.h"
 
 DECLARE_COMPONENT( T2CaloEgamma )
@@ -22,4 +23,5 @@ DECLARE_COMPONENT( EgammaReSamp1Fex )
 DECLARE_COMPONENT( EgammaReEmEnFex )
 DECLARE_COMPONENT( EgammaReHadEnFex )
 DECLARE_COMPONENT( RingerFex )
+DECLARE_COMPONENT( RingerReFex )
 DECLARE_COMPONENT( EgammaAllFex )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index 323256e2d689..f237210f5f2d 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -70,6 +70,9 @@ _add_test( met_fromClusters EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
 _add_test( met_fromClustersPufit EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
 _add_test( met_fromJets EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
 
+_add_test( calo_ringer_only_data POST_EXEC_SCRIPT nopost.sh)
+_add_test( ringer_chain POST_EXEC_SCRIPT nopost.sh)
+
 # ART-based tests:
 _add_test( full_menu_build POST_EXEC_SCRIPT "trig-art-result-parser.sh full_menu_build.log \"athena CheckLog RegTest\"" )
 _add_test( newJO_build POST_EXEC_SCRIPT "trig-art-result-parser.sh newJO_build.log \"Configuration athena CheckLog RegTest\"" )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
new file mode 100644
index 000000000000..b2cbf79e6f6a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
@@ -0,0 +1,51 @@
+#
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+if not 'doHLTCaloTopo' in dir() :
+  doHLTCaloTopo=True
+if not 'doL2Egamma' in dir():
+  doL2Egamma=True
+
+include("TrigUpgradeTest/testHLT_MT.py")
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+# ----------------------------------------------------------------
+# Setup Views
+# ----------------------------------------------------------------
+from AthenaCommon.CFElements import stepSeq,seqOR
+from DecisionHandling.DecisionHandlingConf import RoRSeqFilter
+
+
+steps = seqOR("HLTTop")
+topSequence += steps
+steps += topSequence.L1Decoder
+
+
+
+
+if TriggerFlags.doCalo:
+
+  if ( doHLTCaloTopo ) :
+    from TrigT2CaloCommon.CaloDef import HLTFSTopoRecoSequence
+    recosequence, caloclusters = HLTFSTopoRecoSequence("FSRoI")
+    steps+=recosequence
+ 
+  if ( doL2Egamma ) :
+
+     from TrigT2CaloCommon.CaloDef import createFastCaloSequence
+
+     filterL1RoIsAlg = RoRSeqFilter( "filterL1RoIsAlg")
+     filterL1RoIsAlg.Input = ["L1EM"]
+     filterL1RoIsAlg.Output = ["FilteredEMRoIDecisions"]
+     filterL1RoIsAlg.Chains = [ "HLT_e3_etcut", "HLT_e5_etcut", "HLT_e7_etcut" ]
+     (fastCaloSequence, sequenceOut) = createFastCaloSequence(filterL1RoIsAlg.Output[0], doRinger=True, 
+                                                              ClustersName="HLT_L2CaloEMClusters",
+                                                              RingerKey="HLT_L2CaloRinger")
+     steps+=stepSeq("finalCaloSequence", filterL1RoIsAlg, [ fastCaloSequence ])
+
+  from AthenaCommon.AlgSequence import dumpMasterSequence
+  dumpMasterSequence()
+
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
new file mode 100644
index 000000000000..a4e22f5f48d5
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
@@ -0,0 +1,92 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaCommon.Constants import ERROR, DEBUG
+from AthenaCommon.CFElements import seqAND
+from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
+
+
+include("TrigUpgradeTest/testHLT_MT.py")
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+isData = False
+if globalflags.InputFormat.is_bytestream():
+  isData = True
+# ----------------------------------------------------------------
+# Setup Views
+# ----------------------------------------------------------------
+from AthenaCommon.AlgSequence import AthSequencer
+from AthenaCommon.CFElements import stepSeq,seqOR
+from AthenaCommon.Constants import DEBUG
+from DecisionHandling.DecisionHandlingConf import RoRSeqFilter
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+from TrigT2CaloCommon.CaloDef import _algoHLTCaloCell, _algoHLTTopoCluster, _algoL2Egamma
+TriggerFlags.enableMonitoring = ['Validation','Online']
+
+
+
+doRinger=True
+
+steps = seqOR("HLTTop")
+topSequence += steps
+steps += topSequence.L1Decoder
+steps+=_algoHLTCaloCell(OutputLevel=DEBUG)    
+steps+=_algoHLTTopoCluster(OutputLevel=DEBUG)    
+
+
+filterL1RoIsAlg = RoRSeqFilter( "filterL1RoIsAlg")
+filterL1RoIsAlg.Input = ["L1EM"]
+filterL1RoIsAlg.Output = ["FilteredEMRoIDecisions"]
+filterL1RoIsAlg.Chains = [ 
+                           "HLT_e3_etcut", 
+                           "HLT_e5_etcut", 
+                           "HLT_e7_etcut", 
+                           "HLT_e26_lhtight",
+                           ]
+filterL1RoIsAlg.OutputLevel = DEBUG
+ 
+InViewRoIs="EMCaloRoIs"
+clusterMaker = _algoL2Egamma(OutputLevel=FATAL,inputEDM=InViewRoIs,doRinger=True, ClustersName="HLT_L2CaloEMClusters",RingerKey="HLT_L2CaloRinger")
+fastCaloInViewSequence = seqAND( 'fastCaloInViewSequence', [clusterMaker] )
+fastCaloViewsMaker = EventViewCreatorAlgorithm( "fastCaloViewsMaker", OutputLevel=DEBUG)
+fastCaloViewsMaker.ViewFallThrough = True
+fastCaloViewsMaker.InputMakerInputDecisions =  [ "FilteredEMRoIDecisions" ]
+fastCaloViewsMaker.RoIsLink = "initialRoI"
+fastCaloViewsMaker.InViewRoIs = InViewRoIs
+fastCaloViewsMaker.Views = "EMCaloViews"
+fastCaloViewsMaker.ViewNodeName = "fastCaloInViewSequence"
+fastCaloViewsMaker.InputMakerOutputDecisions = [ "L2CaloLinks"]
+clusterMaker.OutputLevel=FATAL
+
+if doRinger:
+   from TrigMultiVarHypo.TrigL2CaloRingerHypoTool import createRingerDecisions
+   fastCaloHypo = createRingerDecisions( "testRingerHypo" , filterL1RoIsAlg.Chains,
+                                         ClustersKey=clusterMaker.ClustersName,
+                                         RingerKey="HLT_L2CaloRinger")
+
+else:
+   from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT
+   from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName
+   fastCaloHypo = TrigL2CaloHypoAlgMT( "L2CaloHypo" )
+   fastCaloHypo.HypoTools =  [ TrigL2CaloHypoToolFromName( c,c ) for c in filterL1RoIsAlg.Chains ]
+   fastCaloHypo.CaloClusters = clusterMaker.ClustersName
+
+for t in fastCaloHypo.HypoTools:
+   t.OutputLevel=DEBUG
+
+fastCaloHypo.HypoOutputDecisions = "EgammaCaloDecisions"
+fastCaloHypo.OutputLevel= DEBUG
+fastCaloHypo.HypoInputDecisions =  fastCaloViewsMaker.InputMakerOutputDecisions[0] #   __l1RoIDecisions
+
+
+fastCaloSequence = seqAND("fastCaloSequence", [fastCaloViewsMaker, fastCaloInViewSequence, fastCaloHypo ])
+steps+=stepSeq("finalCaloSequence", filterL1RoIsAlg, [ fastCaloSequence ])
+
+ 
+
+
+
+
+from AthenaCommon.AlgSequence import dumpMasterSequence
+dumpMasterSequence()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh
new file mode 100755
index 000000000000..3b152864251b
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+# art-include: master/Athena
+
+athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/CaloRinger.py
+
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh
new file mode 100755
index 000000000000..61bedc272ca0
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-include: master/Athena
+
+athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egammaRinger.py
-- 
GitLab


From b56bb4075e0cc3b3b34f905a30116115fb57088d Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Thu, 2 May 2019 15:19:13 +0200
Subject: [PATCH 063/129] CaloRunClusterCorrection: Add ReadHandleKey to LAr
 and Tile bad channel containers to ensure data-dependencies

---
 Calorimeter/CaloClusterCorrection/CMakeLists.txt         | 5 +++--
 .../src/CaloRunClusterCorrections.cxx                    | 5 +++--
 .../src/CaloRunClusterCorrections.h                      | 9 ++++++++-
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/Calorimeter/CaloClusterCorrection/CMakeLists.txt b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
index 29b0f8c48f91..67a4510acaa4 100644
--- a/Calorimeter/CaloClusterCorrection/CMakeLists.txt
+++ b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
@@ -8,6 +8,8 @@ atlas_subdir( CaloClusterCorrection )
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           Calorimeter/CaloConditions
+			  TileCalorimeter/TileConditions
+			  LArCalorimeter/LArRecConditions
                           Calorimeter/CaloEvent
                           Calorimeter/CaloInterface
                           Calorimeter/CaloRec
@@ -27,7 +29,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Calorimeter/CaloIdentifier
                           LArCalorimeter/LArIdentifier
                           LArCalorimeter/LArCabling
-                          LArCalorimeter/LArRecConditions
                           Control/AthContainers
                           DetectorDescription/Identifier
                           Event/EventKernel
@@ -43,7 +44,7 @@ atlas_add_library( CaloClusterCorrectionLib
                    PUBLIC_HEADERS CaloClusterCorrection
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES CaloCondBlobObjs CaloConditions CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel CxxUtils AthenaPoolUtilities xAODCaloEvent GaudiKernel LArIdentifier LArRecConditions CaloRecLib StoreGateLib SGtests LArToolsLib CaloDetDescrLib CaloUtilsLib
+                   LINK_LIBRARIES CaloCondBlobObjs CaloConditions CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel CxxUtils AthenaPoolUtilities xAODCaloEvent GaudiKernel LArIdentifier LArRecConditions TileConditions CaloRecLib StoreGateLib SGtests LArToolsLib CaloDetDescrLib CaloUtilsLib
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools CaloGeoHelpers Identifier EventKernel PathResolver )
 
 atlas_add_component( CaloClusterCorrection
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.cxx b/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.cxx
index c9b95b7cf8ae..ab5f55baa102 100644
--- a/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.cxx
@@ -61,7 +61,7 @@ CaloRunClusterCorrections::CaloRunClusterCorrections (const std::string& type,
     //m_detStore  ("DetectorStore", name),
     m_jos       ("JobOptionsSvc", name),
     m_toolsvc   ("ToolSvc",       name),
-    m_coolInlineTool("Blob2ToolConstants")
+    m_coolInlineTool("Blob2ToolConstants",this)
 {
   declareProperty ("CorrSpecs",     m_corrspecs);
   declareProperty ("KeepList",      m_keeplist);
@@ -100,7 +100,8 @@ StatusCode CaloRunClusterCorrections::initialize()
   registerCallbacks();
 
   ATH_CHECK( m_affKey.initialize() );
-
+  ATH_CHECK( m_LArBCKey.initialize() );
+  ATH_CHECK( m_TileBCKey.initialize() );
   return StatusCode::SUCCESS;
 }
 
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h b/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h
index 1a0934ab69c8..2a2ddf0b37b2 100644
--- a/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h
+++ b/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h
@@ -32,6 +32,8 @@
 #include "GaudiKernel/IJobOptionsSvc.h"
 
 #include "CaloConditions/CaloAffectedRegionInfoVec.h"
+#include "TileConditions/TileBadChannels.h"
+#include "LArRecConditions/LArBadChannelCont.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
 class StoreGateSvc;
@@ -379,13 +381,18 @@ private:
   /// COOL folder name in case of COOL inline storage
   std::string  m_folderName;
 
-  /// Public AlgTool to convert COOL inline data into ToolConstants objects
+  /// AlgTool to convert COOL inline data into ToolConstants objects
   ToolHandle<Blob2ToolConstants> m_coolInlineTool;
 
   // FIXME: Dependencies don't get propagated from dynamically-created
   // correction tools.  Hardcode this dependency as a workaround.
   SG::ReadCondHandleKey<CaloAffectedRegionInfoVec> m_affKey{this,
      "LArAffectedRegionKey", "LArAffectedRegionInfo", "SG key for affected regions cond object"};
+  SG::ReadCondHandleKey<LArBadChannelCont> m_LArBCKey { this, 
+      "LArBadChanKey","LArBadChannel","SG Key of LArBadChannelCont object"};
+  SG::ReadCondHandleKey<TileBadChannels> m_TileBCKey{this,
+      "TileBadChanKey", "TileBadChannels", "Input Tile bad channel status"};
+
 };
 
 
-- 
GitLab


From 3f5b613651735a5dc5365c2c5fd003d55e5fbfea Mon Sep 17 00:00:00 2001
From: Takuya Nobe <takuya.nobe@cern.ch>
Date: Thu, 2 May 2019 13:21:25 +0000
Subject: [PATCH 064/129] add a new transform to use a JO (full_menu.py) in the
 HLT reprocessing with rel.22

---
 .../TrigTransform/scripts/TrigMT_reco_tf.py   | 239 ++++++++++++++++++
 1 file changed, 239 insertions(+)
 create mode 100755 HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py

diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py
new file mode 100755
index 000000000000..156ae3f391a1
--- /dev/null
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py
@@ -0,0 +1,239 @@
+#! /usr/bin/env python
+
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+## TrigMT_tf_reco.py - based on PyJobTransforms/Reco_tf.py now stored here:
+## https://svnweb.cern.ch/trac/atlasoff/browser/Reconstruction/RecJobTransforms/trunk/scripts
+
+import sys
+import time
+
+import logging
+
+# 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.trfExe import athenaExecutor, DQMergeExecutor, reductionFrameworkExecutor, reductionFrameworkExecutorNTUP
+from PyJobTransforms.trfArgs import addAthenaArguments, addD3PDArguments, addPrimaryDPDArguments, addExtraDPDTypes, addDetectorArguments, addReductionArguments
+from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
+from RecJobTransforms.recTransformUtils import addCommonRecTrfArgs, addStandardRecoFiles
+
+import PyJobTransforms.trfArgClasses as trfArgClasses
+
+from TrigTransform.trigRecoExe import trigRecoExecutor
+from TrigTransform.trigCostExe import trigCostExecutor
+
+@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()
+        
+    #BSRDOtoRAW is new option for trigger transform
+    #now setup to run athenaHLT, so TODO is to remove:
+    #writeBS BSRDOInput EvtMax from AthenaCommon...  athenaCommonFlags....
+    executorSet.add(trigRecoExecutor(name = 'BSRDOtoRAW', skeletonFile = 'TrigUpgradeTest/full_menu.py', 
+                                     exe = 'athenaHLT.py',
+                                     substep = 'b2r', tryDropAndReload = False,
+                                     inData = ['BS_RDO', 'RDO'], outData = ['BS', 'HIST_HLTMON','HIST_DEBUGSTREAMMON'], 
+                                     perfMonFile = 'ntuple_BSRDOtoRAW.pmon.gz',
+                                     literalRunargs = ['writeBS = runArgs.writeBS',
+                                                       'from AthenaCommon.AthenaCommonFlags import athenaCommonFlags',
+                                                       'athenaCommonFlags.FilesInput = runArgs.inputBS_RDOFile',
+                                                       'EvtMax = runArgs.maxEvents',
+                                                       'if hasattr(runArgs,\'outputBSFile\'):',
+                                                       '   athenaCommonFlags.BSRDOOutput.set_Value_and_Lock( runArgs.outputBSFile )']))
+
+    #RAWtoCOST is new option for trigger transform
+    #runs in athena and will succeed if input BS file has costmon enabled
+    executorSet.add(trigCostExecutor(name = 'RAWtoCOST', skeletonFile = 'TrigCostMonitor/readTrigCost.py',
+                                     substep = 'r2c',
+                                     inData = ['BS'], outData = ['NTUP_TRIGCOST','NTUP_TRIGRATE','NTUP_TRIGEBWGHT'],
+                                     perfMonFile = 'ntuple_RAWtoCOST.pmon.gz',
+                                     literalRunargs = ['BSRDOInput = runArgs.inputBSFile',
+                                                       'EvtMax = runArgs.maxEvents']))
+
+    #add default reconstruction steps
+    # eventually to be replaced by:
+    #from RecJobTransforms.recTransformUtils import addRecoSubsteps
+    #addRecoSubsteps(executorSet)
+       
+    # one difference to reco_tf is that NTUP_TRIG has to be added - needs pyjobtf update before can use above    
+        #NTUP_TRIG is added as is not available in ATLASP1HLT, but is available in the reco release
+        #hence can be used later in a ATLASP1HLT job if switch releases
+
+    executorSet.add(athenaExecutor(name = 'RAWtoESD', skeletonFile = 'RecJobTransforms/skeleton.RAWtoESD_tf.py',
+                                   substep = 'r2e', inData = ['BS', 'RDO'], outData = ['ESD', 'HIST_ESD_INT'], 
+                                   perfMonFile = 'ntuple_RAWtoESD.pmon.gz'))
+    executorSet.add(athenaExecutor(name = 'ESDtoAOD', skeletonFile = 'RecJobTransforms/skeleton.ESDtoAOD_tf.py',
+                                   substep = 'e2a', inData = ['ESD'], outData = ['AOD', 'HIST_AOD_INT'], 
+                                   perfMonFile = 'ntuple_ESDtoAOD.pmon.gz'))
+    executorSet.add(DQMergeExecutor(name = 'DQHistogramMerge', inData = [('HIST_ESD_INT', 'HIST_AOD_INT')], outData = ['HIST']))
+    executorSet.add(athenaExecutor(name = 'ESDtoDPD', skeletonFile = 'PATJobTransforms/skeleton.ESDtoDPD_tf.py',
+                                   substep = 'e2d', inData = ['ESD'], outData = ['NTUP_TRIG'],
+                                   perfMonFile = 'ntuple_ESDtoDPD.pmon.gz'))
+    executorSet.add(athenaExecutor(name = 'AODtoDPD', skeletonFile = 'PATJobTransforms/skeleton.AODtoDPD_tf.py',
+                                   substep = 'a2d', inData = ['AOD', 'EVNT'], outData = ['NTUP_TRIG'],
+                                   perfMonFile = 'ntuple_AODtoDPD.pmon.gz'))
+    executorSet.add(athenaExecutor(name = 'AODtoTAG', skeletonFile = 'RecJobTransforms/skeleton.AODtoTAG_tf.py',
+                                   inData = ['AOD'], outData = ['TAG'],))
+#     executorSet.add(athenaExecutor(name = 'AODtoHIST', skeletonFile = 'RecJobTransforms/skeleton.FROM_PETER.py',
+#                                    inData = ['AOD'], outData = ['HIST_AOD'],))
+    executorSet.add(reductionFrameworkExecutor(name = 'AODtoRED', skeletonFile = 'PATJobTransforms/skeleton.AODtoRED_tf.py',
+                                   substep = 'a2r', inData = ['AOD'], outData = ['DAOD_RED']))
+    executorSet.add(reductionFrameworkExecutorNTUP(name = 'NTUPtoRED', skeletonFile = 'PATJobTransforms/skeleton.NTUPtoRED_tf.py',
+                                   substep = 'n2n', inData = ['NTUP_COMMON'], outData = ['NTUP_RED']))
+    
+    trf = transform(executor = executorSet, description = 'Trigger transform to run HLT_standalone, followed by'
+                    ' general purpose ATLAS reconstruction transform. Input to HLT_Standalone is inputBS_RDOFile'
+                    ' with outputs of RDO, ESD, AOD or DPDs. For more details on reco_tf, see:'
+                    ' https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RecoTf')
+    
+    #add arguments as donw in reco_tf
+    addAthenaArguments(trf.parser)
+    addDetectorArguments(trf.parser)
+    addCommonRecTrfArgs(trf.parser)
+    addStandardRecoFiles(trf.parser)
+    addPrimaryDPDArguments(trf.parser, transform = trf)
+    addD3PDArguments(trf.parser, transform = trf)
+    addExtraDPDTypes(trf.parser, transform = trf)
+    addReductionArguments(trf.parser, transform = trf)
+
+    #currently ignoring simulation arguments as can't find the package when have below in cmt/requirements:
+    #use SimuJobTransforms SimuJobTransforms-* Simulation
+    
+    # For digi step - make sure we can add the digitisation/simulation arguments
+    # before we add this substep
+#    try:
+#        from SimuJobTransforms.simTrfArgs import addForwardDetTrfArgs, addBasicDigiArgs, addPileUpTrfArgs, addCommonSimDigTrfArgs
+#        addBasicDigiArgs(trf.parser)
+#        addForwardDetTrfArgs(trf.parser)
+#        addPileUpTrfArgs(trf.parser)
+#        #addCommonSimDigTrfArgs(trf.parser)
+#        executorSet.add(athenaExecutor(name = 'HITtoRDO', skeletonFile = 'SimuJobTransforms/skeleton.HITtoRDO.py',
+#                                       substep = 'h2r', tryDropAndReload = False, perfMonFile = 'ntuple.pmon.gz',
+#                                       inData = ['Hits'], outData = ['RDO'],
+#                                       runtimeRunargs = {'LowPtMinbiasHitsFile' : 'runArgs.inputLowPtMinbiasHitsFile',
+#                                                         'HighPtMinbiasHitsFile' : 'runArgs.inputHighPtMinbiasHitsFile',}))
+#        
+#    except ImportError:
+#        msg.warning('Failed to import simulation/digitisation arguments. These substeps will not be available.')
+    
+    #now add specific trigger arguments
+    #  putting this last makes them appear last in the help so easier to find
+    addTriggerArgs(trf.parser)
+    addTriggerDBArgs(trf.parser)
+    addDebugArgs(trf.parser)
+
+    return trf
+
+
+def addTriggerArgs(parser):
+    # Use arggroup to get these arguments in their own sub-section (of --help)
+    parser.defineArgGroup('Trigger', 'Specific options related to the trigger configuration used for reprocessing')
+    
+    #new for trigger transform
+    #now setup to run athenaHLT, so TODO is to remove:testPhysicsV4 and writeBS
+    #TODO: testPhysicsV4 needs deleting as causes double menu loading but left in for now to not add conflicts to the panda tag page
+    parser.add_argument('--testPhysicsV4', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
+                          help='Please do not use this command, to be deleted', group='Trigger')
+    parser.add_argument('--writeBS', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
+                          help='Needed if running BSRDO to BS step in athena (default: True)', group='Trigger', default=trfArgClasses.argBool(True, runarg=True))
+    parser.add_argument('--inputBS_RDOFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='input', runarg=True, type='bs'),
+                        help='Input bytestream file', group='Trigger')
+    #without an outputBSFile name specified then any further steps will know to use tmp.BS
+    parser.add_argument('--outputBSFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='output', runarg=True, type='bs'),
+                        help='Output bytestream file', group='Trigger')
+    parser.add_argument('--outputHIST_HLTMONFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False),
+                        help='Output HLTMON file', group='Trigger')    
+    #NTUP_TRIG is added as is not available in ATLASP1HLT, but is available in the reco release
+    #hence can be used later in a ATLASP1HLT job if switch releases
+    parser.add_argument('--outputNTUP_TRIGFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False), 
+                        help='D3PD output NTUP_TRIG file (can be made in substeps e2d,a2d)', group='Trigger')
+    #NTUP_COST is added as is not available in ATLASP1HLT, but is available in the reco release
+    #hence can be used later in a ATLASP1HLT job if switch releases
+    parser.add_argument('--outputNTUP_TRIGCOSTFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False), 
+                        help='D3PD output NTUP_TRIGCOST file', group='Trigger')
+    #NTUP_RATE is added as is not available in ATLASP1HLT, but is available in the reco release
+    #hence can be used later in a ATLASP1HLT job if switch releases
+    parser.add_argument('--outputNTUP_TRIGRATEFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False), 
+                        help='D3PD output NTUP_TRIGRATE file', group='Trigger')
+    #NTUP_TRIGEBWGHT is added as is not available in ATLASP1HLT, but is available in the reco release
+    #hence can be used later in a ATLASP1HLT job if switch releases
+    parser.add_argument('--outputNTUP_TRIGEBWGHTFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False), 
+                        help='D3PD output NTUP_TRIGEBWGHT file', group='Trigger')
+    parser.add_argument('--triggerConfig', nargs='+', metavar='substep=TRIGGERCONFIG',
+                        type=trfArgClasses.argFactory(trfArgClasses.argSubstep, runarg=True, separator='='),
+                        help='Trigger Configuration String. '
+			'N.B. This argument uses EQUALS (=) to separate the substep name from the value.', group='Trigger')
+    parser.add_argument('--dumpOptions', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
+                        help='Only for testing: '
+                        'dump to stdout the options athenaHLT has received. '
+                        'N.B. option consistency is not checked.', group='Trigger')
+    parser.add_argument('--precommand', nargs='+', type=trfArgClasses.argFactory(trfArgClasses.argList, runarg=True),
+                        help='precommand for athenaHLT aka -c', group='Trigger')
+    parser.add_argument('--postcommand', nargs='+', type=trfArgClasses.argFactory(trfArgClasses.argList, runarg=True),
+                        help='postcommand for athenaHLT aka -C', group='Trigger')
+    parser.add_argument('--eventmodifier', nargs='+', type=trfArgClasses.argFactory(trfArgClasses.argList, runarg=True),
+                        help='event-modifier for athenaHLT aka -Z', group='Trigger')
+    parser.add_argument('--prodSysBSRDO', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
+                        help='For prodsys to make sure uses inputBS_RDOFile rather than inputBSFile when running the b2r step', group='Trigger')
+
+
+def addTriggerDBArgs(parser):
+    # Use arggroup to get these arguments in their own sub-section (of --help)
+    parser.defineArgGroup('TriggerDB', 'Specific options related to the trigger DB')
+    
+    #TODO add short forms and help messages
+        
+    parser.add_argument('--jobOptionSvcType', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='jobOptionSvcType aka -J', group='TriggerDB')
+    parser.add_argument('--useDB', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
+                        help='useDB', group='TriggerDB')
+    parser.add_argument('--DBtype', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='DBtype', group='TriggerDB')
+    parser.add_argument('--DBserver', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='DBserver', group='TriggerDB')
+    parser.add_argument('--DBsmkey', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='DBsmkey', group='TriggerDB')
+    parser.add_argument('--DBhltpskey', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='DBhltpskey', group='TriggerDB')
+    parser.add_argument('--DBlvl1pskey', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='DBlvl1pskey', group='TriggerDB')
+    parser.add_argument('--DBextra', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
+                        help='DBextra', group='TriggerDB')
+
+
+def addDebugArgs(parser):
+    # Use arggroup to get these arguments in their own sub-section (of --help)
+    parser.defineArgGroup('Debug', 'Specific options related to the trigger debug recovery')
+
+    parser.add_argument('--debug_stream', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
+                        help='Runs debug_stream analysis', group='Debug')
+    parser.add_argument('--outputHIST_DEBUGSTREAMMONFile', nargs='+', 
+                        type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False),
+                        help='Output DEBUGSTREAMMON file', group='Debug')    
+    
+
+if __name__ == '__main__':
+    main()
-- 
GitLab


From 0dfe690f42fb83c36a331719172d1f907cd3fb45 Mon Sep 17 00:00:00 2001
From: Stewart Martin-Haugh <smh@cern.ch>
Date: Thu, 2 May 2019 15:37:31 +0200
Subject: [PATCH 065/129] Add L1TopoSimulation

---
 .../TrigUpgradeTest/share/testHLT_MT.py       | 23 +++++++++++--------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
index ca26247be8df..d5da11c6db71 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -18,6 +18,7 @@
 class opt :
     setupForMC       = None           # force MC setup
     setLVL1XML       = 'TriggerMenuMT/LVL1config_LS2_v1.xml' # 'TriggerMenu/LVL1config_Physics_pp_v7.xml' # default for legacy
+    setL1TopoXML     = 'TriggerMenuMT/L1Topoconfig_LS2_v1.xml'
     setDetDescr      = None           # force geometry tag
     setGlobalTag     = None           # force global conditions tag
     useCONDBR2       = True           # if False, use run-1 conditions DB
@@ -337,9 +338,14 @@ elif globalflags.InputFormat.is_bytestream():
 TriggerFlags.inputLVL1configFile = opt.setLVL1XML
 TriggerFlags.readLVL1configFromXML = True
 TriggerFlags.outputLVL1configFile = None
-from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, findFileInXMLPATH
+TriggerFlags.inputL1TopoConfigFile = opt.setL1TopoXML
+from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, L1TopoConfigSvc, findFileInXMLPATH
 svcMgr += LVL1ConfigSvc()
 svcMgr.LVL1ConfigSvc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputLVL1configFile())
+L1TopoConfigSvc = L1TopoConfigSvc()
+L1TopoConfigSvc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputL1TopoConfigFile())
+svcMgr += L1TopoConfigSvc
+
 
 if opt.doL1Sim:
     from TrigT1CaloSim.TrigT1CaloSimRun2Config import Run2TriggerTowerMaker
@@ -413,15 +419,11 @@ if opt.doL1Sim:
     from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
     from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
 
-    ToolSvc += L1MuctpiTool("L1MuctpiTool")
+    l1muctpiTool = L1MuctpiTool("L1MuctpiTool")
+
+    ToolSvc += l1muctpiTool
     ToolSvc.L1MuctpiTool.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
     
-    ToolSvc += L1MuctpiTool("LVL1MUCTPI__L1MuctpiTool") # one for topo, no idea why we need two
-    ToolSvc.LVL1MUCTPI__L1MuctpiTool.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
-    
-    
-
-
     muctpi             = L1Muctpi()
     muctpi.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
     
@@ -464,9 +466,10 @@ if opt.doL1Sim:
     ctp.DoL1Topo    = False
     ctp.TrigConfigSvc = svcMgr.LVL1ConfigSvc
     ctpSim      = seqAND("ctpSim", [ctp, RoIBuilder("RoIBuilder")])
+    l1topoSim = L1TopoSimulation()
+    l1topoSim.MuonInputProvider.MuctpiSimTool = l1muctpiTool
     
-    l1Sim = seqAND("l1Sim", [l1CaloSim, l1MuonSim, ctpSim] )
-    
+    l1Sim = seqAND("l1Sim", [l1CaloSim, l1MuonSim, ctpSim, l1topoSim ] )
     topSequence += l1Sim
 
 if opt.doL1Unpacking:
-- 
GitLab


From 2128a68f768009b51423987e92174af38b8a9280 Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Thu, 2 May 2019 15:41:10 +0200
Subject: [PATCH 066/129] TileByteStream: Use private tools in
 TileRawChannelContByteStreamTool

---
 .../TileRawChannelContByteStreamTool.h               | 12 +++++++-----
 .../src/TileRawChannelContByteStreamTool.cxx         |  4 +---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h
index 6b54d45c6994..20c8edb54a6d 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h
@@ -1,16 +1,16 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TILEBYTESTREAM_TILERAWCHANNELCONTRAWEVENTTOOL_H
 #define TILEBYTESTREAM_TILERAWCHANNELCONTRAWEVENTTOOL_H
 
+#include "TileByteStream/TileHid2RESrcID.h"
+
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "ByteStreamCnvSvcBase/FullEventAssembler.h" 
 
-#include "TileByteStream/TileHid2RESrcID.h"
-
 class TileHWID;
 class TileRawChannelContainer;
 class TileFastRawChannel;
@@ -65,10 +65,12 @@ class TileRawChannelContByteStreamTool: public AthAlgTool {
     bool m_doFragType5;
 
     /** Handle to Tile calibration tool */
-    ToolHandle<TileCondToolEmscale> m_tileToolEmscale;
+    ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this,
+        "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale conditions tool"};
 
     /** Handle to Tile bad channel tool */
-    ToolHandle<ITileBadChanTool> m_tileBadChanTool;
+    ToolHandle<ITileBadChanTool> m_tileBadChanTool{this,
+        "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
 
     /** internal array for all TileRawChannels */
     TileFastRawChannel* m_channels;
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx
index 71ed1c18b4b8..d257a1a2cb77 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -37,8 +37,6 @@ TileRawChannelContByteStreamTool::TileRawChannelContByteStreamTool(const std::st
     , m_tileHWID(0)
     , m_hid2re(0)
     , m_verbose(false)
-    , m_tileToolEmscale("TileCondToolEmscale")
-    , m_tileBadChanTool("TileBadChanTool")
     , m_channels(nullptr)
     , m_maxChannels(TileCalibUtils::MAX_CHAN)
 {
-- 
GitLab


From 31137dcb0df85e6ae12c032e06cbe5135021f6a9 Mon Sep 17 00:00:00 2001
From: Siarhei Harkusha <Siarhei.Harkusha@cern.ch>
Date: Thu, 2 May 2019 17:00:41 +0200
Subject: [PATCH 067/129] TileConditions: Add check if Tile RUN3 cabling is
 used

Convenient function isRun3Cabling() has been added into TileCablingService
for checking if Tile RUN3 cabling is used.
---
 .../TileConditions/TileConditions/TileCablingService.h        | 3 ++-
 TileCalorimeter/TileConditions/src/TileCablingService.cxx     | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h b/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
index eb785cf28ad1..9fa44eb28fba 100644
--- a/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
+++ b/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
@@ -271,6 +271,7 @@ private:
 
    bool m_run2;
    bool m_run2plus;
+   bool m_run3;
 
    int m_maxChannels;
    int m_maxGains;
@@ -288,7 +289,7 @@ public:
     inline int                 getCablingType()    const { return m_cablingType; }
     inline bool                isRun2Cabling()     const { return m_run2; }
     inline bool                isRun2PlusCabling() const { return m_run2plus; }
-
+    inline bool                isRun3Cabling()     const { return m_run3; }
 };
 
 #endif // TILECONDITIONS_TILECABLINGSERVICE_H
diff --git a/TileCalorimeter/TileConditions/src/TileCablingService.cxx b/TileCalorimeter/TileConditions/src/TileCablingService.cxx
index 65fe672f0652..d644a0f8f04e 100644
--- a/TileCalorimeter/TileConditions/src/TileCablingService.cxx
+++ b/TileCalorimeter/TileConditions/src/TileCablingService.cxx
@@ -38,6 +38,7 @@ TileCablingService::TileCablingService()
   , m_E1mergedRun2Plus(128, 0)
   , m_run2(false)
   , m_run2plus(false)
+  , m_run3(false)
   , m_maxChannels(TileCalibUtils::MAX_CHAN)
   , m_maxGains(TileCalibUtils::MAX_GAIN)
   , m_msg("TileCablingService")
@@ -259,7 +260,8 @@ TileCablingService::setCablingType(TileCablingService::TileCablingType type)
               || type == TileCablingService::RUN2aCabling
               || type == TileCablingService::UpgradeABC);
 
-    m_run2plus = (m_run2 || type == TileCablingService::RUN3Cabling);
+    m_run3 = (type == TileCablingService::RUN3Cabling);
+    m_run2plus = (m_run2 || m_run3);
 
     if (type == TileCablingService::RUN3Cabling) {
       setRun3Merged();
-- 
GitLab


From ba3ea076d00c2c37b014250f730849b6d2123b1d Mon Sep 17 00:00:00 2001
From: Stewart Martin-Haugh <smh@cern.ch>
Date: Thu, 2 May 2019 17:33:16 +0200
Subject: [PATCH 068/129] Print object, not pointer address

---
 Control/SGComps/src/SGInputLoader.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/SGComps/src/SGInputLoader.cxx b/Control/SGComps/src/SGInputLoader.cxx
index 62c537bda6f7..8e277cc5df3d 100644
--- a/Control/SGComps/src/SGInputLoader.cxx
+++ b/Control/SGComps/src/SGInputLoader.cxx
@@ -116,7 +116,7 @@ SGInputLoader::execute()
         toLoad.emplace(*obj);
       } else {
         ATH_MSG_WARNING("Will not auto-load proxy for non-EventStore object: "
-                        << obj);
+                        << *obj);
       }
     }
     m_load = toLoad;
-- 
GitLab


From 09ffa7b38ac0a7fe3eef93bd2f64eee9af107043 Mon Sep 17 00:00:00 2001
From: Rupert Tombs <rt500@cam.ac.uk>
Date: Mon, 29 Apr 2019 14:44:32 +0100
Subject: [PATCH 069/129] Split OutputStreamCfg item lists for each module

Move all OutputStreamCfg use to relevant modules. Give each an XXX_ItemList() function to avoid wildcard use. Remove unused imports.

Import OutputStreamCfg and correct flags symbol.

Add with SCTSiPropertiesCondAlg with addCondAlgo.

Introduce TRT with ComponentAccumulator

Implement TRT digitization and test in new config style. Add this to the combined digitization test. Add pixel digitization back, though not yet updated.

Update pixel to recent changes.

Remove dead code PixelConfigCondAlg from PixelConditionsSummaryConfig. Remove its redundant test. Clean PixelDigitizationConfigNew to match.

Comment out OutputStreamCfg features with FIXME tags

Remove early test exit.

Fix comment comment.

Move PixelConditions algorithms to their own config files.

Link PixelConditionsAlgorithms python. Correct merge order.

Replace keyword arguments
---
 .../PixelConditionsAlgorithms/CMakeLists.txt  |   2 +-
 .../python/PixelConditionsConfig.py           | 101 +++++++++
 .../PixelConditionsTools/CMakeLists.txt       |   6 -
 .../python/PixelConditionsSummaryConfig.py    |  14 +-
 .../test/PixelConditionsConfig_test.py        |  25 ---
 .../python/SCT_SiPropertiesConfig.py          |   2 +-
 .../python/BCM_DigitizationConfigNew.py       |  10 +-
 .../test/BCM_DigitizationConfigNew_test.py    |   7 -
 .../PixelDigitization/CMakeLists.txt          |   4 +
 .../python/PixelDigitizationConfigNew.py      | 209 ++++++++++++++++++
 .../test/PixelDigitizationConfigNew_test.py   |  53 +++++
 .../python/SCT_DigitizationConfigNew.py       |   7 +
 .../test/SCT_DigitizationConfigNew_test.py    |  53 +----
 .../TRT_Digitization/CMakeLists.txt           |   4 +
 .../python/TRT_DigitizationConfigNew.py       | 146 ++++++++++++
 .../test/TRT_DigitizationConfigNew_test.py    |  44 ++++
 .../python/TRT_PAI_ProcessConfigNew.py        |  21 ++
 .../python/CSC_DigitizationConfigNew.py       |   9 +
 .../test/CSC_DigitizationConfigNew_test.py    |   8 -
 .../python/MDT_DigitizationConfigNew.py       |   9 +
 .../test/MDT_DigitizationConfigNew_test.py    |   7 -
 .../python/RPC_DigitizationConfigNew.py       |  11 +-
 .../test/RPC_DigitizationConfigNew_test.py    |   7 -
 .../python/TGC_DigitizationConfigNew.py       |  13 +-
 .../test/TGC_DigitizationConfigNew_test.py    |   7 -
 .../test/DigitizationConfigNew_test.py        |  35 +--
 26 files changed, 665 insertions(+), 149 deletions(-)
 create mode 100644 InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
 delete mode 100755 InnerDetector/InDetConditions/PixelConditionsTools/test/PixelConditionsConfig_test.py
 create mode 100644 InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py
 create mode 100755 InnerDetector/InDetDigitization/PixelDigitization/test/PixelDigitizationConfigNew_test.py
 create mode 100644 InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py
 create mode 100755 InnerDetector/InDetDigitization/TRT_Digitization/test/TRT_DigitizationConfigNew_test.py
 create mode 100644 InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigNew.py

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt
index 17cd376f6394..6542ea727d5a 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt
@@ -56,5 +56,5 @@ atlas_add_component( PixelConditionsAlgorithms
    PixelCablingLib PixelConditionsAlgorithmsLib PathResolver )
 
 # Install files from the package:
-#atlas_install_joboptions( share/*.py )
+atlas_install_python_modules( python/*.py )
 
diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
new file mode 100644
index 000000000000..3b6b18a75f5a
--- /dev/null
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
@@ -0,0 +1,101 @@
+"""Define functions to configure Pixel conditions algorithms
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from IOVDbSvc.IOVDbSvcConfig import addFolders
+from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import (
+    PixelConfigCondAlg, PixelOfflineCalibCondAlg, PixelChargeCalibCondAlg
+)
+
+def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
+    """Return a ComponentAccumulator with configured PixelConfigCondAlg"""
+    acc = ComponentAccumulator()
+    acc.merge(addFolders(flags, "/PIXEL/PixMapOverlay", "PIXEL_OFL", className="CondAttrListCollection"))
+    # FIXME commented properties are not currently accepted by PixelConfigCondAlg
+    CondArgs = {}
+    CondArgs.update(
+        BunchSpace=25.0,
+        UseCalibConditions=True,
+        #BarrelAnalogThreshold=[-1,-1,-1,-1],
+        BarrelToTThreshold=[-1, 5, 5, 5],
+        BarrelCrossTalk=[0.06,0.06,0.06,0.06],
+        BarrelThermalNoise=[160.0,160.0,160.0,160.0],
+        #BarrelNoiseOccupancy=[5e-8,5e-8,5e-8,5e-8],
+        #BarrelDisableProbability=[9e-3,9e-3,9e-3,9e-3],
+        IBLNoiseShape=[0.0,1.0],
+        BLayerNoiseShape=[0.00000, 0.00596, 0.03491, 0.07058, 0.11991, 0.17971, 0.24105, 0.29884, 0.35167, 0.39912, 0.44188, 0.48016, 0.51471, 0.54587, 0.57405, 0.59958, 0.62288, 0.64411, 0.66360, 0.68159, 0.69823, 0.71362, 0.72781, 0.74096, 0.75304, 0.76415, 0.77438, 0.78383, 0.79256, 0.80066, 0.80821, 0.81547, 0.82246, 0.82918, 0.83501, 0.84054, 0.84576, 0.85078, 0.85558, 0.86018, 0.86455, 0.86875, 0.87273, 0.87653, 0.88020, 0.88369, 0.88705, 0.89027, 0.89336, 0.89633, 0.89921, 0.90195, 0.90460, 0.90714, 0.90961, 0.91198, 0.91426, 0.91644, 0.91853, 0.92055, 0.92250, 0.92435, 0.92611, 0.92782, 0.92947, 0.93105, 0.93257, 0.93404, 0.93547, 0.93688, 0.93822, 0.93953, 0.94079, 0.94201, 0.94318, 0.94432, 0.94542, 0.94649, 0.94751, 0.94851, 0.94949, 0.95045, 0.95137, 0.95227, 0.95314, 0.95399, 0.95483, 0.95563, 0.95646, 0.95729, 0.95812, 0.95896, 0.95980, 0.96063, 0.96144, 0.96224, 0.96301, 0.96377, 0.96451, 0.96521, 0.96590, 0.96657, 0.96722, 0.96787, 0.96849, 0.96911, 0.96971, 0.97031, 0.97090, 0.97148, 0.97204, 0.97260, 0.97314, 0.97367, 0.97421, 0.97474, 0.97525, 0.97576, 0.97627, 0.97676, 0.97722, 0.97769, 0.97815, 0.97861, 0.97906, 0.97950, 0.97992, 0.98033, 0.98073, 0.98111, 0.98147, 0.98182, 0.98216, 0.98249, 0.98281, 0.98312, 0.98343, 0.98374, 0.98402, 0.98430, 0.98456, 0.98482, 0.98507, 0.98532, 0.98555, 0.98579, 0.98602, 0.98624, 0.98646, 0.98668, 0.98690, 0.98711, 0.98732, 0.98753, 0.98773, 0.98793, 0.98813, 0.98832, 0.98851, 0.98870, 0.98888, 0.98907, 0.98925, 0.98943, 0.98961, 0.98979, 0.98996, 0.99014, 0.99031, 0.99048, 0.99064, 0.99081, 0.99098, 0.99114, 0.99131, 0.99147, 0.99163, 0.99179, 0.99194, 0.99210, 0.99225, 0.99240, 0.99256, 0.99271, 0.99286, 0.99300, 0.99315, 0.99329, 0.99344, 0.99358, 0.99372, 0.99386, 0.99400, 0.99414, 0.99427, 0.99440, 0.99453, 0.99466, 0.99479, 0.99491, 0.99503, 0.99515, 0.99527, 0.99538, 0.99549, 0.99560, 0.99571, 0.99582, 0.99592, 0.99602, 0.99613, 0.99623, 0.99633, 0.99643, 0.99653, 0.99662, 0.99672, 0.99682, 0.99691, 0.99701, 0.99710, 0.99719, 0.99728, 0.99737, 0.99746, 0.99755, 0.99764, 0.99772, 0.99781, 0.99790, 0.99798, 0.99806, 0.99814, 0.99823, 0.99831, 0.99839, 0.99847, 0.99855, 0.99863, 0.99871, 0.99879, 0.99887, 0.99895, 0.99902, 0.99910, 0.99918, 0.99925, 0.99933, 0.99940, 0.99948, 0.99955, 0.99963, 0.99971, 0.99978, 0.99985, 0.99993, 1.00000],
+        PixelNoiseShape=[0.00000, 0.00596, 0.03491, 0.07058, 0.11991, 0.17971, 0.24105, 0.29884, 0.35167, 0.39912, 0.44188, 0.48016, 0.51471, 0.54587, 0.57405, 0.59958, 0.62288, 0.64411, 0.66360, 0.68159, 0.69823, 0.71362, 0.72781, 0.74096, 0.75304, 0.76415, 0.77438, 0.78383, 0.79256, 0.80066, 0.80821, 0.81547, 0.82246, 0.82918, 0.83501, 0.84054, 0.84576, 0.85078, 0.85558, 0.86018, 0.86455, 0.86875, 0.87273, 0.87653, 0.88020, 0.88369, 0.88705, 0.89027, 0.89336, 0.89633, 0.89921, 0.90195, 0.90460, 0.90714, 0.90961, 0.91198, 0.91426, 0.91644, 0.91853, 0.92055, 0.92250, 0.92435, 0.92611, 0.92782, 0.92947, 0.93105, 0.93257, 0.93404, 0.93547, 0.93688, 0.93822, 0.93953, 0.94079, 0.94201, 0.94318, 0.94432, 0.94542, 0.94649, 0.94751, 0.94851, 0.94949, 0.95045, 0.95137, 0.95227, 0.95314, 0.95399, 0.95483, 0.95563, 0.95646, 0.95729, 0.95812, 0.95896, 0.95980, 0.96063, 0.96144, 0.96224, 0.96301, 0.96377, 0.96451, 0.96521, 0.96590, 0.96657, 0.96722, 0.96787, 0.96849, 0.96911, 0.96971, 0.97031, 0.97090, 0.97148, 0.97204, 0.97260, 0.97314, 0.97367, 0.97421, 0.97474, 0.97525, 0.97576, 0.97627, 0.97676, 0.97722, 0.97769, 0.97815, 0.97861, 0.97906, 0.97950, 0.97992, 0.98033, 0.98073, 0.98111, 0.98147, 0.98182, 0.98216, 0.98249, 0.98281, 0.98312, 0.98343, 0.98374, 0.98402, 0.98430, 0.98456, 0.98482, 0.98507, 0.98532, 0.98555, 0.98579, 0.98602, 0.98624, 0.98646, 0.98668, 0.98690, 0.98711, 0.98732, 0.98753, 0.98773, 0.98793, 0.98813, 0.98832, 0.98851, 0.98870, 0.98888, 0.98907, 0.98925, 0.98943, 0.98961, 0.98979, 0.98996, 0.99014, 0.99031, 0.99048, 0.99064, 0.99081, 0.99098, 0.99114, 0.99131, 0.99147, 0.99163, 0.99179, 0.99194, 0.99210, 0.99225, 0.99240, 0.99256, 0.99271, 0.99286, 0.99300, 0.99315, 0.99329, 0.99344, 0.99358, 0.99372, 0.99386, 0.99400, 0.99414, 0.99427, 0.99440, 0.99453, 0.99466, 0.99479, 0.99491, 0.99503, 0.99515, 0.99527, 0.99538, 0.99549, 0.99560, 0.99571, 0.99582, 0.99592, 0.99602, 0.99613, 0.99623, 0.99633, 0.99643, 0.99653, 0.99662, 0.99672, 0.99682, 0.99691, 0.99701, 0.99710, 0.99719, 0.99728, 0.99737, 0.99746, 0.99755, 0.99764, 0.99772, 0.99781, 0.99790, 0.99798, 0.99806, 0.99814, 0.99823, 0.99831, 0.99839, 0.99847, 0.99855, 0.99863, 0.99871, 0.99879, 0.99887, 0.99895, 0.99902, 0.99910, 0.99918, 0.99925, 0.99933, 0.99940, 0.99948, 0.99955, 0.99963, 0.99971, 0.99978, 0.99985, 0.99993, 1.00000],
+        FEI3BarrelLatency=[ -1, 151, 256, 256],
+        FEI3BarrelHitDuplication=[False, False, False, False],
+        FEI3BarrelSmallHitToT=[-1, -1, -1, -1],
+        FEI3BarrelTimingSimTune=[2015,2015,2015,2015],
+        FEI4BarrelHitDiscConfig=[2],
+        #EndcapAnalogThreshold=[-1,-1,-1,],
+        EndcapToTThreshold=[ 5, 5, 5],
+        EndcapCrossTalk=[0.06,0.06,0.06],
+        EndcapThermalNoise=[160.0,160.0,160.0],
+        #EndcapNoiseOccupancy=[5e-8,5e-8,5e-8],
+        #EndcapDisableProbability=[9e-3,9e-3,9e-3],
+        #EndcapNoiseShape=[[0.0,1.0],[0.0,1.0],[0.0,1.0]],
+        FEI3EndcapLatency=[256, 256, 256],
+        FEI3EndcapHitDuplication=[False, False, False],
+        FEI3EndcapSmallHitToT=[-1, -1, -1],
+        FEI3EndcapTimingSimTune=[2015,2015,2015],
+        #DBMAnalogThreshold=[-1,-1,-1],
+        DBMToTThreshold=[-1,-1,-1],
+        DBMCrossTalk=[0.06,0.06,0.06],
+        DBMThermalNoise=[160.0,160.0,160.0],
+        #DBMNoiseOccupancy=[5e-8,5e-8,5e-8],
+        #DBMDisableProbability=[9e-3,9e-3,9e-3],
+        #DBMNoiseShape=[[0.0,1.0],[0.0,1.0],[0.0,1.0]],
+        FEI4EndcapHitDiscConfig=[2,2,2],
+    )
+    if flags.Beam.Type == "cosmics":
+        CondArgs.update(
+            UseComTime=True,
+            BarrelTimeJitter=[25.0,25.0,25.0,25.0],
+            EndcapTimeJitter=[25.0,25.0,25.0],
+            DBMTimeJitter=[25.0,25.0,25.0],
+            BarrelNumberOfBCID=[8,8,8,8],
+            EndcapNumberOfBCID=[8,8,8],
+            DBMNumberOfBCID=[8,8,8],
+            BarrelTimeOffset=[100.0,100.0,100.0,100.0],
+            EndcapTimeOffset=[100.0,100.0,100.0],
+            DBMTimeOffset=[100.0,100.0,100.0],
+        )
+    else:
+        CondArgs.update(
+            UseComTime=False,
+            BarrelTimeJitter=[0.0,0.0,0.0,0.0],
+            EndcapTimeJitter=[0.0,0.0,0.0],
+            DBMTimeJitter=[0.0,0.0,0.0],
+            BarrelNumberOfBCID=[1,1,1,1],
+            EndcapNumberOfBCID=[1,1,1],
+            DBMNumberOfBCID=[1,1,1],
+            BarrelTimeOffset=[5.0,5.0,5.0,5.0],
+            EndcapTimeOffset=[5.0,5.0,5.0],
+            DBMTimeOffset=[5.0,5.0,5.0],
+        )
+    # set default kwargs
+    CondArgs.update(kwargs)
+    acc.addCondAlgo(PixelConfigCondAlg(name, **CondArgs))
+    return acc
+
+def PixelChargeCalibCondAlgCfg(flags, name="PixelChargeCalibCondAlg", **kwargs):
+    """Return a ComponentAccumulator with configured PixelChargeCalibCondAlg"""
+    acc = ComponentAccumulator()
+    acc.merge(addFolders(flags, "/PIXEL/PixCalib", "PIXEL_OFL", className="CondAttrListCollection"))
+    kwargs.setdefault("ReadKey", "/PIXEL/PixCalib")
+    acc.addCondAlgo(PixelChargeCalibCondAlg(name, **kwargs))
+    return acc
+
+def PixelOfflineCalibCondAlgCfg(flags, name="PixelOfflineCalibCondAlg", **kwargs):
+    """Return a ComponentAccumulator with configured PixelOfflineCalibCondAlg"""
+    acc = ComponentAccumulator()
+    acc.merge(addFolders(flags, "/PIXEL/PixReco", "PIXEL_OFL", className="DetCondCFloat"))
+    kwargs.setdefault("ReadKey", "/PIXEL/PixReco")
+    kwargs.setdefault("InputSource", 2)
+    acc.addCondAlgo(PixelOfflineCalibCondAlg(name, **kwargs))
+    return acc
+
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt
index 8c38cd1036d1..0209bebcef78 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt
@@ -51,12 +51,6 @@ atlas_add_component( PixelConditionsTools
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                      LINK_LIBRARIES ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GeoPrimitives GaudiKernel AthenaBaseComps SGTools AthenaPoolUtilities DetDescrConditions Identifier PixelConditionsData PixelCoralClientUtils InDetIdentifier GeoModelUtilities InDetReadoutGeometry PathResolver ${extra_lib} )
 
-if( NOT SIMULATIONBASE )
-  atlas_add_test( PixelConditionsConfig_test
-                  SCRIPT test/PixelConditionsConfig_test.py
-                  PROPERTIES TIMEOUT 300 )
-endif()
-
 # Install files from the package:
 atlas_install_headers( PixelConditionsTools )
 atlas_install_joboptions( share/*.py )
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py
index 1f5af82d70f2..22fccb9d3d1c 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py
@@ -1,13 +1,13 @@
-"""Define methods to configure PixelConditionsSummary
+"""Define a function to configure PixelConditionsSummaryCfg
 
 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline, addFolders
 from PixelConditionsTools.PixelConditionsToolsConf import PixelConditionsSummaryTool
 from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelTDAQCondAlg
-from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg
 from PixelConditionsTools.PixelDCSConditionsConfig import PixelDCSConditionsCfg
+from PixelConditionsAlgorithms.PixelConditionsConfig import PixelConfigCondAlgCfg
 
 def PixelConditionsSummaryCfg(flags, name="PixelConditionsSummary", **kwargs):
     """Return configured ComponentAccumulator and tool for PixelDCSConditions"""
@@ -27,9 +27,7 @@ def PixelConditionsSummaryCfg(flags, name="PixelConditionsSummary", **kwargs):
         acc.merge(addFolders(flags, PixelDeadMapFolder, "PIXEL_OFL","CondAttrListCollection"))
         acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixMapOverlay",
                                         "/PIXEL/PixMapOverlay", "CondAttrListCollection"))
-    acc.addCondAlgo(PixelConfigCondAlg(name=name + "CondAlg", 
-                                       UseDeadMap=kwargs["UseDeadMap"],
-                                       ReadDeadMapKey=PixelDeadMapFolder))
-    tool = PixelConditionsSummaryTool(name=name + "Tool", **kwargs)
-    return acc, tool
+    acc.merge(PixelConfigCondAlgCfg(flags, UseDeadMap=kwargs["UseDeadMap"], ReadDeadMapKey=PixelDeadMapFolder))
+    acc.setPrivateTools(PixelConditionsSummaryTool(name=name + "Tool", **kwargs))
+    return acc
 
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelConditionsConfig_test.py b/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelConditionsConfig_test.py
deleted file mode 100755
index 182a291c0788..000000000000
--- a/InnerDetector/InDetConditions/PixelConditionsTools/test/PixelConditionsConfig_test.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-"""Run tests on PixelConditionsTools/python/*Config.py scripts
-
-Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-"""
-from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from AthenaConfiguration.AllConfigFlags import ConfigFlags
-from AthenaConfiguration.TestDefaults import defaultTestFiles
-from AthenaCommon.Logging import log
-from AthenaCommon.Constants import DEBUG
-from AthenaCommon.Configurable import Configurable
-from PixelConditionsTools.PixelDCSConditionsConfig import PixelDCSConditionsCfg
-from PixelConditionsTools.PixelConditionsSummaryConfig import PixelConditionsSummaryCfg
-
-# test setup
-log.setLevel(DEBUG)
-Configurable.configurableRun3Behavior = True
-ConfigFlags.Input.Files = defaultTestFiles.HITS
-# test
-DCSAcc = PixelDCSConditionsCfg(ConfigFlags, name="DCSTest")
-SummaryAcc, SummaryTool = PixelConditionsSummaryCfg(ConfigFlags, name="SummaryTest")
-# prevent raise on __del__
-DCSAcc.wasMerged()
-SummaryAcc.wasMerged()
-
diff --git a/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py b/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py
index 5ce6c514b4dd..d6922564b576 100644
--- a/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py
+++ b/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesConfig.py
@@ -20,7 +20,7 @@ def SCT_SiPropertiesCfg(flags, name="SCTSiPropertiesCondAlg", **kwargs):
     acc = ComponentAccumulator()
     tool = kwargs.get("SiPropertiesTool", SCT_SiPropertiesToolCfg(flags))
     alg = SCTSiPropertiesCondAlg(name, **kwargs)
-    acc.addEventAlgo(alg)
+    acc.addCondAlgo(alg)
     acc.setPrivateTools(tool)
     return acc
 
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py b/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py
index cf5932a14943..65503e3ac15b 100755
--- a/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py
@@ -5,6 +5,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 from RngComps.RandomServices import RNG, AthEngines
 from PileUpComps.PileUpCompsConf import PileUpXingFolder
 from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from BCM_Digitization.BCM_DigitizationConf import BCM_DigitizationTool, BCM_Digitization
 
 # The earliest and last bunch crossing times for which interactions will be sent
@@ -15,7 +16,11 @@ def BCM_FirstXing():
 def BCM_LastXing():
     return 0
 
-def BCM_RangeCfg(flags, name="BCM_Range" , **kwargs):
+def BCM_ItemList():
+    """Return list of item names needed for BCM output"""
+    return ["InDetSimDataCollection#*", "BCM_RDO_Container#*"]
+
+def BCM_RangeCfg(flags, name="BCM_Range", **kwargs):
     """Return a BCM configured PileUpXingFolder tool"""
     kwargs.setdefault("FirstXing", BCM_FirstXing())
     kwargs.setdefault("LastXing",  BCM_LastXing())
@@ -62,6 +67,8 @@ def BCM_DigitizationCfg(flags, name="BCM_OverlayDigitization", **kwargs):
         tool = acc.popToolsAndMerge(BCM_DigitizationToolCfg(flags, **kwargs))
         kwargs["DigitizationTool"] = tool
     acc.addEventAlgo(BCM_Digitization(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", BCM_ItemList()))
     return acc
 
 def BCM_OverlayDigitizationToolCfg(flags, name="BCM_OverlayDigitizationTool", **kwargs):
@@ -75,5 +82,6 @@ def BCM_OverlayDigitizationCfg(flags, name="BCM_OverlayDigitization", **kwargs):
     tool = acc.popToolsAndMerge(BCM_OverlayDigitizationToolCfg(flags, **kwargs))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(BCM_Digitization(name, **kwargs))
+    acc.merge(OutputStreamCfg(flags, "RDO", BCM_ItemList()))
     return acc
 
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/test/BCM_DigitizationConfigNew_test.py b/InnerDetector/InDetDigitization/BCM_Digitization/test/BCM_DigitizationConfigNew_test.py
index a2b4330e42c2..0575f83d9eb6 100755
--- a/InnerDetector/InDetDigitization/BCM_Digitization/test/BCM_DigitizationConfigNew_test.py
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/test/BCM_DigitizationConfigNew_test.py
@@ -12,7 +12,6 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
 from BCM_Digitization.BCM_DigitizationConfigNew import BCM_DigitizationCfg
@@ -31,12 +30,6 @@ ConfigFlags.lock()
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(BCM_DigitizationCfg(ConfigFlags))
-# Add configuration to write HITS pool file
-ItemList = [
-    "InDetSimDataCollection#*",
-    "BCM_RDO_Container#*",
-]
-acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList=ItemList))
 # Dump config
 acc.getService("StoreGateSvc").Dump=True
 acc.getService("ConditionStore").Dump = True
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt
index 144705dfd91a..efc5c66009bc 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt
+++ b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt
@@ -44,6 +44,10 @@ atlas_add_component( PixelDigitization
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier xAODEventInfo GeneratorObjects PixelConditionsData SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver )
 
+atlas_add_test( PixelDigitizationConfigNew_test
+                SCRIPT test/PixelDigitizationConfigNew_test.py
+                PROPERTIES TIMEOUT 300 )
+
 # Install files from the package:
 atlas_install_headers( PixelDigitization )
 atlas_install_python_modules( python/*.py )
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py
new file mode 100644
index 000000000000..934e1c82c4fd
--- /dev/null
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py
@@ -0,0 +1,209 @@
+"""Define methods to construct configured Pixel Digitization tools and algorithms
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline, addFolders
+from PileUpComps.PileUpCompsConf import PileUpXingFolder
+from PixelCabling.PixelCablingConfigNew import PixelCablingSvcCfg
+from PixelDigitization.PixelDigitizationConf import (
+    PixelDigitizationTool, PixelDigitization, ChargeCollProbSvc,
+    EnergyDepositionTool, SensorSimPlanarTool, SensorSim3DTool,
+    RD53SimTool, FEI4SimTool, FEI3SimTool,
+)
+from SiPropertiesTool.PixelSiPropertiesConfig import PixelSiPropertiesCfg
+from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleCfg
+from PixelConditionsTools.PixelConditionsSummaryConfig import PixelConditionsSummaryCfg
+from PixelConditionsAlgorithms.PixelConditionsConfig import PixelChargeCalibCondAlgCfg, PixelOfflineCalibCondAlgCfg
+from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+from StoreGate.StoreGateConf import StoreGateSvc
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+
+# The earliest and last bunch crossing times for which interactions will be sent
+# to the Pixel Digitization code
+def Pixel_FirstXing(flags):
+    if flags.Beam.estimatedLuminosity > 0.5e33:
+        return -25
+    else:
+        return -50
+
+def Pixel_LastXing(flags):
+    if flags.Beam.estimatedLuminosity > 0.5e33:
+        if flags.Beam.BunchSpacing > 50:
+            return 75
+        else:
+            return 25
+    else:
+        return 100
+
+def PixelItemList():
+    """Return list of item names needed for Pixel output"""
+    return ["InDet::SiClusterContainer#*", "InDet::PixelGangedClusterAmbiguities#*", "PixelRDO_Container#*"]
+
+def ChargeCollProbSvcCfg(name="ChargeCollProbSvc", **kwargs):
+    """Return a Charge Collection Prob service"""
+    return ChargeCollProbSvc(name, **kwargs)
+
+def EnergyDepositionToolCfg(flags, name="EnergyDepositionTool", **kwargs):
+    """Return a configured EnergyDepositionTool"""
+    kwargs.setdefault("DeltaRayCut", 117.)
+    kwargs.setdefault("nCols", 5)
+    kwargs.setdefault("LoopLimit", 100000)
+    kwargs.setdefault("doBichsel", True)
+    kwargs.setdefault("doBichselBetaGammaCut", 0.7) # dEdx not quite consistent below this
+    kwargs.setdefault("doDeltaRay", False)          # needs validation
+    kwargs.setdefault("doPU", True)
+    return EnergyDepositionTool(name, **kwargs)
+
+def SensorSimPlanarToolCfg(flags, name="SensorSimPlanarTool", **kwargs):
+    """Return a ComponentAccumulator with configured SensorSimPlanarTool"""
+    acc = PixelSiPropertiesCfg(flags)
+    SiTool = acc.popPrivateTools()
+    LorentzTool = acc.popToolsAndMerge(PixelLorentzAngleCfg(flags))
+    kwargs.setdefault("SiPropertiesTool", SiTool)
+    kwargs.setdefault("LorentzAngleTool", LorentzTool)
+    acc.setPrivateTools(SensorSimPlanarTool(name, **kwargs))
+    return acc
+
+def SensorSim3DToolCfg(flags, name="SensorSim3DTool", **kwargs):
+    """Return a ComponentAccumulator with configured SensorSim3DTool"""
+    acc = PixelSiPropertiesCfg(flags)
+    SiTool = acc.popPrivateTools()
+    LorentzTool = acc.popToolsAndMerge(PixelLorentzAngleCfg(flags))
+    kwargs.setdefault("SiPropertiesTool", SiTool)
+    acc.setPrivateTools(SensorSim3DTool(name, **kwargs))
+    return acc
+
+def BarrelRD53SimToolCfg(flags, name="BarrelRD53SimTool", **kwargs):
+    """Return a RD53SimTool configured for Barrel"""
+    kwargs.setdefault("BarrelEC", 0)
+    return RD53SimTool(name, **kwargs)
+
+def EndcapRD53SimToolCfg(flags, name="EndcapRD53SimTool", **kwargs):
+    """Return a RD53SimTool configured for Endcap"""
+    kwargs.setdefault("BarrelEC", 2)
+    return RD53SimTool(name, **kwargs)
+
+def BarrelFEI4SimToolCfg(flags, name="BarrelFEI4SimTool", **kwargs):
+    """Return a FEI4SimTool configured for Barrel"""    
+    kwargs.setdefault("BarrelEC", 0)
+    return FEI4SimTool(name, **kwargs)
+
+def DBMFEI4SimToolCfg(flags, name="DBMFEI4SimTool", **kwargs):
+    """Return a FEI4SimTool configured for Endcap"""
+    kwargs.setdefault("BarrelEC", 4)
+    return FEI4SimTool(name, **kwargs)
+
+def BarrelFEI3SimToolCfg(flags, name="BarrelFEI3SimTool", **kwargs):
+    """Return a FEI3SimTool configured for Barrel"""
+    kwargs.setdefault("BarrelEC", 0)
+    return FEI3SimTool(name, **kwargs)
+
+def EndcapFEI3SimToolCfg(flags, name="EndcapFEI3SimTool", **kwargs):
+    """Return a FEI3SimTool configured for Endcap"""
+    kwargs.setdefault("BarrelEC", 2)
+    return FEI3SimTool(name, **kwargs)
+
+def PixelDigitizationBasicToolCfg(flags, name="PixelDigitizationTool", **kwargs):
+    """Return a ComponentAccumulator with configured PixelDigitizationTool"""
+    acc = PixelGeometryCfg(flags)
+    acc.popToolsAndMerge(PixelConditionsSummaryCfg(flags))
+    acc.merge(PixelChargeCalibCondAlgCfg(flags))
+    acc.popToolsAndMerge(PixelSiPropertiesCfg(flags))
+    acc.popToolsAndMerge(PixelLorentzAngleCfg(flags))
+    acc.merge(PixelCablingSvcCfg(flags))
+    acc.merge(PixelOfflineCalibCondAlgCfg(flags))
+    # set up tool handle lists
+    chargeTools = []
+    feSimTools = []
+    chargeTools.append(acc.popToolsAndMerge(SensorSimPlanarToolCfg(flags)))
+    if flags.GeoModel.Run == "RUN4":
+        feSimTools.append(BarrelRD53SimToolCfg(flags))
+        feSimTools.append(EndcapRD53SimToolCfg(flags))
+    else:
+        chargeTools.append(acc.popToolsAndMerge(SensorSim3DToolCfg(flags)))
+        feSimTools.append(BarrelFEI4SimToolCfg(flags))
+        feSimTools.append(DBMFEI4SimToolCfg(flags))
+        feSimTools.append(BarrelFEI3SimToolCfg(flags))
+        feSimTools.append(EndcapFEI3SimToolCfg(flags))
+    kwargs.setdefault("InputObjectName", "PixelHits")
+    kwargs.setdefault("ChargeTools", chargeTools)
+    kwargs.setdefault("FrontEndSimTools", feSimTools)
+    kwargs.setdefault("EnergyDepositionTool", EnergyDepositionToolCfg(flags)) 
+    if flags.Digitization.DoXingByXingPileUp:
+        kwargs.setdefault("FirstXing", Pixel_FirstXing(flags))
+        kwargs.setdefault("LastXing", Pixel_LastXing(flags))
+    acc.setPrivateTools(PixelDigitizationTool(name, **kwargs))
+    return acc
+
+def PixelDigitizationToolCfg(flags, name="PixelDigitizationTool", **kwargs):
+    """Return a ComponentAccumulator with configured BasicPixelDigitizationTool"""
+    kwargs.setdefault("HardScatterSplittingMode", 0)
+    return PixelDigitizationBasicToolCfg(flags, name, **kwargs)
+
+def PixelGeantinoTruthDigitizationToolCfg(flags, name="PixelGeantinoTruthDigitizationTool", **kwargs):
+    """Return a configured PixelDigitizationTool"""
+    kwargs.setdefault("ParticleBarcodeVeto", 0)
+    return PixelDigitizationTool(name, **kwargs)
+
+def PixelDigitizationHSToolCfg(flags, name="PixelDigitizationToolHS", **kwargs):
+    """Return a ComponentAccumulator with PixelDigitizationTool configured for Hard Scatter"""
+    kwargs.setdefault("HardScatterSplittingMode", 1)
+    return PixelDigitizationBasicToolCfg(flags, name, **kwargs)
+
+def PixelDigitizationPUToolCfg(flags, name="PixelDigitizationToolPU", **kwargs):
+    """Return a ComponentAccumulator with PixelDigitizationTool configured for PileUp"""
+    kwargs.setdefault("HardScatterSplittingMode", 2)
+    kwargs.setdefault("RDOCollName", "Pixel_PU_RDOs")
+    kwargs.setdefault("SDOCollName", "Pixel_PU_SDO_Map")
+    return PixelDigitizationBasicToolCfg(flags, name, **kwargs)
+
+def PixelDigitizationSplitNoMergePUToolCfg(flags, name="PixelDigitizationToolSplitNoMergePU", **kwargs):
+    """Return a ComponentAccumulator with PixelDigitizationTool configured for PileUpPixelHits"""
+    kwargs.setdefault("HardScatterSplittingMode", 0)
+    kwargs.setdefault("InputObjectName", "PileupPixelHits")
+    kwargs.setdefault("RDOCollName", "Pixel_PU_RDOs")
+    kwargs.setdefault("SDOCollName", "Pixel_PU_SDO_Map")
+    return PixelDigitizationBasicToolCfg(flags, name, **kwargs)
+
+def PixelDigitizationOverlayToolCfg(flags, name="PixelDigitizationOverlayTool", **kwargs):
+    """Return a ComponentAccumulator with PixelDigitizationTool configured for overlay"""
+    acc = ComponentAccumulator()
+    acc.addService(StoreGateSvc(flags.Overlay.Legacy.EventStore))
+    kwargs.setdefault("EvtStore", flags.Overlay.Legacy.EventStore)
+    kwargs.setdefault("RDOCollName", flags.Overlay.Legacy.EventStore + "+PixelRDOs")
+    kwargs.setdefault("SDOCollName", flags.Overlay.Legacy.EventStore + "+PixelSDO_Map")
+    kwargs.setdefault("HardScatterSplittingMode", 0)
+    return PixelDigitizationBasicToolCfg(flags, name, **kwargs)
+
+def PixelRangeCfg(flags, name="PixelRange", **kwargs):
+    """Return a configured PileUpXingFolder tool"""
+    kwargs.setdefault("FirstXing", Pixel_FirstXing(flags))
+    kwargs.setdefault("LastXing", Pixel_LastXing(flags))
+    kwargs.setdefault("CacheRefreshFrequency", 1.0) # default 0 no dataproxy reset
+    kwargs.setdefault("ItemList", ["SiHitCollection#PixelHits"])
+    return PileUpXingFolder(name, **kwargs)
+
+def PixelDigitizationCfg(toolCfg, flags, name="PixelDigitization", **kwargs):
+    """Return a ComponentAccumulator with toolCfg type Pixel digitization"""
+    acc = ComponentAccumulator()
+    if "DigitizationTool" not in kwargs:
+        tool = acc.popToolsAndMerge(toolCfg(flags))
+        kwargs["DigitizationTool"] = tool
+    acc.addEventAlgo(PixelDigitization(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", PixelItemList()))
+    return acc
+
+def PixelDigitizationHSCfg(flags, name="PixelDigitizationHS", **kwargs):
+    """Return a ComponentAccumulator with Hard Scatter Pixel Digitization"""
+    return PixelDigitizationCfg(PixelDigitizationHSToolCfg, flags, name, **kwargs)
+
+def PixelDigitizationPUCfg(flags, name="PixelDigitizationPU", **kwargs):
+    """Return a ComponentAccumulator with Hard Scatter Pixel Digitization"""
+    return PixelDigitizationCfg(PixelDigitizationPUToolCfg, flags, name, **kwargs)
+
+def PixelDigitizationOverlayCfg(flags, name="PixelDigitizationOverlay", **kwargs):
+    """Return a ComponentAccumulator with Hard Scatter Pixel Digitization"""
+    return PixelDigitizationCfg(PixelDigitizationOverlayToolCfg, flags, name, **kwargs)
+
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/test/PixelDigitizationConfigNew_test.py b/InnerDetector/InDetDigitization/PixelDigitization/test/PixelDigitizationConfigNew_test.py
new file mode 100755
index 000000000000..94c4e0b8bd14
--- /dev/null
+++ b/InnerDetector/InDetDigitization/PixelDigitization/test/PixelDigitizationConfigNew_test.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+"""Run tests on SCT_DigitizationConfigNew.py
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+import sys
+from AthenaCommon.Logging import log
+from AthenaCommon.Constants import DEBUG
+from AthenaCommon.Configurable import Configurable
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+from AthenaConfiguration.TestDefaults import defaultTestFiles
+from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+from PixelDigitization.PixelDigitizationConfigNew import (
+    ChargeCollProbSvcCfg, EnergyDepositionToolCfg, SensorSimPlanarToolCfg, SensorSim3DToolCfg,
+    BarrelRD53SimToolCfg, EndcapRD53SimToolCfg, BarrelFEI4SimToolCfg, DBMFEI4SimToolCfg,
+    BarrelFEI3SimToolCfg, EndcapFEI3SimToolCfg, PixelDigitizationBasicToolCfg, PixelDigitizationToolCfg,
+    PixelGeantinoTruthDigitizationToolCfg, PixelDigitizationHSToolCfg, PixelDigitizationPUToolCfg,
+    PixelDigitizationSplitNoMergePUToolCfg, PixelDigitizationOverlayToolCfg, PixelRangeCfg,
+    PixelDigitizationHSCfg, PixelDigitizationPUCfg, PixelDigitizationOverlayCfg,
+)
+from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
+from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
+
+# Set up logging and new style config
+log.setLevel(DEBUG)
+Configurable.configurableRun3Behavior = True
+# Configure
+ConfigFlags.join(createDigitizationCfgFlags())
+ConfigFlags.join(createOverlayCfgFlags())
+ConfigFlags.Input.Files = defaultTestFiles.HITS
+ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+ConfigFlags.GeoModel.Align.Dynamic = False
+ConfigFlags.GeoModel.Type = "BrlIncl4.0_ref"
+ConfigFlags.Beam.NumberOfCollisions = 0.
+ConfigFlags.lock()
+# Construct our accumulator to run
+acc = MainServicesSerialCfg()
+acc.merge(PoolReadCfg(ConfigFlags))
+acc.merge(PixelDigitizationHSCfg(ConfigFlags))
+# Dump config
+acc.getService("StoreGateSvc").Dump = True
+acc.getService("ConditionStore").Dump = True
+acc.printConfig(withDetails=True)
+ConfigFlags.dump()
+# Execute and finish
+sc = acc.run(maxEvents=3)
+# Success should be 0
+sys.exit(not sc.isSuccess())
+
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py
index 7ea7668edcfc..b2dbc01bb6e9 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py
@@ -14,6 +14,7 @@ from SCT_Digitization.SCT_DigitizationConf import (
     SCT_Digitization,
 )
 from PileUpComps.PileUpCompsConf import PileUpXingFolder
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_RadDamageSummaryTool
 from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
 from SCT_ConditionsTools.SCT_DCSConditionsConfig import SCT_DCSConditionsCfg
@@ -31,6 +32,10 @@ def SCT_FirstXing():
 def SCT_LastXing():
     return 25
 
+def SCT_ItemList():
+    """Return list of item names needed for SCT output"""
+    return ["InDet::SiClusterContainer#*", "SCT_RDO_Container#*"]
+
 def SCT_DigitizationCommonCfg(flags, name="SCT_DigitizationToolCommon", **kwargs):
     """Return a ComponentAccumulator with common SCT digitization tool config"""
     acc = SCT_GeometryCfg(flags)
@@ -235,6 +240,8 @@ def SCT_DigitizationCfg(toolCfg, flags, name="SCT_Digitization", **kwargs):
         kwargs["DigitizationTool"] = tool
     alg = SCT_Digitization(name, **kwargs)
     acc.addEventAlgo(alg)
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", SCT_ItemList()))
     return acc
 
 def SCT_DigitizationHSCfg(flags, name="SCT_DigitizationHS", **kwargs):
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/test/SCT_DigitizationConfigNew_test.py b/InnerDetector/InDetDigitization/SCT_Digitization/test/SCT_DigitizationConfigNew_test.py
index 2650be8f0092..807153b9fdf5 100755
--- a/InnerDetector/InDetDigitization/SCT_Digitization/test/SCT_DigitizationConfigNew_test.py
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/test/SCT_DigitizationConfigNew_test.py
@@ -12,14 +12,7 @@ from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-from SCT_Digitization.SCT_DigitizationConfigNew import (
-    SCT_RandomDisabledCellGeneratorCfg, SCT_AmpCfg, SCT_SurfaceChargesGeneratorCfg,
-    SCT_FrontEndCfg, SCT_FrontEndPileupCfg, SCT_DigitizationCommonCfg, SCT_DigitizationToolCfg,
-    SCT_DigitizationToolGeantinoTruthCfg, SCT_DigitizationToolHSCfg, SCT_DigitizationToolPUCfg,
-    SCT_DigitizationToolSplitNoMergePUCfg, SCT_DigitizationToolOverlayCfg, SCT_DigitizationHSCfg,
-    SCT_DigitizationPUCfg, SCT_DigitizationOverlayCfg, SCT_RangeCfg,
-)
+from SCT_Digitization.SCT_DigitizationConfigNew import SCT_DigitizationHSCfg
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
 
@@ -34,54 +27,10 @@ ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
 ConfigFlags.GeoModel.Align.Dynamic = False
 ConfigFlags.Concurrency.NumThreads = 1
 ConfigFlags.lock()
-# Function tests
-tacc = SCT_DigitizationCommonCfg(ConfigFlags)
-tacc.popPrivateTools()
-acc1=SCT_DigitizationToolCfg(ConfigFlags)
-acc1.popPrivateTools()
-tacc.merge(acc1)
-acc2=SCT_DigitizationToolHSCfg(ConfigFlags)
-acc2.popPrivateTools()
-tacc.merge(acc2)
-acc3=SCT_DigitizationToolPUCfg(ConfigFlags)
-acc3.popPrivateTools()
-tacc.merge(acc3)
-acc4=SCT_DigitizationToolOverlayCfg(ConfigFlags)
-acc4.popPrivateTools()
-tacc.merge(acc4)
-acc6=SCT_DigitizationToolSplitNoMergePUCfg(ConfigFlags)
-acc6.popPrivateTools()
-tacc.merge(acc6)
-acc7=SCT_DigitizationToolGeantinoTruthCfg(ConfigFlags)
-acc7.popPrivateTools()
-tacc.merge(acc7)
-tool = SCT_RandomDisabledCellGeneratorCfg(ConfigFlags)
-tool = SCT_AmpCfg(ConfigFlags)
-acc8=SCT_SurfaceChargesGeneratorCfg(ConfigFlags)
-acc8.popPrivateTools()
-tacc.merge(acc8)
-acc9=SCT_FrontEndCfg(ConfigFlags)
-acc9.popPrivateTools()
-tacc.merge(acc9)
-acc10=SCT_FrontEndPileupCfg(ConfigFlags)
-acc10.popPrivateTools()
-tacc.merge(acc10)
-tool = SCT_RangeCfg(ConfigFlags)
-acc5=SCT_DigitizationHSCfg(ConfigFlags)
-acc5.popPrivateTools()
-tacc.merge(acc5)
-tacc.merge(SCT_DigitizationPUCfg(ConfigFlags))
-tacc.merge(SCT_DigitizationOverlayCfg(ConfigFlags))
-# reset to prevent errors on deletion
-tacc.__init__()
 # Construct our accumulator to run
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(SCT_DigitizationHSCfg(ConfigFlags))
-# Add configuration to write HITS pool file
-outConfig = OutputStreamCfg(ConfigFlags, "RDO",
-                            ItemList=["InDet::SiClusterContainer#*", "SCT_RDO_Container#*"])
-acc.merge(outConfig)
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/CMakeLists.txt b/InnerDetector/InDetDigitization/TRT_Digitization/CMakeLists.txt
index b90c97ac7e83..fe0b09ff1b1d 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/CMakeLists.txt
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/CMakeLists.txt
@@ -44,6 +44,10 @@ atlas_add_component( TRT_Digitization
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel PileUpToolsLib AthenaPoolUtilities GeoModelUtilities GeoPrimitives Identifier EventInfo GeneratorObjects TRT_ConditionsData TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry InDetRawData InDetSimData InDetSimEvent MagFieldInterfaces HitManagement )
 
+atlas_add_test( TRT_DigitizationConfigNew_test
+                SCRIPT test/TRT_DigitizationConfigNew_test.py
+                PROPERTIES TIMEOUT 300 )
+
 # Install files from the package:
 atlas_install_headers( TRT_Digitization )
 atlas_install_python_modules( python/*.py )
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py b/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py
new file mode 100644
index 000000000000..4064f61c2509
--- /dev/null
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py
@@ -0,0 +1,146 @@
+"""Define methods to construct configured TRT Digitization tools and algorithms
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from TRT_Digitization.TRT_DigitizationConf import TRTDigitizationTool, TRTDigitization
+from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
+from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
+from TRT_PAI_Process.TRT_PAI_ProcessConfigNew import TRT_PAI_Process_XeToolCfg
+from TRT_PAI_Process.TRT_PAI_ProcessConfigNew import TRT_PAI_Process_ArToolCfg
+from TRT_PAI_Process.TRT_PAI_ProcessConfigNew import TRT_PAI_Process_KrToolCfg
+from PileUpComps.PileUpCompsConf import PileUpXingFolder
+from PartPropSvc.PartPropSvcConf import PartPropSvc
+from StoreGate.StoreGateConf import StoreGateSvc
+from IOVDbSvc.IOVDbSvcConfig import addFolders
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+
+# The earliest and last bunch crossing times for which interactions will be sent
+# to the TRT Digitization code
+def TRT_FirstXing():
+    return -50
+
+def TRT_LastXing():
+    return 50
+
+def TRT_ItemList():
+    """Return list of item names needed for TRT output"""
+    return ["InDet::TRT_DriftCircleContainer#*", "TRT_RDO_Container#*"]
+
+def TRT_RangeCfg(flags, name="TRTRange", **kwargs):
+    """Return an TRT configured PileUpXingFolder tool"""
+    kwargs.setdefault("FirstXing", TRT_FirstXing())
+    kwargs.setdefault("LastXing", TRT_LastXing())
+    kwargs.setdefault("CacheRefreshFrequency", 1.0) #default 0 no dataproxy reset
+    kwargs.setdefault("ItemList", ["TRTUncompressedHitCollection#TRTUncompressedHits"])
+    return PileUpXingFolder(name, **kwargs)
+
+def TRT_DigitizationBasicToolCfg(flags, name="TRT_DigitizationBasicTool", **kwargs):
+    """Return a ComponentAccumulator with common TRT digitization tool config"""
+    acc = TRT_GeometryCfg(flags)
+    acc.merge(MagneticFieldSvcCfg(flags))
+    # included options
+    acc.addService(PartPropSvc(InputFile="PDGTABLE.MeV=PDG"))
+    if flags.Detector.Overlay and flags.Input.isMC:
+        acc.merge(addFolders("/TRT/Cond/DigVers", "TRT_OFL"))
+    # default arguments
+    kwargs.setdefault("PAI_Tool_Xe", TRT_PAI_Process_XeToolCfg(flags))
+    kwargs.setdefault("PAI_Tool_Ar", TRT_PAI_Process_ArToolCfg(flags))
+    kwargs.setdefault("PAI_Tool_Kr", TRT_PAI_Process_KrToolCfg(flags))
+    if not flags.Digitization.DoInnerDetectorNoise:
+        kwargs.setdefault("Override_noiseInSimhits", 0)
+        kwargs.setdefault("Override_noiseInUnhitStraws", 0)
+    kwargs.setdefault("Override_TrtRangeCutProperty", 0.05) # todo flags.InnerDetector.TRTRangeCut)
+    if flags.Beam.Type == "cosmics":
+        kwargs.setdefault("PrintDigSettings", True)
+        kwargs.setdefault("Override_cosmicFlag", 0)
+        kwargs.setdefault("Override_doCosmicTimingPit", 1)
+        kwargs.setdefault("Override_jitterTimeOffset", 0.)
+        kwargs.setdefault("Override_timeCorrection", 0)
+    if flags.Digitization.DoXingByXingPileUp:
+        kwargs.setdefault("FirstXing", TRT_FirstXing())
+        kwargs.setdefault("LastXing", TRT_LastXing())
+    tool = TRTDigitizationTool(name, **kwargs)
+    acc.setPrivateTools(tool)
+    return acc
+
+def TRT_DigitizationToolCfg(flags, name="TRT_DigitizationTool", **kwargs):
+    """Return a ComponentAccumulator with configured TRT digitization tool"""
+    if flags.Digitization.PileUpPremixing:
+        kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "TRT_RDOs")
+        kwargs.setdefault("OutputSDOName", flags.Overlay.BkgPrefix + "TRT_SDO_Map")
+    else:
+        kwargs.setdefault("OutputObjectName", "TRT_RDOs")
+        kwargs.setdefault("OutputSDOName", "TRT_SDO_Map")
+    kwargs.setdefault("HardScatterSplittingMode", 0)
+    return TRT_DigitizationBasicToolCfg(flags, name, **kwargs)
+
+def TRT_DigitizationGeantinoTruthToolCfg(flags, name="TRT_GeantinoTruthDigitizationTool", **kwargs):
+    """Return a ComponentAccumulator with Geantino configured TRT digitization tool"""
+    kwargs.setdefault("ParticleBarcodeVeto", 0)
+    return TRT_DigitizationToolCfg(flags, name, **kwargs)
+
+def TRT_DigitizationHSToolCfg(flags, name="TRT_DigitizationToolHS", **kwargs):
+    """Return a ComponentAccumulator with Hard Scatter configured TRT digitization tool"""
+    kwargs.setdefault("OutputObjectName", "TRT_RDOs")
+    kwargs.setdefault("OutputSDOName", "TRT_SDO_Map")
+    kwargs.setdefault("HardScatterSplittingMode", 1)
+    return TRT_DigitizationBasicToolCfg(flags, name, **kwargs)
+
+def TRT_DigitizationPUToolCfg(flags, name="TRT_DigitizationToolPU", **kwargs):
+    """Return a ComponentAccumulator with Pile Up configured TRT digitization tool"""
+    kwargs.setdefault("OutputObjectName", "TRT_PU_RDOs")
+    kwargs.setdefault("OutputSDOName", "TRT_PU_SDO_Map")
+    kwargs.setdefault("HardScatterSplittingMode", 2)
+    return TRT_DigitizationBasicToolCfg(flags, name, **kwargs)
+
+def TRT_DigitizationSplitNoMergePUToolCfg(flags, name="TRT_DigitizationToolSplitNoMergePU", **kwargs):
+    """Return a ComponentAccumulator with PileUpPixelHits configured TRT digitization tool"""
+    kwargs.setdefault("HardScatterSplittingMode", 0)
+    kwargs.setdefault("DataObjectName", "PileupTRTUncompressedHits")
+    kwargs.setdefault("OutputObjectName", "TRT_PU_RDOs")
+    kwargs.setdefault("OutputSDOName", "TRT_PU_SDO_Map")
+    kwargs.setdefault("Override_noiseInSimhits", 0)
+    kwargs.setdefault("Override_noiseInUnhitStraws", 0)
+    return TRT_DigitizationBasicToolCfg(flags, name, **kwargs)
+
+def TRT_DigitizationOverlayToolCfg(flags, name="TRT_OverlayDigitizationTool", **kwargs):
+    """Return a ComponentAccumulator with configured Overlay TRT digitization tool"""
+    acc = ComponentAccumulator()
+    acc.addService(StoreGateSvc(flags.Overlay.Legacy.EventStore))
+    kwargs.setdefault("OutputObjectName", flags.Overlay.Legacy.EventStore + "+TRT_RDOs")
+    kwargs.setdefault("OutputSDOName", flags.Overlay.Legacy.EventStore + "+TRT_SDO_Map")
+    kwargs.setdefault("HardScatterSplittingMode", 0)
+    kwargs.setdefault("Override_getT0FromData", 0)
+    kwargs.setdefault("Override_noiseInSimhits", 0)
+    kwargs.setdefault("Override_noiseInUnhitStraws", 0)
+    kwargs.setdefault("Override_isOverlay", 1)
+    tool = acc.popToolsAndMerge(TRT_DigitizationBasicToolCfg(flags, name, **kwargs))
+    acc.setPrivateTools(tool)
+    return acc
+
+def TRT_DigitizationCfg(toolCfg, flags, name="TRT_Digitization", **kwargs):
+    """Return a ComponentAccumulator with toolCfg type TRT digitization"""
+    acc = ComponentAccumulator()
+    if "DigitizationTool" not in kwargs:
+        tool = acc.popToolsAndMerge(toolCfg(flags))
+        kwargs["DigitizationTool"] = tool
+        print("#"*200)
+        print(tool)
+    acc.addEventAlgo(TRTDigitization(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", TRT_ItemList()))
+    return acc
+
+def TRT_DigitizationHSCfg(flags, name="TRT_DigitizationHS", **kwargs):
+    """Return a ComponentAccumulator configured for Hard Scatter TRT digitization"""
+    return TRT_DigitizationCfg(TRT_DigitizationHSToolCfg, flags, name, **kwargs)
+
+def TRT_DigitizationPUCfg(flags, name="TRT_DigitizationPU", **kwargs):
+    """Return a ComponentAccumulator configured for Pile Up TRT digitization"""
+    return TRT_DigitizationCfg(TRT_DigitizationPUToolCfg, flags, name, **kwargs)
+
+def TRT_DigitizationOverlayCfg(flags, name="TRT_OverlayDigitization", **kwargs):
+    """Return a ComponentAccumulator configured for Overlay TRT digitization"""
+    return TRT_DigitizationCfg(TRT_DigitizationOverlayToolCfg, flags, name, **kwargs)
+
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/test/TRT_DigitizationConfigNew_test.py b/InnerDetector/InDetDigitization/TRT_Digitization/test/TRT_DigitizationConfigNew_test.py
new file mode 100755
index 000000000000..6d04981e1a7a
--- /dev/null
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/test/TRT_DigitizationConfigNew_test.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+"""Run tests on TRT_DigitizationConfigNew.py
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+import sys
+from AthenaCommon.Logging import log
+from AthenaCommon.Constants import DEBUG
+from AthenaCommon.Configurable import Configurable
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
+from AthenaConfiguration.TestDefaults import defaultTestFiles
+from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
+from TRT_Digitization.TRT_DigitizationConfigNew import TRT_DigitizationHSCfg
+from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
+from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
+
+# Set up logging and new style config
+log.setLevel(DEBUG)
+Configurable.configurableRun3Behavior = True
+# Configure
+ConfigFlags.join(createDigitizationCfgFlags())
+ConfigFlags.join(createOverlayCfgFlags())
+ConfigFlags.Input.Files = defaultTestFiles.HITS
+ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
+ConfigFlags.GeoModel.Align.Dynamic = False
+ConfigFlags.Concurrency.NumThreads = 1
+ConfigFlags.lock()
+# Construct our accumulator to run
+acc = MainServicesSerialCfg()
+acc.merge(PoolReadCfg(ConfigFlags))
+acc.merge(TRT_DigitizationHSCfg(ConfigFlags))
+# Dump config
+acc.getService("StoreGateSvc").Dump = True
+acc.getService("ConditionStore").Dump = True
+acc.printConfig(withDetails=True)
+ConfigFlags.dump()
+# Execute and finish
+sc = acc.run(maxEvents=3)
+# Success should be 0
+sys.exit(not sc.isSuccess())
+
diff --git a/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigNew.py b/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigNew.py
new file mode 100644
index 000000000000..dee123833fa7
--- /dev/null
+++ b/InnerDetector/InDetSimUtils/TRT_PAI_Process/python/TRT_PAI_ProcessConfigNew.py
@@ -0,0 +1,21 @@
+"""Define methods to construct configured TRT_PAI_Process tools
+
+Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""
+from TRT_PAI_Process.TRT_PAI_ProcessConf import TRT_PAI_Process
+
+def TRT_PAI_Process_XeToolCfg(flags, name="TRT_PAI_Process_Xe", **kwargs):
+    """Return a Xenon-configured TRT_PAI_Process"""
+    kwargs.setdefault("GasType", "Xenon")
+    return TRT_PAI_Process(name, **kwargs)
+
+def TRT_PAI_Process_ArToolCfg(flags, name="TRT_PAI_Process_Ar", **kwargs):
+    """Return an Argon-configured TRT_PAI_Process"""
+    kwargs.setdefault("GasType", "Argon")
+    return TRT_PAI_Process(name, **kwargs)
+
+def TRT_PAI_Process_KrToolCfg(flags, name="TRT_PAI_Process_Kr", **kwargs):
+    """Return a Krypton-configured TRT_PAI_Process"""
+    kwargs.setdefault("GasType", "Krypton")
+    return TRT_PAI_Process(name, **kwargs)
+
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigNew.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigNew.py
index b21d517cd77d..4f45185c364d 100644
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigNew.py
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigNew.py
@@ -4,6 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from StoreGate.StoreGateConf import StoreGateSvc
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
 from MuonConfig.MuonCalibConfig import CscCoolStrSvcCfg
 from CSC_Digitization.CSC_DigitizationConf import (
@@ -19,6 +20,10 @@ def CSC_FirstXing():
 def CSC_LastXing():
     return 175
 
+def CSC_ItemList():
+    """Return list of item names needed for CSC output"""
+    return ["MuonSimDataCollection#*", "CscSimDataCollection#CSC_SDO", "CscRawDataContainer#*"]
+
 def CSC_RangeToolCfg(flags, name="CSC_Range", **kwargs):
     """Return a PileUpXingFolder tool configured for CSC"""
     kwargs.setdefault("FirstXing", CSC_FirstXing())
@@ -57,6 +62,8 @@ def CSC_DigitBuilderCfg(flags, name="CSC_DigitBuilder", **kwargs):
     tool = acc.popToolsAndMerge(CSC_DigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(CscDigitBuilder(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", CSC_ItemList()))
     return acc
     
 def CSC_OverlayDigitizationToolCfg(flags, name="CSC_OverlayDigitizationTool",**kwargs):
@@ -77,5 +84,7 @@ def CSC_OverlayDigitBuilderCfg(flags, name="CSC_OverlayDigitBuilder", **kwargs):
     tool = acc.popToolsAndMerge(CSC_OverlayDigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(CscDigitBuilder(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", CSC_ItemList()))
     return acc
 
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/test/CSC_DigitizationConfigNew_test.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/test/CSC_DigitizationConfigNew_test.py
index 273eb55f767d..e8a4275eafb5 100755
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/test/CSC_DigitizationConfigNew_test.py
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/test/CSC_DigitizationConfigNew_test.py
@@ -10,7 +10,6 @@ from AthenaCommon.Configurable import Configurable
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
@@ -31,13 +30,6 @@ ConfigFlags.lock()
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(CSC_DigitBuilderCfg(ConfigFlags))
-# Add configuration to write HITS pool file
-ItemList = [
-    "CscSimDataCollection#CSC_SDO",
-    "MuonSimDataCollection#*",
-    "CscRawDataContainer#*",
-]
-acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList=ItemList))
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigNew.py b/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigNew.py
index e3c0488e4bfc..377f6ba21377 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigNew.py
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/python/MDT_DigitizationConfigNew.py
@@ -4,6 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from StoreGate.StoreGateConf import StoreGateSvc
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
 from MDT_Digitization.MDT_DigitizationConf import (
     MdtDigitizationTool, MDT_Response_DigiTool, RT_Relation_DB_DigiTool, MDT_Digitizer
@@ -19,6 +20,10 @@ def MDT_LastXing():
     # was 800 for large time window
     return 150
 
+def MDT_ItemList():
+    """Return list of item names needed for MDT output"""
+    return ["MuonSimDataCollection#*", "MdtCsmContainer#*"]
+
 def MDT_RangeToolCfg(flags, name="MDT_Range", **kwargs):
     """Return a PileUpXingFolder tool configured for MDT"""
     kwargs.setdefault("FirstXing", MDT_FirstXing())
@@ -65,6 +70,8 @@ def MDT_DigitizerCfg(flags, name="MDT_Digitizer", **kwargs):
     tool = acc.popToolsAndMerge(MDT_DigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(MDT_Digitizer(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", MDT_ItemList()))
     return acc
 
 def MDT_OverlayDigitizationToolCfg(flags, name="MDT_OverlayDigitizationTool",**kwargs):
@@ -84,5 +91,7 @@ def MDT_OverlayDigitizerCfg(flags, name="MDT_OverlayDigitizer", **kwargs):
     tool = acc.popToolsAndMerge(MDT_OverlayDigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(MDT_Digitizer(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", MDT_ItemList()))
     return acc
 
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/test/MDT_DigitizationConfigNew_test.py b/MuonSpectrometer/MuonDigitization/MDT_Digitization/test/MDT_DigitizationConfigNew_test.py
index 4619c070e440..8d315f05c3f4 100755
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/test/MDT_DigitizationConfigNew_test.py
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/test/MDT_DigitizationConfigNew_test.py
@@ -10,7 +10,6 @@ from AthenaCommon.Configurable import Configurable
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
@@ -30,12 +29,6 @@ ConfigFlags.lock()
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(MDT_DigitizerCfg(ConfigFlags))
-# Add configuration to write HITS pool file
-ItemList = [
-    "MuonSimDataCollection#*",
-    "MdtCsmContainer#*",
-]
-acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList=ItemList))
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigNew.py b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigNew.py
index efd6075344d8..c8cbb8b5c876 100644
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigNew.py
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfigNew.py
@@ -4,6 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from StoreGate.StoreGateConf import StoreGateSvc
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
 from RPC_Digitization.RPC_DigitizationConf import RpcDigitizationTool, RPC_Digitizer
 from PileUpComps.PileUpCompsConf import PileUpXingFolder
@@ -17,6 +18,10 @@ def RPC_FirstXing():
 def RPC_LastXing():
     return 125
 
+def RPC_ItemList():
+    """Return list of item names needed for RPC output"""
+    return ["MuonSimDataCollection#*", "RpcPadContainer#*"]
+
 def RPC_RangeToolCfg(flags, name="RPC_Range", **kwargs):
     """Return a PileUpXingFolder tool configured for RPC"""
     kwargs.setdefault("FirstXing", RPC_FirstXing())
@@ -80,6 +85,8 @@ def RPC_DigitizerCfg(flags, name="RPC_Digitizer", **kwargs):
     tool = acc.popToolsAndMerge(RPC_DigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(RPC_Digitizer(name,**kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", RPC_ItemList()))
     return acc
 
 def RPC_OverlayDigitizationToolCfg(flags, name="RPC_DigitizationTool", **kwargs):
@@ -98,6 +105,8 @@ def RPC_OverlayDigitizerCfg(flags, name="RPC_OverlayDigitizer", **kwargs):
     acc = MuonGeoModelCfg(flags)
     tool = acc.popToolsAndMerge(RPC_OverlayDigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
-    acc.addEventAlgo(RPC_Digitizer(name,**kwargs))
+    acc.addEventAlgo(RPC_Digitizer(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", RPC_ItemList()))
     return acc
 
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/test/RPC_DigitizationConfigNew_test.py b/MuonSpectrometer/MuonDigitization/RPC_Digitization/test/RPC_DigitizationConfigNew_test.py
index f6a3bddc490e..66b438930d41 100755
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/test/RPC_DigitizationConfigNew_test.py
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/test/RPC_DigitizationConfigNew_test.py
@@ -10,7 +10,6 @@ from AthenaCommon.Configurable import Configurable
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
@@ -34,12 +33,6 @@ ConfigFlags.lock()
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(RPC_DigitizerCfg(ConfigFlags))
-# Add configuration to write HITS pool file
-ItemList = [
-    "MuonSimDataCollection#*",
-    "RpcPadContainer#*",
-]
-acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList=ItemList))
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigNew.py b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigNew.py
index d562ab5346e5..5a4227425a83 100644
--- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigNew.py
+++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfigNew.py
@@ -4,6 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from StoreGate.StoreGateConf import StoreGateSvc
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
 from TGC_Digitization.TGC_DigitizationConf import TgcDigitizationTool, TGCDigitizer
 from PileUpComps.PileUpCompsConf import PileUpXingFolder
@@ -16,6 +17,10 @@ def TGC_FirstXing():
 def TGC_LastXing():
     return 75
 
+def TGC_ItemList():
+    """Return list of item names needed for TGC output"""
+    return ["MuonSimDataCollection#*", "TgcRdoContainer#*"]
+
 def TGC_RangeToolCfg(flags, name="TGC_Range", **kwargs):
     """Return a PileUpXingFolder tool configured for TGC"""
     kwargs.setdefault("FirstXing", TGC_FirstXing())
@@ -44,6 +49,8 @@ def TGC_DigitizerCfg(flags, name="TGC_Digitizer", **kwargs):
     tool = acc.popToolsAndMerge(TGC_DigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
     acc.addEventAlgo(TGCDigitizer(name,**kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", TGC_ItemList()))
     return acc
 
 def TGC_OverlayDigitizationToolCfg(flags, name="TGC_OverlayDigitizationTool", **kwargs):
@@ -54,7 +61,7 @@ def TGC_OverlayDigitizationToolCfg(flags, name="TGC_OverlayDigitizationTool", **
     if not flags.Detector.Overlay:
         kwargs.setdefault("OutputSDOName", flags.Overlay.Legacy.EventStore + "+TGC_SDO")
     kwargs.setdefault("EvtStore", flags.Overlay.Legacy.EventStore)
-    acc.setPrivateTools(TgcDigitizationTool(name,**kwargs))
+    acc.setPrivateTools(TgcDigitizationTool(name, **kwargs))
     return acc
 
 def TGC_OverlayDigitizerCfg(flags, name="TGC_OverlayDigitizer", **kwargs):
@@ -62,6 +69,8 @@ def TGC_OverlayDigitizerCfg(flags, name="TGC_OverlayDigitizer", **kwargs):
     acc = MuonGeoModelCfg(flags)
     tool = acc.popToolsAndMerge(TGC_OverlayDigitizationToolCfg(flags))
     kwargs.setdefault("DigitizationTool", tool)
-    acc.addEventAlgo(TGCDigitizer(name,**kwargs))
+    acc.addEventAlgo(TGCDigitizer(name, **kwargs))
+    # FIXME once OutputStreamCfg merges correctly
+    #acc.merge(OutputStreamCfg(flags, "RDO", TGC_ItemList()))
     return acc
 
diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/test/TGC_DigitizationConfigNew_test.py b/MuonSpectrometer/MuonDigitization/TGC_Digitization/test/TGC_DigitizationConfigNew_test.py
index 6e2829991db4..464aab67813e 100755
--- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/test/TGC_DigitizationConfigNew_test.py
+++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/test/TGC_DigitizationConfigNew_test.py
@@ -10,7 +10,6 @@ from AthenaCommon.Configurable import Configurable
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
@@ -34,12 +33,6 @@ ConfigFlags.lock()
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(TGC_DigitizerCfg(ConfigFlags))
-# Add configuration to write HITS pool file
-ItemList = [
-    "MuonSimDataCollection#*",
-    "TgcRdoContainer#*",
-]
-acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList=ItemList))
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
diff --git a/Simulation/Digitization/test/DigitizationConfigNew_test.py b/Simulation/Digitization/test/DigitizationConfigNew_test.py
index aa8471b16240..c6d95a6640b4 100755
--- a/Simulation/Digitization/test/DigitizationConfigNew_test.py
+++ b/Simulation/Digitization/test/DigitizationConfigNew_test.py
@@ -7,16 +7,16 @@ import sys
 from AthenaCommon.Logging import log
 from AthenaCommon.Constants import DEBUG
 from AthenaCommon.Configurable import Configurable
-from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
 from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
 from BCM_Digitization.BCM_DigitizationConfigNew import BCM_DigitizationCfg
 from SCT_Digitization.SCT_DigitizationConfigNew import SCT_DigitizationHSCfg
+from TRT_Digitization.TRT_DigitizationConfigNew import TRT_DigitizationHSCfg
+from PixelDigitization.PixelDigitizationConfigNew import PixelDigitizationHSCfg
 from MDT_Digitization.MDT_DigitizationConfigNew import MDT_DigitizerCfg
 from TGC_Digitization.TGC_DigitizationConfigNew import TGC_DigitizerCfg
 from RPC_Digitization.RPC_DigitizationConfigNew import RPC_DigitizerCfg
@@ -33,30 +33,33 @@ ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
 ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
 ConfigFlags.GeoModel.Align.Dynamic = False
 ConfigFlags.Concurrency.NumThreads = 1
+ConfigFlags.GeoModel.Type = "BrlIncl4.0_ref"
+ConfigFlags.Beam.NumberOfCollisions = 0.
 ConfigFlags.lock()
 # Construct our accumulator to run
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
 acc.merge(BCM_DigitizationCfg(ConfigFlags))
 acc.merge(SCT_DigitizationHSCfg(ConfigFlags))
+acc.merge(TRT_DigitizationHSCfg(ConfigFlags))
+acc.merge(PixelDigitizationHSCfg(ConfigFlags))
 acc.merge(MDT_DigitizerCfg(ConfigFlags))
 acc.merge(TGC_DigitizerCfg(ConfigFlags))
 acc.merge(RPC_DigitizerCfg(ConfigFlags))
 acc.merge(CSC_DigitBuilderCfg(ConfigFlags))
-# add output configuration
-ItemList = [
-    "InDetSimDataCollection#*",
-    "BCM_RDO_Container#*",
-    "InDet::SiClusterContainer#*",
-    "SCT_RDO_Container#*",
-    "MuonSimDataCollection#*",
-    "MdtCsmContainer#*",
-    "TgcRdoContainer#*",
-    "RpcPadContainer#*",
-    "CscSimDataCollection#CSC_SDO",
-    "CscRawDataContainer#*",
-]
-acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList=ItemList))
+# FIXME once OutputStreamCfg merges correctly
+from BCM_Digitization.BCM_DigitizationConfigNew import BCM_ItemList
+from SCT_Digitization.SCT_DigitizationConfigNew import SCT_ItemList
+from TRT_Digitization.TRT_DigitizationConfigNew import TRT_ItemList
+from PixelDigitization.PixelDigitizationConfigNew import PixelItemList
+from MDT_Digitization.MDT_DigitizationConfigNew import MDT_ItemList
+from TGC_Digitization.TGC_DigitizationConfigNew import TGC_ItemList
+from RPC_Digitization.RPC_DigitizationConfigNew import RPC_ItemList
+from CSC_Digitization.CSC_DigitizationConfigNew import CSC_ItemList
+from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+ItemList = BCM_ItemList() + SCT_ItemList() + TRT_ItemList() + PixelItemList() + MDT_ItemList() + TGC_ItemList() + RPC_ItemList() + CSC_ItemList()
+ItemList = list(set(ItemList)) # remove duplicates
+acc.merge(OutputStreamCfg(ConfigFlags, "RDO", ItemList))
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
-- 
GitLab


From baf849ad20a8467d00bb74964f39a6ad74eb0d40 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 3 May 2019 02:40:49 +0200
Subject: [PATCH 070/129] TrigT2CaloEgamma: Fix conflict between previous two
 changes.

The previous two changes to this package had a conflict which wasn't
caught by CI, but which is causing build failures.

Update new RingerReFix for the interface change in loadCollections().
---
 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx | 5 ++++-
 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h   | 5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
index 7aefa42bbb41..32372e5f587b 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
@@ -29,6 +29,7 @@
 #include "CaloDetDescr/CaloDetDescrElement.h"
 #include "AthenaMonitoring/GenericMonitoringTool.h"
 #include "AthenaMonitoring/Monitored.h"
+#include "StoreGate/ReadHandle.h"
 #include "PhiComps.h"
 using namespace Monitored;
 
@@ -73,6 +74,7 @@ StatusCode RingerReFex::initialize()
 
   ATH_CHECK( m_ringerContainerKey.initialize() );
   ATH_CHECK( m_clusterContainerKey.initialize() );
+  ATH_CHECK( m_bcidAvgKey.initialize() );
 
   m_maxRingsAccumulated = std::accumulate(m_nRings.begin(), m_nRings.end(), 0);
 
@@ -160,6 +162,7 @@ StatusCode RingerReFex::execute(xAOD::TrigEMCluster &rtrigEmCluster,
                               const CaloDetDescrElement*& , 
                               const EventContext& context) const
 {
+  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
 
   
   auto total_time = Monitored::Timer("TIME_total");
@@ -242,7 +245,7 @@ StatusCode RingerReFex::execute(xAOD::TrigEMCluster &rtrigEmCluster,
       // and the ringg set will be empty. This will effect the ring set 4,5 and 6.
       if( !(!m_useHad && det==TTHEC) ){
       
-        if( m_dataSvc->loadCollections( context, roi, static_cast<DETID>(det), sampling, sel ).isFailure() )
+        if( m_dataSvc->loadCollections( context, avg.cptr() ,roi, static_cast<DETID>(det), sampling, sel ).isFailure() )
         {
           ATH_MSG_ERROR( "Failure while trying to retrieve cell information for the "<< det <<" calorimeter." );
           return StatusCode::FAILURE;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
index b95eec8fd0da..12d1b43bcc44 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -17,6 +17,7 @@
 #include "xAODTrigRinger/TrigRingerRings.h"
 #include "xAODTrigRinger/TrigRingerRingsContainer.h"
 #include "xAODTrigRinger/TrigRingerRingsAuxContainer.h"
+#include "CaloEvent/CaloBCIDAverage.h"
 #include "AthenaMonitoring/GenericMonitoringTool.h"
 #include "PhiComps.h"
 
@@ -94,6 +95,7 @@ class RingerReFex : public IReAlgToolCalo
     ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool"};
     SG::WriteHandleKey<xAOD::TrigRingerRingsContainer> m_ringerContainerKey {this, "RingerKey", "HLT_L2CaloRinger", "TrigRingerRings container key"};
     SG::ReadHandleKey<xAOD::TrigEMClusterContainer>    m_clusterContainerKey {this, "ClustersName", "HLT_L2CaloEMClusters", "TrigEMCluster container key"};
+    SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
     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,  ""};
@@ -122,6 +124,5 @@ class RingerReFex : public IReAlgToolCalo
 
 
     void printRings( std::vector<RingSet> &, xAOD::TrigRingerRings * ) const;
-
 };
 #endif
-- 
GitLab


From bfb0a41cf440ca477b69a5e5994aa80875130308 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 2 May 2019 16:33:09 +0200
Subject: [PATCH 071/129] CLIDComps: SGTools->AthenaKernel

Adjust for headers moved from SGTools to AthenaKernel.
---
 Control/CLIDComps/CMakeLists.txt           | 5 ++---
 Control/CLIDComps/src/ClassIDSvc.cxx       | 4 ++--
 Control/CLIDComps/src/ClassIDSvc.h         | 4 ++--
 Control/CLIDComps/test/ClassIDSvc_test.cxx | 6 +++---
 4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/Control/CLIDComps/CMakeLists.txt b/Control/CLIDComps/CMakeLists.txt
index 3c833dccb5cb..83e5a0296ee6 100644
--- a/Control/CLIDComps/CMakeLists.txt
+++ b/Control/CLIDComps/CMakeLists.txt
@@ -10,7 +10,6 @@ atlas_subdir( CLIDComps )
 atlas_depends_on_subdirs(
    PRIVATE
    Control/AthenaKernel
-   Control/SGTools
    AtlasTest/TestTools
    GaudiKernel )
 
@@ -22,7 +21,7 @@ atlas_add_component( CLIDComps
    src/*.h src/*.cxx src/components/*.cxx
    NOCLIDDB
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel SGTools GaudiKernel )
+   LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel GaudiKernel )
 
 # Executable(s) in the package:
 atlas_add_executable( genCLIDDB
@@ -36,7 +35,7 @@ endif()
 # Test(s) in the package:
 atlas_add_test( ClassIDSvc_test
    SOURCES test/ClassIDSvc_test.cxx
-   LINK_LIBRARIES AthenaKernel SGTools GaudiKernel TestTools
+   LINK_LIBRARIES AthenaKernel GaudiKernel TestTools
    EXTRA_PATTERNS "WARNING Could not resolve clid DB|^JobOptionsSvc +INFO|DEBUG Property update for OutputLevel"
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
diff --git a/Control/CLIDComps/src/ClassIDSvc.cxx b/Control/CLIDComps/src/ClassIDSvc.cxx
index 2864b8df9489..ad4796efdaa5 100644
--- a/Control/CLIDComps/src/ClassIDSvc.cxx
+++ b/Control/CLIDComps/src/ClassIDSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <algorithm>  /* distance */
@@ -18,7 +18,7 @@
 #include "GaudiKernel/System.h"
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "SGTools/CLIDRegistry.h"
+#include "AthenaKernel/CLIDRegistry.h"
 #include "AthenaKernel/errorcheck.h"
 #include "CxxUtils/checker_macros.h"
 
diff --git a/Control/CLIDComps/src/ClassIDSvc.h b/Control/CLIDComps/src/ClassIDSvc.h
index 679d12bb9ff6..454b8bc8201f 100644
--- a/Control/CLIDComps/src/ClassIDSvc.h
+++ b/Control/CLIDComps/src/ClassIDSvc.h
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CLIDCOMPS_CLASSIDSVC_H
@@ -26,7 +26,7 @@
 
 #include "AthenaKernel/IClassIDSvc.h"
 
-#include "SGTools/CLIDRegistry.h"
+#include "AthenaKernel/CLIDRegistry.h"
 
 
 /** @class ClassIDSvc 
diff --git a/Control/CLIDComps/test/ClassIDSvc_test.cxx b/Control/CLIDComps/test/ClassIDSvc_test.cxx
index af28197cf11d..2f3205aba1ff 100644
--- a/Control/CLIDComps/test/ClassIDSvc_test.cxx
+++ b/Control/CLIDComps/test/ClassIDSvc_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /** @file ClassIDSvc_test.cxx  
@@ -21,8 +21,8 @@
 #include "AthenaKernel/IClassIDSvc.h"
 #include "../src/ClassIDSvc.h"
 
-#include "SGTools/CLASS_DEF.h"
-#include "SGTools/CLIDRegistry.h"
+#include "AthenaKernel/CLASS_DEF.h"
+#include "AthenaKernel/CLIDRegistry.h"
 class Foo{};
 CLASS_DEF( Foo, 8101, 0) 
 class Bar{};
-- 
GitLab


From 05411edc7ba21b61f029786243d915663c28daa3 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 2 May 2019 16:25:08 +0200
Subject: [PATCH 072/129] CaloClusterCorrection: Preparing to make CaloDD
 immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
---
 .../CaloClusterCorrectionCommon.h             |  48 +--
 .../CaloFillRectangularCluster.h              |  34 +-
 .../src/CaloClusterCorrectionCommon.cxx       | 403 ++++++++++--------
 .../src/CaloFillRectangularCluster.cxx        | 274 +++++++-----
 .../src/CaloTopoEMlayers.cxx                  |  57 ++-
 .../src/CaloTopoEMlayers.h                    |  25 +-
 6 files changed, 495 insertions(+), 346 deletions(-)

diff --git a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h
index 8f23e2d7583d..2eb1bf59e0cf 100755
--- a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h
+++ b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h
@@ -1,7 +1,7 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: CaloClusterCorrectionCommon.h,v 1.7 2008-01-25 04:14:20 ssnyder Exp $
@@ -16,12 +16,18 @@
 
 
 #include "CaloClusterCorrection/CaloClusterCorrection.h"
+#include "CxxUtils/CachedUniquePtr.h"
 #include "GaudiKernel/EventContext.h"
 #include <vector>
 class CaloDetDescrManager;
 class CaloDetDescrElement;
 
 
+namespace CaloClusterCorr {
+class DDHelper;
+}
+
+
 /**
  * @class CaloClusterCorrectionCommon
  * @brief Code common to cluster corrections.
@@ -158,49 +164,21 @@ public:
                               const CaloRec::Array<1>& energies,
                               int energy_degree) const;
 
-  /**
-   * @brief Find the detector descriptor element for a given position,
-   *        correcting for DD edge bugs.
-   * @param region A region code, as defined in the header.
-   * @param dd_man Detector descriptor manager.
-   * @param cluster The cluster being corrected.
-   * @param eta    The @f$\eta@f$ coordinate to find.
-   * @param phi    The @f$\phi@f$ coordinate to find.
-   * @param dummy_elts Vector of dummy elements for the innermost strip.
-   *
-   * Looks up the DD element containing @c eta, @c phi in the region
-   * specified by @c region.  Returns 0 if there's no such cell.
-   *
-   * Sometimes when you look up a position near the edge of a cell,
-   * DD can erroneously return an adjacent cell.
-   * This routine attempts to work around this bug.
-   * After we get an element, we test to see if it in fact contains
-   * the position requested.  If not, we shift the request by half
-   * a cell and try again.
-   */
-  static
-  const CaloDetDescrElement*
-  find_dd_elt (int region,
-               const CaloDetDescrManager* dd_man,
-               const xAOD::CaloCluster* cluster,
-               float eta,
-               float phi,
-               const std::vector<std::unique_ptr<const CaloDetDescrElement> >& dummy_elts);
 
 
 private:
+  /// Retrieve the detector description helper,
+  /// creating it if needed.
+  const CaloClusterCorr::DDHelper& ddhelper() const;
+
   /// Calibration constant: The calorimeter region for which this correction
   /// is intended.  This should be one of the constants above.
   /// This affects the meaning of the @c eta and @c phi arguments
   /// passed to @c makeTheCorrection, as well as the @c samp argument.
   int m_region;
 
-  // Save a pointer to the DD manager.
-  const CaloDetDescrManager* m_calo_dd_man;
-
-  // Hold dummy DD elements we've created to work around DD innermost
-  // layer 1 strip problem.
-  std::vector<std::unique_ptr<const CaloDetDescrElement> > m_dummy_elts;
+  /// Helper for detector description lookup.
+  CxxUtils::CachedUniquePtr<const CaloClusterCorr::DDHelper> m_ddhelper;
 };
 
 
diff --git a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h
index f95be68d936a..4e9893f12b8e 100755
--- a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h
+++ b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h
@@ -1,7 +1,7 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: CaloFillRectangularCluster.h,v 1.7 2009-04-25 17:57:00 ssnyder Exp $
@@ -93,17 +93,16 @@ public:
 
   /*
    * @brief Return the seed position of a cluster.
+   * @param helper Sampling calculation helper object.
    * @param cluster The cluster on which to operate.
-   * @param max_et_cell The cell with the largest energy
-   *  (of those being considered for inclusion in the cluster).
    * @param[out] eta The @f$\eta@f$ location of the cluster seed.
    * @param[out] phi The @f$\phi@f$ location of the cluster seed.
    *
    * The cluster seed is the center of rectangular cluster windows.
    * This may be overridden by derived classes to change the seed definition.
    */
-  virtual void get_seed (const xAOD::CaloCluster* cluster,
-                         const CaloCell* max_et_cell,
+  virtual void get_seed (CaloClusterCorr::SamplingHelper& helper,
+                         const xAOD::CaloCluster* cluster,
                          double& eta, double& phi) const;
 
 
@@ -114,6 +113,27 @@ public:
   virtual StatusCode setCaloCellContainerName (const std::string& name) override;
 
 
+  /// Holds the per-layer window sizes.
+  typedef std::array<std::pair<double, double>, 4> WindowArray_t;
+
+
+  /** 
+   * @brief Set up layer-by-layer cluster window sizes.
+   * @param neta Cluster eta size.
+   * @param nphi Cluster phi size.
+   * @param detas2 Middle layer cell eta size.
+   * @param detas2 Middle layer cell phi size.
+   *
+   * Returns per-layer array of deta,dphi pairs.
+   */
+  virtual
+  WindowArray_t initWindows (const int neta,
+                             const int nphi,
+                             const double detas2,
+                             const double dphis2) const;
+
+
+
 private:
 
   /// This isn't allowed.
@@ -145,10 +165,6 @@ private:
 
 
 protected:
-  /// middle layer  cell segmentation size 
-  double m_detas2;
-  double m_dphis2;
-
   /// Cell window sizes in each sampling.
   double m_deta0, m_deta1, m_deta2, m_deta3;
   double m_dphi0, m_dphi1, m_dphi2, m_dphi3;
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx
index c8bc8a343919..9c0a6f5c02a3 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: CaloClusterCorrectionCommon.cxx,v 1.12 2008-08-30 05:43:22 ssnyder Exp $
@@ -77,10 +77,157 @@ int sampling (int region)
 }
 
 
+} // anonymous namespace
+
+
+namespace CaloClusterCorr {
+
+
+class DDHelper
+{
+public:
+  /// Constructor.
+  DDHelper (const CaloDetDescrManager* dd_man);
+
+
+  /// Find the detector descriptor element for a given position,
+  /// correcting for DD edge bugs.
+  const CaloDetDescrElement*
+  find_dd_elt (int region,
+               const xAOD::CaloCluster* cluster,
+               float eta,
+               float phi) const;
+
+
+private:
+  /// Find the detector descriptor element for a given position.
+  const CaloDetDescrElement* find_dd_elt1 (int region,
+                                           const CaloCluster* cluster,
+                                           float eta,
+                                           float phi) const;
+
+
+  /// Work around innermost strip problem.
+  const CaloDetDescrElement*
+  dd_inner_strip_fixup (int region,
+                        float eta,
+                        float phi) const;
+
+
+  const CaloDetDescrElement* dd_try_gap (int region,
+                                         const CaloCluster* cluster,
+                                         float eta,
+                                         float phi) const;
+
+
+  /// Construct dummy DDEs used to work around innermost strip problem.
+  void make_dummy_elts();
+
+
+  /// The detector descriptor manager.
+  const CaloDetDescrManager* m_dd_man;
+
+
+  /// Collection of dummy elements.
+  std::vector<std::unique_ptr<const CaloDetDescrElement> > m_dummy_elts;
+};
+
+
+/**
+ * @brief Constructor.
+ * @param dd_man The detector descriptor manager.
+ */
+DDHelper::DDHelper (const CaloDetDescrManager* dd_man)
+  : m_dd_man (dd_man)
+{
+  make_dummy_elts();
+}
+
+
+/**
+ * @brief Find the detector descriptor element for a given position,
+ *        correcting for DD edge bugs.
+ * @param region A region code, as defined in the header.
+ * @param cluster The cluster being corrected.
+ * @param eta    The @f$\eta@f$ coordinate to find.
+ * @param phi    The @f$\phi@f$ coordinate to find.
+ *
+ * Looks up the DD element containing @c eta, @c phi in the region
+ * specified by @c region.  Returns 0 if there's no such cell.
+ *
+ * Sometimes when you look up a position near the edge of a cell,
+ * DD can erroneously return an adjacent cell.
+ * This routine attempts to work around this bug.
+ * After we get an element, we test to see if it in fact contains
+ * the position requested.  If not, we shift the request by half
+ * a cell and try again.
+ */
+const CaloDetDescrElement*
+DDHelper::find_dd_elt (int region,
+                       const CaloCluster* cluster,
+                       float eta,
+                       float phi) const
+{
+  const CaloDetDescrElement* elt = 0;
+  float eta_offs = 0;
+  float phi_offs = 0;
+  int n = 0;
+  int good = 0;
+  
+  while (good != 2) {
+    elt = find_dd_elt1 (region, cluster,
+                        eta + eta_offs, CaloPhiRange::fix (phi + phi_offs));
+
+    if (!elt) {
+      elt = dd_inner_strip_fixup (region, eta, phi);
+      if (elt) return elt;
+      elt = dd_try_gap (region, cluster, eta, phi);
+      return elt;
+    }
+
+    // Don't do this more than twice.
+    // Originally, we were aborting if we couldn't find a good element
+    // after two passes.  However, it turns out that there are some
+    // small gaps between the @f$\eta@f$ ranges of adjacent cells, so if
+    // we demanded that the @f$\eta@f$ we provide be within the
+    // @f$\eta@f$ range of the element we return, we wouldn't succeed.
+    // Downstream code will just have to Deal With It.
+    if (++n >= 2)
+      return elt;
+
+    float deta = elt->deta();
+    float dphi = elt->dphi();
+
+    good = 0;
+
+    if (eta > elt->eta() + deta/2)
+      eta_offs += deta/2;
+    else if (eta < elt->eta() - deta/2)
+      eta_offs -= deta/2;
+    else
+      ++good;
+
+    // Assume that cells don't wrap around the phi boundary...
+    if (phi > elt->phi() + dphi/2)
+      phi_offs += dphi/2;
+    else if (phi < elt->phi() - dphi/2)
+      phi_offs -= dphi/2;
+    else
+      ++good;
+
+    if (good != 2 && n == 1) {
+      elt = dd_inner_strip_fixup (region, eta, phi);
+      if (elt) break;
+    }
+  }
+
+  return elt;
+}
+
+
 /**
  * @brief Find the detector descriptor element for a given position.
  * @param region A region code, as defined in the header.
- * @param dd_man Detector descriptor manager.
  * @param cluster The cluster being corrected.
  * @param eta    The @f$\eta@f$ coordinate to find.
  * @param phi    The @f$\phi@f$ coordinate to find.
@@ -88,11 +235,11 @@ int sampling (int region)
  * Looks up the DD element containing @c eta, @c phi in the region
  * specified by @c region.  Returns 0 if there's no such cell.
  */
-const CaloDetDescrElement* find_dd_elt1 (int region,
-                                         const CaloDetDescrManager* dd_man,
-                                         const CaloCluster* cluster,
-                                         float eta,
-                                         float phi)
+const CaloDetDescrElement*
+DDHelper::find_dd_elt1 (int region,
+                        const CaloCluster* cluster,
+                        float eta,
+                        float phi) const
 {
   const CaloDetDescrElement* elt = 0;
 
@@ -103,7 +250,7 @@ const CaloDetDescrElement* find_dd_elt1 (int region,
   case CaloClusterCorrectionCommon::EME1:
   case CaloClusterCorrectionCommon::EME2:
     // Simple case, it's a specific sampling.
-    elt = dd_man->get_element
+    elt = m_dd_man->get_element
       (CaloCell_ID::LAREM, sampling (region), barrel_p (region), eta, phi);
     break;
 
@@ -114,9 +261,9 @@ const CaloDetDescrElement* find_dd_elt1 (int region,
     // If we actually get both, make the decision by choosing
     // the one with the most energy in sampling 2.
     {
-      const CaloDetDescrElement* elt_b = dd_man->get_element
+      const CaloDetDescrElement* elt_b = m_dd_man->get_element
         (CaloCell_ID::LAREM, 2,  true, eta, phi);
-      const CaloDetDescrElement* elt_e = dd_man->get_element
+      const CaloDetDescrElement* elt_e = m_dd_man->get_element
         (CaloCell_ID::LAREM, 2, false, eta, phi);
 
       if (elt_b == 0)
@@ -138,62 +285,6 @@ const CaloDetDescrElement* find_dd_elt1 (int region,
 }
 
 
-/**
- * @brief Construct dummy DDEs used to work around innermost strip problem
- *        (see below).
- * @param dd_man Detector descriptor manager.
- */
-std::vector<std::unique_ptr<const CaloDetDescrElement> >
-dd_make_dummy_elts (const CaloDetDescrManager* dd_man)
-{
-  std::vector<std::unique_ptr<const CaloDetDescrElement> > elts;
-  const CaloDetDescriptor* descr = dd_man->get_descriptor (CaloCell_ID::LAREM,
-                                                           1, true, 0.05, 0);
-  if (descr) {
-    int nphi = descr->n_phi();
-    elts.resize (nphi*2);
-    for (int etasgn = 1; etasgn >= -1; etasgn -= 2) {
-      for (int iphi = 0; iphi < nphi; iphi++) {
-        // Make a new dummy cell.
-        // First, try to find the adjacent strip.  Punt if we can't
-        // find _that_!
-        const CaloCell_ID* cellid_mgr = dd_man->getCaloCell_ID();
-        Identifier cellId2 = cellid_mgr->cell_id (descr->identify(),
-                                                  1, iphi);
-        IdentifierHash cellIdHash2 = cellid_mgr->calo_cell_hash (cellId2);
-        // Verify that we don't have another nonexistent cell!
-        if (cellid_mgr->cell_id (cellIdHash2) != cellId2)
-          continue;
-        const CaloDetDescrElement* elt2 = dd_man->get_element (cellIdHash2);
-        if (!elt2) continue;
-
-        auto elt = CxxUtils::make_unique<DummyDetDescrElement>
-          (descr->subcalo_hash(),
-           0,
-           0,
-           descr);
-
-        // Copy geometry from the adjacent cell, shifting eta.
-        elt->set_cylindric_size (elt2->deta(),
-                                 elt2->dphi(),
-                                 elt2->dr());
-        elt->set_cylindric (elt2->eta() - etasgn * elt2->deta(),
-                            elt2->phi(),
-                            elt2->r());
-        elt->set_cylindric_raw (elt2->eta_raw() - etasgn * elt2->deta(),
-                                elt2->phi_raw(),
-                                elt2->r_raw());
-
-        int index = iphi;
-        if (etasgn < 0) index += nphi;
-        elts[index] = std::move(elt);
-      }
-    }
-  }
-  return elts;
-}
-
-
 /**
  * @brief Work around innermost strip problem.
  * @param region A region code, as defined in the header.
@@ -212,15 +303,14 @@ dd_make_dummy_elts (const CaloDetDescrManager* dd_man)
  * cons up a new dummy element and return that.
  */
 const CaloDetDescrElement*
-dd_inner_strip_fixup (int region,
-                      const CaloDetDescrManager* dd_man,
-                      float eta,
-                      float phi,
-                      const std::vector<std::unique_ptr<const CaloDetDescrElement> >& dummy_elts)
+DDHelper::dd_inner_strip_fixup (int region,
+                                float eta,
+                                float phi) const
 {
   if (region == CaloClusterCorrectionCommon::EMB1 && fabs(eta) < 0.1) {
-    const CaloDetDescriptor* descr = dd_man->get_descriptor (CaloCell_ID::LAREM,
-                                                             1, true, eta, phi);
+    const CaloDetDescriptor* descr =
+      m_dd_man->get_descriptor (CaloCell_ID::LAREM,
+                                1, true, eta, phi);
     if (!descr) return 0;
     int ieta = descr->eta_channel (eta);
     if (ieta == 0) {
@@ -230,9 +320,9 @@ dd_inner_strip_fixup (int region,
       unsigned int index = iphi;
       if (eta < 0)
         index += descr->n_phi();
-      if (dummy_elts.size() <= index)
+      if (m_dummy_elts.size() <= index)
         return 0;
-      return dummy_elts[index].get();
+      return m_dummy_elts[index].get();
     }
   }
 
@@ -240,16 +330,16 @@ dd_inner_strip_fixup (int region,
 }
 
 
-const CaloDetDescrElement* dd_try_gap (int region,
-                                       const CaloDetDescrManager* dd_man,
-                                       const CaloCluster* cluster,
-                                       float eta,
-                                       float phi)
+const CaloDetDescrElement*
+DDHelper::dd_try_gap (int region,
+                      const CaloCluster* cluster,
+                      float eta,
+                      float phi) const
 {
-  const CaloDetDescrElement* elt1 = find_dd_elt1 (region, dd_man, cluster,
+  const CaloDetDescrElement* elt1 = find_dd_elt1 (region, cluster,
                                                   eta + 1e-4, phi);
   if (!elt1) return 0;
-  const CaloDetDescrElement* elt2 = find_dd_elt1 (region, dd_man, cluster,
+  const CaloDetDescrElement* elt2 = find_dd_elt1 (region, cluster,
                                                   eta - 1e-4, phi);
   if (!elt2) return 0;
   if (eta > 0)
@@ -258,95 +348,60 @@ const CaloDetDescrElement* dd_try_gap (int region,
 }
 
 
-} // anonymous namespace
-
-
 /**
- * @brief Find the detector descriptor element for a given position,
- *        correcting for DD edge bugs.
- * @param region A region code, as defined in the header.
- * @param dd_man Detector descriptor manager.
- * @param cluster The cluster being corrected.
- * @param eta    The @f$\eta@f$ coordinate to find.
- * @param phi    The @f$\phi@f$ coordinate to find.
- * @param dummy_elts Vector of dummy elements for the innermost strip.
- *
- * Looks up the DD element containing @c eta, @c phi in the region
- * specified by @c region.  Returns 0 if there's no such cell.
- *
- * Sometimes when you look up a position near the edge of a cell,
- * DD can erroneously return an adjacent cell.
- * This routine attempts to work around this bug.
- * After we get an element, we test to see if it in fact contains
- * the position requested.  If not, we shift the request by half
- * a cell and try again.
+ * @brief Construct dummy DDEs used to work around innermost strip problem.
  */
-const CaloDetDescrElement*
-CaloClusterCorrectionCommon::find_dd_elt
-            (int region,
-             const CaloDetDescrManager* dd_man,
-             const CaloCluster* cluster,
-             float eta,
-             float phi,
-             const std::vector<std::unique_ptr<const CaloDetDescrElement> >& dummy_elts)
+void DDHelper::make_dummy_elts()
 {
-  const CaloDetDescrElement* elt = 0;
-  float eta_offs = 0;
-  float phi_offs = 0;
-  int n = 0;
-  int good = 0;
-  
-  while (good != 2) {
-    elt = find_dd_elt1 (region, dd_man, cluster,
-                        eta + eta_offs, CaloPhiRange::fix (phi + phi_offs));
-
-    if (!elt) {
-      elt = dd_inner_strip_fixup (region, dd_man, eta, phi, dummy_elts);
-      if (elt) return elt;
-      elt = dd_try_gap (region, dd_man, cluster, eta, phi);
-      return elt;
-    }
-
-    // Don't do this more than twice.
-    // Originally, we were aborting if we couldn't find a good element
-    // after two passes.  However, it turns out that there are some
-    // small gaps between the @f$\eta@f$ ranges of adjacent cells, so if
-    // we demanded that the @f$\eta@f$ we provide be within the
-    // @f$\eta@f$ range of the element we return, we wouldn't succeed.
-    // Downstream code will just have to Deal With It.
-    if (++n >= 2)
-      return elt;
-
-    float deta = elt->deta();
-    float dphi = elt->dphi();
-
-    good = 0;
+  const CaloDetDescriptor* descr = m_dd_man->get_descriptor (CaloCell_ID::LAREM,
+                                                             1, true, 0.05, 0);
+  if (descr) {
+    int nphi = descr->n_phi();
+    m_dummy_elts.resize (nphi*2);
+    for (int etasgn = 1; etasgn >= -1; etasgn -= 2) {
+      for (int iphi = 0; iphi < nphi; iphi++) {
+        // Make a new dummy cell.
+        // First, try to find the adjacent strip.  Punt if we can't
+        // find _that_!
+        const CaloCell_ID* cellid_mgr = m_dd_man->getCaloCell_ID();
+        Identifier cellId2 = cellid_mgr->cell_id (descr->identify(),
+                                                  1, iphi);
+        IdentifierHash cellIdHash2 = cellid_mgr->calo_cell_hash (cellId2);
+        // Verify that we don't have another nonexistent cell!
+        if (cellid_mgr->cell_id (cellIdHash2) != cellId2)
+          continue;
+        const CaloDetDescrElement* elt2 = m_dd_man->get_element (cellIdHash2);
+        if (!elt2) continue;
 
-    if (eta > elt->eta() + deta/2)
-      eta_offs += deta/2;
-    else if (eta < elt->eta() - deta/2)
-      eta_offs -= deta/2;
-    else
-      ++good;
+        auto elt = std::make_unique<DummyDetDescrElement>
+          (descr->subcalo_hash(),
+           0,
+           0,
+           descr);
 
-    // Assume that cells don't wrap around the phi boundary...
-    if (phi > elt->phi() + dphi/2)
-      phi_offs += dphi/2;
-    else if (phi < elt->phi() - dphi/2)
-      phi_offs -= dphi/2;
-    else
-      ++good;
+        // Copy geometry from the adjacent cell, shifting eta.
+        elt->set_cylindric_size (elt2->deta(),
+                                 elt2->dphi(),
+                                 elt2->dr());
+        elt->set_cylindric (elt2->eta() - etasgn * elt2->deta(),
+                            elt2->phi(),
+                            elt2->r());
+        elt->set_cylindric_raw (elt2->eta_raw() - etasgn * elt2->deta(),
+                                elt2->phi_raw(),
+                                elt2->r_raw());
 
-    if (good != 2 && n == 1) {
-      elt = dd_inner_strip_fixup (region, dd_man, eta, phi, dummy_elts);
-      if (elt) break;
+        int index = iphi;
+        if (etasgn < 0) index += nphi;
+        m_dummy_elts[index] = std::move(elt);
+      }
     }
   }
-
-  return elt;
 }
 
 
+} // namespace CaloClusterCorr
+
+
 /**
  * @brief Constructor.
  * @param type The type of the tool.
@@ -357,8 +412,7 @@ CaloClusterCorrectionCommon::CaloClusterCorrectionCommon
    (const std::string& type,
     const std::string& name,
     const IInterface* parent)
-     : CaloClusterCorrection (type, name, parent),
-       m_calo_dd_man (0)
+     : CaloClusterCorrection (type, name, parent)
 {
   // Fetch our calibration constants.
   declareConstant ("region",         m_region);
@@ -379,8 +433,6 @@ CaloClusterCorrectionCommon::~CaloClusterCorrectionCommon ()
  */
 StatusCode CaloClusterCorrectionCommon::initialize()
 {
-  m_calo_dd_man = CaloDetDescrManager::instance();
-  m_dummy_elts = dd_make_dummy_elts (m_calo_dd_man);
   return CaloClusterCorrection::initialize();
 }
 
@@ -471,10 +523,9 @@ void CaloClusterCorrectionCommon::makeCorrection (const EventContext& ctx,
 
   // Look up the DD element.
   // Give up if we can't find one.
-  const CaloDetDescrElement* elt = find_dd_elt (m_region, m_calo_dd_man,
-                                                cluster,
-                                                eta, phi,
-                                                m_dummy_elts);
+  const CaloDetDescrElement* elt = ddhelper().find_dd_elt (m_region,
+                                                           cluster,
+                                                           eta, phi);
   if (!elt)
     return;
 
@@ -593,3 +644,19 @@ CaloClusterCorrectionCommon::energy_interpolation (float energy,
   return interpolate (corrtab, energy, energy_degree,
                       1, CaloRec::Array<1>(), n_good);
 }
+
+
+const CaloClusterCorr::DDHelper& CaloClusterCorrectionCommon::ddhelper() const
+{
+  const CaloClusterCorr::DDHelper* ddhelper = m_ddhelper.get();
+  if (!ddhelper) {
+    const CaloDetDescrManager* ddman = nullptr;
+    if (detStore()->retrieve (ddman, "CaloMgr").isFailure()) {
+      std::abort();
+    }
+    auto newhelper = std::make_unique<const CaloClusterCorr::DDHelper> (ddman);
+    ddhelper = m_ddhelper.set (std::move (newhelper));
+  }
+  return *ddhelper;
+}
+
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx b/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx
index 3905ca57b6f9..210756ff5322 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: CaloFillRectangularCluster.cxx,v 1.20 2009-04-25 17:57:01 ssnyder Exp $
@@ -131,6 +131,50 @@ void etaphi_range (double eta,
 //**************************************************************************
 
 
+// Helper to get calorimeter segmentation.
+// We need to defer this until after initialize(), when the detector
+// description is available.
+class Segmentation
+{
+public:
+  Segmentation (StoreGateSvc* detStore);
+
+  /// middle layer  cell segmentation size 
+  double m_detas2;
+  double m_dphis2;
+};
+
+
+Segmentation::Segmentation (StoreGateSvc* detStore)
+{
+  const CaloDetDescrManager* dd_man = nullptr;
+  if (detStore->retrieve (dd_man, "CaloMgr").isFailure()) {
+    m_detas2 = 0;
+    m_dphis2 = 0;
+  }
+  else {
+    const CaloDetDescrElement* elt = dd_man->get_element (CaloCell_ID::EMB2,
+                                                          0.001,
+                                                          0.001);
+    if (elt) {
+      m_detas2 = elt->deta();
+      m_dphis2 = elt->dphi();
+    }
+    else {
+      // various TB configurations might have other eta/phi ranges or
+      // no access at all to EMB2 but would need still the standard
+      // EMB2 cell width as reference. Therefore the nominal eta and
+      // phi width is assumed here
+      m_detas2 = 0.025;
+      m_dphis2 = M_PI/128.;
+    }
+  }
+}
+
+
+//**************************************************************************
+
+
 /**
  * @brief Sampling calculator helper class.
  *
@@ -148,9 +192,11 @@ public:
   /**
    * @brief Constructor.
    * @param parent The parent correction class.
+   * @param windows Per-layer array of window eta,phi sizes.
    * @param cluster The cluster being operated on.
    */
   SamplingHelper (const CaloClusterCorrection& parent,
+                  const CaloFillRectangularCluster::WindowArray_t& windows,
                   CaloCluster* cluster);
 
 
@@ -218,36 +264,34 @@ public:
    * @brief Calculate layer variables and update cluster.
    * @param eta Center of the cluster in @f$\eta@f$.
    * @param phi Center of the cluster in @f$\phi@f$.
-   * @param deta Full width of the cluster in @f$\eta@f$.
-   * @param dphi Full width of the cluster in @f$\phi@f$.
-   * @param fallback_eta @f$\eta@f$ result to use if there's an error.
-   * @param fallback_phi @f$\phi@f$ result to use if there's an error.
-   * @param sampling The sampling for which to do the calculation.
+   * @param layer Calorimeter layer being calculated (0-3).
+   * @param fallback_layer Layer for fallback values (see below).
+   * @param samplings List of samplings for this region.
    * @param allow_badpos Should error flags be allowed into the cluster?
    *
    * This method selects the cells within the specified
-   * window in the specified sampling from the current list of cells
-   * in the cluster and calculates the layer variables.
+   * window for the sampling for the specified layer from the current list
+   * of cells in the cluster and calculates the layer variables.
    *
    * The result of the calculation will be held in internal variables.
    * In addition, the cluster variables for this sampling will
    * be updated with the result.
    *
    * In some cases, the calculation of the cluster position may yield
-   * an error (for example, if there are no selected cells).  In this case,
-   * the values specified by @c fallback_eta and @c fallback_phi are used
-   * instead of the calculated result.  If @c allow_badpos is true,
+   * an error (for example, if there are no selected cells).
+   * In this case, we use the cluster eta/phi from the layer
+   * given by @c fallback_layer instead of the calculated result.
+   * (If @c fallback_layer is < 0, then we use the @c eta, @c phi
+   * arguments instead.)  If @c allow_badpos is true,
    * then the error flags are used to update the cluster variables;
    * otherwise, the fallback position is used when updating the cluster.
    */
   void
   calculate_and_set (double eta,
                      double phi,
-                     double deta,
-                     double dphi,
-                     double fallback_eta,
-                     double fallback_phi,
-                     CaloSampling::CaloSample sampling,
+                     int layer,
+                     int fallback_layer,
+                     const CaloSampling::CaloSample samplings[4],
                      bool allow_badpos = false);
 
 
@@ -269,6 +313,10 @@ public:
   // return also the real value (now that the raw value are returned instead)
   double etareal() const { return m_calc.etam(); }
 
+  // Return cluster window size for a given layer.
+  double deta (int layer) const { return m_windows[layer].first; }
+  double dphi (int layer) const { return m_windows[layer].second; }
+
 
 protected:
   /// The calculator object.
@@ -280,6 +328,9 @@ protected:
   /// The cluster we're updating.
   CaloCluster* m_cluster;
 
+  /// Window size, per layer.
+  CaloFillRectangularCluster::WindowArray_t m_windows;
+
   /// @f$\eta@f$ position from last calculation.
   double m_etam;
 
@@ -291,12 +342,15 @@ protected:
 /**
  * @brief Constructor.
  * @param parent The parent correction class.
+ * @param windows Per-layer array of window eta,phi sizes.
  * @param cluster The cluster being operated on.
  */
 SamplingHelper::SamplingHelper (const CaloClusterCorrection& parent,
+                                const CaloFillRectangularCluster::WindowArray_t& windows,
                                 CaloCluster* cluster)
   : m_parent (parent),
     m_cluster (cluster),
+    m_windows (windows),
     m_etam(0),
     m_phim(0)
 {
@@ -307,25 +361,25 @@ SamplingHelper::SamplingHelper (const CaloClusterCorrection& parent,
  * @brief Calculate layer variables and update cluster.
  * @param eta Center of the cluster in @f$\eta@f$.
  * @param phi Center of the cluster in @f$\phi@f$.
- * @param deta Full width of the cluster in @f$\eta@f$.
- * @param dphi Full width of the cluster in @f$\phi@f$.
- * @param fallback_eta @f$\eta@f$ result to use if there's an error.
- * @param fallback_phi @f$\phi@f$ result to use if there's an error.
- * @param sampling The sampling for which to do the calculation.
+ * @param layer Calorimeter layer being calculated (0-3).
+ * @param fallback_layer Layer for fallback values (see below).
+ * @param samplings List of samplings for this region.
  * @param allow_badpos Should error flags be allowed into the cluster?
  *
  * This method selects the cells within the specified
- * window in the specified sampling from the current list of cells
- * in the cluster and calculates the layer variables.
+ * window for the sampling for the specified layer from the current list
+ * of cells in the cluster and calculates the layer variables.
  *
  * The result of the calculation will be held in internal variables.
  * In addition, the cluster variables for this sampling will
  * be updated with the result.
  *
  * In some cases, the calculation of the cluster position may yield
- * an error (for example, if there are no selected cells).  In this case,
- * the values specified by @c fallback_eta and @c fallback_phi are used
- * instead of the calculated result.  If @c allow_badpos is true,
+ * an error (for example, if there are no selected cells).
+ * In this case, we use the cluster eta/phi from the layer
+ * given by @c fallback_layer instead of the calculated result.
+ * (If @c fallback_layer is < 0, then we use the @c eta, @c phi
+ * arguments instead.)  If @c allow_badpos is true,
  * then the error flags are used to update the cluster variables;
  * otherwise, the fallback position is used when updating the cluster.
  */
@@ -333,18 +387,24 @@ void
 SamplingHelper::calculate_and_set
   (double eta,
    double phi,
-   double deta,
-   double dphi,
-   double fallback_eta,
-   double fallback_phi,
-   CaloSampling::CaloSample sampling,
+   int layer,
+   int fallback_layer,
+   const CaloSampling::CaloSample samplings[4],
    bool allow_badpos)
 {
-  calculate (eta, phi, deta, dphi, sampling, true);
+  calculate (eta, phi, deta(layer), dphi(layer), samplings[layer], true);
 
   double seteta = m_calc.etam();
   double setphi = m_calc.phim();
 
+  double fallback_eta = eta;
+  double fallback_phi = phi;
+  if ((seteta == -999 || setphi == -999) && fallback_layer >= 0) {
+    // In the calo frame
+    fallback_eta = m_cluster->etaSample (samplings[fallback_layer]);
+    fallback_phi = m_cluster->phiSample (samplings[fallback_layer]);
+  }
+
   if (!allow_badpos) {
     //if (m_etam == -999) m_etam = fallback_eta;
     //if (m_phim == -999) m_phim = fallback_phi;
@@ -354,7 +414,7 @@ SamplingHelper::calculate_and_set
 
   //FIXME: Sampling pattern not yet set! 
   m_parent.setsample (m_cluster,
-                      sampling,
+                      samplings[layer],
                       m_calc.em(),
 		      seteta,
 		      setphi,
@@ -482,11 +542,13 @@ public:
   /**
    * @brief Constructor.
    * @param parent The parent correction class.
+   * @param windows Per-layer array of window eta,phi sizes.
    * @param cluster The cluster being operated on.
    * @param list The cell list.
    * @param cell_container The container from which the cells came.
    */
   SamplingHelper_CaloCellList (const CaloClusterCorrection& parent,
+                               const CaloFillRectangularCluster::WindowArray_t& windows,
                                CaloCluster* cluster,
                                const CaloCellList& list,
                                const CaloCellContainer* cell_container);
@@ -533,16 +595,18 @@ private:
 /**
  * @brief Constructor.
  * @param parent The parent correction class.
+ * @param windows Per-layer array of window eta,phi sizes.
  * @param cluster The cluster being operated on.
  * @param list The cell list.
  * @param cell_container The container from which the cells came.
  */
 SamplingHelper_CaloCellList::SamplingHelper_CaloCellList
    (const CaloClusterCorrection& parent,
+    const CaloFillRectangularCluster::WindowArray_t& windows,
     CaloCluster* cluster,
     const CaloCellList& list,
     const CaloCellContainer* /*cell_container*/)
-     : SamplingHelper (parent, cluster),
+     : SamplingHelper (parent, windows, cluster),
        m_list (list)
 {
 }
@@ -610,9 +674,11 @@ public:
   /**
    * @brief Constructor.
    * @param parent The parent correction class.
+   * @param windows Per-layer array of window eta,phi sizes.
    * @param cluster The cluster being operated on.
    */
   SamplingHelper_Cluster (const CaloClusterCorrection& parent,
+                          const CaloFillRectangularCluster::WindowArray_t& windows,
                           CaloCluster* cluster);
 
   /**
@@ -649,11 +715,13 @@ public:
 /**
  * @brief Constructor.
  * @param parent The parent correction class.
+ * @param windows Per-layer array of window eta,phi sizes.
  * @param cluster The cluster being operated on.
  */
 SamplingHelper_Cluster::SamplingHelper_Cluster (const CaloClusterCorrection& parent,
+                                                const CaloFillRectangularCluster::WindowArray_t& windows,
                                                 CaloCluster* cluster)
-  : SamplingHelper (parent, cluster)
+  : SamplingHelper (parent, windows, cluster)
 {
 }
 
@@ -717,17 +785,7 @@ CaloFillRectangularCluster::CaloFillRectangularCluster
   (const std::string& type,
    const std::string& name,
    const IInterface* parent)
-    : CaloClusterCorrection(type, name, parent),
-      m_detas2(0),
-      m_dphis2(0),
-      m_deta0(0),
-      m_deta1(0),
-      m_deta2(0),
-      m_deta3(0),
-      m_dphi0(0),
-      m_dphi1(0),
-      m_dphi2(0),
-      m_dphi3(0)
+    : CaloClusterCorrection(type, name, parent)
 { 
   // properties 
   declareProperty("eta_size",     m_neta = 5);
@@ -750,44 +808,6 @@ StatusCode CaloFillRectangularCluster::initialize()
   if (!m_cellsName.key().empty())
     CHECK( m_cellsName.initialize() );
 
-  // Look up the middle layer cell segmentation.
-  {
-    const CaloDetDescrManager* dd_man = CaloDetDescrManager::instance();
-    const CaloDetDescrElement* elt = dd_man->get_element (CaloCell_ID::EMB2,
-                                                          0.001,
-                                                          0.001);
-    if (elt) {
-      m_detas2 = elt->deta();
-      m_dphis2 = elt->dphi();
-    }
-    else {
-      // various TB configurations might have other eta/phi ranges or
-      // no access at all to EMB2 but would need still the standard
-      // EMB2 cell width as reference. Therefore the nominal eta and
-      // phi width is assumed here
-      m_detas2 = 0.025;
-      m_dphis2 = M_PI/128.;
-    }
-  }
-
-  // set up the sampling windows:
-  m_deta0 = m_detas2*m_neta;
-  m_dphi0 = m_dphis2*4;
-
-  if (m_nphi >= 7)
-    m_dphi0 = m_dphi0*2;
-  else
-    m_dphi0 = m_dphi0*1.5;
-
-  m_deta1 = m_deta0;
-  m_dphi1 = m_dphi0;
-
-  m_deta2 = m_detas2*m_neta;
-  m_dphi2 = m_dphis2*m_nphi;
-
-  m_deta3 = (2*m_detas2)*(0.5 + (m_neta/2.));
-  m_dphi3 = m_dphi2;
-
   return StatusCode::SUCCESS;
 }
 
@@ -810,8 +830,7 @@ CaloFillRectangularCluster::makeCorrection1(const EventContext& ctx,
                                              samplings[4]) const
 {
   // Do sampling 2.
-  helper.calculate_and_set (eta, phi, m_deta2, m_dphi2, eta, phi,
-                            samplings[2], true);
+  helper.calculate_and_set (eta, phi, 2, -1, samplings, true);
   // the etam and phim of the helper are now filled with etamr and phimr from the CaloLayerCalculator
   double eta2 = helper.etam();
   double phi2 = helper.phim();
@@ -819,13 +838,8 @@ CaloFillRectangularCluster::makeCorrection1(const EventContext& ctx,
   if (eta2 == -999.) eta2 = eta;
   if (phi2 == -999.) phi2 = phi;
 
-  // But the fall back are in the calo frame
-  double etaf = helper.cluster()->etaSample(samplings[2]);
-  double phif = helper.cluster()->phiSample(samplings[2]);
-
   // Now do sampling 1; use the result from sampling 2 as the seed.
-  helper.calculate_and_set (eta2, phi2, m_deta1, m_dphi1, etaf, phif,
-                            samplings[1]);
+  helper.calculate_and_set (eta2, phi2, 1, -1, samplings);
   double eta1 = helper.etam();
   double phi1 = helper.phim();
   bool refine = true;
@@ -865,16 +879,10 @@ CaloFillRectangularCluster::makeCorrection1(const EventContext& ctx,
   }
 
   // Now do sampling 0 using the eta1 point: 
-  etaf = helper.cluster()->etaSample(samplings[1]);
-  phif = helper.cluster()->phiSample(samplings[1]);
-  helper.calculate_and_set (eta1, phi2, m_deta0, m_dphi0, etaf, phif,
-                            samplings[0]);
+  helper.calculate_and_set (eta1, phi2, 0, 1, samplings);
 
   // Do for sampling 3 (using the sampling 2 seed).
-  etaf = helper.cluster()->etaSample(samplings[2]);
-  phif = helper.cluster()->phiSample(samplings[2]);
-  helper.calculate_and_set (eta2, phi2, m_deta3, m_dphi3, etaf, phif,
-                            samplings[3]);
+  helper.calculate_and_set (eta2, phi2, 3, -1, samplings);
 
   // Crack;
   // Check if the cluster has TileGap3 sampling and avoid to calculate the TileGap3 energy twice
@@ -955,8 +963,7 @@ CaloFillRectangularCluster::makeCorrection2 (const EventContext& ctx,
   // Get the seed position of the cluster.
   CaloCluster* cluster = helper.cluster();
   double eta, phi;
-  const CaloCell* cell_max = helper.max_et_cell();
-  get_seed (cluster, cell_max, eta, phi);
+  get_seed (helper, cluster, eta, phi);
   double aeta = fabs(eta);  
 
   // set the appropriate cluster size
@@ -1067,9 +1074,16 @@ CaloFillRectangularCluster::makeCorrection2 (const EventContext& ctx,
 void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx,
                                                 CaloCluster* cluster) const
 {
-
   ATH_MSG_DEBUG( "Executing CaloFillRectangularCluster" << endmsg) ;
 
+  CaloClusterCorr::Segmentation seg (&*detStore());
+  if (seg.m_detas2 == 0) {
+    ATH_MSG_ERROR ("Retrieving cell segmentation");
+    return;
+  }
+  WindowArray_t windows = initWindows (m_neta, m_nphi,
+                                       seg.m_detas2, seg.m_dphis2);
+
   if (m_fill_cluster) {
 
     //By default, use the original cell container
@@ -1099,10 +1113,11 @@ void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx,
     // This 5 is a safe margin for cell_list calculation
     // and should not be changed.
     CaloCellList cell_list(cell_container); 
-    cell_list.select(eta,phi,m_detas2*(m_neta+5),m_dphis2*(m_nphi+5));
+    cell_list.select(eta,phi,seg.m_detas2*(m_neta+5),seg.m_dphis2*(m_nphi+5));
 
     // Do the calculation.
     CaloClusterCorr::SamplingHelper_CaloCellList helper (*this,
+                                                         windows,
                                                          cluster,
                                                          cell_list,
                                                          cell_container);
@@ -1110,7 +1125,7 @@ void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx,
   }
   else {
     // We're recalculating a cluster using the existing cells.
-    CaloClusterCorr::SamplingHelper_Cluster helper (*this, cluster);
+    CaloClusterCorr::SamplingHelper_Cluster helper (*this, windows, cluster);
     makeCorrection2 (ctx, helper);
   }
 }
@@ -1118,20 +1133,21 @@ void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx,
 
 /*
  * @brief Return the seed position of a cluster.
+ * @param helper Sampling calculation helper object.
  * @param cluster The cluster on which to operate.
- * @param max_et_cell The cell with the largest energy
- *  (of those being considered for inclusion in the cluster).
  * @param[out] eta The @f$\eta@f$ location of the cluster seed.
  * @param[out] phi The @f$\phi@f$ location of the cluster seed.
  *
  * The cluster seed is the center of rectangular cluster windows.
  * This may be overridden by derived classes to change the seed definition.
  */
-void CaloFillRectangularCluster::get_seed (const CaloCluster* cluster,
-                                           const CaloCell* max_et_cell,
+void CaloFillRectangularCluster::get_seed (CaloClusterCorr::SamplingHelper& helper,
+                                           const CaloCluster* cluster,
                                            double& eta,
                                            double& phi) const
 {
+  const CaloCell* max_et_cell = helper.max_et_cell();
+
   ///!!! NEW way of the endcap-shift treatment (same for barrel and endcap)
   // a.b.c 2004 : for barrel, correct for the alignment before 
   //               comparing the Tower direction and the cell's
@@ -1171,7 +1187,7 @@ void CaloFillRectangularCluster::get_seed (const CaloCluster* cluster,
            elt->descriptor()->calo_eta_max()))
   {
     // Max cell is at the edge.  Is it outside the window?
-    if (std::abs (eta - elt->eta()) > m_deta2/2) {
+    if (std::abs (eta - elt->eta()) > helper.deta(2)/2) {
       // Yes --- change the seed.
       eta = elt->eta();
     }
@@ -1196,3 +1212,41 @@ CaloFillRectangularCluster::setCaloCellContainerName
   return this->setProperty (StringProperty ("cells_name", name));
 }
 
+
+/** 
+ * @brief Set up layer-by-layer cluster window sizes.
+ * @param neta Cluster eta size.
+ * @param nphi Cluster phi size.
+ * @param detas2 Middle layer cell eta size.
+ * @param detas2 Middle layer cell phi size.
+ *
+ * Returns per-layer array of deta,dphi pairs.
+ */
+CaloFillRectangularCluster::WindowArray_t
+CaloFillRectangularCluster::initWindows (const int neta,
+                                         const int nphi,
+                                         const double detas2,
+                                         const double dphis2) const
+{
+  CaloFillRectangularCluster::WindowArray_t w;
+
+  // set up the sampling windows:
+  w[0].first  = detas2*neta;
+  w[0].second = dphis2*4;
+
+  if (nphi >= 7)
+    w[0].second *= 2;
+  else
+    w[0].second *= 1.5;
+
+  w[1].first  = w[0].first;
+  w[1].second = w[0].second;
+
+  w[2].first  = detas2*neta;
+  w[2].second = dphis2*nphi;
+
+  w[3].first  = (2*detas2)*(0.5 + (neta/2.));
+  w[3].second = w[2].second;
+
+  return w;
+}
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.cxx b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.cxx
index c001e20147d4..aeb836bcb918 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
@@ -57,32 +57,49 @@ StatusCode CaloTopoEMlayers::initialize()
 {
   CHECK(CaloFillRectangularCluster::initialize() );
 
-  // set up the sampling windows:
-  float f_neta = (float)m_neta;
-  float f_nphi = (float)m_nphi;
-
-  m_deta0 = m_detas2*f_neta;
-  m_dphi0 = m_dphis2*f_nphi;
-
-  m_deta1 = m_detas2*f_neta;
-  m_dphi1 = m_dphis2*f_nphi;
-
-  m_deta2 = m_detas2*f_neta;
-  m_dphi2 = m_dphis2*f_nphi;
-
-  m_deta3 = m_detas2*f_neta;
-  m_dphi3 = m_dphis2*f_nphi;
-
   return StatusCode::SUCCESS;
 }
 
 
-
-void CaloTopoEMlayers::get_seed (const xAOD::CaloCluster* cluster,
-                                 const CaloCell* /*max_et_cell*/,
+void CaloTopoEMlayers::get_seed (CaloClusterCorr::SamplingHelper& /*helper*/,
+                                 const xAOD::CaloCluster* cluster,
                                  double& eta,
                                  double& phi) const
 {
   eta = cluster->eta();
   phi = cluster->phi();
 }
+
+
+/** 
+ * @brief Set up layer-by-layer cluster window sizes.
+ * @param neta Cluster eta size.
+ * @param nphi Cluster phi size.
+ * @param detas2 Middle layer cell eta size.
+ * @param detas2 Middle layer cell phi size.
+ *
+ * Returns per-layer array of deta,dphi pairs.
+ */
+CaloFillRectangularCluster::WindowArray_t
+CaloTopoEMlayers::initWindows (const int neta,
+                               const int nphi,
+                               const double detas2,
+                               const double dphis2) const
+{
+  CaloFillRectangularCluster::WindowArray_t w;
+
+  float f_neta = (float)neta;
+  float f_nphi = (float)nphi;
+
+  w[0].first  = detas2*f_neta;
+  w[1].first  = w[0].first;
+  w[2].first  = w[0].first;
+  w[3].first  = w[0].first;
+
+  w[0].second = dphis2*f_nphi;
+  w[1].second = w[0].second;
+  w[2].second = w[0].second;
+  w[3].second = w[0].second;
+
+  return w;
+}
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.h b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.h
index e30688df8772..4262f35da778 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.h
+++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMlayers.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CALOCLUSTERCORRECTION_CALOTOPOEMLAYERS_H
@@ -49,11 +49,28 @@ class CaloTopoEMlayers : public CaloFillRectangularCluster
   // Algtool virtual method 
   virtual StatusCode initialize() override;
 
-  virtual void get_seed (const xAOD::CaloCluster* cluster,
-                         const CaloCell* max_et_cell,
+  virtual void get_seed (CaloClusterCorr::SamplingHelper& helper,
+                         const xAOD::CaloCluster* cluster,
                          double& eta, double& phi) const override;
 
- private:
+
+  /** 
+   * @brief Set up layer-by-layer cluster window sizes.
+   * @param neta Cluster eta size.
+   * @param nphi Cluster phi size.
+   * @param detas2 Middle layer cell eta size.
+   * @param detas2 Middle layer cell phi size.
+   *
+   * Returns per-layer array of deta,dphi pairs.
+   */
+  virtual
+  WindowArray_t initWindows (const int neta,
+                             const int nphi,
+                             const double detas2,
+                             const double dphis2) const override;
+
+
+private:
 
   CaloTopoEMlayers() = delete;
 };
-- 
GitLab


From 543c3e728d878537f410c6c8aad0bd353dbbbd32 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 2 May 2019 16:25:47 +0200
Subject: [PATCH 073/129] LArRecUtils: Preparing to make CaloDD immutable.

Previously, we were creating the CaloDD via a converter, then applying
alignments via conditions callbacks.  This this meant that the CaloDD
will be different depending on whether we're looking before or after
alignments have been applied.  This can then lead to problems if the
CaloDD is retrieved too early.  The const_cast'ing needed is also
problematic for MT.

Instead of building CaloDD via a converter, we want to move to creating
it explicitly as part of doing alignments.

However, this means that in general, we shouldn't be trying to retrieve
CaloDetDescrManager during initialize().  Rework to avoid this.
---
 .../src/LArCellBuilderFromLArRawChannelTool.cxx   | 15 +++++++--------
 .../src/LArCellBuilderFromLArRawChannelTool.h     |  1 -
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx
index 51c01abcb8ff..10a27aafa119 100644
--- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx
@@ -36,7 +36,6 @@ LArCellBuilderFromLArRawChannelTool::LArCellBuilderFromLArRawChannelTool(
    m_addDeadOTX(true),
    m_initialDataPoolSize(-1),
    m_nTotalCells(0),
-   m_caloDDM(nullptr),
    m_cablingKey("LArOnOffIdMap"),
    m_onlineID(nullptr),
    m_caloCID(nullptr),
@@ -62,11 +61,8 @@ StatusCode LArCellBuilderFromLArRawChannelTool::initialize() {
 
   ATH_CHECK(m_rawChannelsKey.initialize());
 
-  ATH_MSG_DEBUG("Accesssing CaloDetDescrManager");
-  m_caloDDM = CaloDetDescrManager::instance() ;
-
   ATH_MSG_DEBUG("Accesssing CaloCellID");
-  m_caloCID = m_caloDDM->getCaloCell_ID();
+  ATH_CHECK( detStore()->retrieve (m_caloCID, "CaloCell_ID") );
 
   ATH_CHECK( m_cablingKey.initialize() );
   ATH_CHECK( detStore()->retrieve(m_onlineID, "LArOnlineID") );
@@ -127,7 +123,10 @@ LArCellBuilderFromLArRawChannelTool::process (CaloCellContainer* theCellContaine
    }
    else
      ATH_MSG_DEBUG("Got " << nRawChannels << " LArRawChannels");
-   
+
+   const CaloDetDescrManager* caloDDM = nullptr;
+   ATH_CHECK( detStore()->retrieve (caloDDM, "CaloMgr") );
+
 
   unsigned nCellsAdded=0;
   std::bitset<CaloCell_ID::NSUBCALO> includedSubcalos;
@@ -153,7 +152,7 @@ LArCellBuilderFromLArRawChannelTool::process (CaloCellContainer* theCellContaine
     if ( cabling->isOnlineConnected(hwid)) {
       const Identifier id=cabling->cnvToIdentifier(hwid);
       const IdentifierHash hashid= m_caloCID->calo_cell_hash(id);
-      const CaloDetDescrElement * theDDE=m_caloDDM->get_element(hashid);
+      const CaloDetDescrElement * theDDE=caloDDM->get_element(hashid);
         
       LArCell *pCell   = pool.nextElementPtr();
 
@@ -196,7 +195,7 @@ LArCellBuilderFromLArRawChannelTool::process (CaloCellContainer* theCellContaine
 	  if ( cabling->isOnlineConnected(hwid)) {
 	    const Identifier id=cabling->cnvToIdentifier(hwid);
 	    const IdentifierHash hashid= m_caloCID->calo_cell_hash(id);
-	    const CaloDetDescrElement * theDDE=m_caloDDM->get_element(hashid);
+	    const CaloDetDescrElement * theDDE=caloDDM->get_element(hashid);
 	    LArCell *pCell   = pool.nextElementPtr();
 	    *pCell = LArCell (theDDE,
 			      id,
diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h
index d04dca9b5e4c..a8fc3738a1cb 100755
--- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h
+++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h
@@ -99,7 +99,6 @@ private:
   unsigned m_nTotalCells;                   //!< Number of cells, set in Initialize()
 
 
-  const CaloDetDescrManager* m_caloDDM;
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey;
   const LArOnlineID* m_onlineID;
   const CaloCell_ID*  m_caloCID;
-- 
GitLab


From 4506101151a103fbcff094b293ff2817504991f1 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 2 May 2019 16:24:56 +0200
Subject: [PATCH 074/129] CaloTools: Remove reference to obsolete tool
 LArHVCorrTool.

This code could never have actually been executed anyway, since it's
trying to set the property LArCellHVCorr.HVCorrTool, which no longer exists.
---
 Calorimeter/CaloTools/python/CaloNoiseToolConfig.py | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py b/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py
index 8f976d62789e..0c19a6e36378 100644
--- a/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py
+++ b/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py
@@ -96,18 +96,8 @@ def CaloNoiseToolCfg(configFlags):
             theLArHVToolDB = LArHVToolDB("LArHVToolDB")
             result.addPublicTool( theLArHVToolDB )
 
-            from LArRecUtils.LArRecUtilsConf import LArHVCorrTool
-            theLArHVCorrTool = LArHVCorrTool("LArHVCorrTool")
-            theLArHVCorrTool.keyOutput = "LArHVScaleCorr"
-            theLArHVCorrTool.folderName= "/LAR/ElecCalibFlat/HVScaleCorr"
-            theLArHVCorrTool.doTdrift = False
-            theLArHVCorrTool.DeltaTupdate = 0
-            theLArHVCorrTool.HVTool = theLArHVToolDB
-            result.addPublicTool( theLArHVCorrTool )
-
             from LArCellRec.LArCellRecConf import LArCellHVCorr
             theLArCellHVCorr = LArCellHVCorr("LArCellHVCorr")
-            theLArCellHVCorr.HVCorrTool = theLArHVCorrTool
             result.addPublicTool( theLArCellHVCorr )
 
             caloNoiseToolDB.RescaleForHV=True
-- 
GitLab


From 89cdc2b5d5016323a25ff301169d08318661f5e8 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 2 May 2019 16:19:19 +0200
Subject: [PATCH 075/129] AthenaConfiguration: python3 fix

Fix references to func_name/func_code for python3.
---
 Control/AthenaConfiguration/python/AthConfigFlags.py      | 2 +-
 .../AthenaConfiguration/python/ComponentAccumulator.py    | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Control/AthenaConfiguration/python/AthConfigFlags.py b/Control/AthenaConfiguration/python/AthConfigFlags.py
index be04c2cc5fdb..678399e98c03 100644
--- a/Control/AthenaConfiguration/python/AthConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AthConfigFlags.py
@@ -239,7 +239,7 @@ class AthConfigFlags(object):
         print("%-15.15s : %30s : %s" % ("Category","Generator name", "Defined in" ))
         for name,gen in sorted(six.iteritems(self._dynaflags)):
             print("%-15.15s : %30s : %s" %
-                  (name, gen.func_name, '/'.join(gen.func_code.co_filename.split('/')[-2:])))
+                  (name, gen.__name__, '/'.join(six.get_function_code(gen).co_filename.split('/')[-2:])))
 
 
     def initAll(self): #Mostly a self-test method
diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index 82cc0bf79b50..864b9175f9b5 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -15,7 +15,7 @@ import ast
 import collections
 import six
 
-from UnifyProperties import unifySet
+from AthenaConfiguration.UnifyProperties import unifySet
 
 class ConfigurationError(RuntimeError):
     pass
@@ -138,7 +138,7 @@ class ComponentAccumulator(object):
 
         parent += newseq
         algsByName = findAllAlgorithmsByName(newseq)
-        for name, existingAlgs in algsByName.iteritems():
+        for name, existingAlgs in six.iteritems(algsByName):
             startingIndex = 0
             if name not in self._algorithms:
                 firstAlg, parent, idx = existingAlgs[0]
@@ -402,7 +402,7 @@ class ComponentAccumulator(object):
                     else:
                         self._msg.debug("  Merging sequence %s to a sequence %s", c.name(), dest.name() )
                         algorithmsByName = findAllAlgorithmsByName(c)
-                        for name, existingAlgs in algorithmsByName.iteritems():
+                        for name, existingAlgs in six.iteritems(algorithmsByName):
                             startingIndex = 0
                             if name not in self._algorithms:
                                 firstAlg, parent, idx = existingAlgs[0]
@@ -436,7 +436,7 @@ class ComponentAccumulator(object):
         mergeSequences(destSeq,other._sequence)
 
         # Additional checking and updating other accumulator's algorithms list
-        for name, alg in other._algorithms.iteritems():
+        for name, alg in six.iteritems(other._algorithms):
             if name not in self._algorithms:
                 raise ConfigurationError('Error in merging. Algorithm {} missing in destination accumulator'.format(name))
             other._algorithms[name] = self._algorithms[name]
-- 
GitLab


From addf4d81476078f867d6ed815bebfe81c9c6afaf Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 1 May 2019 16:09:50 +0200
Subject: [PATCH 076/129] tauEvent: SGTools->AthenaKernel

Adjust for headers moved from SGTools to AthenaKernel.
---
 Reconstruction/tauEvent/CMakeLists.txt                 | 8 ++++----
 Reconstruction/tauEvent/src/Tau1P3PDetails.cxx         | 4 ++--
 Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx    | 4 ++--
 Reconstruction/tauEvent/src/TauCommonDetails.cxx       | 4 ++--
 Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx  | 4 ++--
 Reconstruction/tauEvent/src/TauPi0Details.cxx          | 4 ++--
 Reconstruction/tauEvent/src/TauRecDetails.cxx          | 4 ++--
 Reconstruction/tauEvent/src/TauRecExtraDetails.cxx     | 4 ++--
 Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h | 4 ++--
 Reconstruction/tauEvent/tauEvent/TauJetContainer.h     | 4 ++--
 10 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/Reconstruction/tauEvent/CMakeLists.txt b/Reconstruction/tauEvent/CMakeLists.txt
index 7855e05ff2a1..d247feb0d90b 100644
--- a/Reconstruction/tauEvent/CMakeLists.txt
+++ b/Reconstruction/tauEvent/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Calorimeter/CaloIdentifier
                           Control/AthLinks
                           Control/Navigation
-                          Control/SGTools
+                          Control/AthenaKernel
                           Event/EventKernel
                           Event/FourMom
                           Event/NavFourMom
@@ -35,19 +35,19 @@ atlas_add_library( tauEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation SGTools EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( tauEventDict
                       tauEvent/tauEventDict.h
                       tauEvent/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation SGTools EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent
                       ELEMENT_LINKS Analysis::TauJetContainer  Analysis::TauDetailsContainer )
 
 atlas_add_dictionary( tauEnumsDict
                       tauEvent/tauEnumsDict.h
                       tauEvent/selectionEnums.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation SGTools EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom GaudiKernel ParticleEvent JetEvent Particle VxVertex tauEvent )
 
diff --git a/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx b/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx
index e431f7d8320b..effd478060c8 100644
--- a/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx
+++ b/Reconstruction/tauEvent/src/Tau1P3PDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file Tau1P3PDetails.cxx DEPRECATED DO NOT USE
@@ -18,7 +18,7 @@
 /// $Id: Tau1P3PDetails.cxx,v 1.12 2009-05-20 13:10:37 slai Exp $
 
 #include "tauEvent/Tau1P3PDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx b/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx
index 54e195c455ea..a5ebf62c7574 100644
--- a/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx
+++ b/Reconstruction/tauEvent/src/Tau1P3PExtraDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file Tau1P3PExtraDetails.cxx DEPRECATED DO NOT USE
@@ -18,7 +18,7 @@
 /// $Id: Tau1P3PExtraDetails.cxx,v 1.8 2009-01-17 01:34:16 tburgess Exp $
 
 #include "tauEvent/Tau1P3PExtraDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/src/TauCommonDetails.cxx b/Reconstruction/tauEvent/src/TauCommonDetails.cxx
index 7c2eeb232884..3a8bfdc3820e 100644
--- a/Reconstruction/tauEvent/src/TauCommonDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauCommonDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /// @file TauCommonDetails.cxx
@@ -20,7 +20,7 @@
 #include "tauEvent/TauCommonDetails.h"
 //Other includes
 #include "AthLinks/ElementLink.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "VxVertex/RecVertex.h"
 //C/C++ includes
 #include <string>
diff --git a/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx b/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx
index 4f685c7341cb..929663241aa5 100644
--- a/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauCommonExtraDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauCommonExtraDetails.cxx
@@ -17,7 +17,7 @@
 #include "tauEvent/TauCommonExtraDetails.h"
 //Other includes
 #include "CaloEvent/CaloCellContainer.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "AthLinks/ElementLink.h"
 //C/C++ includes
 #include <string>
diff --git a/Reconstruction/tauEvent/src/TauPi0Details.cxx b/Reconstruction/tauEvent/src/TauPi0Details.cxx
index 7700ebb47425..ac45e30030c6 100644
--- a/Reconstruction/tauEvent/src/TauPi0Details.cxx
+++ b/Reconstruction/tauEvent/src/TauPi0Details.cxx
@@ -1,10 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // implementation of TauPi0Details
 
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 #include "tauEvent/TauPi0Details.h"
 #include "tauEvent/TauPi0Candidate.h"
 #include "tauEvent/TauPi0Cluster.h"
diff --git a/Reconstruction/tauEvent/src/TauRecDetails.cxx b/Reconstruction/tauEvent/src/TauRecDetails.cxx
index 196de936c6cd..0e0f56df1f64 100644
--- a/Reconstruction/tauEvent/src/TauRecDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauRecDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauRecDetails.cxx  DEPRECATED DO NOT USE
@@ -16,7 +16,7 @@
 /// $Id: TauRecDetails.cxx,v 1.11 2009-05-20 13:10:37 slai Exp $
 
 #include "tauEvent/TauRecDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx b/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx
index a51cad21cbbd..b144ffaef526 100644
--- a/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx
+++ b/Reconstruction/tauEvent/src/TauRecExtraDetails.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauRecExtraDetails.cxx  DEPRECATED DO NOT USE
@@ -18,7 +18,7 @@
 /// $Id: TauRecExtraDetails.cxx,v 1.8 2009-01-17 11:16:25 tburgess Exp $
 
 #include "tauEvent/TauRecExtraDetails.h"
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 namespace Analysis
 {
diff --git a/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h b/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h
index 20677e9907b1..1252d4b6ff00 100644
--- a/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h
+++ b/Reconstruction/tauEvent/tauEvent/TauDetailsContainer.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///@file TauDetailsContainer.h
@@ -19,7 +19,7 @@
 #define TAU_DETAILS_CONTAINER_ANALYSIS_H
 
 #include "AthContainers/DataVector.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "tauEvent/TauDetails.h"
 
 namespace Analysis
diff --git a/Reconstruction/tauEvent/tauEvent/TauJetContainer.h b/Reconstruction/tauEvent/tauEvent/TauJetContainer.h
index 7b09d431cee1..1122cc3e663f 100644
--- a/Reconstruction/tauEvent/tauEvent/TauJetContainer.h
+++ b/Reconstruction/tauEvent/tauEvent/TauJetContainer.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------------
@@ -14,7 +14,7 @@
 #define TAU_CONTAINER_ANALYSIS_H
 
 #include "AthContainers/DataVector.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "tauEvent/TauJet.h"
 
 #include "NavFourMom/IParticleContainer.h"
-- 
GitLab


From 661054b9b69a908f9da55cc768ca51459a591569 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 2 May 2019 16:35:18 +0200
Subject: [PATCH 077/129] AnalysisTest: SGTools->AthenaKernel

Adjust for headers moved from SGTools to AthenaKernel.
---
 .../AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h            | 4 ++--
 .../AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h           | 4 ++--
 PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt    | 3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h
index 772ccc39c896..98d9876183b9 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////// 
@@ -20,7 +20,7 @@
 // FrameWork includes
 #include "AthenaBaseComps/AthAlgorithm.h"
 
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 class ReadINav4MomAssocs : public AthAlgorithm
 { 
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h
index e2e3d8745e15..33fcf821647a 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////// 
@@ -21,7 +21,7 @@
 // FrameWork includes
 #include "AthenaBaseComps/AthAlgorithm.h"
 
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 // NqvFourMom includes
 #include "NavFourMom/INavigable4MomentumCollection.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt
index eddf318f3e88..12fbbe9519eb 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt
@@ -7,7 +7,6 @@ atlas_subdir( AnalysisTest )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
-                          Control/SGTools
                           Control/AthContainers
                           Control/StoreGate
                           Event/NavFourMom
@@ -42,7 +41,7 @@ atlas_add_component( AnalysisTest
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CPPUNIT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${HEPMC_LIBRARIES} ${CLHEP_LIBRARIES} ${CPPUNIT_LIBRARIES} SGTools AthContainers StoreGateLib SGtests NavFourMom GaudiKernel McParticleEvent muonEvent Particle egammaEvent tauEvent VxVertex TestTools AthenaBaseComps AthenaKernel EventKernel FourMom GeneratorObjects AnalysisAssociation AnalysisUtilsLib AnalysisTriggerEvent McParticleUtils JetEvent )
+                     LINK_LIBRARIES ${HEPMC_LIBRARIES} ${CLHEP_LIBRARIES} ${CPPUNIT_LIBRARIES} AthContainers StoreGateLib SGtests NavFourMom GaudiKernel McParticleEvent muonEvent Particle egammaEvent tauEvent VxVertex TestTools AthenaBaseComps AthenaKernel EventKernel FourMom GeneratorObjects AnalysisAssociation AnalysisUtilsLib AnalysisTriggerEvent McParticleUtils JetEvent )
 
 # Install files from the package:
 atlas_install_headers( AnalysisTest )
-- 
GitLab


From ccd2aaa89d9b5bece9f3ad0b992d9e94bf32635a Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 2 May 2019 21:22:42 +0200
Subject: [PATCH 078/129] MuonConfig: Fix configuration of
 MuonTrackSummaryHelperTool.

Fix configuration of MuonTrackSummaryHelperTool for HoleOnTrackTool
becoming private.
Update reference files.
---
 .../python/MuonSegmentFindingConfig.py        |   5 +
 .../MuonConfig/share/MuonDataDecodeTest.ref   | 458 ++++++++---------
 .../share/MuonDataDecodeTest_Cache.ref        | 464 +++++++++---------
 3 files changed, 474 insertions(+), 453 deletions(-)

diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
index baac6ff07cdf..13d4697a402c 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
@@ -56,9 +56,14 @@ def MuonTrackSummaryHelperToolCfg(flags, **kwargs):
     acc.addPublicTool(extrap)
     result.merge(acc)
     kwargs.setdefault("Extrapolator", extrap)
+
+    from MuonTGRecTools.MuonTGRecToolsConf import Muon__MuonHolesOnTrackTool
+    holetool = Muon__MuonHolesOnTrackTool (ExtrapolatorName = extrap,
+                                           TrackingGeometryName = 'MuonStandaloneTrackingGeometry')
     
     kwargs.setdefault("DoHolesOnTrack", False)
     kwargs.setdefault("CalculateCloseHits", True)
+    kwargs.setdefault("HoleOnTrackTool", holetool)
 
     from MuonTrackSummaryHelperTool.MuonTrackSummaryHelperToolConf import Muon__MuonTrackSummaryHelperTool
     
diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref
index 01a4bc4ef853..aae9fc9ae7e7 100644
--- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref
+++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref
@@ -24,6 +24,7 @@ GeoModel.StripGeoType                    : 'GMX'
 GeoModel.Type                            : 'UNDEFINED'
 IOVDb.DatabaseInstance                   : [function]
 IOVDb.GlobalTag                          : 'CONDBR2-BLKPA-2018-13'
+Input.Collections                        : [function]
 Input.Files                              : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1']
 Input.ProjectName                        : [function]
 Input.RunNumber                          : [function]
@@ -78,7 +79,7 @@ Py:ComponentAccumulator   DEBUG Adding component ProxyProviderSvc/ProxyProviderS
 Py:ComponentAccumulator   DEBUG Adding component ByteStreamAttListMetadataSvc/ByteStreamAttListMetadataSvc to the job
 Py:ComponentAccumulator   DEBUG Adding component IOVDbMetaDataTool/IOVDbMetaDataTool to the job
 Py:ComponentAccumulator   DEBUG Adding component ByteStreamMetadataTool/ByteStreamMetadataTool to the job
-Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/199c6bbb319] -- built on [2019-04-19T1734]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/2a537dae079] -- built on [2019-05-02T1642]
 Py:AthConfigFlags   DEBUG dynamically loading the flag Detector
 Py:ComponentAccumulator   DEBUG Adding component GeoModelSvc/GeoModelSvc to the job
 Py:ComponentAccumulator   DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job
@@ -379,55 +380,58 @@ Py:ComponentAccumulator   DEBUG Adding component DBReplicaSvc/DBReplicaSvc to th
 Py:IOVDbSvc.CondDB   DEBUG Loading basic services for CondDBSetup...
 Py:ConfigurableDb   DEBUG loading confDb files...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libprofhelp.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthenaPoolTest.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIOVDbTestAlg.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthenaAuditors.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libPerfMonComps.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthExHelloWorld.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthExHive.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCLIDComps.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libGaudiHive.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libISF_Geant4Tools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libSCT_RawDataByteStreamCnv.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthExHive.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigConfBaseTest.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthenaPoolTest.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloDetDescr.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libInDetTrackHoleSearch.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTRT_TrackHoleSearch.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArMonTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArRawUtils.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIsolationAlgs.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkValAlgs.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloEvent.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAnalysisTest.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libRecBackgroundAlgs.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIsolationAlgs.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libegammaCaloTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libFastCaloSim.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libISF_Geant4Tools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkJiveXML.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigUpgradeTest.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthViewsDFlow.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthViewsAlgs.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArCellRec.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libDerivationFrameworkExamples.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArRecUtils.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libDerivationFrameworkExamples.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libDerivationFrameworkInDet.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libElectronPhotonTagTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrackToCalo.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigConfigSvc.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libegammaPerformance.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigHLTJetHypo.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloUtils.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkDeterministicAnnealingFilter.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkGaussianSumFilter.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkKalmanFitter.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigInterfaces.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIOVDbSvc.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libPixelConditionsServices.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArCalibUtils.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArCellRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIsolationTool.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libtauRecTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT2CaloCommon.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigMuonMonitoring.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloMonitoringTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigConfigSvc.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigHLTJetHypo.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloClusterCorrection.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigCaloRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT2CaloEgamma.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libFTK_RecTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigInDetAnalysisExample.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/WorkDir.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigCaloRec.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloCalibTools.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloCalibUtils.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-18T2137/GAUDI/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Gaudi.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-18T2137/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Athena.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-01T2135/GAUDI/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Gaudi.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-01T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Athena.confdb]...
 Py:ConfigurableDb   DEBUG loading confDb files... [DONE]
-Py:ConfigurableDb   DEBUG loaded 1100 confDb packages
-Py:ConfigurableDb    INFO Read module info for 5473 configurables from 47 genConfDb files
+Py:ConfigurableDb   DEBUG loaded 1101 confDb packages
+Py:ConfigurableDb    INFO Read module info for 5471 configurables from 50 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:ConfigurableDb   DEBUG : Found configurable <class 'GaudiCoreSvc.GaudiCoreSvcConf.MessageSvc'> in module GaudiCoreSvc.GaudiCoreSvcConf
 Py:loadBasicAthenaPool   DEBUG Loading basic services for AthenaPool...
@@ -1188,24 +1192,24 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 |-AuditStop                               = False
 |-Cardinality                             = 0
 |-ContinueEventloopOnFPE                  = False
-|-DetStore                   @0x7f49f0b54950 = ServiceHandle('StoreGateSvc/DetectorStore')
+|-DetStore                   @0x7f493dabd990 = ServiceHandle('StoreGateSvc/DetectorStore')
 |-Enable                                  = True
 |-ErrorCounter                            = 0
 |-ErrorMax                                = 1
-|-EvtStore                   @0x7f49f0b548d0 = ServiceHandle('StoreGateSvc')
-|-ExtraInputs                @0x7f49ef0887a0 = []  (default: [])
-|-ExtraOutputs               @0x7f49ef088830 = []  (default: [])
+|-EvtStore                   @0x7f493dabd910 = ServiceHandle('StoreGateSvc')
+|-ExtraInputs                @0x7f493bfee638 = []  (default: [])
+|-ExtraOutputs               @0x7f493bfee6c8 = []  (default: [])
 |-FilterCircularDependencies              = True
 |-IgnoreFilterPassed                      = False
 |-IsIOBound                               = False
-|-Members                    @0x7f49ef088440 = ['Muon::RpcRawDataProvider/RpcRawDataProvider', 'Muon::TgcRawDataProvider/TgcRawDataProvider', 'MuonCacheCreator/MuonCacheCreator', 'Muon::MdtRawDataProvider/MdtRawDataProvider', 'Muon::CscRawDataProvider/CscRawDataProvider', 'RpcRdoToRpcPrepData/RpcRdoToRpcPrepData', 'TgcRdoToTgcPrepData/TgcRdoToTgcPrepData', 'MdtRdoToMdtPrepData/MdtRdoToMdtPrepData', 'CscRdoToCscPrepData/CscRdoToCscPrepData', 'CscThresholdClusterBuilder/CscThesholdClusterBuilder']
+|-Members                    @0x7f493bfee440 = ['Muon::RpcRawDataProvider/RpcRawDataProvider', 'Muon::TgcRawDataProvider/TgcRawDataProvider', 'MuonCacheCreator/MuonCacheCreator', 'Muon::MdtRawDataProvider/MdtRawDataProvider', 'Muon::CscRawDataProvider/CscRawDataProvider', 'RpcRdoToRpcPrepData/RpcRdoToRpcPrepData', 'TgcRdoToTgcPrepData/TgcRdoToTgcPrepData', 'MdtRdoToMdtPrepData/MdtRdoToMdtPrepData', 'CscRdoToCscPrepData/CscRdoToCscPrepData', 'CscThresholdClusterBuilder/CscThesholdClusterBuilder']
 |                                            (default: [])
 |-ModeOR                                  = False
 |-MonitorService                          = 'MonitorSvc'
-|-NeededResources            @0x7f49ef088680 = []  (default: [])
+|-NeededResources            @0x7f493bfee518 = []  (default: [])
 |-OutputLevel                             = 0
 |-RegisterForContextService               = False
-|-Sequential                 @0x7f49f2f65b00 = True  (default: False)
+|-Sequential                 @0x7f493feccb00 = True  (default: False)
 |-StopOverride                            = False
 |-TimeOut                                 = 0.0
 |-Timeline                                = True
@@ -1221,22 +1225,22 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7f49ef70c610 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c66f910 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef70c590 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef088560 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef0889e0 = []  (default: [])
+| |-EvtStore                   @0x7f493c66f890 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bfee710 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfee830 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef0886c8 = []  (default: [])
+| |-NeededResources            @0x7f493bfee758 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7f49efb4baa0 = PrivateToolHandle('Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool')
+| |-ProviderTool               @0x7f493c9a7cb0 = PrivateToolHandle('Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool')
 | |                                            (default: 'Muon::RPC_RawDataProviderTool/RpcRawDataProviderTool')
-| |-RegionSelectionSvc         @0x7f49ef70c690 = ServiceHandle('RegSelSvc')
+| |-RegionSelectionSvc         @0x7f493c66f990 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1248,11 +1252,11 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                          = False
 | | |-AuditStop                           = False
 | | |-AuditTools                          = False
-| | |-Decoder                @0x7f49efcb4bf0 = PrivateToolHandle('Muon::RpcROD_Decoder/RpcROD_Decoder')
-| | |-DetStore               @0x7f49ef6b94d0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore               @0x7f49ef6b9490 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs            @0x7f49ef6f2a28 = []  (default: [])
-| | |-ExtraOutputs           @0x7f49ef6f2758 = []  (default: [])
+| | |-Decoder                @0x7f493cc2caf8 = PrivateToolHandle('Muon::RpcROD_Decoder/RpcROD_Decoder')
+| | |-DetStore               @0x7f493c61a990 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore               @0x7f493c61a950 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs            @0x7f493c659b00 = []  (default: [])
+| | |-ExtraOutputs           @0x7f493c659830 = []  (default: [])
 | | |-MonitorService                      = 'MonitorSvc'
 | | |-OutputLevel                         = 0
 | | |-RPCSec                              = 'StoreGateSvc+RPC_SECTORLOGIC'
@@ -1268,10 +1272,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStop                        = False
 | | | |-AuditTools                       = False
 | | | |-DataErrorPrintLimit              = 1000
-| | | |-DetStore            @0x7f49ef6b9550 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore            @0x7f49ef6b9590 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs         @0x7f49ef6f2878 = []  (default: [])
-| | | |-ExtraOutputs        @0x7f49ef6f2830 = []  (default: [])
+| | | |-DetStore            @0x7f493c61aa10 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore            @0x7f493c61aa50 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs         @0x7f493c659950 = []  (default: [])
+| | | |-ExtraOutputs        @0x7f493c659908 = []  (default: [])
 | | | |-MonitorService                   = 'MonitorSvc'
 | | | |-OutputLevel                      = 0
 | | | |-Sector13Data                     = False
@@ -1291,21 +1295,24 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7f49ef71e5d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c6818d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef71e550 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef088d88 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef088e60 = []  (default: [])
+| |-EvtStore                   @0x7f493c681850 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bfeeab8 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfeecb0 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef088dd0 = []  (default: [])
+| |-NeededResources            @0x7f493bfeec20 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7f49f0bafc80 = PrivateToolHandle('Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool')
+| |-ProviderTool               @0x7f493db10d70 = PrivateToolHandle('Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool')
 | |                                            (default: 'Muon::TGC_RawDataProviderTool/TgcRawDataProviderTool')
+| |-RegionSelectionSvc         @0x7f493c681950 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
+| |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
 | |=/***** Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool *****
 | | |-AuditFinalize                  = False
@@ -1315,12 +1322,12 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                     = False
 | | |-AuditStop                      = False
 | | |-AuditTools                     = False
-| | |-Decoder           @0x7f49f0bafd70 = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
+| | |-Decoder           @0x7f493db10e60 = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
 | | |                                   (default: 'Muon::TGC_RodDecoderReadout/TGC_RodDecoderReadout')
-| | |-DetStore          @0x7f49ef65ca90 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore          @0x7f49ef65cad0 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs       @0x7f49ef6686c8 = []  (default: [])
-| | |-ExtraOutputs      @0x7f49ef668518 = []  (default: [])
+| | |-DetStore          @0x7f493c5c0f50 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore          @0x7f493c5c0f90 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs       @0x7f493c5c9a28 = []  (default: [])
+| | |-ExtraOutputs      @0x7f493c5c9878 = []  (default: [])
 | | |-MonitorService                 = 'MonitorSvc'
 | | |-OutputLevel                    = 0
 | | |-RdoLocation                    = 'StoreGateSvc+TGCRDO'
@@ -1332,10 +1339,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7f49ef65cb90 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7f49ef65cbd0 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7f49ef668368 = []  (default: [])
-| | | |-ExtraOutputs      @0x7f49ef6684d0 = []  (default: [])
+| | | |-DetStore          @0x7f493c552090 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7f493c5520d0 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7f493c5c96c8 = []  (default: [])
+| | | |-ExtraOutputs      @0x7f493c5c9830 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | |-ShowStatusWords                = False
@@ -1355,24 +1362,24 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 0
-| |-CscCacheKey                @0x7f49efca5e10 = 'CscCache'  (default: 'StoreGateSvc+')
-| |-DetStore                   @0x7f49ef6aa3d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-CscCacheKey                @0x7f493cc10d50 = 'CscCache'  (default: 'StoreGateSvc+')
+| |-DetStore                   @0x7f493c68d890 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DisableViewWarning                      = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef6aa350 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef124e60 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef124950 = []  (default: [])
+| |-EvtStore                   @0x7f493c68d810 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493c089a70 = []  (default: [])
+| |-ExtraOutputs               @0x7f493c0899e0 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
-| |-MdtCsmCacheKey             @0x7f49efca5480 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
+| |-MdtCsmCacheKey             @0x7f493cc104b0 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef124dd0 = []  (default: [])
+| |-NeededResources            @0x7f493c089518 = []  (default: [])
 | |-OutputLevel                             = 0
 | |-RegisterForContextService               = False
-| |-RpcCacheKey                @0x7f49efca5e40 = 'RpcCache'  (default: 'StoreGateSvc+')
-| |-TgcCacheKey                @0x7f49efca5e70 = 'TgcCache'  (default: 'StoreGateSvc+')
+| |-RpcCacheKey                @0x7f493cc10d80 = 'RpcCache'  (default: 'StoreGateSvc+')
+| |-TgcCacheKey                @0x7f493cc10db0 = 'TgcCache'  (default: 'StoreGateSvc+')
 | |-Timeline                                = True
 | \----- (End of Algorithm MuonCacheCreator/MuonCacheCreator) ----------------------------------------
 |=/***** Algorithm Muon::MdtRawDataProvider/MdtRawDataProvider ***************************************
@@ -1387,22 +1394,22 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7f49ef6e2650 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c64b950 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef6e25d0 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef088e18 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef088ea8 = []  (default: [])
+| |-EvtStore                   @0x7f493c64b8d0 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bfeecf8 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfeec68 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef088ef0 = []  (default: [])
+| |-NeededResources            @0x7f493bfeed40 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7f49efc07c50 = PrivateToolHandle('Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool')
+| |-ProviderTool               @0x7f493c9f2b50 = PrivateToolHandle('Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool')
 | |                                            (default: 'Muon::MDT_RawDataProviderTool/MdtRawDataProviderTool')
-| |-RegionSelectionSvc         @0x7f49ef6e26d0 = ServiceHandle('RegSelSvc')
+| |-RegionSelectionSvc         @0x7f493c64b9d0 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1414,12 +1421,12 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                        = False
 | | |-AuditStop                         = False
 | | |-AuditTools                        = False
-| | |-CsmContainerCacheKey @0x7f49efca5480 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
-| | |-Decoder              @0x7f49ef533140 = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder')
-| | |-DetStore             @0x7f49ef1341d0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore             @0x7f49ef134210 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs          @0x7f49ef15bd88 = []  (default: [])
-| | |-ExtraOutputs         @0x7f49ef15bdd0 = []  (default: [])
+| | |-CsmContainerCacheKey @0x7f493cc104b0 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
+| | |-Decoder              @0x7f493c49b230 = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder')
+| | |-DetStore             @0x7f493c09b210 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore             @0x7f493c09b250 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs          @0x7f493c0c3c68 = []  (default: [])
+| | |-ExtraOutputs         @0x7f493c0c3cb0 = []  (default: [])
 | | |-MonitorService                    = 'MonitorSvc'
 | | |-OutputLevel                       = 0
 | | |-RdoLocation                       = 'StoreGateSvc+MDTCSM'
@@ -1432,10 +1439,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7f49ef1342d0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7f49ef134310 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7f49ef15b908 = []  (default: [])
-| | | |-ExtraOutputs      @0x7f49ef15b8c0 = []  (default: [])
+| | | |-DetStore          @0x7f493c09b310 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7f493c09b350 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7f493c0c37e8 = []  (default: [])
+| | | |-ExtraOutputs      @0x7f493c0c37a0 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | |-ReadKey                        = 'ConditionStore+MuonMDT_CablingMap'
@@ -1455,19 +1462,19 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7f49ef790b50 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c65be50 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef790a90 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef08b050 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef088f80 = []  (default: [])
+| |-EvtStore                   @0x7f493c65bd90 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bfeeea8 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfeee18 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef088c68 = []  (default: [])
+| |-NeededResources            @0x7f493bfeedd0 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7f49efc07e50 = PrivateToolHandle('Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool')
+| |-ProviderTool               @0x7f493c9f2d50 = PrivateToolHandle('Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool')
 | |                                            (default: 'Muon::CSC_RawDataProviderTool/CscRawDataProviderTool')
 | |-RegisterForContextService               = False
 | |-Timeline                                = True
@@ -1479,13 +1486,13 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                        = False
 | | |-AuditStop                         = False
 | | |-AuditTools                        = False
-| | |-CscContainerCacheKey @0x7f49efca5e10 = 'CscCache'  (default: 'StoreGateSvc+')
-| | |-Decoder              @0x7f49ef533320 = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder')
-| | |-DetStore             @0x7f49ef1232d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-CscContainerCacheKey @0x7f493cc10d50 = 'CscCache'  (default: 'StoreGateSvc+')
+| | |-Decoder              @0x7f493c49b410 = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder')
+| | |-DetStore             @0x7f493c0581d0 = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EventInfoKey                      = 'StoreGateSvc+EventInfo'
-| | |-EvtStore             @0x7f49ef123310 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs          @0x7f49ef124710 = []  (default: [])
-| | |-ExtraOutputs         @0x7f49ef124878 = []  (default: [])
+| | |-EvtStore             @0x7f493c058210 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs          @0x7f493c0892d8 = []  (default: [])
+| | |-ExtraOutputs         @0x7f493c089440 = []  (default: [])
 | | |-MonitorService                    = 'MonitorSvc'
 | | |-OutputLevel                       = 0
 | | |-RdoLocation                       = 'StoreGateSvc+CSCRDO'
@@ -1497,10 +1504,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7f49ef1233d0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7f49ef123410 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7f49ef1243b0 = []  (default: [])
-| | | |-ExtraOutputs      @0x7f49ef124368 = []  (default: [])
+| | | |-DetStore          @0x7f493c0582d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7f493c058310 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7f493c080f38 = []  (default: [])
+| | | |-ExtraOutputs      @0x7f493c080ef0 = []  (default: [])
 | | | |-IsCosmics                      = False
 | | | |-IsOldCosmics                   = False
 | | | |-MonitorService                 = 'MonitorSvc'
@@ -1520,25 +1527,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DecodingTool               @0x7f49ef12e198 = PrivateToolHandle('Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool')
+| |-DecodingTool               @0x7f493c096198 = PrivateToolHandle('Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool')
 | |                                            (default: 'Muon::RpcRdoToPrepDataTool/RpcRdoToPrepDataTool')
-| |-DetStore                   @0x7f49ef0cdd10 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c036d90 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef0cdc90 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef08b1b8 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef088b90 = []  (default: [])
+| |-EvtStore                   @0x7f493c036d10 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bfeebd8 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfee9e0 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef08b0e0 = []  (default: [])
+| |-NeededResources            @0x7f493bfeeef0 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+RPC_Measurements'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7f49f2f65b20 = False  (default: False)
-| |-RegionSelectionSvc         @0x7f49ef0cdd90 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7f493feccb20 = False  (default: False)
+| |-RegionSelectionSvc         @0x7f493c036e10 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1551,16 +1558,16 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStop                                       = False
 | | |-AuditTools                                      = False
 | | |-DecodeData                                      = True
-| | |-DetStore                           @0x7f49ef034ed0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore                           @0x7f49ef034f50 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs                        @0x7f49ef0ae320 = []  (default: [])
-| | |-ExtraOutputs                       @0x7f49ef0ae560 = []  (default: [])
+| | |-DetStore                           @0x7f493bf9cf50 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore                           @0x7f493bf9cfd0 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs                        @0x7f493c0164d0 = []  (default: [])
+| | |-ExtraOutputs                       @0x7f493c0165a8 = []  (default: [])
 | | |-InputCollection                                 = 'StoreGateSvc+RPC_triggerHits'
 | | |-MonitorService                                  = 'MonitorSvc'
 | | |-OutputCollection                                = 'StoreGateSvc+RPCPAD'
 | | |-OutputLevel                                     = 0
 | | |-RPCInfoFromDb                                   = False
-| | |-RdoDecoderTool                     @0x7f49efaedc90 = PrivateToolHandle('Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder')
+| | |-RdoDecoderTool                     @0x7f493ca90d70 = PrivateToolHandle('Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder')
 | | |                                                    (default: 'Muon::RpcRDO_Decoder')
 | | |-TriggerOutputCollection                         = 'StoreGateSvc+RPC_Measurements'
 | | |-etaphi_coincidenceTime                          = 20.0
@@ -1578,10 +1585,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7f49ef034fd0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7f49ef04a050 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7f49ef0ae680 = []  (default: [])
-| | | |-ExtraOutputs      @0x7f49ef0ae638 = []  (default: [])
+| | | |-DetStore          @0x7f493bfb1090 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7f493bfb10d0 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7f493c0166c8 = []  (default: [])
+| | | |-ExtraOutputs      @0x7f493c016680 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | \----- (End of Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder) -----
@@ -1599,25 +1606,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DecodingTool               @0x7f49ef053050 = PrivateToolHandle('Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool')
+| |-DecodingTool               @0x7f493bfbc180 = PrivateToolHandle('Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool')
 | |                                            (default: 'Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool')
-| |-DetStore                   @0x7f49ef027c10 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493bf8ec90 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef027b90 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef08b128 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef08b200 = []  (default: [])
+| |-EvtStore                   @0x7f493bf8ec10 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bff00e0 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfeed88 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef08b098 = []  (default: [])
+| |-NeededResources            @0x7f493bff0050 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+TGC_Measurements'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7f49f2f65b20 = False  (default: False)
-| |-RegionSelectorSvc          @0x7f49ef027c90 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7f493feccb20 = False  (default: False)
+| |-RegionSelectorSvc          @0x7f493bf8ed10 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Setting                                 = 0
@@ -1631,10 +1638,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStop                                            = False
 | | |-AuditTools                                           = False
 | | |-DecodeData                                           = True
-| | |-DetStore                                @0x7f49ef034dd0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore                                @0x7f49ef034f10 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs                             @0x7f49ef04b830 = []  (default: [])
-| | |-ExtraOutputs                            @0x7f49ef04b998 = []  (default: [])
+| | |-DetStore                                @0x7f493bfb1490 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore                                @0x7f493bfb1550 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs                             @0x7f493bfbd050 = []  (default: [])
+| | |-ExtraOutputs                            @0x7f493bfbd0e0 = []  (default: [])
 | | |-FillCoinData                                         = True
 | | |-MonitorService                                       = 'MonitorSvc'
 | | |-OutputCoinCollection                                 = 'TrigT1CoinDataCollection'
@@ -1643,9 +1650,9 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-RDOContainer                                         = 'StoreGateSvc+TGCRDO'
 | | |-TGCHashIdOffset                                      = 26000
 | | |-dropPrdsWithZeroWidth                                = True
-| | |-outputCoinKey                           @0x7f49ef045f80 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
+| | |-outputCoinKey                           @0x7f493bfb9ea8 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
 | | |                                                         (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'])
-| | |-prepDataKeys                            @0x7f49ef04b950 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
+| | |-prepDataKeys                            @0x7f493bfbd128 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
 | | |                                                         (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'])
 | | |-show_warning_level_invalid_A09_SSW6_hit              = False
 | | \----- (End of Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool) -----
@@ -1662,25 +1669,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DecodingTool               @0x7f49f300bcb0 = PrivateToolHandle('Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool')
+| |-DecodingTool               @0x7f493ffb8e10 = PrivateToolHandle('Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool')
 | |                                            (default: 'Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool')
-| |-DetStore                   @0x7f49ef0bdbd0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c025c50 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef0bdb50 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef08b368 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef08b170 = []  (default: [])
+| |-EvtStore                   @0x7f493c025bd0 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bff01b8 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bfeef38 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef08b2d8 = []  (default: [])
+| |-NeededResources            @0x7f493bfeefc8 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+MDT_DriftCircles'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7f49f2f65b20 = False  (default: False)
-| |-RegionSelectionSvc         @0x7f49ef0bdc50 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7f493feccb20 = False  (default: False)
+| |-RegionSelectionSvc         @0x7f493c025cd0 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1694,13 +1701,13 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditTools                           = False
 | | |-CalibratePrepData                    = True
 | | |-DecodeData                           = True
-| | |-DetStore                @0x7f49ef04a6d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-DetStore                @0x7f493bfb16d0 = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-DiscardSecondaryHitTwin              = False
 | | |-DoPropagationCorrection              = False
 | | |-DoTofCorrection                      = True
-| | |-EvtStore                @0x7f49ef04a710 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs             @0x7f49ef05bc68 = []  (default: [])
-| | |-ExtraOutputs            @0x7f49ef05b638 = []  (default: [])
+| | |-EvtStore                @0x7f493bfb1710 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs             @0x7f493bfc7680 = []  (default: [])
+| | |-ExtraOutputs            @0x7f493bfc75f0 = []  (default: [])
 | | |-MonitorService                       = 'MonitorSvc'
 | | |-OutputCollection                     = 'StoreGateSvc+MDT_DriftCircles'
 | | |-OutputLevel                          = 0
@@ -1728,25 +1735,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-CscRdoToCscPrepDataTool    @0x7f49efaf3c00 = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool')
+| |-CscRdoToCscPrepDataTool    @0x7f493ca9bc00 = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool')
 | |                                            (default: 'Muon::CscRdoToCscPrepDataTool/CscRdoToPrepDataTool')
-| |-DetStore                   @0x7f49ef123cd0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493c058bd0 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49ef123c50 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef08b440 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef08b290 = []  (default: [])
+| |-EvtStore                   @0x7f493c058b50 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bff0290 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bff0098 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef08b3b0 = []  (default: [])
+| |-NeededResources            @0x7f493bff0200 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+CSC_Measurements'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7f49f2f65b20 = False  (default: False)
-| |-RegionSelectionSvc         @0x7f49ef123d50 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7f493feccb20 = False  (default: False)
+| |-RegionSelectionSvc         @0x7f493c058c50 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1759,13 +1766,13 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStop                      = False
 | | |-AuditTools                     = False
 | | |-CSCHashIdOffset                = 22000
-| | |-CscCalibTool      @0x7f49ef066050 = PrivateToolHandle('CscCalibTool/CscCalibTool')
-| | |-CscRdoDecoderTool @0x7f49ef0644d8 = PrivateToolHandle('Muon::CscRDO_Decoder/CscRDO_Decoder')
+| | |-CscCalibTool      @0x7f493bfc5050 = PrivateToolHandle('CscCalibTool/CscCalibTool')
+| | |-CscRdoDecoderTool @0x7f493bfc9050 = PrivateToolHandle('Muon::CscRDO_Decoder/CscRDO_Decoder')
 | | |-DecodeData                     = True
-| | |-DetStore          @0x7f49ef04a750 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore          @0x7f49ef04a610 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs       @0x7f49ef78dcb0 = []  (default: [])
-| | |-ExtraOutputs      @0x7f49ef05bb48 = []  (default: [])
+| | |-DetStore          @0x7f493bfb1610 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore          @0x7f493bfb1650 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs       @0x7f493c622560 = []  (default: [])
+| | |-ExtraOutputs      @0x7f493c568ef0 = []  (default: [])
 | | |-MonitorService                 = 'MonitorSvc'
 | | |-OutputCollection               = 'StoreGateSvc+CSC_Measurements'
 | | |-OutputLevel                    = 0
@@ -1778,10 +1785,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                      = False
 | | | |-AuditStop                       = False
 | | | |-AuditTools                      = False
-| | | |-DetStore           @0x7f49ef04a510 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore           @0x7f49ef04a550 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs        @0x7f49ef04b518 = []  (default: [])
-| | | |-ExtraOutputs       @0x7f49ef04b7e8 = []  (default: [])
+| | | |-DetStore           @0x7f493bfb15d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore           @0x7f493bfb1350 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs        @0x7f493bfc7e60 = []  (default: [])
+| | | |-ExtraOutputs       @0x7f493bfc7cf8 = []  (default: [])
 | | | |-IsOnline                        = True
 | | | |-Latency                         = 100.0
 | | | |-MonitorService                  = 'MonitorSvc'
@@ -1808,11 +1815,11 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-CscCalibTool      @0x7f49ef04a110 = PublicToolHandle('CscCalibTool')
-| | | |-DetStore          @0x7f49ef04a150 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7f49ef04a690 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7f49ef78d248 = []  (default: [])
-| | | |-ExtraOutputs      @0x7f49ef78db90 = []  (default: [])
+| | | |-CscCalibTool      @0x7f493bfb1210 = PublicToolHandle('CscCalibTool')
+| | | |-DetStore          @0x7f493bfb13d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7f493bfb1190 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7f493bfc7dd0 = []  (default: [])
+| | | |-ExtraOutputs      @0x7f493bfc7ef0 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | \----- (End of Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder) -----
@@ -1830,21 +1837,21 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7f49eefc3750 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7f493bf28790 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7f49eefc36d0 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7f49ef08b3f8 = []  (default: [])
-| |-ExtraOutputs               @0x7f49ef08b248 = []  (default: [])
+| |-EvtStore                   @0x7f493bf28710 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7f493bff0248 = []  (default: [])
+| |-ExtraOutputs               @0x7f493bff0128 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7f49ef08b488 = []  (default: [])
+| |-NeededResources            @0x7f493bff02d8 = []  (default: [])
 | |-OutputLevel                             = 0
 | |-RegisterForContextService               = False
 | |-Timeline                                = True
-| |-cluster_builder            @0x7f49eefaa0d0 = PublicToolHandle('CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool')
+| |-cluster_builder            @0x7f493bf110d0 = PublicToolHandle('CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool')
 | |                                            (default: 'CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool')
 | \----- (End of Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder) ---------------------
 \----- (End of Algorithm AthSequencer/AthAlgSeq) ---------------------------------------------------
@@ -1876,9 +1883,9 @@ Py:Athena            INFO Save Config
 
 JOs reading stage finished, launching Athena from pickle file
 
-Fri Apr 19 19:42:36 CEST 2019
+Thu May  2 21:12:09 CEST 2019
 Preloading tcmalloc_minimal.so
-Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/199c6bbb319] -- built on [2019-04-19T1734]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/2a537dae079] -- built on [2019-05-02T1642]
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
@@ -1886,13 +1893,13 @@ Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 1 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO now loading MuonRdoDecode.pkl  ... 
-Py:ConfigurableDb    INFO Read module info for 5473 configurables from 47 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5471 configurables from 50 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus715.cern.ch on Fri Apr 19 19:42:56 2019
+                                          running on lxplus705.cern.ch on Thu May  2 21:12:31 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -1922,8 +1929,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-18T2137/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus715.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-01T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus705.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 DBReplicaSvc         INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -2202,7 +2209,7 @@ MuGM:MuonFactory     INFO  *****************************************************
 
 MGM::MuonDetect...   INFO Init A/B Line Containers - done - size is respectively 1758/0
 MGM::MuonDetect...   INFO No Aline for CSC wire layers loaded 
-GeoModelSvc          INFO GeoModelSvc.MuonDetectorTool	 SZ= 42844Kb 	 Time = 0.68S
+GeoModelSvc          INFO GeoModelSvc.MuonDetectorTool	 SZ= 42844Kb 	 Time = 0.65S
 GeoModelSvc.Muo...   INFO CondAttrListCollection not found in the DetectorStore
 GeoModelSvc.Muo...   INFO Unable to register callback on CondAttrListCollection for any folder in the list 
 GeoModelSvc.Muo...   INFO This is OK unless you expect to read alignment and deformations from COOL 
@@ -2218,7 +2225,7 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) 
     +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) 
     +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) 
-ClassIDSvc           INFO  getRegistryEntries: read 1373 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1376 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 743 CLIDRegistry entries for module ALL
 RpcRawDataProvider   INFO RpcRawDataProvider::initialize
 RpcRawDataProvider   INFO  'DoSeededDecoding':False
@@ -2243,6 +2250,7 @@ RpcRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
 RpcRawDataProvi...   INFO  Tool = RpcRawDataProvider.RPC_RawDataProviderTool is connected to JobOptionsSvc Service = JobOptionsSvc
 RpcRawDataProvi...   INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderTool
 TgcRawDataProvider   INFO TgcRawDataProvider::initialize
+TgcRawDataProvider   INFO  'DoSeededDecoding':False
 ClassIDSvc           INFO  getRegistryEntries: read 878 CLIDRegistry entries for module ALL
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder
 TgcRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
@@ -2251,7 +2259,7 @@ TgcRawDataProvi...   INFO  Tool = TgcRawDataProvider.TGC_RawDataProviderTool is
 MuonTGC_CablingSvc   INFO for 1/12 sector initialize
 ToolSvc.TGCCabl...   INFO initialize
 ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonTGC_CablingSvc[0x12cb4200]+219 bound to CondAttrListCollection[/TGC/CABLING/MAP_SCHEMA]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonTGC_CablingSvc[0x214f6c00]+219 bound to CondAttrListCollection[/TGC/CABLING/MAP_SCHEMA]
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderTool
 MdtRawDataProvider   INFO MdtRawDataProvider::initialize
 MdtRawDataProvider   INFO  'DoSeededDecoding':False
@@ -2302,14 +2310,14 @@ ClassIDSvc           INFO  getRegistryEntries: read 60 CLIDRegistry entries for
 CscRdoToCscPrep...   INFO The Geometry version is MuonSpectrometer-R.08.01
 MuonCalib::CscC...   INFO Initializing CscCoolStrSvc
 ClassIDSvc           INFO  getRegistryEntries: read 181 CLIDRegistry entries for module ALL
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_PED]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_NOISE]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_PSLOPE]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_STAT]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_RMS]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_FTHOLD]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_T0BASE]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39c34e00]+259 bound to CondAttrListCollection[CSC_T0PHASE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_PED]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_NOISE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_PSLOPE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_STAT]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_RMS]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_FTHOLD]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_T0BASE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39ab1a00]+259 bound to CondAttrListCollection[CSC_T0PHASE]
 CscRdoToCscPrep...   INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool')
 HistogramPersis...WARNING Histograms saving not required.
 EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
@@ -2513,34 +2521,34 @@ IncidentProcAlg2     INFO Finalize
 AtlasFieldSvc        INFO finalize() successful
 EventInfoByteSt...   INFO finalize 
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     0.36 ))s
-IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     1.28 ))s
-IOVDbFolder          INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 ((     1.18 ))s
-IOVDbFolder          INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 ((     0.53 ))s
-IOVDbFolder          INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 ((     0.93 ))s
-IOVDbFolder          INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 ((     0.75 ))s
-IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/222235 ((     1.13 ))s
-IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/29402 ((     0.90 ))s
-IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/1 objs/chan/bytes 1613/1613/7562651 ((     1.21 ))s
-IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/1 objs/chan/bytes 1612/1612/8096306 ((     1.37 ))s
-IOVDbFolder          INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/3704 ((     0.73 ))s
-IOVDbFolder          INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 ((     0.86 ))s
-IOVDbFolder          INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 ((     1.26 ))s
-IOVDbFolder          INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 ((     0.70 ))s
-IOVDbFolder          INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 ((     1.96 ))s
-IOVDbFolder          INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 ((     0.11 ))s
-IOVDbFolder          INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 ((     0.06 ))s
-IOVDbFolder          INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 ((     0.03 ))s
-IOVDbFolder          INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 ((     0.03 ))s
-IOVDbSvc             INFO  bytes in ((     15.38 ))s
+IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     0.43 ))s
+IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.15 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 ((     1.39 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 ((     0.17 ))s
+IOVDbFolder          INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 ((     1.61 ))s
+IOVDbFolder          INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 ((     0.16 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/222235 ((     1.28 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/29402 ((     0.23 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/1 objs/chan/bytes 1613/1613/7562651 ((     0.25 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/1 objs/chan/bytes 1612/1612/8096306 ((     1.46 ))s
+IOVDbFolder          INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/3704 ((     1.22 ))s
+IOVDbFolder          INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 ((     0.26 ))s
+IOVDbFolder          INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 ((     2.06 ))s
+IOVDbFolder          INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 ((     1.79 ))s
+IOVDbFolder          INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 ((     0.06 ))s
+IOVDbFolder          INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 ((     0.06 ))s
+IOVDbFolder          INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 ((     6.07 ))s
+IOVDbFolder          INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 ((    10.71 ))s
+IOVDbFolder          INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 ((     0.05 ))s
+IOVDbSvc             INFO  bytes in ((     29.43 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: ((     4.61 ))s
-IOVDbSvc             INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.73 ))s
-IOVDbSvc             INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     1.71 ))s
-IOVDbSvc             INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     1.28 ))s
-IOVDbSvc             INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.36 ))s
-IOVDbSvc             INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     1.69 ))s
-IOVDbSvc             INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: ((     5.00 ))s
+IOVDbSvc             INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: ((     3.23 ))s
+IOVDbSvc             INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     1.22 ))s
+IOVDbSvc             INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     1.56 ))s
+IOVDbSvc             INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.15 ))s
+IOVDbSvc             INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.43 ))s
+IOVDbSvc             INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     1.78 ))s
+IOVDbSvc             INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: ((    21.07 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStr...   INFO in finalize()
@@ -2565,7 +2573,7 @@ ToolSvc.TGCCabl...   INFO finalize
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
 cObj_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #= 20
-ChronoStatSvc        INFO Time User   : Tot= 9.06  [s]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot= 8.99  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref
index 3dadeb75a01b..937914826b2d 100644
--- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref
+++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref
@@ -24,6 +24,7 @@ GeoModel.StripGeoType                    : 'GMX'
 GeoModel.Type                            : 'UNDEFINED'
 IOVDb.DatabaseInstance                   : [function]
 IOVDb.GlobalTag                          : 'CONDBR2-BLKPA-2018-13'
+Input.Collections                        : [function]
 Input.Files                              : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1']
 Input.ProjectName                        : [function]
 Input.RunNumber                          : [function]
@@ -79,7 +80,7 @@ Py:ComponentAccumulator   DEBUG Adding component ByteStreamAttListMetadataSvc/By
 Py:ComponentAccumulator   DEBUG Adding component IOVDbMetaDataTool/IOVDbMetaDataTool to the job
 Py:ComponentAccumulator   DEBUG Adding component ByteStreamMetadataTool/ByteStreamMetadataTool to the job
 Py:ComponentAccumulator   DEBUG Adding algorithm MuonCacheCreator to a sequence AthAlgSeq
-Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/199c6bbb319] -- built on [2019-04-19T1734]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/2a537dae079] -- built on [2019-05-02T1642]
 Py:AthConfigFlags   DEBUG dynamically loading the flag Detector
 Py:ComponentAccumulator   DEBUG Adding component GeoModelSvc/GeoModelSvc to the job
 Py:ComponentAccumulator   DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job
@@ -380,55 +381,58 @@ Py:ComponentAccumulator   DEBUG Adding component DBReplicaSvc/DBReplicaSvc to th
 Py:IOVDbSvc.CondDB   DEBUG Loading basic services for CondDBSetup...
 Py:ConfigurableDb   DEBUG loading confDb files...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libprofhelp.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthenaPoolTest.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIOVDbTestAlg.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthenaAuditors.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libPerfMonComps.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthExHelloWorld.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthExHive.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCLIDComps.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libGaudiHive.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libISF_Geant4Tools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libSCT_RawDataByteStreamCnv.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthExHive.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigConfBaseTest.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthenaPoolTest.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloDetDescr.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libInDetTrackHoleSearch.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTRT_TrackHoleSearch.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArMonTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArRawUtils.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIsolationAlgs.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkValAlgs.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloEvent.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAnalysisTest.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libRecBackgroundAlgs.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIsolationAlgs.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libegammaCaloTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libFastCaloSim.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libISF_Geant4Tools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkJiveXML.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigUpgradeTest.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthViewsDFlow.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libAthViewsAlgs.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArCellRec.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libDerivationFrameworkExamples.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArRecUtils.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libDerivationFrameworkExamples.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libDerivationFrameworkInDet.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libElectronPhotonTagTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrackToCalo.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigConfigSvc.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libegammaPerformance.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigHLTJetHypo.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloUtils.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkDeterministicAnnealingFilter.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkGaussianSumFilter.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrkKalmanFitter.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigInterfaces.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIOVDbSvc.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libPixelConditionsServices.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArCalibUtils.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libLArCellRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libIsolationTool.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libtauRecTools.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT2CaloCommon.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigMuonMonitoring.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloMonitoringTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigConfigSvc.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigHLTJetHypo.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libCaloClusterCorrection.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigCaloRec.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT2CaloEgamma.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libFTK_RecTools.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigInDetAnalysisExample.confdb]...
 Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/WorkDir.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigCaloRec.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloCalibTools.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/lib/libTrigT1CaloCalibUtils.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-18T2137/GAUDI/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Gaudi.confdb]...
-Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-18T2137/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Athena.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-01T2135/GAUDI/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Gaudi.confdb]...
+Py:ConfigurableDb   DEBUG 	-loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-01T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/lib/Athena.confdb]...
 Py:ConfigurableDb   DEBUG loading confDb files... [DONE]
-Py:ConfigurableDb   DEBUG loaded 1100 confDb packages
-Py:ConfigurableDb    INFO Read module info for 5473 configurables from 47 genConfDb files
+Py:ConfigurableDb   DEBUG loaded 1101 confDb packages
+Py:ConfigurableDb    INFO Read module info for 5471 configurables from 50 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:ConfigurableDb   DEBUG : Found configurable <class 'GaudiCoreSvc.GaudiCoreSvcConf.MessageSvc'> in module GaudiCoreSvc.GaudiCoreSvcConf
 Py:loadBasicAthenaPool   DEBUG Loading basic services for AthenaPool...
@@ -1188,24 +1192,24 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 |-AuditStop                               = False
 |-Cardinality                             = 0
 |-ContinueEventloopOnFPE                  = False
-|-DetStore                   @0x7fae4101f910 = ServiceHandle('StoreGateSvc/DetectorStore')
+|-DetStore                   @0x7fcae62c2950 = ServiceHandle('StoreGateSvc/DetectorStore')
 |-Enable                                  = True
 |-ErrorCounter                            = 0
 |-ErrorMax                                = 1
-|-EvtStore                   @0x7fae4101f890 = ServiceHandle('StoreGateSvc')
-|-ExtraInputs                @0x7fae3f551830 = []  (default: [])
-|-ExtraOutputs               @0x7fae3f5518c0 = []  (default: [])
+|-EvtStore                   @0x7fcae62c28d0 = ServiceHandle('StoreGateSvc')
+|-ExtraInputs                @0x7fcae47f5710 = []  (default: [])
+|-ExtraOutputs               @0x7fcae47f57a0 = []  (default: [])
 |-FilterCircularDependencies              = True
 |-IgnoreFilterPassed                      = False
 |-IsIOBound                               = False
-|-Members                    @0x7fae3f5514d0 = ['MuonCacheCreator/MuonCacheCreator', 'Muon::RpcRawDataProvider/RpcRawDataProvider', 'Muon::TgcRawDataProvider/TgcRawDataProvider', 'Muon::MdtRawDataProvider/MdtRawDataProvider', 'Muon::CscRawDataProvider/CscRawDataProvider', 'RpcRdoToRpcPrepData/RpcRdoToRpcPrepData', 'TgcRdoToTgcPrepData/TgcRdoToTgcPrepData', 'MdtRdoToMdtPrepData/MdtRdoToMdtPrepData', 'CscRdoToCscPrepData/CscRdoToCscPrepData', 'CscThresholdClusterBuilder/CscThesholdClusterBuilder']
+|-Members                    @0x7fcae47f5518 = ['MuonCacheCreator/MuonCacheCreator', 'Muon::RpcRawDataProvider/RpcRawDataProvider', 'Muon::TgcRawDataProvider/TgcRawDataProvider', 'Muon::MdtRawDataProvider/MdtRawDataProvider', 'Muon::CscRawDataProvider/CscRawDataProvider', 'RpcRdoToRpcPrepData/RpcRdoToRpcPrepData', 'TgcRdoToTgcPrepData/TgcRdoToTgcPrepData', 'MdtRdoToMdtPrepData/MdtRdoToMdtPrepData', 'CscRdoToCscPrepData/CscRdoToCscPrepData', 'CscThresholdClusterBuilder/CscThesholdClusterBuilder']
 |                                            (default: [])
 |-ModeOR                                  = False
 |-MonitorService                          = 'MonitorSvc'
-|-NeededResources            @0x7fae3f551710 = []  (default: [])
+|-NeededResources            @0x7fcae47f55f0 = []  (default: [])
 |-OutputLevel                             = 0
 |-RegisterForContextService               = False
-|-Sequential                 @0x7fae43430b00 = True  (default: False)
+|-Sequential                 @0x7fcae86d1b00 = True  (default: False)
 |-StopOverride                            = False
 |-TimeOut                                 = 0.0
 |-Timeline                                = True
@@ -1221,24 +1225,24 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 0
-| |-CscCacheKey                @0x7fae40170e10 = 'CscCache'  (default: 'StoreGateSvc+')
-| |-DetStore                   @0x7fae3ffb1cd0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-CscCacheKey                @0x7fcae5415d50 = 'CscCache'  (default: 'StoreGateSvc+')
+| |-DetStore                   @0x7fcae529e1d0 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DisableViewWarning                      = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3ffb1c50 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f6ee5a8 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f6ee0e0 = []  (default: [])
+| |-EvtStore                   @0x7fcae529e150 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae49904d0 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae4990368 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
-| |-MdtCsmCacheKey             @0x7fae40170480 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
+| |-MdtCsmCacheKey             @0x7fcae54154b0 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f6ee3b0 = []  (default: [])
+| |-NeededResources            @0x7fcae49900e0 = []  (default: [])
 | |-OutputLevel                             = 0
 | |-RegisterForContextService               = False
-| |-RpcCacheKey                @0x7fae40170e40 = 'RpcCache'  (default: 'StoreGateSvc+')
-| |-TgcCacheKey                @0x7fae40170e70 = 'TgcCache'  (default: 'StoreGateSvc+')
+| |-RpcCacheKey                @0x7fcae5415d80 = 'RpcCache'  (default: 'StoreGateSvc+')
+| |-TgcCacheKey                @0x7fcae5415db0 = 'TgcCache'  (default: 'StoreGateSvc+')
 | |-Timeline                                = True
 | \----- (End of Algorithm MuonCacheCreator/MuonCacheCreator) ----------------------------------------
 |=/***** Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider ***************************************
@@ -1253,22 +1257,22 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7fae40052f10 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae5281250 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae40052e90 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f551ab8 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f551b48 = []  (default: [])
+| |-EvtStore                   @0x7fcae52811d0 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f5950 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f59e0 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f5515f0 = []  (default: [])
+| |-NeededResources            @0x7fcae47f57e8 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7fae3ff1baa0 = PrivateToolHandle('Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool')
+| |-ProviderTool               @0x7fcae51accb0 = PrivateToolHandle('Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool')
 | |                                            (default: 'Muon::RPC_RawDataProviderTool/RpcRawDataProviderTool')
-| |-RegionSelectionSvc         @0x7fae40052f90 = ServiceHandle('RegSelSvc')
+| |-RegionSelectionSvc         @0x7fcae52812d0 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1280,13 +1284,13 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                          = False
 | | |-AuditStop                           = False
 | | |-AuditTools                          = False
-| | |-Decoder                @0x7fae4017fbf0 = PrivateToolHandle('Muon::RpcROD_Decoder/RpcROD_Decoder')
-| | |-DetStore               @0x7fae3fb86490 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore               @0x7fae3fb86450 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs            @0x7fae3fb7fbd8 = []  (default: [])
-| | |-ExtraOutputs           @0x7fae3fb7f908 = []  (default: [])
+| | |-Decoder                @0x7fcae5431af8 = PrivateToolHandle('Muon::RpcROD_Decoder/RpcROD_Decoder')
+| | |-DetStore               @0x7fcae4e23950 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore               @0x7fcae4e23910 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs            @0x7fcae4e20f38 = []  (default: [])
+| | |-ExtraOutputs           @0x7fcae4e20c68 = []  (default: [])
 | | |-MonitorService                      = 'MonitorSvc'
-| | |-OutputLevel            @   0xf231c0 = 2  (default: 0)
+| | |-OutputLevel            @   0xb341c0 = 2  (default: 0)
 | | |-RPCSec                              = 'StoreGateSvc+RPC_SECTORLOGIC'
 | | |-RdoLocation                         = 'StoreGateSvc+RPCPAD'
 | | |-RpcContainerCacheKey                = 'StoreGateSvc+'
@@ -1300,10 +1304,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStop                        = False
 | | | |-AuditTools                       = False
 | | | |-DataErrorPrintLimit              = 1000
-| | | |-DetStore            @0x7fae3fb86510 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore            @0x7fae3fb86550 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs         @0x7fae3fb7fa28 = []  (default: [])
-| | | |-ExtraOutputs        @0x7fae3fb7f9e0 = []  (default: [])
+| | | |-DetStore            @0x7fcae4e239d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore            @0x7fcae4e23a10 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs         @0x7fcae4e20d88 = []  (default: [])
+| | | |-ExtraOutputs        @0x7fcae4e20d40 = []  (default: [])
 | | | |-MonitorService                   = 'MonitorSvc'
 | | | |-OutputLevel                      = 0
 | | | |-Sector13Data                     = False
@@ -1323,21 +1327,24 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7fae3ffa0ed0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae5292210 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3ffa0e50 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f551e18 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f551ef0 = []  (default: [])
+| |-EvtStore                   @0x7fcae5292190 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f5bd8 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f5d88 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f551e60 = []  (default: [])
+| |-NeededResources            @0x7fcae47f5cf8 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7fae4107ac80 = PrivateToolHandle('Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool')
+| |-ProviderTool               @0x7fcae6315d70 = PrivateToolHandle('Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool')
 | |                                            (default: 'Muon::TGC_RawDataProviderTool/TgcRawDataProviderTool')
+| |-RegionSelectionSvc         @0x7fcae5292290 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
+| |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
 | |=/***** Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool *****
 | | |-AuditFinalize                  = False
@@ -1347,12 +1354,12 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                     = False
 | | |-AuditStop                      = False
 | | |-AuditTools                     = False
-| | |-Decoder           @0x7fae4107ad70 = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
+| | |-Decoder           @0x7fcae6315e60 = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
 | | |                                   (default: 'Muon::TGC_RodDecoderReadout/TGC_RodDecoderReadout')
-| | |-DetStore          @0x7fae3fb2abd0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore          @0x7fae3fb2ac10 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs       @0x7fae3fb33cf8 = []  (default: [])
-| | |-ExtraOutputs      @0x7fae3fb33b48 = []  (default: [])
+| | |-DetStore          @0x7fcae4e400d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore          @0x7fcae4e40110 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs       @0x7fcae4d5c098 = []  (default: [])
+| | |-ExtraOutputs      @0x7fcae4d5c050 = []  (default: [])
 | | |-MonitorService                 = 'MonitorSvc'
 | | |-OutputLevel                    = 0
 | | |-RdoLocation                    = 'StoreGateSvc+TGCRDO'
@@ -1364,10 +1371,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7fae3fb2acd0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7fae3fb2ad10 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7fae3fb33998 = []  (default: [])
-| | | |-ExtraOutputs      @0x7fae3fb33b00 = []  (default: [])
+| | | |-DetStore          @0x7fcae4e401d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7fcae4e40210 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7fcae4dcbcf8 = []  (default: [])
+| | | |-ExtraOutputs      @0x7fcae4dcbe60 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | |-ShowStatusWords                = False
@@ -1387,22 +1394,22 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7fae40008f50 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae5331290 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae40008ed0 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f553050 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f551fc8 = []  (default: [])
+| |-EvtStore                   @0x7fcae5331210 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f5cb0 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f5e60 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f551ea8 = []  (default: [])
+| |-NeededResources            @0x7fcae47f5dd0 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7fae400d2c50 = PrivateToolHandle('Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool')
+| |-ProviderTool               @0x7fcae51f7b50 = PrivateToolHandle('Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool')
 | |                                            (default: 'Muon::MDT_RawDataProviderTool/MdtRawDataProviderTool')
-| |-RegionSelectionSvc         @0x7fae40008fd0 = ServiceHandle('RegSelSvc')
+| |-RegionSelectionSvc         @0x7fcae5331310 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1414,14 +1421,14 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                        = False
 | | |-AuditStop                         = False
 | | |-AuditTools                        = False
-| | |-CsmContainerCacheKey @0x7fae40170480 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
-| | |-Decoder              @0x7fae3f9fc140 = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder')
-| | |-DetStore             @0x7fae3f6ed190 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore             @0x7fae3f6ed1d0 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs          @0x7fae3f6eaf38 = []  (default: [])
-| | |-ExtraOutputs         @0x7fae3f6eaf80 = []  (default: [])
+| | |-CsmContainerCacheKey @0x7fcae54154b0 = 'MdtCsmCache'  (default: 'StoreGateSvc+')
+| | |-Decoder              @0x7fcae4ca2230 = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder')
+| | |-DetStore             @0x7fcae49631d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore             @0x7fcae4963210 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs          @0x7fcae498ae18 = []  (default: [])
+| | |-ExtraOutputs         @0x7fcae498ae60 = []  (default: [])
 | | |-MonitorService                    = 'MonitorSvc'
-| | |-OutputLevel          @   0xf231d8 = 1  (default: 0)
+| | |-OutputLevel          @   0xb341d8 = 1  (default: 0)
 | | |-RdoLocation                       = 'StoreGateSvc+MDTCSM'
 | | |-ReadKey                           = 'ConditionStore+MuonMDT_CablingMap'
 | | |=/***** Private AlgTool MdtROD_Decoder/MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder *****
@@ -1432,10 +1439,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7fae3f6ed290 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7fae3f6ed2d0 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7fae3f6eaab8 = []  (default: [])
-| | | |-ExtraOutputs      @0x7fae3f6eaa70 = []  (default: [])
+| | | |-DetStore          @0x7fcae49632d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7fcae4963310 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7fcae498a998 = []  (default: [])
+| | | |-ExtraOutputs      @0x7fcae498a950 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | |-ReadKey                        = 'ConditionStore+MuonMDT_CablingMap'
@@ -1455,19 +1462,19 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7fae40040e50 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae52c9750 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae40040dd0 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f553098 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f551f80 = []  (default: [])
+| |-EvtStore                   @0x7fcae52c9690 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f5ef0 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f5ea8 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f551f38 = []  (default: [])
+| |-NeededResources            @0x7fcae47f5d40 = []  (default: [])
 | |-OutputLevel                             = 0
-| |-ProviderTool               @0x7fae400d2e50 = PrivateToolHandle('Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool')
+| |-ProviderTool               @0x7fcae51f7d50 = PrivateToolHandle('Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool')
 | |                                            (default: 'Muon::CSC_RawDataProviderTool/CscRawDataProviderTool')
 | |-RegisterForContextService               = False
 | |-Timeline                                = True
@@ -1479,15 +1486,15 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStart                        = False
 | | |-AuditStop                         = False
 | | |-AuditTools                        = False
-| | |-CscContainerCacheKey @0x7fae40170e10 = 'CscCache'  (default: 'StoreGateSvc+')
-| | |-Decoder              @0x7fae3f9fc320 = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder')
-| | |-DetStore             @0x7fae3f5c0290 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-CscContainerCacheKey @0x7fcae5415d50 = 'CscCache'  (default: 'StoreGateSvc+')
+| | |-Decoder              @0x7fcae4ca2410 = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder')
+| | |-DetStore             @0x7fcae4864150 = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-EventInfoKey                      = 'StoreGateSvc+EventInfo'
-| | |-EvtStore             @0x7fae3f5c02d0 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs          @0x7fae3f5edd40 = []  (default: [])
-| | |-ExtraOutputs         @0x7fae3f5edea8 = []  (default: [])
+| | |-EvtStore             @0x7fcae4864190 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs          @0x7fcae485c488 = []  (default: [])
+| | |-ExtraOutputs         @0x7fcae485c5f0 = []  (default: [])
 | | |-MonitorService                    = 'MonitorSvc'
-| | |-OutputLevel          @   0xf231d8 = 1  (default: 0)
+| | |-OutputLevel          @   0xb341d8 = 1  (default: 0)
 | | |-RdoLocation                       = 'StoreGateSvc+CSCRDO'
 | | |=/***** Private AlgTool Muon::CscROD_Decoder/CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder *****
 | | | |-AuditFinalize                  = False
@@ -1497,10 +1504,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7fae3f5c0390 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7fae3f5c03d0 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7fae3f5ed9e0 = []  (default: [])
-| | | |-ExtraOutputs      @0x7fae3f5ed998 = []  (default: [])
+| | | |-DetStore          @0x7fcae4864250 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7fcae4864290 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7fcae485c128 = []  (default: [])
+| | | |-ExtraOutputs      @0x7fcae485c0e0 = []  (default: [])
 | | | |-IsCosmics                      = False
 | | | |-IsOldCosmics                   = False
 | | | |-MonitorService                 = 'MonitorSvc'
@@ -1520,25 +1527,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DecodingTool               @0x7fae3f6b7198 = PrivateToolHandle('Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool')
+| |-DecodingTool               @0x7fcae495f198 = PrivateToolHandle('Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool')
 | |                                            (default: 'Muon::RpcRdoToPrepDataTool/RpcRdoToPrepDataTool')
-| |-DetStore                   @0x7fae3f598cd0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae483bcd0 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3f598c50 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f553248 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f5531b8 = []  (default: [])
+| |-EvtStore                   @0x7fcae483bc50 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f70e0 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f5c68 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f553170 = []  (default: [])
+| |-NeededResources            @0x7fcae47f5f38 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+RPC_Measurements'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7fae43430b20 = False  (default: False)
-| |-RegionSelectionSvc         @0x7fae3f598d50 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7fcae86d1b20 = False  (default: False)
+| |-RegionSelectionSvc         @0x7fcae483bd50 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1551,16 +1558,16 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStop                                       = False
 | | |-AuditTools                                      = False
 | | |-DecodeData                                      = True
-| | |-DetStore                           @0x7fae3f4fde50 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore                           @0x7fae3f4fded0 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs                        @0x7fae3f57a8c0 = []  (default: [])
-| | |-ExtraOutputs                       @0x7fae3f57ab00 = []  (default: [])
+| | |-DetStore                           @0x7fcae47a0e90 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore                           @0x7fcae47a0f10 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs                        @0x7fcae481e5f0 = []  (default: [])
+| | |-ExtraOutputs                       @0x7fcae481e6c8 = []  (default: [])
 | | |-InputCollection                                 = 'StoreGateSvc+RPC_triggerHits'
 | | |-MonitorService                                  = 'MonitorSvc'
 | | |-OutputCollection                                = 'StoreGateSvc+RPCPAD'
 | | |-OutputLevel                                     = 0
 | | |-RPCInfoFromDb                                   = False
-| | |-RdoDecoderTool                     @0x7fae3ff40c90 = PrivateToolHandle('Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder')
+| | |-RdoDecoderTool                     @0x7fcae525bd70 = PrivateToolHandle('Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder')
 | | |                                                    (default: 'Muon::RpcRDO_Decoder')
 | | |-TriggerOutputCollection                         = 'StoreGateSvc+RPC_Measurements'
 | | |-etaphi_coincidenceTime                          = 20.0
@@ -1578,10 +1585,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-DetStore          @0x7fae3f4fdf50 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7fae3f4fdf90 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7fae3f57ac20 = []  (default: [])
-| | | |-ExtraOutputs      @0x7fae3f57abd8 = []  (default: [])
+| | | |-DetStore          @0x7fcae47a0f90 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7fcae47a0fd0 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7fcae481e7e8 = []  (default: [])
+| | | |-ExtraOutputs      @0x7fcae481e7a0 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | \----- (End of Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder) -----
@@ -1599,25 +1606,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DecodingTool               @0x7fae3f51b050 = PrivateToolHandle('Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool')
+| |-DecodingTool               @0x7fcae47c3180 = PrivateToolHandle('Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool')
 | |                                            (default: 'Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool')
-| |-DetStore                   @0x7fae3f503b90 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae4793bd0 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3f503b10 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f553128 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f553290 = []  (default: [])
+| |-EvtStore                   @0x7fcae4793b50 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f7098 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f5e18 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f5530e0 = []  (default: [])
+| |-NeededResources            @0x7fcae47f7128 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+TGC_Measurements'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7fae43430b20 = False  (default: False)
-| |-RegionSelectorSvc          @0x7fae3f503c10 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7fcae86d1b20 = False  (default: False)
+| |-RegionSelectorSvc          @0x7fcae4793c50 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Setting                                 = 0
@@ -1631,10 +1638,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStop                                            = False
 | | |-AuditTools                                           = False
 | | |-DecodeData                                           = True
-| | |-DetStore                                @0x7fae3fbd59d0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore                                @0x7fae3f4fdd50 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs                             @0x7fae3f514878 = []  (default: [])
-| | |-ExtraOutputs                            @0x7fae3f514f38 = []  (default: [])
+| | |-DetStore                                @0x7fcae47ba3d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore                                @0x7fcae47ba490 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs                             @0x7fcae47c20e0 = []  (default: [])
+| | |-ExtraOutputs                            @0x7fcae47c2290 = []  (default: [])
 | | |-FillCoinData                                         = True
 | | |-MonitorService                                       = 'MonitorSvc'
 | | |-OutputCoinCollection                                 = 'TrigT1CoinDataCollection'
@@ -1643,9 +1650,9 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-RDOContainer                                         = 'StoreGateSvc+TGCRDO'
 | | |-TGCHashIdOffset                                      = 26000
 | | |-dropPrdsWithZeroWidth                                = True
-| | |-outputCoinKey                           @0x7fae3fbde908 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
+| | |-outputCoinKey                           @0x7fcae47c2200 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
 | | |                                                         (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'])
-| | |-prepDataKeys                            @0x7fae3f514d88 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
+| | |-prepDataKeys                            @0x7fcae47c22d8 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']
 | | |                                                         (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'])
 | | |-show_warning_level_invalid_A09_SSW6_hit              = False
 | | \----- (End of Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool) -----
@@ -1662,25 +1669,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DecodingTool               @0x7fae434d3cb0 = PrivateToolHandle('Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool')
+| |-DecodingTool               @0x7fcae87bde10 = PrivateToolHandle('Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool')
 | |                                            (default: 'Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool')
-| |-DetStore                   @0x7fae3f587b90 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae482bb90 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3f587b10 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f5533f8 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f553200 = []  (default: [])
+| |-EvtStore                   @0x7fcae482bb10 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f7290 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f7050 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f553368 = []  (default: [])
+| |-NeededResources            @0x7fcae47f7200 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+MDT_DriftCircles'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7fae43430b20 = False  (default: False)
-| |-RegionSelectionSvc         @0x7fae3f587c10 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7fcae86d1b20 = False  (default: False)
+| |-RegionSelectionSvc         @0x7fcae482bc10 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1694,13 +1701,13 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditTools                           = False
 | | |-CalibratePrepData                    = True
 | | |-DecodeData                           = True
-| | |-DetStore                @0x7fae3f5175d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-DetStore                @0x7fcae47ba610 = ServiceHandle('StoreGateSvc/DetectorStore')
 | | |-DiscardSecondaryHitTwin              = False
 | | |-DoPropagationCorrection              = False
 | | |-DoTofCorrection                      = True
-| | |-EvtStore                @0x7fae3f517610 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs             @0x7fae3f528ef0 = []  (default: [])
-| | |-ExtraOutputs            @0x7fae3f5288c0 = []  (default: [])
+| | |-EvtStore                @0x7fcae47ba650 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs             @0x7fcae47cd830 = []  (default: [])
+| | |-ExtraOutputs            @0x7fcae47cd7a0 = []  (default: [])
 | | |-MonitorService                       = 'MonitorSvc'
 | | |-OutputCollection                     = 'StoreGateSvc+MDT_DriftCircles'
 | | |-OutputLevel                          = 0
@@ -1728,25 +1735,25 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-CscRdoToCscPrepDataTool    @0x7fae3ff47c00 = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool')
+| |-CscRdoToCscPrepDataTool    @0x7fcae5269c00 = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool')
 | |                                            (default: 'Muon::CscRdoToCscPrepDataTool/CscRdoToPrepDataTool')
-| |-DetStore                   @0x7fae3f5c0c90 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae4864b50 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-DoSeededDecoding                        = False
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3f5c0c10 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f5534d0 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f553320 = []  (default: [])
+| |-EvtStore                   @0x7fcae4864ad0 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f7368 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f71b8 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f553440 = []  (default: [])
+| |-NeededResources            @0x7fcae47f72d8 = []  (default: [])
 | |-OutputCollection                        = 'StoreGateSvc+CSC_Measurements'
 | |-OutputLevel                             = 0
 | |-PrintInputRdo                           = False
-| |-PrintPrepData              @0x7fae43430b20 = False  (default: False)
-| |-RegionSelectionSvc         @0x7fae3f5c0d10 = ServiceHandle('RegSelSvc')
+| |-PrintPrepData              @0x7fcae86d1b20 = False  (default: False)
+| |-RegionSelectionSvc         @0x7fcae4864bd0 = ServiceHandle('RegSelSvc')
 | |-RegisterForContextService               = False
 | |-RoIs                                    = 'StoreGateSvc+OutputRoIs'
 | |-Timeline                                = True
@@ -1759,13 +1766,13 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | |-AuditStop                      = False
 | | |-AuditTools                     = False
 | | |-CSCHashIdOffset                = 22000
-| | |-CscCalibTool      @0x7fae3f52a050 = PrivateToolHandle('CscCalibTool/CscCalibTool')
-| | |-CscRdoDecoderTool @0x7fae3f52f220 = PrivateToolHandle('Muon::CscRDO_Decoder/CscRDO_Decoder')
+| | |-CscCalibTool      @0x7fcae47d4050 = PrivateToolHandle('CscCalibTool/CscCalibTool')
+| | |-CscRdoDecoderTool @0x7fcae47c1ed0 = PrivateToolHandle('Muon::CscRDO_Decoder/CscRDO_Decoder')
 | | |-DecodeData                     = True
-| | |-DetStore          @0x7fae3f517650 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | |-EvtStore          @0x7fae3f517510 = ServiceHandle('StoreGateSvc')
-| | |-ExtraInputs       @0x7fae3fb3a488 = []  (default: [])
-| | |-ExtraOutputs      @0x7fae3fb3a950 = []  (default: [])
+| | |-DetStore          @0x7fcae47ba350 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | |-EvtStore          @0x7fcae47ba250 = ServiceHandle('StoreGateSvc')
+| | |-ExtraInputs       @0x7fcae4e34878 = []  (default: [])
+| | |-ExtraOutputs      @0x7fcae4960d40 = []  (default: [])
 | | |-MonitorService                 = 'MonitorSvc'
 | | |-OutputCollection               = 'StoreGateSvc+CSC_Measurements'
 | | |-OutputLevel                    = 0
@@ -1778,10 +1785,10 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                      = False
 | | | |-AuditStop                       = False
 | | | |-AuditTools                      = False
-| | | |-DetStore           @0x7fae3f517350 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore           @0x7fae3f517450 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs        @0x7fae3fb3a518 = []  (default: [])
-| | | |-ExtraOutputs       @0x7fae3fb95cb0 = []  (default: [])
+| | | |-DetStore           @0x7fcae47ba310 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore           @0x7fcae47ba150 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs        @0x7fcae4e349e0 = []  (default: [])
+| | | |-ExtraOutputs       @0x7fcae4892fc8 = []  (default: [])
 | | | |-IsOnline                        = True
 | | | |-Latency                         = 100.0
 | | | |-MonitorService                  = 'MonitorSvc'
@@ -1808,11 +1815,11 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | | | |-AuditStart                     = False
 | | | |-AuditStop                      = False
 | | | |-AuditTools                     = False
-| | | |-CscCalibTool      @0x7fae3f517210 = PublicToolHandle('CscCalibTool')
-| | | |-DetStore          @0x7fae3f5172d0 = ServiceHandle('StoreGateSvc/DetectorStore')
-| | | |-EvtStore          @0x7fae3f517590 = ServiceHandle('StoreGateSvc')
-| | | |-ExtraInputs       @0x7fae3fb3a680 = []  (default: [])
-| | | |-ExtraOutputs      @0x7fae3fb3a440 = []  (default: [])
+| | | |-CscCalibTool      @0x7fcae47ba5d0 = PublicToolHandle('CscCalibTool')
+| | | |-DetStore          @0x7fcae47ba510 = ServiceHandle('StoreGateSvc/DetectorStore')
+| | | |-EvtStore          @0x7fcae47ba110 = ServiceHandle('StoreGateSvc')
+| | | |-ExtraInputs       @0x7fcae4e347e8 = []  (default: [])
+| | | |-ExtraOutputs      @0x7fcae4e34b00 = []  (default: [])
 | | | |-MonitorService                 = 'MonitorSvc'
 | | | |-OutputLevel                    = 0
 | | | \----- (End of Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder) -----
@@ -1830,21 +1837,21 @@ Py:ComponentAccumulator    INFO /***** Algorithm AthSequencer/AthAlgSeq ********
 | |-AuditStart                              = False
 | |-AuditStop                               = False
 | |-Cardinality                             = 1
-| |-DetStore                   @0x7fae3f4946d0 = ServiceHandle('StoreGateSvc/DetectorStore')
+| |-DetStore                   @0x7fcae472d710 = ServiceHandle('StoreGateSvc/DetectorStore')
 | |-Enable                                  = True
 | |-ErrorCounter                            = 0
 | |-ErrorMax                                = 1
-| |-EvtStore                   @0x7fae3f494650 = ServiceHandle('StoreGateSvc')
-| |-ExtraInputs                @0x7fae3f553488 = []  (default: [])
-| |-ExtraOutputs               @0x7fae3f5532d8 = []  (default: [])
+| |-EvtStore                   @0x7fcae472d690 = ServiceHandle('StoreGateSvc')
+| |-ExtraInputs                @0x7fcae47f7320 = []  (default: [])
+| |-ExtraOutputs               @0x7fcae47f7170 = []  (default: [])
 | |-FilterCircularDependencies              = True
 | |-IsIOBound                               = False
 | |-MonitorService                          = 'MonitorSvc'
-| |-NeededResources            @0x7fae3f553518 = []  (default: [])
+| |-NeededResources            @0x7fcae47f73b0 = []  (default: [])
 | |-OutputLevel                             = 0
 | |-RegisterForContextService               = False
 | |-Timeline                                = True
-| |-cluster_builder            @0x7fae3f530050 = PublicToolHandle('CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool')
+| |-cluster_builder            @0x7fcae4714090 = PublicToolHandle('CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool')
 | |                                            (default: 'CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool')
 | \----- (End of Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder) ---------------------
 \----- (End of Algorithm AthSequencer/AthAlgSeq) ---------------------------------------------------
@@ -1876,9 +1883,9 @@ Py:Athena            INFO Save Config
 
 JOs reading stage finished, launching Athena from pickle file
 
-Fri Apr 19 19:26:28 CEST 2019
+Thu May  2 21:17:57 CEST 2019
 Preloading tcmalloc_minimal.so
-Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/199c6bbb319] -- built on [2019-04-19T1734]
+Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-opt] [atlas-work3/2a537dae079] -- built on [2019-05-02T1642]
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
@@ -1886,13 +1893,13 @@ Py:Athena            INFO configuring AthenaHive with [1] concurrent threads and
 Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 1 threads
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO now loading MuonRdoDecode_Cache.pkl  ... 
-Py:ConfigurableDb    INFO Read module info for 5473 configurables from 47 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5471 configurables from 50 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus715.cern.ch on Fri Apr 19 19:26:45 2019
+                                          running on lxplus705.cern.ch on Thu May  2 21:18:15 2019
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
@@ -1922,8 +1929,8 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-04-18T2137/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus715.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-01T2135/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus705.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 DBReplicaSvc         INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -2202,7 +2209,7 @@ MuGM:MuonFactory     INFO  *****************************************************
 
 MGM::MuonDetect...   INFO Init A/B Line Containers - done - size is respectively 1758/0
 MGM::MuonDetect...   INFO No Aline for CSC wire layers loaded 
-GeoModelSvc          INFO GeoModelSvc.MuonDetectorTool	 SZ= 42844Kb 	 Time = 0.69S
+GeoModelSvc          INFO GeoModelSvc.MuonDetectorTool	 SZ= 42844Kb 	 Time = 0.7S
 GeoModelSvc.Muo...   INFO CondAttrListCollection not found in the DetectorStore
 GeoModelSvc.Muo...   INFO Unable to register callback on CondAttrListCollection for any folder in the list 
 GeoModelSvc.Muo...   INFO This is OK unless you expect to read alignment and deformations from COOL 
@@ -2218,7 +2225,7 @@ CondInputLoader      INFO Will create WriteCondHandle dependencies for the follo
     +  ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) 
     +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) 
     +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) 
-ClassIDSvc           INFO  getRegistryEntries: read 1373 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1376 CLIDRegistry entries for module ALL
 ClassIDSvc           INFO  getRegistryEntries: read 743 CLIDRegistry entries for module ALL
 RpcRawDataProvider   INFO RpcRawDataProvider::initialize
 RpcRawDataProvider   INFO  'DoSeededDecoding':False
@@ -2247,6 +2254,7 @@ RpcRawDataProvi...  DEBUG Could not find TrigConf::HLTJobOptionsSvc
 RpcRawDataProvi...   INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderTool
 RpcRawDataProvi...  DEBUG Adding private ToolHandle tool RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder (Muon::RpcROD_Decoder)
 TgcRawDataProvider   INFO TgcRawDataProvider::initialize
+TgcRawDataProvider   INFO  'DoSeededDecoding':False
 ClassIDSvc           INFO  getRegistryEntries: read 878 CLIDRegistry entries for module ALL
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder
 TgcRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
@@ -2255,7 +2263,7 @@ TgcRawDataProvi...   INFO  Tool = TgcRawDataProvider.TGC_RawDataProviderTool is
 MuonTGC_CablingSvc   INFO for 1/12 sector initialize
 ToolSvc.TGCCabl...   INFO initialize
 ClassIDSvc           INFO  getRegistryEntries: read 273 CLIDRegistry entries for module ALL
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonTGC_CablingSvc[0x123b2200]+219 bound to CondAttrListCollection[/TGC/CABLING/MAP_SCHEMA]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonTGC_CablingSvc[0x20c5cc00]+219 bound to CondAttrListCollection[/TGC/CABLING/MAP_SCHEMA]
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderTool
 MdtRawDataProvider   INFO MdtRawDataProvider::initialize
 MdtRawDataProvider   INFO  'DoSeededDecoding':False
@@ -2320,14 +2328,14 @@ ClassIDSvc           INFO  getRegistryEntries: read 60 CLIDRegistry entries for
 CscRdoToCscPrep...   INFO The Geometry version is MuonSpectrometer-R.08.01
 MuonCalib::CscC...   INFO Initializing CscCoolStrSvc
 ClassIDSvc           INFO  getRegistryEntries: read 181 CLIDRegistry entries for module ALL
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_PED]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_NOISE]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_PSLOPE]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_STAT]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_RMS]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_FTHOLD]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_T0BASE]
-IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x39332e00]+259 bound to CondAttrListCollection[CSC_T0PHASE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_PED]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_NOISE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_PSLOPE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_STAT]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_RMS]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_FTHOLD]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_T0BASE]
+IOVSvcTool           INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x3921ba00]+259 bound to CondAttrListCollection[CSC_T0PHASE]
 CscRdoToCscPrep...   INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool')
 HistogramPersis...WARNING Histograms saving not required.
 EventSelector        INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00
@@ -4267,34 +4275,34 @@ IncidentProcAlg2     INFO Finalize
 AtlasFieldSvc        INFO finalize() successful
 EventInfoByteSt...   INFO finalize 
 IdDictDetDescrCnv    INFO in finalize
-IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     0.59 ))s
-IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.98 ))s
-IOVDbFolder          INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 ((     3.53 ))s
-IOVDbFolder          INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 ((     0.93 ))s
-IOVDbFolder          INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 ((    10.71 ))s
-IOVDbFolder          INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 ((     2.34 ))s
-IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/222235 ((     0.85 ))s
-IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/29402 ((     0.58 ))s
-IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/1 objs/chan/bytes 1613/1613/7562651 ((     2.05 ))s
-IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/1 objs/chan/bytes 1612/1612/8096306 ((     1.48 ))s
-IOVDbFolder          INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/3704 ((     1.06 ))s
-IOVDbFolder          INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 ((     1.16 ))s
-IOVDbFolder          INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 ((     1.11 ))s
-IOVDbFolder          INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 ((     0.96 ))s
-IOVDbFolder          INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 ((     0.36 ))s
-IOVDbFolder          INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 ((     0.79 ))s
-IOVDbFolder          INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 ((     5.13 ))s
-IOVDbFolder          INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 ((     0.84 ))s
-IOVDbFolder          INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 ((     0.07 ))s
-IOVDbSvc             INFO  bytes in ((     35.52 ))s
+IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/20 ((     0.11 ))s
+IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.06 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 ((     0.13 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 ((     0.12 ))s
+IOVDbFolder          INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 ((     0.45 ))s
+IOVDbFolder          INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 ((     0.15 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/222235 ((     0.05 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/29402 ((     0.04 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/1 objs/chan/bytes 1613/1613/7562651 ((     0.20 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/1 objs/chan/bytes 1612/1612/8096306 ((     1.01 ))s
+IOVDbFolder          INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/3704 ((     0.05 ))s
+IOVDbFolder          INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 ((     0.39 ))s
+IOVDbFolder          INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 ((     0.91 ))s
+IOVDbFolder          INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 ((     0.18 ))s
+IOVDbFolder          INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 ((     0.20 ))s
+IOVDbFolder          INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 ((     2.38 ))s
+IOVDbFolder          INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 ((     0.96 ))s
+IOVDbFolder          INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 ((     2.90 ))s
+IOVDbFolder          INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 ((     1.17 ))s
+IOVDbSvc             INFO  bytes in ((     11.45 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: ((     4.95 ))s
-IOVDbSvc             INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     1.06 ))s
-IOVDbSvc             INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     4.46 ))s
-IOVDbSvc             INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.98 ))s
-IOVDbSvc             INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.59 ))s
-IOVDbSvc             INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((    13.05 ))s
-IOVDbSvc             INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: ((    10.43 ))s
+IOVDbSvc             INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: ((     1.30 ))s
+IOVDbSvc             INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.05 ))s
+IOVDbSvc             INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     0.25 ))s
+IOVDbSvc             INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.06 ))s
+IOVDbSvc             INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.11 ))s
+IOVDbSvc             INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     0.60 ))s
+IOVDbSvc             INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: ((     9.08 ))s
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ToolSvc.ByteStr...   INFO in finalize()
@@ -4319,7 +4327,7 @@ ToolSvc.TGCCabl...   INFO finalize
 *****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
 *****Chrono*****     INFO ****************************************************************************************************
 cObj_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #= 20
-ChronoStatSvc        INFO Time User   : Tot= 9.64  [s]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot= 9.25  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
-- 
GitLab


From de5167871b906f4f782577e1e3a8677e1c44f474 Mon Sep 17 00:00:00 2001
From: Catrin Bernius <catrin.bernius@cern.ch>
Date: Fri, 3 May 2019 08:40:33 +0000
Subject: [PATCH 079/129] fixing merge conflict

Merge remote-tracking branch 'upstream/master' into fromScratch
---
 .../python/precisionCaloRec.py                |   3 +-
 .../TrigUpgradeTest/share/bjet.menu.ALLTE.py  |   2 +-
 .../TrigUpgradeTest/share/full_menu.py        |   9 +-
 .../TrigUpgradeTest/share/met.fromJets.py     |   3 +-
 .../TrigUpgradeTest/share/runMenuTest.py      |   1 +
 .../TrigUpgradeTest/share/runMenuTest.ref     |  30 ++-
 .../TrigUpgradeTest/share/simpleJetJob.py     |   2 +-
 .../python/HLTMenuConfig/Bjet/BjetDef.py      |  75 ++++++
 .../HLTMenuConfig/Bjet/BjetSequenceSetup.py   | 243 ++++++++++++++++++
 .../Bjet/GenerateBjetChainDefs.py             |  45 ++++
 .../HLTMenuConfig/Egamma/ElectronDef.py       |  17 +-
 ...inDefs.py => GenerateElectronChainDefs.py} |   0
 .../Egamma/GeneratePhotonChainDefs.py         |  45 ++++
 .../python/HLTMenuConfig/Egamma/PhotonDef.py  |  76 ++++++
 .../Egamma/PhotonSequenceSetup.py             |  56 ++++
 .../HLTMenuConfig/Jet/GenerateJetChainDefs.py |  45 ++++
 .../python/HLTMenuConfig/Jet/JetDef.py        |  66 +++++
 .../HLTMenuConfig/Jet/JetSequenceDefs.py      | 101 ++++++++
 .../HLTMenuConfig/Jet/JetSequenceSetup.py     |  25 ++
 .../python/HLTMenuConfig/Jet/__init__.py      |   0
 ...ETChainDefs.py => GenerateMETChainDefs.py} |   0
 .../HLTMenuConfig/Menu/GenerateMenuMT.py      |   6 +-
 .../python/HLTMenuConfig/Menu/HLTCFConfig.py  |   6 +
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |  41 ++-
 ...nChainDefs.py => GenerateMuonChainDefs.py} |   0
 ...tChainDefs.py => GenerateTestChainDefs.py} |   0
 .../python/LVL1MenuConfig/LVL1/Cabling.py     |   1 +
 .../python/LVL1MenuConfig/LVL1Menu/ItemDef.py |   2 +
 28 files changed, 869 insertions(+), 31 deletions(-)
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetDef.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/GenerateBjetChainDefs.py
 rename Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/{generateElectronChainDefs.py => GenerateElectronChainDefs.py} (100%)
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/GeneratePhotonChainDefs.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/GenerateJetChainDefs.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetDef.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceDefs.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceSetup.py
 create mode 100644 Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/__init__.py
 rename Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/{generateMETChainDefs.py => GenerateMETChainDefs.py} (100%)
 rename Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/{generateMuonChainDefs.py => GenerateMuonChainDefs.py} (100%)
 rename Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/{generateTestChainDefs.py => GenerateTestChainDefs.py} (100%)

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/precisionCaloRec.py b/Trigger/TrigValidation/TrigUpgradeTest/python/precisionCaloRec.py
index 29d386d8e266..f2027b3dbba2 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/precisionCaloRec.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/precisionCaloRec.py
@@ -6,6 +6,7 @@ from egammaRec.egammaRecFlags import jobproperties
 from egammaAlgs import egammaAlgsConf
 from egammaRec.Factories import AlgFactory
 jobproperties.egammaRecFlags.print_JobProperties("full")
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import RecoFragmentsPool
 
 def precisionCaloRecoSequence(RoIs):
     egammaTopoClusterCopier = AlgFactory( egammaAlgsConf.egammaTopoClusterCopier,
@@ -18,7 +19,7 @@ def precisionCaloRecoSequence(RoIs):
                                           doAdd = False )
 
     from TrigT2CaloCommon.CaloDef import HLTFSTopoRecoSequence
-    (precisionRecoSequence, caloclusters) = HLTFSTopoRecoSequence(RoIs)
+    (precisionRecoSequence, caloclusters) = RecoFragmentsPool.retrieve(HLTFSTopoRecoSequence, RoIs)
 
     algo = egammaTopoClusterCopier()
     algo.InputTopoCollection = caloclusters
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py
index 7b4ff11be671..600e4b6e5da7 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py
@@ -11,7 +11,7 @@ include("TrigUpgradeTest/testHLT_MT.py")
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep
 
 # We should retrieve all the steps here
-from TrigUpgradeTest.bjetMenuDefs import getBJetSequence
+from TriggerMenuMT.HLTMenuConfig.Bjet.BjetSequenceSetup import getBJetSequence
 from TrigUpgradeTest.InDetSetup import inDetSetup
 
 inDetSetup()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py
index dc6e651f3466..926c7415cc3e 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py
@@ -9,9 +9,6 @@ rec.doWriteESD=True
 
 include("TrigUpgradeTest/testHLT_MT.py")
 
-#Currently only runs egamma and mu chains but expect to expand
-
-
 ##########################################
 # menu
 ###########################################
@@ -54,7 +51,7 @@ if opt.doElectronSlice == True:
 ##################################################################
 if opt.doPhotonSlice == True:
     from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import fastCaloMenuSequence
-    from TrigUpgradeTest.photonMenuDefs import photonMenuSequence
+    from TriggerMenuMT.HLTMenuConfig.Egamma.PhotonSequenceSetup import photonMenuSequence
 
     fastCaloStep = fastCaloMenuSequence("Gamma")
     photonstep   = photonMenuSequence()
@@ -109,7 +106,7 @@ if opt.doMuonSlice == True:
 # jet chains
 ##################################################################
 if opt.doJetSlice == True:
-    from TrigUpgradeTest.jetMenuDefs import jetMenuSequence
+    from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceSetup import jetMenuSequence
 
     jetSeq1 = jetMenuSequence()
     jetstep1=ChainStep("Step1_jet", [jetSeq1])
@@ -135,7 +132,7 @@ if opt.doJetSlice == True:
 # bjet chains
 ##################################################################
 if opt.doBJetSlice == True:
-    from TrigUpgradeTest.bjetMenuDefs import getBJetSequence
+    from TriggerMenuMT.HLTMenuConfig.Bjet.BjetSequenceSetup import getBJetSequence
 
     step1 = ChainStep("Step1_bjet", [getBJetSequence('j')])
     step2 = ChainStep("Step2_bjet", [getBJetSequence('gsc')])
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py
index 7a4dfb1662fa..197f79ba7bdc 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py
@@ -26,7 +26,8 @@ svcMgr.TrigCaloDataAccessSvc.MonTool = mon
 from L1Decoder.L1DecoderConf import CreateFullScanRoI
 topSequence += CreateFullScanRoI()
 
-from TrigUpgradeTest.jetDefs import jetRecoSequence
+from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceDefs import jetRecoSequence
+
 (jetSequence, jetsKey) = jetRecoSequence( RoIs="FullScanRoIs" )
 topSequence += jetSequence
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.py
index 9cfce4b4d15a..6186fc098120 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.py
@@ -16,6 +16,7 @@ def signaturesToGenerate():
     TriggerFlags.EgammaSlice.setAll()
     TriggerFlags.MuonSlice.setAll()
     TriggerFlags.METSlice.setAll()
+    TriggerFlags.JetSlice.setAll()
 
 
 # generate the Chains from the Menu Dictionary
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref
index 30328f7781ab..7eeb97c6df6d 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/runMenuTest.ref
@@ -5,14 +5,32 @@ TrigSignatureMoniMT                                INFO HLT_2mu6Comb_L1MU6
 TrigSignatureMoniMT                                INFO HLT_2mu6Comb_L1MU6 decisions                      0         0         0         0         
 TrigSignatureMoniMT                                INFO HLT_2mu6_L1MU6                20        20        0         0         0         0         0         
 TrigSignatureMoniMT                                INFO HLT_2mu6_L1MU6 decisions                          0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_3j200_L1J20               20        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_3j200_L1J20 decisions                         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_5j70_0eta240_L1J20        20        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_5j70_0eta240_L1J20 decisions                    0         0         0         0         
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_L1EM3       20        20        18        0         0         0         18        
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_L1EM3 decisions                    54        0         0         0         
-TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3            20        20        18        17        16        0         16        
-TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3 decisions                      54        342       47        0         
-TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3            20        20        17        16        15        0         15        
-TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3 decisions                      50        329       45        0         
-TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3            20        20        15        14        13        0         13        
-TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3 decisions                      36        264       31        0         
+TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3            20        20        18        17        0         0         17        
+TrigSignatureMoniMT                                INFO HLT_e3_etcut_L1EM3 decisions                      54        342       0         0         
+TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3            20        20        17        16        0         0         16        
+TrigSignatureMoniMT                                INFO HLT_e5_etcut_L1EM3 decisions                      50        329       0         0         
+TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3            20        20        15        14        0         0         14        
+TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3 decisions                      36        264       0         0         
+TrigSignatureMoniMT                                INFO HLT_g5_etcut_L1EM3            20        20        17        17        0         0         17        
+TrigSignatureMoniMT                                INFO HLT_g5_etcut_L1EM3 decisions                      50        50        0         0         
+TrigSignatureMoniMT                                INFO HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J2020        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20 decisions                    0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j225_gsc420_boffperf_split_L1J2020        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j225_gsc420_boffperf_split_L1J20 decisions                    0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j260_320eta490_L1J20      20        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j260_320eta490_L1J20 decisions                    0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j420_L1J20                20        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j420_L1J20 decisions                          0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j45_L1J20                 20        20        4         0         0         0         4         
+TrigSignatureMoniMT                                INFO HLT_j45_L1J20 decisions                           4         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j85_L1J20                 20        20        0         0         0         0         0         
+TrigSignatureMoniMT                                INFO HLT_j85_L1J20 decisions                           0         0         0         0         
 TrigSignatureMoniMT                                INFO HLT_mu20_ivar_L1MU6           20        20        3         2         2         0         2         
 TrigSignatureMoniMT                                INFO HLT_mu20_ivar_L1MU6 decisions                     3         2         2         0         
 TrigSignatureMoniMT                                INFO HLT_mu6Comb_L1MU6             20        20        3         2         0         0         2         
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py
index 5be475fc171e..e7021170b929 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py
@@ -57,7 +57,7 @@ if TriggerFlags.doCalo:
          hypoDecisions= InputMakerAlg.InputMakerOutputDecisions[0]
          
      # get the reco sequence
-     from TrigUpgradeTest.jetDefs import jetRecoSequence
+     from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceDefs import jetRecoSequence
      (recoSequence, sequenceOut) = jetRecoSequence(inputRoIs)
 
      from TrigHLTJetHypo.TrigHLTJetHypoConf import TrigJetHypoAlgMT
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetDef.py
new file mode 100644
index 000000000000..80c886030c1c
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetDef.py
@@ -0,0 +1,75 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Egamma.BjetDef")
+
+
+from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import ChainStep, RecoFragmentsPool
+
+from TriggerMenuMT.HLTMenuConfig.Bjet.BjetSequenceSetup import getBJetSequence
+
+#----------------------------------------------------------------
+# fragments generating configuration will be functions in New JO, 
+# so let's make them functions already now
+#----------------------------------------------------------------
+def bjetSequenceCfg_j( flags ):    
+    return getBJetSequence('j')
+
+def bjetSequenceCfg_gsc( flags ):    
+    return getBJetSequence('gsc')
+
+#----------------------------------------------------------------
+# Class to configure chain
+#----------------------------------------------------------------
+class BjetChainConfiguration(ChainConfigurationBase):
+
+    def __init__(self, chainDict):
+        ChainConfigurationBase.__init__(self,chainDict)
+        
+    # ----------------------
+    # Assemble the chain depending on information from chainName
+    # ----------------------
+    def assembleChain(self):                            
+        log.debug("Assembling chain for " + self.chainName)
+
+        # --------------------
+        # define here the names of the steps and obtain the chainStep configuration 
+        # --------------------
+        stepDictionary = {
+            "": [self.getBjetSequence_j(), self.getBjetSequence_gsc()]
+        }
+        
+        ## This needs to be configured by the Bjet Developer!!
+        key = self.chainPart['extra'] 
+        steps=stepDictionary[key]
+
+        chainSteps = []
+        for step in steps:
+            chainSteps+=[step]
+    
+        myChain = self.buildChain(chainSteps)
+        return myChain
+        
+
+    # --------------------
+    # Configuration of steps
+    # --------------------
+    def getBjetSequence_j(self, name):
+        stepName = "Step1_bjet"
+        log.debug("Configuring step " + stepName)
+        bjetSeq1 = RecoFragmentsPool.retrieve( bjetSequenceCfg_j, None ) # the None will be used for flags in future
+        return ChainStep(stepName, [bjetSeq1])
+
+    def getBjetSequence_gsc(self, name):
+        stepName = "Step2_bjet"
+        log.debug("Configuring step " + stepName)
+        bjetSeq1 = RecoFragmentsPool.retrieve( bjetSequenceCfg_gsc, None ) # the None will be used for flags in future
+        return ChainStep(stepName, [bjetSeq1])
+        
+            
+            
+
+        
+                
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
new file mode 100644
index 000000000000..43e4aa5ebcd0
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
@@ -0,0 +1,243 @@
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+
+# ====================================================================================================  
+#    Get MenuSequences
+# ==================================================================================================== 
+
+def getBJetSequence( step ):
+    if step == "j":
+        return bJetStep1Sequence()
+    if step == "jALLTE":
+        return bJetStep1SequenceALLTE()
+    if step == "gsc":
+        return bJetStep2Sequence()
+    if step == "gscALLTE":
+        return bJetStep2SequenceALLTE()
+    if step == "bTag":
+        return bJetStep1Sequence()
+    return None
+
+# ==================================================================================================== 
+#    step 1: jet reco and cut on 'j' threshold 
+# ==================================================================================================== 
+
+def bJetStep1Sequence():
+    # menu components
+    from AthenaCommon.CFElements import parOR, seqAND
+    from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
+
+    from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceDefs import jetAthSequence
+    (recoSequence, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(jetAthSequence,ConfigFlags)
+
+    # Start with b-jet-specific algo sequence
+    # Construct RoI. Needed input for Fast Tracking
+    from TrigBjetHypo.TrigBjetHypoConf import TrigRoiBuilderMT
+    RoIBuilder = TrigRoiBuilderMT("RoIBuilder")
+    RoIBuilder.JetInputKey = sequenceOut
+    RoIBuilder.RoIOutputKey = "EMViewRoIs" # Default for Fast Tracking Algs
+
+    # Fast Tracking 
+    from TriggerMenuMT.HLTMenuConfig.CommonSequences.InDetSetup import makeInDetAlgs
+    (viewAlgs, eventAlgs) = makeInDetAlgs()
+
+    from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Jet    
+    theFTF_Jet = TrigFastTrackFinder_Jet()
+    theFTF_Jet.isRoI_Seeded = True
+    theFTF_Jet.RoIs = RoIBuilder.RoIOutputKey
+    viewAlgs.append( theFTF_Jet )
+
+    # Primary Vertex goes here
+
+    # Shortlis of jets
+    from TrigBjetHypo.TrigBjetHypoConf import TrigJetSplitterMT
+    jetSplitter = TrigJetSplitterMT("TrigJetSplitterMT")
+    jetSplitter.ImposeZconstraint = True
+    jetSplitter.Jets = sequenceOut
+    jetSplitter.OutputJets = "SplitJets"
+    jetSplitter.OutputRoi = "SplitJets"
+    jetSplitter.OutputVertex = "PrimaryVertex" # TMP
+
+    fastTrackingSequence = parOR("fastTrackingSequence",viewAlgs)
+    bJetEtSequence = seqAND("bJetEtSequence",[ RoIBuilder,fastTrackingSequence,jetSplitter] )
+
+    # hypo
+    from TrigBjetHypo.TrigBjetHypoConf import TrigBjetEtHypoAlgMT
+    from TrigBjetHypo.TrigBjetEtHypoTool import TrigBjetEtHypoToolFromDict_j
+    hypo = TrigBjetEtHypoAlgMT("TrigBjetEtHypoAlgMT_step1")
+    hypo.Jets = jetSplitter.OutputJets
+    hypo.RoIs = jetSplitter.OutputRoi
+    hypo.RoILink = "step1RoI" # To be used in following step EventView
+    hypo.JetLink = "jets" # To be used in following step with EventView
+
+    # Sequence     
+    BjetAthSequence = seqAND("BjetAthSequence_step1",eventAlgs + [InputMakerAlg,recoSequence,bJetEtSequence])
+
+    return MenuSequence( Sequence    = BjetAthSequence,
+                         Maker       = InputMakerAlg,
+                         Hypo        = hypo,
+                         HypoToolGen = TrigBjetEtHypoToolFromDict_j )
+
+def bJetStep1SequenceALLTE():
+    # menu components
+    from AthenaCommon.CFElements import parOR, seqAND
+    from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
+
+    # Construct jets
+    from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceDefs import jetAthSequence
+    (recoSequence, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(jetAthSequence,ConfigFlags)
+
+    # Start with b-jet-specific algo sequence
+    # Construct RoI. Needed input for Fast Tracking
+    from TrigBjetHypo.TrigBjetHypoConf import TrigRoiBuilderMT
+    RoIBuilder = TrigRoiBuilderMT("RoIBuilder")
+    RoIBuilder.JetInputKey = sequenceOut
+    RoIBuilder.RoIOutputKey = "EMViewRoIs" # Default for Fast Tracking Algs
+
+    # Fast Tracking 
+    from TriggerMenuMT.HLTMenuConfig.CommonSequences.InDetSetup import makeInDetAlgs
+    (viewAlgs, eventAlgs) = makeInDetAlgs()
+
+    from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Jet    
+    theFTF_Jet = TrigFastTrackFinder_Jet()
+    theFTF_Jet.isRoI_Seeded = True
+    theFTF_Jet.RoIs = RoIBuilder.RoIOutputKey
+    viewAlgs.append( theFTF_Jet )
+
+    # Primary Vertex goes here
+
+    # Shortlis of jets
+    from TrigBjetHypo.TrigBjetHypoConf import TrigJetSplitterMT
+    jetSplitter = TrigJetSplitterMT("TrigJetSplitterMT")
+    jetSplitter.ImposeZconstraint = True 
+    jetSplitter.Jets = sequenceOut
+    jetSplitter.OutputJets = "SplitJets"
+    jetSplitter.OutputRoi = "SplitJets"
+    jetSplitter.OutputVertex = "PrimaryVertex" # TMP
+
+    fastTrackingSequence = parOR("fastTrackingSequence",viewAlgs)
+    bJetEtSequence = seqAND("bJetEtSequence",[ RoIBuilder,fastTrackingSequence,jetSplitter] )
+
+    # hypo
+    from TrigBjetHypo.TrigBjetHypoConf import TrigBjetEtHypoAlgMT
+    from TrigBjetHypo.TrigBjetEtHypoTool import TrigBjetEtHypoToolFromDict_j
+    hypo = TrigBjetEtHypoAlgMT("TrigBjetEtHypoAlgMT_step1_ALLTE")
+    hypo.Jets = jetSplitter.OutputJets
+    hypo.RoIs = jetSplitter.OutputRoi
+    hypo.RoILink = "initialRoI" # To be used in following step EventView
+    hypo.JetLink = "jets" # To be used in following step with EventView
+
+    # Sequence     
+    BjetAthSequence = seqAND("BjetAthSequence_step1_ALLTE",eventAlgs + [InputMakerAlg,recoSequence,bJetEtSequence])
+
+    return MenuSequence( Sequence    = BjetAthSequence,
+                         Maker       = InputMakerAlg,
+                         Hypo        = hypo,
+                         HypoToolGen = TrigBjetEtHypoToolFromDict_j )
+
+
+
+# ==================================================================================================== 
+#    step 2: precision tracking, gsc calibration and cut on gsc-corrected threshold
+# ==================================================================================================== 
+
+def bJetStep2Sequence():
+    # menu components
+    from AthenaCommon.CFElements import seqAND
+    from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence
+
+    # Event View Creator Algorithm
+    from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithmWithJets
+    InputMakerAlg = EventViewCreatorAlgorithmWithJets("BJetInputMaker_step2", RoIsLink="initialRoI")
+    InputMakerAlg.ViewFallThrough = True # Access Store Gate for retrieving data
+    InputMakerAlg.ViewPerRoI = True # If True it creates one view per RoI
+    InputMakerAlg.Views = "BJetViews" # Name of output view
+    # RoIs
+    InputMakerAlg.InViewRoIs = "InViewRoIs" # Name RoIs are inserted in the view
+    InputMakerAlg.RoIsLink = "step1RoI" # RoIs linked to previous decision
+    # Jets
+    InputMakerAlg.InViewJets = "InViewJets" # Name Jets are inserted in the view
+    InputMakerAlg.JetsLink = "jets" # Jets linked to previous decision
+
+    # Precision Tracking
+    #def makeInDetPrecisionTracking( whichSignature, verifier = False, inputFTFtracks='TrigFastTrackFinder_Tracks', outputTrackPrefixName = "InDetTrigPT" ):
+    from TrigUpgradeTest.InDetPT import makeInDetPrecisionTracking
+    PTTracks, PTTrackParticles, PTAlgs = makeInDetPrecisionTracking( "bjets" )
+
+    # gsc correction
+    from TrigBjetHypo.TrigGSCFexMTConfig import getGSCFexSplitInstance
+    theGSC = getGSCFexSplitInstance("GSCFexSplitInstance")
+    theGSC.RoIs = InputMakerAlg.InViewRoIs
+    theGSC.JetKey = InputMakerAlg.InViewJets
+    theGSC.TrackKey = PTTrackParticles[0]
+    theGSC.PriVtxKey = "PrimaryVertex"
+    theGSC.JetOutputKey = "GSCJets"
+
+    step2Sequence = seqAND("step2Sequence",[theGSC])
+    InputMakerAlg.ViewNodeName = "step2Sequence"
+    
+    # hypo
+    from TrigBjetHypo.TrigBjetHypoConf import TrigBjetEtHypoAlgMT
+    from TrigBjetHypo.TrigBjetEtHypoTool import TrigBjetEtHypoToolFromDict_gsc
+    hypo = TrigBjetEtHypoAlgMT("TrigBjetEtHypoAlg_step2")
+    hypo.RoIs = "step1RoI"
+    hypo.Jets = theGSC.JetOutputKey
+    hypo.RoILink = InputMakerAlg.RoIsLink # To be used in following step EventView
+    hypo.JetLink = InputMakerAlg.JetsLink # To be used in following step with EventView
+    hypo.ReadFromView = True
+
+    # Sequence
+    BjetAthSequence = seqAND("BjetAthSequence_step2",[InputMakerAlg] + PTAlgs + [step2Sequence])
+
+    return MenuSequence( Sequence    = BjetAthSequence,
+                         Maker       = InputMakerAlg,
+                         Hypo        = hypo,
+                         HypoToolGen = TrigBjetEtHypoToolFromDict_gsc )
+
+
+def bJetStep2SequenceALLTE():
+    # menu components
+    from AthenaCommon.CFElements import seqAND
+    from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence
+
+    # input maker
+    from DecisionHandling.DecisionHandlingConf import InputMakerForRoI
+    InputMakerAlg = InputMakerForRoI("BJetInputMaker_step2_ALLTE", RoIsLink="initialRoI")
+#    InputMakerAlg.RoIs="SplitJets" # TMP commenting
+
+    from TrigUpgradeTest.InDetPT import makeInDetPrecisionTracking
+    PTTracks, PTTrackParticles, PTAlgs = makeInDetPrecisionTracking( "bjets" )  
+    
+    # gsc correction
+    from TrigBjetHypo.TrigGSCFexMTConfig import getGSCFexSplitInstance
+    theGSC = getGSCFexSplitInstance("GSCFexSplitInstance_ALLTE")
+    theGSC.TrackKey = PTTrackParticles[0]
+    theGSC.JetKey = "SplitJets"
+    theGSC.JetOutputKey = "GSCJets"
+    theGSC.PriVtxKey = "PrimaryVertex"
+
+    # hypo
+    from TrigBjetHypo.TrigBjetHypoConf import TrigBjetEtHypoAlgMT
+    from TrigBjetHypo.TrigBjetEtHypoTool import TrigBjetEtHypoToolFromDict_gsc
+    hypo = TrigBjetEtHypoAlgMT("TrigBjetEtHypoAlg_step2ALLTE")
+    hypo.Jets = theGSC.JetOutputKey
+    hypo.RoIs = "SplitJets"
+    hypo.RoILink = "initialRoI"
+    hypo.JetLink = "jets"
+
+
+    # Sequence
+    BjetAthSequence = seqAND("BjetAthSequence_step2ALLTE",[InputMakerAlg] + PTAlgs + [theGSC] )
+
+    return MenuSequence( Sequence    = BjetAthSequence,
+                         Maker       = InputMakerAlg,
+                         Hypo        = hypo,
+                         HypoToolGen = TrigBjetEtHypoToolFromDict_gsc )
+
+# ==================================================================================================== 
+#    step 3: secondary vertex and b-tagging
+# ==================================================================================================== 
+
+
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/GenerateBjetChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/GenerateBjetChainDefs.py
new file mode 100644
index 000000000000..31fd4348ca71
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/GenerateBjetChainDefs.py
@@ -0,0 +1,45 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDict
+from TriggerMenuMT.HLTMenuConfig.Bjet.BjetDef import BjetChainConfiguration as BjetChainConfiguration
+
+
+from AthenaCommon.Logging import logging
+log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Bjet.generateChainConfigs' )
+log.info("Importing %s",__name__)
+
+
+
+def generateChainConfigs( chainDict ):
+    import pprint
+    pprint.pprint( chainDict )
+
+    
+    listOfChainDicts = splitChainDict(chainDict)
+    listOfChainDefs = []
+
+    for subChainDict in listOfChainDicts:
+        
+        Bjet = BjetChainConfiguration(subChainDict).assembleChain() 
+
+        listOfChainDefs += [Bjet]
+        log.debug('length of chaindefs %s', len(listOfChainDefs) )
+        
+
+    if len(listOfChainDefs)>1:
+        log.warning("Implement case for multi-electron chain!!") 
+        theChainDef = listOfChainDefs[0] #needs to be implemented properly
+    else:
+        theChainDef = listOfChainDefs[0]
+
+    log.debug("theChainDef.name: %s" , theChainDef.name)
+    log.debug("theChainDef.seed: %s" , theChainDef.seed)
+    log.debug("theChainDef.ChainSteps: %s" , theChainDef.steps)
+
+    return theChainDef
+
+
+
+    
+
+    
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
index d4b0738def9e..49c231efe796 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
@@ -12,7 +12,7 @@ from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import fastCa
 
 from TriggerMenuMT.HLTMenuConfig.Egamma.ElectronSequenceSetup import electronMenuSequence
 from TrigUpgradeTest.InDetSetup import inDetSetup
-from TriggerMenuMT.HLTMenuConfig.CommonSequences.precisionCaloSequenceSetup import precisionCaloMenuSequence
+#from TriggerMenuMT.HLTMenuConfig.CommonSequences.precisionCaloSequenceSetup import precisionCaloMenuSequence
 
 #----------------------------------------------------------------
 # fragments generating configuration will be functions in New JO, 
@@ -21,14 +21,13 @@ from TriggerMenuMT.HLTMenuConfig.CommonSequences.precisionCaloSequenceSetup impo
 
 def fastCaloSequenceCfg( flags ):
     return fastCaloMenuSequence("Electron")
-
     
 def electronSequenceCfg( flags ):    
     inDetSetup()
     return electronMenuSequence()
 
-def precisionCaloSequenceCfg( flags ):
-    return precisionCaloMenuSequence()
+#def precisionCaloSequenceCfg( flags ):
+#    return precisionCaloMenuSequence()
 
 #----------------------------------------------------------------
 # Class to configure chain
@@ -55,7 +54,7 @@ class ElectronChainConfiguration(ChainConfigurationBase):
         elif 'etcut' in self.chainPart['addInfo']:            
             myStepNames += ["Step1_etcut"]
             myStepNames += ["Step2_etcut"]            
-            myStepNames += ["Step3_etcut"]
+            #myStepNames += ["Step3_etcut"]
             for step in myStepNames:
                 chainSteps += [self.getEtCutStep(step)]
         else:
@@ -76,10 +75,10 @@ class ElectronChainConfiguration(ChainConfigurationBase):
           log.debug("Configuring step " + stepName)
           electronReco = RecoFragmentsPool.retrieve( electronSequenceCfg, None )
           chainStep=ChainStep(stepName, [electronReco])
-        elif stepName == "Step3_etcut":
-          log.debug("Configuring step " + stepName)
-          precisionReco = RecoFragmentsPool.retrieve( precisionCaloSequenceCfg, None )
-          chainStep=ChainStep(stepName, [precisionReco])
+        #elif stepName == "Step3_etcut":
+        #  log.debug("Configuring step " + stepName)
+        #  precisionReco = RecoFragmentsPool.retrieve( precisionCaloSequenceCfg, None )
+        #  chainStep=ChainStep(stepName, [precisionReco])
         else:            
           raise RuntimeError("chainStepName unknown: " + stepName )
                         
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/generateElectronChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/GenerateElectronChainDefs.py
similarity index 100%
rename from Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/generateElectronChainDefs.py
rename to Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/GenerateElectronChainDefs.py
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/GeneratePhotonChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/GeneratePhotonChainDefs.py
new file mode 100644
index 000000000000..7d684654876f
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/GeneratePhotonChainDefs.py
@@ -0,0 +1,45 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDict
+from TriggerMenuMT.HLTMenuConfig.Egamma.PhotonDef import PhotonChainConfiguration as PhotonChainConfiguration
+
+
+from AthenaCommon.Logging import logging
+log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Egamma.generateChainConfigs' )
+log.info("Importing %s",__name__)
+
+
+
+def generateChainConfigs( chainDict ):
+    import pprint
+    pprint.pprint( chainDict )
+
+    
+    listOfChainDicts = splitChainDict(chainDict)
+    listOfChainDefs = []
+
+    for subChainDict in listOfChainDicts:
+        
+        Photon = PhotonChainConfiguration(subChainDict).assembleChain() 
+
+        listOfChainDefs += [Photon]
+        log.debug('length of chaindefs %s', len(listOfChainDefs) )
+        
+
+    if len(listOfChainDefs)>1:
+        log.warning("Implement case for multi-electron chain!!") 
+        theChainDef = listOfChainDefs[0] #needs to be implemented properly
+    else:
+        theChainDef = listOfChainDefs[0]
+
+    log.debug("theChainDef.name: %s" , theChainDef.name)
+    log.debug("theChainDef.seed: %s" , theChainDef.seed)
+    log.debug("theChainDef.ChainSteps: %s" , theChainDef.steps)
+
+    return theChainDef
+
+
+
+    
+
+    
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
new file mode 100644
index 000000000000..739160153401
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
@@ -0,0 +1,76 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Egamma.PhotonDef")
+
+
+from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import ChainStep, RecoFragmentsPool
+
+from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import fastCaloMenuSequence
+from TriggerMenuMT.HLTMenuConfig.Egamma.PhotonSequenceSetup import photonMenuSequence
+
+#----------------------------------------------------------------
+# fragments generating configuration will be functions in New JO, 
+# so let's make them functions already now
+#----------------------------------------------------------------
+def fastCaloSequenceCfg( flags ):
+    return fastCaloMenuSequence("Gamma")
+    
+def photonSequenceCfg( flags ):    
+    return photonMenuSequence()
+
+#----------------------------------------------------------------
+# Class to configure chain
+#----------------------------------------------------------------
+class PhotonChainConfiguration(ChainConfigurationBase):
+
+    def __init__(self, chainDict):
+        ChainConfigurationBase.__init__(self,chainDict)
+        
+    # ----------------------
+    # Assemble the chain depending on information from chainName
+    # ----------------------
+    def assembleChain(self):                            
+        log.debug("Assembling chain for " + self.chainName)
+
+        # --------------------
+        # define here the names of the steps and obtain the chainStep configuration 
+        # --------------------
+        stepDictionary = {
+            "": [self.getFastCalo(), self.getPhoton()]
+        }
+        
+        ## This needs to be configured by the Egamma Developer!!
+        key = self.chainPart['extra'] + self.chainPart['IDinfo'] + self.chainPart['isoInfo'] 
+        steps=stepDictionary[key]
+
+        chainSteps = []
+        for step in steps:
+            chainSteps+=[step]
+    
+        myChain = self.buildChain(chainSteps)
+        return myChain
+        
+
+    # --------------------
+    # Configuration of steps
+    # --------------------
+    def getFastCalo(self):
+        stepName = "Step1_g5_etcut"
+        log.debug("Configuring step " + stepName)
+        fastCalo = RecoFragmentsPool.retrieve( fastCaloSequenceCfg, None ) # the None will be used for flags in future
+        return ChainStep(stepName, [fastCalo])
+        
+    def getPhoton(self):
+        stepName = "Step2_g5_etcut"
+        log.debug("Configuring step " + stepName)
+        photonReco = RecoFragmentsPool.retrieve( photonSequenceCfg, None )
+        return ChainStep(stepName, [photonReco])
+
+            
+            
+
+        
+                
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
new file mode 100644
index 000000000000..c25f0145d395
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
@@ -0,0 +1,56 @@
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+import AthenaCommon.CfgMgr as CfgMgr
+
+# menu components   
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence
+from AthenaCommon.CFElements import parOR, seqAND
+from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
+
+
+
+
+def photonMenuSequence():
+    """Creates secpond step photon sequence"""
+    
+    from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs
+    ViewVerify = CfgMgr.AthViews__ViewDataVerifier("photonViewDataVerifier")
+    ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+'+ CaloMenuDefs.L2CaloClusters)]
+
+    from TrigEgammaHypo.TrigL2PhotonFexMTConfig import L2PhotonFex_1
+    thePhotonFex= L2PhotonFex_1()
+    thePhotonFex.TrigEMClusterName = CaloMenuDefs.L2CaloClusters
+    thePhotonFex.PhotonsName="Photons"
+    #thePhotonFex.RoIs="EMIDRoIs"
+
+    l2PhotonViewsMaker = EventViewCreatorAlgorithm("l2PhotonViewsMaker")
+    l2PhotonViewsMaker.RoIsLink = "roi"
+    l2PhotonViewsMaker.InViewRoIs = "EMIDRoIs" 
+    #l2PhotonViewsMaker.InViewRoIs = "EMCaloRoIs"
+    l2PhotonViewsMaker.Views = "EMPhotonViews"
+    l2PhotonViewsMaker.ViewFallThrough = True
+    
+    thePhotonFex.RoIs = l2PhotonViewsMaker.InViewRoIs
+
+
+    photonInViewAlgs = parOR("photonInViewAlgs", [ViewVerify, thePhotonFex ])
+
+    l2PhotonViewsMaker.ViewNodeName = "photonInViewAlgs"
+
+
+    from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonHypoAlgMT
+    thePhotonHypo = TrigL2PhotonHypoAlgMT()
+    thePhotonHypo.Photons = thePhotonFex.PhotonsName
+    thePhotonHypo.RunInView=True
+
+    # this needs to be added:
+    #electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", Decisions = theElectronHypo.Output )
+
+    photonAthSequence = seqAND("photonAthSequence",  [l2PhotonViewsMaker, photonInViewAlgs] )
+    from TrigEgammaHypo.TrigL2PhotonHypoTool import TrigL2PhotonHypoToolFromDict
+
+
+    return MenuSequence( Maker=l2PhotonViewsMaker,
+                         Sequence=photonAthSequence,
+                         Hypo=thePhotonHypo,
+                         HypoToolGen=TrigL2PhotonHypoToolFromDict)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/GenerateJetChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/GenerateJetChainDefs.py
new file mode 100644
index 000000000000..582460c3dd98
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/GenerateJetChainDefs.py
@@ -0,0 +1,45 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDict
+from TriggerMenuMT.HLTMenuConfig.Jet.JetDef import JetChainConfiguration as JetChainConfiguration
+
+
+from AthenaCommon.Logging import logging
+log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Jet.generateChainConfigs' )
+log.info("Importing %s",__name__)
+
+
+
+def generateChainConfigs( chainDict ):
+    import pprint
+    pprint.pprint( chainDict )
+
+    
+    listOfChainDicts = splitChainDict(chainDict)
+    listOfChainDefs = []
+
+    for subChainDict in listOfChainDicts:
+        
+        Jet = JetChainConfiguration(subChainDict).assembleChain() 
+
+        listOfChainDefs += [Jet]
+        log.debug('length of chaindefs %s', len(listOfChainDefs) )
+        
+
+    if len(listOfChainDefs)>1:
+        log.warning("Implement case for multi-electron chain!!") 
+        theChainDef = listOfChainDefs[0] #needs to be implemented properly
+    else:
+        theChainDef = listOfChainDefs[0]
+
+    log.debug("theChainDef.name: %s" , theChainDef.name)
+    log.debug("theChainDef.seed: %s" , theChainDef.seed)
+    log.debug("theChainDef.ChainSteps: %s" , theChainDef.steps)
+
+    return theChainDef
+
+
+
+    
+
+    
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetDef.py
new file mode 100644
index 000000000000..398b8722b7fb
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetDef.py
@@ -0,0 +1,66 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Egamma.JetDef")
+
+
+from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import ChainStep, RecoFragmentsPool
+
+from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceSetup import jetMenuSequence
+
+#----------------------------------------------------------------
+# fragments generating configuration will be functions in New JO, 
+# so let's make them functions already now
+#----------------------------------------------------------------
+def jetSequence1Cfg( flags ):    
+    return jetMenuSequence()
+
+#----------------------------------------------------------------
+# Class to configure chain
+#----------------------------------------------------------------
+class JetChainConfiguration(ChainConfigurationBase):
+
+    def __init__(self, chainDict):
+        ChainConfigurationBase.__init__(self,chainDict)
+        
+    # ----------------------
+    # Assemble the chain depending on information from chainName
+    # ----------------------
+    def assembleChain(self):                            
+        log.debug("Assembling chain for " + self.chainName)
+
+        # --------------------
+        # define here the names of the steps and obtain the chainStep configuration 
+        # --------------------
+        stepDictionary = {
+            "": [self.getJetSequence1()]
+        }
+        
+        ## This needs to be configured by the Jet Developer!!
+        key = self.chainPart['extra'] 
+        steps=stepDictionary[key]
+
+        chainSteps = []
+        for step in steps:
+            chainSteps+=[step]
+    
+        myChain = self.buildChain(chainSteps)
+        return myChain
+        
+
+    # --------------------
+    # Configuration of steps
+    # --------------------
+    def getJetSequence1(self):
+        stepName = "Step1_jet"
+        log.debug("Configuring step " + stepName)
+        jetSeq1 = RecoFragmentsPool.retrieve( jetSequence1Cfg, None ) # the None will be used for flags in future
+        return ChainStep(stepName, [jetSeq1])
+        
+            
+            
+
+        
+                
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceDefs.py
new file mode 100644
index 000000000000..e5e3da26ab99
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceDefs.py
@@ -0,0 +1,101 @@
+#
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaCommon.CFElements import seqAND
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import RecoFragmentsPool
+
+## def jetFSInputMaker( ):
+##   """ Creates the jet inputMaker for FS"""
+##   RoIs = jetCollections.L1RoIs
+##   #'FSJETRoI'
+##   from DecisionHandling.DecisionHandlingConf import InputMakerForRoI
+##   InputMakerAlg = InputMakerForRoI("JetInputMaker", RoIsLink="initialRoI")
+##   InputMakerAlg.RoIs=RoIs
+##   return InputMakerAlg
+
+
+def jetAthSequence(ConfigFlags):
+    from TrigT2CaloCommon.CaloDef import clusterFSInputMaker
+    InputMakerAlg= clusterFSInputMaker()
+    (recoSequence, sequenceOut) = jetRecoSequence()
+
+    JetAthSequence =  seqAND("jetAthSequence",[InputMakerAlg, recoSequence ])
+    return (JetAthSequence, InputMakerAlg, sequenceOut)
+
+    
+def jetRecoSequence(RoIs = 'FSJETRoI'):
+    from TrigT2CaloCommon.CaloDef import HLTFSTopoRecoSequence
+    (jetRecoSequence, caloclusters) = RecoFragmentsPool.retrieve(HLTFSTopoRecoSequence, RoIs)
+
+    from AthenaCommon.AppMgr import ToolSvc
+    # Jet Reco:
+
+    # PseudoJetAlgorithm uses a tool to convert IParticles (eg CaloClusters)
+    # to PseudoJets, which are the input to FastJet. The PseudoJets are
+    # stored in a PseudoJetContainer, which is written top the event store.
+
+    from JetRec.JetRecConf import (PseudoJetAlgorithm,
+                                       PseudoJetGetter)
+
+
+    pseudoJetGetter = PseudoJetGetter('simpleJobPJGetter')
+    pseudoJetGetter.InputContainer = caloclusters
+    pseudoJetGetter.OutputContainer = 'PseudoJetEMTopo'
+    pseudoJetGetter.Label = ''
+
+    ToolSvc += pseudoJetGetter
+
+    algo3 = PseudoJetAlgorithm()
+    algo3.PJGetter = pseudoJetGetter
+
+    jetRecoSequence += algo3
+
+
+
+    # JetAlgorithm and its Tools... Reads in PseudoJetContainers,
+    # alls FastJet to cluster PseudoJets,
+    # and then convert the output of FastJet (new pseudojets) to Atlas jets.
+
+    from JetRec.JetRecConf import (JetAlgorithm,
+                                   JetRecTool,
+                                   JetFromPseudojet,
+                                   JetFinder)
+
+
+    name = 'simpleJob'
+
+    # jet from Pseudo jet takes a pseudo jet returned by FastJet
+    jetBuilder = JetFromPseudojet(name+'JetBuilder')
+    ToolSvc += jetBuilder
+
+    jetFinder = JetFinder(name+'JetFinder')
+    jetFinder.JetBuilder = jetBuilder
+    jetFinder.JetAlgorithm = 'AntiKt'
+    jetFinder.VariableRMinRadius = -1
+    jetFinder.VariableRMassScale = -1
+    jetFinder.GhostArea = 0.01
+    jetFinder.JetRadius = 0.4
+    jetFinder.PtMin = 7000. 
+    jetFinder.RandomOption = 1  #  1: used run/evt number to make seed
+
+    ToolSvc += jetFinder
+
+    jetRecTool = JetRecTool()
+    jetRecTool.InputContainer = ''  # name of a jet collection.
+    jetRecTool.OutputContainer = 'jets'
+    jetRecTool.JetFinder = jetFinder
+    jetRecTool.JetModifiers = []
+    jetRecTool.Trigger = False
+    jetRecTool.InputPseudoJets = ['StoreGateSvc+PseudoJetEMTopo']
+
+    ToolSvc += jetRecTool
+
+    algo4 = JetAlgorithm()
+    algo4.Tools = [jetRecTool]
+    jetRecoSequence += algo4
+
+
+    sequenceOut= jetRecTool.OutputContainer
+
+    return (jetRecoSequence,sequenceOut)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceSetup.py
new file mode 100644
index 000000000000..d97294178a4c
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetSequenceSetup.py
@@ -0,0 +1,25 @@
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import RecoFragmentsPool, MenuSequence
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    
+def jetMenuSequence():
+    """ Function to create the jet Menu Sequence"""
+    
+    ## RoIs = 'FSJETRoI'
+    #reco sequence
+    from TriggerMenuMT.HLTMenuConfig.Jet.JetSequenceDefs import jetAthSequence
+    (JetAthSequence, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(jetAthSequence,ConfigFlags)
+     
+    #hypo
+    from TrigHLTJetHypo.TrigHLTJetHypoConf import TrigJetHypoAlgMT
+    from TrigHLTJetHypo.TrigJetHypoToolConfig import trigJetHypoToolFromDict
+    hypo = TrigJetHypoAlgMT("TrigJetHypoAlgMT")
+    hypo.Jets = sequenceOut
+
+
+    return  MenuSequence( Sequence    = JetAthSequence,
+                          Maker       = InputMakerAlg,
+                          Hypo        = hypo,
+                          HypoToolGen = trigJetHypoToolFromDict )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/__init__.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/generateMETChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/GenerateMETChainDefs.py
similarity index 100%
rename from Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/generateMETChainDefs.py
rename to Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/GenerateMETChainDefs.py
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
index 69e3016a434e..013b79554e7e 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
@@ -213,7 +213,7 @@ class GenerateMenuMT(object):
                 if eval('self.do' + sig + 'Chains'):
                     if sig == 'Egamma':
                         sigFolder = sig
-                        subSigs = ['Electron',] #'Photon']
+                        subSigs = ['Electron', 'Photon']
                     elif sig in self.calibCosmicMonSigs:
                         sigFolder = 'CalibCosmicMon'
                         subSigs = self.calibCosmicMonSigs
@@ -222,7 +222,7 @@ class GenerateMenuMT(object):
                         subSigs = [sig]
 
                     for ss in subSigs:                        
-                        exec('import TriggerMenuMT.HLTMenuConfig.' + sigFolder + '.generate' + ss + 'ChainDefs')                
+                        exec('import TriggerMenuMT.HLTMenuConfig.' + sigFolder + '.Generate' + ss + 'ChainDefs')                
                         self.availableSignatures.append(ss)
 
             except ImportError:
@@ -257,7 +257,7 @@ class GenerateMenuMT(object):
             if currentSig in self.availableSignatures:
                 try:                    
                     log.debug("Trying to get chain config for %s", currentSig)
-                    functionToCall ='TriggerMenuMT.HLTMenuConfig.' + sigFolder + '.generate' + currentSig + 'ChainDefs.generateChainConfigs(chainDict)' 
+                    functionToCall ='TriggerMenuMT.HLTMenuConfig.' + sigFolder + '.Generate' + currentSig + 'ChainDefs.generateChainConfigs(chainDict)' 
                     chainConfigs = eval(functionToCall)
                 except RuntimeError:
                     log.exception( 'Problems creating ChainDef for chain\n %s ', chainName)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
index 46421faa12ae..ac5a8d45c21a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
@@ -144,9 +144,13 @@ def makeHLTTree(HLTChains, triggerConfigHLT = None):
     summary= makeSummary("TriggerSummaryFinal", flatDecisions)
     hltTop += summary
 
+
     # add signature monitor
     from TriggerJobOpts.TriggerConfig import collectHypos, collectFilters, collectViewMakers, collectDecisionObjects,\
         triggerMonitoringCfg, triggerSummaryCfg, triggerMergeViewsAndAddMissingEDMCfg
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+
     hypos = collectHypos(steps)
     filters = collectFilters(steps)
     viewMakers = collectViewMakers(steps)
@@ -162,6 +166,8 @@ def makeHLTTree(HLTChains, triggerConfigHLT = None):
     # this is a shotcut for now, we always assume we may be writing ESD & AOD outputs, so all gaps will be filled
     edmAlg = triggerMergeViewsAndAddMissingEDMCfg(['AOD', 'ESD'], hypos, viewMakers, decObj )
     hltTop += edmAlg
+
+    Configurable.configurableRun3Behavior=0
         
     topSequence += hltTop
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 656f01a74602..0ba866767af0 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -17,8 +17,18 @@ def setupMenu():
 
     PhysicsStream="Main"
     SingleMuonGroup = ['RATE:SingleMuon', 'BW:Muon']
+    #MultiMuonGroup = ['RATE:MultiMuon', 'BW:Muon']
     SingleElectronGroup = ['RATE:SingleElectron', 'BW:Electron']
+    #MultiElectronGroup = ['RATE:MultiElectron', 'BW:Electron']
+    SinglePhotonGroup = ['RATE:SinglePhoton', 'BW:Photon']
+    #MultiPhotonGroup = ['RATE:MultiPhoton', 'BW:Photon']
     SingleMETGroup = ['RATE:MET', 'BW:MET']
+    SingleJetGroup = ['RATE:SingleJet', 'BW:Jet']
+    MultiJetGroup = ['RATE:MultiJet', 'BW:Jet']
+    SingleBjetGroup = ['RATE:SingleBJet', 'BW:BJet']
+    #MultiBjetGroup = ['RATE:MultiBJet', 'BW:BJet']
+    #SingleTauGroup = ['RATE:SingleTau', 'BW:Tau']
+    #MultiTauGroup = ['RATE:MultiTau', 'BW:Tau']
 
     TriggerFlags.Slices_all_setOff()
 
@@ -38,10 +48,17 @@ def setupMenu():
      ]
 
     TriggerFlags.EgammaSlice.signatures = [
+        # ElectronChains----------
         ChainProp(name='HLT_e3_etcut1step_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e3_etcut_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_etcut_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e7_etcut_L1EM3', stream=[PhysicsStream, 'express'], groups=SingleElectronGroup),
+        #-------------END OF ElectronChains
+
+        # PhotonChains------------
+        ChainProp(name='HLT_g5_etcut_L1EM3', groups=SinglePhotonGroup),  
+        #-------------END OF PhotonChains
+
     ]
 
     TriggerFlags.METSlice.signatures = [
@@ -49,11 +66,29 @@ def setupMenu():
         ChainProp(name='HLT_xe65_cell_L1XE50', groups=SingleMETGroup),
     ]
 
-    TriggerFlags.CombinedSlice.signatures = []
-    TriggerFlags.JetSlice.signatures = []
-    TriggerFlags.BjetSlice.signatures = [] 
+    TriggerFlags.JetSlice.signatures = [
+        ChainProp(name='HLT_j85_L1J20', groups=SingleJetGroup),
+        ChainProp(name='HLT_j45_L1J20', groups=SingleJetGroup),
+        ChainProp(name='HLT_j420_L1J20', groups=SingleJetGroup),        
+
+        ChainProp(name='HLT_j225_gsc420_boffperf_split_L1J20', groups=SingleJetGroup), 
+        ChainProp(name='HLT_j260_320eta490_L1J20', groups=SingleJetGroup),
+        
+        ChainProp(name='HLT_3j200_L1J20', groups=MultiJetGroup),
+        ChainProp(name='HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20', groups=SingleJetGroup),       
+
+        ChainProp(name='HLT_5j70_0eta240_L1J20', groups=MultiJetGroup), # this chain is supposed to be seeded off L1_4J15 in principle, needs CF fix
+
+    ]
+    TriggerFlags.BjetSlice.signatures = [
+        ChainProp(name="HLT_j35_gsc45_boffperf_split_L1J20", groups=SingleBjetGroup),
+        ChainProp(name="HLT_j35_gsc45_bmv2c1070_split_L1J20", groups=SingleBjetGroup),
+        ChainProp(name="HLT_j35_gsc45_bmv2c1070_L1J20", groups=SingleBjetGroup),
+    ] 
+
     TriggerFlags.TauSlice.signatures = []
     TriggerFlags.BphysicsSlice.signatures = [ ]
+    TriggerFlags.CombinedSlice.signatures = []
     TriggerFlags.HeavyIonSlice.signatures  = []
     TriggerFlags.BeamspotSlice.signatures  = []   
     TriggerFlags.MinBiasSlice.signatures   = []    
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuonChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/GenerateMuonChainDefs.py
similarity index 100%
rename from Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuonChainDefs.py
rename to Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/GenerateMuonChainDefs.py
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/generateTestChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/GenerateTestChainDefs.py
similarity index 100%
rename from Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/generateTestChainDefs.py
rename to Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/GenerateTestChainDefs.py
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1/Cabling.py b/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1/Cabling.py
index 799b925f8791..1cbd81683c75 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1/Cabling.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1/Cabling.py
@@ -5,6 +5,7 @@
 #
 
 from Limits import Limits
+
 from AthenaCommon.Logging import logging
 log = logging.getLogger("Cabling")
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/ItemDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/ItemDef.py
index 8e736ba7bdb7..f7c0993c37fd 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/ItemDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/LVL1MenuConfig/LVL1Menu/ItemDef.py
@@ -9,10 +9,12 @@ from TriggerJobOpts.TriggerFlags import TriggerFlags
 # The trigger types
 from TriggerMenuMT.LVL1MenuConfig.LVL1.TriggerTypeDef import TT
 from TriggerMenuMT.LVL1MenuConfig.LVL1.Limits import Limits
+
 from TriggerMenuMT.LVL1MenuConfig.LVL1.Logic import Logic, Not
 from TriggerMenuMT.LVL1MenuConfig.LVL1.Lvl1MenuItems import LVL1MenuItem
 from TriggerMenuMT.LVL1MenuConfig.LVL1.Lvl1Condition import ThrCondition, Lvl1InternalTrigger
 
+
 from AthenaCommon.Logging import logging
 log = logging.getLogger('TriggerMenuMT.Lvl1.py')
 
-- 
GitLab


From 3311fac1c235345a146c35b4610833b2abfe23d3 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 3 May 2019 09:25:45 +0000
Subject: [PATCH 080/129] Add ATLAS_CHECK_THREAD_SAFETY. Add ATLAS_THREAD_SAFE
 to m_cache and m_layerVectors[3]. Change file mode to 644.

---
 .../InDetRecExample/share/ConfiguredNewTrackingSiPattern.py   | 2 --
 .../python/InDetTrigConfigRecLoadToolsCosmics.py              | 1 -
 .../python/InDetTrigConfigRecLoadToolsLowPt.py                | 1 -
 .../SiDetElementsRoadTool_xk/ATLAS_CHECK_THREAD_SAFETY        | 1 +
 .../SiDetElementsRoadTool_xk/SiDetElementLink_xk.h            | 0
 .../SiDetElementsRoadTool_xk/SiDetElementsComparison.h        | 0
 .../SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h          | 0
 .../SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h      | 4 ++--
 .../SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx      | 0
 .../SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx    | 0
 .../src/SiDetElementsRoadMaker_xk.cxx                         | 0
 .../SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h | 2 +-
 .../TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py  | 1 -
 .../TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py   | 1 -
 14 files changed, 4 insertions(+), 9 deletions(-)
 create mode 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/ATLAS_CHECK_THREAD_SAFETY
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
index f6add0ad42bb..502e5e6a126f 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
@@ -156,8 +156,6 @@ class  ConfiguredNewTrackingSiPattern:
                                                                         useSCT             = NewTrackingCuts.useSCT(), 
                                                                         SCTManagerLocation = InDetKeys.SCT_Manager(),         
                                                                         RoadWidth          = NewTrackingCuts.RoadWidth())
-         #InDetSiDetElementsRoadMaker.OutputLevel = VERBOSE
-         ToolSvc += InDetSiDetElementsRoadMaker
          if (InDetFlags.doPrintConfigurables()):
             print      InDetSiDetElementsRoadMaker
          # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
index ef714c02eb75..3675f2b63dac 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsCosmics.py
@@ -83,7 +83,6 @@ InDetTrigSiDetElementsRoadMakerCosmics = \
                                       useSCT       = DetFlags.haveRIO.SCT_on(),
                                       RoadWidth          = 75.     #wider for cosmics
                                       )
-ToolSvc += InDetTrigSiDetElementsRoadMakerCosmics
 # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
 if DetFlags.haveRIO.SCT_on():
   from AthenaCommon.AlgSequence import AthSequencer
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
index 8778b62883c8..e2ac58b45f9a 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
@@ -62,7 +62,6 @@ InDetTrigSiDetElementsRoadMakerLowPt = \
                                      useSCT       = DetFlags.haveRIO.SCT_on(),
                                      RoadWidth    = EFIDTrackingCutsLowPt.RoadWidth()
                                      )
-ToolSvc += InDetTrigSiDetElementsRoadMakerLowPt
 # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
 if DetFlags.haveRIO.SCT_on():
   from AthenaCommon.AlgSequence import AthSequencer
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..bcc4149ac0c3
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsComparison.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
old mode 100755
new mode 100644
index 0f8168f92075..8fbfe46d6b73
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h
@@ -128,9 +128,9 @@ namespace InDet{
     // Mutex to protect the contents
     mutable std::mutex m_mutex;
     // Cache to store events for slots
-    mutable std::vector<EventContext::ContextEvt_t> m_cache;
+    mutable std::vector<EventContext::ContextEvt_t> m_cache ATLAS_THREAD_SAFE; // Guarded by m_mutex
     // std::vector<SiDetElementsLayer_xk> for each event. This is not const.
-    mutable SiDetElementsLayerVectors_xk m_layerVectors[3];
+    mutable SiDetElementsLayerVectors_xk m_layerVectors[3] ATLAS_THREAD_SAFE; // Guarded by m_mutex
 
     ///////////////////////////////////////////////////////////////////
     // Methods
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementLink_xk.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsLayer_xk.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
index 5ed14138fcef..f4f42aaf9efe 100755
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
@@ -101,7 +101,7 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
 
       ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
-      PublicToolHandle<InDet::ISiDetElementsRoadMaker> m_roadmaker{this, "RoadTool", "InDet::SiDetElementsRoadMaker_xk"};
+      ToolHandle<InDet::ISiDetElementsRoadMaker> m_roadmaker{this, "RoadTool", "InDet::SiDetElementsRoadMaker_xk"};
       PublicToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder{this, "CombinatorialTrackFinder", "InDet::SiCombinatorialTrackFinder_xk"};
       PublicToolHandle<InDet::ISeedToTrackConversionTool> m_seedtrack{this, "SeedToTrackConversion", "InDet::SeedToTrackConversionTool"};
 
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py
index 8ddaa3c3dd54..b541a09cd3be 100755
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py
@@ -517,7 +517,6 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder):
           if remapped_type=="cosmics":
             from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import InDetTrigSiDetElementsRoadMakerCosmics
             InDetTrigSiDetElementsRoadMaker_FTF = InDetTrigSiDetElementsRoadMakerCosmics.clone('InDetTrigSiDetElementsRoadMaker_FTF')
-          ToolSvc += InDetTrigSiDetElementsRoadMaker_FTF
 
 
           from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiComTrackFinder
diff --git a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py
index 7ff314546be6..20e86644dcf3 100644
--- a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py
+++ b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py
@@ -56,7 +56,6 @@ class FactoryForStrategyC() :
              from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiDetElementsRoadMaker
              InDetTrigSiDetElementsRoadMaker_C = InDetTrigSiDetElementsRoadMaker.clone('InDetTrigSiDetElementsRoadMaker_C')
              InDetTrigSiDetElementsRoadMaker_C.RoadWidth = self.settings[('RoadWidth',instName)]
-             ToolSvc += InDetTrigSiDetElementsRoadMaker_C
 
              if DetFlags.haveRIO.SCT_on():
                  from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup
-- 
GitLab


From b823a0b3a750c551e96ddbbd07ba47829a79cbda Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 3 May 2019 11:52:13 +0000
Subject: [PATCH 081/129] Make SiCombinatorialTrackFinder_xk thread safe

---
 .../ISiCombinatorialTrackFinder.h             |  14 +-
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 .../SiClusterLink_xk.h                        |   0
 .../SiCombinatorialTrackFinder_xk.h           | 104 ++--
 .../SiDetElementBoundaryLink_xk.h             |   0
 .../SiTools_xk.h                              |  16 +-
 .../SiTrajectoryElement_xk.h                  |  12 +-
 .../SiTrajectory_xk.h                         |   0
 .../src/SiCombinatorialTrackFinder_xk.cxx     | 477 ++++++++++--------
 .../src/SiDetElementBoundaryLink_xk.cxx       |   0
 .../src/SiTrajectoryElement_xk.cxx            |   0
 .../src/SiTrajectory_xk.cxx                   |   0
 12 files changed, 333 insertions(+), 291 deletions(-)
 create mode 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/ATLAS_CHECK_THREAD_SAFETY
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiClusterLink_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectory_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLink_xk.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectory_xk.cxx

diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h
index a32c76056156..39f37ba7f0ee 100755
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h
@@ -62,27 +62,27 @@ namespace InDet {
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 const TrackQualityCuts&)=0;
+	 const TrackQualityCuts&) const =0;
 
       virtual const std::list<Trk::Track*>& getTracks
 	(const Trk::TrackParameters&, 
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 std::multimap<const Trk::PrepRawData*,const Trk::Track*>&)=0;
+	 std::multimap<const Trk::PrepRawData*, const Trk::Track*>&) const =0;
 
       virtual const std::list<Trk::Track*>& getTracksWithBrem
 	(const Trk::TrackParameters&, 
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 std::multimap<const Trk::PrepRawData*,const Trk::Track*>&,
-	 bool)=0;
+	 std::multimap<const Trk::PrepRawData*, const Trk::Track*>&,
+	 bool) const =0;
 
-      virtual void newEvent()=0;
-      virtual void newEvent(Trk::TrackInfo,const TrackQualityCuts&)=0;
+      virtual void newEvent() const =0;
+      virtual void newEvent(Trk::TrackInfo, const TrackQualityCuts&) const =0;
 
-      virtual void endEvent()=0;
+      virtual void endEvent() const =0;
 
       ///////////////////////////////////////////////////////////////////
       // Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..af28d66b539d
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiClusterLink_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiClusterLink_xk.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
old mode 100755
new mode 100644
index 76d909541fb2..ac463a94b858
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
@@ -34,9 +34,10 @@
 
 #include <list>
 #include <map>
+#include <mutex>
 #include <vector>
 
-class MsgStream          ;
+class MsgStream;
 
 namespace InDet {
 
@@ -81,27 +82,27 @@ namespace InDet {
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 const TrackQualityCuts&);
+	 const TrackQualityCuts&) const;
 
       virtual const std::list<Trk::Track*>& getTracks
 	(const Trk::TrackParameters&, 
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 std::multimap<const Trk::PrepRawData*,const Trk::Track*>&);
+	 std::multimap<const Trk::PrepRawData*, const Trk::Track*>&) const;
 
       virtual const std::list<Trk::Track*>& getTracksWithBrem
 	(const Trk::TrackParameters&, 
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 std::multimap<const Trk::PrepRawData*,const Trk::Track*>&,
-	 bool);
+	 std::multimap<const Trk::PrepRawData*, const Trk::Track*>&,
+	 bool) const;
    
-      virtual void newEvent();
-      virtual void newEvent(Trk::TrackInfo,const TrackQualityCuts&);
+      virtual void newEvent() const;
+      virtual void newEvent(Trk::TrackInfo, const TrackQualityCuts&) const;
 
-      virtual void endEvent();
+      virtual void endEvent() const;
      
 
       ///////////////////////////////////////////////////////////////////
@@ -146,72 +147,81 @@ namespace InDet {
       BooleanProperty m_useSCT{this, "useSCT", true};
       StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid", "Mode of magnetic field"};
       StringProperty m_pixm{this, "PixManagerLocation", "Pixel", "PIX manager location"};
-      StringProperty m_sctm{this, "SCTManagerLocation", "SCT", "SCT manager location"};
+      StringProperty m_sctm{this, "SCTManagerLocation", "SCT", "SCT manager location"}; // NOT USED
       DoubleProperty m_qualityCut{this, "TrackQualityCut", 9.3, "Simple track quality cut"};
 
-      SiTrajectory_xk                m_trajectory    ;  // Track trajector1
-      Trk::TrackInfo                 m_trackinfo     ;
-      InDet::SiTools_xk              m_tools         ;
-      Trk::MagneticFieldProperties   m_fieldprop     ; // Magnetic field properties
-      std::list<Trk::Track*>         m_tracks        ; // List found tracks
+      // Updated in only initialize
+      int m_outputlevel{0};
+      Trk::MagneticFieldProperties m_fieldprop; // Magnetic field properties
+      std::string m_callbackString;
+
+      // Updated in only mapDetectorElementsProduction
       InDet::SiDetElementBoundaryLinks_xk m_boundaryPIX;
 
-      int                            m_outputlevel   ;
-      int                            m_nprint        ;  // Kind output information
-      int                            m_inputseeds{0};  // Number input seeds
-      int                            m_goodseeds     ;  // Number accepted seeds
-      int                            m_findtracks{0};  // Number found tracks
-      int                            m_inittracks    ;  // Number initial tracks
-      int                            m_roadbug       ;  // Number wrong DE roads
-      std::string                    m_callbackString;
-
-      bool                           m_pix           ;
-      bool                           m_sct           ;
-      bool                           m_heavyion{false};
-
-      int                            m_cosmicTrack   ;  // Is it cosmic track (0 or 1)
-      int                            m_nclusmin      ; // Min number clusters
-      int                            m_nclusminb     ; // Min number clusters
-      int                            m_nwclusmin     ; // Min number weighted clusters
-      int                            m_nholesmax     ; // Max number holes
-      int                            m_dholesmax     ; // Max holes gap
-      bool                           m_simpleTrack{false};
-      double                         m_pTmin         ; // min pT
-      double                         m_pTminBrem     ; // min pT for brem noise model
-      double                         m_xi2max        ; // max Xi2 for updators
-      double                         m_xi2maxNoAdd   ; // max Xi2 for clusters
-      double                         m_xi2maxlink    ; // max Xi2 for clusters
+      mutable std::mutex m_mutex;
+      mutable std::vector<EventContext::ContextEvt_t> m_cache ATLAS_THREAD_SAFE; // Guarded by m_mutex
+      struct EventData {
+        SiTrajectory_xk trajectory; // Track trajectory
+        Trk::TrackInfo trackinfo;
+        InDet::SiTools_xk tools;
+        std::list<Trk::Track*> tracks; // List found tracks
+        int nprint{0};  // Kind output information
+        int inputseeds{0}; // Number input seeds
+        int goodseeds{0}; // Number accepted seeds
+        int findtracks{0}; // Number found tracks
+        int inittracks{0}; // Number initial tracks
+        int roadbug{0}; // Number wrong DE roads
+        bool heavyIon{false};
+        int cosmicTrack{0};  // Is it cosmic track (0 or 1)
+        int nclusmin{0}; // Min number clusters
+        int nclusminb{0}; // Min number clusters
+        int nwclusmin{0}; // Min number weighted clusters
+        int nholesmax{0}; // Max number holes
+        int dholesmax{0}; // Max holes gap
+        bool simpleTrack{false};
+        double pTmin{0.}; // min pT
+        double pTminBrem{0.}; // min pT for brem noise model
+        double xi2max{0.}; // max Xi2 for updators
+        double xi2maxNoAdd{0.}; // max Xi2 for clusters
+        double xi2maxlink{0.}; // max Xi2 for clusters
+      };
+      mutable std::vector<EventData> m_eventData ATLAS_THREAD_SAFE; // Guarded by m_mutex
 
       ///////////////////////////////////////////////////////////////////
       // Methods 
       ///////////////////////////////////////////////////////////////////
 
       bool findTrack
-	(const Trk::TrackParameters&, 
+        (EventData& data,
+         const Trk::TrackParameters&, 
 	 const std::list<const Trk::SpacePoint*>&,
 	 const std::list<Amg::Vector3D>&,
 	 std::list<const InDetDD::SiDetectorElement*>&,
-	 std::multimap<const Trk::PrepRawData*,const Trk::Track*>&);
+	 std::multimap<const Trk::PrepRawData*, const Trk::Track*>&) const;
 
-      void getTrackQualityCuts(const TrackQualityCuts&);
+      void getTrackQualityCuts(EventData& data, const TrackQualityCuts&) const;
 
-      Trk::Track* convertToTrack();
-      Trk::Track* convertToNextTrack();
+      Trk::Track* convertToTrack(EventData& data) const;
+      Trk::Track* convertToNextTrack(EventData& data) const;
  
       void magneticFieldInit();
 
-      StatusCode mapDetectorElementsProduction(IOVSVC_CALLBACK_ARGS) ;
+      StatusCode mapDetectorElementsProduction(IOVSVC_CALLBACK_ARGS);
 
       bool spacePointsToClusters
 	(const std::list<const Trk::SpacePoint*>&,
-	 std::list<const InDet::SiCluster*>     &) const; 
+	 std::list<const InDet::SiCluster*> &) const; 
 
       void detectorElementLinks
 	(std::list<const InDetDD::SiDetectorElement*>        &,
 	 std::list<const InDet::SiDetElementBoundaryLink_xk*>&) const;
 
+      void newEvent(EventData& data) const;
+
+      EventData& getEventData() const;
+
       MsgStream& dumpconditions(MsgStream& out) const;
-      MsgStream& dumpevent     (MsgStream& out) const;
+      MsgStream& dumpevent(EventData& data, MsgStream& out) const;
 
     };
 
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h
old mode 100755
new mode 100644
index 2c9bd32c8898..3a70449c0c52
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h
@@ -44,14 +44,14 @@ namespace InDet{
       
       const Trk::MagneticFieldProperties& fieldTool  () const {return m_fieldtool  ;}
 
-      Trk::IPatternParametersPropagator*  propTool   () const {return m_proptool   ;}
-      Trk::IPatternParametersUpdator*     updatorTool() const {return m_updatortool;}
-      MagField::IMagFieldSvc*             magfield   () const {return m_fieldService;}  
-
-      Trk::IRIO_OnTrackCreator*           rioTool    () const {return m_riotool    ;}
-      Trk::IPRD_AssociationTool*          assoTool   () const {return m_assoTool   ;}
-      IInDetConditionsTool*               pixcond    () const {return m_pixcond    ;}
-      IInDetConditionsTool*               sctcond    () const {return m_sctcond    ;}
+      const Trk::IPatternParametersPropagator*  propTool   () const {return m_proptool   ;}
+      const Trk::IPatternParametersUpdator*     updatorTool() const {return m_updatortool;}
+      const MagField::IMagFieldSvc*             magfield   () const {return m_fieldService;}  
+
+      const Trk::IRIO_OnTrackCreator*           rioTool    () const {return m_riotool    ;}
+      const Trk::IPRD_AssociationTool*          assoTool   () const {return m_assoTool   ;}
+      const IInDetConditionsTool*               pixcond    () const {return m_pixcond    ;}
+      const IInDetConditionsTool*               sctcond    () const {return m_sctcond    ;}
       const double&                       xi2max     () const {return m_xi2max     ;}
       const double&                       xi2maxBrem () const {return m_xi2maxBrem ;}
       const double&                       xi2maxNoAdd() const {return m_xi2maxNoAdd;}
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h
old mode 100755
new mode 100644
index c5da48bd225d..19040a785e69
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -343,11 +343,11 @@ namespace InDet{
       InDet::SiClusterLink_xk                     m_linkB[10]   ; 
       Trk::NoiseOnSurface                         m_noise       ; 
       const InDet::SiTools_xk*                    m_tools       ; 
-      MagField::IMagFieldSvc*                     m_fieldService;
-      Trk::IPatternParametersUpdator*             m_updatorTool ;
-      Trk::IPatternParametersPropagator*          m_proptool    ;
-      Trk::IPRD_AssociationTool*                  m_assoTool    ; 
-      Trk::IRIO_OnTrackCreator*                   m_riotool     ;
+      const MagField::IMagFieldSvc*               m_fieldService;
+      const Trk::IPatternParametersUpdator*       m_updatorTool ;
+      const Trk::IPatternParametersPropagator*    m_proptool    ;
+      const Trk::IPRD_AssociationTool*            m_assoTool    ; 
+      const Trk::IRIO_OnTrackCreator*             m_riotool     ;
       Trk::TrackStateOnSurface*                   m_tsos[3]     ;
       Amg::MatrixX                                m_covariance  ;
 
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectory_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectory_xk.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
old mode 100755
new mode 100644
index cb9ba40b2386..ca9e5d5177de
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
@@ -45,9 +45,8 @@ InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk
 // Initialisation
 ///////////////////////////////////////////////////////////////////
 
-StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
-{
-  
+StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize ATLAS_NOT_THREAD_SAFE ()
+{  
   // Get RungeKutta propagator tool
   //
   if ( m_proptool.retrieve().isFailure() ) {
@@ -103,7 +102,7 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
 
   // get the key -- from StoreGate (DetectorStore)
   //
-  std::vector< std::string > tagInfoKeys =  detStore()->keys<TagInfo> ();
+  std::vector< std::string > tagInfoKeys = detStore()->keys<TagInfo>();
   std::string tagInfoKey = "";
 
   if (tagInfoKeys.size()==0) {
@@ -137,19 +136,10 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize()
   }    
   ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
 
-  // Set SiTools and conditions
-  //
-  m_tools.setTools(&*m_proptool, &*m_updatortool, &*m_riocreator, &*m_assoTool, &*m_fieldServiceHandle);
-  m_tools.setTools(&*m_pixelCondSummaryTool, &*m_sctCondSummaryTool);
-
   // Setup callback for magnetic field
   //
   magneticFieldInit();
 
-  // Set tool to trajectory
-  //
-  m_trajectory.setTools(&m_tools);
-
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
@@ -175,10 +165,12 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::finalize()
 // Dumps relevant information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream&  InDet::SiCombinatorialTrackFinder_xk::dump( MsgStream& out ) const
+MsgStream&  InDet::SiCombinatorialTrackFinder_xk::dump(MsgStream& out) const
 {
+  EventData& data{getEventData()};
+
   out<<std::endl;
-  if (m_nprint)  return dumpevent(out);
+  if (data.nprint) return dumpevent(data, out);
   return dumpconditions(out);
 }
 
@@ -186,7 +178,7 @@ MsgStream&  InDet::SiCombinatorialTrackFinder_xk::dump( MsgStream& out ) const
 // Dumps conditions information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out ) const
+MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions(MsgStream& out) const
 {
   int n = 62-m_proptool.type().size();
   std::string s1;
@@ -254,39 +246,39 @@ MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out
 // Dumps event information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpevent( MsgStream& out ) const
+MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpevent(EventData& data, MsgStream& out) const
 {
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Min pT of track (MeV)   | "<<std::setw(12)<<std::setprecision(5)<<m_pTmin
+  out<<"| Min pT of track (MeV)   | "<<std::setw(12)<<std::setprecision(5)<<data.pTmin
      <<"                              |"<<std::endl;
-  out<<"| Max Xi2 for cluster     | "<<std::setw(12)<<std::setprecision(5)<<m_xi2max
+  out<<"| Max Xi2 for cluster     | "<<std::setw(12)<<std::setprecision(5)<<data.xi2max
      <<"                              |"<<std::endl;
-  out<<"| Max Xi2 for outlayer    | "<<std::setw(12)<<std::setprecision(5)<<m_xi2maxNoAdd
+  out<<"| Max Xi2 for outlayer    | "<<std::setw(12)<<std::setprecision(5)<<data.xi2maxNoAdd
      <<"                              |"<<std::endl;
-  out<<"| Max Xi2 for link        | "<<std::setw(12)<<std::setprecision(5)<<m_xi2maxlink
+  out<<"| Max Xi2 for link        | "<<std::setw(12)<<std::setprecision(5)<<data.xi2maxlink
      <<"                              |"<<std::endl;
-  out<<"| Min number of clusters  | "<<std::setw(12)<<m_nclusmin
+  out<<"| Min number of clusters  | "<<std::setw(12)<<data.nclusmin
      <<"                              |"<<std::endl;
-  out<<"| Min number of wclusters | "<<std::setw(12)<<m_nwclusmin
+  out<<"| Min number of wclusters | "<<std::setw(12)<<data.nwclusmin
      <<"                              |"<<std::endl;
-  out<<"| Max number holes        | "<<std::setw(12)<<m_nholesmax
+  out<<"| Max number holes        | "<<std::setw(12)<<data.nholesmax
      <<"                              |"<<std::endl;
-  out<<"| Max holes  gap          | "<<std::setw(12)<<m_dholesmax
+  out<<"| Max holes  gap          | "<<std::setw(12)<<data.dholesmax
      <<"                              |"<<std::endl;
-  out<<"| Use association tool ?  | "<<std::setw(12)<<m_tools.useassoTool()
+  out<<"| Use association tool ?  | "<<std::setw(12)<<data.tools.useassoTool()
      <<"                              |"<<std::endl;
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Number input     seeds  | "<<std::setw(12)<<m_inputseeds
+  out<<"| Number input     seeds  | "<<std::setw(12)<<data.inputseeds
      <<"                              |"<<std::endl;
-  out<<"| Number accepted  seeds  | "<<std::setw(12)<<m_goodseeds
+  out<<"| Number accepted  seeds  | "<<std::setw(12)<<data.goodseeds
      <<"                              |"<<std::endl;
-  out<<"| Number initial  tracks  | "<<std::setw(12)<<m_inittracks  
+  out<<"| Number initial  tracks  | "<<std::setw(12)<<data.inittracks  
      <<"                              |"<<std::endl;
-  out<<"| Number wrong DE  roads  | "<<std::setw(12)<<m_roadbug  
+  out<<"| Number wrong DE  roads  | "<<std::setw(12)<<data.roadbug  
      <<"                              |"<<std::endl;
-  out<<"| Number output   tracks  | "<<std::setw(12)<<m_findtracks  
+  out<<"| Number output   tracks  | "<<std::setw(12)<<data.findtracks  
      <<"                              |"<<std::endl;
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
@@ -297,7 +289,7 @@ MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpevent( MsgStream& out ) con
 // Dumps relevant information into the ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::SiCombinatorialTrackFinder_xk::dump( std::ostream& out ) const
+std::ostream& InDet::SiCombinatorialTrackFinder_xk::dump(std::ostream& out) const
 {
   return out;
 }
@@ -326,24 +318,11 @@ std::ostream& InDet::operator <<
 // Initiate track finding tool 
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiCombinatorialTrackFinder_xk::newEvent()
+void InDet::SiCombinatorialTrackFinder_xk::newEvent() const
 {
+  EventData& data{getEventData()};
 
-  m_pix = m_usePIX && m_pixcontainerkey.initialize().isSuccess();
-  m_sct = m_useSCT && m_sctcontainerkey.initialize().isSuccess();
-
-  // Erase statistic information
-  //
-  m_inputseeds = 0;
-  m_goodseeds  = 0;
-  m_inittracks = 0;
-  m_findtracks = 0;
-  m_roadbug    = 0;
-
-  // Set track info
-  //
-  m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinder);
-  m_cosmicTrack = 0;
+  newEvent(data);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -351,36 +330,54 @@ void InDet::SiCombinatorialTrackFinder_xk::newEvent()
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiCombinatorialTrackFinder_xk::newEvent
-(Trk::TrackInfo info, const TrackQualityCuts& Cuts)
+(Trk::TrackInfo info, const TrackQualityCuts& Cuts) const
 {
-  newEvent();
-  m_trackinfo = info;
+  EventData& data{getEventData()};
+
+  newEvent(data);
+  data.trackinfo = info;
   
   // Get track qulaity cuts information
   //
-  getTrackQualityCuts(Cuts);
+  getTrackQualityCuts(data, Cuts);
 
-  m_heavyion    = false;
-  m_cosmicTrack =     0;
+  data.heavyIon = false;
+  data.cosmicTrack = 0;
 
   if (info.patternRecoInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_Cosmic)) {
-    m_cosmicTrack = 1;
+    data.cosmicTrack = 1;
   } else if (info.patternRecoInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_HeavyIon)) {
-    m_heavyion = true;
+    data.heavyIon = true;
   }
-  m_tools.setHeavyIon(m_heavyion);
+  data.tools.setHeavyIon(data.heavyIon);
+}
+
+void InDet::SiCombinatorialTrackFinder_xk::newEvent(EventData& data) const {
+  // Erase statistic information
+  //
+  data.inputseeds = 0;
+  data.goodseeds  = 0;
+  data.inittracks = 0;
+  data.findtracks = 0;
+  data.roadbug    = 0;
+
+  // Set track info
+  //
+  data.trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinder);
+  data.cosmicTrack = 0;
 }
 
 ///////////////////////////////////////////////////////////////////
 // Finalize track finding tool for given event
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiCombinatorialTrackFinder_xk::endEvent()
+void InDet::SiCombinatorialTrackFinder_xk::endEvent() const
 {
   // Print event information 
   //
   if (m_outputlevel<=0) {
-    m_nprint=1;
+    EventData& data{getEventData()};
+    data.nprint = 1;
     ATH_MSG_DEBUG(*this);
   }
 }
@@ -391,38 +388,42 @@ void InDet::SiCombinatorialTrackFinder_xk::endEvent()
 
 const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
 (const Trk::TrackParameters& Tp,
- const std::list<const Trk::SpacePoint*>& Sp,const std::list<Amg::Vector3D>& Gp,
- std::list<const InDetDD::SiDetectorElement*>& DE,const TrackQualityCuts& Cuts)
+ const std::list<const Trk::SpacePoint*>& Sp,
+ const std::list<Amg::Vector3D>& Gp,
+ std::list<const InDetDD::SiDetectorElement*>& DE,
+ const TrackQualityCuts& Cuts) const
 {
-  m_tools.setBremNoise(false,false);
-  m_tracks.erase(m_tracks.begin(), m_tracks.end());
+  EventData& data{getEventData()};
+
+  data.tools.setBremNoise(false,false);
+  data.tracks.erase(data.tracks.begin(), data.tracks.end());
 
-  ++m_inputseeds;
-  if (!m_pix && !m_sct) {
-    return m_tracks;
+  ++data.inputseeds;
+  if (!m_usePIX && !m_useSCT) {
+    return data.tracks;
   }
 
   // Get track qulaity cuts information
   //
-  getTrackQualityCuts(Cuts);
-  std::multimap<const Trk::PrepRawData*,const Trk::Track*> PT;
-  if (!findTrack(Tp,Sp,Gp,DE,PT)) return m_tracks;
+  getTrackQualityCuts(data, Cuts);
+  std::multimap<const Trk::PrepRawData*, const Trk::Track*> PT;
+  if (!findTrack(data, Tp, Sp, Gp, DE, PT)) return data.tracks;
  
-  m_trajectory.sortStep();
+  data.trajectory.sortStep();
 
   // Trk::Track production
   //
-  Trk::Track* t = convertToTrack();
-  ++m_findtracks;
-  m_tracks.push_back(t);
+  Trk::Track* t = convertToTrack(data);
+  ++data.findtracks;
+  data.tracks.push_back(t);
 
-  if (!m_tools.multiTrack() || m_simpleTrack || Sp.size()<=2 || m_cosmicTrack || m_trajectory.pTfirst() < m_tools.pTmin()) return m_tracks;
+  if (!data.tools.multiTrack() || data.simpleTrack || Sp.size()<=2 || data.cosmicTrack || data.trajectory.pTfirst() < data.tools.pTmin()) return data.tracks;
 
-  while ((t=convertToNextTrack())) {
-    ++m_findtracks;
-    m_tracks.push_back(t);
+  while ((t=convertToNextTrack(data))) {
+    ++data.findtracks;
+    data.tracks.push_back(t);
   }
-  return m_tracks;
+  return data.tracks;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -431,38 +432,41 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
 
 const std::list<Trk::Track*>& InDet::SiCombinatorialTrackFinder_xk::getTracks
 (const Trk::TrackParameters& Tp,
- const std::list<const Trk::SpacePoint*>& Sp,const std::list<Amg::Vector3D>& Gp,
+ const std::list<const Trk::SpacePoint*>& Sp,
+ const std::list<Amg::Vector3D>& Gp,
  std::list<const InDetDD::SiDetectorElement*>& DE,
- std::multimap<const Trk::PrepRawData*,const Trk::Track*>& PT)
+ std::multimap<const Trk::PrepRawData*, const Trk::Track*>& PT) const
 {
-  m_tools.setBremNoise(false, false);
-  m_tracks.erase(m_tracks.begin(), m_tracks.end());
+  EventData& data{getEventData()};
+
+  data.tools.setBremNoise(false, false);
+  data.tracks.erase(data.tracks.begin(), data.tracks.end());
 
-  ++m_inputseeds;
-  if (!m_pix && !m_sct) {
-    return m_tracks;
+  ++data.inputseeds;
+  if (!m_usePIX && !m_useSCT) {
+    return data.tracks;
   }
 
-  if (!findTrack(Tp,Sp,Gp,DE,PT)) return m_tracks;
-  if (!m_trajectory.isNewTrack(PT)) return m_tracks;
+  if (!findTrack(data, Tp, Sp, Gp, DE, PT)) return data.tracks;
+  if (!data.trajectory.isNewTrack(PT)) return data.tracks;
 
-  m_trajectory.sortStep();
+  data.trajectory.sortStep();
 
   // Trk::Track production
   //
-  Trk::Track* t = convertToTrack();
-  if (t==nullptr) return m_tracks;
+  Trk::Track* t = convertToTrack(data);
+  if (t==nullptr) return data.tracks;
 
-  ++m_findtracks;
-  m_tracks.push_back(t);
+  ++data.findtracks;
+  data.tracks.push_back(t);
 
-  if (!m_tools.multiTrack() || m_simpleTrack || Sp.size()<=2 || m_cosmicTrack || m_trajectory.pTfirst() < m_tools.pTmin()) return m_tracks;
+  if (!data.tools.multiTrack() || data.simpleTrack || Sp.size()<=2 || data.cosmicTrack || data.trajectory.pTfirst() < data.tools.pTmin()) return data.tracks;
 
-  while ((t=convertToNextTrack())) {
-    ++m_findtracks;
-    m_tracks.push_back(t);
+  while ((t=convertToNextTrack(data))) {
+    ++data.findtracks;
+    data.tracks.push_back(t);
   } 
-  return m_tracks;
+  return data.tracks;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -476,77 +480,78 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracksWi
  const std::list<Amg::Vector3D>& Gp,
  std::list<const InDetDD::SiDetectorElement*>& DE,
  std::multimap<const Trk::PrepRawData*, const Trk::Track*>& PT,
- bool isCaloCompatible)
+ bool isCaloCompatible) const
 {
+  EventData& data{getEventData()};
+
   // Old information
   //
   int mult = 0;
-  if (m_tools.multiTrack()) mult = 1;
-  double Xi2m = m_tools.xi2multi();
+  if (data.tools.multiTrack()) mult = 1;
+  double Xi2m = data.tools.xi2multi();
 
-  m_tools.setBremNoise(false, true);
-  m_tracks.erase(m_tracks.begin(), m_tracks.end());
+  data.tools.setBremNoise(false, true);
+  data.tracks.erase(data.tracks.begin(), data.tracks.end());
 
-  ++m_inputseeds;
-  if (!m_pix && !m_sct) {
-    return m_tracks;
+  ++data.inputseeds;
+  if (!m_usePIX && !m_useSCT) {
+    return data.tracks;
   }
 
-  bool Q = findTrack(Tp,Sp,Gp,DE,PT);
-  if (Q) Q = m_trajectory.isNewTrack(PT);
+  bool Q = findTrack(data, Tp, Sp, Gp, DE, PT);
+  if (Q) Q = data.trajectory.isNewTrack(PT);
   int na = 0;
   if (Q) {
-
-    m_trajectory.sortStep();
+    data.trajectory.sortStep();
 
     // Trk::Track production
     //
-    Trk::TrackInfo oldinfo = m_trackinfo;
-    if (isCaloCompatible) m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
-
-    m_tools.setMultiTracks(0   ,Xi2m);
-    Trk::Track* t = convertToTrack();
-    m_trackinfo = oldinfo;
-    m_tools.setMultiTracks(mult,Xi2m);
-
-    if (!t) return m_tracks;
-    ++m_findtracks;
-    m_tracks.push_back(t);
-    na = m_trajectory.nclusters();
-    if (na >=12 && !m_trajectory.nclustersNoAdd()) return m_tracks;
+    Trk::TrackInfo oldinfo = data.trackinfo;
+    if (isCaloCompatible) data.trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
+
+    data.tools.setMultiTracks(0, Xi2m);
+    Trk::Track* t = convertToTrack(data);
+    data.trackinfo = oldinfo;
+    data.tools.setMultiTracks(mult,Xi2m);
+
+    if (!t) return data.tracks;
+    ++data.findtracks;
+    data.tracks.push_back(t);
+    na = data.trajectory.nclusters();
+    if (na >=12 && !data.trajectory.nclustersNoAdd()) return data.tracks;
    
-    if (m_trajectory.pTfirst() <  m_pTminBrem) return m_tracks;
+    if (data.trajectory.pTfirst() < data.pTminBrem) return data.tracks;
   }
-  if ((*Sp.begin())->clusterList().second) return m_tracks;
+  if ((*Sp.begin())->clusterList().second) return data.tracks;
  
   // Repeat track finding using electron noise model
   //
-  m_tools.setBremNoise(true,true);
-  if (!findTrack(Tp, Sp, Gp, DE, PT)) return m_tracks;
-  if (!m_trajectory.isNewTrack(PT)) return m_tracks;
+  data.tools.setBremNoise(true,true);
+  if (!findTrack(data, Tp, Sp, Gp, DE, PT)) return data.tracks;
+  if (!data.trajectory.isNewTrack(PT)) return data.tracks;
   
-  int nb = m_trajectory.nclusters();
-  if (nb <= na ) return m_tracks;
+  int nb = data.trajectory.nclusters();
+  if (nb <= na ) return data.tracks;
   
-  m_trajectory.sortStep();
+  data.trajectory.sortStep();
 
   // Trk::Track production
   //
-  Trk::TrackInfo oldinfo = m_trackinfo;
-  m_trackinfo.setTrackProperties(Trk::TrackInfo::BremFit          );
-  m_trackinfo.setTrackProperties(Trk::TrackInfo::BremFitSuccessful);
-  if (isCaloCompatible) m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
+  Trk::TrackInfo oldinfo = data.trackinfo;
+  data.trackinfo.setTrackProperties(Trk::TrackInfo::BremFit          );
+  data.trackinfo.setTrackProperties(Trk::TrackInfo::BremFitSuccessful);
+  if (isCaloCompatible) data.trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::TrackInCaloROI);
 
-  m_tools.setMultiTracks(0   ,Xi2m);
-  Trk::Track* t = convertToTrack();
-  m_trackinfo = oldinfo;
-  m_tools.setMultiTracks(mult,Xi2m);
+  data.tools.setMultiTracks(0, Xi2m);
+  Trk::Track* t = convertToTrack(data);
+  data.trackinfo = oldinfo;
+  data.tools.setMultiTracks(mult, Xi2m);
 
-  if (t==nullptr) return m_tracks;
+  if (t==nullptr) return data.tracks;
 
-  ++m_findtracks;
-  m_tracks.push_back(t);
-  return m_tracks;
+  ++data.findtracks;
+  data.tracks.push_back(t);
+  return data.tracks;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -554,10 +559,11 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracksWi
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::SiCombinatorialTrackFinder_xk::findTrack
-(const Trk::TrackParameters& Tp,
+(EventData& data,
+ const Trk::TrackParameters& Tp,
  const std::list<const Trk::SpacePoint*>& Sp,const std::list<Amg::Vector3D>& Gp,
  std::list<const InDetDD::SiDetectorElement*>& DE,
- std::multimap<const Trk::PrepRawData*,const Trk::Track*>& PT)
+ std::multimap<const Trk::PrepRawData*,const Trk::Track*>& PT) const
 {
   // List detector element links preparation
   //
@@ -578,67 +584,67 @@ bool InDet::SiCombinatorialTrackFinder_xk::findTrack
     }
     if (Sp.size()<=2) TWO = true;
   } else if (Gp.size() > 2) {
-    if (!m_trajectory.globalPositionsToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Gp,DEL,PT,Cl)) return false;
+    if (!data.trajectory.globalPositionsToClusters(pixcontainer.ptr(), sctcontainer.ptr(), Gp, DEL, PT, Cl)) return false;
   } else {
-    if (!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
+    if (!data.trajectory.trackParametersToClusters(pixcontainer.ptr(), sctcontainer.ptr(), Tp, DEL, PT, Cl)) return false;
   }
-  ++m_goodseeds;
+  ++data.goodseeds;
 
   // Build initial trajectory
   //
   bool Qr;
-  bool Q = m_trajectory.initialize(m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr);
+  bool Q = data.trajectory.initialize(m_usePIX, m_useSCT, pixcontainer.ptr(), sctcontainer.ptr(), Tp, Cl, DEL, Qr);
 
   if (!Q && Sp.size() < 2 && Gp.size() > 3) {
 
     Cl.clear();
-    if (!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
-    if (!m_trajectory.initialize   (m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr)) return false;
+    if (!data.trajectory.trackParametersToClusters(pixcontainer.ptr(), sctcontainer.ptr(), Tp, DEL, PT, Cl)) return false;
+    if (!data.trajectory.initialize(m_usePIX, m_useSCT, pixcontainer.ptr(), sctcontainer.ptr(), Tp, Cl, DEL, Qr)) return false;
     Q = Qr = true;
   }
 
-  if (!Qr) ++m_roadbug;
+  if (!Qr) ++data.roadbug;
   if (!Q) return false;
-  ++m_inittracks;
-  bool pixseed = m_trajectory.isLastPixel();
+  ++data.inittracks;
+  bool pixseed = data.trajectory.isLastPixel();
   int itmax    = 30;
-  if (m_simpleTrack) itmax = 10;
-  if (m_heavyion) itmax = 50;
+  if (data.simpleTrack) itmax = 10;
+  if (data.heavyIon) itmax = 50;
 
   // Track finding
   //
   if (pixseed) {      // Strategy for pixel seeds
-    if (!m_trajectory.forwardExtension (false,itmax)) return false;
-    if (!m_trajectory.backwardSmoother (false)      ) return false;
-    if (!m_trajectory.backwardExtension(itmax)      ) return false;
+    if (!data.trajectory.forwardExtension (false,itmax)) return false;
+    if (!data.trajectory.backwardSmoother (false)      ) return false;
+    if (!data.trajectory.backwardExtension(itmax)      ) return false;
 
-    if (m_trajectory.difference() > 0) {
-      if (!m_trajectory.forwardFilter()          ) return false;
-      if (!m_trajectory.backwardSmoother (false) ) return false;
+    if (data.trajectory.difference() > 0) {
+      if (!data.trajectory.forwardFilter()          ) return false;
+      if (!data.trajectory.backwardSmoother (false) ) return false;
     } 
-    int na = m_trajectory.nclustersNoAdd();
-    if (m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
+    int na = data.trajectory.nclustersNoAdd();
+    if (data.trajectory.nclusters()+na < data.nclusmin || data.trajectory.ndf() < data.nwclusmin) return false;
   } else {      // Strategy for mixed seeds
-    if (!m_trajectory.backwardSmoother(TWO)       ) return false;
-    if (!m_trajectory.backwardExtension(itmax)    ) return false;
-    if (!m_trajectory.forwardExtension(true,itmax)) return false;
+    if (!data.trajectory.backwardSmoother(TWO)       ) return false;
+    if (!data.trajectory.backwardExtension(itmax)    ) return false;
+    if (!data.trajectory.forwardExtension(true,itmax)) return false;
 
-    int na = m_trajectory.nclustersNoAdd();
-    if (m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
-    if (!m_trajectory.backwardSmoother(false)    ) return false;
+    int na = data.trajectory.nclustersNoAdd();
+    if (data.trajectory.nclusters()+na < data.nclusmin || data.trajectory.ndf() < data.nwclusmin) return false;
+    if (!data.trajectory.backwardSmoother(false)    ) return false;
 
-    na     = m_trajectory.nclustersNoAdd();
-    if (m_trajectory.nclusters()+na < m_nclusmin || m_trajectory.ndf() < m_nwclusmin) return false;
+    na     = data.trajectory.nclustersNoAdd();
+    if (data.trajectory.nclusters()+na < data.nclusmin || data.trajectory.ndf() < data.nwclusmin) return false;
 
-    if (m_trajectory.difference() > 0) {
-      if (!m_trajectory.forwardFilter()         ) return false;
-      if (!m_trajectory.backwardSmoother (false)) return false;
+    if (data.trajectory.difference() > 0) {
+      if (!data.trajectory.forwardFilter()         ) return false;
+      if (!data.trajectory.backwardSmoother (false)) return false;
     }
   } 
 
-  if (m_trajectory.qualityOptimization()     <           (m_qualityCut*m_nclusmin)    ) return false;
-  if (m_trajectory.pTfirst  () < m_pTmin     && m_trajectory.nclusters() < m_nclusmin ) return false;
-  if (m_trajectory.nclusters() < m_nclusminb || m_trajectory.ndf      () < m_nwclusmin) return false;
+  if (data.trajectory.qualityOptimization()     <           (m_qualityCut*data.nclusmin)    ) return false;
+  if (data.trajectory.pTfirst  () < data.pTmin     && data.trajectory.nclusters() < data.nclusmin ) return false;
+  if (data.trajectory.nclusters() < data.nclusminb || data.trajectory.ndf      () < data.nwclusmin) return false;
   
   return true;
 }
@@ -647,46 +653,45 @@ bool InDet::SiCombinatorialTrackFinder_xk::findTrack
 // Trk::Track production
 ///////////////////////////////////////////////////////////////////
 
-Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToTrack()
+Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToTrack(EventData& data) const
 {
-  if (!m_simpleTrack) {
-    return new Trk::Track(m_trackinfo,
-                          m_trajectory.convertToTrackStateOnSurface(m_cosmicTrack),
-                          m_trajectory.convertToFitQuality());
+  if (!data.simpleTrack) {
+    return new Trk::Track(data.trackinfo,
+                          data.trajectory.convertToTrackStateOnSurface(data.cosmicTrack),
+                          data.trajectory.convertToFitQuality());
   }
 
-  Trk::TrackInfo info = m_trackinfo;
+  Trk::TrackInfo info = data.trackinfo;
   info.setPatternRecognitionInfo(Trk::TrackInfo::SiSPSeededFinderSimple);
   return new Trk::Track(info,
-                        m_trajectory.convertToSimpleTrackStateOnSurface(m_cosmicTrack),
-                        m_trajectory.convertToFitQuality());
+                        data.trajectory.convertToSimpleTrackStateOnSurface(data.cosmicTrack),
+                        data.trajectory.convertToFitQuality());
 }
 
 ///////////////////////////////////////////////////////////////////
 // Next Trk::Track production
 ///////////////////////////////////////////////////////////////////
 
-Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToNextTrack()
+Trk::Track* InDet::SiCombinatorialTrackFinder_xk::convertToNextTrack(EventData& data) const
 {
-  DataVector<const Trk::TrackStateOnSurface>* tsos = m_trajectory.convertToNextTrackStateOnSurface();
+  DataVector<const Trk::TrackStateOnSurface>* tsos{data.trajectory.convertToNextTrackStateOnSurface()};
   if (tsos==nullptr) return nullptr;
-  return new Trk::Track(m_trackinfo,
+  return new Trk::Track(data.trackinfo,
                         tsos,
-                        m_trajectory.convertToFitQuality());
+                        data.trajectory.convertToFitQuality());
 }
 
 ///////////////////////////////////////////////////////////////////
 // Callback function - get the magnetic field /
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiCombinatorialTrackFinder_xk::magneticFieldInit() 
+void InDet::SiCombinatorialTrackFinder_xk::magneticFieldInit()
 {
   // Build MagneticFieldProperties 
   //
   if      (m_fieldmode == "NoField"    ) m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField  );
   else if (m_fieldmode == "MapSolenoid") m_fieldprop = Trk::MagneticFieldProperties(Trk::FastField);
   else                                   m_fieldprop = Trk::MagneticFieldProperties(Trk::FullField);
-  m_tools.setTools(m_fieldprop);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -694,17 +699,15 @@ void InDet::SiCombinatorialTrackFinder_xk::magneticFieldInit()
 ///////////////////////////////////////////////////////////////////
 
 StatusCode InDet::SiCombinatorialTrackFinder_xk::mapDetectorElementsProduction 
-(IOVSVC_CALLBACK_ARGS_P(I, keys))
+(IOVSVC_CALLBACK_ARGS_P(/*I*/, keys))
 {
-  (void) I;
-
   StatusCode sc;
 
   // Get  Pixel Detector Manager
   //
-  const InDetDD::PixelDetectorManager* pixmgr = 0;
+  const InDetDD::PixelDetectorManager* pixmgr = nullptr;
   if (m_usePIX) {
-    sc = detStore()->retrieve(pixmgr,m_pixm);
+    sc = detStore()->retrieve(pixmgr, m_pixm);
     if (sc.isFailure() || !pixmgr) {
       ATH_MSG_FATAL("Could not get PixelDetectorManager  !");
       return StatusCode::FAILURE;
@@ -829,59 +832,87 @@ void InDet::SiCombinatorialTrackFinder_xk::detectorElementLinks
 ///////////////////////////////////////////////////////////////////
 
 void  InDet::SiCombinatorialTrackFinder_xk::getTrackQualityCuts
-(const TrackQualityCuts& Cuts)
+(EventData& data, const TrackQualityCuts& Cuts) const
 {
   // Integer cuts
   //
-  if (!Cuts.getIntCut   ("CosmicTrack"         ,m_cosmicTrack)) m_cosmicTrack   =    0;
+  if (!Cuts.getIntCut   ("CosmicTrack"         ,data.cosmicTrack)) data.cosmicTrack   =    0;
 
-  if (!Cuts.getIntCut   ("MinNumberOfClusters" ,m_nclusmin   )) m_nclusmin      =    7;
-  m_nclusminb = m_nclusmin-1;
-  if (m_nclusminb < 3) m_nclusminb = 3;
+  if (!Cuts.getIntCut   ("MinNumberOfClusters" ,data.nclusmin   )) data.nclusmin      =    7;
+  data.nclusminb = data.nclusmin-1;
+  if (data.nclusminb < 3) data.nclusminb = 3;
 
-  if (!Cuts.getIntCut   ("MinNumberOfWClusters",m_nwclusmin  )) m_nwclusmin     =    7;
+  if (!Cuts.getIntCut   ("MinNumberOfWClusters",data.nwclusmin  )) data.nwclusmin     =    7;
 
-  if (!Cuts.getIntCut   ("MaxNumberOfHoles"    ,m_nholesmax  )) m_nholesmax     =    2;
-  if (!Cuts.getIntCut   ("MaxHolesGae"         ,m_dholesmax  )) m_dholesmax     =    2;
-  if (!m_cosmicTrack) {
-    if (m_nholesmax > 2) m_nholesmax = 2;
-    if (m_dholesmax > 2) m_dholesmax = 2;
+  if (!Cuts.getIntCut   ("MaxNumberOfHoles"    ,data.nholesmax  )) data.nholesmax     =    2;
+  if (!Cuts.getIntCut   ("MaxHolesGae"         ,data.dholesmax  )) data.dholesmax     =    2;
+  if (!data.cosmicTrack) {
+    if (data.nholesmax > 2) data.nholesmax = 2;
+    if (data.dholesmax > 2) data.dholesmax = 2;
   }
-  if (m_dholesmax > m_nholesmax) m_dholesmax = m_nholesmax;
+  if (data.dholesmax > data.nholesmax) data.dholesmax = data.nholesmax;
 
   int useasso;
   if (!Cuts.getIntCut   ("UseAssociationTool"  ,useasso      )) useasso         =    0;
 
   int simpletrack;
   if (!Cuts.getIntCut   ("SimpleTrack"         ,simpletrack  )) simpletrack     =    0;
-  simpletrack ? m_simpleTrack = true : m_simpleTrack = false;
+  simpletrack ? data.simpleTrack = true : data.simpleTrack = false;
 
   int multitrack;
   if (!Cuts.getIntCut   ("doMultiTracksProd"   ,multitrack   )) multitrack      =    0;
  
   // Double cuts
   //
-  if (!Cuts.getDoubleCut("pTmin"              ,m_pTmin      )) m_pTmin         = 500.;
-  if (!Cuts.getDoubleCut("pTminBrem"          ,m_pTminBrem  )) m_pTminBrem     =1000.;
+  if (!Cuts.getDoubleCut("pTmin"              ,data.pTmin      )) data.pTmin         = 500.;
+  if (!Cuts.getDoubleCut("pTminBrem"          ,data.pTminBrem  )) data.pTminBrem     =1000.;
 
-  if (!Cuts.getDoubleCut("MaxXi2forCluster"   ,m_xi2max     )) m_xi2max        =   9.;
-  if (!Cuts.getDoubleCut("MaxXi2forOutlier"   ,m_xi2maxNoAdd)) m_xi2maxNoAdd   =  25.;
-  if (!m_cosmicTrack) {
-    if (m_xi2maxNoAdd > 25.) m_xi2maxNoAdd = 25.;
+  if (!Cuts.getDoubleCut("MaxXi2forCluster"   ,data.xi2max     )) data.xi2max        =   9.;
+  if (!Cuts.getDoubleCut("MaxXi2forOutlier"   ,data.xi2maxNoAdd)) data.xi2maxNoAdd   =  25.;
+  if (!data.cosmicTrack) {
+    if (data.xi2maxNoAdd > 25.) data.xi2maxNoAdd = 25.;
   }
-  if (m_xi2maxNoAdd <= m_xi2max) m_xi2maxNoAdd = m_xi2max+5.;
+  if (data.xi2maxNoAdd <= data.xi2max) data.xi2maxNoAdd = data.xi2max+5.;
 
-  if (!Cuts.getDoubleCut("MaxXi2forSearch"    ,m_xi2maxlink )) m_xi2maxlink    = 100.;
+  if (!Cuts.getDoubleCut("MaxXi2forSearch"    ,data.xi2maxlink )) data.xi2maxlink    = 100.;
 
   double xi2m;
   if (!Cuts.getDoubleCut("MaxXi2MultiTracks"  ,xi2m         )) xi2m            =   7.;
-  if (!m_cosmicTrack) {
+  if (!data.cosmicTrack) {
     if (xi2m > 7.) xi2m = 7.;
   }
 
-  m_tools.setXi2pTmin(m_xi2max, m_xi2maxNoAdd, m_xi2maxlink, m_pTmin);
-  m_tools.setHolesClusters(m_nholesmax, m_dholesmax, m_nclusmin);
-  m_tools.setAssociation(useasso);
-  m_tools.setMultiTracks(multitrack, xi2m);
-  m_trajectory.setParameters();
+  data.tools.setXi2pTmin(data.xi2max, data.xi2maxNoAdd, data.xi2maxlink, data.pTmin);
+  data.tools.setHolesClusters(data.nholesmax, data.dholesmax, data.nclusmin);
+  data.tools.setAssociation(useasso);
+  data.tools.setMultiTracks(multitrack, xi2m);
+  data.trajectory.setParameters();
+}
+
+InDet::SiCombinatorialTrackFinder_xk::EventData& InDet::SiCombinatorialTrackFinder_xk::getEventData() const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cache.size()) { // Need to extend vectors
+    static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+    m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement
+    m_eventData.resize(slot+1);
+  }
+  if (m_cache[slot]!=evt) { // New event
+    m_cache[slot] = evt;
+    // Initialization
+    m_eventData[slot] = EventData{};
+
+    // Set SiTools and conditions
+    //
+    m_eventData[slot].tools.setTools(&*m_proptool, &*m_updatortool, &*m_riocreator, &*m_assoTool, &*m_fieldServiceHandle);
+    m_eventData[slot].tools.setTools(&*m_pixelCondSummaryTool, &*m_sctCondSummaryTool);    
+    m_eventData[slot].tools.setTools(m_fieldprop);
+
+    // Set tool to trajectory
+    //
+    m_eventData[slot].trajectory.setTools(&m_eventData[slot].tools);
+  }
+  return m_eventData[slot];
 }
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLink_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLink_xk.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectory_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectory_xk.cxx
old mode 100755
new mode 100644
-- 
GitLab


From 015f8e267f6b716fd10f12a78143b1fe80c38be6 Mon Sep 17 00:00:00 2001
From: Gabriel Gallardo <gabriel.gallardo@cern.ch>
Date: Fri, 3 May 2019 11:53:43 +0000
Subject: [PATCH 082/129] Merge branch 'dev_pufitMT_ctest' into
 MetTrig.PUFitHelper

Merge in bug fixes
---
 .../TrigEFMissingET/EFMissingETHelper.h       |  4 +-
 .../src/EFMissingETFromClustersPUC.cxx        |  2 +-
 .../src/EFMissingETFromClustersPufitMT.cxx    | 49 ++++++++-----------
 .../src/EFMissingETFromClustersPufitMT.h      |  1 -
 .../src/EFMissingETFromHelper.cxx             | 12 ++---
 .../src/EFMissingETFromHelperMT.cxx           |  6 +--
 .../TrigEFMissingET/src/EFMissingETHelper.cxx |  4 +-
 .../share/met.fromClustersPufit.py            |  6 +--
 .../share/met_fromClustersPufit.ref           | 10 ++++
 9 files changed, 48 insertions(+), 46 deletions(-)
 create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/met_fromClustersPufit.ref

diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h
index 61fd3b1caefc..224c169e54b6 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h
@@ -47,8 +47,8 @@ class TrigEFMissingEtComponent {
         JET      ,                                      // Jet 
         JETB1    , JETB2    ,                           // 
         JETE1    , JETE2    ,                           // 
-        TCPUC    ,                                      // Topo. cluster Fit 
-        TCPUCUnc ,                                      // Topo. cluster Fit -- uncorrected
+        TCPufit    ,                                    // Topo. cluster Fit 
+        TCPufitUnc ,                                    // Topo. cluster Fit -- uncorrected
         Muons,                                          // Muons 
         ComponentSize
     };
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx
index abb3957bb4af..73ba086291cf 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx
@@ -389,7 +389,7 @@ StatusCode EFMissingETFromClustersPUC::execute(xAOD::TrigMissingET * /* met */ ,
       // Just store zero energies for the clusters 
       metComp->m_ex = 0.;
       metComp->m_ey = 0.;
-      metComp->m_ey = 0.;
+      metComp->m_ez = 0.;
       metComp->m_sumEt = 0.;
       metComp->m_sumE  = 0.;
       metComp->m_usedChannels += 1;
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.cxx
index 74c298b5f337..83a7dab189c5 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.cxx
@@ -58,14 +58,9 @@ StatusCode EFMissingETFromClustersPufitMT::initialize()
 
   ATH_MSG_DEBUG( "called EFMissingETFromClustersPufitMT::initialize()" );
 
-  if(m_saveuncalibrated) 
-  {
-    m_metHelperComp = TrigEFMissingEtComponent::TCEM;
+  if(m_saveuncalibrated) {
     m_clusterstate = xAOD::CaloCluster_v1::UNCALIBRATED;
-  }
-  else 
-  {
-    m_metHelperComp = TrigEFMissingEtComponent::TCLCW;
+  } else {
     m_clusterstate = xAOD::CaloCluster_v1::CALIBRATED;
   }
 
@@ -75,13 +70,15 @@ StatusCode EFMissingETFromClustersPufitMT::initialize()
 }
 
 
-StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET * /* met */ ,
+StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET *met,
 						  TrigEFMissingEtHelper *metHelper, 
 						  const EventContext& ctx ) const
 {
 
   ATH_MSG_DEBUG( "called EFMissingETFromClustersPufitMT::update()" );
 
+  const std::vector<std::string> vComp = {"TCPufit", "TCPufitUnc", "Muons"};
+  met->defineComponents(vComp);
 
   auto totalTimer = Monitored::Timer( "TIME_Total" );
   auto caloClustersHandle = SG::makeHandle( m_clustersKey, ctx );
@@ -91,13 +88,9 @@ StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET * /* met *
 
   /// fetching the topo. cluster component
   TrigEFMissingEtComponent* metComp = nullptr;
-  metComp = metHelper->GetComponent(TrigEFMissingEtComponent::TCPUC); // fetch Cluster component
+  metComp = metHelper->GetComponent(TrigEFMissingEtComponent::TCPufit); // fetch Cluster component
   if (metComp==0) {
-    ATH_MSG_ERROR( "cannot fetch Topo. cluster component!" );
-    return StatusCode::FAILURE;
-  }
-  if(string(metComp->m_name).substr(0,2)!="TC"){
-    ATH_MSG_ERROR( "fetched " << metComp->m_name << " instead of the Clusters component!" );
+    ATH_MSG_ERROR( "cannot fetch TC PUFit component!" );
     return StatusCode::FAILURE;
   }
 
@@ -140,7 +133,7 @@ StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET * /* met *
            binPhi = (fmod(phi+TMath::TwoPi(),TMath::TwoPi()) / TMath::TwoPi())*m_nphibins,
            index0 = binEta*m_nphibins + binPhi;
        int binEta1 = (fmod(eta + m_etarange*(1+0.5/m_netabins),2*m_etarange))/(2*m_etarange)*m_netabins, 
-     binPhi1 = (fmod(phi+TMath::TwoPi()*(1+0.5/m_nphibins),TMath::TwoPi()) / TMath::TwoPi())*m_nphibins,
+           binPhi1 = (fmod(phi+TMath::TwoPi()*(1+0.5/m_nphibins),TMath::TwoPi()) / TMath::TwoPi())*m_nphibins,
            index1 = binEta1*m_nphibins + binPhi,
            index2 = binEta *m_nphibins + binPhi1,
            index3 = binEta1*m_nphibins + binPhi1;
@@ -251,17 +244,17 @@ StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET * /* met *
       double cosphi1 = ExInMask[k1]*ET1inv;
       double sinphi1 = EyInMask[k1]*ET1inv;
       dXdEa[k1][0] = -(							\
-		       Etobs[0][0]*(covEtobsinv[0][0]*cosphi1+covEtobsinv[1][0]*sinphi1) + \
-		       Etobs[1][0]*(covEtobsinv[0][1]*cosphi1+covEtobsinv[1][1]*sinphi1) - \
-		       EtTowerTrimMean/varRhoA[k1] );
+        Etobs[0][0]*(covEtobsinv[0][0]*cosphi1+covEtobsinv[1][0]*sinphi1) + \
+        Etobs[1][0]*(covEtobsinv[0][1]*cosphi1+covEtobsinv[1][1]*sinphi1) - \
+        EtTowerTrimMean/varRhoA[k1] );
       for (int k2 = 0; k2<nummasks; k2++) {
-	double ET2inv = 1/EtInMask[k2];
-	double cosphi2 = ExInMask[k2]*ET2inv;
-	double sinphi2 = EyInMask[k2]*ET2inv;
-	dXdEab[k1][k2] = (						\
-			  cosphi1*(covEtobsinv[0][0]*cosphi2+covEtobsinv[1][0]*sinphi2) + \
-			  sinphi1*(covEtobsinv[0][1]*cosphi2+covEtobsinv[1][1]*sinphi2) );
-	if (k1 == k2) dXdEab[k1][k2] += 1/varRhoA[k1];
+      	double ET2inv = 1/EtInMask[k2];
+      	double cosphi2 = ExInMask[k2]*ET2inv;
+      	double sinphi2 = EyInMask[k2]*ET2inv;
+      	dXdEab[k1][k2] = (						\
+  			  cosphi1*(covEtobsinv[0][0]*cosphi2+covEtobsinv[1][0]*sinphi2) + \
+  			  sinphi1*(covEtobsinv[0][1]*cosphi2+covEtobsinv[1][1]*sinphi2) );
+      	if (k1 == k2) dXdEab[k1][k2] += 1/varRhoA[k1];
       }
     }
     TMatrixD covFit(dXdEab); covFit.Invert(); TMatrixD Evals(covFit*dXdEa);
@@ -285,7 +278,7 @@ StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET * /* met *
     metComp->m_sumE  = sumEEta;
     metComp->m_usedChannels += 1;
   
-    metComp = metHelper->GetComponent(TrigEFMissingEtComponent::TCPUCUnc); // fetch first auxiliary component to store uncorrected MET
+    metComp = metHelper->GetComponent(TrigEFMissingEtComponent::TCPufitUnc); // fetch first auxiliary component to store uncorrected MET
     
     metComp->m_ex = -(float) ETobscor[0][0];
     metComp->m_ey = -(float) ETobscor[1][0];  
@@ -300,12 +293,12 @@ StatusCode EFMissingETFromClustersPufitMT::update(xAOD::TrigMissingET * /* met *
      // Just store zero energies for the clusters 
      metComp->m_ex = 0.;
      metComp->m_ey = 0.;
-     metComp->m_ey = 0.;
+     metComp->m_ez = 0.;
      metComp->m_sumEt = 0.;
      metComp->m_sumE  = 0.;
      metComp->m_usedChannels += 1;
        
-     metComp = metHelper->GetComponent(TrigEFMissingEtComponent::TCPUCUnc); // fetch first auxiliary component to store uncorrected MET
+     metComp = metHelper->GetComponent(TrigEFMissingEtComponent::TCPufitUnc); // fetch first auxiliary component to store uncorrected MET
      
      metComp->m_ex = -MExEta;
      metComp->m_ey = -MEyEta;
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.h
index facd1fd051d9..7ba70385a47e 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.h
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPufitMT.h
@@ -71,7 +71,6 @@ class EFMissingETFromClustersPufitMT : public extends<AthAlgTool, IMissingETTool
     SG::ReadHandleKey<xAOD::CaloClusterContainer> m_clustersKey { this, "ClustersCollection", "CaloClusters", "Collection containg all clusters" };
 
     xAOD::CaloCluster_v1::State m_clusterstate;
-    TrigEFMissingEtComponent::Component m_metHelperComp;
 
     // pufit variables
     int    m_nphibins;
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx
index 7688d7773ee8..4e791686708c 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx
@@ -237,8 +237,8 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met ,
       copier.addHelperCompToMET(helper_i);
     }
 
-    if(save3comp && helper_i == static_cast<uint>(TrigEFMissingEtComponent::TCPUC)) { 
-      ATH_MSG_DEBUG( "Save PUC MET" );
+    if(save3comp && helper_i == static_cast<uint>(TrigEFMissingEtComponent::TCPufit)) { 
+      ATH_MSG_DEBUG( "Save TC PUFit MET" );
       copier.addHelperCompToMET(helper_i);
     }
 
@@ -303,7 +303,7 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met ,
         case TrigEFMissingEtComponent::JET:   
         case TrigEFMissingEtComponent::JETB1:   case TrigEFMissingEtComponent::JETB2:   
         case TrigEFMissingEtComponent::JETE1:   case TrigEFMissingEtComponent::JETE2:
-        case TrigEFMissingEtComponent::TCPUC: case TrigEFMissingEtComponent::TCPUCUnc:             
+        case TrigEFMissingEtComponent::TCPufit: case TrigEFMissingEtComponent::TCPufitUnc:             
           ATH_MSG_DEBUG("Topo. cluster elements or jets - do nothing.");
           break;
         case TrigEFMissingEtComponent::Muons: 
@@ -316,11 +316,11 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met ,
       }
     } else if (save3comp) {
       switch (static_cast<TrigEFMissingEtComponent::Component>(helper_i)) {
-        case TrigEFMissingEtComponent::TCPUC: 
-          ATH_MSG_DEBUG( "Corrected MET" );
+        case TrigEFMissingEtComponent::TCPufit: 
+          ATH_MSG_DEBUG( "PUFit Corrected MET" );
           copier.setMETCompFromHelper(0, helper_i);
           break;
-        case TrigEFMissingEtComponent::TCPUCUnc: 
+        case TrigEFMissingEtComponent::TCPufitUnc: 
           ATH_MSG_DEBUG( "Original MET" );
           copier.setMETCompFromHelper(1, helper_i);
           break;
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelperMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelperMT.cxx
index 1386b6e201c2..8cf513cff51a 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelperMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelperMT.cxx
@@ -245,9 +245,9 @@ StatusCode EFMissingETFromHelperMT::update(xAOD::TrigMissingET *met, TrigEFMissi
       break;
     case 3:
       ATH_MSG_DEBUG("Save pufit clusters MET");
-      copier.addHelperCompToMET(TrigEFMissingEtComponent::TCPUC);
-      copier.setMETCompFromHelper(0, TrigEFMissingEtComponent::TCPUC);
-      copier.setMETCompFromHelper(1, TrigEFMissingEtComponent::TCPUCUnc);
+      copier.addHelperCompToMET(TrigEFMissingEtComponent::TCPufit);
+      copier.setMETCompFromHelper(0, TrigEFMissingEtComponent::TCPufit);
+      copier.setMETCompFromHelper(1, TrigEFMissingEtComponent::TCPufitUnc);
       copier.setMETCompFromHelper(2, TrigEFMissingEtComponent::Muons);
 
       break;
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx
index cda3f6640d46..e2933340850c 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx
@@ -139,10 +139,10 @@ std::string TrigEFMissingEtComponent::ComponentToName(const Component c)
     case JETE2:      name="JETE2";        break;
 
     // 39    Topo. cluster Fit              
-    case TCPUC:      name="TCPUC";        break;
+    case TCPufit:    name="TCPufit";      break;
 
     // 40    Topo. cluster Fit -- uncorrected                         
-    case TCPUCUnc:   name="TCPUCUnc";     break;
+    case TCPufitUnc: name="TCPufitUnc";   break;
 
     // 41    Muons                         
     case Muons:      name="Muons";        break;
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py
index 755e6d8d3a16..747f5cb0ed6f 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py
@@ -29,13 +29,13 @@ topSequence += clusterSequence
 
 from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromClustersPufitMT, EFMissingETFromHelperMT
 
-clusterTool = EFMissingETFromClustersPufitMT( name="METFromClustersPufitTool" )
-clusterTool.ClustersCollection = clusterContainer
+clusterPufitTool = EFMissingETFromClustersPufitMT( name="METFromClustersPufitTool" )
+clusterPufitTool.ClustersCollection = clusterContainer
 
 helperTool = EFMissingETFromHelperMT("theHelperTool") 
 
 metAlg = EFMissingETAlgMT( name="EFMET" )
-metAlg.METTools=[ clusterTool, helperTool ]
+metAlg.METTools=[ clusterPufitTool, helperTool ]
 metAlg.METContainerKey = "HLT_MET_ClustersPufit"
 
 metMon = GenericMonitoringTool("METMonTool")
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met_fromClustersPufit.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/met_fromClustersPufit.ref
new file mode 100644
index 000000000000..a7d469350bd8
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met_fromClustersPufit.ref
@@ -0,0 +1,10 @@
+METHypoAlg                              0   0     DEBUG The MET value is 12
+METHypoAlg                              1   0     DEBUG The MET value is 31
+METHypoAlg                              2   0     DEBUG The MET value is 0
+METHypoAlg                              3   0     DEBUG The MET value is 0
+METHypoAlg                              4   0     DEBUG The MET value is 16
+METHypoAlg                              5   0     DEBUG The MET value is 30
+METHypoAlg                              6   0     DEBUG The MET value is 7
+METHypoAlg                              7   0     DEBUG The MET value is 0
+METHypoAlg                              8   0     DEBUG The MET value is 7
+METHypoAlg                              9   0     DEBUG The MET value is 0
-- 
GitLab


From add25c84dc5183af17bd322040c6a1d7e3b59e56 Mon Sep 17 00:00:00 2001
From: TJ Khoo <khoo@cern.ch>
Date: Thu, 10 Jan 2019 10:58:24 +0100
Subject: [PATCH 083/129] Implementing a ComponentAccumulator-based PFlow
 reconstruction config with an eye to HLT implementation

Allow disabling of some dependencies

Filling in missing parts of TopoCluster config

Make public LArHV tools private

Config module for LArHVScaleCorr

Expanding topocluster config with HV scale config

Attempt to extend PF config in directions usable at HLT

Readd calocluster building

Fix topocluster flag names

Slimming down PFHLTConfig.TrackingGeoCfg

Ugly fix for tile conditions pending better one from Walter

Fix import bugs for LArHVScaleConfig on MC, without actually making it work fully

Permit switching off most PFO moments

Remove inexplicably duplicated code in CaloCalTopoClusterConfig and fix for running on MC

Add ID and muon geo needed to get this running

Changes to make this run on MC, and produce new/old PFOs

one space indent

Remove redundant property declaration

Correction to CaloNoiseTool usage

Updating copyright years

Switching from CaloNoiseTool to CaloNoiseCondAlg

Adapting to CA changes

Update PF usage of B-field, extrapolators, other conditions

Make sure CondInputLoader runs before LArCabling alg

Supply class name for PileUpNoiseLumi
---
 .../CaloRec/python/CaloTopoClusterConfig.py   | 332 +++---------------
 .../python/CaloNoiseCondAlgConfig.py          |  24 +-
 .../LArCabling/python/LArCablingConfig.py     |   4 +-
 .../LArCalibUtils/python/LArHVScaleConfig.py  |  13 +-
 .../LArRecUtils/src/LArHVCorrTool.cxx         |   6 +-
 .../eflowRec/PFONeutralCreatorAlgorithm.h     |   8 +-
 Reconstruction/eflowRec/python/PFHLTConfig.py | 294 ++++++++++++++++
 .../src/PFCellLevelSubtractionTool.cxx        |   6 +-
 .../eflowRec/src/PFClusterSelectorTool.cxx    |  16 +-
 .../src/PFONeutralCreatorAlgorithm.cxx        | 251 ++++++-------
 .../eflowRec/src/PFTrackSelector.cxx          |  14 +-
 .../python/TileConditionsConfig.py            |  89 ++---
 12 files changed, 582 insertions(+), 475 deletions(-)
 create mode 100644 Reconstruction/eflowRec/python/PFHLTConfig.py

diff --git a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py
index dcbaa23121a6..7f7ba9fc8869 100644
--- a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py
+++ b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaCommon.SystemOfUnits import MeV
@@ -26,7 +26,7 @@ def caloTopoCoolFolderCfg(configFlags):
 
     return result
 
-def getTopoClusterLocalCalibTools(configFlags, theCaloNoiseTool):
+def getTopoClusterLocalCalibTools(configFlags):
     from CaloUtils.CaloUtilsConf import CaloLCClassificationTool, CaloLCWeightTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool
     from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterLocalCalib
     # Local cell weights
@@ -42,241 +42,6 @@ def getTopoClusterLocalCalibTools(configFlags, theCaloNoiseTool):
     LCWeight.CorrectionKey       = "H1ClusterCellWeights"
     LCWeight.SignalOverNoiseCut  = 2.0
     # *****
-    # Needs calo noise tool config
-    LCWeight.CaloNoiseTool       = theCaloNoiseTool
-    # *****
-    LCWeight.UseHadProbability   = True
-
-    LocalCalib = CaloClusterLocalCalib ("LocalCalib")
-    LocalCalib.ClusterClassificationTool     = [LCClassify]
-    LocalCalib.ClusterRecoStatus             = [1,2]
-    LocalCalib.LocalCalibTools               = [LCWeight]
-    LocalCalib.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-
-    # Out-of-cluster corrections
-    LCOut     = CaloLCOutOfClusterTool("LCOut")
-    LCOut.CorrectionKey       = "OOCCorrection"
-    LCOut.UseEmProbability    = False
-    LCOut.UseHadProbability   = True
-
-    OOCCalib   = CaloClusterLocalCalib ("OOCCalib")
-    OOCCalib.ClusterRecoStatus   = [1,2]
-    OOCCalib.LocalCalibTools     = [LCOut]
-    OOCCalib.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-
-    LCOutPi0  = CaloLCOutOfClusterTool("LCOutPi0")
-    LCOutPi0.CorrectionKey    = "OOCPi0Correction"
-    LCOutPi0.UseEmProbability  = True
-    LCOutPi0.UseHadProbability = False
-
-    OOCPi0Calib   = CaloClusterLocalCalib ("OOCPi0Calib")
-    OOCPi0Calib.ClusterRecoStatus   = [1,2]
-    OOCPi0Calib.LocalCalibTools     = [LCOutPi0]
-
-    OOCPi0Calib.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-
-    # Dead material corrections
-    LCDeadMaterial   = CaloLCDeadMaterialTool("LCDeadMaterial")
-    LCDeadMaterial.HadDMCoeffKey       = "HadDMCoeff2"
-    LCDeadMaterial.ClusterRecoStatus   = 0
-    LCDeadMaterial.WeightModeDM        = 2 
-    LCDeadMaterial.UseHadProbability   = True
-    LCDeadMaterial.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-
-    DMCalib    = CaloClusterLocalCalib ("DMCalib")
-    DMCalib.ClusterRecoStatus   = [1,2]
-    DMCalib.LocalCalibTools      = [LCDeadMaterial]
-
-    DMCalib.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-
-    lccalibtools = [
-        LocalCalib,
-        OOCCalib,
-        OOCPi0Calib,
-        DMCalib]
-    return lccalibtools
-
-def getTopoMoments(configFlags,theCaloNoiseTool):
-    from CaloRec.CaloRecConf import CaloClusterMomentsMaker
-    TopoMoments = CaloClusterMomentsMaker ("TopoMoments")
-    TopoMoments.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-    from AthenaCommon.SystemOfUnits import deg
-    TopoMoments.MaxAxisAngle = 20*deg
-    TopoMoments.CaloNoiseTool = theCaloNoiseTool
-    TopoMoments.UsePileUpNoise = True
-    TopoMoments.TwoGaussianNoise = configFlags.Calo.TopoCluster.doTwoGaussianNoise
-    TopoMoments.MinBadLArQuality = 4000
-    TopoMoments.MomentsNames = ["FIRST_PHI" 
-                                ,"FIRST_ETA"
-                                ,"SECOND_R" 
-                                ,"SECOND_LAMBDA"
-                                ,"DELTA_PHI"
-                                ,"DELTA_THETA"
-                                ,"DELTA_ALPHA" 
-                                ,"CENTER_X"
-                                ,"CENTER_Y"
-                                ,"CENTER_Z"
-                                ,"CENTER_MAG"
-                                ,"CENTER_LAMBDA"
-                                ,"LATERAL"
-                                ,"LONGITUDINAL"
-                                ,"FIRST_ENG_DENS" 
-                                ,"ENG_FRAC_EM" 
-                                ,"ENG_FRAC_MAX" 
-                                ,"ENG_FRAC_CORE" 
-                                ,"FIRST_ENG_DENS" 
-                                ,"SECOND_ENG_DENS" 
-                                ,"ISOLATION"
-                                ,"ENG_BAD_CELLS"
-                                ,"N_BAD_CELLS"
-                                ,"N_BAD_CELLS_CORR"
-                                ,"BAD_CELLS_CORR_E"
-                                ,"BADLARQ_FRAC"
-                                ,"ENG_POS"
-                                ,"SIGNIFICANCE"
-                                ,"CELL_SIGNIFICANCE"
-                                ,"CELL_SIG_SAMPLING"
-                                ,"AVG_LAR_Q"
-                                ,"AVG_TILE_Q"
-                                ,"PTD"
-                                ,"MASS"
-                                ]
-
-    # *****
-    # Is this still right?
-    # only add HV related moments if it is offline.
-    # from IOVDbSvc.CondDB import conddb
-    # if not conddb.isOnline:
-    from LArCellRec.LArCellRecConf import LArHVFraction
-    if configFlags.Input.isMC:
-        TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorr")
-    else:
-        TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorrRecomputed")
-    TopoMoments.MomentsNames += ["ENG_BAD_HV_CELLS"
-                                 ,"N_BAD_HV_CELLS"
-                                 ]
-
-    return TopoMoments
-
-# a.k.a. DigiTruth
-def getTopoTruthMoments(configFlags,theCaloNoiseTool):
-    from CaloRec.CaloRecConf import CaloClusterMomentsMaker
-    TopoMoments_Truth = CaloClusterMomentsMaker_DigiHSTruth ("TopoMoments_Truth")
-    from LArCellRec.LArCellRecConf import LArHVFraction
-    TopoMoments_Truth.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorr")
-    TopoMoments_Truth.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-    from AthenaCommon.SystemOfUnits import deg
-    TopoMoments_Truth.MaxAxisAngle = 20*deg
-    TopoMoments_Truth.CaloNoiseTool = theCaloNoiseTool
-    TopoMoments_Truth.UsePileUpNoise = True
-    TopoMoments_Truth.TwoGaussianNoise = configFlags.Calo,TopoCluster.doTwoGaussianNoise
-    TopoMoments_Truth.MinBadLArQuality = 4000
-    TopoMoments_Truth.MomentsNames = ["FIRST_PHI_DigiHSTruth"
-                                      ,"FIRST_ETA_DigiHSTruth"
-                                      ,"SECOND_R_DigiHSTruth"
-                                      ,"SECOND_LAMBDA_DigiHSTruth"
-                                      ,"DELTA_PHI_DigiHSTruth"
-                                      ,"DELTA_THETA_DigiHSTruth"
-                                      ,"DELTA_ALPHA_DigiHSTruth"
-                                      ,"CENTER_X_DigiHSTruth"
-                                      ,"CENTER_Y_DigiHSTruth"
-                                      ,"CENTER_Z_DigiHSTruth"
-                                      ,"CENTER_MAG_DigiHSTruth"
-                                      ,"CENTER_LAMBDA_DigiHSTruth"
-                                      ,"LATERAL_DigiHSTruth"
-                                      ,"LONGITUDINAL_DigiHSTruth"
-                                      ,"ENG_FRAC_CORE_DigiHSTruth"
-                                      ,"FIRST_ENG_DENS_DigiHSTruth"
-                                      ,"SECOND_ENG_DENS_DigiHSTruth"
-                                      ,"ISOLATION_DigiHSTruth"
-                                      ,"BAD_CELLS_CORR_E_DigiHSTruth"
-                                      ,"ENG_POS_DigiHSTruth"
-                                      ,"SIGNIFICANCE_DigiHSTruth"
-                                      ,"CELL_SIGNIFICANCE_DigiHSTruth"
-                                      ,"CELL_SIG_SAMPLING_DigiHSTruth"
-                                      ,"AVG_LAR_Q_DigiHSTruth"
-                                      ,"AVG_TILE_Q_DigiHSTruth"
-                                      ,"ENERGY_DigiHSTruth"
-                                      ,"PHI_DigiHSTruth"
-                                      ,"ETA_DigiHSTruth"
-                                      ]
-    return TopoMoments_Truth
-
-def getTopoCalibMoments(configFlags):
-    from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterMomentsMaker2
-    TopoCalibMoments = CaloCalibClusterMomentsMaker2 ("TopoCalibMoments")
-    TopoCalibMoments.MomentsNames = ["ENG_CALIB_TOT"
-                                     ,"ENG_CALIB_OUT_L"
-                                     #,"ENG_CALIB_OUT_M"
-                                     # ,"ENG_CALIB_OUT_T"
-                                     # ,"ENG_CALIB_DEAD_L"
-                                     # ,"ENG_CALIB_DEAD_M"
-                                     # ,"ENG_CALIB_DEAD_T"
-                                     ,"ENG_CALIB_EMB0"
-                                     ,"ENG_CALIB_EME0"
-                                     ,"ENG_CALIB_TILEG3"
-                                     ,"ENG_CALIB_DEAD_TOT"
-                                     ,"ENG_CALIB_DEAD_EMB0"
-                                     ,"ENG_CALIB_DEAD_TILE0"
-                                     ,"ENG_CALIB_DEAD_TILEG3"
-                                     ,"ENG_CALIB_DEAD_EME0"
-                                     ,"ENG_CALIB_DEAD_HEC0"
-                                     ,"ENG_CALIB_DEAD_FCAL"
-                                     ,"ENG_CALIB_DEAD_LEAKAGE"
-                                     ,"ENG_CALIB_DEAD_UNCLASS"
-                                     ,"ENG_CALIB_FRAC_EM"
-                                     ,"ENG_CALIB_FRAC_HAD"
-                                     ,"ENG_CALIB_FRAC_REST"]
-    
-    TopoCalibMoments.CalibrationHitContainerNames = ["LArCalibrationHitInactive"
-                                                     ,"LArCalibrationHitActive"
-                                                     ,"TileCalibHitActiveCell"
-                                                     ,"TileCalibHitInactiveCell"]
-    TopoCalibMoments.DMCalibrationHitContainerNames = ["LArCalibrationHitDeadMaterial"
-                                                       ,"TileCalibHitDeadMaterial"]
-    return TopoCalibMOments
-
-def caloTopoCoolFolderCfg(configFlags):
-    result=ComponentAccumulator()
-    from IOVDbSvc.IOVDbSvcConfig import addFolders
-    # rely on global tag for both MC and data; do not specify folder tags
-    # use CALO_OFL only for GEO>=18
-    hadCalibFolders = [
-        "HadCalibration2/CaloEMFrac",
-        "HadCalibration2/H1ClusterCellWeights",
-        "HadCalibration2/CaloOutOfCluster",
-        "HadCalibration2/CaloOutOfClusterPi0",
-        "HadCalibration2/CaloDMCorr2"
-        ]
-    hadCalibPrefix = "/CALO/"
-    hadCalibDB = "CALO_ONL"
-    if configFlags.Input.isMC:
-        hadCalibPrefix = "/CALO/Ofl/"
-        hadCalibDB = "CALO_OFL"
-    hadCalibFolders = [ hadCalibPrefix + foldername for foldername in hadCalibFolders ]
-    result.merge(addFolders(configFlags, hadCalibFolders, hadCalibDB, className="CaloLocalHadCoeff"))
-
-    return result
-
-def getTopoClusterLocalCalibTools(configFlags, theCaloNoiseTool):
-    from CaloUtils.CaloUtilsConf import CaloLCClassificationTool, CaloLCWeightTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool
-    from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterLocalCalib
-    # Local cell weights
-    LCClassify   = CaloLCClassificationTool("LCClassify")
-    LCClassify.ClassificationKey   = "EMFracClassify"
-    LCClassify.UseSpread = False
-    LCClassify.MaxProbability = 0.5
-    # add the moments EM_PROBABILITY, HAD_WEIGHT, OOC_WEIGHT, DM_WEIGHT to the AOD:
-    LCClassify.StoreClassificationProbabilityInAOD = True
-    LCClassify.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
-
-    LCWeight = CaloLCWeightTool("LCWeight")
-    LCWeight.CorrectionKey       = "H1ClusterCellWeights"
-    LCWeight.SignalOverNoiseCut  = 2.0
-    # *****
-    # Needs calo noise tool config
-    LCWeight.CaloNoiseTool       = theCaloNoiseTool
-    # *****
     LCWeight.UseHadProbability   = True
 
     LocalCalib = CaloClusterLocalCalib ("LocalCalib")
@@ -328,14 +93,12 @@ def getTopoClusterLocalCalibTools(configFlags, theCaloNoiseTool):
         DMCalib]
     return lccalibtools
 
-def getTopoMoments(configFlags,theCaloNoiseTool):
+def getTopoMoments(configFlags):
     from CaloRec.CaloRecConf import CaloClusterMomentsMaker
     TopoMoments = CaloClusterMomentsMaker ("TopoMoments")
     TopoMoments.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
     from AthenaCommon.SystemOfUnits import deg
     TopoMoments.MaxAxisAngle = 20*deg
-    TopoMoments.CaloNoiseTool = theCaloNoiseTool
-    TopoMoments.UsePileUpNoise = True
     TopoMoments.TwoGaussianNoise = configFlags.Calo.TopoCluster.doTwoGaussianNoise
     TopoMoments.MinBadLArQuality = 4000
     TopoMoments.MomentsNames = ["FIRST_PHI" 
@@ -374,24 +137,26 @@ def getTopoMoments(configFlags,theCaloNoiseTool):
                                 ,"MASS"
                                 ]
 
-    # *****
-    # Is this still right?
-    # only add HV related moments if it is offline.
-    # from IOVDbSvc.CondDB import conddb
-    # if not conddb.isOnline:
-    from LArCellRec.LArCellRecConf import LArHVFraction
-    if configFlags.Input.isMC:
-        TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorr")
-    else:
-        TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorrRecomputed")
-    TopoMoments.MomentsNames += ["ENG_BAD_HV_CELLS"
-                                 ,"N_BAD_HV_CELLS"
-                                 ]
+    # Disable for now, as broken on MC
+    if False:
+        # *****
+        # Is this still right?
+        # only add HV related moments if it is offline.
+        # from IOVDbSvc.CondDB import conddb
+        # if not conddb.isOnline:
+        from LArCellRec.LArCellRecConf import LArHVFraction
+        if configFlags.Input.isMC:
+            TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorr")
+        else:
+            TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorrRecomputed")
+        TopoMoments.MomentsNames += ["ENG_BAD_HV_CELLS"
+                                     ,"N_BAD_HV_CELLS"
+                                     ]
 
     return TopoMoments
 
 # a.k.a. DigiTruth
-def getTopoTruthMoments(configFlags,theCaloNoiseTool):
+def getTopoTruthMoments(configFlags):
     from CaloRec.CaloRecConf import CaloClusterMomentsMaker
     TopoMoments_Truth = CaloClusterMomentsMaker_DigiHSTruth ("TopoMoments_Truth")
     from LArCellRec.LArCellRecConf import LArHVFraction
@@ -399,8 +164,6 @@ def getTopoTruthMoments(configFlags,theCaloNoiseTool):
     TopoMoments_Truth.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
     from AthenaCommon.SystemOfUnits import deg
     TopoMoments_Truth.MaxAxisAngle = 20*deg
-    TopoMoments_Truth.CaloNoiseTool = theCaloNoiseTool
-    TopoMoments_Truth.UsePileUpNoise = True
     TopoMoments_Truth.TwoGaussianNoise = configFlags.Calo,TopoCluster.doTwoGaussianNoise
     TopoMoments_Truth.MinBadLArQuality = 4000
     TopoMoments_Truth.MomentsNames = ["FIRST_PHI_DigiHSTruth"
@@ -466,14 +229,18 @@ def getTopoCalibMoments(configFlags):
                                                      ,"TileCalibHitInactiveCell"]
     TopoCalibMoments.DMCalibrationHitContainerNames = ["LArCalibrationHitDeadMaterial"
                                                        ,"TileCalibHitDeadMaterial"]
-    return TopoCalibMOments
+    return TopoCalibMoments
 
 def CaloTopoClusterCfg(configFlags):
     result=ComponentAccumulator()
     
     from LArGeoAlgsNV.LArGMConfig import LArGMCfg
     from TileGeoModel.TileGMConfig import TileGMCfg
-    from CaloTools.CaloNoiseToolConfig import CaloNoiseToolCfg
+    from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
+    # Schedule total noise cond alg
+    result.merge(CaloNoiseCondAlgCfg(configFlags,"totalNoise"))
+    # Schedule electronic noise cond alg (needed for LC weights)
+    result.merge(CaloNoiseCondAlgCfg(configFlags,"electronicNoise"))
     
     #from CaloUtils.CaloUtilsConf import CaloLCClassificationTool, CaloLCWeightTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool
 
@@ -492,12 +259,7 @@ def CaloTopoClusterCfg(configFlags):
     from TileConditions.TileConditionsConfig import tileCondCfg
     result.merge(tileCondCfg(configFlags))
 
-    #Get CaloNoiseTool
-    acc=CaloNoiseToolCfg(configFlags)
-    theCaloNoiseTool=acc.getPublicTool("CaloNoiseTool")
-    result.merge(acc)
-    
-    theCaloClusterSnapshot=CaloClusterSnapshot(OutputName="CaloTopoCluster",SetCrossLinks=True)
+    theCaloClusterSnapshot=CaloClusterSnapshot(OutputName="CaloTopoClusters",SetCrossLinks=True)
 
     # maker tools
     TopoMaker = CaloTopoClusterMaker("TopoMaker")
@@ -516,9 +278,6 @@ def CaloTopoClusterCfg(configFlags):
                                    "TileExt0", "TileExt1", "TileExt2",
                                    "TileGap1", "TileGap2", "TileGap3",
                                    "FCAL0", "FCAL1", "FCAL2"] 
-    TopoMaker.CaloNoiseTool=theCaloNoiseTool
-    TopoMaker.UseCaloNoiseTool=True
-    TopoMaker.UsePileUpNoise=True
     TopoMaker.NeighborOption = "super3D"
     TopoMaker.RestrictHECIWandFCalNeighbors  = False
     TopoMaker.RestrictPSNeighbors  = True
@@ -567,9 +326,7 @@ def CaloTopoClusterCfg(configFlags):
         
 
     CaloTopoCluster=CaloClusterMaker("CaloTopoCluster")
-    CaloTopoCluster.ClustersOutputName="CaloTopoClusters"
-    if configFlags.Calo.TopoCluster.doTopoClusterLocalCalib:
-        CaloTopoCluster.ClustersOutputName="CaloCalTopoClusters"
+    CaloTopoCluster.ClustersOutputName="CaloTopoCluster"
 
     CaloTopoCluster.ClusterMakerTools = [TopoMaker, TopoSplitter]
     
@@ -577,17 +334,20 @@ def CaloTopoClusterCfg(configFlags):
     BadChannelListCorr = CaloClusterBadChannelListCorr()
     CaloTopoCluster.ClusterCorrectionTools += [BadChannelListCorr]
 
-    CaloTopoCluster.ClusterCorrectionTools += [getTopoMoments(configFlags,theCaloNoiseTool)]
+    CaloTopoCluster.ClusterCorrectionTools += [getTopoMoments(configFlags)]
 
     CaloTopoCluster.ClusterCorrectionTools += [theCaloClusterSnapshot]
 
     if configFlags.Calo.TopoCluster.doTopoClusterLocalCalib:
         CaloTopoCluster.ClustersOutputName="CaloCalTopoClusters"
-        CaloTopoCluster.ClusterCorrectionTools += getTopoClusterLocalCalibTools(configFlags,theCaloNoiseTool)
+        CaloTopoCluster.ClusterCorrectionTools += getTopoClusterLocalCalibTools(configFlags)
 
-        result.merge(caloTopoCoolFolderCfg(configFlags))
+        # Needed?
+        from CaloRec import CaloClusterTopoCoolFolder
 
-    return result,CaloTopoCluster
+    result.addEventAlgo(CaloTopoCluster,primary=True)
+
+    return result
 
 
 
@@ -602,17 +362,9 @@ if __name__=="__main__":
 
     #log.setLevel(DEBUG)
 
-    nThreads=1
-    ConfigFlags.Concurrency.NumThreads = nThreads
-    if nThreads>0:
-        ConfigFlags.Scheduler.ShowDataDeps = True
-        ConfigFlags.Scheduler.ShowDataFlow = True
-        ConfigFlags.Scheduler.ShowControlFlow = True
-        ConfigFlags.Concurrency.NumConcurrentEvents = nThreads
-
-    #ConfigFlags.Input.isMC = False
-    ConfigFlags.Input.Files = ConfigFlags.Input.Files = defaultTestFiles.ESD
-    ConfigFlags.Output.ESDFileName= "esdOut.pool.root"
+    ConfigFlags.Input.Files = ["myESD-data.pool.root"]
+    ConfigFlags.Output.ESDFileName="esdOut.pool.root"
+
     ConfigFlags.lock()
 
     from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg 
@@ -620,19 +372,21 @@ if __name__=="__main__":
 
     cfg=MainServicesThreadedCfg(ConfigFlags)
     cfg.merge(PoolReadCfg(ConfigFlags))
+    # from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg
+    # cfg.mergeAll(IOVDbSvcCfg(ConfigFlags))
     
     theKey="CaloCalTopoClustersNew"
 
-    topoAcc,topoAlg=CaloTopoClusterCfg(ConfigFlags)
+    topoAcc=CaloTopoClusterCfg(ConfigFlags)
+    topoAlg = topoAcc.getPrimary()
     topoAlg.ClustersOutputName=theKey
     
     cfg.merge(topoAcc)
-    cfg.addEventAlgo(topoAlg,sequenceName="AthAlgSeq")
 
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
     cfg.merge(OutputStreamCfg(ConfigFlags,"xAOD", ItemList=["xAOD::CaloClusterContainer#CaloCalTopoClusters*",#+theKey,
-                                                           "xAOD::CaloClusterAuxContainer#*CaloCalTopoClusters*Aux.",#+theKey+"Aux.",
-                                                           # "CaloClusterCellLinkContainer#"+theKey+"_links"
+                                                            "xAOD::CaloClusterAuxContainer#*CaloCalTopoClusters*Aux.",#+theKey+"Aux.",
+                                                            # "CaloClusterCellLinkContainer#"+theKey+"_links"
                                                            ]))
     cfg.getEventAlgo("OutputStreamxAOD").ForceRead=True
 
diff --git a/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py b/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
index 269ebc24ced6..36d5d625d666 100644
--- a/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
+++ b/Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
@@ -22,7 +22,7 @@ def CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"):
     #CaloNoiseCondAlg needs Identifiers ... 
     from AtlasGeoModel.GeoModelConfig import GeoModelCfg
     gms=GeoModelCfg(configFlags)
-    result.merge(gms[0])
+    result.merge(gms)
 
     #... and cabling:
     from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
@@ -43,7 +43,7 @@ def CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"):
         else:
             if useCaloLumi:
                 lumiFolder='/CALO/Noise/PileUpNoiseLumi'
-                result.merge(addFolders(configFlags,lumiFolder,'CALO'))
+                result.merge(addFolders(configFlags,lumiFolder,'CALO',className="CondAttrListCollection"))
                 theCaloNoiseAlg.LumiFolder = lumiFolder
                 theCaloNoiseAlg.Luminosity = -1.
                 log.info("online mode: use luminosity from /CALO/Noise/PileUpNoiseLumi to scale pileup noise")
@@ -63,7 +63,7 @@ def CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"):
         else:
             if useCaloLumi:
                 lumiFolder='/CALO/Ofl/Noise/PileUpNoiseLumi'
-                result.merge(addFolders(configFlags,lumiFolder,'CALO_OFL'))
+                result.merge(addFolders(configFlags,lumiFolder,'CALO_OFL',className="CondAttrListCollection"))
                 log.info("offline mode: use luminosity from /CALO/Ofl/Noise/PileuUpNoiseLumi to scale pileup noise")
                 theCaloNoiseAlg.LumiFolder = lumiFolder
                 theCaloNoiseAlg.Luminosity=-1.
@@ -89,11 +89,11 @@ def CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"):
             theCaloNoiseAlg.Luminosity = -1
             if useCaloLumi:
                 lumiFolder='/CALO/Ofl/Noise/PileUpNoiseLumi'
-                result.merge(addFolders(configFlags,lumiFolder,'CALO_OFL'))
+                result.merge(addFolders(configFlags,lumiFolder,'CALO_OFL',className="CondAttrListCollection"))
                 log.info("offline mode: use luminosity from /CALO/Ofl/Noise/PileUpNoiseLumi to scale pileup noise")
             else:
                 lumiFolder = '/TRIGGER/LUMI/LBLESTONL'
-                result.merge(addFolders(configFlags,lumiFolder,'TRIGGER_ONL'))
+                result.merge(addFolders(configFlags,lumiFolder,'TRIGGER_ONL',className="CondAttrListCollection"))
                 log.info("offline mode: use luminosity = f(Lumiblock) to scale pileup noise")
             theCaloNoiseAlg.LumiFolder = lumiFolder
 
@@ -138,12 +138,16 @@ if __name__ == "__main__":
     ConfigFlags.Input.Files = defaultTestFiles.ESD
     ConfigFlags.lock()
 
-    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg 
+    acc=MainServicesThreadedCfg(ConfigFlags)
+#    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
     from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
-    acc=PoolReadCfg(ConfigFlags)
+    acc.merge(PoolReadCfg(ConfigFlags))
 
     acc.merge(CaloNoiseCondAlgCfg(ConfigFlags))
 
-    f=open('test.pkl','w')
-    acc.store(f)
-    f.close()
+    acc.run(10)
+
+    #f=open('test.pkl','w')
+    #acc.store(f)
+    #f.close()
diff --git a/LArCalorimeter/LArCabling/python/LArCablingConfig.py b/LArCalorimeter/LArCabling/python/LArCablingConfig.py
index da0009b95eac..62cbaf194973 100644
--- a/LArCalorimeter/LArCabling/python/LArCablingConfig.py
+++ b/LArCalorimeter/LArCabling/python/LArCablingConfig.py
@@ -1,12 +1,14 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from IOVDbSvc.IOVDbSvcConfig import addFolders
+from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg,addFolders
 from LArRecUtils.LArRecUtilsConf import LArOnOffMappingAlg, LArFebRodMappingAlg, LArCalibLineMappingAlg
 
 def _larCablingCfg(configFlags,algo,folder):
     result=ComponentAccumulator()
 
+    result.merge(IOVDbSvcCfg(configFlags))
+
     #MC folder-tag hack (See also ATCONDDB-49)
     tagsperFolder={"/LAR/Identifier/OnOffIdMap":"LARIdentifierOnOffIdMap-012",
                    "/LAR/Identifier/FebRodMap":"LARIdentifierFebRodMap-005",
diff --git a/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py b/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py
index 8dbcce76d5ac..5b5387a77796 100644
--- a/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py
+++ b/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py
@@ -1,13 +1,22 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from IOVDbSvc.IOVDbSvcConfig import addFolders
 
 def LArHVScaleCfg(configFlags):
     result=ComponentAccumulator()
 
+    from IOVDbSvc.IOVDbSvcConfig import addFolders, IOVDbSvcCfg
+    result.merge(IOVDbSvcCfg(configFlags))
+
     if configFlags.Input.isMC:
-        result.merge(addFolders(configFlags,["/LAR/IdentifierOfl/HVLineToElectrodeMap<tag>LARHVLineToElectrodeMap-001</tag>"], "LAR_OFL", className="AthenaAttributeList"))
+        result.merge(addFolders(configFlags,["/LAR/Identifier/HVLineToElectrodeMap<tag>LARHVLineToElectrodeMap-001</tag>"], "LAR_OFL", className="AthenaAttributeList"))
+
+        from LArRecUtils.LArRecUtilsConf import LArHVIdMappingAlg
+        hvmapalg = LArHVIdMappingAlg(ReadKey="/LAR/Identifier/HVLineToElectrodeMap",WriteKey="LArHVIdMap")
+        result.addCondAlgo(hvmapalg)
+
+        # result.merge(addFolders(configFlags,["/LAR/ElecCalibMC/HVScaleCorr"],"LAR_OFL", className="AthenaAttributeList"))
+
 
     elif not configFlags.Common.isOnline:
         result.merge(addFolders(configFlags,["/LAR/DCS/HV/BARREl/I16"], "DCS_OFL", className="CondAttrListCollection"))
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
index 7e7a8c48d5f1..3f6fcca977c7 100644
--- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
@@ -28,11 +28,11 @@ LArHVCorrTool::LArHVCorrTool(const std::string& type,
 			     const IInterface* parent) 
   : 
     AthAlgTool(type, name, parent),
-    m_lar_on_id(nullptr), 	    
-    m_calocell_id(nullptr),	
+    m_lar_on_id(nullptr),
+    m_calocell_id(nullptr),
     m_larem_id(nullptr),
     m_larhec_id(nullptr),
-    m_larfcal_id(nullptr),	
+    m_larfcal_id(nullptr),
     m_electrodeID(nullptr),
     m_cablingService("LArCablingLegacyService"),
     m_hvtool("LArHVToolMC",this)
diff --git a/Reconstruction/eflowRec/eflowRec/PFONeutralCreatorAlgorithm.h b/Reconstruction/eflowRec/eflowRec/PFONeutralCreatorAlgorithm.h
index d5787f3318a7..3abb57c0e746 100644
--- a/Reconstruction/eflowRec/eflowRec/PFONeutralCreatorAlgorithm.h
+++ b/Reconstruction/eflowRec/eflowRec/PFONeutralCreatorAlgorithm.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 #ifndef PFONEUTRALCREATORALGORITHM_H
 #define PFONEUTRALCREATORALGORITHM_H
@@ -29,8 +29,9 @@ public:
   StatusCode finalize();
 
 private:
+
   /** Create the chargedneutral PFO */ 
-  void createNeutralPFO(const eflowCaloObject& energyFlowCaloObject,SG::WriteHandle<xAOD::PFOContainer>& neutralPFOContainerWriteHandle, SG::WriteHandle<xAOD::PFOContainer>& neutralPFOContainerWriteHandle_nonModified);
+  void createNeutralPFO(const eflowCaloObject& energyFlowCaloObject,SG::WriteHandle<xAOD::PFOContainer>& neutralPFOContainerWriteHandle, SG::WriteHandle<xAOD::PFOContainer>* neutralPFOContainerWriteHandle_nonModified);
 
   /** Function to add cluster moments onto PFO */
   void addMoment(const xAOD::CaloCluster::MomentType& momentType, const xAOD::PFODetails::PFOAttributes& pfoAttribute, const xAOD::CaloCluster& theCluster, xAOD::PFO& thePFO);
@@ -41,6 +42,9 @@ private:
   /** Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input */
   Gaudi::Property<bool> m_LCMode{this,"LCMode",false,"Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input"};
 
+  /** Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input */
+  Gaudi::Property<bool> m_doClusterMoments{this,"DoClusterMoments",true,"Bool to toggle whether cluster moments are added to the PFOs"};
+
   /** Toggle usage of calibration hit truth - false by default */
   Gaudi::Property<bool> m_useCalibHitTruth{this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"};
 
diff --git a/Reconstruction/eflowRec/python/PFHLTConfig.py b/Reconstruction/eflowRec/python/PFHLTConfig.py
new file mode 100644
index 000000000000..2abdde629765
--- /dev/null
+++ b/Reconstruction/eflowRec/python/PFHLTConfig.py
@@ -0,0 +1,294 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+
+
+#---------------------------------------------------------------------------------#
+# Tracking geometry & conditions
+def TrackingGeoCfg(inputFlags):
+    result = ComponentAccumulator()
+
+    from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
+    result.merge(InDetGeometryCfg(inputFlags))
+
+    # Something builds muon stations -- extrapolator?
+    from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
+    result.merge(MuonGeoModelCfg(inputFlags))
+
+    from TrkDetDescrSvc.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
+    acc, geom_svc = TrackingGeometrySvcCfg(inputFlags)
+    result.merge(acc)
+
+    from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
+    result.merge(MagneticFieldSvcCfg(inputFlags))
+
+    return result
+
+#---------------------------------------------------------------------------------#
+# Calo geometry & conditions
+def CaloGeoAndNoiseCfg(inputFlags):
+    result = ComponentAccumulator()
+    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
+    from TileGeoModel.TileGMConfig import TileGMCfg
+
+    result.merge(LArGMCfg(inputFlags))
+    result.merge(TileGMCfg(inputFlags))
+
+    from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
+    # Schedule total noise cond alg
+    result.merge(CaloNoiseCondAlgCfg(inputFlags,"totalNoise"))
+
+    return result
+
+#---------------------------------------------------------------------------------#
+# PFlow track selection
+def getPFTrackSelector(inputFlags,tracksin,verticesin):
+
+    from TrkExTools.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
+    extrapcfg = AtlasExtrapolatorCfg(inputFlags)
+    extrapolator = extrapcfg.popPrivateTools()
+
+    from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
+    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator=extrapolator)
+
+    from eflowRec.eflowRecConf import eflowTrackCaloExtensionTool
+    TrackCaloExtensionTool=eflowTrackCaloExtensionTool(TrackCaloExtensionTool=pcExtensionTool)
+
+    from eflowRec.eflowRecConf import PFTrackSelector
+    PFTrackSelector=PFTrackSelector("PFTrackSelector_HLT")
+    PFTrackSelector.electronsName = ""
+    PFTrackSelector.muonsName = ""
+    PFTrackSelector.tracksName = tracksin
+    PFTrackSelector.VertexContainer = verticesin
+    PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
+
+    from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
+    TrackSelectionTool = InDet__InDetTrackSelectionTool("PFTrackSelectionTool")
+
+    TrackSelectionTool.CutLevel = "TightPrimary"
+    TrackSelectionTool.minPt = 500.0 
+    
+    PFTrackSelector.trackSelectionTool = TrackSelectionTool
+    
+    return PFTrackSelector
+
+def getPFClusterSelectorTool(clustersin,calclustersin):
+
+    from eflowRec.eflowRecConf import PFClusterSelectorTool
+    PFClusterSelectorTool = PFClusterSelectorTool("PFClusterSelectorTool")
+    PFClusterSelectorTool.clustersName = clustersin
+    PFClusterSelectorTool.calClustersName = calclustersin
+
+    return PFClusterSelectorTool
+
+def getPFCellLevelSelectionTool():
+
+    from eflowRec.eflowRecConf import PFCellLevelSubtractionTool
+    PFCellLevelSubtractionTool = PFCellLevelSubtractionTool("PFCellLevelSubtractionTool")
+
+    from eflowRec.eflowRecConf import eflowCellEOverPTool_mc12_JetETMiss
+
+    PFCellLevelSubtractionTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_JetETMiss()
+    PFCellLevelSubtractionTool.nMatchesInCellLevelSubtraction = 1
+
+    from eflowRec.eflowRecConf import PFTrackClusterMatchingTool
+    MatchingTool = PFTrackClusterMatchingTool("CalObjBldMatchingTool")
+    MatchingTool.OutputLevel=1
+    MatchingTool_Pull_02 = PFTrackClusterMatchingTool("MatchingTool_Pull_02")
+    MatchingTool_Pull_02.OutputLevel=1
+    MatchingTool_Pull_015 = PFTrackClusterMatchingTool("MatchingTool_Pull_015")
+    MatchingTool_Pull_015.OutputLevel=1
+
+    MatchingTool_Pull_015.TrackPositionType   = 'EM2EtaPhi' # str
+    MatchingTool_Pull_015.ClusterPositionType = 'PlainEtaPhi' # str
+    MatchingTool_Pull_015.DistanceType        = 'EtaPhiSquareDistance' # str
+    MatchingTool_Pull_015.MatchCut = 0.15*0.15 # float
+    PFCellLevelSubtractionTool.PFTrackClusterMatchingTool_015 = MatchingTool_Pull_015
+
+    MatchingTool_Pull_02.TrackPositionType   = 'EM2EtaPhi' # str
+    MatchingTool_Pull_02.ClusterPositionType = 'PlainEtaPhi' # str
+    MatchingTool_Pull_02.DistanceType        = 'EtaPhiSquareDistance' # str
+    MatchingTool_Pull_02.MatchCut = 0.2*0.2 # float
+    PFCellLevelSubtractionTool.PFTrackClusterMatchingTool_02 = MatchingTool_Pull_02
+
+    PFCellLevelSubtractionTool.PFTrackClusterMatchingTool = MatchingTool
+
+    return PFCellLevelSubtractionTool
+
+def getPFRecoverSplitShowersTool():
+    from eflowRec.eflowRecConf import PFRecoverSplitShowersTool
+    PFRecoverSplitShowersTool = PFRecoverSplitShowersTool("PFRecoverSplitShowersTool")
+
+    from eflowRec.eflowRecConf import eflowCellEOverPTool_mc12_JetETMiss
+    PFRecoverSplitShowersTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_JetETMiss("eflowCellEOverPTool_mc12_JetETMiss_Recover")
+    PFRecoverSplitShowersTool.useUpdated2015ChargedShowerSubtraction = False
+
+    from eflowRec.eflowRecConf import PFTrackClusterMatchingTool
+    MatchingTool_Recover = PFTrackClusterMatchingTool()
+    MatchingTool_Recover.TrackPositionType   = 'EM2EtaPhi' # str
+    MatchingTool_Recover.ClusterPositionType = 'PlainEtaPhi' # str
+    MatchingTool_Recover.DistanceType        = 'EtaPhiSquareDistance' # str
+    MatchingTool_Recover.MatchCut = 0.2*0.2 # float
+    PFRecoverSplitShowersTool.PFTrackClusterMatchingTool = MatchingTool_Recover
+
+    return PFRecoverSplitShowersTool
+
+def getPFMomentCalculatorTool():
+
+    from eflowRec.eflowRecConf import PFMomentCalculatorTool
+    PFMomentCalculatorTool = PFMomentCalculatorTool("PFMomentCalculatorTool")
+
+    from CaloRec.CaloRecConf import CaloClusterMomentsMaker
+    PFClusterMomentsMaker = CaloClusterMomentsMaker("PFClusterMomentsMaker")
+
+    from AthenaCommon.SystemOfUnits import deg
+    PFClusterMomentsMaker.MaxAxisAngle = 20*deg
+    PFClusterMomentsMaker.WeightingOfNegClusters = False
+    PFClusterMomentsMaker.MinBadLArQuality = 4000
+    PFClusterMomentsMaker.TwoGaussianNoise = True
+    PFClusterMomentsMaker.MomentsNames = [
+       "FIRST_PHI" 
+       ,"FIRST_ETA"
+       ,"SECOND_R" 
+       ,"SECOND_LAMBDA"
+       ,"DELTA_PHI"
+       ,"DELTA_THETA"
+       ,"DELTA_ALPHA" 
+       ,"CENTER_X"
+       ,"CENTER_Y"
+       ,"CENTER_Z"
+       ,"CENTER_MAG"
+       ,"CENTER_LAMBDA"
+       ,"LATERAL"
+       ,"LONGITUDINAL"
+       ,"FIRST_ENG_DENS" 
+       ,"ENG_FRAC_EM" 
+       ,"ENG_FRAC_MAX" 
+       ,"ENG_FRAC_CORE" 
+       ,"FIRST_ENG_DENS" 
+       ,"SECOND_ENG_DENS"
+       ,"ISOLATION"
+       ,"EM_PROBABILITY"
+       ,"ENG_POS"
+       ,"ENG_BAD_CELLS"
+       ,"N_BAD_CELLS"
+       ,"BADLARQ_FRAC"
+       ,"AVG_LAR_Q"
+       ,"AVG_TILE_Q"
+       ,"SIGNIFICANCE"
+    ]
+
+    PFMomentCalculatorTool.CaloClusterMomentsMaker = PFClusterMomentsMaker
+
+    from eflowRec.eflowRecConf import PFClusterCollectionTool
+    PFClusterCollectionTool_default = PFClusterCollectionTool("PFClusterCollectionTool")
+
+    PFMomentCalculatorTool.PFClusterCollectionTool = PFClusterCollectionTool_default
+
+    return PFMomentCalculatorTool
+
+def PFCfg(inputFlags):
+
+    result=ComponentAccumulator()
+
+    result.merge(TrackingGeoCfg(inputFlags))
+    calogeocfg = CaloGeoAndNoiseCfg(inputFlags)
+    result.merge(calogeocfg)
+
+    result.addEventAlgo( getPFTrackSelector(inputFlags,
+                                            inputFlags.eflowRec.TrackColl,
+                                            inputFlags.eflowRec.VertexColl) )
+
+    #---------------------------------------------------------------------------------#
+    # PFlowAlgorithm -- subtraction steps
+
+    from eflowRec.eflowRecConf import PFAlgorithm
+    PFAlgorithm = PFAlgorithm("PFAlgorithm_HLT")
+    PFAlgorithm.PFClusterSelectorTool = getPFClusterSelectorTool(inputFlags.eflowRec.RawClusterColl,
+                                                                 inputFlags.eflowRec.CalClusterColl)
+
+    PFAlgorithm.SubtractionToolList = [
+        getPFCellLevelSelectionTool(),
+        getPFRecoverSplitShowersTool(),
+        ]
+
+    pfmoments = getPFMomentCalculatorTool()
+    if not inputFlags.eflowRec.DoClusterMoments:
+        pfmoments.CaloClusterMomentsMaker.MomentsNames = ["CENTER_MAG"]
+    PFAlgorithm.BaseToolList = [pfmoments]
+
+    result.addEventAlgo(PFAlgorithm)
+
+    #---------------------------------------------------------------------------------#
+    # PFO creators here
+
+    from eflowRec.eflowRecConf import PFOChargedCreatorAlgorithm
+    PFOChargedCreatorAlgorithm = PFOChargedCreatorAlgorithm("PFOChargedCreatorAlgorithm")
+    PFOChargedCreatorAlgorithm.PFOOutputName="HLTChargedParticleFlowObjects"
+
+    result.addEventAlgo( PFOChargedCreatorAlgorithm )
+
+    from eflowRec.eflowRecConf import PFONeutralCreatorAlgorithm
+    PFONeutralCreatorAlgorithm =  PFONeutralCreatorAlgorithm("PFONeutralCreatorAlgorithm")
+    PFONeutralCreatorAlgorithm.PFOOutputName="HLTNeutralParticleFlowObjects"
+    PFONeutralCreatorAlgorithm.DoClusterMoments=inputFlags.eflowRec.DoClusterMoments
+
+    result.addEventAlgo( PFONeutralCreatorAlgorithm )
+
+    return result
+
+if __name__=="__main__":
+
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior = True
+    
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags as cfgFlags
+
+    #cfgFlags.Input.Files=["myESD.pool.root"]
+    cfgFlags.Input.Files=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"]
+    #
+    cfgFlags.Calo.TopoCluster.doTopoClusterLocalCalib = False
+    #
+    cfgFlags.addFlag("eflowRec.TrackColl","InDetTrackParticles")
+    cfgFlags.addFlag("eflowRec.VertexColl","PrimaryVertices")
+    cfgFlags.addFlag("eflowRec.RawClusterColl","CaloTopoClusters")
+    cfgFlags.addFlag("eflowRec.CalClusterColl","CaloCalTopoClustersNew")
+    cfgFlags.addFlag("eflowRec.DoClusterMoments",False)
+    #
+    # Try to get around TRT alignment folder problem in MC
+    cfgFlags.GeoModel.Align.Dynamic = False
+    #
+    cfgFlags.lock()
+    
+    from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg 
+    cfg=MainServicesSerialCfg() 
+
+    from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
+    tccfg = CaloTopoClusterCfg(cfgFlags)
+    tcalg = tccfg.getPrimary()
+    tcalg.ClustersOutputName = "CaloCalTopoClustersNew"
+    cfg.merge(tccfg)
+    cfg.addEventAlgo(tcalg,sequenceName="AthAlgSeq")
+
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    cfg.merge(PoolReadCfg(cfgFlags))
+
+    cfg.merge(PFCfg(cfgFlags))
+
+    cfg.printConfig(summariseProps=True)
+
+    outputlist = [
+        "xAOD::CaloClusterContainer#CaloCalTopoClusters*",
+        "xAOD::CaloClusterAuxContainer#*CaloCalTopoClusters*Aux.",
+        "xAOD::PFOContainer#*ParticleFlowObjects",
+        "xAOD::PFOAuxContainer#*ParticleFlowObjectsAux."
+        ]
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    cfg.merge(OutputStreamCfg(cfgFlags,"xAOD",ItemList=outputlist))
+    cfg.getEventAlgo("OutputStreamxAOD").ForceRead = True
+    from pprint import pprint
+    pprint( cfg.getEventAlgo("OutputStreamxAOD").ItemList )
+
+
+    cfg.getService("StoreGateSvc").Dump = True
+
+    cfg.run(10)
diff --git a/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx b/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
index 5ebef3d1a3f0..ac7e5ae77509 100644
--- a/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
+++ b/Reconstruction/eflowRec/src/PFCellLevelSubtractionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "eflowRec/PFCellLevelSubtractionTool.h"
@@ -315,9 +315,9 @@ void PFCellLevelSubtractionTool::performSubtraction() {
   for (unsigned int iEFCalOb = 0; iEFCalOb < nEFCaloObs; ++iEFCalOb) {
     eflowCaloObject* thisEflowCaloObject = m_eflowCaloObjectContainer->at(iEFCalOb);
 
-    ATH_MSG_DEBUG("Have got an eflowCaloObject");
-    
     unsigned int nClusters = thisEflowCaloObject->nClusters();
+    ATH_MSG_DEBUG("Have got an eflowCaloObject with " << nClusters << " clusters");
+    
     if (nClusters < 1) {
       continue;
     }
diff --git a/Reconstruction/eflowRec/src/PFClusterSelectorTool.cxx b/Reconstruction/eflowRec/src/PFClusterSelectorTool.cxx
index 43ca5956000a..e5311998bbc1 100644
--- a/Reconstruction/eflowRec/src/PFClusterSelectorTool.cxx
+++ b/Reconstruction/eflowRec/src/PFClusterSelectorTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloIdentifier/CaloCell_ID.h"
@@ -16,7 +16,9 @@ PFClusterSelectorTool::PFClusterSelectorTool(const std::string& type,const std::
 StatusCode PFClusterSelectorTool::initialize(){
 
   ATH_CHECK(m_caloClustersReadHandleKey.initialize());
-  ATH_CHECK(m_caloCalClustersReadHandleKey.initialize());
+  if(!m_caloCalClustersReadHandleKey.key().empty()) {
+    ATH_CHECK(m_caloCalClustersReadHandleKey.initialize());
+  }
 
   return StatusCode::SUCCESS;
 }
@@ -31,7 +33,11 @@ StatusCode PFClusterSelectorTool::execute(eflowRecClusterContainer& theEFlowRecC
     return StatusCode::SUCCESS;
   }
 
-  SG::ReadHandle<xAOD::CaloClusterContainer> caloCalClustersReadHandle(m_caloCalClustersReadHandleKey);
+  const xAOD::CaloClusterContainer* calclusters = nullptr;
+  if (!m_caloCalClustersReadHandleKey.key().empty()) {
+    SG::ReadHandle<xAOD::CaloClusterContainer> caloCalClustersReadHandle(m_caloCalClustersReadHandleKey);
+    calclusters = caloCalClustersReadHandle.get();
+  }
   
   /* Fill the vector of eflowRecClusters */
   unsigned int nClusters = caloClustersReadHandle->size();
@@ -39,9 +45,9 @@ StatusCode PFClusterSelectorTool::execute(eflowRecClusterContainer& theEFlowRecC
     /* Create the eflowRecCluster and put it in the container */
     std::unique_ptr<eflowRecCluster> thisEFRecCluster  = std::make_unique<eflowRecCluster>(ElementLink<xAOD::CaloClusterContainer>(*caloClustersReadHandle, iCluster), theCaloClusterContainer);
     
-    if (caloCalClustersReadHandle.isValid()){
+    if (calclusters){
       std::map<IdentifierHash,double> cellsWeightMap;
-      retrieveLCCalCellWeight(caloClustersReadHandle->at(iCluster)->e(), iCluster, cellsWeightMap, *caloCalClustersReadHandle);
+      retrieveLCCalCellWeight(caloClustersReadHandle->at(iCluster)->e(), iCluster, cellsWeightMap, *calclusters);
 
       if (msgLvl(MSG::DEBUG)) {
         //zhangr
diff --git a/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx b/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx
index 453c1103ed7c..2893e4bb31df 100644
--- a/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx
+++ b/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "eflowRec/PFONeutralCreatorAlgorithm.h"
@@ -11,7 +11,7 @@
 #include "xAODPFlow/PFOAuxContainer.h"
 
 PFONeutralCreatorAlgorithm::PFONeutralCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator) :
-    AthAlgorithm(name, pSvcLocator)
+  AthAlgorithm(name, pSvcLocator)
 {
 }
 
@@ -19,7 +19,9 @@ StatusCode PFONeutralCreatorAlgorithm::initialize(){
 
   ATH_CHECK(m_eflowCaloObjectContainerReadHandleKey.initialize());
   ATH_CHECK(m_neutralPFOContainerWriteHandleKey.initialize());
-  ATH_CHECK(m_neutralPFOContainerWriteHandleKey_nonModified.initialize());
+  if(!m_LCMode) {
+    ATH_CHECK(m_neutralPFOContainerWriteHandleKey_nonModified.initialize());
+  }
   return StatusCode::SUCCESS;
   
 }
@@ -30,22 +32,27 @@ StatusCode PFONeutralCreatorAlgorithm::execute(){
 
   SG::WriteHandle<xAOD::PFOContainer> neutralPFOContainerWriteHandle(m_neutralPFOContainerWriteHandleKey);
   ATH_CHECK(neutralPFOContainerWriteHandle.record(std::make_unique<xAOD::PFOContainer>(),std::make_unique<xAOD::PFOAuxContainer>()));
-  SG::WriteHandle<xAOD::PFOContainer> neutralPFOContainerWriteHandle_nonModified(m_neutralPFOContainerWriteHandleKey_nonModified);
-  if (m_LCMode) ATH_CHECK(neutralPFOContainerWriteHandle_nonModified.record(std::make_unique<xAOD::PFOContainer>(),std::make_unique<xAOD::PFOAuxContainer>()));
-    
+  std::unique_ptr<SG::WriteHandle<xAOD::PFOContainer> > p_neutralPFOContainerWriteHandle_nonModified(nullptr);
+  if (m_LCMode) {
+    p_neutralPFOContainerWriteHandle_nonModified = std::make_unique<SG::WriteHandle<xAOD::PFOContainer> >(m_neutralPFOContainerWriteHandleKey_nonModified);
+    ATH_CHECK(p_neutralPFOContainerWriteHandle_nonModified->record(std::make_unique<xAOD::PFOContainer>(),std::make_unique<xAOD::PFOAuxContainer>()));
+  }
+  
   /* Create Neutral PFOs from all eflowCaloObjects */
   SG::ReadHandle<eflowCaloObjectContainer> eflowCaloObjectContainerReadHandle(m_eflowCaloObjectContainerReadHandleKey);
-  for (auto thisEflowCaloObject : *eflowCaloObjectContainerReadHandle) createNeutralPFO(*thisEflowCaloObject, neutralPFOContainerWriteHandle, neutralPFOContainerWriteHandle_nonModified);
+  ATH_MSG_DEBUG("Looping over eflowCaloObjects");
+  for (auto thisEflowCaloObject : *eflowCaloObjectContainerReadHandle) createNeutralPFO(*thisEflowCaloObject, neutralPFOContainerWriteHandle, p_neutralPFOContainerWriteHandle_nonModified.get());
 
   return StatusCode::SUCCESS;
 }
 
 StatusCode PFONeutralCreatorAlgorithm::finalize(){ return StatusCode::SUCCESS; }
 
-void PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& energyFlowCaloObject,SG::WriteHandle<xAOD::PFOContainer>& neutralPFOContainerWriteHandle, SG::WriteHandle<xAOD::PFOContainer>& neutralPFOContainerWriteHandle_nonModified){
+void PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& energyFlowCaloObject,SG::WriteHandle<xAOD::PFOContainer>& neutralPFOContainerWriteHandle, SG::WriteHandle<xAOD::PFOContainer>* neutralPFOContainerWriteHandle_nonModified){
 
   unsigned int nClusters = energyFlowCaloObject.nClusters();
 
+  ATH_MSG_VERBOSE("  eflowCaloObject with " << nClusters << " clusters");
   for (unsigned int iCluster = 0; iCluster < nClusters; ++iCluster){
     eflowRecCluster* thisEfRecCluster = energyFlowCaloObject.efRecCluster(iCluster);
     
@@ -61,23 +68,29 @@ void PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& energyF
 
     /* Create the efo, add the cluster and set the four-momentum, charge and type */
 
+    ATH_MSG_VERBOSE("  Creating PFO");
     xAOD::PFO* thisPFO = new xAOD::PFO();
     if (m_LCMode) {
       if (thisEfRecCluster->isTouchable()) {
         neutralPFOContainerWriteHandle->push_back(thisPFO);
       } else {
-	neutralPFOContainerWriteHandle_nonModified->push_back(thisPFO);
+	(*neutralPFOContainerWriteHandle_nonModified)->push_back(thisPFO);
       }
     } else {
       neutralPFOContainerWriteHandle->push_back(thisPFO);
     }
 
+    ATH_MSG_VERBOSE("  Get original cluster link");
     ElementLink<xAOD::CaloClusterContainer> theOriginalClusterLink = thisEfRecCluster->getOriginalClusElementLink();
+    ATH_MSG_VERBOSE("  Get sister cluster link");
     ElementLink<xAOD::CaloClusterContainer> theSisterClusterLink = (*theOriginalClusterLink)->getSisterClusterLink();
     bool isSet = thisPFO->setClusterLink(theSisterClusterLink);
     if (!isSet) { msg(MSG::WARNING) << "Could not set Cluster in PFO " << endmsg; }
 
+    ATH_MSG_VERBOSE("  Sucessfully set cluster link");
+
     const xAOD::CaloCluster* cluster = thisEfRecCluster->getCluster();
+    ATH_MSG_VERBOSE("  Got CaloCluster from EfRecCluster");
     //be careful here - cluster p4 methods do not store sign. Thus -ve energy clusters have +ve pt and hence +ve energy
     if (!m_LCMode) {
       //in EM->EM/LC mode we use eta,phi at EM scale for both 4-vectors
@@ -106,155 +119,157 @@ void PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& energyF
     bool isRetrieved = cluster->retrieveMoment(xAOD::CaloCluster::CENTER_MAG, center_mag );
     if (true == isRetrieved) thisPFO->setCenterMag(center_mag);
     else ATH_MSG_WARNING("Could not retreve CENTER_MAG from xAOD::CaloCluster");
+
+    if(m_doClusterMoments) {
     
-    //now set the moments for touchable clusters (i.e. ones we modify) in LC mode or all clusters in EM mode
-    if ( (m_LCMode && thisEfRecCluster->isTouchable()) || !m_LCMode) {
-      this->addMoment(xAOD::CaloCluster::SECOND_R,xAOD::PFODetails::PFOAttributes::eflowRec_SECOND_R,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::CENTER_LAMBDA,xAOD::PFODetails::PFOAttributes::eflowRec_CENTER_LAMBDA,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::ENG_BAD_CELLS,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_BAD_CELLS,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::N_BAD_CELLS,xAOD::PFODetails::PFOAttributes::eflowRec_N_BAD_CELLS,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::BADLARQ_FRAC,xAOD::PFODetails::PFOAttributes::eflowRec_BADLARQ_FRAC,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::ENG_POS,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_POS,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::AVG_LAR_Q,xAOD::PFODetails::PFOAttributes::eflowRec_AVG_LAR_Q,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::AVG_TILE_Q,xAOD::PFODetails::PFOAttributes::eflowRec_AVG_TILE_Q,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::ISOLATION,xAOD::PFODetails::PFOAttributes::eflowRec_ISOLATION,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::SECOND_LAMBDA,xAOD::PFODetails::PFOAttributes::eflowRec_SECOND_LAMBDA,*cluster, *thisPFO);
-      this->addMoment(xAOD::CaloCluster::EM_PROBABILITY,xAOD::PFODetails::PFOAttributes::eflowRec_EM_PROBABILITY,*cluster, *thisPFO);
-      if (m_useCalibHitTruth){
-	this->addMoment(xAOD::CaloCluster::ENG_CALIB_TOT,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_TOT,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_EM,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_HAD,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_HAD,*cluster, *thisPFO);
-	this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_REST,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_REST,*cluster, *thisPFO);
+      //now set the moments for touchable clusters (i.e. ones we modify) in LC mode or all clusters in EM mode
+      if ( (m_LCMode && thisEfRecCluster->isTouchable()) || !m_LCMode) {
+	this->addMoment(xAOD::CaloCluster::SECOND_R,xAOD::PFODetails::PFOAttributes::eflowRec_SECOND_R,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::CENTER_LAMBDA,xAOD::PFODetails::PFOAttributes::eflowRec_CENTER_LAMBDA,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::ENG_BAD_CELLS,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_BAD_CELLS,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::N_BAD_CELLS,xAOD::PFODetails::PFOAttributes::eflowRec_N_BAD_CELLS,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::BADLARQ_FRAC,xAOD::PFODetails::PFOAttributes::eflowRec_BADLARQ_FRAC,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::ENG_POS,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_POS,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::AVG_LAR_Q,xAOD::PFODetails::PFOAttributes::eflowRec_AVG_LAR_Q,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::AVG_TILE_Q,xAOD::PFODetails::PFOAttributes::eflowRec_AVG_TILE_Q,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::ISOLATION,xAOD::PFODetails::PFOAttributes::eflowRec_ISOLATION,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::SECOND_LAMBDA,xAOD::PFODetails::PFOAttributes::eflowRec_SECOND_LAMBDA,*cluster, *thisPFO);
+	this->addMoment(xAOD::CaloCluster::EM_PROBABILITY,xAOD::PFODetails::PFOAttributes::eflowRec_EM_PROBABILITY,*cluster, *thisPFO);
+	if (m_useCalibHitTruth){
+	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_TOT,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_TOT,*cluster, *thisPFO);
+	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_EM,*cluster, *thisPFO);
+	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_HAD,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_HAD,*cluster, *thisPFO);
+	  this->addMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_REST,xAOD::PFODetails::PFOAttributes::eflowRec_ENG_CALIB_FRAC_REST,*cluster, *thisPFO);
+	}
       }
-    }
 
-    //First set all the layer energies
-    float layerEnergy_preSamplerB = cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerB);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_PreSamplerB = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_PreSamplerB;
-    thisPFO->setAttribute( myAttribute_layerEnergy_PreSamplerB, layerEnergy_preSamplerB);
+      //First set all the layer energies
+      float layerEnergy_preSamplerB = cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerB);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_PreSamplerB = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_PreSamplerB;
+      thisPFO->setAttribute( myAttribute_layerEnergy_PreSamplerB, layerEnergy_preSamplerB);
 
-    float layerEnergy_EMB1 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB1);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EMB1, layerEnergy_EMB1);
+      float layerEnergy_EMB1 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB1);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EMB1, layerEnergy_EMB1);
 
-    float layerEnergy_EMB2 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB2);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EMB2, layerEnergy_EMB2);
+      float layerEnergy_EMB2 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB2);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EMB2, layerEnergy_EMB2);
 
-    float layerEnergy_EMB3 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB3);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB3;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EMB3, layerEnergy_EMB3);
+      float layerEnergy_EMB3 = cluster->eSample(xAOD::CaloCluster::CaloSample::EMB3);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EMB3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EMB3;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EMB3, layerEnergy_EMB3);
 
-    float layerEnergy_preSamplerE = cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerE);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_PreSamplerE = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_PreSamplerE;
-    thisPFO->setAttribute( myAttribute_layerEnergy_PreSamplerE, layerEnergy_preSamplerE);
+      float layerEnergy_preSamplerE = cluster->eSample(xAOD::CaloCluster::CaloSample::PreSamplerE);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_PreSamplerE = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_PreSamplerE;
+      thisPFO->setAttribute( myAttribute_layerEnergy_PreSamplerE, layerEnergy_preSamplerE);
 
-    float layerEnergy_EME1 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME1);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EME1, layerEnergy_EME1);
+      float layerEnergy_EME1 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME1);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EME1, layerEnergy_EME1);
 
-    float layerEnergy_EME2 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME2);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EME2, layerEnergy_EME2);
+      float layerEnergy_EME2 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME2);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EME2, layerEnergy_EME2);
 
-    float layerEnergy_EME3 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME3);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME3;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EME3, layerEnergy_EME3);
+      float layerEnergy_EME3 = cluster->eSample(xAOD::CaloCluster::CaloSample::EME3);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EME3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EME3;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EME3, layerEnergy_EME3);
 
-    float layerEnergy_HEC0 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC0);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC0;
-    thisPFO->setAttribute( myAttribute_layerEnergy_HEC0, layerEnergy_HEC0);
+      float layerEnergy_HEC0 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC0);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC0;
+      thisPFO->setAttribute( myAttribute_layerEnergy_HEC0, layerEnergy_HEC0);
 
-    float layerEnergy_HEC1 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC1);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_HEC1, layerEnergy_HEC1);
+      float layerEnergy_HEC1 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC1);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_HEC1, layerEnergy_HEC1);
 
-    float layerEnergy_HEC2 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC2);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_HEC2, layerEnergy_HEC2);
+      float layerEnergy_HEC2 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC2);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_HEC2, layerEnergy_HEC2);
 
-    float layerEnergy_HEC3 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC3);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC3;
-    thisPFO->setAttribute( myAttribute_layerEnergy_HEC3, layerEnergy_HEC3);
+      float layerEnergy_HEC3 = cluster->eSample(xAOD::CaloCluster::CaloSample::HEC3);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC3;
+      thisPFO->setAttribute( myAttribute_layerEnergy_HEC3, layerEnergy_HEC3);
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar0;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileBar0, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar0;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileBar0, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileBar1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar1));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileBar1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar1));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileBar2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar2));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileBar2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileBar2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileBar2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar2));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileGap1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap1));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileGap1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap1));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileGap2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap2));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileGap2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap2));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap3;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileGap3, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap3));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileGap3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileGap3;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileGap3, cluster->eSample(xAOD::CaloCluster::CaloSample::TileGap3));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt0;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileExt0, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt0;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileExt0, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileExt1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt1));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileExt1, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt1));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_TileExt2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt2));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_TileExt2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_TileExt2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_TileExt2, cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt2));
 
-    float layerEnergy_FCAL0 = cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL0);
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL0;
-    thisPFO->setAttribute( myAttribute_layerEnergy_FCAL0, layerEnergy_FCAL0);
+      float layerEnergy_FCAL0 = cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL0);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL0;
+      thisPFO->setAttribute( myAttribute_layerEnergy_FCAL0, layerEnergy_FCAL0);
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_FCAL1, cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL1));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_FCAL1, cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL1));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_FCAL2, cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL2));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_FCAL2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_FCAL2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_FCAL2, cluster->eSample(xAOD::CaloCluster::CaloSample::FCAL2));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL0;
-    thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL0, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL0));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL0;
+      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL0, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL0));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL1;
-    thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL1, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL1));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL1 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL1;
+      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL1, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL1));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL2;
-    thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL2, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL2));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL2 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL2;
+      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL2, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL2));
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL3;
-    thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL3, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL3));
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_MINIFCAL3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_MINIFCAL3;
+      thisPFO->setAttribute( myAttribute_layerEnergy_MINIFCAL3, cluster->eSample(xAOD::CaloCluster::CaloSample::MINIFCAL3));
 
-    //now set the layer energies for EMB3 and Tile0 - these are needed if we want to run a GSC style jet calibration, which is binned in EMB3 and Tile0 layer energies
+      //now set the layer energies for EMB3 and Tile0 - these are needed if we want to run a GSC style jet calibration, which is binned in EMB3 and Tile0 layer energies
     
-    float layerEnergy_EM3 = layerEnergy_EMB3 + layerEnergy_EME3;
+      float layerEnergy_EM3 = layerEnergy_EMB3 + layerEnergy_EME3;
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EM3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EM3;
-    thisPFO->setAttribute( myAttribute_layerEnergy_EM3, layerEnergy_EM3);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EM3 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EM3;
+      thisPFO->setAttribute( myAttribute_layerEnergy_EM3, layerEnergy_EM3);
 
-    float layerEnergy_TileBar0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0);
-    float layerEnergy_TileExt0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0);
-    float layerEnergy_Tile0 = layerEnergy_TileBar0 + layerEnergy_TileExt0;
+      float layerEnergy_TileBar0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileBar0);
+      float layerEnergy_TileExt0 = cluster->eSample(xAOD::CaloCluster::CaloSample::TileExt0);
+      float layerEnergy_Tile0 = layerEnergy_TileBar0 + layerEnergy_TileExt0;
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_Tile0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_Tile0;
-    thisPFO->setAttribute(myAttribute_layerEnergy_Tile0, layerEnergy_Tile0);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_Tile0 = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_Tile0;
+      thisPFO->setAttribute(myAttribute_layerEnergy_Tile0, layerEnergy_Tile0);
 
-    //now set properties that are required for jet cleaning
-    float layerEnergy_HEC = layerEnergy_HEC0 + layerEnergy_HEC1 + layerEnergy_HEC2 + layerEnergy_HEC3;
+      //now set properties that are required for jet cleaning
+      float layerEnergy_HEC = layerEnergy_HEC0 + layerEnergy_HEC1 + layerEnergy_HEC2 + layerEnergy_HEC3;
 
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC;
-    thisPFO->setAttribute(myAttribute_layerEnergy_HEC, layerEnergy_HEC);
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_HEC = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_HEC;
+      thisPFO->setAttribute(myAttribute_layerEnergy_HEC, layerEnergy_HEC);
 
-    float layerEnergy_EM = layerEnergy_preSamplerB + layerEnergy_preSamplerE + layerEnergy_EMB1 + layerEnergy_EMB2 + layerEnergy_EMB3 + layerEnergy_EME1 + layerEnergy_EME2 + layerEnergy_EME3 + layerEnergy_FCAL0;
-    xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EM = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EM;
-    thisPFO->setAttribute(myAttribute_layerEnergy_EM, layerEnergy_EM);
+      float layerEnergy_EM = layerEnergy_preSamplerB + layerEnergy_preSamplerE + layerEnergy_EMB1 + layerEnergy_EMB2 + layerEnergy_EMB3 + layerEnergy_EME1 + layerEnergy_EME2 + layerEnergy_EME3 + layerEnergy_FCAL0;
+      xAOD::PFODetails::PFOAttributes myAttribute_layerEnergy_EM = xAOD::PFODetails::PFOAttributes::eflowRec_LAYERENERGY_EM;
+      thisPFO->setAttribute(myAttribute_layerEnergy_EM, layerEnergy_EM);
     
-    float clusterTiming = cluster->time();
-
-    xAOD::PFODetails::PFOAttributes myAttribute_TIMING = xAOD::PFODetails::PFOAttributes::eflowRec_TIMING;
-    thisPFO->setAttribute(myAttribute_TIMING, clusterTiming);
+      float clusterTiming = cluster->time();
 
+      xAOD::PFODetails::PFOAttributes myAttribute_TIMING = xAOD::PFODetails::PFOAttributes::eflowRec_TIMING;
+      thisPFO->setAttribute(myAttribute_TIMING, clusterTiming);
+    }
   }
 }
 
diff --git a/Reconstruction/eflowRec/src/PFTrackSelector.cxx b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
index 6b56d5e71c4b..3be98df5c93f 100644
--- a/Reconstruction/eflowRec/src/PFTrackSelector.cxx
+++ b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
@@ -18,11 +18,17 @@ StatusCode PFTrackSelector::initialize(){
   ATH_CHECK(m_trackSelectorTool.retrieve());
 
   ATH_CHECK(m_tracksReadHandleKey.initialize());
-  ATH_CHECK(m_electronsReadHandleKey.initialize());
-  ATH_CHECK(m_muonsReadHandleKey.initialize());
   ATH_CHECK(m_vertexKey.initialize());
   ATH_CHECK(m_SCTDetEleCollKey.initialize());
 
+  // Optional readhandlekeys for electrons and muons
+  if(!m_electronsReadHandleKey.key().empty()) {
+    ATH_CHECK(m_electronsReadHandleKey.initialize());
+  }
+  if(!m_muonsReadHandleKey.key().empty()) {
+    ATH_CHECK(m_muonsReadHandleKey.initialize());
+  }
+
   ATH_CHECK(m_eflowRecTracksWriteHandleKey.initialize());
   
   return StatusCode::SUCCESS;
@@ -85,6 +91,8 @@ bool PFTrackSelector::selectTrack(const xAOD::TrackParticle& track) {
 
 bool PFTrackSelector::isElectron(const xAOD::TrackParticle* track){
 
+  if(m_electronsReadHandleKey.key().empty()) return false;
+
   SG::ReadHandle<xAOD::ElectronContainer> electronsReadHandle(m_electronsReadHandleKey);
   if (electronsReadHandle.isValid()){
 
@@ -115,6 +123,8 @@ bool PFTrackSelector::isElectron(const xAOD::TrackParticle* track){
 
 bool PFTrackSelector::isMuon(const xAOD::TrackParticle* track){
 
+  if(m_muonsReadHandleKey.key().empty()) return false;
+
   SG::ReadHandle<xAOD::MuonContainer> muonsReadHandle(m_muonsReadHandleKey);
   if (muonsReadHandle.isValid()){
 
diff --git a/TileCalorimeter/TileConditions/python/TileConditionsConfig.py b/TileCalorimeter/TileConditions/python/TileConditionsConfig.py
index 4bef89893d9b..ea1c03d195c2 100644
--- a/TileCalorimeter/TileConditions/python/TileConditionsConfig.py
+++ b/TileCalorimeter/TileConditions/python/TileConditionsConfig.py
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 def tileCondCfg( flags ):
@@ -19,30 +19,29 @@ def tileCondCfg( flags ):
     emScale = 'TileEMScale'
     from TileConditions.TileConditionsConf import TileEMScaleCondAlg
     emScaleCondAlg = TileEMScaleCondAlg(name = emScale + 'CondAlg', TileEMScale = emScale)
-    emScaleCondAlg.OnlCacheUnit      = 'OnlineMegaElectronVolts'
-    emScaleCondAlg.OflCesProxy    = TileCondProxyCoolFlt('TileCondProxyCool_OflCes',    Source = '/TILE/OFL02/CALIB/CES') 
-    emScaleCondAlg.OflCisLinProxy = TileCondProxyCoolFlt('TileCondProxyCool_OflCisLin', Source = '/TILE/OFL02/CALIB/CIS/LIN') 
-    emScaleCondAlg.OflCisNlnProxy = TileCondProxyCoolFlt('TileCondProxyCool_OflCisNln', Source = '/TILE/OFL02/CALIB/CIS/NLN') 
-    emScaleCondAlg.OflEmsProxy    = TileCondProxyCoolFlt('TileCondProxyCool_OflEms',    Source = '/TILE/OFL02/CALIB/EMS') 
-    emScaleCondAlg.OflLasFibProxy = TileCondProxyCoolFlt('TileCondProxyCool_OflLasFib', Source = '/TILE/OFL02/CALIB/LAS/FIBER') 
-    emScaleCondAlg.OflLasLinProxy = TileCondProxyCoolFlt('TileCondProxyCool_OflLasLin', Source = '/TILE/OFL02/CALIB/LAS/LIN') 
-    emScaleCondAlg.OflLasNlnProxy = TileCondProxyCoolFlt('TileCondProxyCool_OflLasNln', Source = '/TILE/OFL02/CALIB/LAS/NLN') 
-    emScaleCondAlg.OnlCesProxy    = TileCondProxyCoolFlt('TileCondProxyCool_OnlCes',    Source = '/TILE/ONL01/CALIB/CES') 
-    emScaleCondAlg.OnlCisProxy    = TileCondProxyCoolFlt('TileCondProxyCool_OnlCis',    Source = '/TILE/ONL01/CALIB/CIS/LIN') 
-    emScaleCondAlg.OnlEmsProxy    = TileCondProxyCoolFlt('TileCondProxyCool_OnlEms',    Source = '/TILE/ONL01/CALIB/EMS') 
-    emScaleCondAlg.OnlLasProxy    = TileCondProxyCoolFlt('TileCondProxyCool_OnlLas',    Source = '/TILE/ONL01/CALIB/LAS/LIN')
-
-    __addFolder( '/TILE/OFL02/CALIB/CES')       
-    __addFolder( '/TILE/OFL02/CALIB/CIS/LIN')   
-    __addFolder( '/TILE/OFL02/CALIB/CIS/NLN')   
-    __addFolder( '/TILE/OFL02/CALIB/EMS')       
-    __addFolder( '/TILE/OFL02/CALIB/LAS/FIBER') 
-    __addFolder( '/TILE/OFL02/CALIB/LAS/LIN')   
-    __addFolder( '/TILE/OFL02/CALIB/LAS/NLN')   
-    __addFolder( '/TILE/ONL01/CALIB/CES')       
-    __addFolder( '/TILE/ONL01/CALIB/CIS/LIN')   
-    __addFolder( '/TILE/ONL01/CALIB/EMS')       
-    __addFolder( '/TILE/ONL01/CALIB/LAS/LIN')   
+
+    # Defaults for offline data
+    folder_OFL_CALIB_CIS = "CALIB/CIS/"
+    emScaleCondAlg.OnlCacheUnit   = 'OnlineMegaElectronVolts'
+    if flags.Input.isMC:
+        folder_OFL_CALIB_CIS = "CALIB/CIS/FIT/"
+        emScaleCondAlg.OnlCacheUnit   = 'Invalid'
+
+    def getTileCondProxyCoolFlt(name, folder):
+        __addFolder(folder)
+        return TileCondProxyCoolFlt(name, Source=folder)
+
+    emScaleCondAlg.OflCesProxy    = getTileCondProxyCoolFlt('TileCondProxyCool_OflCes',    '/TILE/OFL02/CALIB/CES')
+    emScaleCondAlg.OflCisLinProxy = getTileCondProxyCoolFlt('TileCondProxyCool_OflCisLin', '/TILE/OFL02/'+folder_OFL_CALIB_CIS+'LIN')
+    emScaleCondAlg.OflCisNlnProxy = getTileCondProxyCoolFlt('TileCondProxyCool_OflCisNln', '/TILE/OFL02/'+folder_OFL_CALIB_CIS+'NLN')
+    emScaleCondAlg.OflEmsProxy    = getTileCondProxyCoolFlt('TileCondProxyCool_OflEms',    '/TILE/OFL02/CALIB/EMS')
+    emScaleCondAlg.OflLasFibProxy = getTileCondProxyCoolFlt('TileCondProxyCool_OflLasFib', '/TILE/OFL02/CALIB/LAS/FIBER')
+    emScaleCondAlg.OflLasLinProxy = getTileCondProxyCoolFlt('TileCondProxyCool_OflLasLin', '/TILE/OFL02/CALIB/LAS/LIN')
+    emScaleCondAlg.OflLasNlnProxy = getTileCondProxyCoolFlt('TileCondProxyCool_OflLasNln', '/TILE/OFL02/CALIB/LAS/NLN')
+    emScaleCondAlg.OnlCesProxy    = getTileCondProxyCoolFlt('TileCondProxyCool_OnlCes',    '/TILE/ONL01/CALIB/CES')
+    emScaleCondAlg.OnlCisProxy    = getTileCondProxyCoolFlt('TileCondProxyCool_OnlCis',    '/TILE/ONL01/CALIB/CIS/LIN')
+    emScaleCondAlg.OnlEmsProxy    = getTileCondProxyCoolFlt('TileCondProxyCool_OnlEms',    '/TILE/ONL01/CALIB/EMS')
+    emScaleCondAlg.OnlLasProxy    = getTileCondProxyCoolFlt('TileCondProxyCool_OnlLas',    '/TILE/ONL01/CALIB/LAS/LIN')
 
     acc.addCondAlgo( emScaleCondAlg )
 
@@ -59,44 +58,54 @@ def tileCondCfg( flags ):
 
 
     sampleNoise = 'TileSampleNoise'
-    sampleNoiseProxy = TileCondProxyCoolFlt( 'TileCondProxyCool_NoiseSample', Source = '/TILE/OFL02/NOISE/SAMPLE' )
-    __addFolder( '/TILE/OFL02/NOISE/SAMPLE' )
+    sampleNoiseProxy = getTileCondProxyCoolFlt( 'TileCondProxyCool_NoiseSample', '/TILE/OFL02/NOISE/SAMPLE' )
     __addCondAlg(sampleNoise, sampleNoiseProxy)
 
-    onlineSampleNoise = 'TileOnlineSampleNoise'
-    onlineSampleNoiseProxy = TileCondProxyCoolFlt( 'TileCondProxyCool_OnlineNoiseSample', Source = '/TILE/ONL01/NOISE/SAMPLE' )
-    __addFolder( '/TILE/ONL01/NOISE/SAMPLE' )    
-    __addCondAlg(onlineSampleNoise, onlineSampleNoiseProxy)
-
     from TileConditions.TileConditionsConf import TileCondToolNoiseSample
     noiseSampleTool = TileCondToolNoiseSample(name = 'TileCondToolNoiseSample', 
-                                              TileSampleNoise = sampleNoise, 
-                                              TileOnlineSampleNoise = onlineSampleNoise)
+                                              TileSampleNoise = sampleNoise)
+
+    if flags.Common.isOnline:
+        onlineSampleNoise = 'TileOnlineSampleNoise'
+        onlineSampleNoiseProxy = getTileCondProxyCoolFlt( 'TileCondProxyCool_OnlineNoiseSample', '/TILE/ONL01/NOISE/SAMPLE' )
+        __addCondAlg(onlineSampleNoise, onlineSampleNoiseProxy)
+        noiseSampleTool.TileOnlineSampleNoise = onlineSampleNoise
     acc.addPublicTool( noiseSampleTool )
 
 
     timing = 'TileTiming'
-    timingProxy = TileCondProxyCoolFlt('TileCondProxyCool_AdcOffset', Source = '/TILE/OFL02/TIME/CHANNELOFFSET/PHY' )
-    __addFolder( '/TILE/OFL02/TIME/CHANNELOFFSET/PHY' )
+    timingProxy = getTileCondProxyCoolFlt('TileCondProxyCool_AdcOffset', '/TILE/OFL02/TIME/CHANNELOFFSET/PHY' )
     __addCondAlg(timing, timingProxy)
 
     from TileConditions.TileConditionsConf import TileCondToolTiming
     timingTool = TileCondToolTiming(name = 'TileCondToolTiming', TileTiming = timing)
     acc.addPublicTool( timingTool )
 
+    def getTileCondProxyCoolBch(name, folder):
+        __addFolder(folder)
+        return TileCondProxyCoolBch(name, Source=folder)
+
 
     badChannels = 'TileBadChannels'
     from TileConditions.TileConditionsConf import TileBadChannelsCondAlg
     badChannelsCondAlg = TileBadChannelsCondAlg( name = badChannels + 'CondAlg', TileBadChannels = badChannels)
-    badChannelsCondAlg.OflBchProxy = TileCondProxyCoolBch('TileCondProxyCool_OflBch', Source = '/TILE/OFL02/STATUS/ADC' )
-    badChannelsCondAlg.OnlBchProxy = TileCondProxyCoolBch('TileCondProxyCool_OnlBch', Source = '/TILE/ONL01/STATUS/ADC' )
-    __addFolder( '/TILE/OFL02/STATUS/ADC' )
-    __addFolder( '/TILE/ONL01/STATUS/ADC' )
+    badChannelsCondAlg.OflBchProxy = getTileCondProxyCoolBch('TileCondProxyCool_OflBch', '/TILE/OFL02/STATUS/ADC' )
+    badChannelsCondAlg.OnlBchProxy = getTileCondProxyCoolBch('TileCondProxyCool_OnlBch', '/TILE/ONL01/STATUS/ADC' )
     acc.addCondAlgo( badChannelsCondAlg )
 
     from TileConditions.TileConditionsConf import TileBadChanTool
     badChanTool = TileBadChanTool(name = 'TileBadChanTool', TileBadChannels = badChannels)
     acc.addPublicTool( badChanTool )
+
+    # Defaults for offline data
+    dbname = "LAR_OFL"
+    badchannelsfolder = "BadChannelsOfl"
+    if flags.Common.isOnline:
+        dbname = "LAR"
+    if flags.Common.isOnline or flags.Input.isMC:
+        badchannelsfolder = "BadChannels"
+    acc.merge( addFolders(flags, ['/LAR/'+badchannelsfolder+'/BadChannels', 
+                                  '/LAR/'+badchannelsfolder+'/MissingFEBs'], dbname))
     
 
     from TileConditions.TileConditionsConf import TileInfoLoader, TileCablingSvc
-- 
GitLab


From 0ee6ac9b048bbd0041701a2307580fad8b63c501 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Fri, 3 May 2019 14:50:45 +0200
Subject: [PATCH 084/129] turn tools used by METAssociator into private
 AlgTools

---
 .../MET/METReconstruction/Root/METAssociator.cxx     |  6 +++---
 .../MET/METReconstruction/python/METAssocConfig.py   | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
index 045ebb38405f..268096e58911 100644
--- a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
+++ b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
@@ -49,9 +49,9 @@ namespace met {
   ////////////////
   METAssociator::METAssociator(const std::string& name) :
     AsgTool(name),
-    m_trkseltool(""),
-    m_trkIsolationTool(""),
-    m_caloIsolationTool(""),
+    m_trkseltool(this,""),
+    m_trkIsolationTool(this,""),
+    m_caloIsolationTool(this,""),
     m_pvcollKey(""),
     m_clcollKey(""),
     m_trkcollKey(""),
diff --git a/Reconstruction/MET/METReconstruction/python/METAssocConfig.py b/Reconstruction/MET/METReconstruction/python/METAssocConfig.py
index d4b7364f06ed..01286372bfad 100644
--- a/Reconstruction/MET/METReconstruction/python/METAssocConfig.py
+++ b/Reconstruction/MET/METReconstruction/python/METAssocConfig.py
@@ -174,13 +174,13 @@ class METAssocConfig:
                                                                   maxZ0SinTheta=3,
                                                                   maxD0=2,
                                                                   minPt=500)
-            if not hasattr(ToolSvc,self.trkseltool.name()):
-                ToolSvc += self.trkseltool
+            #if not hasattr(ToolSvc,self.trkseltool.name()):
+            #    ToolSvc += self.trkseltool
 
         self.trkisotool = CfgMgr.xAOD__TrackIsolationTool("TrackIsolationTool_MET")
         self.trkisotool.TrackSelectionTool = self.trkseltool # As configured above
-        if not hasattr(ToolSvc,self.trkisotool.name()):
-            ToolSvc += self.trkisotool
+        #if not hasattr(ToolSvc,self.trkisotool.name()):
+        #    ToolSvc += self.trkisotool
 
         from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__ParticleCaloCellAssociationTool		
 	from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
@@ -191,8 +191,8 @@ class METAssocConfig:
                                                           addCaloExtensionDecoration=False,
                                                           ParticleCaloExtensionTool = CaloExtensionTool,
                                                           ParticleCaloCellAssociationTool = CaloCellAssocTool)
-        if not hasattr(ToolSvc,self.caloisotool.name()):
-            ToolSvc += self.caloisotool
+        #if not hasattr(ToolSvc,self.caloisotool.name()):
+        #    ToolSvc += self.caloisotool
 
         self.associators = {}
         self.assoclist = [] # need an ordered list
-- 
GitLab


From 71e9a4778b9eedf39f6ad4ea5def9f3f0b74eedf Mon Sep 17 00:00:00 2001
From: Savanna Marie Shaw <savanna.marie.shaw@cern.ch>
Date: Fri, 3 May 2019 15:34:35 +0200
Subject: [PATCH 085/129] Remove MuidCaloEnergyMeas from muon trigger
 configuration

We never actually use the MuidCaloEnergyMeas tool in the trigger, since we don't have access to calo information at the muon trigger level. Any algorithms/tools that need it we anyways configure such that this tool is disabled.
Removing this from the trigger configuration so some cleanup of the offline code can proceed in https://gitlab.cern.ch/atlas/athena/merge_requests/23065.
---
 .../TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py | 9 +--------
 .../TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py | 3 +--
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index 395e6743ff7b..ba801404cd5a 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 # TrigMuonEF configurables
 #
@@ -84,14 +84,7 @@ def TMEF_Extrapolator(name='TMEF_Extrapolator',**kwargs):
     return CfgMgr.Trk__Extrapolator(name,**kwargs)
 
 
-def TMEF_CaloEnergyMeas(name='TMEF_CaloEnergyMeas',**kwargs):
-    kwargs.setdefault("CaloNoiseTool","")
-    kwargs.setdefault("UseCaloNoiseTool",False)
-    return CfgMgr.Rec__MuidCaloEnergyMeas(name,**kwargs)
-
-
 def TMEF_CaloEnergyTool(name='TMEF_CaloEnergyTool', **kwargs):
-    kwargs.setdefault("CaloMeasTool","TMEF_CaloEnergyMeas")
     kwargs.setdefault("EnergyLossMeasurement",False)
     kwargs.setdefault("MopParametrization",True)
     return CfgMgr.Rec__MuidCaloEnergyTool(name,**kwargs)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index 58e0938fca66..d5b0a2f752a5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -617,8 +617,7 @@ def muEFCBRecoSequence( RoIs, name ):
   theIndetCandidateAlg = CfgMgr.MuonCombinedInDetCandidateAlg("TrigMuonCombinedInDetCandidateAlg_"+name,TrackSelector=getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool"),TrackParticleLocation = [trackParticles],ForwardParticleLocation=trackParticles, MuonSystemExtensionTool=muonExtTool)
 
   #MuonCombinedCandidates
-  theCaloMeasTool = getPublicToolClone("TrigCaloMeasTool_"+name, "MuidCaloEnergyMeas", CaloNoiseTool="", UseCaloNoiseTool=False,CellContainerLocation="")
-  theCaloEnergyTool = getPublicToolClone("TrigCaloEnergyTool_"+name, "MuidCaloEnergyTool", CaloMeasTool = theCaloMeasTool, EnergyLossMeasurement=False, MopParametrization=True, TrackIsolation=False)
+  theCaloEnergyTool = getPublicToolClone("TrigCaloEnergyTool_"+name, "MuidCaloEnergyTool", EnergyLossMeasurement=False, MopParametrization=True, TrackIsolation=False)
 
   from TrkExRungeKuttaIntersector.TrkExRungeKuttaIntersectorConf import Trk__IntersectorWrapper as Propagator
   TrigMuonPropagator = Propagator(name = 'TrigMuonPropagator')
-- 
GitLab


From d23726aaffe1b7b83acab58492114ff2c27cfe53 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 3 May 2019 18:44:51 +0100
Subject: [PATCH 086/129] Fix const_cast for Run-I EMConvert

---
 .../egamma/egammaEvent/src/EMConvert.cxx      | 49 ++++++++-----------
 1 file changed, 20 insertions(+), 29 deletions(-)

diff --git a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
index cd282cb1bc9d..2df8dd125375 100755
--- a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
+++ b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx
@@ -954,9 +954,11 @@ Trk::VxCandidate* EMConvert::getVxCandidate() const
 
   Trk::ExtendedVxCandidate* evxCand = 0;
   Trk::VxCandidate* vxCand = 0;
+  std::vector<Trk::VxTrackAtVertex*> vxTrkAtVx;
 
   AmgSymMatrix(3)* posmat = getVxPosErrorMatrix();
-  const Trk::RecVertex* vx = new Trk::RecVertex(Amg::Vector3D(vertex_x(),vertex_y(),vertex_z()), *posmat, (double)vertex_ndf(), (double)vertex_chi2());
+  const Trk::RecVertex* vx = new Trk::RecVertex(Amg::Vector3D(vertex_x(),vertex_y(),vertex_z()), 
+                                                *posmat, (double)vertex_ndf(), (double)vertex_chi2());
   delete posmat;
 
   //perigee at vertex
@@ -964,39 +966,28 @@ Trk::VxCandidate* EMConvert::getVxCandidate() const
   AmgSymMatrix(5) *trk1EM = getTrk1ErrorMatrix();
     
   const Trk::PerigeeSurface   surface(globPos);
-  
-  Trk::Perigee* trkParams = const_cast<Trk::Perigee*>(surface.createParameters<5,Trk::Charged>( 
-                                                            0,
-                                                            0,
-                                                            vertex_track1_phi(),
-                                                            vertex_track1_theta(),
-                                                            vertex_track1_qOverP(),
-                                                            trk1EM ));
-   
+  Trk::Perigee* trkParams= new Trk::Perigee(0,
+                                            0,
+                                            vertex_track1_phi(),
+                                            vertex_track1_theta(),
+                                            vertex_track1_qOverP(),
+                                            surface,
+                                            trk1EM);
   Trk::VxTrackAtVertex* vxtrk1 = new Trk::VxTrackAtVertex(vertex_track1_chi2(), trkParams);
-
-
-
-
-  std::vector<Trk::VxTrackAtVertex*> vxTrkAtVx;
   vxTrkAtVx.push_back(vxtrk1);
 
-  Trk::VxTrackAtVertex* vxtrk2 = 0;
   if(vertex_numTracks()>1){
-    globPos = Amg::Vector3D(vertex_x(), vertex_y(), vertex_z());
+    Trk::VxTrackAtVertex* vxtrk2 = 0;
     AmgSymMatrix(5) *trk2EM = getTrk2ErrorMatrix();
-   
-    const Trk::PerigeeSurface   surface2(globPos);
-  
-    Trk::Perigee* trkParams2 = const_cast<Trk::Perigee*>(surface2.createParameters<5,Trk::Charged>( 
-                                                            0,
-                                                            0,
-                                                            vertex_track1_phi(),
-                                                            vertex_track1_theta(),
-                                                            vertex_track1_qOverP(),
-                                                            trk2EM ));
- 
-   
+    const Trk::PerigeeSurface surface2(globPos);
+    Trk::Perigee* trkParams2= new Trk::Perigee(0,
+                                              0,
+                                              vertex_track2_phi(),
+                                              vertex_track2_theta(),
+                                              vertex_track2_qOverP(),
+                                              surface,
+                                              trk2EM);
+
     vxtrk2 = new Trk::VxTrackAtVertex(vertex_track2_chi2(), trkParams2);
     vxTrkAtVx.push_back(vxtrk2);
     evxCand = new Trk::ExtendedVxCandidate(*vx, vxTrkAtVx, getVxErrorMatrix());
-- 
GitLab


From 15d96a55327e745a0fb80b027c3172f0d3cc5e12 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 3 May 2019 18:42:17 +0000
Subject: [PATCH 087/129] Major rewrite of TrigUpgradeTest - remove ctests

---
 .../TrigUpgradeTest/CMakeLists.txt            |  38 +-
 ...{bjet.menu.ALLTE.py => bjet_menu_ALLTE.py} |   0
 .../{bjet_menu.ref => bjet_menu_ALLTE.ref}    |   0
 .../TrigUpgradeTest/share/calo_only_data.ref  | 210 ---------
 .../TrigUpgradeTest/share/dataScouting.ref    |  40 ++
 .../TrigUpgradeTest/share/decodeBS.ref        | 401 ++++++------------
 .../TrigUpgradeTest/share/dummy_regtest.ref   |   1 +
 .../{egamma_run_data.ref => egamma_cf.ref}    |   0
 .../{bjet_menuALLTE.ref => slice_bjet.ref}    |   0
 .../{electron_menu.ref => slice_electron.ref} |   0
 .../share/{jet_menu.ref => slice_jet.ref}     |   0
 .../share/{met_menu.ref => slice_met.ref}     |   0
 .../share/{mu_menu.ref => slice_mu.ref}       |   0
 .../{photon_menu.ref => slice_photon.ref}     |   0
 .../share/{tau_menu.ref => slice_tau.ref}     |   0
 .../test/exec_TrigUpgradeTest_art_athenaMT.sh |  24 +-
 .../test/exec_TrigUpgradeTest_art_post.sh     |  36 +-
 .../test/test_bjet_menuALLTE.sh               |   5 -
 .../test/test_calo_only_data.sh               |   6 -
 .../test/test_calo_ringer_only_data.sh        |   7 -
 .../test/test_calo_run_data.sh                |   5 -
 .../TrigUpgradeTest/test/test_dataScouting.sh |   5 -
 .../TrigUpgradeTest/test/test_decodeBS.sh     |  27 --
 .../test/test_egamma_run_data.sh              |   9 -
 .../test/test_emu_l1_decoding.sh              |   6 +-
 .../TrigUpgradeTest/test/test_emu_newjo.sh    |  17 -
 .../test/test_emu_step_processing.sh          |   6 +-
 .../test/test_full_menu_build.sh              |  25 +-
 .../test/test_id_calo_run_data.sh             |   5 -
 .../TrigUpgradeTest/test/test_id_run_data.sh  |   5 -
 .../TrigUpgradeTest/test/test_id_run_mc.sh    |   5 -
 .../TrigUpgradeTest/test/test_jet.sh          |   9 -
 .../TrigUpgradeTest/test/test_l1sim.sh        |   5 -
 .../TrigUpgradeTest/test/test_merge.sh        |   6 +-
 .../test/test_met_fromCells.sh                |   6 -
 .../test/test_met_fromClusters.sh             |   6 -
 .../test/test_met_fromClustersPufit.sh        |   6 -
 .../TrigUpgradeTest/test/test_met_fromJets.sh |   6 -
 .../TrigUpgradeTest/test/test_mu_run_data.sh  |   9 -
 .../TrigUpgradeTest/test/test_newJO_build.sh  |  51 +--
 .../TrigUpgradeTest/test/test_peb.sh          |   5 -
 .../TrigUpgradeTest/test/test_ringer_chain.sh |   5 -
 .../TrigUpgradeTest/test/test_runMenuTest.sh  |   5 -
 .../test_trigUpgr_bjet_menu_ALLTE_build.sh    |  21 +
 .../test/test_trigUpgr_calo_cf_build.sh       |  25 ++
 .../test/test_trigUpgr_calo_only_build.sh     |  24 ++
 .../test_trigUpgr_calo_ringer_only_build.sh   |  24 ++
 .../test/test_trigUpgr_dataScouting_build.sh  |  21 +
 .../test/test_trigUpgr_decodeBS_build.sh      |  40 ++
 .../test/test_trigUpgr_egamma_cf_build.sh     |  28 ++
 .../test_trigUpgr_egamma_ringer_cf_build.sh   |  24 ++
 .../test/test_trigUpgr_emu_newjo_build.sh     |  44 ++
 .../test/test_trigUpgr_full_menu_build.sh     |  21 +
 ...rid.sh => test_trigUpgr_full_menu_grid.sh} |   4 +-
 .../test/test_trigUpgr_id_calo_cf_build.sh    |  24 ++
 .../test/test_trigUpgr_id_cf_build.sh         |  25 ++
 .../test/test_trigUpgr_id_cf_mc_build.sh      |  26 ++
 .../test/test_trigUpgr_jet_build.sh           |  24 ++
 .../test/test_trigUpgr_l1sim_build.sh         |  25 ++
 .../test/test_trigUpgr_met_fromCells_build.sh |  23 +
 ...st_trigUpgr_met_fromClustersPufit_build.sh |  23 +
 .../test_trigUpgr_met_fromClusters_build.sh   |  23 +
 .../test/test_trigUpgr_met_fromJets_build.sh  |  23 +
 .../test/test_trigUpgr_mu_cf_build.sh         |  25 ++
 .../test/test_trigUpgr_newJO_build.sh         |  47 ++
 .../test/test_trigUpgr_peb_build.sh           |  21 +
 .../test/test_trigUpgr_runMenuTest_build.sh   |  21 +
 ...u.sh => test_trigUpgr_slice_bjet_build.sh} |   9 +-
 ... => test_trigUpgr_slice_electron_build.sh} |   9 +-
 ...nu.sh => test_trigUpgr_slice_jet_build.sh} |   9 +-
 ...nu.sh => test_trigUpgr_slice_met_build.sh} |   9 +-
 ...enu.sh => test_trigUpgr_slice_mu_build.sh} |   9 +-
 ...sh => test_trigUpgr_slice_photon_build.sh} |   9 +-
 ...nu.sh => test_trigUpgr_slice_tau_build.sh} |   9 +-
 .../test/test_view_schedule.sh                |   6 +-
 .../TrigValTools/bin/runTrigART.py            | 219 ++++++++++
 76 files changed, 1112 insertions(+), 784 deletions(-)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{bjet.menu.ALLTE.py => bjet_menu_ALLTE.py} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{bjet_menu.ref => bjet_menu_ALLTE.ref} (100%)
 delete mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/calo_only_data.ref
 create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/dummy_regtest.ref
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{egamma_run_data.ref => egamma_cf.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{bjet_menuALLTE.ref => slice_bjet.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{electron_menu.ref => slice_electron.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{jet_menu.ref => slice_jet.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{met_menu.ref => slice_met.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{mu_menu.ref => slice_mu.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{photon_menu.ref => slice_photon.ref} (100%)
 rename Trigger/TrigValidation/TrigUpgradeTest/share/{tau_menu.ref => slice_tau.ref} (100%)
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_only_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_dataScouting.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_newjo.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_jet.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_l1sim.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromCells.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClusters.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClustersPufit.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromJets.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_peb.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh
 delete mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_runMenuTest.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_cf_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_dataScouting_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_cf_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_newjo_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_full_menu_grid.sh => test_trigUpgr_full_menu_grid.sh} (93%)
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_calo_cf_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_mc_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_jet_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_l1sim_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromCells_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClustersPufit_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClusters_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromJets_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_mu_cf_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_newJO_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_peb_build.sh
 create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_runMenuTest_build.sh
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_bjet_menu.sh => test_trigUpgr_slice_bjet_build.sh} (79%)
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_electron_menu.sh => test_trigUpgr_slice_electron_build.sh} (78%)
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_jet_menu.sh => test_trigUpgr_slice_jet_build.sh} (79%)
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_met_menu.sh => test_trigUpgr_slice_met_build.sh} (78%)
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_mu_menu.sh => test_trigUpgr_slice_mu_build.sh} (80%)
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_photon_menu.sh => test_trigUpgr_slice_photon_build.sh} (80%)
 rename Trigger/TrigValidation/TrigUpgradeTest/test/{test_tau_menu.sh => test_trigUpgr_slice_tau_build.sh} (80%)
 create mode 100755 Trigger/TrigValidation/TrigValTools/bin/runTrigART.py

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index f237210f5f2d..fcc7f6eaaacc 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -30,7 +30,7 @@ atlas_add_test( flake8
    SCRIPT flake8 --select=F,E7,E9,W6 --ignore=E701 ${CMAKE_CURRENT_SOURCE_DIR}/python
    POST_EXEC_SCRIPT nopost.sh )
 
-# Unit tests:
+# Unit tests (they test things from outside TrigUpgradeTest - should be moved or removed):
 atlas_add_test( ViewSchedule1  SCRIPT test/test_view_schedule.sh ENVIRONMENT THREADS=1 POST_EXEC_SCRIPT nopost.sh )
 atlas_add_test( ViewSchedule2  SCRIPT test/test_view_schedule.sh ENVIRONMENT THREADS=2 POST_EXEC_SCRIPT nopost.sh )
 atlas_add_test( ViewSchedule64 SCRIPT test/test_view_schedule.sh ENVIRONMENT THREADS=64 POST_EXEC_SCRIPT nopost.sh )
@@ -49,37 +49,5 @@ function( _add_test name )
       ${ARGN} )
 endfunction( _add_test )
 
-_add_test( id_run_mc POST_EXEC_SCRIPT nopost.sh )
-_add_test( id_run_data POST_EXEC_SCRIPT nopost.sh )
-_add_test( mu_run_data POST_EXEC_SCRIPT nopost.sh )
-_add_test( id_calo_run_data POST_EXEC_SCRIPT nopost.sh )
-_add_test( emu_l1_decoding POST_EXEC_SCRIPT nopost.sh )
-_add_test( jet POST_EXEC_SCRIPT nopost.sh )
-_add_test( l1sim POST_EXEC_SCRIPT nopost.sh )
-_add_test( egamma_run_data EXTRA_PATTERNS "-s TrigSignatureMoniMT.*HLT_.*|Fragment size" )
-_add_test( decodeBS EXTRA_PATTERNS "-s FillMissingEDM.*(present|absent)" PROPERTIES DEPENDS egammaRunData )
-_add_test( calo_only_data EXTRA_PATTERNS "-s .*ERROR.*|FastCaloL2EgammaAlg.*REGTEST*" )
-_add_test( emu_step_processing EXTRA_PATTERNS "-s TrigSignatureMoniMT.*INFO HLT_.*" )
-_add_test( emu_newjo EXTRA_PATTERNS "-s TrigSignatureMo.*INFO HLT_.*" )
-_add_test( runMenuTest EXTRA_PATTERNS "-s .*ERROR (?\!attempt to add a duplicate).*|(?\!IOVSvcTool).*FATAL.*|TrigSignatureMoniMT .*INFO.*" )
-_add_test( peb EXTRA_PATTERNS "-s obeysLB=.*robs=.*dets = |adds PEBInfo|TriggerSummary.*HLT_.*" )
-_add_test( dataScouting EXTRA_PATTERNS "-s obeysLB=.*robs=.*dets = |adds PEBInfo|TriggerSummary.*HLT_.*|Serialiser.*Type|Serialiser.*ROBFragments with IDs|{module.*words}" )
-_add_test( bjet_menuALLTE EXTRA_PATTERNS "-s TrigSignatureMoniMT.*HLT_.*" )
-_add_test( met_fromCells EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
-_add_test( met_fromClusters EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
-_add_test( met_fromClustersPufit EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
-_add_test( met_fromJets EXTRA_PATTERNS "-s METHypoAlg.*MET.*value" )
-
-_add_test( calo_ringer_only_data POST_EXEC_SCRIPT nopost.sh)
-_add_test( ringer_chain POST_EXEC_SCRIPT nopost.sh)
-
-# ART-based tests:
-_add_test( full_menu_build POST_EXEC_SCRIPT "trig-art-result-parser.sh full_menu_build.log \"athena CheckLog RegTest\"" )
-_add_test( newJO_build POST_EXEC_SCRIPT "trig-art-result-parser.sh newJO_build.log \"Configuration athena CheckLog RegTest\"" )
-_add_test( bjet_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh bjet_menu.log \"athena CheckLog RegTest\"" )
-_add_test( electron_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh electron_menu.log \"athena CheckLog RegTest\"")
-_add_test( jet_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh jet_menu.log \"athena CheckLog RegTest\"")
-_add_test( met_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh met_menu.log \"athena CheckLog RegTest\"" )
-_add_test( mu_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh mu_menu.log \"athena CheckLog RegTest\"")
-_add_test( photon_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh photon_menu.log \"athena CheckLog RegTest\"")
-_add_test( tau_menu POST_EXEC_SCRIPT "trig-art-result-parser.sh tau_menu.log \"athena CheckLog RegTest\"")
+_add_test( emu_l1_decoding POST_EXEC_SCRIPT nopost.sh ) # should be moved to the L1Decoder package
+_add_test( emu_step_processing EXTRA_PATTERNS "-s TrigSignatureMoniMT.*INFO HLT_.*" ) # should be moved to TriggerMenuMT
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menu_ALLTE.py
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/bjet.menu.ALLTE.py
rename to Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menu_ALLTE.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menu_ALLTE.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menu_ALLTE.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/calo_only_data.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/calo_only_data.ref
deleted file mode 100644
index f951f61820d4..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/calo_only_data.ref
+++ /dev/null
@@ -1,210 +0,0 @@
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: emEnergy = 1948
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: hadEnergy = -113
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: e237= 498
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: e277= 952
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: clusterWidth = 0.015682
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: frac73 = -0.0181818
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: e233 = 574
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: wstot = 15.8327
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: eta = -0.220436
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: phi = -1.97753
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: Eta1 = -0.228699
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     1   0     DEBUG  REGTEST: roiWord = 0xa9eb1f08
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: emEnergy = 2544
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: hadEnergy = -137
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: e237= 1510
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: e277= 667
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: clusterWidth = 0.00261401
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: frac73 = 0.415385
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: e233 = 1634
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: wstot = -9999
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: eta = 1.21701
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: phi = 1.19091
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: Eta1 = 1.20893
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     2   0     DEBUG  REGTEST: roiWord = 0xa2f01f07
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: emEnergy = 5129
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: hadEnergy = 557.148
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e237= 3442
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e277= 4743
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: clusterWidth = 0.0200349
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: frac73 = 0.487952
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e233 = 2451
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: wstot = 6.1966
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: eta = 0.66515
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: phi = 0.771858
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: Eta1 = 0.662072
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: roiWord = 0xa25e1f09
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: emEnergy = 63629
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: hadEnergy = 3562
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e237= 52341
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e277= 54392
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: clusterWidth = 0.0215697
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: frac73 = 99
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e233 = 45475
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: wstot = -9999
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: eta = -2.46485
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: phi = 2.61952
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: Eta1 = -2.44119
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: roiWord = 0xa46d0210
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: emEnergy = 6126
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: hadEnergy = 32
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e237= 5815
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e277= 7215
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: clusterWidth = 0.0159176
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: frac73 = -0.149254
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e233 = 4942
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: wstot = 8.9998
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: eta = -0.526452
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: phi = 2.55717
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: Eta1 = -0.537374
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: roiWord = 0xa5a3010d
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: emEnergy = 56965
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: hadEnergy = -359
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e237= 28865
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e277= 30797
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: clusterWidth = 0.0124255
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: frac73 = 0.870855
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e233 = 25057
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: wstot = 3.36897
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: eta = -1.33618
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: phi = -0.424231
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: Eta1 = -1.34045
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: roiWord = 0xad2e1f35
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: emEnergy = 44675
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: hadEnergy = 2940
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e237= 22224
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e277= 25771
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: clusterWidth = 0.0162035
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: frac73 = 0.614681
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: e233 = 19452
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: wstot = 4.25774
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: eta = 1.97138
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: phi = -0.748126
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: Eta1 = 1.9601
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     5   0     DEBUG  REGTEST: roiWord = 0xaf1f1f19
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: emEnergy = 7019
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: hadEnergy = -9
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: e237= 2955
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: e277= 3824
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: clusterWidth = 0.0213068
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: frac73 = 0.439114
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: e233 = 2017
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: wstot = 11.5079
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: eta = 0.925467
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: phi = -2.29943
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: Eta1 = 0.933708
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: roiWord = 0xaaa11708
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: emEnergy = 1073
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: hadEnergy = 451.024
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: e237= 923
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: e277= 2001
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: clusterWidth = 0.0202742
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: frac73 = 0.197531
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: e233 = 1204
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: wstot = 11.7401
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: eta = 0.373383
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: phi = -1.2267
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: Eta1 = 0.358057
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     7   0     DEBUG  REGTEST: roiWord = 0xae0e1f08
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: emEnergy = 23968
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: hadEnergy = -372
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: e237= 13197
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: e277= 18758
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: clusterWidth = 0.0181611
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: frac73 = 0.369116
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: e233 = 12251
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: wstot = 7.32331
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: eta = -1.16727
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: phi = -2.18836
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: Eta1 = -1.16854
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     8   0     DEBUG  REGTEST: roiWord = 0xa925011b
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: emEnergy = 10276
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: hadEnergy = 228
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e237= 3148
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e277= 4355
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: clusterWidth = 0.0192897
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: frac73 = 0.258845
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e233 = 3185
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: wstot = 6.52753
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: eta = -0.729335
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: phi = 2.29068
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: Eta1 = -0.732269
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: roiWord = 0xa59a1f0e
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: emEnergy = 3640
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: hadEnergy = -248.5
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e237= 1789
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e277= 2525
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: clusterWidth = 0.0186729
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: frac73 = 0.16819
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e233 = 1854
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: wstot = 9.37724
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: eta = -0.403096
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: phi = 2.80318
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: Eta1 = -0.418612
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: roiWord = 0xa5b51f07
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: emEnergy = 6856
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: hadEnergy = 97.5
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e237= 2157
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e277= 3593
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: clusterWidth = 0.0220817
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: frac73 = 0.264512
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e233 = 2369
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: wstot = 6.84194
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: eta = 0.105456
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: phi = 2.95734
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: Eta1 = 0.0979492
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: roiWord = 0xa6321f08
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: emEnergy = 9199
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: hadEnergy = 619.342
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e237= 2613
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e277= 4381
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: clusterWidth = 0.0186962
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: frac73 = 0.690211
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e233 = 1571
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: wstot = 4.34307
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: eta = 1.16894
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: phi = 1.69791
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: Eta1 = 1.17086
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: roiWord = 0xa6850109
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: emEnergy = 22566
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: hadEnergy = 5845
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e237= 11730
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e277= 15461
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: clusterWidth = 0.0159673
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: frac73 = 0.627635
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: e233 = 8676
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: wstot = 9.86083
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: eta = 1.8302
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: phi = 2.73072
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: Eta1 = 1.80997
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: calZ0 = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: quality = 0
-FastCaloL2EgammaAlg                     9   0     DEBUG  REGTEST: roiWord = 0xa72b020c
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/dataScouting.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/dataScouting.ref
index 1dc7e77ade35..f4e539b044df 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/dataScouting.ref
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/dataScouting.ref
@@ -100,6 +100,8 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...0   0     DEBUG Chain HLT_e5_etcut_dataS
 --> Stream tags  = {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 717 words}
+                   {module 0: 2569 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...1   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...1   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...1   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -107,6 +109,8 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...1   0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1531 words}
+                   {module 0: 3626 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...2   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...2   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...2   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -114,6 +118,8 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...2   0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1420 words}
+                   {module 0: 3677 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...3   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...3   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...3   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -121,30 +127,40 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...3   0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1753 words}
+                   {module 0: 3848 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...4   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...4   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...4   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
 --> Stream tags  = {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 865 words}
+                   {module 0: 2798 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...5   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...5   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...5   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
 --> Stream tags  = {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 3085 words}
+                   {module 0: 5423 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...6   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...6   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...6   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
 --> Stream tags  = {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 606 words}
+                   {module 0: 2458 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...7   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...7   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...7   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
 --> Stream tags  = {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1198 words}
+                   {module 0: 3212 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...8   0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...8   0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...8   0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -152,6 +168,10 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...8   0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 754 words}
+                   {module 0: 2687 words}
+--> Payload size = {module 3: 152 words}
+                   {module 0: 1902 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...10  0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...10  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...10  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -159,10 +179,14 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...10  0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1827 words}
+                   {module 0: 3922 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...11  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...11  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
 --> Stream tags  = {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 532 words}
+                   {module 0: 2384 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...12  0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...12  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...12  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -170,6 +194,8 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...12  0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 2456 words}
+                   {module 0: 4875 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...13  0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...13  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...13  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -177,12 +203,20 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...13  0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1605 words}
+                   {module 0: 3538 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...14  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...14  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
 --> Stream tags  = {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 569 words}
+                   {module 0: 2421 words}
+--> Payload size = {module 3: 152 words}
+                   {module 0: 1902 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...16  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 --> Stream tags  = {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
+--> Payload size = {module 3: 717 words}
+                   {module 0: 2569 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...17  0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...17  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...17  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -190,6 +224,10 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...17  0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 1013 words}
+                   {module 0: 2946 words}
+--> Payload size = {module 3: 606 words}
+                   {module 0: 2539 words}
 HLTRMakerAlg.HLTResultMTMaker.StreamT...19  0     DEBUG Chain HLT_e7_etcut_pebtestone ID#2670063038 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0000], SubDets = [] to stream physics_pebtestone
 HLTRMakerAlg.HLTResultMTMaker.StreamT...19  0     DEBUG Chain HLT_e3_etcut_dataScoutingElectronTest_pebtestthree ID#2070680980 adds PEBInfo ROBs = [0x42002e, 0x420060, 0x420064, 0x7c0003], SubDets = [] to stream physics_DSElectronWithPEB
 HLTRMakerAlg.HLTResultMTMaker.StreamT...19  0     DEBUG Chain HLT_e5_etcut_dataScoutingElectronTest ID#1523191700 adds PEBInfo ROBs = [0x7c0003], SubDets = [] to stream physics_dataScoutingElectronTest
@@ -197,3 +235,5 @@ HLTRMakerAlg.HLTResultMTMaker.StreamT...19  0     DEBUG Chain HLT_e5_etcut_dataS
                    {pebtestone, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0000 ], dets = []}
                    {DSElectronWithPEB, physics, obeysLB=1, robs=[0x0042002e 0x00420060 0x00420064 0x007c0003 ], dets = []}
                    {dataScoutingElectronTest, physics, obeysLB=1, robs=[0x007c0003 ], dets = []}
+--> Payload size = {module 3: 2530 words}
+                   {module 0: 4544 words}
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/decodeBS.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/decodeBS.ref
index 617b3d1b586e..fc14a77311d6 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/decodeBS.ref
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/decodeBS.ref
@@ -1,11 +1,31 @@
-Py:inputFilePeeker    INFO stream_names not present in input bytestream file. Giving default name 'StreamRAW'
-TriggerEDMDeserialiserAlg               0   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               0   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 304
-TriggerEDMDeserialiserAlg               0   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               0   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 663
-TriggerEDMDeserialiserAlg               0   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               0   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 610
-FillMissingEDM.egammaCreator            0   0     DEBUG The remap_EgammaCaloDecisions already present
+TrigDeserialiser                        0   0     DEBUG fragment: 1 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: EgammaCaloDecisions size: 69
+TrigDeserialiser                        0   0     DEBUG fragment: 2 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: EgammaCaloDecisionsAux. size: 261
+TrigDeserialiser                        0   0     DEBUG fragment: 3 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 58
+TrigDeserialiser                        0   0     DEBUG fragment: 4 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 5 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: ElectronL2Decisions size: 69
+TrigDeserialiser                        0   0     DEBUG fragment: 6 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: ElectronL2DecisionsAux. size: 605
+TrigDeserialiser                        0   0     DEBUG fragment: 7 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 126
+TrigDeserialiser                        0   0     DEBUG fragment: 8 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 100
+TrigDeserialiser                        0   0     DEBUG fragment: 9 type: xAOD::TrigEMClusterContainer persistent type: xAOD::TrigEMClusterContainer_v1 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClusters size: 69
+TrigDeserialiser                        0   0     DEBUG fragment: 10 type: xAOD::TrigEMClusterAuxContainer persistent type: xAOD::TrigEMClusterAuxContainer_v2 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. size: 663
+TrigDeserialiser                        0   0     DEBUG fragment: 11 type: std::vector<int> persistent type: vector<int> key: viewIndex size: 28
+TrigDeserialiser                        0   0     DEBUG fragment: 12 type: xAOD::TrigElectronContainer persistent type: xAOD::TrigElectronContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFex size: 68
+TrigDeserialiser                        0   0     DEBUG fragment: 13 type: xAOD::TrigElectronAuxContainer persistent type: xAOD::TrigElectronAuxContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. size: 978
+TrigDeserialiser                        0   0     DEBUG fragment: 14 type: std::vector<float> persistent type: vector<float> key: eta size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 15 type: std::vector<float> persistent type: vector<float> key: phi size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 16 type: std::vector<float> persistent type: vector<float> key: rawEnergy size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 17 type: std::vector<float> persistent type: vector<float> key: rawEt size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 18 type: std::vector<float> persistent type: vector<float> key: rawEta size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 19 type: std::vector<int> persistent type: vector<int> key: nCells size: 52
+TrigDeserialiser                        0   0     DEBUG fragment: 20 type: std::vector<float> persistent type: vector<float> key: energy size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 21 type: std::vector<float> persistent type: vector<float> key: et size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 22 type: std::vector<float> persistent type: vector<float> key: e237 size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 23 type: std::vector<float> persistent type: vector<float> key: e277 size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 24 type: std::vector<float> persistent type: vector<float> key: fracs1 size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 25 type: std::vector<float> persistent type: vector<float> key: weta2 size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 26 type: std::vector<float> persistent type: vector<float> key: ehad1 size: 54
+TrigDeserialiser                        0   0     DEBUG fragment: 27 type: std::vector<float> persistent type: vector<float> key: wstot size: 54
+FillMissingEDM.egammaCreator            0   0     DEBUG The remap_EgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            0   0     DEBUG The remap_L2CaloLinks was absent, creating it
 FillMissingEDM.egammaCreator            0   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            0   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
@@ -14,13 +34,34 @@ FillMissingEDM.egammaCreator            0   0     DEBUG The remap_RerunEMRoIDeci
 FillMissingEDM.egammaCreator            0   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
 FillMissingEDM.egammaCreator            0   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
 FillMissingEDM.egammaCreator            0   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               1   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               1   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 641
-TriggerEDMDeserialiserAlg               1   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               1   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 1623
-TriggerEDMDeserialiserAlg               1   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               1   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 2726
-FillMissingEDM.egammaCreator            1   0     DEBUG The remap_EgammaCaloDecisions already present
+TrigDeserialiser                        1   0     DEBUG fragment: 1 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: EgammaCaloDecisions size: 69
+TrigDeserialiser                        1   0     DEBUG fragment: 2 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: EgammaCaloDecisionsAux. size: 557
+TrigDeserialiser                        1   0     DEBUG fragment: 3 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 106
+TrigDeserialiser                        1   0     DEBUG fragment: 4 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 84
+TrigDeserialiser                        1   0     DEBUG fragment: 5 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: ElectronL2Decisions size: 69
+TrigDeserialiser                        1   0     DEBUG fragment: 6 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: ElectronL2DecisionsAux. size: 2273
+TrigDeserialiser                        1   0     DEBUG fragment: 7 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 390
+TrigDeserialiser                        1   0     DEBUG fragment: 8 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 276
+TrigDeserialiser                        1   0     DEBUG fragment: 9 type: xAOD::TrigEMClusterContainer persistent type: xAOD::TrigEMClusterContainer_v1 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClusters size: 69
+TrigDeserialiser                        1   0     DEBUG fragment: 10 type: xAOD::TrigEMClusterAuxContainer persistent type: xAOD::TrigEMClusterAuxContainer_v2 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. size: 1623
+TrigDeserialiser                        1   0     DEBUG fragment: 11 type: std::vector<int> persistent type: vector<int> key: viewIndex size: 40
+TrigDeserialiser                        1   0     DEBUG fragment: 12 type: xAOD::TrigElectronContainer persistent type: xAOD::TrigElectronContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFex size: 68
+TrigDeserialiser                        1   0     DEBUG fragment: 13 type: xAOD::TrigElectronAuxContainer persistent type: xAOD::TrigElectronAuxContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. size: 3002
+TrigDeserialiser                        1   0     DEBUG fragment: 14 type: std::vector<float> persistent type: vector<float> key: eta size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 15 type: std::vector<float> persistent type: vector<float> key: phi size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 16 type: std::vector<float> persistent type: vector<float> key: rawEnergy size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 17 type: std::vector<float> persistent type: vector<float> key: rawEt size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 18 type: std::vector<float> persistent type: vector<float> key: rawEta size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 19 type: std::vector<int> persistent type: vector<int> key: nCells size: 140
+TrigDeserialiser                        1   0     DEBUG fragment: 20 type: std::vector<float> persistent type: vector<float> key: energy size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 21 type: std::vector<float> persistent type: vector<float> key: et size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 22 type: std::vector<float> persistent type: vector<float> key: e237 size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 23 type: std::vector<float> persistent type: vector<float> key: e277 size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 24 type: std::vector<float> persistent type: vector<float> key: fracs1 size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 25 type: std::vector<float> persistent type: vector<float> key: weta2 size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 26 type: std::vector<float> persistent type: vector<float> key: ehad1 size: 142
+TrigDeserialiser                        1   0     DEBUG fragment: 27 type: std::vector<float> persistent type: vector<float> key: wstot size: 142
+FillMissingEDM.egammaCreator            1   0     DEBUG The remap_EgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            1   0     DEBUG The remap_L2CaloLinks was absent, creating it
 FillMissingEDM.egammaCreator            1   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            1   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
@@ -29,13 +70,34 @@ FillMissingEDM.egammaCreator            1   0     DEBUG The remap_RerunEMRoIDeci
 FillMissingEDM.egammaCreator            1   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
 FillMissingEDM.egammaCreator            1   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
 FillMissingEDM.egammaCreator            1   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               2   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               2   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 851
-TriggerEDMDeserialiserAlg               2   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               2   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 2263
-TriggerEDMDeserialiserAlg               2   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               2   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 1622
-FillMissingEDM.egammaCreator            2   0     DEBUG The remap_EgammaCaloDecisions already present
+TrigDeserialiser                        2   0     DEBUG fragment: 1 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: EgammaCaloDecisions size: 69
+TrigDeserialiser                        2   0     DEBUG fragment: 2 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: EgammaCaloDecisionsAux. size: 737
+TrigDeserialiser                        2   0     DEBUG fragment: 3 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 138
+TrigDeserialiser                        2   0     DEBUG fragment: 4 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 104
+TrigDeserialiser                        2   0     DEBUG fragment: 5 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: ElectronL2Decisions size: 69
+TrigDeserialiser                        2   0     DEBUG fragment: 6 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: ElectronL2DecisionsAux. size: 1969
+TrigDeserialiser                        2   0     DEBUG fragment: 7 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 354
+TrigDeserialiser                        2   0     DEBUG fragment: 8 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 252
+TrigDeserialiser                        2   0     DEBUG fragment: 9 type: xAOD::TrigEMClusterContainer persistent type: xAOD::TrigEMClusterContainer_v1 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClusters size: 69
+TrigDeserialiser                        2   0     DEBUG fragment: 10 type: xAOD::TrigEMClusterAuxContainer persistent type: xAOD::TrigEMClusterAuxContainer_v2 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. size: 2263
+TrigDeserialiser                        2   0     DEBUG fragment: 11 type: std::vector<int> persistent type: vector<int> key: viewIndex size: 48
+TrigDeserialiser                        2   0     DEBUG fragment: 12 type: xAOD::TrigElectronContainer persistent type: xAOD::TrigElectronContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFex size: 68
+TrigDeserialiser                        2   0     DEBUG fragment: 13 type: xAOD::TrigElectronAuxContainer persistent type: xAOD::TrigElectronAuxContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. size: 2726
+TrigDeserialiser                        2   0     DEBUG fragment: 14 type: std::vector<float> persistent type: vector<float> key: eta size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 15 type: std::vector<float> persistent type: vector<float> key: phi size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 16 type: std::vector<float> persistent type: vector<float> key: rawEnergy size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 17 type: std::vector<float> persistent type: vector<float> key: rawEt size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 18 type: std::vector<float> persistent type: vector<float> key: rawEta size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 19 type: std::vector<int> persistent type: vector<int> key: nCells size: 128
+TrigDeserialiser                        2   0     DEBUG fragment: 20 type: std::vector<float> persistent type: vector<float> key: energy size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 21 type: std::vector<float> persistent type: vector<float> key: et size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 22 type: std::vector<float> persistent type: vector<float> key: e237 size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 23 type: std::vector<float> persistent type: vector<float> key: e277 size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 24 type: std::vector<float> persistent type: vector<float> key: fracs1 size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 25 type: std::vector<float> persistent type: vector<float> key: weta2 size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 26 type: std::vector<float> persistent type: vector<float> key: ehad1 size: 130
+TrigDeserialiser                        2   0     DEBUG fragment: 27 type: std::vector<float> persistent type: vector<float> key: wstot size: 130
+FillMissingEDM.egammaCreator            2   0     DEBUG The remap_EgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            2   0     DEBUG The remap_L2CaloLinks was absent, creating it
 FillMissingEDM.egammaCreator            2   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            2   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
@@ -44,13 +106,34 @@ FillMissingEDM.egammaCreator            2   0     DEBUG The remap_RerunEMRoIDeci
 FillMissingEDM.egammaCreator            2   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
 FillMissingEDM.egammaCreator            2   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
 FillMissingEDM.egammaCreator            2   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               3   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               3   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 629
-TriggerEDMDeserialiserAlg               3   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               3   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 1623
-TriggerEDMDeserialiserAlg               3   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               3   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 3186
-FillMissingEDM.egammaCreator            3   0     DEBUG The remap_EgammaCaloDecisions already present
+TrigDeserialiser                        3   0     DEBUG fragment: 1 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: EgammaCaloDecisions size: 69
+TrigDeserialiser                        3   0     DEBUG fragment: 2 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: EgammaCaloDecisionsAux. size: 545
+TrigDeserialiser                        3   0     DEBUG fragment: 3 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 106
+TrigDeserialiser                        3   0     DEBUG fragment: 4 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 84
+TrigDeserialiser                        3   0     DEBUG fragment: 5 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: ElectronL2Decisions size: 69
+TrigDeserialiser                        3   0     DEBUG fragment: 6 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: ElectronL2DecisionsAux. size: 2457
+TrigDeserialiser                        3   0     DEBUG fragment: 7 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 462
+TrigDeserialiser                        3   0     DEBUG fragment: 8 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 324
+TrigDeserialiser                        3   0     DEBUG fragment: 9 type: xAOD::TrigEMClusterContainer persistent type: xAOD::TrigEMClusterContainer_v1 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClusters size: 69
+TrigDeserialiser                        3   0     DEBUG fragment: 10 type: xAOD::TrigEMClusterAuxContainer persistent type: xAOD::TrigEMClusterAuxContainer_v2 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. size: 1623
+TrigDeserialiser                        3   0     DEBUG fragment: 11 type: std::vector<int> persistent type: vector<int> key: viewIndex size: 40
+TrigDeserialiser                        3   0     DEBUG fragment: 12 type: xAOD::TrigElectronContainer persistent type: xAOD::TrigElectronContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFex size: 68
+TrigDeserialiser                        3   0     DEBUG fragment: 13 type: xAOD::TrigElectronAuxContainer persistent type: xAOD::TrigElectronAuxContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. size: 3554
+TrigDeserialiser                        3   0     DEBUG fragment: 14 type: std::vector<float> persistent type: vector<float> key: eta size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 15 type: std::vector<float> persistent type: vector<float> key: phi size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 16 type: std::vector<float> persistent type: vector<float> key: rawEnergy size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 17 type: std::vector<float> persistent type: vector<float> key: rawEt size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 18 type: std::vector<float> persistent type: vector<float> key: rawEta size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 19 type: std::vector<int> persistent type: vector<int> key: nCells size: 164
+TrigDeserialiser                        3   0     DEBUG fragment: 20 type: std::vector<float> persistent type: vector<float> key: energy size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 21 type: std::vector<float> persistent type: vector<float> key: et size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 22 type: std::vector<float> persistent type: vector<float> key: e237 size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 23 type: std::vector<float> persistent type: vector<float> key: e277 size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 24 type: std::vector<float> persistent type: vector<float> key: fracs1 size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 25 type: std::vector<float> persistent type: vector<float> key: weta2 size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 26 type: std::vector<float> persistent type: vector<float> key: ehad1 size: 166
+TrigDeserialiser                        3   0     DEBUG fragment: 27 type: std::vector<float> persistent type: vector<float> key: wstot size: 166
+FillMissingEDM.egammaCreator            3   0     DEBUG The remap_EgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            3   0     DEBUG The remap_L2CaloLinks was absent, creating it
 FillMissingEDM.egammaCreator            3   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            3   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
@@ -59,13 +142,34 @@ FillMissingEDM.egammaCreator            3   0     DEBUG The remap_RerunEMRoIDeci
 FillMissingEDM.egammaCreator            3   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
 FillMissingEDM.egammaCreator            3   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
 FillMissingEDM.egammaCreator            3   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               4   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               4   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 419
-TriggerEDMDeserialiserAlg               4   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               4   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 983
-TriggerEDMDeserialiserAlg               4   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               4   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 886
-FillMissingEDM.egammaCreator            4   0     DEBUG The remap_EgammaCaloDecisions already present
+TrigDeserialiser                        4   0     DEBUG fragment: 1 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: EgammaCaloDecisions size: 69
+TrigDeserialiser                        4   0     DEBUG fragment: 2 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: EgammaCaloDecisionsAux. size: 365
+TrigDeserialiser                        4   0     DEBUG fragment: 3 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 74
+TrigDeserialiser                        4   0     DEBUG fragment: 4 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 64
+TrigDeserialiser                        4   0     DEBUG fragment: 5 type: xAOD::TrigCompositeContainer persistent type: xAOD::TrigCompositeContainer_v1 key: ElectronL2Decisions size: 69
+TrigDeserialiser                        4   0     DEBUG fragment: 6 type: xAOD::TrigCompositeAuxContainer persistent type: xAOD::TrigCompositeAuxContainer_v2 key: ElectronL2DecisionsAux. size: 953
+TrigDeserialiser                        4   0     DEBUG fragment: 7 type: std::vector<std::vector<unsigned int> > persistent type: vector<vector<unsigned int> > key: remap_linkCollKeys size: 174
+TrigDeserialiser                        4   0     DEBUG fragment: 8 type: std::vector<std::vector<unsigned short> > persistent type: vector<vector<unsigned short> > key: remap_linkCollIndices size: 132
+TrigDeserialiser                        4   0     DEBUG fragment: 9 type: xAOD::TrigEMClusterContainer persistent type: xAOD::TrigEMClusterContainer_v1 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClusters size: 69
+TrigDeserialiser                        4   0     DEBUG fragment: 10 type: xAOD::TrigEMClusterAuxContainer persistent type: xAOD::TrigEMClusterAuxContainer_v2 key: HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. size: 983
+TrigDeserialiser                        4   0     DEBUG fragment: 11 type: std::vector<int> persistent type: vector<int> key: viewIndex size: 32
+TrigDeserialiser                        4   0     DEBUG fragment: 12 type: xAOD::TrigElectronContainer persistent type: xAOD::TrigElectronContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFex size: 68
+TrigDeserialiser                        4   0     DEBUG fragment: 13 type: xAOD::TrigElectronAuxContainer persistent type: xAOD::TrigElectronAuxContainer_v1 key: HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. size: 1346
+TrigDeserialiser                        4   0     DEBUG fragment: 14 type: std::vector<float> persistent type: vector<float> key: eta size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 15 type: std::vector<float> persistent type: vector<float> key: phi size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 16 type: std::vector<float> persistent type: vector<float> key: rawEnergy size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 17 type: std::vector<float> persistent type: vector<float> key: rawEt size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 18 type: std::vector<float> persistent type: vector<float> key: rawEta size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 19 type: std::vector<int> persistent type: vector<int> key: nCells size: 68
+TrigDeserialiser                        4   0     DEBUG fragment: 20 type: std::vector<float> persistent type: vector<float> key: energy size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 21 type: std::vector<float> persistent type: vector<float> key: et size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 22 type: std::vector<float> persistent type: vector<float> key: e237 size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 23 type: std::vector<float> persistent type: vector<float> key: e277 size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 24 type: std::vector<float> persistent type: vector<float> key: fracs1 size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 25 type: std::vector<float> persistent type: vector<float> key: weta2 size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 26 type: std::vector<float> persistent type: vector<float> key: ehad1 size: 70
+TrigDeserialiser                        4   0     DEBUG fragment: 27 type: std::vector<float> persistent type: vector<float> key: wstot size: 70
+FillMissingEDM.egammaCreator            4   0     DEBUG The remap_EgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            4   0     DEBUG The remap_L2CaloLinks was absent, creating it
 FillMissingEDM.egammaCreator            4   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
 FillMissingEDM.egammaCreator            4   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
@@ -74,228 +178,3 @@ FillMissingEDM.egammaCreator            4   0     DEBUG The remap_RerunEMRoIDeci
 FillMissingEDM.egammaCreator            4   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
 FillMissingEDM.egammaCreator            4   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
 FillMissingEDM.egammaCreator            4   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               5   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               5   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 954
-TriggerEDMDeserialiserAlg               5   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               5   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 2583
-TriggerEDMDeserialiserAlg               5   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               5   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 4474
-FillMissingEDM.egammaCreator            5   0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            5   0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            5   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            5   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            5   0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            5   0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            5   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            5   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            5   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               6   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               6   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 308
-TriggerEDMDeserialiserAlg               6   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               6   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 663
-TriggerEDMDeserialiserAlg               6   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               6   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 1070
-FillMissingEDM.egammaCreator            6   0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            6   0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            6   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            6   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            6   0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            6   0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            6   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            6   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            6   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               7   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               7   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 522
-TriggerEDMDeserialiserAlg               7   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               7   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 1303
-TriggerEDMDeserialiserAlg               7   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               7   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 2910
-FillMissingEDM.egammaCreator            7   0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            7   0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            7   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            7   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            7   0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            7   0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            7   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            7   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            7   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               8   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               8   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 427
-TriggerEDMDeserialiserAlg               8   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               8   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 983
-TriggerEDMDeserialiserAlg               8   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               8   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 702
-FillMissingEDM.egammaCreator            8   0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            8   0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            8   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            8   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            8   0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            8   0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            8   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            8   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            8   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               9   0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               9   0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 183
-TriggerEDMDeserialiserAlg               9   0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               9   0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 343
-TriggerEDMDeserialiserAlg               9   0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               9   0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 334
-FillMissingEDM.egammaCreator            9   0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            9   0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            9   0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            9   0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            9   0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            9   0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            9   0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            9   0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            9   0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               10  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               10  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 661
-TriggerEDMDeserialiserAlg               10  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               10  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 1623
-TriggerEDMDeserialiserAlg               10  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               10  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 3370
-FillMissingEDM.egammaCreator            10  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            10  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            10  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            10  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            10  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            10  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            10  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            10  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            10  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               11  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               11  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 304
-TriggerEDMDeserialiserAlg               11  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               11  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 663
-TriggerEDMDeserialiserAlg               11  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               11  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 702
-FillMissingEDM.egammaCreator            11  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            11  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            11  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            11  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            11  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            11  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            11  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            11  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            11  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               12  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               12  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 1093
-TriggerEDMDeserialiserAlg               12  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               12  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 2903
-TriggerEDMDeserialiserAlg               12  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               12  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 3738
-FillMissingEDM.egammaCreator            12  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            12  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            12  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            12  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            12  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            12  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            12  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            12  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            12  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               13  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               13  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 431
-TriggerEDMDeserialiserAlg               13  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               13  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 983
-TriggerEDMDeserialiserAlg               13  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               13  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 2358
-FillMissingEDM.egammaCreator            13  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            13  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            13  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            13  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            13  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            13  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            13  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            13  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            13  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               14  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               14  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 308
-TriggerEDMDeserialiserAlg               14  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               14  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 663
-TriggerEDMDeserialiserAlg               14  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               14  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 610
-FillMissingEDM.egammaCreator            14  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            14  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            14  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            14  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            14  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            14  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            14  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            14  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            14  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               15  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               15  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 183
-TriggerEDMDeserialiserAlg               15  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               15  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 343
-TriggerEDMDeserialiserAlg               15  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               15  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 334
-FillMissingEDM.egammaCreator            15  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            15  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            15  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            15  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            15  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            15  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            15  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            15  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            15  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               16  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               16  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 300
-TriggerEDMDeserialiserAlg               16  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               16  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 663
-TriggerEDMDeserialiserAlg               16  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               16  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 978
-FillMissingEDM.egammaCreator            16  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            16  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            16  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            16  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            16  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            16  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            16  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            16  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            16  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               17  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               17  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 431
-TriggerEDMDeserialiserAlg               17  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               17  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 983
-TriggerEDMDeserialiserAlg               17  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               17  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 1254
-FillMissingEDM.egammaCreator            17  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            17  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            17  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            17  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            17  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            17  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            17  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            17  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            17  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               18  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               18  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 427
-TriggerEDMDeserialiserAlg               18  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               18  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 983
-TriggerEDMDeserialiserAlg               18  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               18  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 702
-FillMissingEDM.egammaCreator            18  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            18  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            18  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            18  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            18  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            18  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            18  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            18  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            18  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
-TriggerEDMDeserialiserAlg               19  0     DEBUG fragment: clid, type, key, size 1333228823 xAOD::TrigCompositeContainer xAOD::TrigCompositeContainer_v1 remap_EgammaCaloDecisions 69
-TriggerEDMDeserialiserAlg               19  0     DEBUG fragment: clid, type, key, size 1175586382 xAOD::TrigCompositeAuxContainer xAOD::TrigCompositeAuxContainer_v1 remap_EgammaCaloDecisionsAux. 526
-TriggerEDMDeserialiserAlg               19  0     DEBUG fragment: clid, type, key, size 1264979038 xAOD::TrigEMClusterContainer xAOD::TrigEMClusterContainer_v1 HLT_xAOD__TrigEMClusterContainer_L2CaloClusters 69
-TriggerEDMDeserialiserAlg               19  0     DEBUG fragment: clid, type, key, size 1111649561 xAOD::TrigEMClusterAuxContainer xAOD::TrigEMClusterAuxContainer_v2 HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. 1303
-TriggerEDMDeserialiserAlg               19  0     DEBUG fragment: clid, type, key, size 1119645201 xAOD::TrigElectronContainer xAOD::TrigElectronContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFex 68
-TriggerEDMDeserialiserAlg               19  0     DEBUG fragment: clid, type, key, size 1180743572 xAOD::TrigElectronAuxContainer xAOD::TrigElectronAuxContainer_v1 HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. 3186
-FillMissingEDM.egammaCreator            19  0     DEBUG The remap_EgammaCaloDecisions already present
-FillMissingEDM.egammaCreator            19  0     DEBUG The remap_L2CaloLinks was absent, creating it
-FillMissingEDM.egammaCreator            19  0     DEBUG The remap_FilteredEgammaCaloDecisions was absent, creating it
-FillMissingEDM.egammaCreator            19  0     DEBUG The remap_FilteredEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            19  0     DEBUG The remap_EMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            19  0     DEBUG The remap_RerunEMRoIDecisions was absent, creating it
-FillMissingEDM.egammaCreator            19  0     DEBUG The HLT_xAOD__TrigElectronContainer_L2ElectronFex already present
-FillMissingEDM.egammaCreator            19  0     DEBUG The HLT_xAOD__TrigEMClusterContainer_L2CaloClusters already present
-FillMissingEDM.egammaCreator            19  0     DEBUG The HLT_xAOD_TrackParticleContainer_L2ElectronTracks was absent, creating it
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/dummy_regtest.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/dummy_regtest.ref
new file mode 100644
index 000000000000..ef4f2acce475
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/dummy_regtest.ref
@@ -0,0 +1 @@
+Py:Athena            INFO leaving with code 0: "successful run"
\ No newline at end of file
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_run_data.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_cf.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/egamma_run_data.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/egamma_cf.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menuALLTE.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_bjet.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/bjet_menuALLTE.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_bjet.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/electron_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_electron.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/electron_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_electron.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/jet_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_jet.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/jet_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_jet.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_met.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/met_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_met.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_mu.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/mu_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_mu.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_photon.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/photon_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_photon.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/tau_menu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_tau.ref
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/tau_menu.ref
rename to Trigger/TrigValidation/TrigUpgradeTest/share/slice_tau.ref
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh
index f6c9952ed980..f8b94600a0f8 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh
@@ -4,10 +4,17 @@
 #
 # Trigger ART test execution script based on TriggerTest/test/exec_athena_art_trigger_validation.sh
 #
-echo $(date "+%FT%H:%M %Z")"     Execute Athena test ${NAME}"
 
 ### DEFAULTS
 
+if [ -z "${NAME}" ]; then
+  testname=$(basename $0)
+  testname=${testname#test_}
+  testname=${testname%.sh}
+  export NAME=${testname}
+fi
+echo $(date "+%FT%H:%M %Z")"     Execute Athena test ${NAME}"
+
 if [ -z ${EVENTS} ]; then
   export EVENTS="1000"
 fi
@@ -37,7 +44,12 @@ if [ -z ${SLOTS} ]; then
 fi
 
 if [ -z ${STDCMATH} ] || [ ${STDCMATH} -eq 0 ]; then
-  export MATHLIBOPT="--imf"
+  if [ -f ${ATLASMKLLIBDIR_PRELOAD}/libimf.so ]; then
+    export MATHLIBOPT="--imf"
+  else
+    echo "!!! WARNING !!! Intel math library is not available, using standard cmath library instead. This may lead to differences in test results."
+    export MATHLIBOPT="--stdcmath"
+  fi
 else
   export MATHLIBOPT="--stdcmath"
 fi
@@ -47,9 +59,13 @@ fi
 if [[ $INPUT == "run2data" ]]; then
   export DS="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"
 elif [[ $INPUT == "run2dataFTK" ]]; then
-    export DS="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0002.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0003.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0004.1"
+  export DS="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0002.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0003.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.MissingTowers._lb0151._SFO-6._0004.1"
 elif [[ $INPUT == "run2mc_ttbar" ]]; then
   export DS="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000002.pool.root.1"
+elif [[ $INPUT == "none" ]]; then
+  export DS=""
+elif [[ -f $INPUT ]]; then
+  export DS=${INPUT}
 else
   echo "ERROR: input not defined, cannot run"
   echo "art-result: 1"
@@ -83,6 +99,6 @@ fi
 ######################################
 
 export ATH_RETURN=$?
-echo "art-result: ${ATH_RETURN} ${JOB_LOG%%.*}"
+echo "art-result: ${ATH_RETURN} ${JOB_LOG%.*}"
 echo  $(date "+%FT%H:%M %Z")"     Done executing Athena test ${NAME} with result ${ATH_RETURN}"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh
index e6bc7ed40cb9..800619cd2deb 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh
@@ -31,6 +31,14 @@ if [ -z ${TEST} ]; then
   export TEST="TrigUpgradeTest"
 fi
 
+if [ -z ${ESDTOCHECK} ]; then
+  export ESDTOCHECK="ESD.pool.root"
+fi
+
+if [ -z ${AODTOCHECK} ]; then
+  export AODTOCHECK="AOD.pool.root"
+fi
+
 if [ -z ${REF_FOLDER} ]; then
   # Try eos first
   export REF_FOLDER="/eos/atlas/atlascerngroupdisk/data-art/grid-input/${TEST}/ref/${BRANCH}/test_${NAME}"
@@ -91,23 +99,47 @@ fi
 
 mv ${REGTESTREF_BASENAME} ${REGTESTREF_BASENAME}.new
 
+### ROOTCOMP
+
 if [ -f ${REF_FOLDER}/expert-monitoring.root ]; then
   echo $(date "+%FT%H:%M %Z")"     Running rootcomp"
   timeout 10m rootcomp.py --skip="TIME_" ${REF_FOLDER}/expert-monitoring.root expert-monitoring.root 2>&1 | tee rootcompout.log
   echo "art-result: ${PIPESTATUS[0]} RootComp"
 else
   echo $(date "+%FT%H:%M %Z")"     No reference expert-monitoring.root found in ${REF_FOLDER}"
-  echo "art-result:  999 RootComp"
+  echo "art-result: 999 RootComp"
 fi
 
 ### CHAINDUMP
+# SKIP_CHAIN_DUMP=1 skips this step
 
 # Using temporary workaround to dump HLTChain.txt
-if [ -f expert-monitoring.root ]; then
+if [ -f expert-monitoring.root ] && [ $[SKIP_CHAIN_DUMP] != 1 ]; then
   echo "Running chainDumpWorkaround.sh"
   chainDumpWorkaround.sh expert-monitoring.root
 fi
 
+### CHECKFILE
+
+if [ -f ${ESDTOCHECK} ]; then
+  echo $(date "+%FT%H:%M %Z")"     Running CheckFile on ESD"
+  timeout 10m checkFile.py ${ESDTOCHECK} 2>&1 | tee ${ESDTOCHECK}.checkFile
+  echo "art-result: ${PIPESTATUS[0]} CheckFileESD"
+else
+  echo $(date "+%FT%H:%M %Z")"     No ESD file to check"
+fi
+
+if [ -f ${AODTOCHECK} ]; then
+  echo $(date "+%FT%H:%M %Z")"     Running CheckFile on AOD"
+  timeout 10m checkFile.py ${AODTOCHECK} 2>&1 | tee ${AODTOCHECK}.checkFile
+  echo "art-result: ${PIPESTATUS[0]} CheckFileAOD"
+  echo $(date "+%FT%H:%M %Z")"     Running CheckxAOD AOD"
+  timeout 10m checkxAOD.py ${AODTOCHECK} 2>&1 | tee ${AODTOCHECK}.checkxAOD
+  echo "art-result: ${PIPESTATUS[0]} CheckXAOD"
+else
+  echo $(date "+%FT%H:%M %Z")"     No AOD file to check"
+fi
+
 ### SUMMARY
 
 echo  $(date "+%FT%H:%M %Z")"     Files in directory:"
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh
deleted file mode 100755
index e7223ee44411..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menuALLTE.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena --imf --threads=1 --skipEvents=0 --evtMax=100 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/bjet.menu.ALLTE.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_only_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_only_data.sh
deleted file mode 100755
index e948a135e0a5..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_only_data.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-# art-include: master/Athena
-
-athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/Calo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh
deleted file mode 100755
index 3b152864251b..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_ringer_only_data.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-# art-include: master/Athena
-
-athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/CaloRinger.py
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh
deleted file mode 100755
index c6c4f2cdeb32..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c 'doID=False' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_dataScouting.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_dataScouting.sh
deleted file mode 100755
index 8602f451be4c..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_dataScouting.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena --imf --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/dataScoutingTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh
deleted file mode 100755
index 8817b4186142..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-#
-
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-#clear BS from previous runs
-rm -rf  data_test.*
-athena  --threads=1 --skipEvents=10 --evtMax=5 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py
-
-rm -rf  myESDfromBS.pool.root
-
-FNAME=data_test.00327265.Single_Stream.daq.RAW._lb0100._Athena._0000.data 
-if [ -f ${FNAME} ]
-then
-    athena --imf --threads=1  --filesInput=${FNAME} -c "doL1Unpacking=False" TrigUpgradeTest/decodeBS.py &&
-	checkxAOD.py myESDfromBS.pool.root
-    
-else
-    echo "missing input BS file, preceeding test failed"
-    exit -1
-fi
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh
deleted file mode 100755
index 92815815073f..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-#clear BS from previous runs 
-rm -rf  data_test.*.data
-athena --imf --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py &&
-checkxAOD.py myESD.pool.root &&
-athena --imf --threads=1 TrigUpgradeTest/checkESD.py 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh
index 6c7a0cbd88c2..6d5877ca2b14 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
-# art-type: build
-# art-include: master/Athena
+
+# This is not an ART test, but a unit test
+
+# This test should be a unit test in the L1Decoder package
 
 athena.py --imf --threads=1 TrigUpgradeTest/EmuL1DecodingTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_newjo.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_newjo.sh
deleted file mode 100755
index b7e616872764..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_newjo.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-get_files -jo TrigUpgradeTest/EmuNewJOTest.py
-python EmuNewJOTest.py # generate pickle
-status=$?
-if [ ${status} -ne 0 ]
-then
-    echo "ERROR in configuration generation stage, stopping"
-    exit -1
-else
-    echo
-    echo "JOs reading stage finished, launching Athena from pickle file"
-    echo
-    athena EmuNewJOTest.pkl
-fi
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh
index ea907b0e7600..64ec45503c53 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
-# art-type: build
-# art-include: master/Athena
+
+# This is not an ART test, but a unit test
+
+# This is a unit test of HLT Control Flow and should be moved to TriggerMenuMT
 
 athena.py --imf --threads=1 TrigUpgradeTest/EmuStepProcessingTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh
index 539b1c7d6711..91c52aae7ece 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh
@@ -1,23 +1,6 @@
-#!/bin/sh
-# art-description: athenaMT trigger test using the full menu from TrigUpgradeTest job options
-# art-type: build
-# art-include: master/Athena
-# art-output: *.log
-# art-output: *.new
-# art-output: *.txt
-# art-output: *.root
+#!/bin/bash
 
-export NAME="TrigUpgradeTest_full_menu_build"
-export SKIPEVENTS=10
-export EVENTS=20
-export THREADS=1
-export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
-export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
-
-# Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/full_menu_build.ref`
-
-source exec_TrigUpgradeTest_art_athenaMT.sh
-source exec_TrigUpgradeTest_art_post.sh
+# This test has been renamed to test_trigUpgr_full_menu_build.sh, but CI still invokes
+# the old name. Once the CI configuration is updated, this script can be deleted.
 
+test_trigUpgr_full_menu_build.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh
deleted file mode 100755
index cff0040d9f6d..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh
deleted file mode 100755
index d3f168dd8668..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c 'doCalo=False' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh
deleted file mode 100755
index 3e0e4acbdca1..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena.py --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1" -c 'doCalo=False;' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet.sh
deleted file mode 100755
index e357430184d5..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-# art-include: master/Athena
-
-# 10 events
-athena.py --imf --threads=1 --evtMax=10 --skipEvents=5 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c 'doID=False' TrigUpgradeTest/simpleJetJob.py 
-
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_l1sim.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_l1sim.sh
deleted file mode 100755
index a5d7905e38e8..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_l1sim.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena.py --imf --threads=1 -c "doL1Sim=True" --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1" TrigUpgradeTest/testHLT_MT.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh
index af08d800a948..ac2886a6d042 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
-# art-type: build
-# art-include: master/Athena
+
+# This is not an ART test, but a unit test
+
+# This is a unit test of HLT Control Flow and should be moved to TriggerMenuMT
 
 athena.py --imf --threads=1 TrigUpgradeTest/mergeTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromCells.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromCells.sh
deleted file mode 100755
index 8a72880f844e..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromCells.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-
-athena --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/met.fromCells.py 
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClusters.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClusters.sh
deleted file mode 100755
index 369f7a86fdec..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClusters.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-
-athena --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/met.fromClusters.py 
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClustersPufit.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClustersPufit.sh
deleted file mode 100755
index 58d3ea4d426e..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromClustersPufit.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-
-athena --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/met.fromClustersPufit.py 
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromJets.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromJets.sh
deleted file mode 100755
index affe41f4e69e..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_fromJets.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-ci: master
-
-athena --imf --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/met.fromJets.py 
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh
deleted file mode 100755
index 9aee0dfbc31b..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-
-### BSfile ###
-athena --imf --threads=1 --skipEvents=50 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" -c 'doL2ISO=False' TrigUpgradeTest/mu.withViews.py
-### RDOfile ###
-#athena --threads=1 -c 'EvtMax=50;FilesInput="/afs/cern.ch/user/s/shhayash/workspace/public/RDOfile/ttbar/RDO_TRIG.root"' TrigUpgradeTest/mu.withViews.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh
index 9d3c881f8bd4..6148cde83e1b 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh
@@ -1,49 +1,6 @@
-#!/bin/sh
-# art-description: athenaMT trigger test running the new-style job options from TrigUpgradeTest
-# art-type: build
-# art-include: master/Athena
-# art-output: *.log
-# art-output: *.root
-# art-output: *.regtest.new
+#!/bin/bash
 
-export NAME="TrigUpgradeTest_newJO_build"
-export SKIPEVENTS=30
-export EVENTS=20
-export THREADS=1
-export SLOTS=1
-export JOBOPTION="newJOtest.pkl"
-export FROMPICKLE=1
-export REGTESTEXP=".*ERROR (?\!attempt to add a duplicate).*|.*FATAL.*|.*newJOtest.pkl.*|TrigSignatureMo.*INFO.*"
-
-# Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/newJO_build.ref`
-
-get_files -remove -jo TrigUpgradeTest/newJOtest.py
-
-echo $(date "+%FT%H:%M %Z")"     Generate pickle file for test ${NAME}"
-python newJOtest.py &> athena.pickle.log # generate pickle
-status=$?
-
-if [ ${status} -ne 0 ]; then
-    echo "ERROR in configuration generation stage, stopping"
-    echo "art-result: 1 Configuration"
-    export ATH_RETURN=1
-    export JOB_LOG="athena.pickle.log"
-else
-    echo
-    echo "JOs reading stage finished, launching Athena from pickle file"
-    echo "art-result: 0 Configuration"
-    echo 
-    source exec_TrigUpgradeTest_art_athenaMT.sh
-
-    # Merge log files for post-processing
-    JOB_LOG_MERGED="athena.merged.log"
-    echo "### athena.pickle.log ###" > ${JOB_LOG_MERGED}
-    cat athena.pickle.log >> ${JOB_LOG_MERGED}
-    echo "### ${JOB_LOG} ###"
-    cat ${JOB_LOG} >> ${JOB_LOG_MERGED}
-    export JOB_LOG=${JOB_LOG_MERGED}
-fi
-
-source exec_TrigUpgradeTest_art_post.sh
+# This test has been renamed to test_trigUpgr_newJO_build.sh, but CI still invokes
+# the old name. Once the CI configuration is updated, this script can be deleted.
 
+test_trigUpgr_newJO_build.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_peb.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_peb.sh
deleted file mode 100755
index 99c4c05abfe7..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_peb.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena --imf --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/pebTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh
deleted file mode 100755
index 61bedc272ca0..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_ringer_chain.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egammaRinger.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_runMenuTest.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_runMenuTest.sh
deleted file mode 100755
index 700fe6515c48..000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_runMenuTest.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# art-type: build
-# art-include: master/Athena
-
-athena --imf --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/runMenuTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh
new file mode 100755
index 000000000000..548ddcc14f9e
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# art-description: athenaMT trigger test with bjet ALLTE chains
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=100
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/bjet.menu.ALLTE.py"
+export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/bjet_menu_ALLTE.ref`
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_cf_build.sh
new file mode 100755
index 000000000000..4a9cba4067b6
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_cf_build.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using IDCalo job options with doID=False
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/IDCalo.py"
+export EXTRA="doID=False"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh
new file mode 100755
index 000000000000..82fd556c0b1a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_only_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# art-description: athenaMT trigger test with only calo algorithms
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/Calo.py"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh
new file mode 100755
index 000000000000..18bc6f649d7f
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_calo_ringer_only_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# art-description: athenaMT trigger test running only ringer
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/CaloRinger.py"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_dataScouting_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_dataScouting_build.sh
new file mode 100755
index 000000000000..92a7a1ebc9be
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_dataScouting_build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of the data scouting (TLA) infrastructure
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=10
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/dataScoutingTest.py"
+export REGTESTEXP="obeysLB=.*robs=.*dets = |adds PEBInfo|TriggerSummary.*HLT_.*|Serialiser.*Type|Serialiser.*ROBFragments with IDs|{module.*words}"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/dataScouting.ref`
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.sh
new file mode 100755
index 000000000000..43f2f053a9d5
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of BS decoding
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+# Common settings for all steps
+export EVENTS=5
+export THREADS=1
+export SLOTS=1
+
+# Remove the BS file from previous run
+rm -rf data_test.*
+
+# Step 1 - RDO to BS
+export SKIPEVENTS=10
+export JOB_LOG="athena.RDOtoBS.log"
+export JOBOPTION="TrigUpgradeTest/egamma.withViews.py"
+source exec_TrigUpgradeTest_art_athenaMT.sh
+
+# Remove the ESD file from previous run
+rm -rf  myESDfromBS.pool.root
+
+# Step 2 - BS to ESD
+export SKIPEVENTS=0
+export JOB_LOG="athena.BStoESD.log"
+export INPUT="data_test.00327265.Single_Stream.daq.RAW._lb0100._Athena._0000.data"
+export JOBOPTION="TrigUpgradeTest/decodeBS.py"
+export EXTRA="doL1Unpacking=False"
+source exec_TrigUpgradeTest_art_athenaMT.sh
+
+# Step 3 - post-processing of the results
+export REGTESTEXP="FillMissingEDM.*(present|absent)|TrigDeserialiser.*fragment.*type"
+export REGTESTREF=`find_data.py TrigUpgradeTest/decodeBS.ref`
+export ESDTOCHECK="myESDfromBS.pool.root"
+export AODTOCHECK="myESDfromBS.pool.root"
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_cf_build.sh
new file mode 100755
index 000000000000..4e0bce969312
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_cf_build.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using the egamma.withViews.py job options
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=10
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/egamma.withViews.py"
+export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*|Fragment size"
+export REGTESTREF=`find_data.py TrigUpgradeTest/egamma_cf.ref` # Find the regtest reference installed with the release
+export ESDTOCHECK="myESD.pool.root"
+export AODTOCHECK="myESD.pool.root"
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
+
+# Extra step running checkESD job options
+export JOB_LOG="athena.checkESD.log"
+export JOBOPTION="TrigUpgradeTest/checkESD.py"
+export INPUT=${ESDTOCHECK}
+export SKIPEVENTS=0
+source exec_TrigUpgradeTest_art_athenaMT.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh
new file mode 100755
index 000000000000..efead6c2737d
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_egamma_ringer_cf_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of egamma sequence with ringer
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=10
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/egammaRinger.py"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_newjo_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_newjo_build.sh
new file mode 100755
index 000000000000..0e9782813229
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_newjo_build.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+# art-description: athenaMT trigger test running the new-style job options EmuNewJOTest.py
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export JOBOPTION="EmuNewJOTest.pkl"
+export FROMPICKLE=1
+export REGTESTEXP="TrigSignatureMo.*INFO HLT_.*"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/emu_newjo.ref`
+
+get_files -remove -jo TrigUpgradeTest/EmuNewJOTest.py
+
+echo $(date "+%FT%H:%M %Z")"     Generate pickle file ${JOBOPTION}"
+python EmuNewJOTest.py &> athena.pickle.log # generate pickle
+status=$?
+
+if [ ${status} -ne 0 ]; then
+    echo "ERROR in configuration generation stage, stopping"
+    echo "art-result: 1 Configuration"
+    export ATH_RETURN=1
+    export JOB_LOG="athena.pickle.log"
+else
+    echo
+    echo "JOs reading stage finished, launching Athena from pickle file"
+    echo "art-result: 0 Configuration"
+    echo 
+    source exec_TrigUpgradeTest_art_athenaMT.sh
+
+    # Merge log files for post-processing
+    JOB_LOG_MERGED="athena.merged.log"
+    echo "### athena.pickle.log ###" > ${JOB_LOG_MERGED}
+    cat athena.pickle.log >> ${JOB_LOG_MERGED}
+    echo "### ${JOB_LOG} ###"
+    cat ${JOB_LOG} >> ${JOB_LOG_MERGED}
+    export JOB_LOG=${JOB_LOG_MERGED}
+fi
+
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh
new file mode 100755
index 000000000000..03d8cd449b7a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using the full menu from TrigUpgradeTest job options
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=10
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/full_menu_build.ref`
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_grid.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh
similarity index 93%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_grid.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh
index 3863165902b5..c211a0a3ed73 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_grid.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the full menu from TrigUpgradeTest job options
 # art-type: grid
 # art-include: master/Athena
@@ -7,7 +7,6 @@
 # art-output: *.txt
 # art-output: *.root
 
-export NAME="full_menu_grid"
 export INPUT="run2dataFTK" # FTK doesn't matter here - using this dataset because of larger stats
 export EVENTS=1000
 export THREADS=1
@@ -17,4 +16,3 @@ export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSi
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_calo_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_calo_cf_build.sh
new file mode 100755
index 000000000000..037ce23424de
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_calo_cf_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using IDCalo job options
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/IDCalo.py"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_build.sh
new file mode 100755
index 000000000000..cf284274b143
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_build.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using IDCalo job options with doCalo=False
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/IDCalo.py"
+export EXTRA="doCalo=False"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_mc_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_mc_build.sh
new file mode 100755
index 000000000000..656b801a8bc0
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_id_cf_mc_build.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# art-description: athenaMT trigger test on MC using IDCalo job options with doCalo=False
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=0
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export INPUT="run2mc_ttbar"
+export JOBOPTION="TrigUpgradeTest/IDCalo.py"
+export EXTRA="doCalo=False"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_jet_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_jet_build.sh
new file mode 100755
index 000000000000..75f56506ea88
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_jet_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using simpleJetJob job options
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=5
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/simpleJetJob.py"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_l1sim_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_l1sim_build.sh
new file mode 100755
index 000000000000..07380ce80a82
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_l1sim_build.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# art-description: athenaMT trigger test on MC running only L1 simulation algorithms
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export INPUT="run2mc_ttbar"
+export JOBOPTION="TrigUpgradeTest/testHLT_MT.py"
+export EXTRA="doL1Sim=True"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromCells_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromCells_build.sh
new file mode 100755
index 000000000000..9dd067f52773
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromCells_build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of MET from cells algorithm
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/met.fromCells.py"
+export REGTESTEXP="METHypoAlg.*MET.*value"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/met_fromCells.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClustersPufit_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClustersPufit_build.sh
new file mode 100755
index 000000000000..a9c279c1f87f
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClustersPufit_build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of MET pufit algorithm
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/met.fromClustersPufit.py"
+export REGTESTEXP="METHypoAlg.*MET.*value"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/met_fromClustersPufit.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClusters_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClusters_build.sh
new file mode 100755
index 000000000000..1e453500537c
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromClusters_build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of MET from clusters algorithm
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/met.fromClusters.py"
+export REGTESTEXP="METHypoAlg.*MET.*value"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/met_fromClusters.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromJets_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromJets_build.sh
new file mode 100755
index 000000000000..207cc642e816
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_met_fromJets_build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of MET from jets algorithm
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/met.fromJets.py"
+export REGTESTEXP="METHypoAlg.*MET.*value"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/met_fromJets.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_mu_cf_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_mu_cf_build.sh
new file mode 100755
index 000000000000..1e6e03c8015a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_mu_cf_build.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using mu.withViews.py job options
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=50
+export EVENTS=10
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/mu.withViews.py"
+export EXTRA="doL2ISO=False"
+
+# This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
+export REGTESTEXP="leaving with code"
+export REGTESTREF=`find_data.py TrigUpgradeTest/dummy_regtest.ref`
+
+# Skip dumping chain counts because this test doesn't produce the histogram including them
+export SKIP_CHAIN_DUMP=1
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_newJO_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_newJO_build.sh
new file mode 100755
index 000000000000..a670f1aecd0c
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_newJO_build.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+# art-description: athenaMT trigger test running the new-style job options from TrigUpgradeTest
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.root
+# art-output: *.regtest.new
+
+export SKIPEVENTS=30
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="newJOtest.pkl"
+export FROMPICKLE=1
+export REGTESTEXP=".*ERROR (?\!attempt to add a duplicate).*|.*FATAL.*|.*newJOtest.pkl.*|TrigSignatureMo.*INFO.*"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/newJO_build.ref`
+
+get_files -remove -jo TrigUpgradeTest/newJOtest.py
+
+echo $(date "+%FT%H:%M %Z")"     Generate pickle file for test ${NAME}"
+python newJOtest.py &> athena.pickle.log # generate pickle
+status=$?
+
+if [ ${status} -ne 0 ]; then
+    echo "ERROR in configuration generation stage, stopping"
+    echo "art-result: 1 Configuration"
+    export ATH_RETURN=1
+    export JOB_LOG="athena.pickle.log"
+else
+    echo
+    echo "JOs reading stage finished, launching Athena from pickle file"
+    echo "art-result: 0 Configuration"
+    echo 
+    source exec_TrigUpgradeTest_art_athenaMT.sh
+
+    # Merge log files for post-processing
+    JOB_LOG_MERGED="athena.merged.log"
+    echo "### athena.pickle.log ###" > ${JOB_LOG_MERGED}
+    cat athena.pickle.log >> ${JOB_LOG_MERGED}
+    echo "### ${JOB_LOG} ###"
+    cat ${JOB_LOG} >> ${JOB_LOG_MERGED}
+    export JOB_LOG=${JOB_LOG_MERGED}
+fi
+
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_peb_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_peb_build.sh
new file mode 100755
index 000000000000..372d0f089486
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_peb_build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# art-description: athenaMT trigger test of the data scouting (TLA) infrastructure
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=10
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/pebTest.py"
+export REGTESTEXP="obeysLB=.*robs=.*dets = |adds PEBInfo|TriggerSummary.*HLT_.*"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/peb.ref`
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_runMenuTest_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_runMenuTest_build.sh
new file mode 100755
index 000000000000..c82206247946
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_runMenuTest_build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# art-description: athenaMT trigger test using runMenuTest.py job options
+# art-type: build
+# art-include: master/Athena
+# art-output: *.log
+# art-output: *.new
+# art-output: *.txt
+# art-output: *.root
+
+export SKIPEVENTS=10
+export EVENTS=20
+export THREADS=1
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/runMenuTest.py"
+export REGTESTEXP=".*ERROR (?\!attempt to add a duplicate).*|(?\!IOVSvcTool).*FATAL.*|TrigSignatureMoniMT .*INFO.*"
+
+# Find the regtest reference installed with the release
+export REGTESTREF=`find_data.py TrigUpgradeTest/runMenuTest.ref`
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh
similarity index 79%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh
index 6c2910022afc..209abb4bee2f 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_bjet_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the bjet menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_bjet_menu"
 export SKIPEVENTS=0
 export EVENTS=100
 export THREADS=1
@@ -16,8 +16,7 @@ export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doBJetSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/bjet_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_bjet.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_electron_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_electron_build.sh
similarity index 78%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_electron_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_electron_build.sh
index e77e86a040b2..a88daef4e81b 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_electron_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_electron_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the electron menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_electron_menu"
 export SKIPEVENTS=10
 export EVENTS=20
 export THREADS=1
@@ -16,8 +16,7 @@ export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doElectronSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/electron_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_electron.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh
similarity index 79%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh
index d977b70ae122..a06b74123788 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the jet menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_jet_menu"
 export SKIPEVENTS=10
 export EVENTS=20
 export THREADS=1
@@ -16,8 +16,7 @@ export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doJetSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/jet_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_jet.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh
similarity index 78%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_met_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh
index 4ae0ff6f3a36..ebe865b64d72 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_met_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the MET menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_met_menu"
 export EVENTS=50
 export THREADS=1
 export SLOTS=1
@@ -15,8 +15,7 @@ export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doMETSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/met_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_met.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh
similarity index 80%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh
index 158ff66758ec..a814152131ef 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the muon menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_mu_menu_build"
 export SKIPEVENTS=50
 export EVENTS=10
 export THREADS=1
@@ -16,8 +16,7 @@ export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSi
 export EXTRA="doEmptyMenu=True;doMuonSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/mu_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_mu.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_photon_build.sh
similarity index 80%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_photon_build.sh
index afdf0b2b0034..f56a648b48c6 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_photon_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the photon menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_photon_menu"
 export SKIPEVENTS=0
 export EVENTS=10
 export THREADS=1
@@ -16,8 +16,7 @@ export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSi
 export EXTRA="doEmptyMenu=True;doPhotonSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/photon_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_photon.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_tau_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh
similarity index 80%
rename from Trigger/TrigValidation/TrigUpgradeTest/test/test_tau_menu.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh
index d63438886c9c..8e1b28a6249c 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_tau_menu.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # art-description: athenaMT trigger test using the tau menu from TrigUpgradeTest job options
 # art-type: build
 # art-include: master/Athena
 # art-output: *.log
+# art-output: *.new
+# art-output: *.txt
 # art-output: *.root
-# art-output: *.regtest.new
 
-export NAME="TrigUpgradeTest_tau_menu"
 export SKIPEVENTS=10
 export EVENTS=20
 export THREADS=1
@@ -16,8 +16,7 @@ export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSi
 export EXTRA="doEmptyMenu=True;doTauSlice=True"
 
 # Find the regtest reference installed with the release
-export REGTESTREF=`find_data.py TrigUpgradeTest/tau_menu.ref`
+export REGTESTREF=`find_data.py TrigUpgradeTest/slice_tau.ref`
 
 source exec_TrigUpgradeTest_art_athenaMT.sh
 source exec_TrigUpgradeTest_art_post.sh
-
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh
index 5f69c724fd0e..8637d81c2680 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_view_schedule.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
-# art-type: build
-# art-include: master/Athena
+
+# This is not an ART test, but a unit test
+
+# This should be tested in AthViews rather that in TrigUpgradeTest
 
 if [ -z ${THREADS+x} ]; then export THREADS=2; fi
 athena.py --threads=$THREADS AthViews/ViewScheduling.py
diff --git a/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py b/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py
new file mode 100755
index 000000000000..65a26c990367
--- /dev/null
+++ b/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py
@@ -0,0 +1,219 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#
+
+import sys
+import os
+import logging
+import argparse
+import re
+import shutil
+import subprocess
+import json
+from contextlib import contextmanager
+
+
+@contextmanager
+def remember_cwd():
+    '''Simple pushd/popd replacement from https://stackoverflow.com/a/169112'''
+    curdir = os.getcwd()
+    try:
+        yield
+    finally:
+        os.chdir(curdir)
+
+
+def package_prefix(package):
+    '''Returns a prefix included in names of all tests from the given package'''
+    dict = {'TriggerTest':      'trig_',
+            'TrigP1Test':       'trigP1_',
+            'TrigAnalysisTest': 'trigAna_',
+            'TrigUpgradeTest':  'trigUpgr_'}
+    if package in dict:
+        return dict[package]
+    else:
+        return None
+
+
+def minimal_pattern(package):
+    dict = {'TriggerTest':      None,
+            'TrigP1Test':       None,
+            'TrigAnalysisTest': None,
+            'TrigUpgradeTest':  '(trigUpgr_full_menu_build|trigUpgr_newJO_build)'}
+    if package in dict and dict[package] is not None:
+        return dict[package]
+    else:
+        logging.error(
+            "Minimal set of tests for %s is not defined.",
+            "Please select specific tests using the name patter (option -n).")
+        exit(1)
+
+
+def find_scripts(patterns):
+    scripts = []
+    for path in os.environ['PATH'].split(':'):
+        try:
+            files = os.listdir(path)
+        except:
+            continue
+        for filename in files:
+            matched = True
+            for patt in patterns:
+                if re.search(patt, filename) is None:
+                    matched = False
+                    break
+            if matched:
+                scripts.append(path+'/'+filename)
+    scripts.sort()
+    return scripts
+
+
+def get_parser():
+    parser = argparse.ArgumentParser(usage='%(prog)s [options] PackageName')
+    parser.add_argument('package',
+                        metavar='PackageName',
+                        help='Name of the package from which to run ART tests. Options are: %(choices)s',
+                        choices=['TriggerTest', 'TrigAnalysisTest', 'TrigP1Test', 'TrigUpgradeTest'])
+    parser.add_argument('-m', '--minimal',
+                        action='store_true',
+                        help='Run a small pre-defined set of tests for basic verification')
+    parser.add_argument('-n', '--testName',
+                        metavar='pattern',
+                        help='Run only tests with a given pattern in the name')
+    parser.add_argument('-t', '--artType',
+                        metavar='type',
+                        default='build',
+                        choices=['build', 'grid'],
+                        help='Run tests with the given art-type: build (default) or grid')
+    parser.add_argument('-j', '--maxJobs',
+                        metavar='N',
+                        type=int,
+                        default=1,
+                        help='Run up to N tests in parallel (actual number may be limited by ART based on available CPUs and memory)')
+    parser.add_argument('-v', '--verbose',
+                        action='store_true',
+                        help='Increase output verbosity')
+    return parser
+
+
+def get_patterns(args):
+    patterns = ['^test_', '(.sh|.py)$', package_prefix(args.package)]
+    if args.testName:
+        patterns.append(args.testName)
+    if args.artType == 'grid':
+        patterns.append('_grid.')
+    else:
+        patterns.append('_build.')
+    if args.minimal:
+        patterns.append(minimal_pattern(args.package))
+
+    logging.debug("Searching for scripts with the following patterns: %s", patterns)
+    return patterns
+
+
+def analyse_results(all_test_results):
+    '''Prints a summary table of all results and returns two lists. One includes names of failed tests,
+    the other names of tests in which only the RootComp step failed. If only RootComp fails, the test is
+    not added to the first list, as we currently do not enforce updating RootComp references on every change.'''
+    failed_tests = []
+    failed_rootcomp = []  # rootcomp failures are ignored at the moment
+    table = {}  # test name : results
+    for test_name in all_test_results.keys():
+        results = all_test_results[test_name]['result']
+        result_string = ""
+        for step in results:
+            result_string += "%s: %d, " % (step['name'], step['result'])
+            if step['result'] != 0:
+                if step['name'] == 'RootComp' and test_name not in failed_rootcomp:
+                    failed_rootcomp.append(test_name)
+                elif test_name not in failed_tests:
+                    failed_tests.append(test_name)
+        table[test_name] = result_string[:-2]
+    max_len_col1 = len(max(table.keys(), key=len))
+    max_len_col2 = len(max(table.values(), key=len))
+    logging.info('-'*(max_len_col1+max_len_col2+7))
+    for k, v in table.iteritems():
+        logging.info('| {col1:<{width1}} | {col2:<{width2}} |'.format(
+            col1=k, width1=max_len_col1,
+            col2=v, width2=max_len_col2))
+    logging.info('-'*(max_len_col1+max_len_col2+7))
+    return failed_tests, failed_rootcomp
+
+
+def print_summary(all_test_results, failed_tests, failed_rootcomp):
+    if len(failed_rootcomp) > 0:
+        logging.info(
+            "RootComp failed in %d tests, but this step is currently ignored\n",
+            len(failed_rootcomp))
+    if len(failed_tests) > 0:
+        logging.info(
+            "%d tests succeeded out of %d executed",
+            len(all_test_results)-len(failed_tests),
+            len(all_test_results))
+        logging.error("==================================================")
+        logging.error("The following %d tests failed:", len(failed_tests))
+        for test_name in failed_tests:
+            logging.error("    %s", test_name)
+        logging.error("==================================================")
+    else:
+        logging.info("==================================================")
+        logging.info("All %d executed tests succeeded", len(all_test_results))
+        logging.info("==================================================")
+
+
+def main():
+    args = get_parser().parse_args()
+    logging.basicConfig(stream=sys.stdout,
+                        format='%(levelname)-8s %(message)s',
+                        level=logging.DEBUG if args.verbose else logging.INFO)
+
+    scripts = find_scripts(get_patterns(args))
+    logging.info("The following %d tests will be executed: ", len(scripts))
+    for filename in scripts:
+        logging.info("    %s", os.path.basename(filename))
+
+    topdir = 'runTrigART'
+    success = True
+    with remember_cwd():
+        shutil.rmtree(topdir, ignore_errors=True)
+        os.mkdir(topdir)
+        os.chdir(topdir)
+        os.mkdir('test')
+        for script_path in scripts:
+            target = 'test/' + os.path.basename(script_path)
+            os.symlink(script_path, target)
+
+        # Run ART
+        cmd = ["art.py", "run", "-q",
+               "--max-jobs=%d" % args.maxJobs,
+               "--type=%s" % args.artType,
+               ".", "results"]
+        s = " "
+        logging.info("Executing ART command: %s", s.join(cmd))
+        subprocess.call(cmd)
+        logging.info("ART finished, analysing the results\n")
+
+        # Read the result summary from JSON
+        statusfile = 'results/status.json'
+        if not os.path.isfile(statusfile):
+            logging.error("ART status.json file is missing - likely the ART runner failed!")
+            exit(1)
+        with open(statusfile, 'r') as f:
+            status_data = json.load(f)
+            all_test_results = status_data['.']
+            if len(all_test_results) != len(scripts):
+                logging.warning("Selected %d tests but ART executed only %d. Please check why some tests did not run!")
+            failed_tests, failed_rootcomp = analyse_results(all_test_results)
+            print_summary(all_test_results, failed_tests, failed_rootcomp)
+            if len(failed_tests) > 0:
+                success = False
+
+    if not success:
+        exit(1)
+    else:
+        exit(0)
+
+
+if "__main__" in __name__:
+    sys.exit(main())
-- 
GitLab


From f1b6c679957cc2024e7b96c4d8da80c972b3b5d1 Mon Sep 17 00:00:00 2001
From: John Kenneth Anders <john.kenneth.anders@cern.ch>
Date: Fri, 3 May 2019 12:06:14 +0000
Subject: [PATCH 088/129] Merge branch 'update_FCSV2_parametrization_v011' into
 '21.0'

Update to the latest version of FastCalosimV2 parametrization (ATLASSIM-4164)

See merge request atlas/athena!23140

(cherry picked from commit 973fb395df2752248c9d0a7636898376f24d9d4a)

74925635 Updating to latest parametrization file
---
 .../python/ISF_FastCaloSimJobProperties.py                      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py
index 450c9152236c..4eb49db5f1d7 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/ISF_FastCaloSimJobProperties.py
@@ -60,7 +60,7 @@ class ParamsInputFilename(JobProperty):
     """ Filename of the input parametrizations file. """
     statusOn     = True
     allowedTypes = ['str']
-    StoredValue  = 'FastCaloSim/MC16/TFCSparam_v010.root'
+    StoredValue  = 'FastCaloSim/MC16/TFCSparam_v011.root'
 
 ##-----------------------------------------------------------------------------
 ## 2nd step
-- 
GitLab


From 123c387f10223e2ae68a845db1324ff4f3f0de7b Mon Sep 17 00:00:00 2001
From: Walter Lampl <walter.lampl@cern.ch>
Date: Sat, 4 May 2019 07:47:31 +0000
Subject: [PATCH 089/129] Add method IOVDbSvcConfig.addFolderList

---
 Database/IOVDbSvc/python/IOVDbSvcConfig.py | 86 ++++++++++++----------
 1 file changed, 49 insertions(+), 37 deletions(-)

diff --git a/Database/IOVDbSvc/python/IOVDbSvcConfig.py b/Database/IOVDbSvc/python/IOVDbSvcConfig.py
index 21c54e4a0506..f673bc2a5269 100644
--- a/Database/IOVDbSvc/python/IOVDbSvcConfig.py
+++ b/Database/IOVDbSvc/python/IOVDbSvcConfig.py
@@ -76,58 +76,70 @@ def IOVDbSvcCfg(configFlags):
 
 
 #Convenience method to add folders:
-
 def addFolders(configFlags,folderstrings,detDb=None,className=None,extensible=False,tag=None):
-    """Add access to the given set of folders, in the identified subdetector schema.
-If EXTENSIBLE is set, then if we access an open-ended IOV at the end of the list,
-the end time for this range will be set to just past the current event.
-Subsequent accesses will update this end time for subsequent events.
-This allows the possibility of later adding a new IOV using IOVSvc::setRange."""
-
     #Convenience hack: Allow a single string as parameter:
     if isinstance(folderstrings,str):
-        folderstrings=[folderstrings,]
+        return addFolderList(configFlags,((folderstrings,detDb,className),),extensible)
+
+    else: #Got a list of folders
+        folderdefs=[]
+
+        for fs in folderstrings:
+            if tag is not None:
+                fs+= '<tag>%s</tag>' % tag
+        
+            folderdefs.append((fs,detDb,className))
+        
+    return addFolderList(configFlags,folderdefs,extensible)
+    
+
+
+
+
+def addFolderList(configFlags,listOfFolderInfoTuple,extensible=False):
+    """Add access to the given set of folders, in the identified subdetector schema.
+    FolerInfoTuple consists of (foldername,detDB,classname)
+
+    If EXTENSIBLE is set, then if we access an open-ended IOV at the end of the list,
+    the end time for this range will be set to just past the current event.
+    Subsequent accesses will update this end time for subsequent events.
+    This allows the possibility of later adding a new IOV using IOVSvc::setRange."""
 
-    #Add tag if present
-    if tag is not None:
-        folderstrings=[_ + ('<tag>%s</tag>' % tag) for _ in folderstrings]
 
     result=IOVDbSvcCfg(configFlags)
-    iovDbSvc=result()
+    iovDbSvc=result.getPrimary()
 
+    loadFolders=[]
 
-    #Add class-name to CondInputLoader (if reqired)
-    if className is not None:
-        loadFolders=[]
-        for fs in folderstrings:
-            loadFolders.append((className, _extractFolder(fs)));
-        result.getCondAlgo("CondInputLoader").Load+=loadFolders
-        #result.addCondAlgo(CondInputLoader(Load=loadFolders))
+    for (fs,detDb,className) in listOfFolderInfoTuple:
+       
+        #Add class-name to CondInputLoader (if reqired)
+        if className is not None:
+            loadFolders.append((className, _extractFolder(fs)))
 
+    
+        if detDb is not None and fs.find("<db>")==-1:
+            dbname=configFlags.IOVDb.DatabaseInstance
+            if not detDb in _dblist.keys():
+                raise ConfigurationError("Error, db shorthand %s not known")
+            #Append database string to folder-name
+            fs+="<db>"+_dblist[detDb]+"/"+dbname+"</db>"
+    
+        if extensible:
+            fs = fs + '<extensible/>'
+    
+        #Append (modified) folder-name string to IOVDbSvc Folders property
+        iovDbSvc.Folders.append(fs)
+
+
+    if len(loadFolders)>0:
+        result.getCondAlgo("CondInputLoader").Load+=loadFolders
         from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
         apcs=AthenaPoolCnvSvc()
         result.addService(apcs)
         from GaudiSvc.GaudiSvcConf import EvtPersistencySvc
         result.addService(EvtPersistencySvc("EventPersistencySvc",CnvServices=[apcs.getFullJobOptName(),]))
 
-    
-    if detDb is not None:
-        dbname=configFlags.IOVDb.DatabaseInstance
-        if not detDb in _dblist.keys():
-            raise ConfigurationError("Error, db shorthand %s not known")
-        dbstr="<db>"+_dblist[detDb]+"/"+dbname+"</db>"
-    else:
-        dbstr=""
-    
-    
-    for fs in folderstrings:
-        if extensible:
-            fs = fs + '<extensible/>'
-        if fs.find("<db>")==-1:
-            iovDbSvc.Folders.append(fs+dbstr)
-        else:
-            iovDbSvc.Folders.append(fs)
-
     return result
     
 def addFoldersSplitOnline(configFlags, detDb, online_folders, offline_folders, className=None, addMCString="_OFL"):
-- 
GitLab


From 2266a4d5013f336e9055a555dd6768586d128879 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Sat, 4 May 2019 14:08:16 +0100
Subject: [PATCH 090/129] Remove seemingly  un-needed const_cast

---
 .../LArRecConditions/LArRecConditions/LArHVPathology.h    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArHVPathology.h b/LArCalorimeter/LArRecConditions/LArRecConditions/LArHVPathology.h
index 9a575f1f4cfa..b874152a2ad2 100644
--- a/LArCalorimeter/LArRecConditions/LArRecConditions/LArHVPathology.h
+++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArHVPathology.h
@@ -20,8 +20,12 @@ class LArHVPathology
   LArHVPathology(const LArHVPathologiesDb* in);
   virtual ~LArHVPathology() {}
 
-  const std::vector<LArHVPathologiesDb::LArHVElectPathologyDb> &getPathology() const {return const_cast<std::vector<LArHVPathologiesDb::LArHVElectPathologyDb> &> (m_v);}
-  std::map<std::pair<Identifier, unsigned int>, std::vector<unsigned short> > &getElecMap() {return m_electIndMap;}
+  const std::vector<LArHVPathologiesDb::LArHVElectPathologyDb>& getPathology() const {
+    return m_v;
+  }
+  std::map<std::pair<Identifier, unsigned int>, std::vector<unsigned short> >&getElecMap() {
+    return m_electIndMap;
+  }
 
  private:
   std::vector<LArHVPathologiesDb::LArHVElectPathologyDb> m_v;
-- 
GitLab


From ad82dd8d16c753508a134ebd686eaa5b6966042a Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Sat, 4 May 2019 18:00:39 +0000
Subject: [PATCH 091/129] Fix job options file name

---
 .../TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh
index 548ddcc14f9e..d3cc98b41652 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_bjet_menu_ALLTE_build.sh
@@ -11,7 +11,7 @@ export SKIPEVENTS=0
 export EVENTS=100
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/bjet.menu.ALLTE.py"
+export JOBOPTION="TrigUpgradeTest/bjet_menu_ALLTE.py"
 export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 
 # Find the regtest reference installed with the release
-- 
GitLab


From 735b22f6692c9ecfddcd42e8f2e9cbf22e92815f Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 3 May 2019 16:37:20 +0200
Subject: [PATCH 092/129] TrigT2CaloEgamma: Remove reference to
 CaloLumiBCIDTool.

Remove remaining (now-unused) reference to obsolete tool CaloLumiBCIDTool.
---
 .../TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py        | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
index d79887d98b7a..22ce1f2ad7fd 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
@@ -3,7 +3,6 @@
 #
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaReFastAlgo
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-from CaloTools.CaloLumiBCIDConfig import CaloLUMIBCIDToolCfg
 
 
 def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False):
@@ -18,8 +17,6 @@ def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False):
     from TileConditions.TileConditionsConfig import tileCondCfg
     acc.merge( tileCondCfg( flags ) )    
 
-    acc.merge( CaloLUMIBCIDToolCfg( flags ) ) # this tool is required by the LArCellCont - 
-
     # configure tools (this can be simplified further,
     from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReEmEnFex, EgammaReHadEnFex, EgammaReSamp1Fex, EgammaReSamp2Fex
 
-- 
GitLab


From ffb212e88eab8498a7a1fd0a08dd099cb3bdb585 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 3 May 2019 16:48:25 +0200
Subject: [PATCH 093/129] CaloCalibHitRec: Avoid EventContext TLS lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 .../CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx
index 1bda7a34440e..bd66b91c6e29 100644
--- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx
+++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx
@@ -413,7 +413,7 @@ CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx,
 
   // reading particle information for later calcution of calibration enegry fraction caused
   // by particles of different types
-  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainerReadHandle(m_truthParticleContainerKey);
+  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainerReadHandle(m_truthParticleContainerKey, ctx);
 
   if (doCalibFrac && !truthParticleContainerReadHandle.isValid()){
     ATH_MSG_WARNING("Invalid read handle to TruthParticleContainer with key: " << m_truthParticleContainerKey.key());
-- 
GitLab


From 52e58fceec85bec949a719555e848cbed0f378cb Mon Sep 17 00:00:00 2001
From: Walter Lampl <walter.lampl@cern.ch>
Date: Sun, 5 May 2019 15:36:14 +0000
Subject: [PATCH 094/129] CaloMuonLikelihoodTool: Use TrackEnergyInCaloTool as
 private tool

---
 .../CaloTrkMuIdTools/src/CaloMuonLikelihoodTool.cxx        | 7 +------
 .../MuonCombinedRecExample/python/MuonCaloTagTool.py       | 6 +++---
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/CaloMuonLikelihoodTool.cxx b/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/CaloMuonLikelihoodTool.cxx
index b430d097ded7..47acfd11237e 100644
--- a/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/CaloMuonLikelihoodTool.cxx
+++ b/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/CaloMuonLikelihoodTool.cxx
@@ -5,11 +5,6 @@
 #include "CaloTrkMuIdTools/CaloMuonLikelihoodTool.h"
 
 #include "xAODCaloEvent/CaloCluster.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/ListItem.h"
-#include "GaudiKernel/AlgTool.h"
-#include "GaudiKernel/Algorithm.h"
 #include "PathResolver/PathResolver.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "AthenaKernel/Units.h"
@@ -35,7 +30,7 @@ namespace Units = Athena::Units;
 ///////////////////////////////////////////////////////////////////////////////
 CaloMuonLikelihoodTool::CaloMuonLikelihoodTool(const std::string& type, const std::string& name, const IInterface* parent) : 
   AthAlgTool(type,name,parent),
-  m_trkEnergyInCalo("TrackEnergyInCaloTool"),
+  m_trkEnergyInCalo("TrackEnergyInCaloTool",this),
   m_fileNames{"CaloMuonLikelihood.PDF.A0.root", "CaloMuonLikelihood.PDF.A1.root", 
   "CaloMuonLikelihood.PDF.A2.root", "CaloMuonLikelihood.PDF.B0.root", "CaloMuonLikelihood.PDF.B1.root",
   "CaloMuonLikelihood.PDF.B2.root", "CaloMuonLikelihood.PDF.C0.root", "CaloMuonLikelihood.PDF.C1.root",
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
index a8a5b63dbfb7..33dd3b96fe21 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCaloTagTool.py
@@ -3,7 +3,7 @@
 ### JobOptions to run MuonCaloTag in xAOD
 
 from AthenaCommon import CfgMgr
-from AthenaCommon.CfgGetter import getPublicTool,getService
+from AthenaCommon.CfgGetter import getPublicTool,getService, getPrivateTool
 
 ###logfile
 from AthenaCommon.Logging import log
@@ -44,7 +44,7 @@ def TrackDepositInCaloTool( name ='TrackDepositInCaloTool', **kwargs ):
     return CfgMgr.TrackDepositInCaloTool(name,**kwargs)
 
 def CaloMuonLikelihoodTool(name='CaloMuonLikelihoodTool', **kwargs ):
-    kwargs.setdefault("TrackEnergyInCaloTool", getPublicTool("TrackEnergyInCaloTool") )
+    kwargs.setdefault("TrackEnergyInCaloTool", getPrivateTool("TrackEnergyInCaloTool") )
     return CfgMgr.CaloMuonLikelihoodTool(name,**kwargs)
 
 def MuonCaloTagTool( name='MuonCaloTagTool', **kwargs ):  
@@ -54,7 +54,7 @@ def MuonCaloTagTool( name='MuonCaloTagTool', **kwargs ):
     CaloMuonTagTight = ConfiguredCaloMuonTag(name = "CaloMuonTag")
     kwargs.setdefault("CaloMuonTagLoose",       CaloMuonTagLoose )
     kwargs.setdefault("CaloMuonTagTight",       CaloMuonTagTight )
-    kwargs.setdefault("CaloMuonLikelihoodTool", getPublicTool("CaloMuonLikelihoodTool") )
+    kwargs.setdefault("CaloMuonLikelihoodTool", getPrivateTool("CaloMuonLikelihoodTool") )
     kwargs.setdefault("TrackDepositInCaloTool", getPublicTool("TrackDepositInCaloTool") )
     kwargs.setdefault("TrackSelectorTool",      getPublicTool("CaloTrkMuIdAlgTrackSelectorTool") )
     kwargs.setdefault("doCaloLR",               True )
-- 
GitLab


From 875ba21294d0df64d3dbaa17929b9e3aa0b2e338 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 3 May 2019 16:54:10 +0200
Subject: [PATCH 095/129] ViewAlgs: Avoid EventContext TLS lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx    | 2 +-
 .../ViewAlgs/src/EventViewCreatorAlgorithmWithJets.cxx          | 2 +-
 .../ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
index 7a2fcc77d51e..3275985a015d 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
@@ -33,7 +33,7 @@ StatusCode EventViewCreatorAlgorithm::execute( const EventContext& context ) con
   ATH_CHECK (decisionInputToOutput(context, outputHandles));
 
   // make the views
-  auto viewsHandle = SG::makeHandle( m_viewsKey ); 
+  auto viewsHandle = SG::makeHandle( m_viewsKey, context ); 
   auto viewVector1 = std::make_unique< ViewContainer >();
   ATH_CHECK( viewsHandle.record(  std::move( viewVector1 ) ) );
   auto viewVector = viewsHandle.ptr();
diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithJets.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithJets.cxx
index 9277e968fe29..bac978a93439 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithJets.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithJets.cxx
@@ -34,7 +34,7 @@ StatusCode EventViewCreatorAlgorithmWithJets::execute( const EventContext& conte
   ATH_CHECK (decisionInputToOutput(context, outputHandles));
 
   // make the views
-  auto viewsHandle = SG::makeHandle( m_viewsKey ); 
+  auto viewsHandle = SG::makeHandle( m_viewsKey, context ); 
   auto viewVector1 = std::make_unique< ViewContainer >();
   ATH_CHECK( viewsHandle.record(  std::move( viewVector1 ) ) );
   auto viewVector = viewsHandle.ptr();
diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx
index 673e4a00c139..8138af1ce4f7 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithmWithMuons.cxx
@@ -38,7 +38,7 @@ StatusCode EventViewCreatorAlgorithmWithMuons::execute( const EventContext& cont
   ATH_CHECK (decisionInputToOutput(context, outputHandles));
 
   // make the views
-  auto viewsHandle = SG::makeHandle( m_viewsKey ); 
+  auto viewsHandle = SG::makeHandle( m_viewsKey, context ); 
   auto viewVector1 = std::make_unique< ViewContainer >();
   ATH_CHECK( viewsHandle.record(  std::move( viewVector1 ) ) );
   auto viewVector = viewsHandle.ptr();
-- 
GitLab


From 98851e3fe45880e329b191baf91583894f1e13a3 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 3 May 2019 16:55:02 +0200
Subject: [PATCH 096/129] PixelConditionsAlgorithms: Avoid EventContext TLS
 lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 .../src/SpecialPixelMapCondAlg.cxx                          | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/SpecialPixelMapCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/SpecialPixelMapCondAlg.cxx
index 052303a79ff4..39fcdb919919 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/SpecialPixelMapCondAlg.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/SpecialPixelMapCondAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SpecialPixelMapCondAlg.h"
@@ -212,7 +212,7 @@ StatusCode SpecialPixelMapCondAlg::execute (const EventContext& ctx) const
 
         DetectorSpecialPixelMap* overlay =nullptr;
         DetectorSpecialPixelMap* maskoverlay=nullptr;
-        SG::ReadCondHandle<CondAttrListCollection> overlayfolder(m_overlayFolder);
+        SG::ReadCondHandle<CondAttrListCollection> overlayfolder(m_overlayFolder, ctx);
         std::vector<EventIDRange> overlayRanges;
         EventIDRange r;
         if(!overlayfolder.range(r)) {
@@ -234,7 +234,7 @@ StatusCode SpecialPixelMapCondAlg::execute (const EventContext& ctx) const
         }
         if( !m_overlayLongFolder.key().empty() ) {
             DetectorSpecialPixelMap* overlaylong = nullptr;
-            SG::ReadCondHandle<CondAttrListCollection> overlayfolder(m_overlayLongFolder);
+            SG::ReadCondHandle<CondAttrListCollection> overlayfolder(m_overlayLongFolder, ctx);
             EventIDRange r;
             if(!overlayfolder.range(r)) {
                ATH_MSG_ERROR("Failed to retrieve validity range for " << overlayfolder.key());
-- 
GitLab


From ae6df4d342bef129c38a21a59f63fd0e2f8cc1f0 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 3 May 2019 16:55:16 +0200
Subject: [PATCH 097/129] TrigOutputHandling: Avoid EventContext TLS lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
index e475f5eca3f5..6bddf3b3fa18 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
@@ -1,6 +1,6 @@
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -216,7 +216,7 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const Co
 	for ( ; viewCollKeyIter != handles.views.end(); ++viewCollKeyIter, ++inViewCollKeyIter ) {
 	  // get the views handle
 
-	  auto viewsHandle = SG::makeHandle( *viewCollKeyIter );
+	  auto viewsHandle = SG::makeHandle( *viewCollKeyIter, context );
 	  if ( viewsHandle.isValid() ) {	    
 	    ATH_MSG_DEBUG("Will be merging from " << viewsHandle->size() << " views " << viewCollKeyIter->key() << " view container using key " << inViewCollKeyIter->key() );
 	    CHECK( (this->*merger)( *viewsHandle, *inViewCollKeyIter , context, *generator.data.get() ) );
@@ -225,7 +225,7 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const Co
 	  }
 	}      
       }
-      auto writeHandle = SG::makeHandle( writeHandleKey );
+      auto writeHandle = SG::makeHandle( writeHandleKey, context );
       CHECK( generator.record( writeHandle ) );
     }     
   }
-- 
GitLab


From 359f36c0beb1fd489f3cfae1612f919dc0bddfbe Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 3 May 2019 16:57:21 +0200
Subject: [PATCH 098/129] SCT_ConditionsTools: Avoid EventContext TLS lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 .../SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx
index 3c60d4b5c67a..63c884ba9279 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx
@@ -356,7 +356,7 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const {
   m_tempMaskedChips[slot].clear();
   m_abcdErrorChips[slot].clear();
 
-  SG::ReadHandle<InDetBSErrContainer> errCont{m_bsErrContainerName};
+  SG::ReadHandle<InDetBSErrContainer> errCont (m_bsErrContainerName, ctx);
 
   /** When running over ESD files without BSErr container stored, don't 
    * want to flood the user with error messages. Should just have a bunch
-- 
GitLab


From 05867ecae93617154bb1ff4e9eb7b3d5cb42d282 Mon Sep 17 00:00:00 2001
From: Zach Marshall <ZLMarshall@lbl.gov>
Date: Sun, 5 May 2019 19:17:09 +0200
Subject: [PATCH 099/129] RHadrons updates for stops and sbottoms in master

This merge request fixes two sets of problems.

First, there were problems in the logic that assigned hadronic
interactions to R-hadrons. The problem was essentially that one quark in
the light quark system was ignored when calculating the R-hadron
properties. This is (surprisingly) a quite good approximation as long as
you aren't making extremely heavy R-hadrons, and as long as you don't
have stop or sbottom R-mesons, where there is only one light quark in
the R-hadron. That's fixed, the list of R-hadron interactions has
changed somewhat, and the results change a little bit.

Second, we needed a few minor adjustments to get stop and sbottom
R-hadron simulation working. That should all be done. Validation plots
have been made and everything.

This MR gets master back in sync with 21.0 following !23144
---
 .../RHadrons/python/RHadronMasses.py          | 106 ++++++++++--------
 .../RHadrons/src/G4ProcessHelper.cxx          |  54 ++++-----
 .../RHadrons/src/G4ProcessHelper.hh           |   5 +-
 .../preInclude.RHadronsPythia8.py             |   6 +-
 4 files changed, 91 insertions(+), 80 deletions(-)

diff --git a/Simulation/G4Extensions/RHadrons/python/RHadronMasses.py b/Simulation/G4Extensions/RHadrons/python/RHadronMasses.py
index 3d5370f5bf43..add95cfd479a 100644
--- a/Simulation/G4Extensions/RHadrons/python/RHadronMasses.py
+++ b/Simulation/G4Extensions/RHadrons/python/RHadronMasses.py
@@ -26,6 +26,8 @@ The list of possible R-hadrons comes from the Pythia8 code, in src/RHadrons.cc (
 first_mass_set = 4
 offset_options = {
 # Fundamental SUSY particles
+        1000005 : [       0 , False , '~b          ' , -1./3. , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 ] ,
+        1000006 : [       0 , False , '~t          ' ,  2./3. , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 ] ,
         1000021 : [       0 , False , '~g          ' ,  0 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 ] ,
         1000022 : [       0 , False , '~chi10      ' ,  0 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 ] ,
         1000039 : [       0 , False , '~Gr         ' ,  0 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 , 0.000 ] ,
@@ -82,47 +84,49 @@ offset_options = {
         1095334 : [ 1000021 ,  True , '~g_Omegab*- ' , -1 , 5.900 , 5.662 , 5.662 , 6.580 , 0.000 , 5.790 , 5.662 , 6.580 , 0.000 ] ,
 
 # Sbottom R-mesons
-        1000512 : [ 1000005 , True , '~B0          ' ,  0 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
-        1000522 : [ 1000005 , True , '~B-          ' , -1 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
-        1000532 : [ 1000005 , True , '~Bs0         ' ,  0 , 0.500 , 0.466 , 0.419 , 0.540 , 0.000 , 0.530 , 0.419 , 0.540 , 0.000 ] ,
-        1000542 : [ 1000005 , True , '~Bc-         ' , -1 , 1.500 , 1.630 , 1.550 , 1.710 , 0.000 , 1.700 , 1.550 , 1.710 , 0.000 ] ,
-        1000552 : [ 1000005 , True , '~etab0       ' ,  0 , 4.800 , 4.730 , 4.730 , 5.500 , 0.000 , 4.730 , 4.730 , 5.500 , 0.000 ] ,
+        1000512 : [ 1000005 ,  True , '~B0         ' ,  0 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
+        1000522 : [ 1000005 ,  True , '~B-         ' , -1 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
+        1000532 : [ 1000005 ,  True , '~Bs0        ' ,  0 , 0.500 , 0.466 , 0.419 , 0.540 , 0.000 , 0.530 , 0.419 , 0.540 , 0.000 ] ,
+        1000542 : [ 1000005 ,  True , '~Bc-        ' , -1 , 1.500 , 1.630 , 1.550 , 1.710 , 0.000 , 1.700 , 1.550 , 1.710 , 0.000 ] ,
+        1000552 : [ 1000005 ,  True , '~etab0      ' ,  0 , 4.800 , 4.730 , 4.730 , 5.500 , 0.000 , 4.730 , 4.730 , 5.500 , 0.000 ] ,
 # Sbottom R-baryons
-        1005113 : [ 1000005 , True , '~Sigmab-     ' , -1 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
-        1005211 : [ 1000005 , True , '~Sigmab0     ' ,  0 , 0.650 , 0.496 , 0.171 , 0.632 , 0.000 , 0.632 , 0.171 , 0.632 , 0.000 ] ,
-        1005213 : [ 1000005 , True , '~Sigmab*0    ' ,  0 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
-        1005223 : [ 1000005 , True , '~Sigmab+     ' ,  1 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
-        1005311 : [ 1000005 , True , '~Xib-        ' , -1 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
-        1005313 : [ 1000005 , True , '~Xib*-       ' , -1 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
-        1005321 : [ 1000005 , True , '~Xib0        ' ,  0 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
-        1005323 : [ 1000005 , True , '~Xib*0       ' ,  0 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
-        1005333 : [ 1000005 , True , '~Omegab-     ' , -1 , 1.000 , 0.952 , 0.863 , 1.095 , 0.000 , 1.075 , 0.863 , 1.095 , 0.000 ] ,
+        1005113 : [ 1000005 ,  True , '~Sigmab-    ' , -1 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
+        1005211 : [ 1000005 ,  True , '~Sigmab0    ' ,  0 , 0.650 , 0.496 , 0.171 , 0.632 , 0.000 , 0.632 , 0.171 , 0.632 , 0.000 ] ,
+        1005213 : [ 1000005 ,  True , '~Sigmab*0   ' ,  0 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
+        1005223 : [ 1000005 ,  True , '~Sigmab+    ' ,  1 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
+        1005311 : [ 1000005 ,  True , '~Xib-       ' , -1 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
+        1005313 : [ 1000005 ,  True , '~Xib*-      ' , -1 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
+        1005321 : [ 1000005 ,  True , '~Xib0       ' ,  0 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
+        1005323 : [ 1000005 ,  True , '~Xib*0      ' ,  0 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
+        1005333 : [ 1000005 ,  True , '~Omegab-    ' , -1 , 1.000 , 0.952 , 0.863 , 1.095 , 0.000 , 1.075 , 0.863 , 1.095 , 0.000 ] ,
 # Stop R-mesons
-        1000612 : [ 1000006 , True , '~T+          ' ,  1 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
-        1000622 : [ 1000006 , True , '~T0          ' ,  0 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
-        1000632 : [ 1000006 , True , '~Ts+         ' ,  1 , 0.500 , 0.466 , 0.419 , 0.540 , 0.000 , 0.530 , 0.419 , 0.540 , 0.000 ] ,
-        1000642 : [ 1000006 , True , '~Tc0         ' ,  0 , 1.500 , 1.630 , 1.550 , 1.710 , 0.000 , 1.700 , 1.550 , 1.710 , 0.000 ] ,
-        1000652 : [ 1000006 , True , '~etat+       ' ,  1 , 4.800 , 4.730 , 4.730 , 5.500 , 0.000 , 4.730 , 4.730 , 5.500 , 0.000 ] ,
+        1000612 : [ 1000006 ,  True , '~T+         ' ,  1 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
+        1000622 : [ 1000006 ,  True , '~T0         ' ,  0 , 0.325 , 0.314 , 0.220 , 0.365 , 0.000 , 0.365 , 0.220 , 0.365 , 0.000 ] ,
+        1000632 : [ 1000006 ,  True , '~Ts+        ' ,  1 , 0.500 , 0.466 , 0.419 , 0.540 , 0.000 , 0.530 , 0.419 , 0.540 , 0.000 ] ,
+        1000642 : [ 1000006 ,  True , '~Tc0        ' ,  0 , 1.500 , 1.630 , 1.550 , 1.710 , 0.000 , 1.700 , 1.550 , 1.710 , 0.000 ] ,
+        1000652 : [ 1000006 ,  True , '~etat+      ' ,  1 , 4.800 , 4.730 , 4.730 , 5.500 , 0.000 , 4.730 , 4.730 , 5.500 , 0.000 ] ,
 # Stop R-baryons
-        1006113 : [ 1000006 , True , '~Sigmat0     ' ,  0 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
-        1006211 : [ 1000006 , True , '~Sigmat+     ' ,  1 , 0.650 , 0.496 , 0.171 , 0.632 , 0.000 , 0.632 , 0.171 , 0.632 , 0.000 ] ,
-        1006213 : [ 1000006 , True , '~Sigmat*+    ' ,  1 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
-        1006223 : [ 1000006 , True , '~Sigmat++    ' ,  2 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
-        1006311 : [ 1000006 , True , '~Xit0        ' ,  0 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
-        1006313 : [ 1000006 , True , '~Xit*0       ' ,  0 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
-        1006321 : [ 1000006 , True , '~Xit+        ' ,  1 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
-        1006323 : [ 1000006 , True , '~Xit*+       ' ,  1 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
-        1006333 : [ 1000006 , True , '~Omegat0     ' ,  0 , 1.000 , 0.952 , 0.863 , 1.095 , 0.000 , 1.075 , 0.863 , 1.095 , 0.000 ] ,
+        1006113 : [ 1000006 ,  True , '~Sigmat0    ' ,  0 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
+        1006211 : [ 1000006 ,  True , '~Sigmat+    ' ,  1 , 0.650 , 0.496 , 0.171 , 0.632 , 0.000 , 0.632 , 0.171 , 0.632 , 0.000 ] ,
+        1006213 : [ 1000006 ,  True , '~Sigmat*+   ' ,  1 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
+        1006223 : [ 1000006 ,  True , '~Sigmat++   ' ,  2 , 0.650 , 0.672 , 0.530 , 0.763 , 0.000 , 0.763 , 0.530 , 0.763 , 0.000 ] ,
+        1006311 : [ 1000006 ,  True , '~Xit0       ' ,  0 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
+        1006313 : [ 1000006 ,  True , '~Xit*0      ' ,  0 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
+        1006321 : [ 1000006 ,  True , '~Xit+       ' ,  1 , 0.825 , 0.691 , 0.498 , 0.833 , 0.000 , 0.828 , 0.498 , 0.833 , 0.000 ] ,
+        1006323 : [ 1000006 ,  True , '~Xit*+      ' ,  1 , 0.825 , 0.810 , 0.686 , 0.922 , 0.000 , 0.917 , 0.686 , 0.922 , 0.000 ] ,
+        1006333 : [ 1000006 ,  True , '~Omegat0    ' ,  0 , 1.000 , 0.952 , 0.863 , 1.095 , 0.000 , 1.075 , 0.863 , 1.095 , 0.000 ] ,
    }
 
 # Now programmatically calculate the missing spectra
+# These are designed to just flop the rho above or below the gluinoball
+gb_offset = offset_options[1009113][first_mass_set+5]-offset_options[1009113][first_mass_set+1]
 for pid in offset_options:
     # Skip fundamental SUSY particles and R-glueball
     if offset_options[pid][0] == 0 or pid == 1000993: continue
     # Setup #4 to be mass set #1 but with 1009113 matching mass set 5
-    offset_options[pid][first_mass_set+4] = offset_options[pid][first_mass_set+1]+0.088
-    # Setup #8 to be mass set #5 but with 1009113 matches mass set 2
-    offset_options[pid][first_mass_set+8] = offset_options[pid][first_mass_set+5]-0.088
+    offset_options[pid][first_mass_set+4] = offset_options[pid][first_mass_set+1]+gb_offset
+    # Setup #8 to be mass set #5 but with 1009113 matching mass set 1
+    offset_options[pid][first_mass_set+8] = offset_options[pid][first_mass_set+5]-gb_offset
 
 
 
@@ -139,13 +143,16 @@ def charge( c ):
     raise RuntimeError('Unexpected charge: '+str(n))
 
 
-def get_quarks( x ):
+def get_quarks( y ):
     """ Function to return a list of quarks in a hadron
     """
+    x = abs(y)
+    # For stop/sbottom mesons, just the last quark!
+    if '000' in str(x): return str(x)[5:6]
     # For mesons, just two quarks
-    if '00' in str(x): return str(x)[4:5]
+    if '00' in str(x): return str(x)[4:6]
     # For baryons, three quarks
-    return str(x)[3:5]
+    return str(x)[3:6]
 
 
 def is_baryon( x ):
@@ -254,8 +261,8 @@ def update_PDG_table(input_file, pdg_table, mass_spectrum=1):
         # Note that we follow the Pythia6 convention of *including* fundamental SUSY particles
         # The format is VERY specific; needs mass and width (we always set the width to 0)
         # Mass is in MeV here, rather than GeV as in the dictionary
-        out_file.write('\nM %i                          %11.5E    +0.0E+00 -0.0E+00 %s       %s'%(pid,masses[pid]*1000.,offset_options[pid][2],charge(offset_options[pid][3])))
-        out_file.write('\nW %i                          %11.5E    +0.0E+00 -0.0E+00 %s       %s'%(pid,0.E+00,offset_options[pid][2],charge(offset_options[pid][3])))
+        out_file.write('\nM %i                          %11.7E  +0.0E+00 -0.0E+00 %s       %s'%(pid,masses[pid]*1000.,offset_options[pid][2],charge(offset_options[pid][3])))
+        out_file.write('\nW %i                          %11.7E  +0.0E+00 -0.0E+00 %s       %s'%(pid,0.E+00,offset_options[pid][2],charge(offset_options[pid][3])))
 
     # Done writing all the lines!  Clean up if necessary
     if type(pdg_table) is str: out_file.close()
@@ -377,24 +384,31 @@ def get_interaction_list(input_file, interaction_file='ProcessList.txt', mass_sp
         # All of them are on the list of incoming RHadrons
         # Deal with strangeness
         # Approximation! Bottom number -> -Charm number -> Strangeness
-        # Approximation needed because I don't know how outgoing SM charms are treated in G4 at the moment
+        # Approximation needed because outgoing SM charms are not treated in G4 at the moment
         s_number = 0
-        if '3' in get_quarks(pid) or '4' in get_quarks(pid) or '5' in get_quarks(pid):
-            if len(get_quarks(pid))>2:
-                s_number = -(get_quarks(pid).count('3')+get_quarks(pid).count('4')+get_quarks(pid).count('5')) if pid>0 else get_quarks(pid).count('3')+get_quarks(pid).count('4')+get_quarks(pid).count('5')
+        my_q = get_quarks(pid)
+        if '3' in my_q or '4' in my_q or '5' in my_q:
+            if len(my_q)>2:
+                # Gluino R-baryons
+                s_number = -(my_q.count('3')+my_q.count('4')+my_q.count('5')) if pid>0 else my_q.count('3')+my_q.count('4')+my_q.count('5')
+            elif len(my_q)>1:
+                # Squark R-baryons or Gluino R-mesons
+                if my_q.count('3') + my_q.count('4') + my_q.count('5')>1: s_number=0
+                elif offset_options[abs(pid)][3]==0 and ('3' in my_q or '5' in my_q): s_number=1 if pid>0 else -1
+                elif offset_options[abs(pid)][3]==0 and '4' in my_q: s_number=1 if pid<0 else -1
+                elif '3' in my_q or '5' in my_q: s_number=offset_options[abs(pid)][3]
+                elif '4' in my_q: s_number=-offset_options[abs(pid)][3]
             else:
-                if get_quarks(pid).count('3') + get_quarks(pid).count('4') + get_quarks(pid).count('5')>1: s_number=0
-                elif offset_options[abs(pid)][3]==0 and ('3' in get_quarks(pid) or '5' in get_quarks(pid)): s_number=1 if pid>0 else -1
-                elif offset_options[abs(pid)][3]==0 and '4' in get_quarks(pid): s_number=1 if pid<0 else -1
-                elif '3' in get_quarks(pid) or '5' in get_quarks(pid): s_number=offset_options[abs(pid)][3]
-                elif '4' in get_quarks(pid): s_number=-offset_options[abs(pid)][3]
+                # Squark R-mesons
+                s_number = my_q.count('3') + my_q.count('4') + my_q.count('5')
+                s_number = s_number if pid>0 else -s_number
         else: s_number=0
         # Build the dictionary
         pid_name = offset_options[pid][2].strip() if pid>0 else anti_name(offset_options[abs(pid)][2]).strip()
         incoming_rhadrons[pid_name] = [ offset_options[abs(pid)][3] , is_baryon(pid) , s_number ]
         # Smaller list of outgoing rhadrons.
         # No charm or bottom
-        if '4' in get_quarks(pid) or '5' in get_quarks(pid): continue
+        if '4' in my_q or '5' in my_q: continue
         outgoing_rhadrons[pid_name] = [ offset_options[abs(pid)][3] , is_baryon(pid) , s_number ]
 
     # Add all our R-hadrons to the table
diff --git a/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.cxx b/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.cxx
index 7fccf9e08dac..4b3e490764a8 100644
--- a/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.cxx
+++ b/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.cxx
@@ -179,15 +179,11 @@ G4bool G4ProcessHelper::ApplicabilityTester(const G4ParticleDefinition& aPart){
 
 G4double G4ProcessHelper::GetInclusiveCrossSection(const G4DynamicParticle *aParticle,
                                                    const G4Element *anElement){
-
   //We really do need a dedicated class to handle the cross sections. They might not always be constant
 
-
   //Disassemble the PDG-code
-
   G4int thePDGCode = aParticle->GetDefinition()->GetPDGEncoding();
   double boost = (aParticle->GetKineticEnergy()+aParticle->GetMass())/aParticle->GetMass();
-  //  G4cout<<"thePDGCode: "<<thePDGCode<<G4endl;
   G4double theXsec = 0;
   G4String name = aParticle->GetDefinition()->GetParticleName();
 
@@ -256,6 +252,11 @@ G4double G4ProcessHelper::GetInclusiveCrossSection(const G4DynamicParticle *aPar
 }
 
 ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4ParticleDefinition*& aTarget){
+  return GetFinalStateInternal(aTrack,aTarget,false);
+}
+
+// Version where we know if we baryonize already
+ReactionProduct G4ProcessHelper::GetFinalStateInternal(const G4Track& aTrack,G4ParticleDefinition*& aTarget, const bool baryonize_failed) {
 
   const G4DynamicParticle* aDynamicParticle = aTrack.GetDynamicParticle();
 
@@ -304,16 +305,17 @@ ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4Particle
 
   bool baryonise=false;
 
-  if(reggemodel
-     &&CLHEP::RandFlat::shoot()>0.9
-     &&(
+  if(!baryonize_failed
+     && reggemodel
+     && CLHEP::RandFlat::shoot()>0.9
+     && (
         (CustomPDGParser::s_isMesonino(theIncidentPDG)&&theIncidentPDG>0)
         ||
         CustomPDGParser::s_isRMeson(theIncidentPDG)
         )
-     )
+     ){
     baryonise=true;
-
+  }
 
   //Making a pointer directly to the ReactionProductList we are looking at. Makes life easier :-)
   ReactionProductList*  aReactionProductList = &((*theReactionMap)[theIncidentPDG]);
@@ -362,14 +364,17 @@ ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4Particle
         } else {
           G4cerr << "ReactionProduct has unsupported number of secondaries: "<<secondaries<<G4endl;
         }
-      } /*else {
-          G4cout<<"There was an impossible process"<<G4endl;
-          }*/
+      }
   }
-  //  G4cout<<"The size of the ReactionProductList is: "<<theReactionProductList.size()<<G4endl;
 
-  if (theReactionProductList.size()==0) G4Exception("G4ProcessHelper", "NoProcessPossible", FatalException,
-                                                    "GetFinalState: No process could be selected from the given list.");
+  if (theReactionProductList.size()==0 && baryonize_failed){
+    G4Exception("G4ProcessHelper", "NoProcessPossible", FatalException,
+                "GetFinalState: No process could be selected from the given list.");
+  } else if (theReactionProductList.size()==0 && !baryonize_failed) {
+    // Baryonization had not yet failed -- try again
+    G4cout << "G4ProcessHelper::GetFinalStateInternal WARNING  Could not select an appropriate process in first pass" << G4endl;
+    return GetFinalStateInternal(aTrack,aTarget,true);
+  }
 
   // For the Regge model no phase space considerations. We pick a process at random
   if(reggemodel)
@@ -403,19 +408,15 @@ ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4Particle
       TwotoThreeFlag.push_back(true);
     }
     Probabilities.push_back(CumulatedProbability);
-    //    G4cout<<"Pushing back cumulated probability: "<<CumulatedProbability<<G4endl;
   }
 
   //Renormalising probabilities
-  //  G4cout<<"Probs: ";
   for (std::vector<G4double>::iterator it = Probabilities.begin();
        it != Probabilities.end();
        it++)
     {
       *it /= CumulatedProbability;
-      //      G4cout<<*it<<" ";
     }
-  //  G4cout<<G4endl;
 
   // Choosing ReactionProduct
 
@@ -428,14 +429,10 @@ ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4Particle
   while(!selected && tries < 100){
     i=0;
     G4double dice = CLHEP::RandFlat::shoot();
-    //    G4cout<<"What's the dice?"<<dice<<G4endl;
     while(dice>Probabilities[i] && i<theReactionProductList.size()){
-      //      G4cout<<"i: "<<i<<G4endl;
       i++;
     }
 
-    //    G4cout<<"Chosen i: "<<i<<G4endl;
-
     if(!TwotoThreeFlag[i]) {
       // 2 -> 2 processes are chosen immediately
       selected = true;
@@ -459,9 +456,6 @@ ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4Particle
   }
   if(tries>=100) G4cerr<<"Could not select process!!!!"<<G4endl;
 
-  //  G4cout<<"So far so good"<<G4endl;
-  //  G4cout<<"Sec's: "<<theReactionProductList[i].size()<<G4endl;
-
   //Updating checkfraction:
   if (theReactionProductList[i].size()==2) {
     n_22++;
@@ -476,7 +470,7 @@ ReactionProduct G4ProcessHelper::GetFinalState(const G4Track& aTrack, G4Particle
   return theReactionProductList[i];
 }
 
-G4double G4ProcessHelper::ReactionProductMass(const ReactionProduct& aReaction,const G4DynamicParticle* aDynamicParticle) const {
+G4double G4ProcessHelper::ReactionProductMass(const ReactionProduct& aReaction,const G4DynamicParticle* aDynamicParticle) const{
   // Incident energy:
   G4double E_incident = aDynamicParticle->GetTotalEnergy();
   //G4cout<<"Total energy: "<<E_incident<<" Kinetic: "<<aDynamicParticle->GetKineticEnergy()<<G4endl;
@@ -492,7 +486,7 @@ G4double G4ProcessHelper::ReactionProductMass(const ReactionProduct& aReaction,c
     //G4cout<<"Mass contrib: "<<(particleTable->FindParticle(*r_it)->GetPDGMass())/CLHEP::MeV<<" MeV"<<G4endl;
     M_after += particleTable->FindParticle(*r_it)->GetPDGMass();
   }
-  //G4cout<<"Intending to return this ReactionProductMass: "<<(sqrts - M_after)/CLHEP::MeV<<" MeV"<<G4endl;
+  //G4cout<<"Intending to return this ReactionProductMass: " << sqrts << " - " <<  M_after << " MeV"<<G4endl;
   return sqrts - M_after;
 }
 
@@ -507,7 +501,7 @@ G4bool G4ProcessHelper::ReactionGivesBaryon(const ReactionProduct& aReaction) co
   return false;
 }
 
-G4double G4ProcessHelper::PhaseSpace(const ReactionProduct& aReaction,const G4DynamicParticle* aDynamicParticle) const{
+G4double G4ProcessHelper::PhaseSpace(const ReactionProduct& aReaction,const G4DynamicParticle* aDynamicParticle) const {
   G4double qValue = ReactionProductMass(aReaction,aDynamicParticle);
   // Eq 4 of https://arxiv.org/pdf/hep-ex/0404001.pdf
   G4double phi = sqrt(1+qValue/(2*0.139*CLHEP::GeV))*pow(qValue/(1.1*CLHEP::GeV),3./2.);
@@ -516,7 +510,7 @@ G4double G4ProcessHelper::PhaseSpace(const ReactionProduct& aReaction,const G4Dy
 
 void G4ProcessHelper::ReadAndParse(const G4String& str,
                                    std::vector<G4String>& tokens,
-                                   const G4String& delimiters) const
+                                   const G4String& delimiters)
 {
   // Skip delimiters at beginning.
   G4String::size_type lastPos = str.find_first_not_of(delimiters, 0);
diff --git a/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.hh b/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.hh
index f833bcf6cdfb..ee30bd1aff71 100644
--- a/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.hh
+++ b/Simulation/G4Extensions/RHadrons/src/G4ProcessHelper.hh
@@ -54,6 +54,9 @@ private:
 
   static G4ProcessHelper* pinstance;
 
+  // Version where we know if we baryonize already
+  ReactionProduct GetFinalStateInternal(const G4Track& aTrack,G4ParticleDefinition*& aTarget, const bool baryonize_failed);
+
   G4double Regge(const double boost) const;
   G4double Pom(const double boost) const;
 
@@ -65,7 +68,7 @@ private:
   G4bool ReactionGivesBaryon(const ReactionProduct& aReaction) const;
   void ReadAndParse(const G4String& str,
                     std::vector<G4String>& tokens,
-                    const G4String& delimiters = " ") const;
+                    const G4String& delimiters = " ");
 
   //Map of applicable particles
   std::map<const G4ParticleDefinition*,G4bool> known_particles;
diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.RHadronsPythia8.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.RHadronsPythia8.py
index 54de5f8ec60b..37bcd0a172dd 100644
--- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.RHadronsPythia8.py
+++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.RHadronsPythia8.py
@@ -66,9 +66,9 @@ try:
     # MC Channel Number.  Try the standard two spots, and fall back to the run number for evgen
     if 'mc_channel_number' in f.infos and len(f.infos['mc_channel_number'])>0:
         runNumber = f.infos['mc_channel_number'][0]
-    if runNumber<=0 and 'mc_channel_number' in f.infos['tag_info']:
+    elif 'mc_channel_number' in f.infos['tag_info']:
         runNumber = f.infos['tag_info']['mc_channel_number']
-    if runNumber<=0:
+    else:
         runNumber = f.infos['run_number'][0]
     # This is also used for digitization, so protect in case we're there
     if "StreamHITS" in f.infos["stream_names"]:
@@ -181,7 +181,7 @@ if lifetime>0.:
     else:
         addLineToPhysicsConfiguration("DoDecays","1")
         addLineToPhysicsConfiguration("HadronLifeTime", str(lifetime))
-    # If we reading particle records, and the lifetime is short, stop them as well
+    # If we are reading particle records, and the lifetime is short, stop them as well
     if lifetime<1. and hasattr(runArgs,'inputEVNT_TRFile'):
         addLineToPhysicsConfiguration("DoDecays","1")
         addLineToPhysicsConfiguration("HadronLifeTime", 0.000001)
-- 
GitLab


From 6f21d30fe29c8bcdc840c3a7e3a431b758c8f908 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Sun, 5 May 2019 17:54:02 +0000
Subject: [PATCH 100/129] TrigL2MuonSA: fix for monitoring histograms

Use the `GenericMonitoringTool.defineHistgram()` to define the
histograms for athenaMT to avoid any confusion between the old
trigger-specific `defineHistogram` method and the new one. Fixes
problems seen in !22545.
---
 .../python/TrigEFMissingETMTConfig.py         | 42 +++++++++
 .../python/TrigL2MuonSAMonitoring.py          | 49 +++++------
 .../TrigUpgradeTest/share/met.fromCells.py    | 28 +-----
 .../TrigUpgradeTest/share/met.fromClusters.py | 19 +---
 .../share/met.fromClustersPufit.py            | 20 +----
 .../TrigUpgradeTest/share/met.fromJets.py     | 18 +---
 .../python/HLTMenuConfig/MET/metDefs.py       | 87 +++----------------
 7 files changed, 87 insertions(+), 176 deletions(-)
 create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/python/TrigEFMissingETMTConfig.py

diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/python/TrigEFMissingETMTConfig.py b/Trigger/TrigAlgorithms/TrigEFMissingET/python/TrigEFMissingETMTConfig.py
new file mode 100644
index 000000000000..907d0a14f08f
--- /dev/null
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/python/TrigEFMissingETMTConfig.py
@@ -0,0 +1,42 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool
+
+def getMETMonTool(name = "MonTool"):
+   """
+   Return configured GenericMonitoringTool instance for EFMissingETAlgMT
+   """
+   mon = GenericMonitoringTool("MonTool")
+   mon.defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg",           xbins=100, xmin=0, xmax=100 )
+   mon.defineHistogram( "TIME_Loop",  path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )
+
+   # signed log-scale: 0.15/bin = 1.413X/bin (factor of ~2 each two bins)
+   # central bin is +/- 0.075 and contains values whose abs < 1.189 GeV
+   # limits are +/- 1.189 TeV
+   mon.defineHistogram('EF_MEx_log', path='EXPERT', title="EF Missing E_{x};sgn(ME_{x}) log_{10}(ME_{x}/GeV)", xbins=41, xmin=-3.075, xmax=3.075)
+   mon.defineHistogram('EF_MEy_log', path='EXPERT', title="EF Missing E_{y};sgn(ME_{y}) log_{10}(ME_{y}/GeV)", xbins=41, xmin=-3.075, xmax=3.075)
+   mon.defineHistogram('EF_MEz_log', path='EXPERT', title="EF Missing E_{z};sgn(ME_{z}) log_{10}(ME_{z}/GeV)", xbins=41, xmin=-3.075, xmax=3.075)
+
+   # signed log-scale: 0.15/bin = 1.413X/bin (factor of ~2 each two bins)
+   # bin centered on zero is +/- 0.075 and contains values whose abs < 1.189 GeV
+   # limits are -74.99 GeV and 2.371 TeV
+   mon.defineHistogram('EF_SumEt_log', path='EXPERT', title="EF Sum E_{T};log_{10}(SumE_{T}/GeV)", xbins=40, xmin=-1.875, xmax=4.125)
+   mon.defineHistogram('EF_SumE_log',  path='EXPERT', title="EF Sum E;log_{10}(SumE/GeV)",         xbins=40, xmin=-1.875, xmax=4.125)
+
+   # unsigned (i.e. normal) log-scale: 0.15/bin = 1.413X/bin (factor of ~2 each two bins)
+   # limits are 708 MeV and 2.818 TeV
+   mon.defineHistogram('EF_MET_log', path='EXPERT', title="EF |Missing E_{T}|;log_{10}(ME_{T}/GeV)", xbins=24, xmin=-0.15, xmax=3.45)
+   mon.defineHistogram('EF_ME_log',  path='EXPERT', title="EF |Missing Energy|;log_{10}(ME/GeV)",    xbins=24, xmin=-0.15, xmax=3.45)
+
+   # linear-scale
+   mon.defineHistogram('EF_MET_lin',   path='EXPERT', title="EF |Missing E_{T}|;ME_{T} (GeV)", xbins=205, xmin=-13.5,   xmax=601.5)
+   mon.defineHistogram('EF_ME_lin',    path='EXPERT', title="EF |Missing Energy|;ME (GeV)",    xbins=205, xmin=-13.5,   xmax=601.5)
+   mon.defineHistogram('EF_SumEt_lin', path='EXPERT', title="EF Sum E_{T};SumE_{T} (GeV)",     xbins=305, xmin=-27.,    xmax=1803.)
+   mon.defineHistogram('EF_XS',        path='EXPERT', title="EF Significance; (XS/GeV^{1/2})", xbins=40,  xmin=-0.025,  xmax=20.025)
+   mon.defineHistogram('EF_MET_phi',   path='EXPERT', title="EF MET #phi;MET #phi (rad)",      xbins=32,  xmin=-3.1416, xmax=3.1416)
+   mon.defineHistogram('EF_SumE_lin',  path='EXPERT', title="EF Sum E;SumE (GeV)",             xbins=305, xmin=-27.,    xmax=3500.)
+   mon.defineHistogram('EF_MEx_lin',   path='EXPERT', title="EF Missing E_{x};ME_{x} (GeV)",   xbins=199, xmin=-298.5,  xmax=298.5)
+   mon.defineHistogram('EF_MEy_lin',   path='EXPERT', title="EF Missing E_{y};ME_{y} (GeV)",   xbins=199, xmin=-298.5,  xmax=298.5)
+   mon.defineHistogram('EF_MEz_lin',   path='EXPERT', title="EF Missing E_{z};ME_{z} (GeV)",   xbins=199, xmin=-298.5,  xmax=298.5)
+
+   return mon
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAMonitoring.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAMonitoring.py
index 5b76c02108e3..ab21d5cdb5be 100755
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAMonitoring.py
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAMonitoring.py
@@ -1,37 +1,36 @@
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 
-from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
+from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool
 
 class TrigL2MuonSAMonitoring(GenericMonitoringTool):
     def __init__ (self, name = "TrigL2MuonSAMonitoring"):
         super(TrigL2MuonSAMonitoring, self).__init__( name )
     
         self.HistPath = name
-        self.Histograms = [ defineHistogram('InnMdtHits',    type='TH1F', path='EXPERT', title="Hit multiplicity in the INNER road; MDT hits", xbins=50, xmin=-0.5, xmax=50.5),
-                            defineHistogram('MidMdtHits',    type='TH1F', path='EXPERT', title="Hit multiplicity in the MIDDLE road; MDT hits", xbins=50, xmin=-0.5, xmax=50.5),
-                            defineHistogram('OutMdtHits',    type='TH1F', path='EXPERT', title="Hit multiplicity in the OUTER road; MDT hits", xbins=50, xmin=-0.5, xmax=50.5),
-                            defineHistogram('FitResiduals',  type='TH1F', path='EXPERT', title="Fit Residual; Residuals (cm)", xbins=400, xmin=-0.4, xmax=0.4),
-                            defineHistogram('Efficiency',    type='TH1F', path='EXPERT', title="Track finding efficiency", xbins=2, xmin=-0.5, xmax=1.5),
-                            defineHistogram('Address',       type='TH1F', path='EXPERT', title="S_address;S_address", xbins=5, xmin=-1.5, xmax=3.5 ),
-                            defineHistogram('AbsPt',         type='TH1F', path='EXPERT', title="absolute P_{T};P_{T} (GeV)", xbins=100, xmin=0, xmax=100 ),
-                            defineHistogram('TrackPt',       type='TH1F', path='EXPERT', title="P_{T};P_{T} (GeV)", xbins=100, xmin=-100, xmax=100 ),
-                            defineHistogram('AbsPt, SagInv', type='TH2F', path='EXPERT', title="1/s as a function of P_{T}; P_{T} (GeV); 1/s (cm^{-1})", xbins=50, xmin=0, xmax=100, ybins=15, ymin=0, ymax=3 ),
-                            defineHistogram('Sagitta',       type='TH1F', path='EXPERT', title="Reconstructed Sagitta; Sagitta (cm)", xbins=100, xmin=-10., xmax=10.),
-                            defineHistogram('ResInner',      type='TH1F', path='EXPERT', title="Residual from Trigger track in INNER Station; Residuals (cm)", xbins=100, xmin=-10., xmax=10. ),
-                            defineHistogram('ResMiddle',     type='TH1F', path='EXPERT', title="Residual from Trigger track in MIDDLE Station; Residuals (cm)", xbins=100, xmin=-10., xmax=10. ),
-                            defineHistogram('ResOuter',      type='TH1F', path='EXPERT', title="Residual from Trigger track in OUTER Station; Residuals (cm)", xbins=100, xmin=-10., xmax=10. ),
-                            defineHistogram('TrackEta, TrackPhi',         type='TH2F', path='EXPERT', title="Distribution of reconstructed LVL2 tracks; Eta; Phi", xbins=108, xmin=-2.7, xmax=2.7, ybins=96, ymin=-3.1416, ymax=3.1416 ),
-                            defineHistogram('FailedRoIEta, FailedRoIPhi', type='TH2F', path='EXPERT', title="Location of LVL2 track failure; Eta; Phi", xbins=108, xmin=-2.7, xmax=2.7, ybins=96, ymin=-3.1416, ymax=3.1416 ),
-                            defineHistogram('TIME_Total',                 type='TH1F', path='EXPERT', title="Total processing time (us)", xbins=100, xmin=0, xmax=100000 ),
-                            defineHistogram('TIME_Data_Preparator',       type='TH1F', path='EXPERT', title="Data preparator time (us)", xbins=100, xmin=0, xmax=50000 ),
-                            defineHistogram('TIME_Pattern_Finder',        type='TH1F', path='EXPERT', title="Pattern finder time (us)", xbins=100, xmin=0, xmax=5000 ),
-                            defineHistogram('TIME_Station_Fitter',        type='TH1F', path='EXPERT', title="Station fitter time (us)", xbins=100, xmin=0, xmax=5000 ),
-                            defineHistogram('TIME_Track_Fitter',          type='TH1F', path='EXPERT', title="Track fitter time (us)", xbins=100, xmin=0, xmax=300 ),
-                            defineHistogram('TIME_Track_Extrapolator',    type='TH1F', path='EXPERT', title="Track extrapolator time (us)", xbins=100, xmin=0, xmax=300 ),
-                            defineHistogram('TIME_Calibration_Streamer',  type='TH1F', path='EXPERT', title="Calibration streamer time (us)", xbins=100, xmin=0, xmax=50000 ),
-                            defineHistogram('InvalidRpcRoINumber',        type='TH1F', path='EXPERT', title="RoI Number of Invalid RPC RoI; RoI Number", xbins=150, xmin=-0.5, xmax=150.5) ]
-    
+        self.defineHistogram('InnMdtHits',    type='TH1F', path='EXPERT', title="Hit multiplicity in the INNER2 road; MDT hits", xbins=50, xmin=-0.5, xmax=50.5)
+        self.defineHistogram('MidMdtHits',    type='TH1F', path='EXPERT', title="Hit multiplicity in the MIDDLE road; MDT hits", xbins=50, xmin=-0.5, xmax=50.5)
+        self.defineHistogram('OutMdtHits',    type='TH1F', path='EXPERT', title="Hit multiplicity in the OUTER road; MDT hits", xbins=50, xmin=-0.5, xmax=50.5)
+        self.defineHistogram('FitResiduals',  type='TH1F', path='EXPERT', title="Fit Residual; Residuals (cm)", xbins=400, xmin=-0.4, xmax=0.4)
+        self.defineHistogram('Efficiency',    type='TH1F', path='EXPERT', title="Track finding efficiency", xbins=2, xmin=-0.5, xmax=1.5)
+        self.defineHistogram('Address',       type='TH1F', path='EXPERT', title="S_address;S_address", xbins=5, xmin=-1.5, xmax=3.5 )
+        self.defineHistogram('AbsPt',         type='TH1F', path='EXPERT', title="absolute P_{T};P_{T} (GeV)", xbins=100, xmin=0, xmax=100 )
+        self.defineHistogram('TrackPt',       type='TH1F', path='EXPERT', title="P_{T};P_{T} (GeV)", xbins=100, xmin=-100, xmax=100 )
+        self.defineHistogram('AbsPt, SagInv', type='TH2F', path='EXPERT', title="1/s as a function of P_{T}; P_{T} (GeV); 1/s (cm^{-1})", xbins=50, xmin=0, xmax=100, ybins=15, ymin=0, ymax=3 )
+        self.defineHistogram('Sagitta',       type='TH1F', path='EXPERT', title="Reconstructed Sagitta; Sagitta (cm)", xbins=100, xmin=-10., xmax=10.)
+        self.defineHistogram('ResInner',      type='TH1F', path='EXPERT', title="Residual from Trigger track in INNER Station; Residuals (cm)", xbins=100, xmin=-10., xmax=10. )
+        self.defineHistogram('ResMiddle',     type='TH1F', path='EXPERT', title="Residual from Trigger track in MIDDLE Station; Residuals (cm)", xbins=100, xmin=-10., xmax=10. )
+        self.defineHistogram('ResOuter',      type='TH1F', path='EXPERT', title="Residual from Trigger track in OUTER Station; Residuals (cm)", xbins=100, xmin=-10., xmax=10. )
+        self.defineHistogram('TrackEta, TrackPhi',         type='TH2F', path='EXPERT', title="Distribution of reconstructed LVL2 tracks; Eta; Phi", xbins=108, xmin=-2.7, xmax=2.7, ybins=96, ymin=-3.1416, ymax=3.1416 )
+        self.defineHistogram('FailedRoIEta, FailedRoIPhi', type='TH2F', path='EXPERT', title="Location of LVL2 track failure; Eta; Phi", xbins=108, xmin=-2.7, xmax=2.7, ybins=96, ymin=-3.1416, ymax=3.1416 )
+        self.defineHistogram('TIME_Total',                 type='TH1F', path='EXPERT', title="Total processing time (us)", xbins=100, xmin=0, xmax=100000 )
+        self.defineHistogram('TIME_Data_Preparator',       type='TH1F', path='EXPERT', title="Data preparator time (us)", xbins=100, xmin=0, xmax=50000 )
+        self.defineHistogram('TIME_Pattern_Finder',        type='TH1F', path='EXPERT', title="Pattern finder time (us)", xbins=100, xmin=0, xmax=5000 )
+        self.defineHistogram('TIME_Station_Fitter',        type='TH1F', path='EXPERT', title="Station fitter time (us)", xbins=100, xmin=0, xmax=5000 )
+        self.defineHistogram('TIME_Track_Fitter',          type='TH1F', path='EXPERT', title="Track fitter time (us)", xbins=100, xmin=0, xmax=300 )
+        self.defineHistogram('TIME_Track_Extrapolator',    type='TH1F', path='EXPERT', title="Track extrapolator time (us)", xbins=100, xmin=0, xmax=300 )
+        self.defineHistogram('TIME_Calibration_Streamer',  type='TH1F', path='EXPERT', title="Calibration streamer time (us)", xbins=100, xmin=0, xmax=50000 )
+        self.defineHistogram('InvalidRpcRoINumber',        type='TH1F', path='EXPERT', title="RoI Number of Invalid RPC RoI; RoI Number", xbins=150, xmin=-0.5, xmax=150.5)
 
 
 from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromCells.py b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromCells.py
index cb9d92de554c..aa62616e4688 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromCells.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromCells.py
@@ -35,6 +35,7 @@ topSequence += cellMakerAlgo
 #################################################
 
 from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromCellsMT, EFMissingETFromHelperMT, EFMissingETFlagsMT
+from TrigEFMissingET.TrigEFMissingETMTConfig import getMETMonTool
 
 cellTool = EFMissingETFromCellsMT( name="METFromCellsTool" )
 cellTool.CellsCollection = "cells"
@@ -45,23 +46,7 @@ flagTool = EFMissingETFlagsMT("theFlagsTool")
 metAlg = EFMissingETAlgMT( name="EFMET" )
 metAlg.METContainerKey="HLT_MET"
 metAlg.METTools=[ cellTool, helperTool, flagTool ]
-
-metMon = GenericMonitoringTool("METMonTool")
-metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                      defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log, 
-                                                 hMET_lin, hSumEt_lin, 
-                                                 hXS, hMETPhi, hMETStatus,
-                                                 hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                 hCompEt_lin, hCompSumEt_lin )
-
-metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-
-metAlg.MonTool = metMon
+metAlg.MonTool = getMETMonTool()
 topSequence += metAlg
 
 #################################################
@@ -78,15 +63,6 @@ hypoAlg = MissingETHypoAlgMT("METHypoAlg")
 hypoAlg.HypoTools=[makeMETHypoTool()]
 hypoAlg.METContainerKey=metAlg.METContainerKey
 
-# Not sure how to implement monitoring at the moment. 
-# Left here in case will be useful.
-# Will be removed if not
-'''
-from TrigMissingETHypo.TrigMissingETHypoMonitoringTool import TrigMissingETHypoMonitoringTool
-hypoMon = TrigMissingETHypoMonitoringTool()
-hypoAlg.onlineMonitoring()
-'''
-
 hypoAlg.OutputLevel = DEBUG
 hypoAlg.HypoInputDecisions = "L1MET"
 hypoAlg.HypoOutputDecisions = "EFMETDecisions"
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClusters.py b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClusters.py
index a433466cbefe..11fc4af60926 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClusters.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClusters.py
@@ -35,6 +35,7 @@ topSequence += clusterSequence
 #################################################
 
 from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromClustersMT, EFMissingETFromHelperMT
+from TrigEFMissingET.TrigEFMissingETMTConfig import getMETMonTool
 
 clusterTool = EFMissingETFromClustersMT( name="METFromClustersTool" )
 clusterTool.ClustersCollection = clusterContainer
@@ -44,23 +45,7 @@ helperTool = EFMissingETFromHelperMT("theHelperTool")
 metAlg = EFMissingETAlgMT( name="EFMET" )
 metAlg.METTools=[ clusterTool, helperTool ]
 metAlg.METContainerKey = "HLT_MET_Clusters"
-
-metMon = GenericMonitoringTool("METMonTool")
-metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                      defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log, 
-                                                 hMET_lin, hSumEt_lin, 
-                                                 hXS, hMETPhi, hMETStatus,
-                                                 hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                 hCompEt_lin, hCompSumEt_lin )
-
-metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-
-metAlg.MonTool = metMon
+metAlg.MonTool = getMETMonTool()
 topSequence += metAlg
 
 #################################################
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py
index 747f5cb0ed6f..b7b34f77f9ac 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromClustersPufit.py
@@ -6,9 +6,7 @@ include("TrigUpgradeTest/testHLT_MT.py")
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
-import math
 from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigCaloDataAccessSvc
-from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
 
 svcMgr += TrigCaloDataAccessSvc()
 
@@ -28,6 +26,7 @@ topSequence += clusterSequence
 #################################################
 
 from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromClustersPufitMT, EFMissingETFromHelperMT
+from TrigEFMissingET.TrigEFMissingETMTConfig import getMETMonTool
 
 clusterPufitTool = EFMissingETFromClustersPufitMT( name="METFromClustersPufitTool" )
 clusterPufitTool.ClustersCollection = clusterContainer
@@ -37,23 +36,8 @@ helperTool = EFMissingETFromHelperMT("theHelperTool")
 metAlg = EFMissingETAlgMT( name="EFMET" )
 metAlg.METTools=[ clusterPufitTool, helperTool ]
 metAlg.METContainerKey = "HLT_MET_ClustersPufit"
+metAlg.MonTool = getMETMonTool()
 
-metMon = GenericMonitoringTool("METMonTool")
-metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                      defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log, 
-                                                 hMET_lin, hSumEt_lin, 
-                                                 hXS, hMETPhi, hMETStatus,
-                                                 hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                 hCompEt_lin, hCompSumEt_lin )
-
-metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-
-metAlg.MonTool = metMon
 topSequence += metAlg
 
 #################################################
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py
index 197f79ba7bdc..45e5b40a8929 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met.fromJets.py
@@ -36,6 +36,7 @@ topSequence += jetSequence
 #################################################
 
 from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromJetsMT, EFMissingETFromHelperMT
+from TrigEFMissingET.TrigEFMissingETMTConfig import getMETMonTool
 
 metAlg = EFMissingETAlgMT( name="EFMET" )
 
@@ -46,23 +47,8 @@ helperTool = EFMissingETFromHelperMT("theHelperTool")
 
 metAlg.METTools=[ mhtTool, helperTool ]
 metAlg.METContainerKey="HLT_MET_mht"
+metAlg.MonTool = getMETMonTool()
 
-metMon = GenericMonitoringTool("METMonTool")
-metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                      defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log, 
-                                                 hMET_lin, hSumEt_lin, 
-                                                 hXS, hMETPhi, hMETStatus,
-                                                 hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                 hCompEt_lin, hCompSumEt_lin )
-
-metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-
-metAlg.MonTool = metMon
 topSequence += metAlg
 
 #################################################
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py
index feb4f914f391..427107bbf74c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/metDefs.py
@@ -1,12 +1,15 @@
 #
 #  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
-from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
-from AthenaCommon.CFElements import seqAND 
+from AthenaCommon.CFElements import seqAND
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 
+from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromHelperMT, EFMissingETFlagsMT
+from TrigEFMissingET.TrigEFMissingETMTConfig import getMETMonTool
+
+from TrigT2CaloCommon.CaloDef import clusterFSInputMaker
+
 def metCellAthSequence(ConfigFlags):
-    from TrigT2CaloCommon.CaloDef import clusterFSInputMaker
     InputMakerAlg= clusterFSInputMaker()
     (recoSequence, sequenceOut) = metCellRecoSequence()
 
@@ -19,39 +22,18 @@ def metCellRecoSequence():
     from TrigT2CaloCommon.CaloDef import HLTFSCellMakerRecoSequence
     (metCellRecoSequence, CellsName) = HLTFSCellMakerRecoSequence()
 
-
     #################################################
     # Add EFMissingETAlg and associated tools
     #################################################
-    from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromHelperMT, EFMissingETFlagsMT
     metAlg = EFMissingETAlgMT( name="EFMET" )
     helperTool = EFMissingETFromHelperMT("theHelperTool")
     flagsTool = EFMissingETFlagsMT("theFlagsTool")
     metAlg.METContainerKey = recordable("HLT_MET")
+    metAlg.MonTool = getMETMonTool()
 
-    
     #///////////////////////////////////////////
-    # Setup monitoring for EFMissingETAlg
+    # Add EFMissingETFromCells tool
     #///////////////////////////////////////////
-    metMon = GenericMonitoringTool("METMonTool")
-    metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                          defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-    from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log,
-                                                            hMET_lin, hSumEt_lin,
-                                                            hXS, hMETPhi, hMETStatus,
-                                                            hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                            hCompEt_lin, hCompSumEt_lin )
-
-    metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-    metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-    metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-    metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-    metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-    metAlg.MonTool = metMon
-
-        #///////////////////////////////////////////
-        # Add EFMissingETFromCells tool
-        #///////////////////////////////////////////
     from TrigEFMissingET.TrigEFMissingETConf import EFMissingETFromCellsMT
     cellTool = EFMissingETFromCellsMT( name="METFromCellsTool" )
 
@@ -70,7 +52,6 @@ def metCellRecoSequence():
 
 
 def metClusterAthSequence(ConfigFlags):
-    from TrigT2CaloCommon.CaloDef import clusterFSInputMaker
     InputMakerAlg= clusterFSInputMaker()
     (recoSequence, sequenceOut) = metClusterRecoSequence()
 
@@ -87,42 +68,21 @@ def metClusterRecoSequence():
     #################################################
     # Add EFMissingETAlg and associated tools
     #################################################
-    from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromHelperMT
     metAlg = EFMissingETAlgMT( name="EFMET" )
     helperTool = EFMissingETFromHelperMT("theHelperTool")
     metAlg.METContainerKey = "HLT_MET"
     metAlg.METContainerKey = recordable("HLT_MET")
+    metAlg.MonTool = getMETMonTool()
 
-    
-        #///////////////////////////////////////////
-        # Setup monitoring for EFMissingETAlg
-        #///////////////////////////////////////////
-    metMon = GenericMonitoringTool("METMonTool")
-    metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                          defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-    from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log,
-                                                            hMET_lin, hSumEt_lin,
-                                                            hXS, hMETPhi, hMETStatus,
-                                                            hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                            hCompEt_lin, hCompSumEt_lin )
-
-    metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-    metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-    metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-    metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-    metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-    metAlg.MonTool = metMon
-
-        #///////////////////////////////////////////
-        # Add EFMissingETFromClusters tool
-        #///////////////////////////////////////////
+    #///////////////////////////////////////////
+    # Add EFMissingETFromClusters tool
+    #///////////////////////////////////////////
     from TrigEFMissingET.TrigEFMissingETConf import EFMissingETFromClustersMT
     clusterTool = EFMissingETFromClustersMT( name="METFromClustersTool" )
 
     ### WARNING: this setting does not work for the scheduler: the variable is set, but the scheduler retrieves the default one
     clusterTool.ClustersCollection = ClustersName
 
-    
     metAlg.METTools.append(clusterTool)
     metAlg.METTools.append(helperTool)
 
@@ -132,7 +92,6 @@ def metClusterRecoSequence():
     return (metClusterRecoSequence, seqOut)
 
 def metJetAthSequence(ConfigFlags):
-    from TrigT2CaloCommon.CaloDef import clusterFSInputMaker
     InputMakerAlg= clusterFSInputMaker()
     (recoSequence, sequenceOut) = metJetRecoSequence()
 
@@ -149,30 +108,10 @@ def metJetRecoSequence(RoIs = 'FSJetRoI'):
     #################################################
     # Add EFMissingETAlg and associated tools
     #################################################
-    from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromHelperMT
     metAlg = EFMissingETAlgMT( name="EFMET" )
     helperTool = EFMissingETFromHelperMT("theHelperTool")
     metAlg.METContainerKey = recordable("HLT_MET_mht")
-
-    
-    #///////////////////////////////////////////
-    # Setup monitoring for EFMissingETAlg
-    #///////////////////////////////////////////
-    metMon = GenericMonitoringTool("METMonTool")
-    metMon.Histograms = [ defineHistogram( "TIME_Total", path='EXPERT', title="Time spent Alg", xbins=100, xmin=0, xmax=100 ),
-                          defineHistogram( "TIME_Loop", path='EXPERT', title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )]
-    from TrigEFMissingET.TrigEFMissingETMonitoring import ( hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log,
-                                                            hMET_lin, hSumEt_lin,
-                                                            hXS, hMETPhi, hMETStatus,
-                                                            hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE,
-                                                            hCompEt_lin, hCompSumEt_lin )
-
-    metMon.Histograms  = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ]
-    metMon.Histograms += [ hMET_lin, hSumEt_lin ]
-    metMon.Histograms += [ hXS, hMETPhi, hMETStatus]
-    metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ]
-    metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ]
-    metAlg.MonTool = metMon
+    metAlg.MonTool = getMETMonTool()
 
     #///////////////////////////////////////////
     # Add EFMissingETFromCells tool
-- 
GitLab


From 8e34c9bf8754678d9da25d7cfe77bb7e02d0d688 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Mon, 6 May 2019 07:59:59 +0000
Subject: [PATCH 101/129] Make SeedToTrackConversionTool thread-safe.

Make SeedToTrackConversionTool const
---
 .../share/ConfiguredNewTrackingSiPattern.py   | 10 ++-
 .../share/InDetRecLoadTools.py                |  5 --
 .../InDetRecExample/share/WriteInDetESD.py    |  4 +-
 .../ISeedToTrackConversionTool.h              | 12 +--
 .../ATLAS_CHECK_THREAD_SAFETY                 |  1 +
 .../SeedToTrackConversionTool.h               | 51 +++++++----
 .../src/SeedToTrackConversionTool.cxx         | 89 ++++++++++---------
 .../SiTrackMakerTool_xk/SiTrackMaker_xk.h     |  2 +-
 8 files changed, 99 insertions(+), 75 deletions(-)
 create mode 100644 InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/ATLAS_CHECK_THREAD_SAFETY

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
index 502e5e6a126f..e235b61becc2 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
@@ -258,9 +258,13 @@ class  ConfiguredNewTrackingSiPattern:
          else:
            InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder'
 					  
-         if InDetFlags. doStoreTrackSeeds():
-              InDetSiTrackMaker.SeedSegmentsWrite=True
-              InDetSiTrackMaker.SeedToTrackConversion=InDet_SeedToTrackConversion
+         if InDetFlags.doStoreTrackSeeds():
+              from SeedToTrackConversionTool.SeedToTrackConversionToolConf import InDet__SeedToTrackConversionTool
+              InDet_SeedToTrackConversion = InDet__SeedToTrackConversionTool(name = "InDet_SeedToTrackConversion",
+                                                                             OutputName = InDetKeys.SiSPSeedSegments()+NewTrackingCuts.extension())
+              InDetSiTrackMaker.SeedToTrackConversion = InDet_SeedToTrackConversion
+              InDetSiTrackMaker.SeedSegmentsWrite = True
+
          #InDetSiTrackMaker.OutputLevel = VERBOSE				  
          ToolSvc += InDetSiTrackMaker
          if (InDetFlags.doPrintConfigurables()):
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py
index 0dc5e6da4779..02162b4e223c 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py
@@ -235,11 +235,6 @@ if InDetFlags.loadRotCreator():
 
     ToolSvc += InDetRotCreator
 
-    if InDetFlags.doStoreTrackSeeds():
-        from SeedToTrackConversionTool.SeedToTrackConversionToolConf import InDet__SeedToTrackConversionTool
-        InDet_SeedToTrackConversion = InDet__SeedToTrackConversionTool( name = "InDet_SeedToTrackConversion")
-        ToolSvc += InDet_SeedToTrackConversion
-    
     if PixelClusterOnTrackToolDigital != None :
         InDetRotCreatorDigital = Trk__RIO_OnTrackCreator(name             = 'InDetRotCreatorDigital',
                                                          ToolPixelCluster = PixelClusterOnTrackToolDigital,
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py b/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py
index c9f4baffc9ab..482eb2104b6d 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py
@@ -146,8 +146,8 @@ if InDetFlags.doxAOD():
   InDetESDList+=['xAOD::TrackParticleAuxContainer#'+InDetKeys.xAODTrackParticleContainer()+'Aux.' + excludedAuxData]
 
   if InDetFlags.doStoreTrackSeeds():
-   InDetESDList+=['xAOD::TrackParticleContainer#'+InDetKeys.SiSPSeedSegments()+"TrackParticle"]
-   InDetESDList+=['xAOD::TrackParticleAuxContainer#'+InDetKeys.SiSPSeedSegments()+"TrackParticle"+'Aux.' + excludedAuxData]
+     InDetESDList+=['xAOD::TrackParticleContainer#'+InDetKeys.SiSPSeedSegments()+"TrackParticle"]
+     InDetESDList+=['xAOD::TrackParticleAuxContainer#'+InDetKeys.SiSPSeedSegments()+"TrackParticle"+'Aux.' + excludedAuxData]
 
   if not InDetFlags.doSLHC():
      InDetESDList+=['xAOD::TrackParticleContainer#'+InDetKeys.xAODForwardTrackParticleContainer()]
diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISeedToTrackConversionTool.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISeedToTrackConversionTool.h
index 3433d5b5d447..12a0bdf8e2b1 100644
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISeedToTrackConversionTool.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISeedToTrackConversionTool.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -25,10 +27,10 @@ namespace InDet
   public:
     static const InterfaceID& interfaceID( ) ;
     virtual StatusCode initialize ()=0;
-    virtual StatusCode finalize   ()=0;
-    virtual void executeSiSPSeedSegments(const Trk::TrackParameters*,const int&, const std::list<const Trk::SpacePoint*>&)=0;
-    virtual void newEvent(const Trk::TrackInfo&, const std::string&)=0;
-    virtual void endEvent()=0;
+    virtual StatusCode finalize()=0;
+    virtual void executeSiSPSeedSegments(const Trk::TrackParameters*,const int&, const std::list<const Trk::SpacePoint*>&) const =0;
+    virtual void newEvent(const Trk::TrackInfo&, const std::string&) const =0;
+    virtual void endEvent() const =0;
 
     //////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..2926b0aeeb9b
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetRecTools/SeedToTrackConversionTool
diff --git a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/SeedToTrackConversionTool.h b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/SeedToTrackConversionTool.h
index 8bbff9b3d08e..ff72909a0a6c 100644
--- a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/SeedToTrackConversionTool.h
+++ b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/SeedToTrackConversionTool/SeedToTrackConversionTool.h
@@ -13,13 +13,18 @@
 #ifndef INDETSEEDTOTRACKCONVERSIONTOOL_H
 #define INDETSEEDTOTRACKCONVERSIONTOOL_H
 
-#include <list>
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetRecToolInterfaces/ISeedToTrackConversionTool.h"
-#include "TrkTrack/TrackCollection.h"
+#include "StoreGate/WriteHandleKey.h"
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
+#include "TrkTrack/TrackCollection.h"
+
+#include "GaudiKernel/ToolHandle.h"
+
+#include <atomic>
+#include <list>
+#include <mutex>
 
 class MsgStream;
 
@@ -45,14 +50,13 @@ namespace InDet
     /** standard Athena-Algorithm method */
     virtual StatusCode initialize();
     /** standard Athena-Algorithm method */
-    virtual StatusCode finalize  ();
+    virtual StatusCode finalize();
 
     // Main methods for seeds conversion
-    virtual void executeSiSPSeedSegments(const Trk::TrackParameters*, const int&, const std::list<const Trk::SpacePoint*>&); 
+    virtual void executeSiSPSeedSegments(const Trk::TrackParameters*, const int&, const std::list<const Trk::SpacePoint*>&) const;
     //!<seed trackparameters, number of tracks found:m_track.size(), list of spacepoints
-    virtual void newEvent();
-    virtual void newEvent(const Trk::TrackInfo&,const std::string&);
-    virtual void endEvent();
+    virtual void newEvent(const Trk::TrackInfo&, const std::string&) const;
+    virtual void endEvent() const;
 
     //////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
@@ -62,19 +66,28 @@ namespace InDet
     virtual std::ostream& dump(std::ostream& out) const;
     // enter declaration of your interface-defining member functions here
       
-  protected:
+  private:
     PublicToolHandle<Trk::IExtrapolator> m_extrapolator
-    {this, "Extrapolator","Trk::Extrapolator", ""}; //!< extrapolator
+      {this, "Extrapolator","Trk::Extrapolator", "extrapolator"};
     PublicToolHandle<Trk::IRIO_OnTrackCreator > m_rotcreator
-    {this, "RIO_OnTrackCreator", "Trk::RIO_OnTrackCreator/InDetRotCreator", ""}; //!< Creator ROT
-    mutable TrackCollection* m_seedsegmentsCollection{nullptr}; //!< output collection for seed
-    std::string m_seedsegmentsOutput{"SiSPSeedSegments"}; //!< SiSpSeedSegments Output Collection
-    Trk::TrackInfo                        m_trackinfo     ; //!< TrackInfo for seeds 
-    StringProperty m_patternName{this, "TrackPatternRecoInfo", "SiSPSeededFinder", "Name of the pattern recognition"};
-    int                                   m_nprint{0}     ; //!< Kind output information
-    int                                   m_totseed{0}    ; //!< number of total seeds in the pass
-    int                                   m_survived{0}   ; //!< number of survived seeds 
-      
+      {this, "RIO_OnTrackCreator", "Trk::RIO_OnTrackCreator/InDetRotCreator", "Creator ROT"};
+    SG::WriteHandleKey<TrackCollection> m_seedsegmentsOutput{this, "OutputName", "SiSPSeedSegments", "SiSpSeedSegments Output Collection"};
+
+    mutable std::atomic_int m_nprint{0}; //!< Kind output information
+    mutable std::atomic_int m_totseed{0}; //!< number of total seeds in the pass
+    mutable std::atomic_int m_survived{0}; //!< number of survived seeds 
+
+    mutable std::mutex m_mutex;
+    mutable std::vector<EventContext::ContextEvt_t> m_cache ATLAS_THREAD_SAFE; // Guarded by m_mutex
+    struct EventData { // To hold event dependent data
+      std::unique_ptr<TrackCollection> m_seedSegmentsCollection; //!< output collection for seed
+      Trk::TrackInfo m_trackInfo; //!< TrackInfo for seeds
+      std::string m_patternName; //!< Name of the pattern recognition
+    };
+    mutable std::vector<EventData> m_eventData ATLAS_THREAD_SAFE; // Guarded by m_mutex
+
+    EventData& getEventData() const;
+
     MsgStream& dumpconditions(MsgStream& out) const;
     MsgStream& dumpevent     (MsgStream& out) const;
 
diff --git a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/src/SeedToTrackConversionTool.cxx b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/src/SeedToTrackConversionTool.cxx
index 44043e89d03a..92df3f1ca80c 100644
--- a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/src/SeedToTrackConversionTool.cxx
+++ b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/src/SeedToTrackConversionTool.cxx
@@ -10,6 +10,7 @@
 
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
+#include "StoreGate/WriteHandle.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
 
 #include <iomanip>
@@ -49,6 +50,8 @@ StatusCode InDet::SeedToTrackConversionTool::initialize()
     ATH_MSG_VERBOSE( "initialize() Retrieved service " << m_rotcreator);
   }  
 
+  ATH_CHECK(m_seedsegmentsOutput.initialize());
+
   ATH_MSG_INFO ("initialize() successful in " << name());
   return StatusCode::SUCCESS;
 }
@@ -60,25 +63,24 @@ StatusCode InDet::SeedToTrackConversionTool::finalize()
   return AlgTool::finalize();
 }
 
-void InDet::SeedToTrackConversionTool::newEvent()
+void InDet::SeedToTrackConversionTool::newEvent(const Trk::TrackInfo& info, const std::string& patternName) const
 {
-  m_seedsegmentsCollection = new TrackCollection;
+  EventData& data{getEventData()};
+  data.m_seedSegmentsCollection = std::make_unique<TrackCollection>();
   m_totseed = 0;
   m_survived = 0;
-}
 
-void InDet::SeedToTrackConversionTool::newEvent(const Trk::TrackInfo& info, const std::string& patternName)
-{
-  newEvent();
-  m_trackinfo = info;
-  m_patternName = patternName;
-  if (static_cast<int>(m_patternName.value().find("Forward"))>-1) {
-    m_trackinfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_ForwardTracks);
+  data.m_trackInfo = info;
+  data.m_patternName = patternName;
+  if (static_cast<int>(data.m_patternName.find("Forward"))>-1) {
+    data.m_trackInfo.setPatternRecognitionInfo(Trk::TrackInfo::SiSpacePointsSeedMaker_ForwardTracks);
   }
 }
 
-void InDet::SeedToTrackConversionTool::endEvent()
+void InDet::SeedToTrackConversionTool::endEvent() const
 {
+  EventData& data{getEventData()};
+
   // Print event information
   //
   if (msgLevel()<=0) {
@@ -86,32 +88,17 @@ void InDet::SeedToTrackConversionTool::endEvent()
     ATH_MSG_DEBUG(*this);
   }
 
-  const TrackCollection* inputTracks = nullptr;
-
-  if (evtStore()->retrieve(inputTracks, m_seedsegmentsOutput) && inputTracks) {
-    for (const Trk::Track* t: *inputTracks) {
-      m_seedsegmentsCollection->push_back(new Trk::Track(*t));
-    }
-
-    ATH_MSG_INFO("Check SiSPSeedSegments Collection " << m_seedsegmentsCollection->size() <<
-                 " inputTracks: " << inputTracks->size() << 
-                 " trackinfo: " << m_trackinfo);
-    StatusCode s = evtStore()->overwrite(m_seedsegmentsCollection, m_seedsegmentsOutput, true);
-    if (s.isFailure()) {
-      ATH_MSG_ERROR("Could not overwrite converted SiSPSeedSegments tracks");
-    }
-  } else {
-    ATH_MSG_INFO(" Check SiSPSeedSegments Collection " << m_seedsegmentsCollection->size() << " trackinfo: "
-                 << m_trackinfo);
-    StatusCode s = evtStore()->record(m_seedsegmentsCollection, m_seedsegmentsOutput, true);
-    if (s.isFailure()) {
-      ATH_MSG_ERROR("Could not save converted SiSPSeedSegments tracks");
-    }
+  ATH_MSG_INFO(" Check SiSPSeedSegments Collection " << data.m_seedSegmentsCollection->size() << " trackinfo: "
+               << data.m_trackInfo);
+  SG::WriteHandle<TrackCollection> seedsegmentsOutput{m_seedsegmentsOutput};
+  if (seedsegmentsOutput.record(std::move(data.m_seedSegmentsCollection)).isFailure()) {
+    ATH_MSG_ERROR("Could not save converted SiSPSeedSegments tracks");
   }
 }
 
-void  InDet::SeedToTrackConversionTool::executeSiSPSeedSegments(const Trk::TrackParameters* Tp, const int& mtrk, const std::list<const Trk::SpacePoint*>& Sp)
+void  InDet::SeedToTrackConversionTool::executeSiSPSeedSegments(const Trk::TrackParameters* Tp, const int& mtrk, const std::list<const Trk::SpacePoint*>& Sp) const
 {
+  EventData& data{getEventData()};
   ++m_totseed; // accumulate all seeds
   if (mtrk>0) ++m_survived; // survided seeds 
   std::vector<const Trk::PrepRawData*> prdsInSp;
@@ -146,12 +133,11 @@ void  InDet::SeedToTrackConversionTool::executeSiSPSeedSegments(const Trk::Track
         }
       }
     }
-    Trk::TrackInfo trkinfo = m_trackinfo;
     if (mtrk>0) { // survived seeds set as
-      trkinfo.setTrackFitter(Trk::TrackInfo::xKalman); // xk seedfinder
+      data.m_trackInfo.setTrackFitter(Trk::TrackInfo::xKalman); // xk seedfinder
     }
-    Trk::Track* t = new Trk::Track(trkinfo, traj, 0);
-    if (t) m_seedsegmentsCollection->push_back(t);
+    Trk::Track* t = new Trk::Track(data.m_trackInfo, traj, 0);
+    if (t) data.m_seedSegmentsCollection->push_back(t);
   }
 }
 
@@ -165,17 +151,39 @@ MsgStream& InDet::SeedToTrackConversionTool::dump(MsgStream& out) const
   if (m_nprint) dumpevent(out);
   return dumpconditions(out);
 }
- 
+
+InDet::SeedToTrackConversionTool::EventData& InDet::SeedToTrackConversionTool::getEventData() const
+{
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cache.size()) { // Need to extend vectors
+    static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+    m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement
+    m_eventData.resize(slot+1);
+  }
+  if (m_cache[slot]!=evt) { // New event
+    m_cache[slot] = evt;
+    // Initialization
+    delete m_eventData[slot].m_seedSegmentsCollection.release();
+    m_eventData[slot].m_trackInfo = Trk::TrackInfo();
+    m_eventData[slot].m_patternName = "";
+  }
+  return m_eventData[slot];
+}
+
 ///////////////////////////////////////////////////////////////////
 // Dumps conditions information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 MsgStream& InDet::SeedToTrackConversionTool::dumpconditions(MsgStream& out) const
 {
+  EventData& data{getEventData()};
   out << "|----------------------------------------------------------------------"
       << "-------------------|"
       << std::endl;
   out << "| Output Collection Name   | " << m_seedsegmentsOutput << std::endl;
-  out << "} Name of pattern recognition | " << m_patternName << std::endl;
+  out << "} Name of pattern recognition | " << data.m_patternName << std::endl;
   out << "|----------------------------------------------------------------------"
       << "-------------------|"
       << std::endl;
@@ -187,9 +195,10 @@ MsgStream& InDet::SeedToTrackConversionTool::dumpconditions(MsgStream& out) cons
 
 MsgStream& InDet::SeedToTrackConversionTool::dumpevent(MsgStream& out) const
 {
+  EventData& data{getEventData()};
   out << "|---------------------------------------------------------------------|"
       << std::endl;
-  out << "| Name of SeedFinder          | " << m_patternName
+  out << "| Name of SeedFinder          | " << data.m_patternName
       << "                              | " << std::endl;
   out << "| Number of All seeds         | " << std::setw(12) << m_totseed 
       << "                              | " << std::endl;
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
index f4f42aaf9efe..e91d25900d25 100755
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
@@ -103,7 +103,7 @@ namespace InDet{
       ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
       ToolHandle<InDet::ISiDetElementsRoadMaker> m_roadmaker{this, "RoadTool", "InDet::SiDetElementsRoadMaker_xk"};
       PublicToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder{this, "CombinatorialTrackFinder", "InDet::SiCombinatorialTrackFinder_xk"};
-      PublicToolHandle<InDet::ISeedToTrackConversionTool> m_seedtrack{this, "SeedToTrackConversion", "InDet::SeedToTrackConversionTool"};
+      ToolHandle<InDet::ISeedToTrackConversionTool> m_seedtrack{this, "SeedToTrackConversion", "InDet::SeedToTrackConversionTool"};
 
       SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
       SG::ReadHandleKey<CaloClusterROI_Collection> m_caloCluster{this, "InputClusterContainerName", "InDetCaloClusterROIs"};
-- 
GitLab


From 1e7a073a23d664d9ac0471b1d4faaaabf2cc4800 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Delsart <delsart@in2p3.fr>
Date: Mon, 6 May 2019 10:08:09 +0200
Subject: [PATCH 102/129] Schedule TruthAssociation moment calculation only if
 truth jets are scheduled

---
 Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py b/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py
index 9a78390f956a..da2507bb949c 100644
--- a/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py
+++ b/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py
@@ -208,7 +208,9 @@ if jetFlags.useTracks():
   ungroomed_modifiers += ["trackassoc"]
   ungroomed_modifiers += [jtm.jetorigin_setpv]
 if jetFlags.useTruth():
-  ungroomed_modifiers += ["truthassoc"]
+  if jetFlags.detailLevel()>=JetContentDetail.Full:
+    # only at this detail level are the truth jets build. We can then schedule the TruthAssociation calculation :
+    ungroomed_modifiers += ["truthassoc"]
   if jtm.haveParticleJetTools:
     ungroomed_modifiers += [jtm.jetdrlabeler]
 
-- 
GitLab


From bf65886167056ca590df50f25d015994829a8e0e Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Mon, 6 May 2019 08:57:20 +0000
Subject: [PATCH 103/129] Define EventData to hold event dependent data.

Make methods const

Make methods const

Use getEventData method

Use EventData.

Add ATLAS_CHECK_THREAD_SAFETY to SiTrackMakerTool_xk
---
 .../InDetRecToolInterfaces/ISiTrackMaker.h    |  10 +-
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 .../SiTrackMakerTool_xk/SiTrackMaker_xk.h     | 140 +++----
 .../src/SiTrackMaker_xk.cxx                   | 357 ++++++++++--------
 4 files changed, 273 insertions(+), 235 deletions(-)
 create mode 100644 InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/ATLAS_CHECK_THREAD_SAFETY
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
 mode change 100755 => 100644 InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx

diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h
index 9493d7d1af8c..75978abe4b86 100755
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiTrackMaker.h
@@ -54,14 +54,14 @@ namespace InDet {
       ///////////////////////////////////////////////////////////////////
 
       virtual std::list<Trk::Track*>
-	getTracks(const std::list<const Trk::SpacePoint*>&)=0;
+	getTracks(const std::list<const Trk::SpacePoint*>&) const =0;
       virtual std::list<Trk::Track*>
-	getTracks(const Trk::TrackParameters&,const std::list<Amg::Vector3D>&)=0;
+	getTracks(const Trk::TrackParameters&, const std::list<Amg::Vector3D>&) const =0;
       
-      virtual void newEvent    (bool,bool)=0;
-      virtual void newTrigEvent(bool,bool)=0;
+      virtual void newEvent(bool, bool) const =0;
+      virtual void newTrigEvent(bool, bool) const =0;
       
-      virtual void endEvent()=0;
+      virtual void endEvent() const =0;
      
 
       ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..26576b106ae8
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetRecTools/SiTrackMakerTool_xk
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
old mode 100755
new mode 100644
index e91d25900d25..c312f3bb51e8
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
@@ -34,6 +34,7 @@
 #include <array>
 #include <iosfwd>
 #include <list>
+#include <vector>
 
 class MsgStream;
 
@@ -66,22 +67,22 @@ namespace InDet{
       (const std::string&,const std::string&,const IInterface*);
       virtual ~SiTrackMaker_xk() = default;
       virtual StatusCode initialize();
-      virtual StatusCode finalize  ();
+      virtual StatusCode finalize();
 
       ///////////////////////////////////////////////////////////////////
       // Main methods for local track finding
       ///////////////////////////////////////////////////////////////////
       
       virtual std::list<Trk::Track*>
-      getTracks(const std::list<const Trk::SpacePoint*>&);
+      getTracks(const std::list<const Trk::SpacePoint*>& Sp) const;
 
       virtual std::list<Trk::Track*>
-      getTracks(const Trk::TrackParameters&,const std::list<Amg::Vector3D>&);
+      getTracks(const Trk::TrackParameters& Tp, const std::list<Amg::Vector3D>& Gp) const;
 
-      virtual void newEvent    (bool,bool);
-      virtual void newTrigEvent(bool,bool);
+      virtual void newEvent(bool PIX, bool SCT) const;
+      virtual void newTrigEvent(bool PIX, bool SCT) const;
 
-      virtual void endEvent();
+      virtual void endEvent() const;
 
       ///////////////////////////////////////////////////////////////////
       // Print internal tool parameters and status
@@ -140,74 +141,79 @@ namespace InDet{
       DoubleProperty m_etaWidth{this, "etaWidth", 0.3};
 
       // Updated only in initialize method
-      Trk::TrackInfo                 m_trackinfo     ;
-      bool                           m_heavyion{false}; // Is it heavy ion events
-      Trk::MagneticFieldMode         m_fieldModeEnum{Trk::FullField};
-
-      // Counters
-      int                            m_inputseeds{0}; // Number input seeds
-      int                            m_goodseeds{0}; // Number good  seeds
-      int                            m_findtracks{0};  // Numbe found tracks
-
-      // Flag for dump method
-      int                            m_nprint{}; // Kind output information
-
-      // Updated by many methods
-      std::multimap<const Trk::PrepRawData*, const Trk::Track*> m_clusterTrack;
-
-      // Updated only by newEvent and newTrigEvent methods
-      bool                           m_pix{false};
-      bool                           m_sct{false};
-
-      // Updated ony by newEvent method
-      std::list<double>              m_caloF         ;
-      std::list<double>              m_caloR         ;
-      std::list<double>              m_caloZ         ;
-      std::list<double>              m_hadF          ;
-      std::list<double>              m_hadR          ;
-      std::list<double>              m_hadZ          ;
-      double m_xybeam[2]                             ;
-
-      // Caches for the getTracks method with two arguments.
-      // These have to be dropped.
-      bool m_dbm{false};
-      std::array<double, 9> m_par;
+      Trk::TrackInfo m_trackinfo     ;
+      bool m_heavyion{false}; // Is it heavy ion events
+      Trk::MagneticFieldMode m_fieldModeEnum{Trk::FullField};
+
+      mutable std::mutex m_mutex;
+      mutable std::vector<EventContext::ContextEvt_t> m_cache ATLAS_THREAD_SAFE; // Guarded by m_mutex
+      struct EventData { // To hold event dependent data
+        // Counters
+        int inputseeds{0}; // Number input seeds
+        int goodseeds{0}; // Number good seeds
+        int findtracks{0}; // Numbe found tracks
+
+        // Flag for dump method
+        int nprint{0}; // Kind output information
+
+        // Updated by many methods
+        std::multimap<const Trk::PrepRawData*, const Trk::Track*> clusterTrack;
+        std::array<double, 9> par;
+
+        // Updated only by newEvent and newTrigEvent methods
+        bool pix{false};
+        bool sct{false};
+
+        // Updated only by getTracks
+        bool dbm{false};
+
+        // Updated only by newEvent method
+        std::list<double> caloF;
+        std::list<double> caloR;
+        std::list<double> caloZ;
+        std::list<double> hadF;
+        std::list<double> hadR;
+        std::list<double> hadZ;
+        double xybeam[2]{0., 0.};
+      };
+      mutable std::vector<EventData> m_eventData ATLAS_THREAD_SAFE; // Guarded by m_mutex
 
       ///////////////////////////////////////////////////////////////////
       // Methods 
       ///////////////////////////////////////////////////////////////////
 
- 
-      const Trk::TrackParameters* getAtaPlane(bool,
-                                              const std::list<const Trk::SpacePoint*>&,
-                                              std::array<double, 9>& par) const;
-      const Trk::TrackParameters* getAtaPlaneDBM(const std::list<const Trk::SpacePoint*>&,
-                                                 std::array<double, 9>& par) const;
-
-      bool globalPositions(const Trk::SpacePoint*,const Trk::SpacePoint*,const Trk::SpacePoint*,
-                           double*,double*,double*) const;
-
-      bool globalPosition(const Trk::SpacePoint*,double*,double*) const;
-      void globalDirections(double*,double*,double*,double*,double*,double*) const;
-      InDet::TrackQualityCuts setTrackQualityCuts(bool simpleTrack);
-       void detectorElementsSelection(std::list<const InDetDD::SiDetectorElement*>&, bool dbm) const;
-      bool newSeed    (const std::list<const Trk::SpacePoint*>&);
-      bool isNewTrack(Trk::Track*,
-                      const std::multimap<const Trk::PrepRawData*,
-                                          const Trk::Track*>& clusterTrack) const;
-      bool isCaloCompatible(const std::array<double, 9>& par) const;
-      bool isHadCaloCompatible(const std::array<double, 9>& par) const;
-      bool isDBMSeeds(const Trk::SpacePoint*) const;
-      void clusterTrackMap(Trk::Track*,
-                           std::multimap<const Trk::PrepRawData*,
-                                         const Trk::Track*>& clusterTrack) const;
-
-      MsgStream& dumpconditions(MsgStream&    out) const;
-      MsgStream& dumpevent     (MsgStream&    out) const;
+      const Trk::TrackParameters* getAtaPlane(EventData& data,
+                                              bool sss,
+                                              const std::list<const Trk::SpacePoint*>& SP) const;
+      const Trk::TrackParameters* getAtaPlaneDBM(EventData& data,
+                                                 const std::list<const Trk::SpacePoint*>& SP) const;
+
+      bool globalPositions(const Trk::SpacePoint* s0,
+                           const Trk::SpacePoint* s1,
+                           const Trk::SpacePoint* s2,
+                           double* p0,
+                           double* p1,
+                           double* p2) const;
+      bool globalPosition(const Trk::SpacePoint* sp, double* dir, double* p) const;
+      void globalDirections(double* p0, double* p1, double* p2, double* d0, double* d1, double* d2) const;
+      InDet::TrackQualityCuts setTrackQualityCuts(bool simpleTrack) const;
+      void detectorElementsSelection(EventData& data,
+                                     std::list<const InDetDD::SiDetectorElement*>& DE) const;
+      bool newSeed(EventData& data, const std::list<const Trk::SpacePoint*>& Sp) const;
+      bool isNewTrack(EventData& data, Trk::Track* Tr) const;
+      bool isCaloCompatible(EventData& data) const;
+      bool isHadCaloCompatible(EventData& data) const;
+      bool isDBMSeeds(const Trk::SpacePoint* s) const;
+      void clusterTrackMap(EventData& data, Trk::Track* Tr) const;
+
+      EventData& getEventData() const;
+
+      MsgStream& dumpconditions(MsgStream& out) const;
+      MsgStream& dumpevent(EventData& data, MsgStream& out) const;
     };
 
-    MsgStream&    operator << (MsgStream&   ,const SiTrackMaker_xk&);
-    std::ostream& operator << (std::ostream&,const SiTrackMaker_xk&); 
+    MsgStream&    operator << (MsgStream& sl, const SiTrackMaker_xk& se);
+    std::ostream& operator << (std::ostream& sl, const SiTrackMaker_xk& se); 
 
 } // end of name space
 
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
old mode 100755
new mode 100644
index 80f600d8265a..051c8cef9b43
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
@@ -132,10 +132,11 @@ StatusCode InDet::SiTrackMaker_xk::finalize()
 // Dumps relevant information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream&  InDet::SiTrackMaker_xk::dump( MsgStream& out ) const
+MsgStream& InDet::SiTrackMaker_xk::dump(MsgStream& out) const
 {
+  EventData& data{getEventData()};
   out<<std::endl;
-  if (m_nprint) return dumpevent(out);
+  if (data.nprint) return dumpevent(data, out);
   return dumpconditions(out);
 }
 
@@ -143,7 +144,7 @@ MsgStream&  InDet::SiTrackMaker_xk::dump( MsgStream& out ) const
 // Dumps conditions information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiTrackMaker_xk::dumpconditions( MsgStream& out ) const
+MsgStream& InDet::SiTrackMaker_xk::dumpconditions(MsgStream& out) const
 {
 
   int n      = 62-m_tracksfinder.type().size();
@@ -205,15 +206,15 @@ MsgStream& InDet::SiTrackMaker_xk::dumpconditions( MsgStream& out ) const
 // Dumps event information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiTrackMaker_xk::dumpevent( MsgStream& out ) const
+MsgStream& InDet::SiTrackMaker_xk::dumpevent(EventData& data, MsgStream& out) const
 {
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Number input seeds      | "<<std::setw(12)<<m_inputseeds
+  out<<"| Number input seeds      | "<<std::setw(12)<<data.inputseeds
      <<"                              |"<<std::endl;
-  out<<"| Number good  seeds      | "<<std::setw(12)<<m_goodseeds 
+  out<<"| Number good  seeds      | "<<std::setw(12)<<data.goodseeds 
      <<"                              |"<<std::endl;
-  out<<"| Number output tracks    | "<<std::setw(12)<<m_findtracks  
+  out<<"| Number output tracks    | "<<std::setw(12)<<data.findtracks  
      <<"                              |"<<std::endl;
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
@@ -224,7 +225,7 @@ MsgStream& InDet::SiTrackMaker_xk::dumpevent( MsgStream& out ) const
 // Dumps relevant information into the ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::SiTrackMaker_xk::dump( std::ostream& out ) const
+std::ostream& InDet::SiTrackMaker_xk::dump(std::ostream& out) const
 {
   return out;
 }
@@ -234,7 +235,7 @@ std::ostream& InDet::SiTrackMaker_xk::dump( std::ostream& out ) const
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-(MsgStream& sl,const InDet::SiTrackMaker_xk& se)
+(MsgStream& sl, const InDet::SiTrackMaker_xk& se)
 { 
   return se.dump(sl); 
 }
@@ -244,7 +245,7 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-(std::ostream& sl,const InDet::SiTrackMaker_xk& se)
+(std::ostream& sl, const InDet::SiTrackMaker_xk& se)
 {
   return se.dump(sl); 
 }   
@@ -253,15 +254,21 @@ std::ostream& InDet::operator <<
 // Initiate track finding tool for new event
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
+void InDet::SiTrackMaker_xk::newEvent(bool PIX, bool SCT) const
 {
+  EventData& data{getEventData()};
   SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
-  if (beamSpotHandle.isValid()) { m_xybeam[0] = beamSpotHandle->beamPos()[0]; m_xybeam[1] = beamSpotHandle->beamPos()[1]; }
-  else                          { m_xybeam[0] = 0.;                           m_xybeam[1] = 0.;                           }
+  if (beamSpotHandle.isValid()) {
+    data.xybeam[0] = beamSpotHandle->beamPos()[0];
+    data.xybeam[1] = beamSpotHandle->beamPos()[1];
+  } else {
+    data.xybeam[0] = 0.;
+    data.xybeam[1] = 0.;
+  }
   
-  m_pix          = PIX && m_usePix;
-  m_sct          = SCT && m_useSct;
-  bool simpleTrack  = false;
+  data.pix = PIX and m_usePix;
+  data.sct = SCT and m_useSct;
+  bool simpleTrack = false;
 
   InDet::TrackQualityCuts trackquality = std::move(setTrackQualityCuts(simpleTrack));
 
@@ -271,29 +278,29 @@ void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
 
   // Erase cluster to track association
   //
-  if (m_seedsfilter) m_clusterTrack.clear();
+  if (m_seedsfilter) data.clusterTrack.clear();
 
   // Erase statistic information
   //
-  m_inputseeds = 0;
-  m_goodseeds  = 0;
-  m_findtracks = 0;
+  data.inputseeds = 0;
+  data.goodseeds  = 0;
+  data.findtracks = 0;
 
   // Retrieve 
   //
   if (m_useBremModel && m_useCaloSeeds) {
 
-    m_caloF.clear();
-    m_caloR.clear();
-    m_caloZ.clear();
+    data.caloF.clear();
+    data.caloR.clear();
+    data.caloZ.clear();
 
     if (!m_caloCluster.key().empty()) {
       SG::ReadHandle<CaloClusterROI_Collection> calo_cluster(m_caloCluster);
       if (calo_cluster.isValid()) {
         for (const Trk::CaloClusterROI *c : * calo_cluster) {
-          m_caloF.push_back( c->globalPosition().phi ());
-          m_caloR.push_back( c->globalPosition().perp());
-          m_caloZ.push_back( c->globalPosition().z   ());
+          data.caloF.push_back( c->globalPosition().phi ());
+          data.caloR.push_back( c->globalPosition().perp());
+          data.caloZ.push_back( c->globalPosition().z   ());
         }
       }
     }
@@ -301,32 +308,33 @@ void InDet::SiTrackMaker_xk::newEvent(bool PIX,bool SCT)
 
   if (!m_useSSSfilter && m_useHClusSeed) {
 
-    m_hadF.clear();
-    m_hadR.clear();
-    m_hadZ.clear();
+    data.hadF.clear();
+    data.hadR.clear();
+    data.hadZ.clear();
 
     if (!m_caloHad.key().empty()) {
       SG::ReadHandle<CaloClusterROI_Collection> calo_had(m_caloHad);
       if (calo_had.isValid()) {
         for (const Trk::CaloClusterROI *c : * calo_had) {
-          m_hadF.push_back( c->globalPosition().phi ());
-          m_hadR.push_back( c->globalPosition().perp());
-          m_hadZ.push_back( c->globalPosition().z   ());
+          data.hadF.push_back( c->globalPosition().phi ());
+          data.hadR.push_back( c->globalPosition().perp());
+          data.hadZ.push_back( c->globalPosition().z   ());
         }
       }
     }
   }
-  if (m_seedsegmentsWrite) m_seedtrack->newEvent(m_trackinfo,m_patternName);
+  if (m_seedsegmentsWrite) m_seedtrack->newEvent(m_trackinfo, m_patternName);
 }
 
 ///////////////////////////////////////////////////////////////////
 // Initiate track finding tool for new event
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiTrackMaker_xk::newTrigEvent(bool PIX,bool SCT)
+void InDet::SiTrackMaker_xk::newTrigEvent(bool PIX, bool SCT) const
 {
-  m_pix          = PIX && m_usePix;
-  m_sct          = SCT && m_useSct;
+  EventData& data{getEventData()};
+  data.pix          = PIX && m_usePix;
+  data.sct          = SCT && m_useSct;
   bool simpleTrack  = true;
 
   InDet::TrackQualityCuts trackquality = std::move(setTrackQualityCuts(simpleTrack));
@@ -337,28 +345,28 @@ void InDet::SiTrackMaker_xk::newTrigEvent(bool PIX,bool SCT)
 
   // Erase cluster to track association
   //
-  if (m_seedsfilter) m_clusterTrack.clear(); 
+  if (m_seedsfilter) data.clusterTrack.clear(); 
 
   // Erase statistic information
   //
-  m_inputseeds = 0;
-  m_goodseeds  = 0;
-  m_findtracks = 0;
+  data.inputseeds = 0;
+  data.goodseeds  = 0;
+  data.findtracks = 0;
 }
 
 ///////////////////////////////////////////////////////////////////
 // Finalize track finding tool for given event
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiTrackMaker_xk::endEvent()
+void InDet::SiTrackMaker_xk::endEvent() const
 {
-
+  EventData& data{getEventData()};
   // End event for track finder tool
   //
   m_tracksfinder->endEvent();
 
   //correction to exclude memory fragmentation
-  m_clusterTrack.clear();
+  data.clusterTrack.clear();
 
   // end event for seed to track tool
   if (m_seedsegmentsWrite) m_seedtrack->endEvent();
@@ -366,7 +374,7 @@ void InDet::SiTrackMaker_xk::endEvent()
   // Print event information 
   //
   if (msgLevel()<=0) {
-    m_nprint=1;
+    data.nprint = 1;
     ATH_MSG_DEBUG(*this);
   }
 }
@@ -376,30 +384,28 @@ void InDet::SiTrackMaker_xk::endEvent()
 ///////////////////////////////////////////////////////////////////
 
 std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
-(const std::list<const Trk::SpacePoint*>& Sp)
+(const std::list<const Trk::SpacePoint*>& Sp) const
 {
-  ++m_inputseeds;
+  EventData& data{getEventData()};
+  ++data.inputseeds;
   std::list<Trk::Track*> tracks;
-  if (!m_pix && !m_sct) return tracks;
+  if (!data.pix && !data.sct) return tracks;
   
   bool good;
-  !m_seedsfilter ? good=true : good=newSeed(Sp);  
+  !m_seedsfilter ? good=true : good=newSeed(data, Sp);  
 
   if (!good) return tracks;
 
-  bool dbm = isDBMSeeds(*Sp.begin());
-  m_dbm = dbm; // Cache dbm for another getTracks method.
+  data.dbm = isDBMSeeds(*Sp.begin());
 
   // Get initial parameters estimation
   //
   bool sss = false;
-  std::array<double, 9> par;
   const Trk::TrackParameters* Tp = nullptr;
-  if (dbm) Tp = getAtaPlaneDBM(Sp, par);
-  else Tp = getAtaPlane(sss && m_useHClusSeed, Sp, par);
-  m_par = par; // Cache par for another getTracks method.
+  if (data.dbm) Tp = getAtaPlaneDBM(data, Sp);
+  else Tp = getAtaPlane(data, sss && m_useHClusSeed, Sp);
   if (!Tp) return tracks;
-  ++m_goodseeds;
+  ++data.goodseeds;
 
   // Get detector elements road
   //
@@ -407,7 +413,7 @@ std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
   if (!m_cosmicTrack) m_roadmaker->detElementsRoad(*Tp,Trk::alongMomentum,   DE);
   else                m_roadmaker->detElementsRoad(*Tp,Trk::oppositeMomentum,DE);
 
-  if (!m_pix || !m_sct || m_dbm) detectorElementsSelection(DE, dbm);
+  if (!data.pix || !data.sct || data.dbm) detectorElementsSelection(data, DE);
 
   if ( static_cast<int>(DE.size())  <   m_nclusmin) {
     delete Tp;
@@ -419,27 +425,27 @@ std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
   // Find possible list of tracks using space points space points information
   //
   if (!m_useBremModel) {
-    tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,m_clusterTrack);
+    tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,data.clusterTrack);
   } else if (!m_useCaloSeeds) {
-    tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,m_clusterTrack,false);
-  } else if (isCaloCompatible(par)) {
-    tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,m_clusterTrack,true);
+    tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,data.clusterTrack,false);
+  } else if (isCaloCompatible(data)) {
+    tracks = m_tracksfinder->getTracksWithBrem(*Tp,Sp,Gp,DE,data.clusterTrack,true);
   } else {
-    tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,m_clusterTrack);
+    tracks = m_tracksfinder->getTracks        (*Tp,Sp,Gp,DE,data.clusterTrack);
   }
   
   if (m_seedsfilter) {
     std::list<Trk::Track*>::iterator t = tracks.begin();
     while (t!=tracks.end()) {
-      if (!isNewTrack((*t), m_clusterTrack)) {
+      if (!isNewTrack(data, *t)) {
         delete (*t);
         tracks.erase(t++);
       } else {
-        clusterTrackMap((*t++), m_clusterTrack);
+        clusterTrackMap(data, *t++);
       }
     }
   }
-  m_findtracks+=tracks.size();
+  data.findtracks+=tracks.size();
 
   // Call seed to track execution
   //
@@ -454,13 +460,14 @@ std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
 ///////////////////////////////////////////////////////////////////
 
 std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
-(const Trk::TrackParameters& Tp,const std::list<Amg::Vector3D>& Gp)
+(const Trk::TrackParameters& Tp, const std::list<Amg::Vector3D>& Gp) const
 {
-  ++m_inputseeds;
+  EventData& data{getEventData()};
+  ++data.inputseeds;
   std::list<Trk::Track*> tracks;
-  if (!m_pix && !m_sct) return tracks;
+  if (!data.pix && !data.sct) return tracks;
 
-  ++m_goodseeds;
+  ++data.goodseeds;
 
   // Get detector elements road
   //
@@ -468,11 +475,7 @@ std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
   if (!m_cosmicTrack) m_roadmaker->detElementsRoad(Tp,Trk::alongMomentum,   DE);
   else                m_roadmaker->detElementsRoad(Tp,Trk::oppositeMomentum,DE);
 
-  // In this method, isDBMSeeds method is not called and dbm is not determined.
-  // However, dbm is required for detectorElementsSelection.
-  // Cached value of dbm is used.
-  bool dbm = m_dbm;
-  if (!m_pix || !m_sct) detectorElementsSelection(DE, dbm);
+  if (!data.pix || !data.sct) detectorElementsSelection(data, DE);
 
   if (static_cast<int>(DE.size()) < m_nclusmin) return tracks; 
 
@@ -480,33 +483,28 @@ std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
   //
   std::list<const Trk::SpacePoint*>  Sp;
   
-  // In this method, getAtaPlane method is not called and par is not determined.
-  // However, par is required for isCaloCompatible.
-  // Cached value of par is used.
-  std::array<double, 9> par = m_par;
-
   if (!m_useBremModel) {
-    tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,m_clusterTrack);
+    tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,data.clusterTrack);
   } else if (!m_useCaloSeeds) {
-    tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,m_clusterTrack,false);
-  } else if (isCaloCompatible(par)) {
-    tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,m_clusterTrack,true);
+    tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,data.clusterTrack,false);
+  } else if (isCaloCompatible(data)) {
+    tracks = m_tracksfinder->getTracksWithBrem(Tp,Sp,Gp,DE,data.clusterTrack,true);
   } else {
-    tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,m_clusterTrack);
+    tracks = m_tracksfinder->getTracks        (Tp,Sp,Gp,DE,data.clusterTrack);
   }
   
   if (m_seedsfilter) {
     std::list<Trk::Track*>::iterator t = tracks.begin();
     while (t!=tracks.end()) {
-      if (!isNewTrack((*t), m_clusterTrack)) {
+      if (!isNewTrack(data, *t)) {
         delete (*t);
         tracks.erase(t++);
       } else {
-        clusterTrackMap((*t++), m_clusterTrack);
+        clusterTrackMap(data, *t++);
       }
     }
   }
-  m_findtracks+=tracks.size();
+  data.findtracks += tracks.size();
   return tracks;
 }
 
@@ -515,7 +513,7 @@ std::list<Trk::Track*> InDet::SiTrackMaker_xk::getTracks
 ///////////////////////////////////////////////////////////////////
 
 const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
-(bool sss,const std::list<const Trk::SpacePoint*>& SP, std::array<double, 9>& par) const
+(EventData& data, bool sss, const std::list<const Trk::SpacePoint*>& SP) const
 {
   std::list<const Trk::SpacePoint*>::const_iterator is=SP.begin(),ise=SP.end(),is0,is1,is2;  
   if (is==ise) return nullptr;
@@ -563,8 +561,8 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
   
   double   d[3] = {x0-D[0],y0-D[1],z0-D[2]};
 
-  par[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
-  par[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
+  data.par[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
+  data.par[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
   if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
@@ -574,31 +572,31 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
     double H[3],gP[3] ={x0,y0,z0}; m_fieldServiceHandle->getFieldZR(gP,H);
 
     if (fabs(H[2])>.0001) {
-      par[2] = atan2(b+a*A,a-b*A);
-      par[3] = atan2(1.,T)       ;  
-      par[5] = -C/(300.*H[2])    ;
+      data.par[2] = atan2(b+a*A,a-b*A);
+      data.par[3] = atan2(1.,T)       ;  
+      data.par[5] = -C/(300.*H[2])    ;
     } else {
       T    =  z2*sqrt(r2)  ;
-      par[2] = atan2(y2,x2);
-      par[3] = atan2(1.,T) ;
-      par[5] = 1./m_pTmin  ;
+      data.par[2] = atan2(y2,x2);
+      data.par[3] = atan2(1.,T) ;
+      data.par[5] = 1./m_pTmin  ;
     }
   } else {
     T    = z2*sqrt(r2)   ;
-    par[2] = atan2(y2,x2);
-    par[3] = atan2(1.,T) ;
-    par[5] = 1./m_pTmin  ;
+    data.par[2] = atan2(y2,x2);
+    data.par[3] = atan2(1.,T) ;
+    data.par[5] = 1./m_pTmin  ;
   }
   
-  if (fabs(par[5])*m_pTmin > 1.1) return nullptr;
-  par[4] = par[5]/sqrt(1.+T*T);
-  par[6] = x0                              ;
-  par[7] = y0                              ;
-  par[8] = z0                              ;
+  if (fabs(data.par[5])*m_pTmin > 1.1) return nullptr;
+  data.par[4] = data.par[5]/sqrt(1.+T*T);
+  data.par[6] = x0                              ;
+  data.par[7] = y0                              ;
+  data.par[8] = z0                              ;
 
-  if (sss && !isHadCaloCompatible(par)) return nullptr;
+  if (sss && !isHadCaloCompatible(data)) return nullptr;
 
-  return pla->createTrackParameters(par[0],par[1],par[2],par[3],par[4],0); 
+  return pla->createTrackParameters(data.par[0],data.par[1],data.par[2],data.par[3],data.par[4],0); 
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -606,7 +604,7 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlane
 ///////////////////////////////////////////////////////////////////
 
 const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlaneDBM
-(const std::list<const Trk::SpacePoint*>& SP, std::array<double, 9>& par) const
+(EventData& data, const std::list<const Trk::SpacePoint*>& SP) const
 {
   std::list<const Trk::SpacePoint*>::const_iterator is=SP.begin(),ise=SP.end(),is0,is1,is2;  
   if (is==ise) return nullptr;
@@ -625,8 +623,8 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlaneDBM
   double p0[3],p1[3],p2[3]; 
   if (!globalPositions((*is0),(*is1),(*is2),p0,p1,p2)) return nullptr;
 
-  double x0 = m_xybeam[0]-p0[0];
-  double y0 = m_xybeam[1]-p0[1];
+  double x0 = data.xybeam[0]-p0[0];
+  double y0 = data.xybeam[1]-p0[1];
   double x2 = p2[0]      -p0[0];
   double y2 = p2[1]      -p0[1];
   double z2 = p2[2]      -p0[2];
@@ -651,8 +649,8 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlaneDBM
   
   double   d[3] = {p0[0]-D[0],p0[1]-D[1],p0[2]-D[2]};
 
-  par[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
-  par[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
+  data.par[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
+  data.par[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
   if (!m_fieldServiceHandle->solenoidOn()) fieldModeEnum = Trk::NoField;
@@ -662,35 +660,35 @@ const Trk::TrackParameters* InDet::SiTrackMaker_xk::getAtaPlaneDBM
     m_fieldServiceHandle->getFieldZR(gP,H);
 
     if (fabs(H[2])>.0001) {
-      par[2] = atan2(b+a*A,a-b*A);
-      par[3] = atan2(1.,T)       ;  
-      par[5] = -C/(300.*H[2])    ;
+      data.par[2] = atan2(b+a*A,a-b*A);
+      data.par[3] = atan2(1.,T)       ;  
+      data.par[5] = -C/(300.*H[2])    ;
     } else {
       T    =  z2*sqrt(r2)  ;
-      par[2] = atan2(y2,x2);
-      par[3] = atan2(1.,T) ;
-      par[5] = 1./1000.    ;
+      data.par[2] = atan2(y2,x2);
+      data.par[3] = atan2(1.,T) ;
+      data.par[5] = 1./1000.    ;
     }
   } else {
     T    = z2*sqrt(r2)   ;
-    par[2] = atan2(y2,x2);
-    par[3] = atan2(1.,T) ;
-    par[5] = 1./1000     ;
+    data.par[2] = atan2(y2,x2);
+    data.par[3] = atan2(1.,T) ;
+    data.par[5] = 1./1000     ;
   }
 
-  if (fabs(par[5])*20. > 1.1) return nullptr;
-  par[4] = par[5]/sqrt(1.+T*T);
-  par[6] = p0[0]                           ;
-  par[7] = p0[1]                           ;
-  par[8] = p0[2]                           ;
-  return pla->createTrackParameters(par[0],par[1],par[2],par[3],par[4],0); 
+  if (fabs(data.par[5])*20. > 1.1) return nullptr;
+  data.par[4] = data.par[5]/sqrt(1.+T*T);
+  data.par[6] = p0[0]                           ;
+  data.par[7] = p0[1]                           ;
+  data.par[8] = p0[2]                           ;
+  return pla->createTrackParameters(data.par[0],data.par[1],data.par[2],data.par[3],data.par[4],0); 
 }
 
 ///////////////////////////////////////////////////////////////////
 // Set track quality cuts
 ///////////////////////////////////////////////////////////////////
 
-InDet::TrackQualityCuts InDet::SiTrackMaker_xk::setTrackQualityCuts(bool simpleTrack)
+InDet::TrackQualityCuts InDet::SiTrackMaker_xk::setTrackQualityCuts(bool simpleTrack) const
 {
   InDet::TrackQualityCuts trackquality;
   // Integer cuts
@@ -725,17 +723,18 @@ InDet::TrackQualityCuts InDet::SiTrackMaker_xk::setTrackQualityCuts(bool simpleT
 // Detector elements selection
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiTrackMaker_xk::detectorElementsSelection(std::list<const InDetDD::SiDetectorElement*>& DE, bool dbm) const
+void InDet::SiTrackMaker_xk::detectorElementsSelection(EventData& data,
+                                                       std::list<const InDetDD::SiDetectorElement*>& DE) const
 {
   std::list<const InDetDD::SiDetectorElement*>::iterator d = DE.begin();
-  if (!dbm) {
+  if (!data.dbm) {
     while (d!=DE.end()) {
       if ((*d)->isPixel()) {
-        if (!m_pix) {
+        if (!data.pix) {
           d = DE.erase(d);
           continue;
         }
-      } else if (!m_sct) {
+      } else if (!data.sct) {
         d = DE.erase(d);
         continue;
       }
@@ -763,10 +762,10 @@ void InDet::SiTrackMaker_xk::detectorElementsSelection(std::list<const InDetDD::
 // New clusters comparison with clusters associated with track
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp)
+bool InDet::SiTrackMaker_xk::newSeed(EventData& data, const std::list<const Trk::SpacePoint*>& Sp) const
 {
   std::multiset<const Trk::Track*> trackseed;
-  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator pt,pte = m_clusterTrack.end();
+  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator pt,pte = data.clusterTrack.end();
   std::list<const Trk::SpacePoint*>::const_iterator s=Sp.begin(),se=Sp.end();
 
   int n = 0;
@@ -774,7 +773,7 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
 
     const Trk::PrepRawData* p = (*s)->clusterList().first; 
    
-    for (pt = m_clusterTrack.find(p); pt!=pte; ++pt) {
+    for (pt = data.clusterTrack.find(p); pt!=pte; ++pt) {
       if ((*pt).first!=p) break;
       trackseed.insert((*pt).second);
     }
@@ -783,7 +782,7 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
     p = (*s)->clusterList().second;
     if (!p) continue;
 
-    for (pt = m_clusterTrack.find(p); pt!=pte; ++pt) {
+    for (pt = data.clusterTrack.find(p); pt!=pte; ++pt) {
       if ((*pt).first!=p) break;
       trackseed.insert((*pt).second);
     }
@@ -829,7 +828,7 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
 
   if ( (m_ITKGeomtry && t3 > 0) || nsm3 > 13 || t3 > 2) return false;
 
-  if ( !m_cosmicTrack && n==3 && m_sct && (*Sp.begin())->r() > 43. ) return true;
+  if ( !m_cosmicTrack && n==3 && data.sct && (*Sp.begin())->r() > 43. ) return true;
   if (t3 > 0) return false;
   return true;
 }
@@ -838,8 +837,7 @@ bool InDet::SiTrackMaker_xk::newSeed(const std::list<const Trk::SpacePoint*>& Sp
 // Clusters-track multimap production
 ///////////////////////////////////////////////////////////////////
 
-void  InDet::SiTrackMaker_xk::clusterTrackMap(Trk::Track* Tr,
-                                              std::multimap<const Trk::PrepRawData*, const Trk::Track*>& clusterTrack) const
+void  InDet::SiTrackMaker_xk::clusterTrackMap(EventData& data, Trk::Track* Tr) const
 {
   DataVector<const Trk::MeasurementBase>::const_iterator 
     m  = Tr->measurementsOnTrack()->begin(), 
@@ -847,7 +845,7 @@ void  InDet::SiTrackMaker_xk::clusterTrackMap(Trk::Track* Tr,
 
   for (; m!=me; ++m) {
     const Trk::PrepRawData* prd = static_cast<const Trk::RIO_OnTrack*>(*m)->prepRawData();
-    if (prd) clusterTrack.insert(std::make_pair(prd,Tr));
+    if (prd) data.clusterTrack.insert(std::make_pair(prd, Tr));
   }
 }
  
@@ -855,12 +853,11 @@ void  InDet::SiTrackMaker_xk::clusterTrackMap(Trk::Track* Tr,
 // Test is it new track
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isNewTrack(Trk::Track* Tr,
-                                        const std::multimap<const Trk::PrepRawData*, const Trk::Track*>& clusterTrack) const
+bool InDet::SiTrackMaker_xk::isNewTrack(EventData& data, Trk::Track* Tr) const
 {
   const Trk::PrepRawData* prd   [100];
   std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator 
-    ti,t[100],te = m_clusterTrack.end();
+    ti,t[100],te = data.clusterTrack.end();
 
   int n = 0;
 
@@ -873,7 +870,7 @@ bool InDet::SiTrackMaker_xk::isNewTrack(Trk::Track* Tr,
     const Trk::PrepRawData* pr = static_cast<const Trk::RIO_OnTrack*>(*m)->prepRawData();
     if (pr) {
       prd[n] =pr;
-      t  [n] = clusterTrack.find(prd[n]);
+      t  [n] = data.clusterTrack.find(prd[n]);
       if (t[n]==te) return true;
       ++n;
     }
@@ -899,8 +896,8 @@ bool InDet::SiTrackMaker_xk::isNewTrack(Trk::Track* Tr,
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::SiTrackMaker_xk::globalPositions
-(const Trk::SpacePoint* s0,const Trk::SpacePoint* s1,const Trk::SpacePoint* s2,
- double* p0,double* p1,double* p2) const
+(const Trk::SpacePoint* s0, const Trk::SpacePoint* s1, const Trk::SpacePoint* s2,
+ double* p0, double* p1, double* p2) const
 {
 
   p0[0] = s0->globalPosition().x(); 
@@ -981,20 +978,20 @@ bool InDet::SiTrackMaker_xk::globalPosition
 // Test is it track with calo seed compatible
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isCaloCompatible(const std::array<double, 9>& par) const
+bool InDet::SiTrackMaker_xk::isCaloCompatible(EventData& data) const
 {
   const double pi = M_PI, pi2 = 2.*M_PI;
 
-  if (m_caloF.empty()) return false;   
+  if (data.caloF.empty()) return false;   
 
-  std::list<double>::const_iterator f = m_caloF.begin(), fe = m_caloF.end();
-  std::list<double>::const_iterator r = m_caloR.begin();
-  std::list<double>::const_iterator z = m_caloZ.begin();
+  std::list<double>::const_iterator f = data.caloF.begin(), fe = data.caloF.end();
+  std::list<double>::const_iterator r = data.caloR.begin();
+  std::list<double>::const_iterator z = data.caloZ.begin();
 
-  double F = par[2]                           ;
-  double E = -log(tan(.5*par[3]))             ;
-  double R = sqrt(par[6]*par[6]+par[7]*par[7]);
-  double Z = par[8]                           ;                           
+  double F = data.par[2]                           ;
+  double E = -log(tan(.5*data.par[3]))             ;
+  double R = sqrt(data.par[6]*data.par[6]+data.par[7]*data.par[7]);
+  double Z = data.par[8]                           ;                           
   
   for (; f!=fe; ++f) {
     double df = fabs(F-(*f));
@@ -1013,20 +1010,20 @@ bool InDet::SiTrackMaker_xk::isCaloCompatible(const std::array<double, 9>& par)
 // Test track is compatible withi had calo seed
 ///////////////////////////////////////////////////////////////////
 
-bool InDet::SiTrackMaker_xk::isHadCaloCompatible(const std::array<double, 9>& par) const
+bool InDet::SiTrackMaker_xk::isHadCaloCompatible(EventData& data) const
 {
   const double pi = M_PI, pi2 = 2.*M_PI;
 
-  if (m_hadF.empty() || fabs(par[5])*m_pTminSSS > 1.) return false;   
+  if (data.hadF.empty() || fabs(data.par[5])*m_pTminSSS > 1.) return false;   
 
-  std::list<double>::const_iterator f = m_hadF.begin(), fe = m_hadF.end();
-  std::list<double>::const_iterator r = m_hadR.begin();
-  std::list<double>::const_iterator z = m_hadZ.begin();
+  std::list<double>::const_iterator f = data.hadF.begin(), fe = data.hadF.end();
+  std::list<double>::const_iterator r = data.hadR.begin();
+  std::list<double>::const_iterator z = data.hadZ.begin();
 
-  double F = par[2]                           ;
-  double E = -log(tan(.5*par[3]))             ;
-  double R = sqrt(par[6]*par[6]+par[7]*par[7]);
-  double Z = par[8]                           ;                           
+  double F = data.par[2]                           ;
+  double E = -log(tan(.5*data.par[3]))             ;
+  double R = sqrt(data.par[6]*data.par[6]+data.par[7]*data.par[7]);
+  double Z = data.par[8]                           ;                           
   
   for (; f!=fe; ++f) {
     double df = fabs(F-(*f));
@@ -1058,7 +1055,7 @@ bool InDet::SiTrackMaker_xk::isDBMSeeds(const Trk::SpacePoint* s) const
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiTrackMaker_xk::globalDirections
-(double* p0,double* p1,double* p2,double* d0,double* d1,double* d2) const
+(double* p0, double* p1, double* p2, double* d0, double* d1, double* d2) const
 {
   double x01 = p1[0]-p0[0]      ;
   double y01 = p1[1]-p0[1]      ;
@@ -1093,3 +1090,37 @@ void InDet::SiTrackMaker_xk::globalDirections
   d1[0] = Sa   +Sb*A0; d1[1]= Sb   -Sa*A0; d1[2]=Ce;  
   d2[0] = Sa*C2-Sb*S2; d2[1]= Sa*S2+Sb*C2; d2[2]=Ce;  
 }
+
+InDet::SiTrackMaker_xk::EventData& InDet::SiTrackMaker_xk::getEventData() const {
+  const EventContext& ctx{Gaudi::Hive::currentContext()};
+  EventContext::ContextID_t slot{ctx.slot()};
+  EventContext::ContextEvt_t evt{ctx.evt()};
+  std::lock_guard<std::mutex> lock{m_mutex};
+  if (slot>=m_cache.size()) { // Need to extend vectors
+    static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};
+    m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement
+    m_eventData.resize(slot+1);
+  }
+  if (m_cache[slot]!=evt) { // New event
+    m_cache[slot] = evt;
+    // Initialization
+    m_eventData[slot].inputseeds = 0;
+    m_eventData[slot].goodseeds = 0;
+    m_eventData[slot].findtracks = 0;
+    m_eventData[slot].nprint = 0;
+    m_eventData[slot].clusterTrack.clear();
+    m_eventData[slot].par = {0., 0., 0., 0., 0., 0., 0., 0., 0.};
+    m_eventData[slot].pix = false;
+    m_eventData[slot].sct = false;
+    m_eventData[slot].dbm = false;
+    m_eventData[slot].caloF.clear();
+    m_eventData[slot].caloR.clear();
+    m_eventData[slot].caloZ.clear();
+    m_eventData[slot].hadF.clear();
+    m_eventData[slot].hadR.clear();
+    m_eventData[slot].hadZ.clear();
+    m_eventData[slot].xybeam[0] = 0.;
+    m_eventData[slot].xybeam[1] = 0.;
+  }
+  return m_eventData[slot];
+}
-- 
GitLab


From 4c102e545c195f4c62d5760faaeeb8884704017f Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Mon, 6 May 2019 11:00:17 +0200
Subject: [PATCH 104/129] remove spurious DEBUG output in Btagging
 configuration

---
 .../JetTagAlgs/BTagging/python/BTaggingConfiguration.py         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
index f6c8211df8d7..0605b43d5977 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
@@ -1378,7 +1378,7 @@ class Configuration:
       output: The tool."""
       options = dict(options)
       options['name'] = name
-      options['OutputLevel'] = 2
+      #options['OutputLevel'] = 2
       options.setdefault('BTagAssociation', BTaggingFlags.doStandardAssoc)
       from BTagging.BTaggingConf import Analysis__BTagTrackAssociation
       tool = Analysis__BTagTrackAssociation(**options)
-- 
GitLab


From 259231b3c2073c24a4727a0ae9800c46bf01e9ae Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Mon, 6 May 2019 12:45:54 +0200
Subject: [PATCH 105/129] fix runTrigART for duplicate file names in PATH

---
 Trigger/TrigValidation/TrigValTools/bin/runTrigART.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py b/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py
index 65a26c990367..6dd8d554438a 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/runTrigART.py
@@ -49,6 +49,11 @@ def minimal_pattern(package):
             "Please select specific tests using the name patter (option -n).")
         exit(1)
 
+def duplicate_filename(list, filename):
+    for path in list:
+        if os.path.basename(path) == filename:
+            return True
+    return False
 
 def find_scripts(patterns):
     scripts = []
@@ -63,7 +68,7 @@ def find_scripts(patterns):
                 if re.search(patt, filename) is None:
                     matched = False
                     break
-            if matched:
+            if matched and not duplicate_filename(scripts,filename):
                 scripts.append(path+'/'+filename)
     scripts.sort()
     return scripts
-- 
GitLab


From 496d875816449db85fdf764fcbc658f90f4d17c6 Mon Sep 17 00:00:00 2001
From: Goetz Gaycken <goetz.gaycken@cern.ch>
Date: Mon, 6 May 2019 12:46:18 +0200
Subject: [PATCH 106/129] Only check whether the summary tool exists rather
 than retrieving it accidentially.

Also, use unique pointers to manage newly created track summaries.
---
 .../src/TrackParticleCreatorTool.cxx          | 41 ++++++++++---------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx b/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
index 06de8dc05b80..a1f5a44bbf37 100644
--- a/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
+++ b/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx
@@ -372,28 +372,28 @@ namespace Trk
       }  
     }
     
-    const Trk::TrackSummary* summary;
-    if (m_trackSummaryTool!=0 && m_useTrackSummaryTool)
+    std::unique_ptr<const Trk::TrackSummary> summary;
+    if (m_trackSummaryTool.get()!=nullptr)
     {
       if (m_forceTrackSummaryUpdate)
       {
         // next lines are a bit ugly: we need to cast the const away to update the track and then get the new summary
         // and even clone it because it belongs to the track ...
+        // @TODO must not modify the track
         Trk::Track& nonConstTrack = const_cast<Trk::Track&>(*track);
 	m_trackSummaryTool->updateTrack(nonConstTrack); 
       } 
-      summary = m_trackSummaryTool->createSummary(*track); 
-      
-      if (summary == 0)
+      summary.reset( m_trackSummaryTool->createSummary(*track) );
+      if (summary.get() == nullptr)
       {
         ATH_MSG_DEBUG ("No proper TrackSummary was returned. Creating TrackParticle with a dummy TrackSummary");
-        summary = new Trk::TrackSummary;
+        summary.reset(new Trk::TrackSummary);
       } // else ATH_MSG_VERBOSE("Got Summary for Track" );
     } else{
       ATH_MSG_VERBOSE ("No proper TrackSummaryTool found. Creating TrackParticle with a dummy TrackSummary");
-      summary = new Trk::TrackSummary;
+      summary.reset( new Trk::TrackSummary);
     }
-    
+
     // find the first and the last hit in track
     // we do that the same way as in the track slimming tool!
     // that way it is also ok on not slimmed tracks!
@@ -441,7 +441,7 @@ namespace Trk
       for ( ; itTSoS != track->trackStateOnSurfaces()->end(); ++itTSoS)
       {
         if (! (**itTSoS).trackParameters())     continue;
-        
+
         if (! haveFirstMeasurementParameters
             && (**itTSoS).type(TrackStateOnSurface::Measurement)
             && ! (**itTSoS).type(TrackStateOnSurface::Outlier)
@@ -465,18 +465,18 @@ namespace Trk
         {
           parameters.push_back((**itTSoS).trackParameters()->clone());
         }
-        
+
         ATH_MSG_VERBOSE( " including perigee at R "
                         << (**itTSoS).trackParameters()->position().perp()
                         << ", Z " << (**itTSoS).trackParameters()->position().z() );
-        
+
         // we are not interested in keeping measurement parameters after any second perigee
         if (parameters.size() > 0) haveFirstMeasurementParameters = true;
       }
     }
-    
+
     const Trk::FitQuality* fitQuality = new FitQuality( (*track->fitQuality()) );
-    Rec::TrackParticle* tp = new Rec::TrackParticle(track, prtOrigin, vxCandidate, summary, parameters, aPer,  fitQuality);
+    Rec::TrackParticle* tp = new Rec::TrackParticle(track, prtOrigin, vxCandidate, summary.release(), parameters, aPer,  fitQuality);
     return tp;
   }
   
@@ -538,22 +538,24 @@ namespace Trk
 	parsToBeDeleted = result; 
 	aPer = result; 
       }
-    } 
-    
-    const Trk::TrackSummary* summary;
-    if (m_trackSummaryTool!=0 && m_useTrackSummaryTool) {
+    }
+    std::unique_ptr<const Trk::TrackSummary> cleanup_summary;
+    const Trk::TrackSummary *summary=cleanup_summary.get();
+    if (m_trackSummaryTool.get() != nullptr) {
       if(m_forceTrackSummaryUpdate){
         // next lines are a bit ugly: we need to cast the const away to update the track and then get the new summary
         // and even clone it because it belongs to the track ...
+        // @TODO must not modify the track
         Trk::Track& nonConstTrack = const_cast<Trk::Track&>(track);
         m_trackSummaryTool->updateTrack(nonConstTrack);
       }
-      summary = m_trackSummaryTool->createSummary(track); 
+      cleanup_summary.reset( m_trackSummaryTool->createSummary(track));
+      summary = cleanup_summary.get();
     }else{
       ATH_MSG_VERBOSE ("No proper TrackSummaryTool found. Creating TrackParticle with a TrackSummary on track");
       summary = track.trackSummary();
     }
-    
+
     // find the first and the last hit in track
     // we do that the same way as in the track slimming tool!
     // that way it is also ok on not slimmed tracks!
@@ -775,7 +777,6 @@ namespace Trk
     }
     }
 
-    if (m_trackSummaryTool!=0 && m_useTrackSummaryTool) delete summary;
     delete parsToBeDeleted;
     return trackparticle;
 
-- 
GitLab


From 526a9cc8bab2c611e5a23a5534d13a89bb96e83d Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Mon, 6 May 2019 12:08:27 +0000
Subject: [PATCH 107/129] make a number of AthMonitorAlgorithm methods const

---
 .../AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h | 6 +++---
 Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx        | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h b/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h
index 04e5cb971aaa..e027e0e0009b 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h
@@ -196,7 +196,7 @@ public:
      * 
      * @return m_trigDecTool
      */
-    const ToolHandle<Trig::ITrigDecisionTool>& getTrigDecisionTool();
+    const ToolHandle<Trig::ITrigDecisionTool>& getTrigDecisionTool() const;
 
 
     /** 
@@ -277,7 +277,7 @@ public:
      * @param result The parsed output vector of strings.
      * @return StatusCode
      */
-    virtual StatusCode parseList( const std::string& line, std::vector<std::string>& result );
+    virtual StatusCode parseList( const std::string& line, std::vector<std::string>& result ) const;
 
 
     /**
@@ -288,7 +288,7 @@ public:
      * 
      * @param vTrigChainNames A vector of triggers which is modified.
      */
-    virtual void unpackTriggerCategories( std::vector<std::string>& vTrigChainNames );
+    virtual void unpackTriggerCategories( std::vector<std::string>& vTrigChainNames ) const;
 
 
 protected:
diff --git a/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx b/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx
index b5a56da433be..613e1298a2fc 100644
--- a/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx
+++ b/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx
@@ -181,7 +181,7 @@ ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::getGroup( const std::stri
 }
 
 
-const ToolHandle<Trig::ITrigDecisionTool>& AthMonitorAlgorithm::getTrigDecisionTool() {
+const ToolHandle<Trig::ITrigDecisionTool>& AthMonitorAlgorithm::getTrigDecisionTool() const {
     return m_trigDecTool;
 }
 
@@ -294,7 +294,7 @@ double AthMonitorAlgorithm::lbDuration() const {
 }
 
 
-StatusCode AthMonitorAlgorithm::parseList(const std::string& line, std::vector<std::string>& result) {
+StatusCode AthMonitorAlgorithm::parseList(const std::string& line, std::vector<std::string>& result) const {
     std::string item;
     std::stringstream ss(line);
 
@@ -310,7 +310,7 @@ StatusCode AthMonitorAlgorithm::parseList(const std::string& line, std::vector<s
 }
 
 
-void AthMonitorAlgorithm::unpackTriggerCategories(std::vector<std::string>& vTrigChainNames) {
+void AthMonitorAlgorithm::unpackTriggerCategories(std::vector<std::string>& vTrigChainNames) const {
     for (size_t i = 0; i < vTrigChainNames.size(); ++i) {
         std::string& thisName = vTrigChainNames[i];
 
-- 
GitLab


From ceb06a9c824028fa3f4f106746d6969f3cb595d8 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Mon, 6 May 2019 15:55:37 +0200
Subject: [PATCH 108/129] Make PanTau tools private (except those that have
 mutilple clients)

---
 .../PanTau/PanTauAlgs/Root/PanTauProcessor.cxx         | 10 +++++-----
 .../PanTauAlgs/Root/Tool_TauConstituentGetter.cxx      |  2 +-
 .../PanTau/PanTauAlgs/python/JobOptions_Main_PanTau.py | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx b/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx
index 6402a3c261d6..435453036cc7 100644
--- a/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx
+++ b/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx
@@ -35,11 +35,11 @@ PanTau::PanTauProcessor::PanTauProcessor(const std::string& name)
         
     //Initialise members for tools
     m_Tool_InformationStore("PanTau::Tool_InformationStore/Tool_InformationStore"),
-    m_Tool_TauConstituentGetter("PanTau::Tool_TauConstituentGetter/Tool_TauConstituentGetter"),
-    m_Tool_TauConstituentSelector("PanTau::Tool_TauConstituentSelector/Tool_TauConstituentSelector"),
-    m_Tool_FeatureExtractor("PanTau::Tool_FeatureExtractor/Tool_FeatureExtractor"),
-    m_Tool_DecayModeDeterminator("PanTau::Tool_DecayModeDeterminator/Tool_DecayModeDeterminator"),
-    m_Tool_DetailsArranger("PanTau::Tool_DetailsArranger/Tool_DetailsArranger")
+    m_Tool_TauConstituentGetter(this,"PanTau::Tool_TauConstituentGetter/Tool_TauConstituentGetter"),
+    m_Tool_TauConstituentSelector(this,"PanTau::Tool_TauConstituentSelector/Tool_TauConstituentSelector"),
+    m_Tool_FeatureExtractor(this,"PanTau::Tool_FeatureExtractor/Tool_FeatureExtractor"),
+    m_Tool_DecayModeDeterminator(this,"PanTau::Tool_DecayModeDeterminator/Tool_DecayModeDeterminator"),
+    m_Tool_DetailsArranger(this,"PanTau::Tool_DetailsArranger/Tool_DetailsArranger")
 {
     
     //Connect python variables to member functions...
diff --git a/Reconstruction/PanTau/PanTauAlgs/Root/Tool_TauConstituentGetter.cxx b/Reconstruction/PanTau/PanTauAlgs/Root/Tool_TauConstituentGetter.cxx
index 2d66b8533a31..f603d21aaf1f 100644
--- a/Reconstruction/PanTau/PanTauAlgs/Root/Tool_TauConstituentGetter.cxx
+++ b/Reconstruction/PanTau/PanTauAlgs/Root/Tool_TauConstituentGetter.cxx
@@ -23,7 +23,7 @@ PanTau::Tool_TauConstituentGetter::Tool_TauConstituentGetter(
     const std::string& name ) :
         asg::AsgTool(name),
         m_Tool_InformationStore("PanTau::Tool_InformationStore/Tool_InformationStore"),
-        m_Tool_InputConverter("PanTau::Tool_InputConverter/Tool_InputConverter")
+        m_Tool_InputConverter(this,"PanTau::Tool_InputConverter/Tool_InputConverter")
 {
     declareProperty("Tool_InformationStore",    m_Tool_InformationStore,   "Link to tool with all information");
     declareProperty("Tool_InputConverter",      m_Tool_InputConverter,     "Link to tool to convert into TauConstituents");
diff --git a/Reconstruction/PanTau/PanTauAlgs/python/JobOptions_Main_PanTau.py b/Reconstruction/PanTau/PanTauAlgs/python/JobOptions_Main_PanTau.py
index c95cbcb3e45b..48d22102e4dd 100644
--- a/Reconstruction/PanTau/PanTauAlgs/python/JobOptions_Main_PanTau.py
+++ b/Reconstruction/PanTau/PanTauAlgs/python/JobOptions_Main_PanTau.py
@@ -70,33 +70,33 @@ def getPanTau():
     python_Tool_InputConverter  = PanTau__Tool_InputConverter("PanTau_InputConverter",
                                                               Tool_InformationStore = python_Tool_InformationStore)
     python_Tool_InputConverter.OutputLevel = INFO
-    ToolSvc += python_Tool_InputConverter
+    #ToolSvc += python_Tool_InputConverter
     
     # ===> Tau Constituent Getter
     python_Tool_TauConstituentGetter = PanTau__Tool_TauConstituentGetter(   "PanTau_TauConstituentGetter",
                                                                             Tool_InformationStore = python_Tool_InformationStore,
                                                                             Tool_InputConverter   = python_Tool_InputConverter)
     python_Tool_TauConstituentGetter.OutputLevel = INFO
-    ToolSvc += python_Tool_TauConstituentGetter
+    #ToolSvc += python_Tool_TauConstituentGetter
     
     # ===> Tau Constituent Selector
     python_Tool_TauConstituentSelector = PanTau__Tool_TauConstituentSelector( "PanTau_TauConstituentSelector",
                                                                               Tool_InformationStore = python_Tool_InformationStore)
     python_Tool_TauConstituentSelector.OutputLevel = INFO
-    ToolSvc += python_Tool_TauConstituentSelector
+    #ToolSvc += python_Tool_TauConstituentSelector
     
     # ===> Tau Feature Extractor
     python_Tool_FeatureExtractor = PanTau__Tool_FeatureExtractor(   "PanTau_FeatureExtractor",
                                                                     Tool_InformationStore           = python_Tool_InformationStore
                                                                     )
     python_Tool_FeatureExtractor.OutputLevel = INFO
-    ToolSvc += python_Tool_FeatureExtractor
+    #ToolSvc += python_Tool_FeatureExtractor
     
     # ===> Details arranger tool
     python_Tool_DetailsArranger = PanTau__Tool_DetailsArranger( "PanTau_DetailsArranger",
                                                                 Tool_InformationStore           = python_Tool_InformationStore)
     python_Tool_DetailsArranger.OutputLevel = INFO
-    ToolSvc += python_Tool_DetailsArranger
+    #ToolSvc += python_Tool_DetailsArranger
 
 
 
-- 
GitLab


From 3b0fbeb32a94218a670cd126a6d668f39dfce7be Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Mon, 6 May 2019 14:02:27 +0000
Subject: [PATCH 109/129] Add a type function for the different kind of
 Measurement Type, could help to avoid a few RTTI/dynamic_casts in client code

---
 .../CaloCluster_OnTrack.h                     |  17 +-
 .../CompetingRIOsOnTrack.h                    |  11 +-
 .../TrkMeasurementBase/MeasurementBase.h      | 216 ++++++++++--------
 .../PseudoMeasurementOnTrack.h                |   5 +
 .../TrkRIO_OnTrack/RIO_OnTrack.h              |  15 +-
 .../TrkEvent/TrkSegment/TrkSegment/Segment.h  |  35 +--
 .../TrkSpacePoint/TrkSpacePoint/SpacePoint.h  |  15 +-
 .../TrkVertexOnTrack/VertexOnTrack.h          |  12 +-
 8 files changed, 191 insertions(+), 135 deletions(-)

diff --git a/Tracking/TrkEvent/TrkCaloCluster_OnTrack/TrkCaloCluster_OnTrack/CaloCluster_OnTrack.h b/Tracking/TrkEvent/TrkCaloCluster_OnTrack/TrkCaloCluster_OnTrack/CaloCluster_OnTrack.h
index 471a035feb16..122a5f8d4b36 100644
--- a/Tracking/TrkEvent/TrkCaloCluster_OnTrack/TrkCaloCluster_OnTrack/CaloCluster_OnTrack.h
+++ b/Tracking/TrkEvent/TrkCaloCluster_OnTrack/TrkCaloCluster_OnTrack/CaloCluster_OnTrack.h
@@ -47,24 +47,29 @@ namespace Trk {
       virtual ~CaloCluster_OnTrack();
 
       /** Pseudo-constructor, needed to avoid excessive RTTI*/
-      virtual CaloCluster_OnTrack* clone() const;
+      virtual CaloCluster_OnTrack* clone() const override;
             
       /** returns the surface for the local to global transformation 
       - interface from MeasurementBase */
-      virtual const Surface& associatedSurface() const;
+      virtual const Surface& associatedSurface() const override final;
      
       /** Interface method to get the global Position
       - interface from MeasurementBase */
-      virtual const Amg::Vector3D& globalPosition() const;
+      virtual const Amg::Vector3D& globalPosition() const override ;
 
       /** Extended method to get the EnergyLoss */
-      virtual const Trk::EnergyLoss* energyLoss() const;
+      const Trk::EnergyLoss* energyLoss() const;
+
+      /** Extended method checking the type*/
+       virtual bool type(MeasurementBaseType::Type type) const override {
+         return (type==MeasurementBaseType::CaloCluster_OnTrack);
+       }
 
       /**returns the some information about this RIO_OnTrack. */
-      virtual MsgStream&    dump( MsgStream& out ) const;  
+      virtual MsgStream&    dump( MsgStream& out ) const override;  
 
       /**returns the some information about this RIO_OnTrack. */
-      virtual std::ostream& dump( std::ostream& out ) const;
+      virtual std::ostream& dump( std::ostream& out ) const override;
  
 
     protected:
diff --git a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h
index e9b22fd268d9..4578f802a124 100755
--- a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h
+++ b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h
@@ -81,7 +81,7 @@ public:
     virtual ~CompetingRIOsOnTrack();
 
     //! Pseudo-constructor:  needed to avoid excessive RTTI
-    virtual CompetingRIOsOnTrack* clone() const = 0;
+    virtual CompetingRIOsOnTrack* clone() const override = 0;
 
     /** @brief Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
      - extends MeasurementBase */
@@ -106,6 +106,11 @@ public:
     /** @brief recalculate the LocalParameters and ErrorMatrix */
     virtual void setLocalParametersAndErrorMatrix();
 
+    /** Extended method checking the type*/
+    virtual bool type(MeasurementBaseType::Type type) const override{
+      return (type==MeasurementBaseType::CompetingRIOsOnTrack);
+    }
+
 protected:
     friend class ::CompetingRIOsOnTrackCnv_p1;
 
@@ -125,9 +130,9 @@ protected:
     virtual bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const = 0;
 
     //! returns the some information about the base class members (avoid code duplication)
-    virtual MsgStream&    dump( MsgStream& out ) const;  
+    virtual MsgStream&    dump( MsgStream& out ) const override;  
     //! returns the some information about the base class members (avoid code duplication)
-    virtual std::ostream& dump( std::ostream& out ) const;
+    virtual std::ostream& dump( std::ostream& out ) const override;
 
 };
 
diff --git a/Tracking/TrkEvent/TrkMeasurementBase/TrkMeasurementBase/MeasurementBase.h b/Tracking/TrkEvent/TrkMeasurementBase/TrkMeasurementBase/MeasurementBase.h
index 62d32e975413..a8d44a6ff999 100755
--- a/Tracking/TrkEvent/TrkMeasurementBase/TrkMeasurementBase/MeasurementBase.h
+++ b/Tracking/TrkEvent/TrkMeasurementBase/TrkMeasurementBase/MeasurementBase.h
@@ -2,101 +2,121 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MeasurementBase.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef TRKMEASUREMENTBASE_MEASUREMENTBASE_H
-#define TRKMEASUREMENTBASE_MEASUREMENTBASE_H
-
-//Amg
-#include "EventPrimitives/EventPrimitives.h"
-#include "GeoPrimitives/GeoPrimitives.h"
-//Trk
-#include "TrkEventPrimitives/LocalParameters.h"
-#include "GaudiKernel/MsgStream.h"
-// I/O
-#include <iostream>
-class MsgStream;
-
-namespace Trk {
-
-  class LocalParameters;
-  class ErrorMatrix;
-  class Surface;
-
-  /**@class MeasurementBase
-  
-    This class is the pure abstract base class for all fittable tracking measurements.
-    It holds the minimal information, such as LocalParameters, ErrorMatrix, 
-    a Surface and a GlobalPosition.
-    
-    The associatedSurface and the globalPosition are returned by pointers,
-    as they may be undefined (NULL pointer)
-    
-    @author Andreas.Salzburger@cern.ch
-  
-  */
-  class MeasurementBase {
-    
-    public:
-       /** Default constructor - needed for POOL/SEAL */
-       MeasurementBase(){}
-       
-       /** constructor  */
-       MeasurementBase( const LocalParameters& pars, const Amg::MatrixX& cov ) : 
-         m_localParams(pars), 
-         m_localCovariance(cov)
-      {}
-       
-       /** Virtual destructor */
-       virtual ~MeasurementBase(){}
-    
-       /**Pseudo-Constructor */
-       virtual MeasurementBase* clone() const = 0;
-    
-       /**Interface method to get the LocalParameters*/
-       const LocalParameters& localParameters() const;
-       
-       /**Interface method to get the localError*/
-       const Amg::MatrixX& localCovariance() const;
-  
-       /**Interface method to get the associated Surface*/
-       virtual const Surface& associatedSurface() const = 0;
-       
-       /**Interface method to get the global Position*/
-       virtual const Amg::Vector3D& globalPosition() const = 0;
-       
-       /**Interface method for output, to be overloaded by child classes* */
-       virtual MsgStream&    dump( MsgStream& out ) const = 0;  
-
-       /**Interface method for output, to be overloaded by child classes* */
-       virtual std::ostream& dump( std::ostream& out ) const = 0;
-              
-  protected:
-       LocalParameters  m_localParams;
-       Amg::MatrixX     m_localCovariance;
-  };
-
-/**Overload of << operator for MsgStream for debug output*/ 
-inline MsgStream& operator << ( MsgStream& sl, const Trk::MeasurementBase& mbase)
-  { return mbase.dump(sl); }
-
-
-/**Overload of << operator for std::ostream for debug output*/ 
-inline std::ostream& operator << ( std::ostream& sl, const Trk::MeasurementBase& mbase)
-  { return mbase.dump(sl); }
- 
-}
-
-inline const Trk::LocalParameters& Trk::MeasurementBase::localParameters() const {
-  return m_localParams;
-}
-       
-inline const Amg::MatrixX& Trk::MeasurementBase::localCovariance() const {
-  return m_localCovariance;
-}
-
-#endif
-
-
+///////////////////////////////////////////////////////////////////
+// MeasurementBase.h, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+
+#ifndef TRKMEASUREMENTBASE_MEASUREMENTBASE_H
+#define TRKMEASUREMENTBASE_MEASUREMENTBASE_H
+
+//Amg
+#include "EventPrimitives/EventPrimitives.h"
+#include "GeoPrimitives/GeoPrimitives.h"
+//Trk
+#include "TrkEventPrimitives/LocalParameters.h"
+#include "GaudiKernel/MsgStream.h"
+// I/O
+#include <iostream>
+class MsgStream;
+
+namespace Trk {
+
+  class LocalParameters;
+  class ErrorMatrix;
+  class Surface;
+
+  /**@class MeasurementBase
+  
+    This class is the pure abstract base class for all fittable tracking measurements.
+    It holds the minimal information, such as LocalParameters, ErrorMatrix, 
+    a Surface and a GlobalPosition.
+    
+    The associatedSurface and the globalPosition are returned by pointers,
+    as they may be undefined (NULL pointer)
+    
+    @author Andreas.Salzburger@cern.ch
+  
+  */
+
+namespace MeasurementBaseType{
+/* The various kind of MeasurementBase 
+ * to avoid dynamic_cast via using the type method
+ */
+enum Type{
+  Segment                  =0,
+  SpacePoint               =1,
+  RIO_OnTrack              =2,
+  CompetingRIOsOnTrack     =3,
+  PseudoMeasurementOnTrack =4,
+  VertexOnTrack            =5,
+  CaloCluster_OnTrack      =6
+}; 
+}
+
+
+  class MeasurementBase {
+    
+    public:
+       /** Default constructor - needed for POOL/SEAL */
+       MeasurementBase(){}
+       
+       /** constructor  */
+       MeasurementBase( const LocalParameters& pars, const Amg::MatrixX& cov ) : 
+         m_localParams(pars), 
+         m_localCovariance(cov)
+      {}
+       
+       /** Virtual destructor */
+       virtual ~MeasurementBase(){}
+    
+       /**Pseudo-Constructor */
+       virtual MeasurementBase* clone() const = 0;
+    
+       /**Interface method to get the LocalParameters*/
+       const LocalParameters& localParameters() const;
+       
+       /**Interface method to get the localError*/
+       const Amg::MatrixX& localCovariance() const;
+  
+       /**Interface method to get the associated Surface*/
+       virtual const Surface& associatedSurface() const = 0;
+       
+       /**Interface method to get the global Position*/
+       virtual const Amg::Vector3D& globalPosition() const = 0;
+
+       /** Interface method checking the type*/
+       virtual bool type(MeasurementBaseType::Type type) const =0;  
+       
+       /**Interface method for output, to be overloaded by child classes* */
+       virtual MsgStream&    dump( MsgStream& out ) const = 0;  
+
+       /**Interface method for output, to be overloaded by child classes* */
+       virtual std::ostream& dump( std::ostream& out ) const = 0;
+              
+  protected:
+       LocalParameters  m_localParams;
+       Amg::MatrixX     m_localCovariance;
+  };
+
+/**Overload of << operator for MsgStream for debug output*/ 
+inline MsgStream& operator << ( MsgStream& sl, const Trk::MeasurementBase& mbase)
+  { return mbase.dump(sl); }
+
+
+/**Overload of << operator for std::ostream for debug output*/ 
+inline std::ostream& operator << ( std::ostream& sl, const Trk::MeasurementBase& mbase)
+  { return mbase.dump(sl); }
+ 
+}
+
+inline const Trk::LocalParameters& Trk::MeasurementBase::localParameters() const {
+  return m_localParams;
+}
+       
+inline const Amg::MatrixX& Trk::MeasurementBase::localCovariance() const {
+  return m_localCovariance;
+}
+
+#endif
+
+
diff --git a/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h b/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h
index d20f61f836a9..d7488a0b484c 100755
--- a/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h
+++ b/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h
@@ -79,6 +79,11 @@ namespace Trk{
       //! returns the global Position (interface from MeasurementBase)
       virtual const Amg::Vector3D& globalPosition() const override;
 
+      /** Extended method checking the type*/
+       virtual bool type(MeasurementBaseType::Type type) const override {
+         return (type==MeasurementBaseType::PseudoMeasurementOnTrack);
+       }
+
       //! produces logfile output about its content in MsgStream form. 
       virtual MsgStream&    dump( MsgStream& out ) const override;
       //! produces logfile output about its content in stdout form. 
diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h
index 1ecace0b9d4c..a64f1f0076d9 100755
--- a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h
+++ b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrack.h
@@ -70,21 +70,26 @@ namespace Trk {
       virtual ~RIO_OnTrack();
 
       /** Pseudo-constructor, needed to avoid excessive RTTI*/
-      virtual RIO_OnTrack* clone() const = 0;
+      virtual RIO_OnTrack* clone() const override = 0;
                 
      /** returns the surface for the local to global transformation 
       - interface from MeasurementBase */
-      virtual const Surface& associatedSurface() const = 0;
+      virtual const Surface& associatedSurface() const override = 0;
      
      /**Interface method to get the global Position
       - interface from MeasurementBase */
-      virtual const Amg::Vector3D& globalPosition() const = 0;
+      virtual const Amg::Vector3D& globalPosition() const override = 0;
+
+      /** Extended method checking the type*/
+       virtual bool type(MeasurementBaseType::Type type) const override {
+         return (type==MeasurementBaseType::RIO_OnTrack);
+       }
 
       /**returns the some information about this RIO_OnTrack. */
-      virtual MsgStream&    dump( MsgStream& out ) const;  
+      virtual MsgStream&    dump( MsgStream& out ) const override;  
 
       /**returns the some information about this RIO_OnTrack. */
-      virtual std::ostream& dump( std::ostream& out ) const;
+      virtual std::ostream& dump( std::ostream& out ) const override;
            
      /** returns the PrepRawData (also known as  RIO) object to which this RIO_OnTrack is associated.
       Can be null (in case where the Trk::PrepRawData is not persistified). 
diff --git a/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h b/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h
index 9aa27cc5b127..3547003c8cde 100755
--- a/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h
+++ b/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h
@@ -58,19 +58,19 @@ class FitQuality;
 	  If you update this don't forget to update the dump method.
       */
       enum Author {
-	AuthorUnknown = 0,
-	MooMdtSegmentMakerTool = 1,
-	MooCscSegmentMakerTool = 2,
-	Muonboy = 3,
-	DCMathSegmentMaker = 4,
-	MDT_DHoughSegmentMakerTool = 5,
-	CSC_DHoughSegmentMakerTool = 6,
-	Csc2dSegmentMaker = 7,
-	Csc4dSegmentMaker = 8,
-	TRT_SegmentMaker = 9,
-	CTBTracking = 10,
-	DCMathSegmentMakerCurved = 11,
-	NumberOfAuthors = 12
+        AuthorUnknown = 0,
+        MooMdtSegmentMakerTool = 1,
+        MooCscSegmentMakerTool = 2,
+        Muonboy = 3,
+        DCMathSegmentMaker = 4,
+        MDT_DHoughSegmentMakerTool = 5,
+        CSC_DHoughSegmentMakerTool = 6,
+        Csc2dSegmentMaker = 7,
+        Csc4dSegmentMaker = 8,
+        TRT_SegmentMaker = 9,
+        CTBTracking = 10,
+        DCMathSegmentMakerCurved = 11,
+        NumberOfAuthors = 12
       }; 
 
 
@@ -95,8 +95,13 @@ class FitQuality;
       virtual ~Segment();
   
       /** Pseudo-constructor:  needed to avoid excessive RTTI*/
-      virtual Segment* clone() const = 0;
-     
+      virtual Segment* clone() const override = 0;
+      
+      /** Extended method checking the type*/
+       virtual bool type(MeasurementBaseType::Type type) const override {
+         return (type==MeasurementBaseType::Segment);
+       }
+
       /** returns the vector of Trk::MeasurementBase objects 
         - specific for this TrackSegment: Trk::MeasurementBase (generic)
         */
diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h
index 12dd8db82236..1ce0588b6737 100755
--- a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h
+++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h
@@ -69,18 +69,23 @@ namespace Trk{
     double phi() const ;
 	
     /**Interface method to get the associated Surface*/
-    const Surface& associatedSurface() const;
+    virtual const Surface& associatedSurface() const override;
        
     /**Interface method to get the global Position*/
-    const Amg::Vector3D& globalPosition() const;
+    virtual const Amg::Vector3D& globalPosition() const override;
        
     /** Clone */
-    virtual SpacePoint* clone() const = 0;       
+    virtual SpacePoint* clone() const override = 0;       
+
+    /** Extended method checking the type*/
+    virtual bool type(MeasurementBaseType::Type type) const override {
+      return (type==MeasurementBaseType::SpacePoint);
+    }
 
     /**Interface method for output, to be overloaded by child classes* */
-    virtual MsgStream&    dump( MsgStream& out ) const =0 ;  
+    virtual MsgStream&    dump( MsgStream& out ) const override =0 ;  
     /**Interface method for output, to be overloaded by child classes* */
-    virtual std::ostream& dump( std::ostream& out ) const =0 ;
+    virtual std::ostream& dump( std::ostream& out ) const override=0 ;
 
   protected:
     const std::pair<const PrepRawData*, const PrepRawData*> *m_clusList;
diff --git a/Tracking/TrkEvent/TrkVertexOnTrack/TrkVertexOnTrack/VertexOnTrack.h b/Tracking/TrkEvent/TrkVertexOnTrack/TrkVertexOnTrack/VertexOnTrack.h
index 625b4bd48409..56ab57b76bf5 100755
--- a/Tracking/TrkEvent/TrkVertexOnTrack/TrkVertexOnTrack/VertexOnTrack.h
+++ b/Tracking/TrkEvent/TrkVertexOnTrack/TrkVertexOnTrack/VertexOnTrack.h
@@ -65,15 +65,21 @@ namespace Trk{
       virtual ~VertexOnTrack();
 
       /** Pseudo-constructor, needed to avoid excessive RTTI*/
-      VertexOnTrack* clone() const;
+      VertexOnTrack* clone() const override;
 
       /** returns the surface for the local to global transformation 
       - interface from MeasurementBase */
-      const PerigeeSurface& associatedSurface() const;
+      virtual const PerigeeSurface& associatedSurface() const override;
 
       /**Interface method to get the global Position
       - interface from MeasurementBase */
-      const Amg::Vector3D& globalPosition() const;
+      virtual const Amg::Vector3D& globalPosition() const override;
+
+      /** Extended method checking the type*/
+      virtual bool type(MeasurementBaseType::Type type) const override {
+        return (type==MeasurementBaseType::VertexOnTrack);
+      }
+
 
       /**returns the some information about this VertexOnTrack. */
       virtual MsgStream&    dump( MsgStream& out ) const;
-- 
GitLab


From a8dabedc0c39dc091853104305c597046ad99470 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Mon, 6 May 2019 18:24:38 +0100
Subject: [PATCH 110/129] change pow(x,0.25) to sqrt(sqrt(x))

---
 .../TrkExSTEP_Propagator/src/STEP_Propagator.cxx            | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx b/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx
index d0edb19fd935..80f2f3409b10 100755
--- a/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx
@@ -1992,7 +1992,7 @@ Trk::STEP_Propagator::rungeKuttaStep( Cache& cache,
 
     //Use the error estimate to calculate new step length. h is returned by reference.
     distanceStepped = h; //Store old step length.
-    h = h*std::min( std::max( 0.25, std::pow((m_tolerance / errorEstimate), 0.25)), 4.);
+    h = h*std::min(std::max( 0.25, std::sqrt(std::sqrt(m_tolerance / errorEstimate))), 4.);
 
     //Repeat step with the new step size if error is too big.
     if (errorEstimate > 4.*m_tolerance) continue;
@@ -2267,7 +2267,7 @@ double Trk::STEP_Propagator::dgdlambda( Cache& cache,double l) const
 
   //Bethe-Bloch
   double lnCore = 4.*me*me/(m*m*m*m*I*I*l*l*l*l)/(1.+2.*gamma*me/m+me*me/m*m);
-  double lnCore_deriv = -4.*me*me/(m*m*m*m*I*I) * std::pow( l*l*l*l+2.*gamma*l*l*l*l*me/m+l*l*l*l*me*me/(m*m) ,-2.) *
+  double lnCore_deriv = -4.*me*me/(m*m*m*m*I*I) * std::pow( l*l*l*l+2.*gamma*l*l*l*l*me/m+l*l*l*l*me*me/(m*m) ,-2) *
     (4.*l*l*l+8.*me*l*l*l*gamma/m-2.*me*l/(m*m*m*gamma)+4.*l*l*l*me*me/(m*m));
   double ln_deriv = 2.*l*m*m*log(lnCore) + lnCore_deriv/(lnCore*beta*beta);
   double Bethe_Bloch_deriv = -kaz*ln_deriv;
@@ -2468,7 +2468,7 @@ void Trk::STEP_Propagator::updateMaterialEffects( Cache& cache,
 
     double MS2 = radiationLengths;
 
-    dLambdads = -cache.m_charge*average_dEds*E/std::pow(momentum, 3);
+    dLambdads = -cache.m_charge*average_dEds*E/(momentum*momentum*momentum);
     remainingPath -= layerThickness;
 
     // simple - step dependent formula
-- 
GitLab


From 56b6d317160fb2c6b25cd330017c734f4e6d7bf3 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 6 May 2019 19:53:59 +0200
Subject: [PATCH 111/129] Restore use of CaloLumiBCIDTool.

Restore the use of the obsolete tool CaloLumiBCIDTool in trigger code,
as per Denis.

We really want to remove it soon, so this code should still be migrated
to use the conditions algorithm as soon as possible.
---
 .../TrigCaloRec/src/HLTCaloCellMaker.cxx      | 25 ++++-----
 .../TrigCaloRec/src/HLTCaloCellMaker.h        |  6 +--
 .../TrigT2CaloCommon/ITrigCaloDataAccessSvc.h |  2 -
 .../TrigT2CaloCommon/LArCellCont.h            | 13 +++--
 .../python/TrigT2CaloCommonConfig.py          |  8 +--
 .../share/testDataAccessService.py            |  3 --
 .../TrigT2CaloCommon/src/LArCellCont.cxx      | 54 +++++++++++--------
 .../src/TestCaloDataAccess.cxx                | 27 ++++------
 .../TrigT2CaloCommon/src/TestCaloDataAccess.h |  9 +---
 .../src/TrigCaloDataAccessSvc.cxx             | 31 +++++------
 .../src/TrigCaloDataAccessSvc.h               | 14 ++---
 .../TrigT2CaloCommon/src/TrigDataAccess.cxx   | 37 ++++++-------
 .../TrigT2CaloCommon/src/TrigDataAccess.h     | 10 ++--
 .../python/TrigT2CaloEgammaMTConfig.py        |  3 ++
 .../TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx  | 36 ++++---------
 .../TrigT2CaloEgamma/src/EgammaReEmEnFex.h    | 12 -----
 .../TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx | 15 +-----
 .../TrigT2CaloEgamma/src/EgammaReHadEnFex.h   | 11 ----
 .../TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx | 16 +-----
 .../TrigT2CaloEgamma/src/EgammaReSamp1Fex.h   |  9 ----
 .../TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx | 14 +----
 .../TrigT2CaloEgamma/src/EgammaReSamp2Fex.h   |  9 ----
 .../TrigT2CaloEgamma/src/RingerReFex.cxx      |  5 +-
 .../TrigT2CaloEgamma/src/RingerReFex.h        |  5 +-
 .../TrigUpgradeTest/share/testHLT_MT.py       |  1 -
 25 files changed, 128 insertions(+), 247 deletions(-)
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
 mode change 100644 => 100755 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h

diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
index 52918e19f3ed..0b7ca1ab7f0b 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 /*
  *   */
@@ -42,7 +42,6 @@ StatusCode HLTCaloCellMaker::initialize() {
   else
     ATH_CHECK( m_cellContainerVKey.initialize() );
   ATH_CHECK( m_tileEMScaleKey.initialize() );
-  ATH_CHECK( m_bcidAvgKey.initialize() );
   CHECK( m_dataAccessSvc.retrieve() );
   return StatusCode::SUCCESS;
 }
@@ -53,8 +52,6 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
   auto roisHandle = SG::makeHandle( m_roiCollectionKey );
   const TrigRoiDescriptorCollection* roiCollection = roisHandle.cptr();
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
-
   // datahandle 
   if ( m_roiMode ) {
     if ( roiCollection->size() > 1 ) 
@@ -65,7 +62,7 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       ATH_MSG_INFO ( "Running on RoI " << *roiDescriptor<< " FS="<<roiDescriptor->isFullscan());
       if ( roiDescriptor->isFullscan() ) {
-        ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, avg.cptr(), *cdv ));
+        ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *cdv ));
 	cdv->setHasCalo(CaloCell_ID::LAREM);
 	cdv->setHasCalo(CaloCell_ID::LARHEC);
 	cdv->setHasCalo(CaloCell_ID::LARFCAL);
@@ -76,14 +73,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
 	// TT EM PART
 	for(int sampling=0;sampling<4;sampling++){
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTEM, sampling, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, sampling, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LAREM);
 	// TT HEC PART
 	for(int sampling=0;sampling<4;sampling++){
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTHEC, sampling, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTHEC, sampling, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LARHEC);
@@ -97,14 +94,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
 	// TT FCAL EM PART
 	{
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALEM, 0, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALEM, 0, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LARFCAL);
 	// TT FCAL HAD PART
 	for(int sampling=0;sampling<2;sampling++){
 	LArTT_Selector<LArCellCont> sel;
-	ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALHAD, sampling, sel ));
+	ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALHAD, sampling, sel ));
 	for( const auto cell : sel ) {cdv->push_back( cell ); }
 	}
 	cdv->setHasCalo(CaloCell_ID::LARFCAL);
@@ -124,7 +121,7 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       if ( roiDescriptor->isFullscan() ) {
 	auto c = std::make_unique<CaloConstCellContainer >(SG::VIEW_ELEMENTS);
-	ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, avg.cptr(), *c ));
+	ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *c ));
 	cellContainerV->push_back( c.release()->asDataVector() );
 		
       } else {
@@ -133,14 +130,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
         // TT EM PART
         for(int sampling=0;sampling<4;sampling++){
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTEM, sampling, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, sampling, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LAREM);
         // TT HEC PART
         for(int sampling=0;sampling<4;sampling++){
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, TTHEC, sampling, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTHEC, sampling, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LARHEC);
@@ -154,14 +151,14 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
         // TT FCAL EM PART
         {
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALEM, 0, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALEM, 0, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LARFCAL);
         // TT FCAL HAD PART
         for(int sampling=0;sampling<2;sampling++){
         LArTT_Selector<LArCellCont> sel;
-        ATH_CHECK(m_dataAccessSvc->loadCollections( context, avg.cptr(), *roiDescriptor, FCALHAD, sampling, sel ));
+        ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALHAD, sampling, sel ));
         for( const auto cell : sel ) {c->push_back( cell ); }
         }
         c->setHasCalo(CaloCell_ID::LARFCAL);
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
index 9758240d2561..963106c53d75 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 /*
  *   */
@@ -28,7 +28,6 @@
 #include "CaloEvent/CaloCellContainerVector.h"
 #include "AthContainers/ConstDataVector.h"
 #include "CaloEvent/CaloConstCellContainer.h"
-#include "CaloEvent/CaloBCIDAverage.h"
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
 #include "TileConditions/TileEMScale.h"
 
@@ -54,9 +53,6 @@ class HLTCaloCellMaker: public AthReentrantAlgorithm {
 
 	ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc;
 	bool m_roiMode;
-
-        SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-        { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
old mode 100644
new mode 100755
index e100a9321910..33a22a1bb84d
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/ITrigCaloDataAccessSvc.h
@@ -30,7 +30,6 @@ class ITrigCaloDataAccessSvc: virtual public IService {
    * @brief downloads the LAr data for an RoI and makes sure the cache collection is filled wiht decoded cells   
    */
   virtual StatusCode loadCollections( const EventContext& context,
-                                      const CaloBCIDAverage* avg,
                                       const IRoiDescriptor& roi,
                                       const DETID detId, const int sampling,
                                       LArTT_Selector<LArCellCont>& loadedCells ) = 0;
@@ -83,7 +82,6 @@ class ITrigCaloDataAccessSvc: virtual public IService {
 */
   
   virtual StatusCode loadFullCollections ( const EventContext& context,
-                                           const CaloBCIDAverage* avg,
                                            ConstDataVector<CaloCellContainer>& cont ) = 0;
 
         /* /\** */
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h
index 24257769731e..ab8f291d823c 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h
@@ -22,6 +22,7 @@
 #include "LArCabling/LArCablingLegacyService.h"
 #include "LArByteStream/Hid2RESrcID.h"
 #include "Identifier/HWIdentifier.h"
+#include "CaloInterface/ICaloLumiBCIDTool.h"
 
 #include <vector>
 
@@ -29,7 +30,6 @@ class EventInfo;
 //class StoreGateSvc;
 class ILArBadChannelMasker;
 class ILArBadFebMasker;
-class CaloBCIDAverage;
 static std::vector<float> corrBCIDref_example;
 
 /** Class which contains statically allocated LArCellCollections */
@@ -63,8 +63,7 @@ class LArCellCont : public std::vector<LArCellCollection*>
   /** method to apply correction based on the luminosity
   *  to the energy
   */
-  void applyBCIDCorrection(const CaloBCIDAverage* avg,
-                           const unsigned int& rodid);
+  void applyBCIDCorrection(const unsigned int& rodid);
 
   /** destructor */
   virtual ~LArCellCont() { };
@@ -77,6 +76,10 @@ class LArCellCont : public std::vector<LArCellCollection*>
   void eventNumber ( const unsigned int eN ) { m_event=eN; };
   /** sets LumiBlock and BCID */
   void lumiBlock_BCID(const unsigned int lumi_block, const unsigned int BCID);
+  /** has to retrieve the pointer before in TrigDataAccess */
+  void setCaloLumiBCIDPointer( ICaloLumiBCIDTool* caloLumiBCIDTool ) {
+    m_caloLumiBCIDTool = caloLumiBCIDTool;
+  }
   
   /** List of Missing ROBs */
   const std::vector<uint32_t>& MissingROBs( void ) {
@@ -114,7 +117,9 @@ private:
 	/** reference to the corrections for a given BCID */
 	std::vector<float>& m_corrBCIDref;
 	/** update BCID dependent correction table */
-	void updateBCID(const CaloBCIDAverage* avg);
+	void updateBCID();
+	/** CaloLumiBCIDTool pointer */
+	ICaloLumiBCIDTool* m_caloLumiBCIDTool;
 	/** index table */
 	std::map<HWIdentifier,int> m_indexset;
         /** current lumi_block */
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py
index 8bbd309208de..03a7a986123e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigT2CaloCommonConfig.py
@@ -31,9 +31,11 @@ class TrigDataAccess(_TrigDataAccess):
                     svcMgr += LArFlatConditionSvc()
                     svcMgr.LArFlatConditionSvc.OFCInput="/LAR/ElecCalibFlat/OFC"
                     svcMgr.ProxyProviderSvc.ProviderNames += [ "LArFlatConditionSvc" ]
-
-                from CaloRec.CaloBCIDAvgAlgDefault import CaloBCIDAvgAlgDefault
-                CaloBCIDAvgAlgDefault()
+                    
+                from CaloTools.CaloLumiBCIDToolDefault import CaloLumiBCIDToolDefault
+                theCaloLumiBCIDTool = CaloLumiBCIDToolDefault()
+                svcMgr.ToolSvc += theCaloLumiBCIDTool
+                self.CaloLumiBCIDTool = theCaloLumiBCIDTool
                 self.ApplyOffsetCorrection = True
             else:
                 log.info('Disable HLT calo offset correction')
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
index fc4701e93a2a..c32240a15d21 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
@@ -2,9 +2,6 @@
 #  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
 
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-TriggerFlags.doCaloOffsetCorrection = False
-
 include("TrigUpgradeTest/testHLT_MT.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx
index 6c32c2b64765..3e6ce6c58cfb 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx
@@ -14,16 +14,18 @@
 #include "LArBadChannelTool/LArBadFebMasker.h"
 #include "CaloUtils/CaloCellCorrection.h"
 #include "GaudiKernel/ListItem.h"
+#include "EventInfo/EventInfo.h"
+#include "EventInfo/EventID.h"
 #include "LArElecCalib/ILArMCSymTool.h"
-#include "CaloEvent/CaloBCIDAverage.h"
+#include "CaloInterface/ICaloLumiBCIDTool.h"
 #include <iostream>
 //#include <time.h>
 
-LArCellCont::LArCellCont() : m_event(0), m_corrBCIDref( corrBCIDref_example ), m_lumi_block(0), m_bcid(5000), m_larCablingSvc(nullptr), m_BCIDcache(false)
+LArCellCont::LArCellCont() : m_event(0), m_corrBCIDref( corrBCIDref_example ), m_caloLumiBCIDTool(nullptr), m_lumi_block(0), m_bcid(5000), m_larCablingSvc(nullptr), m_BCIDcache(false)
 {}
 
 StatusCode
-LArCellCont::initialize(bool /*applyOffsetCorrection*/) {
+LArCellCont::initialize(bool applyOffsetCorrection) {
 
 #ifdef TRIGLARCELLDEBUG
 std::cout << "LArCellCont \t\t DEBUG \t in initialize" << std::endl;
@@ -93,6 +95,16 @@ if (sc.isFailure()){
    return StatusCode::FAILURE;
  }
 
+ICaloLumiBCIDTool* iclbt=0;
+ if ( applyOffsetCorrection ) {
+   if ( toolSvc->retrieveTool("ICaloLumiBCIDTool/CaloLumiBCIDToolDefault", iclbt).isFailure() ) {
+     std::cout << "could not retrieve the tool" << std::endl;
+   } else {
+     std::cout << "Tool retrieved from within LArCellCont" << std::endl;
+     m_caloLumiBCIDTool= iclbt;
+   }
+ }
+
 LArRoI_Map* roiMap;
 if(StatusCode::SUCCESS != toolSvc->retrieveTool("LArRoI_Map", roiMap ) )
      {std::cout << " Can't get AlgTool LArRoI_Map " << std::endl;
@@ -123,6 +135,7 @@ std::vector<uint32_t> RobsFromMissingFeb;
 
 //std::map<HWIdentifier,int> m_indexset;
 int count = 0;
+//ToolHandle<ILArMCSymTool>  larmcsym ("LArMCSymTool");
 ILArMCSymTool*  larmcsym;
 if ( (toolSvc->retrieveTool("LArMCSymTool",larmcsym)).isFailure() ) {
     std::cout << "did not managed to retrieve LArMCSymTool" << std::endl;
@@ -294,15 +307,13 @@ LArCellCont::find(const unsigned int& rodid) const{
 	return m_it;
 }
 
-void LArCellCont::applyBCIDCorrection(const CaloBCIDAverage* avg,
-                                      const unsigned int& rodid)
-{
+void LArCellCont::applyBCIDCorrection(const unsigned int& rodid){
   int idx = m_hash(rodid);
   m_it = (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+idx);
   LArCellCollection* col = (*m_it);
   unsigned int itsize = col->size();
   std::vector<int>& hashTab = m_hashSym[idx];
-  if ( !m_BCIDcache ) { updateBCID(avg); m_BCIDcache=true; m_corrBCIDref = m_corrBCID[0]; }
+  if ( !m_BCIDcache ) { updateBCID(); m_BCIDcache=true; m_corrBCIDref = m_corrBCID[0]; }
   for(unsigned int i=0; i< itsize; ++i){
     float cor = m_corrBCIDref[ hashTab[i] ];
     LArCell* cell = col->operator[](i);
@@ -331,25 +342,26 @@ void LArCellCont::lumiBlock_BCID(const unsigned int lumi_block, const unsigned i
   }    
 }
 
-void LArCellCont::updateBCID(const CaloBCIDAverage* avg) {
+void LArCellCont::updateBCID() {
   //std::clock_t startT,endT;
   //startT = clock();
+  int bcid=m_bcid;
   std::map<HWIdentifier,int>::const_iterator end = m_indexset.end  ();
   int indexsetmax = m_indexset.size();
   //m_corrBCID.resize(1);
-  if ( (m_larCablingSvc == 0) || (avg==0) ) return;
-  std::vector<float>& BCID0=m_corrBCID[0];
-  BCID0.resize(indexsetmax+1);
-  std::map<HWIdentifier,int>::const_iterator beg = m_indexset.begin();
-  for( ; beg != end ; ++beg ) {
-    HWIdentifier hwid = (*beg).first;
-    int idx = (*beg).second;
-    if ( idx < (int)BCID0.size() ){
-      Identifier id = m_larCablingSvc->cnvToIdentifier(hwid);
-      float corr = avg->average(id);
-      BCID0[idx] = corr;
-    }
-  } // end of HWID
+  if ( (m_larCablingSvc == 0) || (m_caloLumiBCIDTool==0) ) return;
+    std::vector<float>& BCID0=m_corrBCID[0];
+    BCID0.resize(indexsetmax+1);
+    std::map<HWIdentifier,int>::const_iterator beg = m_indexset.begin();
+    for( ; beg != end ; ++beg ) {
+      HWIdentifier hwid = (*beg).first;
+      int idx = (*beg).second;
+      if ( idx < (int)BCID0.size() ){
+	Identifier id = m_larCablingSvc->cnvToIdentifier(hwid);
+	float corr = m_caloLumiBCIDTool->average(id,bcid);
+	BCID0[idx] = corr;
+      }
+    } // end of HWID
   //endT = clock();
   //std::cout << "Total time [ms] " << (double)(endT-startT) << " for " << m_indexset.size() << " x " << maxBCID << std::endl;
   return; 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx
index 8754d3692445..d953b5da363e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx
@@ -11,7 +11,6 @@
 #include "TrigT2CaloCommon/LArCellCont.h"
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 #include "CaloEvent/CaloConstCellContainer.h"
-#include "StoreGate/ReadHandle.h"
 #include "TestCaloDataAccess.h"
 #include <sys/time.h>
 
@@ -29,13 +28,10 @@
 
 class AskForRoI : public ParallelCallTest {
 public:
-  AskForRoI( const EventContext& context,
-             const CaloBCIDAverage* avg,
-             const ServiceHandle<ITrigCaloDataAccessSvc>& svc,  	     
+  AskForRoI( const EventContext& context, const ServiceHandle<ITrigCaloDataAccessSvc>& svc,  	     
 	     MsgStream& msg,
 	     const TrigRoiDescriptor& roi ) 
     : m_context( context ),
-      m_avg( avg ),
       m_svc( svc ),
       m_msg( msg ),
       m_roi ( roi ) {
@@ -53,13 +49,13 @@ public:
     else{
       // keep this for test reasons
       //usleep (5000);
-      return m_svc->loadCollections( m_context, m_avg, m_roi, TTEM, 2, sel );    
+      return m_svc->loadCollections( m_context, m_roi, TTEM, 2, sel );    
     }
   }
 
   StatusCode request( ConstDataVector<CaloCellContainer>& c ) const {
     if ( m_roi.isFullscan() ){
-      return m_svc->loadFullCollections( m_context, m_avg, c );
+      return m_svc->loadFullCollections( m_context, c );
     }
     else{
       std::cout << "wrong RoI descriptor used for FS" << std::endl;
@@ -184,7 +180,6 @@ public:
 
 private:
   const EventContext& m_context;
-  const CaloBCIDAverage* m_avg;
   const ServiceHandle<ITrigCaloDataAccessSvc>& m_svc;
   MsgStream& m_msg;
   MsgStream& msg(){ return m_msg; }
@@ -218,14 +213,11 @@ TestCaloDataAccess::~TestCaloDataAccess() {}
 
 StatusCode TestCaloDataAccess::initialize() {
   CHECK( m_dataAccessSvc.retrieve() );
-  CHECK( m_bcidAvgKey.initialize() );
   return StatusCode::SUCCESS;
 }
 
 void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const{
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
-
   std::default_random_engine generator;
   std::normal_distribution<double> N1(0.0, 1.7);
   std::normal_distribution<double> N2(0.0, 0.2);
@@ -241,7 +233,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
   TrigRoiDescriptor roi( RoI_eta1, RoI_eta1-width, RoI_eta1+width, // eta
 			 RoI_phi1, RoI_phi1-width, RoI_phi1+width, // phi
 			 0 );
-  AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
+  AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
   allRoIs.push_back( afr );
 
   chance = U(generator);
@@ -253,7 +245,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
     TrigRoiDescriptor roi( RoI_eta2, RoI_eta2-width, RoI_eta2+width, // eta
 			   RoI_phi2, RoI_phi2-width, RoI_phi2+width, // phi
 			   0 );
-    AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
+    AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
     allRoIs.push_back( afr );
   }
 
@@ -269,7 +261,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
       TrigRoiDescriptor roi( RoI_eta3, RoI_eta3-width, RoI_eta3+width, // eta
                              RoI_phi3, RoI_phi3-width, RoI_phi3+width, // phi
                              0 );
-      AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
+      AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
       allRoIs.push_back( afr );
     }
   }
@@ -277,7 +269,7 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
   chance = U(generator);
   if ( chance > 0.6 ) {
     TrigRoiDescriptor roi( true );
-    AskForRoI* afr = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi );
+    AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi );
     allRoIs.push_back( afr );
   }
 
@@ -285,7 +277,6 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P
 
 void TestCaloDataAccess::emulateFixedRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const{
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
   std::vector<TrigRoiDescriptor> rois;
   TrigRoiDescriptor roi1( 0.7, 0.7-0.1, 0.7+0.1, // eta
 			  0.1, 0.1-0.1, 0.1+0.1, // phi
@@ -305,10 +296,10 @@ void TestCaloDataAccess::emulateFixedRoIs( const EventContext& context, std::vec
   rois.push_back(roi4);
   TrigRoiDescriptor roi5( true );
   for( int i=0;i<std::min(m_nFixedRoIs,4);++i) {
-    AskForRoI* t1 = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), rois[i]);
+    AskForRoI* t1 = new AskForRoI( context, m_dataAccessSvc, msg(), rois[i]);
     allRoIs.push_back(t1);
   }
-  AskForRoI* t6 = new AskForRoI( context, avg.cptr(), m_dataAccessSvc, msg(), roi5);  // FS
+  AskForRoI* t6 = new AskForRoI( context, m_dataAccessSvc, msg(), roi5);  // FS
   allRoIs.push_back(t6);
 
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h
index 4ed8a1743285..2773288de16e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 #ifndef TrigT2CaloCommon_TestCaloDataAccess_h
 #define TrigT2CaloCommon_TestCaloDataAccess_h
@@ -8,8 +8,6 @@
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "TrigT2CaloCommon/ITrigCaloDataAccessSvc.h"
-#include "CaloEvent/CaloBCIDAverage.h"
-#include "StoreGate/ReadHandleKey.h"
 
 
 /**
@@ -34,10 +32,7 @@ class TestCaloDataAccess
   TestCaloDataAccess();
   void emulateRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const;
   void emulateFixedRoIs( const EventContext& context, std::vector<ParallelCallTest*>& allRoIs ) const;
-  ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc;
-
-  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
+  ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc; 
 
   int m_nFixedRoIs;
   bool m_emulateRoIs;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx
index 39ba98c2c6ad..689fda41a0a3 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx
@@ -49,16 +49,14 @@ StatusCode TrigCaloDataAccessSvc::finalize() {
 }
 
 
-unsigned int
-TrigCaloDataAccessSvc::prepareFullCollections( const EventContext& context,
-                                               const CaloBCIDAverage* avg)
-{
-  return prepareLArFullCollections( context, avg );
+unsigned int TrigCaloDataAccessSvc::prepareFullCollections( const EventContext& context ) {
+
+  return prepareLArFullCollections( context );
+  
 }
 
 
 StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context,
-                                                    const CaloBCIDAverage* avg,
                                                     const IRoiDescriptor& roi,
                                                     const DETID detID,
                                                     const int sampling,
@@ -67,7 +65,7 @@ StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context,
   std::vector<IdentifierHash> requestHashIDs;  
 
   ATH_MSG_DEBUG( "LArTT requested for event " << context << " and RoI " << roi );  
-  unsigned int sc = prepareLArCollections( context, avg, roi, sampling, detID );
+  unsigned int sc = prepareLArCollections( context, roi, sampling, detID );
 
   if ( sc ) return StatusCode::FAILURE;
   
@@ -142,7 +140,6 @@ StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context,
 
 
 StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& context,
-                                                        const CaloBCIDAverage* avg,
                                                         ConstDataVector<CaloCellContainer>& cont ) {
 
 
@@ -156,7 +153,7 @@ StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& cont
   m_robDataProvider->addROBData( m_vrodid32tile );
   }
 
-  unsigned int sc = prepareLArFullCollections( context, avg );
+  unsigned int sc = prepareLArFullCollections( context );
   if ( sc ) return StatusCode::FAILURE;
 
   sc = prepareTileFullCollections( context );
@@ -175,10 +172,8 @@ StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& cont
 }
 
 
-unsigned int
-TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContext& context,
-                                                  const CaloBCIDAverage* avg)
-{
+unsigned int TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContext& context ) {
+
   ATH_MSG_DEBUG( "Full Col " << " requested for event " << context );
   if ( !m_lateInitDone && lateInit() ) {
     return 0x1; // dummy code
@@ -205,7 +200,7 @@ TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContext& context,
         m_robDataProvider->getROBData( context, vrodid32fullDet, robFrags );      
       }
       
-      status |= convertROBs( avg, robFrags, ( cache->larContainer ) );
+      status |= convertROBs( robFrags, ( cache->larContainer ) );
       
       if ( vrodid32fullDet.size() != robFrags.size() ) {
         ATH_MSG_DEBUG( "Missing ROBs, requested " << vrodid32fullDet.size() << " obtained " << robFrags.size() );
@@ -394,8 +389,7 @@ unsigned int TrigCaloDataAccessSvc::lateInit() { // non-const this thing
   return 0x0;
 }
 
-unsigned int TrigCaloDataAccessSvc::convertROBs( const CaloBCIDAverage* avg,
-                                                 const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, 
+unsigned int TrigCaloDataAccessSvc::convertROBs( const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, 
                                                LArCellCont* larcell ) {
 
   unsigned int status(0);
@@ -442,7 +436,7 @@ unsigned int TrigCaloDataAccessSvc::convertROBs( const CaloBCIDAverage* avg,
 	  // TB the converter has state
 	  status |= (m_larDecoder->report_error());
 
-	  if ( m_applyOffsetCorrection ) larcell->applyBCIDCorrection( avg, sourceID );
+	  if ( m_applyOffsetCorrection ) larcell->applyBCIDCorrection( sourceID );
 	} 
 	
       }
@@ -534,7 +528,6 @@ void TrigCaloDataAccessSvc::clearMissing( const std::vector<uint32_t>& request,
 
 
 unsigned int TrigCaloDataAccessSvc::prepareLArCollections( const EventContext& context,
-                                                           const CaloBCIDAverage* avg,
                                                          const IRoiDescriptor& roi,
                                                          const int sampling,
                                                          DETID detector ) {
@@ -569,7 +562,7 @@ unsigned int TrigCaloDataAccessSvc::prepareLArCollections( const EventContext& c
   // same in prepareLArFullCollections
   cache->larContainer->eventNumber( context.evt() );
   
-  unsigned int status = convertROBs( avg, robFrags, ( cache->larContainer ) );
+  unsigned int status = convertROBs( robFrags, ( cache->larContainer ) );
 
   if ( requestROBs.size() != robFrags.size() ) {
     ATH_MSG_DEBUG( "Missing ROBs, requested " << requestROBs.size() << " obtained " << robFrags.size() );
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h
index 28193ca5c5f4..ff28aa31d295 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TrigT2CaloCommon_TrigCaloDataAccessSvc_h
@@ -35,7 +35,6 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
   virtual StatusCode finalize() override;
   
   virtual StatusCode loadCollections ( const EventContext& context,
-                                       const CaloBCIDAverage* avg,
                                        const IRoiDescriptor& roi,
                                        const DETID detID,
                                        const int sampling,
@@ -49,7 +48,6 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
 
   
   virtual StatusCode loadFullCollections ( const EventContext& context,
-                                           const CaloBCIDAverage* avg,
                                            ConstDataVector<CaloCellContainer>& cont ) override;
   
  private:
@@ -110,8 +108,7 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
   unsigned int lateInit();
   bool m_lateInitDone = false;
 
-  unsigned int convertROBs(const CaloBCIDAverage* avg,
-                           const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, LArCellCont* larcell );
+  unsigned int convertROBs(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& robFrags, LArCellCont* larcell );
   unsigned int convertROBs( const std::vector<IdentifierHash>& rIds, TileCellCont* tilecell );
 
 
@@ -133,7 +130,6 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
    * @brief LAr TT collections preparation code
    **/
   unsigned int prepareLArCollections( const EventContext& context,
-                                      const CaloBCIDAverage* avg,
 				const IRoiDescriptor& roi, 
 				const int sampling,
 				DETID detector );
@@ -142,11 +138,9 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc>
 				const IRoiDescriptor& roi, 
 				DETID detector );
 
-  unsigned int prepareFullCollections( const EventContext& context,
-                                       const CaloBCIDAverage* avg );
+  unsigned int prepareFullCollections( const EventContext& context );
 
-  unsigned int prepareLArFullCollections( const EventContext& context,
-                                          const CaloBCIDAverage* avg );
+  unsigned int prepareLArFullCollections( const EventContext& context );
   unsigned int prepareTileFullCollections( const EventContext& context );
 
   std::vector<uint32_t> m_vrodid32fullDet;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
old mode 100644
new mode 100755
index 0ec3a570064c..429c5d13f85b
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
@@ -40,6 +40,8 @@
 #include "CaloDetDescr/CaloDetDescrManager.h"
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
+#include "CaloInterface/ICaloLumiBCIDTool.h"
+#include "LArElecCalib/ILArMCSymTool.h"
 #include "LArIdentifier/LArIdManager.h"
 #include "LArIdentifier/LArOnlineID.h"
 
@@ -146,8 +148,20 @@ StatusCode TrigDataAccess::initialize()
 	// luminosity tool
 	if ( m_applyOffsetCorrection ) {
 	  ATH_MSG_INFO("Apply BCID/<mu> dependent offset correction");
+	  if ( m_caloLumiBCIDTool.retrieve().isFailure() ) {
+	    ATH_MSG_FATAL("Could not find m_caloLumiBCID");
+	    return StatusCode::FAILURE;
+	  }
+	  //
+	  //if ( m_lumiTool.retrieve().isFailure() ) {
+	  //  (*m_log) << MSG::FATAL << "Could not find m_lumiTool" <<endmsg;
+	  //  return StatusCode::FAILURE;
+	  //} else {
+	  //  std::cout << "Retrieve lumiTool successfully" << std::endl;
+	  //}
 	} else {
 	  ATH_MSG_INFO("No BCID/<mu> dependent offset correction");
+	  m_caloLumiBCIDTool.disable();
 	}
 
         ATH_CHECK(m_lardecoder.retrieve());
@@ -155,8 +169,6 @@ StatusCode TrigDataAccess::initialize()
         ATH_CHECK(m_zdcdecoder.retrieve());
         ATH_CHECK(m_zdcrectool.retrieve());
 
-        ATH_CHECK( m_bcidAvgKey.initialize(m_applyOffsetCorrection) );
-
 	return StatusCode::SUCCESS;
 } // End of initialize
 
@@ -540,11 +552,6 @@ StatusCode TrigDataAccess::LoadCollections (
 		LArTT_Selector<LArCellCont>::const_iterator& Begin,
 		LArTT_Selector<LArCellCont>::const_iterator& End,
 		const unsigned int /*sample*/, bool /*prepare*/) {
-        const CaloBCIDAverage* avg = nullptr;
-        if (m_applyOffsetCorrection) {
-          avg = SG::makeHandle (m_bcidAvgKey).get();
-        }
-
 	if (msgLvl(MSG::VERBOSE)) {
           ATH_MSG_VERBOSE( "m_rIds.size() in LoadColl = " << m_rIds.size() );
           for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
@@ -598,7 +605,7 @@ StatusCode TrigDataAccess::LoadCollections (
         	  } else { // End of if small size
         	        m_lardecoder->setRobFrag(m_robFrags[i]);
         	        m_lardecoder->fillCollectionHLT(roddata1,roddatasize,*col);
-		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(avg, source_id);
+		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(source_id);
 		        // Accumulates inferior byte from ROD Decoder
 		        m_error|=m_lardecoder->report_error();
 		  } //roddatasize < 3
@@ -840,11 +847,6 @@ StatusCode TrigDataAccess::LoadFullCollections (
                 LArTT_Selector<LArCellCont>::const_iterator& Begin,
                 LArTT_Selector<LArCellCont>::const_iterator& End,
                 const DETID detid, bool /*prepare*/) {
-        const CaloBCIDAverage* avg = nullptr;
-        if (m_applyOffsetCorrection) {
-          avg = SG::makeHandle (m_bcidAvgKey).get();
-        }
-
         if (msgLvl(MSG::VERBOSE)) {
           ATH_MSG_VERBOSE( "m_rIds.size() in LoadColl = " << m_rIds.size() );
 	  for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
@@ -940,7 +942,7 @@ StatusCode TrigDataAccess::LoadFullCollections (
 		  else {
                         m_lardecoder->setRobFrag(m_robFrags[i]);
                         m_lardecoder->fillCollectionHLT(roddata1,roddatasize,*col);
-		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(avg, source_id);
+		        if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(source_id);
 		        // Accumulates inferior byte from ROD Decoder
                         m_error|=m_lardecoder->report_error();
 		  }
@@ -1204,11 +1206,6 @@ StatusCode TrigDataAccess::LoadFullCollections (
 StatusCode TrigDataAccess::LoadFullCollections (
 		CaloCellContainer::const_iterator& Begin,
                 CaloCellContainer::const_iterator& End){
-        const CaloBCIDAverage* avg = nullptr;
-        if (m_applyOffsetCorrection) {
-          avg = SG::makeHandle (m_bcidAvgKey).get();
-        }
-
         if (msgLvl(MSG::VERBOSE)) {
           ATH_MSG_VERBOSE( "m_rIds.size() in LoadColl = " << m_rIds.size() );
 	  for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
@@ -1269,7 +1266,7 @@ StatusCode TrigDataAccess::LoadFullCollections (
                 else {
                       m_lardecoder->setRobFrag(m_robFrags[i]);
                       m_lardecoder->fillCollectionHLT(roddata1,roddatasize,*col);
-		      if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(avg, source_id);
+		      if (m_applyOffsetCorrection) m_larcell->applyBCIDCorrection(source_id);
                       // Accumulates inferior byte from ROD Decoder
                       m_error|=m_lardecoder->report_error();
                 }
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
old mode 100644
new mode 100755
index e725c0012e48..2afd63361139
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.h
@@ -57,7 +57,6 @@
 #include "GaudiKernel/IIncidentListener.h"
 #include "GaudiKernel/Incident.h"
 #include "ZdcEvent/ZdcDigitsCollection.h"
-#include "CaloEvent/CaloBCIDAverage.h"
 
 // Roi information
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
@@ -73,6 +72,7 @@ class LArRoI_Map;
 class IROBDataProviderSvc;
 class StoreGateSvc;
 class T2CaloConfig;
+class ICaloLumiBCIDTool;
 
 /** Class that provides access to data for
     Calorimeter LVL2 Algorithms */
@@ -89,7 +89,8 @@ public:
     m_tiledecoder("TileROD_Decoder/TileROD_Decoder"),
     m_zdcdecoder("ZdcByteStreamReadV1V2Tool/ZdcByteStreamTool"),
     m_zdcrectool("ZdcRecChannelTool/ZdcByteChannelTool"), 
-    m_applyOffsetCorrection(true)
+    m_applyOffsetCorrection(true),
+    m_caloLumiBCIDTool("ICaloLumiBCIDTool/CaloLumiBCIDToolDefault")
     //m_lumiTool("LuminosityTool")
     //		 m_present_etamin(-10.0),
     //		 m_present_etamax(10.0),
@@ -105,6 +106,7 @@ public:
     declareProperty("ZdcByteStreamReadV1V2Tool",m_zdcdecoder,"ZdcByteStreamReadV1V2Tool for ByteStream Conversion");
     declareProperty("ZdcRecTool",m_zdcrectool,"ZdcRecTool for RawChannel rec");
     declareProperty("ApplyOffsetCorrection",m_applyOffsetCorrection,"Apply offset correction or not (false by default)"); 
+    declareProperty("CaloLumiBCIDTool",m_caloLumiBCIDTool,"Tool for BCID pileup offset average correction"); 
     //declareProperty("LuminosityTool",m_lumiTool,"Luminosity Tool"); 
     // New property for MET slice
     declareProperty("loadFullCollections",  m_usefullcoll=false);
@@ -388,6 +390,7 @@ private:
   ToolHandle<ZdcRecChannelTool> m_zdcrectool;
   /** CaloLumiCorrection */
   bool m_applyOffsetCorrection;
+  ToolHandle<ICaloLumiBCIDTool> m_caloLumiBCIDTool;
   //ToolHandle<ILuminosityTool> m_lumiTool;
   /** robFragments pointers */
   std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> m_robFrags;
@@ -434,9 +437,6 @@ private:
   uint32_t m_numberOfTileRoses;
 
   TileROD_Decoder::D0CellsHLT m_d0cells;
-
-  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
index 22ce1f2ad7fd..d79887d98b7a 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaMTConfig.py
@@ -3,6 +3,7 @@
 #
 from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaReFastAlgo
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from CaloTools.CaloLumiBCIDConfig import CaloLUMIBCIDToolCfg
 
 
 def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False):
@@ -17,6 +18,8 @@ def fastL2EgammaClusteringAlg( flags, roisKey="EMCaloRoIs", doRinger=False):
     from TileConditions.TileConditionsConfig import tileCondCfg
     acc.merge( tileCondCfg( flags ) )    
 
+    acc.merge( CaloLUMIBCIDToolCfg( flags ) ) # this tool is required by the LArCellCont - 
+
     # configure tools (this can be simplified further,
     from TrigT2CaloEgamma.TrigT2CaloEgammaConf import EgammaReEmEnFex, EgammaReHadEnFex, EgammaReSamp1Fex, EgammaReSamp2Fex
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
index ad1e7c3342ca..1d8b3a7d3e1e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.cxx
@@ -17,32 +17,20 @@
 #include "EgammaReEmEnFex.h"
 #include "T2CalibrationEgamma.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
-#include "StoreGate/ReadHandle.h"
-
-
-EgammaReEmEnFex::EgammaReEmEnFex(const std::string & type, const std::string & name, 
-                   const IInterface* parent): IReAlgToolCalo(type, name, parent)
-		   {
-  declareProperty( "QlCorrectionLimit",
-		    m_limit );
-  declareProperty( "QlCorrectionDimension",
-		    m_dimension );
-  declareProperty( "QlCorrection",
-		    m_correction );
-	// Calibration object
-  m_calib=std::make_unique<T2CalibrationEgamma>();
-}
 
-
-EgammaReEmEnFex::~EgammaReEmEnFex()
+EgammaReEmEnFex::EgammaReEmEnFex(const std::string& type, const std::string& name,
+                                 const IInterface* parent) :
+    IReAlgToolCalo(type, name, parent)
 {
+  declareProperty("QlCorrectionLimit", m_limit);
+  declareProperty("QlCorrectionDimension", m_dimension);
+  declareProperty("QlCorrection", m_correction);
+  // Calibration object
+  m_calib=std::make_unique<T2CalibrationEgamma>();
 }
 
-StatusCode EgammaReEmEnFex::initialize()
+EgammaReEmEnFex::~EgammaReEmEnFex()
 {
-  ATH_CHECK( IReAlgToolCalo::initialize() );
-  ATH_CHECK( m_bcidAvgKey.initialize() );
-  return StatusCode::SUCCESS;
 }
 
 StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
@@ -57,10 +45,8 @@ StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const I
   // Region Selector, sampling 0
   int sampling = 0;
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
-
   LArTT_Selector<LArCellCont> sel;
-  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel) );
 
   double deta = 0.; // eta difference current cell - seed
   double dphi = 0.; // phi difference current cell - seed
@@ -121,7 +107,7 @@ StatusCode EgammaReEmEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const I
   sampling = 3;
 
   LArTT_Selector<LArCellCont> sel3;
-  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel3) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel3) );
   /*
           if ( m_saveCells ){
              m_data->storeCells(iBegin,iEnd,*m_CaloCellContPoint,m_cellkeepthr);
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
old mode 100644
new mode 100755
index 189e78e74b6b..5fa4d7c9309f
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReEmEnFex.h
@@ -18,9 +18,6 @@
 #define TRIGT2CALOEGAMMA_EGAMMAEMENFEXRE_H
 
 #include "TrigT2CaloCommon/IReAlgToolCalo.h"
-#include "StoreGate/ReadHandleKey.h"
-#include "CaloEvent/CaloBCIDAverage.h"
-
 
 /** Feature extraction Tool for LVL2 Calo. EM Presampler and
 	third EM Calorimeter sample. */
@@ -31,10 +28,6 @@ class EgammaReEmEnFex: public IReAlgToolCalo {
 
     virtual ~EgammaReEmEnFex();
 
-
-    virtual StatusCode initialize() override;
-
-
     /** @brief execute feature extraction for the EM Calorimeter
     *   second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -44,11 +37,6 @@ class EgammaReEmEnFex: public IReAlgToolCalo {
                                const IRoiDescriptor& roi,
                                const CaloDetDescrElement*& caloDDE,
                                const EventContext& context) const override;
-
-
-private:
-  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx
index 8c12eba71885..e6eebc6916b5 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.cxx
@@ -16,7 +16,6 @@
 #include "EgammaReHadEnFex.h"
 #include "CaloGeoHelpers/CaloSampling.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
-#include "StoreGate/ReadHandle.h"
 #include <math.h>
 
 EgammaReHadEnFex::EgammaReHadEnFex(const std::string& type, const std::string& name,
@@ -24,16 +23,6 @@ EgammaReHadEnFex::EgammaReHadEnFex(const std::string& type, const std::string& n
     IReAlgToolCalo(type, name, parent)
 {}
 
-
-StatusCode EgammaReHadEnFex::initialize()
-{
-  ATH_CHECK( IReAlgToolCalo::initialize() );
-  ATH_CHECK( m_bcidAvgKey.initialize() );
-  return StatusCode::SUCCESS;
-}
-
-
-
 StatusCode EgammaReHadEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                      const CaloDetDescrElement*& /*caloDDE*/,
                                      const EventContext& context) const
@@ -54,12 +43,10 @@ StatusCode EgammaReHadEnFex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const
 
   int ncells = 0;
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
-
   for (unsigned int sampling = 0; sampling < 3; sampling++) {
 
     LArTT_Selector<LArCellCont> sel;
-    ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTHEC, sampling, sel) );
+    ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTHEC, sampling, sel) );
 
     for (const LArCell* larcell : sel) {
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
old mode 100644
new mode 100755
index ded1859ce86c..0cc6b1fb8349
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReHadEnFex.h
@@ -18,8 +18,6 @@
 #define TRIGT2CALOEGAMMA_EGAMMAHADENFEXRE_H
 
 #include "TrigT2CaloCommon/IReAlgToolCalo.h"
-#include "CaloEvent/CaloBCIDAverage.h"
-#include "StoreGate/ReadHandleKey.h"
 
 /** Feature extraction Tool for LVL2 Calo. Hadronic EndCaps
 	and Tile Calorimeter. All Samples */
@@ -28,10 +26,6 @@ public:
     EgammaReHadEnFex(const std::string & type, const std::string & name, 
                      const IInterface* parent);
 
-
-    virtual StatusCode initialize() override;
-
-
     /** @brief execute feature extraction for the EM Calorimeter
     *   second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -41,11 +35,6 @@ public:
                                const IRoiDescriptor& roi,
                                const CaloDetDescrElement*& caloDDE,
                                const EventContext& context) const override;
-
-
-private:
-  SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-  { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx
index 07802968ee3c..4cfd19522a18 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.cxx
@@ -16,8 +16,6 @@
 
 #include "EgammaReSamp1Fex.h"
 #include "CaloGeoHelpers/CaloSampling.h"
-#include "StoreGate/ReadHandle.h"
-
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
 
@@ -31,16 +29,6 @@ EgammaReSamp1Fex::EgammaReSamp1Fex(const std::string& type, const std::string& n
     IReAlgToolCalo(type, name, parent)
 {}
 
-
-StatusCode EgammaReSamp1Fex::initialize()
-{
-  ATH_CHECK( IReAlgToolCalo::initialize() );
-  ATH_CHECK( m_bcidAvgKey.initialize() );
-  return StatusCode::SUCCESS;
-}
-
-
-
 StatusCode EgammaReSamp1Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                      const CaloDetDescrElement*& caloDDE,
                                      const EventContext& context) const
@@ -50,13 +38,11 @@ StatusCode EgammaReSamp1Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const
 
   ATH_MSG_DEBUG("in execute(TrigEMCluster &)");
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
-
   // Region Selector, sampling 1
   int sampling = 1;
 
   LArTT_Selector<LArCellCont> sel;
-  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel) );
 
   double totalEnergy = 0;
   double etaEnergyS1 = 0;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
old mode 100644
new mode 100755
index 70af372548f3..4b60e6f421a0
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp1Fex.h
@@ -21,8 +21,6 @@
 #define TRIGT2CALOEGAMMA_CALOSAMP1FEXEGAMMARE_H
 
 #include "TrigT2CaloCommon/IReAlgToolCalo.h"
-#include "CaloEvent/CaloBCIDAverage.h"
-#include "StoreGate/ReadHandleKey.h"
 
 class IRoiDescriptor;
 
@@ -32,8 +30,6 @@ class EgammaReSamp1Fex: public IReAlgToolCalo {
     EgammaReSamp1Fex(const std::string & type, const std::string & name,
                      const IInterface* parent);
 
-    virtual StatusCode initialize() override;
-
     /** @brief execute feature extraction for the EM Calorimeter
     *   second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -43,11 +39,6 @@ class EgammaReSamp1Fex: public IReAlgToolCalo {
                                const IRoiDescriptor& roi,
                                const CaloDetDescrElement*& caloDDE,
                                const EventContext& context ) const override;
-
-
-private:
-    SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-    { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx
index 54cf99debc7e..a4e0dd52055b 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.cxx
@@ -18,7 +18,6 @@
 #include "IRegionSelector/IRoiDescriptor.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
 #include "xAODTrigCalo/TrigEMCluster.h"
-#include "StoreGate/ReadHandle.h"
 
 EgammaReSamp2Fex::EgammaReSamp2Fex(const std::string& type, const std::string& name,
                                    const IInterface* parent) :
@@ -26,15 +25,6 @@ EgammaReSamp2Fex::EgammaReSamp2Fex(const std::string& type, const std::string& n
 {
 }
 
-
-StatusCode EgammaReSamp2Fex::initialize()
-{
-  ATH_CHECK( IReAlgToolCalo::initialize() );
-  ATH_CHECK( m_bcidAvgKey.initialize() );
-  return StatusCode::SUCCESS;
-}
-
-
 StatusCode EgammaReSamp2Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const IRoiDescriptor& roi,
                                      const CaloDetDescrElement*& caloDDE,
                                      const EventContext& context) const
@@ -44,10 +34,8 @@ StatusCode EgammaReSamp2Fex::execute(xAOD::TrigEMCluster& rtrigEmCluster, const
   // Region Selector, sampling 2
   int sampling = 2;
 
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
-
   LArTT_Selector<LArCellCont> sel;
-  ATH_CHECK( m_dataSvc->loadCollections(context, avg.cptr(), roi, TTEM, sampling, sel) );
+  ATH_CHECK( m_dataSvc->loadCollections(context, roi, TTEM, sampling, sel) );
 
   double energyEta = 0.;
   double energyPhi = 0.;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
old mode 100644
new mode 100755
index 25565221c12e..b14388a0e059
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/EgammaReSamp2Fex.h
@@ -22,8 +22,6 @@
 #include "GaudiKernel/AlgTool.h"
 #include "CaloGeoHelpers/CaloSampling.h"
 #include "TrigT2CaloCommon/Calo_Def.h"
-#include "CaloEvent/CaloBCIDAverage.h"
-#include "StoreGate/ReadHandleKey.h"
 
 class IRoiDesciptor;
 
@@ -33,10 +31,6 @@ class EgammaReSamp2Fex: public IReAlgToolCalo {
     EgammaReSamp2Fex(const std::string & type, const std::string & name,
                      const IInterface* parent);
 
-
-    virtual StatusCode initialize() override;
-
-
     /** @brief execute feature extraction for the EM Calorimeter
     *	second layer 
     *   @param[out] rtrigEmCluster is the output cluster.
@@ -52,9 +46,6 @@ class EgammaReSamp2Fex: public IReAlgToolCalo {
 
     Gaudi::Property<float> m_maxHotCellDeta{this, "MaxDetaHotCell", 1.0};
     Gaudi::Property<float> m_maxHotCellDphi{this, "MaxDphiHotCell", 1.0};
-
-    SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey
-    { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
 };
 
 inline double EgammaReSamp2Fex::etaSizeLArEMSamp2(double cellEta, int calo) const{
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
index 32372e5f587b..7aefa42bbb41 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
@@ -29,7 +29,6 @@
 #include "CaloDetDescr/CaloDetDescrElement.h"
 #include "AthenaMonitoring/GenericMonitoringTool.h"
 #include "AthenaMonitoring/Monitored.h"
-#include "StoreGate/ReadHandle.h"
 #include "PhiComps.h"
 using namespace Monitored;
 
@@ -74,7 +73,6 @@ StatusCode RingerReFex::initialize()
 
   ATH_CHECK( m_ringerContainerKey.initialize() );
   ATH_CHECK( m_clusterContainerKey.initialize() );
-  ATH_CHECK( m_bcidAvgKey.initialize() );
 
   m_maxRingsAccumulated = std::accumulate(m_nRings.begin(), m_nRings.end(), 0);
 
@@ -162,7 +160,6 @@ StatusCode RingerReFex::execute(xAOD::TrigEMCluster &rtrigEmCluster,
                               const CaloDetDescrElement*& , 
                               const EventContext& context) const
 {
-  SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
 
   
   auto total_time = Monitored::Timer("TIME_total");
@@ -245,7 +242,7 @@ StatusCode RingerReFex::execute(xAOD::TrigEMCluster &rtrigEmCluster,
       // and the ringg set will be empty. This will effect the ring set 4,5 and 6.
       if( !(!m_useHad && det==TTHEC) ){
       
-        if( m_dataSvc->loadCollections( context, avg.cptr() ,roi, static_cast<DETID>(det), sampling, sel ).isFailure() )
+        if( m_dataSvc->loadCollections( context, roi, static_cast<DETID>(det), sampling, sel ).isFailure() )
         {
           ATH_MSG_ERROR( "Failure while trying to retrieve cell information for the "<< det <<" calorimeter." );
           return StatusCode::FAILURE;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
index 12d1b43bcc44..b95eec8fd0da 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -17,7 +17,6 @@
 #include "xAODTrigRinger/TrigRingerRings.h"
 #include "xAODTrigRinger/TrigRingerRingsContainer.h"
 #include "xAODTrigRinger/TrigRingerRingsAuxContainer.h"
-#include "CaloEvent/CaloBCIDAverage.h"
 #include "AthenaMonitoring/GenericMonitoringTool.h"
 #include "PhiComps.h"
 
@@ -95,7 +94,6 @@ class RingerReFex : public IReAlgToolCalo
     ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool"};
     SG::WriteHandleKey<xAOD::TrigRingerRingsContainer> m_ringerContainerKey {this, "RingerKey", "HLT_L2CaloRinger", "TrigRingerRings container key"};
     SG::ReadHandleKey<xAOD::TrigEMClusterContainer>    m_clusterContainerKey {this, "ClustersName", "HLT_L2CaloEMClusters", "TrigEMCluster container key"};
-    SG::ReadHandleKey<CaloBCIDAverage> m_bcidAvgKey { this, "BCIDAvgKey", "CaloBCIDAverage", "" };
     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,  ""};
@@ -124,5 +122,6 @@ class RingerReFex : public IReAlgToolCalo
 
 
     void printRings( std::vector<RingSet> &, xAOD::TrigRingerRings * ) const;
+
 };
 #endif
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
index 05b91ce005d2..d5da11c6db71 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -120,7 +120,6 @@ jobproperties.Beam.beamType = 'collisions'
 jobproperties.Beam.bunchSpacing = 25
 globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200'
 athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline)
-TriggerFlags.doCaloOffsetCorrection = False
 
 log.info('Configured the following global flags:')
 globalflags.print_JobProperties()
-- 
GitLab


From 24db739e2db8921478ba0e48ddbbc4dbe769cf1c Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 6 May 2019 15:51:52 +0200
Subject: [PATCH 112/129] SGTools: Remove more forwarding headers.

Remove the obsolete forwarding headers CLIDRegistry.h, ClassName.h, and
ClassID_traits.h.  They're no longer used from anywhere.
---
 Control/SGTools/SGTools/CLIDRegistry.h   | 20 -------------------
 Control/SGTools/SGTools/ClassID_traits.h | 25 ------------------------
 Control/SGTools/SGTools/ClassName.h      | 23 ----------------------
 3 files changed, 68 deletions(-)
 delete mode 100755 Control/SGTools/SGTools/CLIDRegistry.h
 delete mode 100755 Control/SGTools/SGTools/ClassID_traits.h
 delete mode 100644 Control/SGTools/SGTools/ClassName.h

diff --git a/Control/SGTools/SGTools/CLIDRegistry.h b/Control/SGTools/SGTools/CLIDRegistry.h
deleted file mode 100755
index 5cf0f4c7ced7..000000000000
--- a/Control/SGTools/SGTools/CLIDRegistry.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SGTOOLS_CLIDREGISTRY_H
-# define SGTOOLS_CLIDREGISTRY_H
-/** @file CLIDRegistry.h
- * @brief  a static registry of CLID->typeName entries. NOT for general use.
- * Use ClassIDSvc instead.
- *
- * @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration
- *$Id: CLIDRegistry.h,v 1.2 2009-01-15 19:07:29 binet Exp $
- */
-
-
-// Moved to AthenaKernel
-#include "AthenaKernel/CLIDRegistry.h"
-
-
-#endif // SGTOOLS_CLIDREGISTRY_H
diff --git a/Control/SGTools/SGTools/ClassID_traits.h b/Control/SGTools/SGTools/ClassID_traits.h
deleted file mode 100755
index 574d472db437..000000000000
--- a/Control/SGTools/SGTools/ClassID_traits.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef SGTOOLS_CLASSID_TRAITS_H
-#define SGTOOLS_CLASSID_TRAITS_H
-/** @file ClassID_traits.h
- * @brief  a traits class that associates a CLID to a type T
- * It also detects whether T inherits from Gaudi DataObject
- *
- * @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration
- * $Id: ClassID_traits.h,v 1.3 2009-01-15 19:07:29 binet Exp $
- */
-
-
-#include "AthenaKernel/ClassID_traits.h"
-
-
-#endif // not SGTOOLS_CLASSID_TRAITS_H
-
-
-
-
-
-
diff --git a/Control/SGTools/SGTools/ClassName.h b/Control/SGTools/SGTools/ClassName.h
deleted file mode 100644
index cfe3d2026e66..000000000000
--- a/Control/SGTools/SGTools/ClassName.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// This file's extension implies that it's C, but it's really -*- C++ -*-.
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: ClassName.h,v 1.1 2009-01-15 19:07:29 binet Exp $
-/**
- * @file  SGTools/ClassName.h
- * @author scott snyder
- * @date Jul 2005
- * @brief An interface for getting the name of a class as a string.
- */
-
-
-#ifndef SGTOOLS_CLASSNAME_H
-#define SGTOOLS_CLASSNAME_H
-
-
-#include "AthenaKernel/ClassName.h"
-
-
-#endif // not SGTOOLS_CLASSNAME_H
-- 
GitLab


From f4fbc53e4a4de82db0569d36b88ef9641e061359 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 6 May 2019 16:05:42 +0200
Subject: [PATCH 113/129] CaloClusterCorrection: Avoid EventContext TLS
 lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 .../CaloClusterCorrection/src/CaloClusterCorrection.cxx     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx
index f564cfef55a7..d4b195121185 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
@@ -112,10 +112,10 @@ CaloClusterCorrection::setProperty (const Property& p)
 }
 
 
-StatusCode CaloClusterCorrection::execute(const EventContext& /*ctx*/,
+StatusCode CaloClusterCorrection::execute(const EventContext& ctx,
                                           CaloCluster *cluster) const
 {
-  this->makeCorrection(Gaudi::Hive::currentContext(), cluster);
+  this->makeCorrection(ctx, cluster);
 
 #if 0
   ATH_MSG_DEBUG( " ...... e, et " << cluster->e() << " " << cluster->et() << endmsg);
-- 
GitLab


From 521fd8eba831b289ad70529e38689055f54ace2f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 2 May 2019 16:20:16 +0200
Subject: [PATCH 114/129] CaloTools: Fix compilation with gcc9.

isnan is in the std:: namespace.
---
 Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx b/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx
index d03b4a54de77..0cf364b3cd7f 100644
--- a/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx
+++ b/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx
@@ -236,7 +236,7 @@ StatusCode CaloNoiseCondAlg::execute() {
     } else {
       lumi = attrList["LBAvInstLumi"].data<float>() *1e-3;  // luminosity (from 10**30 units in db to 10*33 units)
     }
-    if (isnan(lumi)) {
+    if (std::isnan(lumi)) {
       ATH_MSG_WARNING( " Luminosity is not a number.. " << m_lumi0 << "  ... set it to 0 "  );
       lumi=0.;
     }
-- 
GitLab


From 899104c9dad4d50c65910861898254efc0c48f7a Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 6 May 2019 16:06:05 +0200
Subject: [PATCH 115/129] CaloRec: Avoid EventContext TLS lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx       | 8 ++++----
 Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx b/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx
index 3a3d47af0093..31b4a1daf71a 100644
--- a/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx
+++ b/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx
@@ -109,10 +109,10 @@ StatusCode CaloCellFastCopyTool::initialize() {
 
 
 StatusCode CaloCellFastCopyTool::process (CaloCellContainer* theCont,
-                                          const EventContext& /*ctx*/) const
+                                          const EventContext& ctx) const
 {
   // Retrieve source cell container
-  SG::ReadHandle<CaloCellContainer> srcCont(m_srcCellContainerKey);
+  SG::ReadHandle<CaloCellContainer> srcCont(m_srcCellContainerKey, ctx);
 
   ATH_CHECK( dispatchCopy (srcCont.cptr(), theCont) );
 
@@ -126,10 +126,10 @@ StatusCode CaloCellFastCopyTool::process (CaloCellContainer* theCont,
 
 
 StatusCode CaloCellFastCopyTool::process (CaloConstCellContainer* theCont,
-                                          const EventContext& /*ctx*/) const
+                                          const EventContext& ctx) const
 {
   // Retrieve source cell container
-  SG::ReadHandle<CaloCellContainer> srcCont(m_srcCellContainerKey);
+  SG::ReadHandle<CaloCellContainer> srcCont(m_srcCellContainerKey, ctx);
 
   ATH_CHECK( dispatchCopyConst (srcCont.cptr(), theCont) );
 
diff --git a/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx b/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx
index b680abc87f8d..18227fb6f2ae 100644
--- a/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx
+++ b/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx
@@ -24,6 +24,7 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/setupStoreGate.h"
+#include "AthenaKernel/ExtendedEventContext.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include <map>
@@ -157,6 +158,7 @@ public:
                           CONT* destCont)
   {
     EventContext ctx;
+    ctx.setExtension (Atlas::ExtendedEventContext (m_evtStore->hiveProxyDict(), 0));
     return tool->process (destCont, ctx);
   }
 
-- 
GitLab


From 427d7071eba343d0fbbd2e02a91eedb67ffea270 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 6 May 2019 16:05:03 +0200
Subject: [PATCH 116/129] CaloUtils: Avoid EventContext TLS lookups.

Don't fetch EventContext from thread-local storage if we already have
it as an argument.
---
 Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx
index 4254a3230295..ed97cf9d64a2 100644
--- a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx
+++ b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx
@@ -97,7 +97,7 @@ StatusCode CaloLCWeightTool::initialize()
 StatusCode CaloLCWeightTool::weight(xAOD::CaloCluster *theCluster, const EventContext& ctx) const
 {
   const CaloLocalHadCoeff* data(0);
-  SG::ReadCondHandle<CaloLocalHadCoeff> rch(m_key);
+  SG::ReadCondHandle<CaloLocalHadCoeff> rch(m_key, ctx);
 
   SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey,ctx};
   const CaloNoise* noiseCDO=*noiseHdl;
-- 
GitLab


From 974f7641730fec962f70d1d519e9fc33f63bc382 Mon Sep 17 00:00:00 2001
From: John Kenneth Anders <john.kenneth.anders@cern.ch>
Date: Mon, 6 May 2019 10:44:02 +0000
Subject: [PATCH 117/129] Merge branch 'cherry-pick-ff53cbe2' into '21.0'

Merge branch 'data-overlay' into '21.3'

See merge request atlas/athena!23157

(cherry picked from commit 54b76d9f2f322143708bad18480e0a81dc7d1917)

b2558625 Merge branch 'data-overlay' into '21.3'
---
 .../python/InDetTrigConfigRecPreProcessing.py | 10 +-
 .../Pixel_TrgClusterization.h                 |  2 +-
 .../src/Pixel_TrgClusterization.cxx           | 98 +++++++++----------
 .../python/TrigL2SiTrackFinder_Config.py      |  3 +-
 .../TriggerJobOpts/python/TriggerFlags.py     | 10 ++
 5 files changed, 70 insertions(+), 53 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
index f8e99a44e44a..f70aeb669789 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py
@@ -14,9 +14,15 @@
 #EF_SCTRDOKey="SCT_RDOs"
 #EF_TRTRDOKey="TRT_RDOs"
 
+
 EF_PixRDOKey="PixelRDOs_EF"
 EF_SCTRDOKey="SCT_RDOs_EF"
 EF_TRTRDOKey="TRT_RDOs_EF"
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+if not TriggerFlags.doTransientByteStream():
+   EF_PixRDOKey="PixelRDOs"
+
+
 
 from AthenaCommon.Logging import logging 
 log = logging.getLogger("EFID")
@@ -45,6 +51,7 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
                                                                    Decoder = InDetTrigPixelRodDecoder)
       ToolSvc += InDetTrigPixelRawDataProviderTool
 
+      
       from InDetTrigRawDataProvider.InDetTrigRawDataProviderConf import InDet__TrigPixRawDataProvider
 
       InDetTrigPixRawDataProvider = \
@@ -82,7 +89,8 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
       self.clusteringTool          = InDetTrigMergedPixelsTool
       self.gangedAmbiguitiesFinder = InDetTrigPixelGangedAmbiguitiesFinder
       self.Pixel_RDOContainerName  = EF_PixRDOKey
-
+      self.skipBSDecoding = not TriggerFlags.doTransientByteStream() 
+      
       from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
       self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)]
       self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth',type)]
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h
index 9ec1eb2e6ec8..5be33de80784 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h
@@ -131,7 +131,7 @@ namespace InDet {
     ServiceHandle<IPixelByteStreamErrorsSvc>   m_bsErrorSvc;
     ServiceHandle<IROBDataProviderSvc>    m_robDataProvider;   //!< ROB Data Provide Service
     bool                     m_doTimeOutChecks;   //check global timer
-
+    bool                     m_skipBSDecoding;    //option to skip BS decoding in MC
     
     // Timing
     TrigTimer   *m_timerRegSel;
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx
index 214347bc3f42..522003fc49ed 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/Pixel_TrgClusterization.cxx
@@ -66,7 +66,8 @@ namespace InDet{
     m_phiHalfWidth(0.1),
     m_bsErrorSvc("PixelByteStreamErrorsSvc",name),
     m_robDataProvider("ROBDataProviderSvc", name),
-    m_doTimeOutChecks(true)
+    m_doTimeOutChecks(true),
+    m_skipBSDecoding(false)
   {  
     // Get parameter values from jobOptions file
     declareProperty("DetectorManagerName",     m_managerName);
@@ -82,6 +83,7 @@ namespace InDet{
     declareProperty("Pixel_RDOContainerName",  m_pixelRDOContainerName);
     declareProperty("RawDataProvider",         m_rawDataProvider);
     declareProperty("doTimeOutChecks",         m_doTimeOutChecks);
+    declareProperty("skipBSDecoding",          m_skipBSDecoding);
 
     declareMonitoredVariable("numPixClusters", m_numPixClusters    );
     declareMonitoredVariable("numPixIds", m_numPixIds    );
@@ -331,7 +333,6 @@ namespace InDet{
     //-------------------------------------------------------------------------
 
     //handling of decoding problems
-    StatusCode scdec = StatusCode::SUCCESS;
     m_bsErrorSvc->resetCounts();
 
 
@@ -373,21 +374,6 @@ namespace InDet{
 
     ATH_MSG_DEBUG( "REGTEST:" << *roi );
 
-    
-    if(doTiming()) m_timerDecoder->start();
-    scdec = m_rawDataProvider->decode(roi);
-    if(doTiming()) m_timerDecoder->stop();
-
-    
-    //   Get the Pixel RDO's:
-    //     - First get the Pixel ID's using the RegionSelector
-    //     - Retrieve from SG the RDOContainer: 
-    //       Identifiable Container that contains pointers to all the RDO 
-    //        collections (one collection per detector)
-    //     - Retrieve from StoreGate the RDO collections.
-    //       (the ByteStreamConvertors are called here).
-    
-    
     if (!(roi->isFullscan())){
       if(doTiming()) m_timerRegSel->start();
       m_regionSelector->DetHashIDList( PIXEL, *roi, m_listOfPixIds);
@@ -397,42 +383,55 @@ namespace InDet{
       
       if(doTiming()) m_timerRegSel->stop();
     }
-
-
-    if (scdec.isSuccess()){
-      //check for recoverable errors
-
-      int n_err_total = 0;
-       
-      int bsErrors[IPixelByteStreamErrorsSvc::lastErrType+1];
+    
+    if (!m_skipBSDecoding){
+      StatusCode scdec = StatusCode::SUCCESS;
+      if(doTiming()) m_timerDecoder->start();
+      scdec = m_rawDataProvider->decode(roi);
+      if(doTiming()) m_timerDecoder->stop();
+    
+      //   Get the Pixel RDO's:
+      //     - First get the Pixel ID's using the RegionSelector
+      //     - Retrieve from SG the RDOContainer: 
+      //       Identifiable Container that contains pointers to all the RDO 
+      //        collections (one collection per detector)
+      //     - Retrieve from StoreGate the RDO collections.
+      //       (the ByteStreamConvertors are called here).
       
-      for (size_t idx = 0; idx<=size_t(IPixelByteStreamErrorsSvc::lastErrType); idx++){
-	int n_errors = m_bsErrorSvc->getNumberOfErrors(idx);
-	n_err_total += n_errors;
-	bsErrors[idx] = n_errors;
-      }
-
-
-      ATH_MSG_DEBUG( "decoding errors: "  << n_err_total );
-
-      if (n_err_total){
-	for (size_t idx = 0; idx<=size_t(IPixelByteStreamErrorsSvc::lastErrType); idx++){
-	  //	  m_PixBSErr.push_back(bsErrors[idx]);
-	  if (bsErrors[idx])
-	    m_PixBSErr.push_back(idx);
-	  if(msgLvl(MSG::DEBUG))
-	     msg(MSG::DEBUG) << " " << bsErrors[idx];
+      
+      if (scdec.isSuccess()){
+	//check for recoverable errors
+	
+	int n_err_total = 0;
+	
+	int bsErrors[IPixelByteStreamErrorsSvc::lastErrType+1];
+	
+	for (const auto idx : { IPixelByteStreamErrorsSvc::firstErrType , IPixelByteStreamErrorsSvc::lastErrType } ){
+	  int n_errors = m_bsErrorSvc->getNumberOfErrors(idx);
+	  n_err_total += n_errors;
+	  bsErrors[idx] = n_errors;
 	}
-      }	     
-      ATH_MSG_DEBUG( "" );
-
-    } else {
-      ATH_MSG_DEBUG( " m_rawDataProvider->decode failed" );
+	
+	ATH_MSG_DEBUG( "decoding errors: "  << n_err_total );
+	
+	if (n_err_total){
+	for (const auto idx : { IPixelByteStreamErrorsSvc::firstErrType , IPixelByteStreamErrorsSvc::lastErrType } ){
+	    if (bsErrors[idx])
+	      m_PixBSErr.push_back(idx);
+	    if(msgLvl(MSG::DEBUG))
+	      msg(MSG::DEBUG) << " " << bsErrors[idx];
+	  }
+	}	     
+	ATH_MSG_DEBUG( "" );
+	
+      } else {
+	ATH_MSG_DEBUG( " m_rawDataProvider->decode failed" );
+      }
     }
-
+    
     if(doTiming()) m_timerSGate->resume();
     
-    PixelRDO_Container* p_pixelRDOContainer;
+    const PixelRDO_Container* p_pixelRDOContainer = nullptr;
     if (store()->retrieve(p_pixelRDOContainer,  m_pixelRDOContainerName).isFailure() ) {
       ATH_MSG_WARNING( "Could not find the PixelRDO_Container " 
 		       << m_pixelRDOContainerName );
@@ -449,6 +448,7 @@ namespace InDet{
     }
     if(doTiming()) m_timerSGate->pause();
 
+    ATH_MSG_VERBOSE("Size of " << m_pixelRDOContainerName << ":" << p_pixelRDOContainer->size());
 
     if (!(roi->isFullscan())){
 
@@ -525,8 +525,6 @@ namespace InDet{
       PixelRDO_Container::const_iterator rdoCollections      = p_pixelRDOContainer->begin();
       PixelRDO_Container::const_iterator rdoCollectionsEnd   = p_pixelRDOContainer->end();
     
-      AtlasDetectorID detType;
-
       if(doTiming()) m_timerCluster->resume();
 
       for(; rdoCollections!=rdoCollectionsEnd; ++rdoCollections){
diff --git a/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py
index c883945ede10..105651860d00 100755
--- a/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py
+++ b/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/python/TrigL2SiTrackFinder_Config.py
@@ -10,12 +10,13 @@ from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
 from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigL2ResidualCalculator
 
 from TrigInDetRecoTools.TrigInDetRecoTools_Config import TrigL2PattRecoStrategyFactory
+from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 strFactory = TrigL2PattRecoStrategyFactory()
 
 from AthenaCommon.AppMgr import ToolSvc
 
-ospTool = ConfiguredOnlineSpacePointProviderTool(doBS=True)
+ospTool = ConfiguredOnlineSpacePointProviderTool(doBS=TriggerFlags.doTransientByteStream())
 trtTool = TrigTRT_TrackExtensionTool(OfflineClusters=False, PtCut=2500.0)
 trackFitter = TrigInDetTrackFitter(OfflineClusters=False)
 resCalc = TrigL2ResidualCalculator(OfflineClusters=False)
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
index 888029a18cf9..adff0f8300b1 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
@@ -313,6 +313,16 @@ class useOfflineSpacePoints(JobProperty):
 
 _flags.append(useOfflineSpacePoints)
 
+class doTransientByteStream(JobProperty):
+    """ switch off usage of the transient bytestream 
+    and access RDO objects directly. Partial implementation. 
+    """
+    statusOn=True
+    allowedType=['bool']
+    StoredValue=True
+    
+_flags.append(doTransientByteStream)
+
 class doNtuple(JobProperty):
     """ """
     statusOn=True
-- 
GitLab


From 706600321c371e8a3ffcb6efb21a355e4cc2d037 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Tue, 7 May 2019 07:55:38 +0000
Subject: [PATCH 118/129] Remove ByteStreamAddressL1R and clean up BS
 configuration from RoIBResult

---
 .../python/ByteStreamConfig.py                |  3 -
 .../src/ByteStreamNavigationProviderSvc.cxx   |  3 -
 .../ByteStreamAddressL1R.h                    | 51 -----------
 .../ByteStreamAddressProviderSvc.h            |  7 --
 .../share/BSAddProvSvc_RDO_jobOptions.py      |  1 -
 .../src/ByteStreamAddressL1R.cxx              | 45 ---------
 .../src/ByteStreamAddressProviderSvc.cxx      | 91 +------------------
 .../share/Level1Overlay_jobOptions.py         |  1 -
 .../share/skeleton.BSOverlayFilter_tf.py      |  4 +-
 .../LArCafJobs/share/skeleton.LArCAF.py       |  1 -
 .../RecExCommon/share/BSRead_config.py        |  1 -
 .../share/TileRec_topOptions.py               |  3 +-
 .../TrigCostMonitor/share/readDataRate.py     |  4 +-
 .../share/TrigHLTMonCommon_jobOptions.py      |  1 -
 .../share/L1Topo_ReadBS_test.py               |  1 -
 .../share/TrigT1CTMonitoringJobOptions.py     |  1 -
 ...MonitoringJobOptions_forRecExCommission.py |  1 -
 ...rigT1Monitoring_forRecExCommission_Run2.py |  1 -
 ...TrigT1Monitoring_forRecExCommission_cpu.py |  1 -
 .../TopOptions_WriteBS_LVL1sim_fromAthena.py  |  1 -
 .../share/jobOfragment_ReadBS_standalone.py   |  2 -
 .../share/jobOfragment_TransBS_standalone.py  |  3 -
 ...ergingEventLoopMgr_TriggerBSandRDOtoRDO.py |  3 +-
 .../share/skeleton.BStoTRIGBS.py              |  4 +-
 .../share/skeleton.BStoTRIGBS.py.r21          |  4 +-
 25 files changed, 10 insertions(+), 228 deletions(-)
 delete mode 100755 Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressL1R.h
 delete mode 100755 Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx

diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
index 584ed0078ae6..a8856ddcddbe 100644
--- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
+++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
@@ -76,7 +76,6 @@ def TrigBSReadCfg( inputFlags ):
     # this is trigger specific and should only be loaded if some doTrigger flags is set
     # or it should be moved elsewhere, however, since there is no better location now let is stick here
     bsCnvSvc.InitCnvs += [ "EventInfo",
-                        "ROIB::RoIBResult",
                         "HLT::HLTResult" ]
     
     bsAddressProviderSvc.TypeNames += [
@@ -85,7 +84,6 @@ def TrigBSReadCfg( inputFlags ):
         "RpcDigitContainer/RPC_DIGITS",
         "TgcDigitContainer/TGC_DIGITS",
         "CscDigitContainer/CSC_DIGITS",
-        "ROIB::RecRoIBResult/RecRoIBResult",
         "MuCTPI_RIO/MUCTPI_RIO",
         "CTP_RIO/CTP_RIO"
     ]
@@ -93,7 +91,6 @@ def TrigBSReadCfg( inputFlags ):
     bsAddressProviderSvc.TypeNames += [
         "LArRawChannelContainer/LArRawChannels",
         "TileRawChannelContainer/TileRawChannelCnt",
-        "ROIB::RoIBResult/RoIBResult",
         "MuCTPI_RDO/MUCTPI_RDO",
         "HLT::HLTResult/HLTResult_L2",
         "HLT::HLTResult/HLTResult_EF",
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
index 9d1aaceeca3a..2f8866365962 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
@@ -18,9 +18,6 @@
 #include "SGTools/TransientAddress.h"
 
 #include "PersistentDataModel/DataHeader.h"
-//----------------------
-// For update address
-#include "ByteStreamCnvSvcBase/ByteStreamAddressL1R.h"
 
 //------------------------------------------------------------------------------------
 /// Standard constructor
diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressL1R.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressL1R.h
deleted file mode 100755
index 1b7c7fb7a6a9..000000000000
--- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressL1R.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef BYTESTREAMCNVSVCBASE_BYTESTREAMADDRESSL1R_H
-#define BYTESTREAMCNVSVCBASE_BYTESTREAMADDRESSL1R_H
-
-// Framework include files
-#include "GaudiKernel/GenericAddress.h"
-
-#include "ByteStreamData/RawEvent.h"
-
-#include <stdint.h>
-#include <vector>
-
-/**
- *  @class  ByteStreamAddressL1R
- *  @brief  IOpaqueAddress for ByteStreamCnvSvc with ROB Fragments
- *
- *  Package     : ByteStreamCnvSvcBase
- *
- *  @author     : H. Ma
- *  description : Definition of RawEvent address class
- *                This class holds a vector ROBFragments Used by L1 Results
- *  Created     : Dec 2, 2002
- */
-
-class ByteStreamAddressL1R : public GenericAddress {
-public:
-   typedef OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBFragment;
-
-   // @brief Destructor
-   virtual ~ByteStreamAddressL1R() {}; //doesn't own event
-
-   // @brief standard Constructor
-   ByteStreamAddressL1R(const CLID& clid, const std::string& fname, const std::string& cname, int p1 = 0,int p2 = 0);
-
-   // @brief constructor with only CLID
-   ByteStreamAddressL1R(const CLID& clid);
-
-   // @brief add ROB Fragment
-   void addPointer(const ROBFragment& p);
-
-   // @brief access the ROB fragments
-   const std::vector<ROBFragment>& getPointers() const;
-
-private:
-   std::vector<ROBFragment> m_ptr;
-};
-
-#endif
diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
index f4870d3d884a..d19855da1a22 100755
--- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
+++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
@@ -14,7 +14,6 @@
 #include <map>
 #include <set>
 
-class IROBDataProviderSvc;
 class IClassIDSvc;
 
 template <class TYPE> class SvcFactory;
@@ -47,16 +46,10 @@ private:
    // type and name of the objects to create the address for.
    std::vector<std::string> m_typeNames;
 
-   ServiceHandle<IROBDataProviderSvc> m_rdpSvc;
    ServiceHandle<IClassIDSvc> m_clidSvc;
 
    std::map<unsigned int, std::set<std::string> > m_clidKey;
 
-   UnsignedIntegerProperty        m_ctpModuleID;
-   UnsignedIntegerProperty        m_muCTPIModuleID;
-   UnsignedIntegerArrayProperty   m_jetProcModuleID;
-   UnsignedIntegerArrayProperty   m_caloClusterProcModuleID;
-   UnsignedIntegerArrayProperty   m_topoProcModuleID;
    int m_storeID;
 };
 
diff --git a/Event/ByteStreamCnvSvcBase/share/BSAddProvSvc_RDO_jobOptions.py b/Event/ByteStreamCnvSvcBase/share/BSAddProvSvc_RDO_jobOptions.py
index c45ca420ad1d..8a0e469e2830 100755
--- a/Event/ByteStreamCnvSvcBase/share/BSAddProvSvc_RDO_jobOptions.py
+++ b/Event/ByteStreamCnvSvcBase/share/BSAddProvSvc_RDO_jobOptions.py
@@ -53,7 +53,6 @@ if DetFlags.readRDOBS.CSC_on():
 
 if DetFlags.readRDOBS.LVL1_on():
     svcMgr.ByteStreamAddressProviderSvc.TypeNames += [                
-        "ROIB::RoIBResult/RoIBResult",
         "MuCTPI_RDO/MUCTPI_RDO",        
         "L2Result/L2Result",
         "CTP_RDO/CTP_RDO",
diff --git a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx
deleted file mode 100755
index 2f65b968ee20..000000000000
--- a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-//====================================================================
-//	ByteStreamAddressL1R implementation
-//--------------------------------------------------------------------
-//
-//	Package    : ByteStreamCnvSvcBase
-//
-//  Description    : Special BSCnvSvc L1Result Address implementation
-//
-//	Author     : Hong Ma
-//      created    : Dec 2, 2002
-//  History    :
-//====================================================================
-
-#include "ByteStreamCnvSvcBase/ByteStreamAddressL1R.h"
-#include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
-
-// Framework include files
-#include "GaudiKernel/GenericAddress.h"
-
-
-/// Standard Constructor
-ByteStreamAddressL1R::ByteStreamAddressL1R(const CLID& clid,
-		const std::string& fname , const std::string& cname, int p1, int p2)
-    : GenericAddress(ByteStreamAddress::storageType(), clid, fname, cname, p1, p2) {
-}
-
-ByteStreamAddressL1R::ByteStreamAddressL1R(const CLID& clid)
-    : GenericAddress(ByteStreamAddress::storageType(), clid, "", "") {
-}
-
-/** Add pointer
- */
-void ByteStreamAddressL1R::addPointer(const ROBFragment& p) {
-   m_ptr.push_back(p);
-}
-
-/** access the fragment pointer
-*/
-const std::vector<ByteStreamAddressL1R::ROBFragment>& ByteStreamAddressL1R::getPointers() const {
-   return(m_ptr);
-}
diff --git a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx
index abbbb3c4b707..c5ea52cf9f42 100755
--- a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx
+++ b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx
@@ -5,7 +5,6 @@
 // Include files
 #include "ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h"
 #include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
-#include "ByteStreamCnvSvcBase/ByteStreamAddressL1R.h"
 #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
 
 #include "StoreGate/StoreGate.h"
@@ -19,37 +18,9 @@
 /// Standard constructor
 ByteStreamAddressProviderSvc::ByteStreamAddressProviderSvc(const std::string& name, ISvcLocator* pSvcLocator) :
 	 ::AthService(name, pSvcLocator),
-	m_rdpSvc("ROBDataProviderSvc", name),
 	m_clidSvc("ClassIDSvc", name),
 	m_storeID(StoreID::EVENT_STORE) {
-  // set default Jet/Energy Processor RoI module IDs
-  std::vector<unsigned int> default_jetProcModuleID;
-  default_jetProcModuleID.push_back(0xac);
-  default_jetProcModuleID.push_back(0xad);
-  m_jetProcModuleID.setValue(default_jetProcModuleID);
-
-  // set default Calorimeter Cluster Processor RoI module IDs
-  std::vector<unsigned int> default_caloClusterProcModuleID;
-  default_caloClusterProcModuleID.push_back(0xa8);
-  default_caloClusterProcModuleID.push_back(0xa9);
-  default_caloClusterProcModuleID.push_back(0xaa);
-  default_caloClusterProcModuleID.push_back(0xab);
-  m_caloClusterProcModuleID.setValue(default_caloClusterProcModuleID);
-
-  // set default Topo Processor RoI module IDs
-  std::vector<unsigned int> default_topoProcModuleID;
-  // expect 0x82, 0x92 for new RoIB
-  default_topoProcModuleID.push_back(0x81);
-  default_topoProcModuleID.push_back(0x91);
-  m_topoProcModuleID.setValue(default_topoProcModuleID);
-
   declareProperty("TypeNames", m_typeNames);
-  // Properties to set L1 ROB module IDs
-  declareProperty("CTPModuleID", m_ctpModuleID = 1);
-  declareProperty("MuCTPIModuleID", m_muCTPIModuleID = 1);
-  declareProperty("JetProcModuleID", m_jetProcModuleID);
-  declareProperty("CaloClusterProcModuleID", m_caloClusterProcModuleID);
-  declareProperty("TopoProcModuleID", m_topoProcModuleID);
   declareProperty("StoreID", m_storeID);
 }
 //________________________________________________________________________________
@@ -68,35 +39,16 @@ StatusCode ByteStreamAddressProviderSvc::initialize() {
       ATH_MSG_FATAL("Cannot get ClassIDSvc.");
       return(StatusCode::FAILURE);
    }
-   // Retrieve ROBDataProviderSvc
-   if (!m_rdpSvc.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Cannot get ROBDataProviderSvc.");
-      return(StatusCode::FAILURE);
-   }
    if (m_storeID < 0 || m_storeID > StoreID::UNKNOWN) {
       ATH_MSG_FATAL("Invalid StoreID " << m_storeID);
       return(StatusCode::FAILURE);
    }
    ATH_MSG_INFO("initialized ");
-   ATH_MSG_INFO("-- Module IDs for: ");
-   ATH_MSG_INFO("   CTP                                  = 0x" << MSG::hex << m_ctpModuleID.value() << MSG::dec);
-   ATH_MSG_INFO("   muCTPi                               = 0x" << MSG::hex << m_muCTPIModuleID.value() << MSG::dec);
-   ATH_MSG_INFO("   Calorimeter Cluster Processor RoI    = 0x" << MSG::hex << m_caloClusterProcModuleID.value()[0]
-	   << ", 0x" << m_caloClusterProcModuleID.value()[1] << ", 0x" << m_caloClusterProcModuleID.value()[2]
-	   << ", 0x" << m_caloClusterProcModuleID.value()[3] << MSG::dec);
-   ATH_MSG_INFO("   Calorimeter Jet/Energy Processor RoI = 0x" << MSG::hex << m_jetProcModuleID.value()[0]
-	   << ", 0x" << m_jetProcModuleID.value()[1] << MSG::dec);
-   ATH_MSG_INFO("   Topo Processor RoI = 0x" << MSG::hex << m_topoProcModuleID.value()[0]
-	   << ", 0x" << m_topoProcModuleID.value()[1] << MSG::dec);
    ATH_MSG_INFO("-- Will fill Store with id =  " << m_storeID);
    return(StatusCode::SUCCESS);
 }
 //________________________________________________________________________________
 StatusCode ByteStreamAddressProviderSvc::finalize() {
-   // Release ROBDataProviderSvc
-   if (!m_rdpSvc.release().isSuccess()) {
-      ATH_MSG_WARNING("Cannot release ROBDataProviderSvc.");
-   }
    // Release ClassIDSvc
    if (!m_clidSvc.release().isSuccess()) {
       ATH_MSG_WARNING("Cannot release ClassIDSvc.");
@@ -143,45 +95,8 @@ StatusCode ByteStreamAddressProviderSvc::updateAddress(StoreID::type id,
       return(StatusCode::FAILURE);
    }
    ATH_MSG_DEBUG("Creating address for " << clid << " " << nm);
-   if (clid == 6000 || clid == 6001 || clid == 6421) {
-      // L1 or L2 result, special address class, ByteStreamAddressL1R,
-      // which contains the ROBFragment.
-      std::vector<uint32_t> vid;
-      if (clid == 6000 || clid == 6001) {
-         // L1 result
-         eformat::helper::SourceIdentifier ctpID(eformat::TDAQ_CTP, m_ctpModuleID.value());
-         vid.push_back(ctpID.code());
-         eformat::helper::SourceIdentifier muID(eformat::TDAQ_MUON_CTP_INTERFACE, m_muCTPIModuleID.value());
-         vid.push_back(muID.code());
-         for (int i = 0; i < 2; i++) {
-            eformat::helper::SourceIdentifier jetID(eformat::TDAQ_CALO_JET_PROC_ROI, m_jetProcModuleID.value()[i]);
-            vid.push_back(jetID.code());
-         }
-         for (int i = 0; i < 4; i++) {
-            eformat::helper::SourceIdentifier emID(eformat::TDAQ_CALO_CLUSTER_PROC_ROI, m_caloClusterProcModuleID.value()[i]);
-            vid.push_back(emID.code());
-         }
-         for (int i = 0; i < 2; i++) {
-            eformat::helper::SourceIdentifier topoID(eformat::TDAQ_CALO_TOPO_PROC, m_topoProcModuleID.value()[i]);
-            vid.push_back(topoID.code());
-         }
-      } else {
-         // L2 result
-         eformat::helper::SourceIdentifier l2ID(eformat::TDAQ_LVL2, 0);
-         vid.push_back(l2ID.code());
-      }
-      std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vrob;
-      m_rdpSvc->getROBData(vid, vrob);
-      ATH_MSG_DEBUG("Getting ROBData for " << nm << ", number robs = " << vrob.size());
-      ByteStreamAddressL1R* addr = new ByteStreamAddressL1R(clid, nm, "");
-      for (unsigned int i = 0; i < vrob.size(); i++) {
-         addr->addPointer(*vrob[i]);
-      }
-      tad->setAddress(addr);
-   } else {
-      ByteStreamAddress* add = new ByteStreamAddress(clid, nm, "");
-      add->setEventContext(ctx);
-      tad->setAddress(add);
-   }
+   ByteStreamAddress* add = new ByteStreamAddress(clid, nm, "");
+   add->setEventContext(ctx);
+   tad->setAddress(add);
    return(StatusCode::SUCCESS);
 }
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py
index 236d3a267643..bc0601b45e29 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py
@@ -13,7 +13,6 @@ if DetFlags.overlay.LVL1_on():
        #include ("MuonCommRecExample/ReadMuCTPI_jobOptions.py")
 
        ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [                         
-          "ROIB::RoIBResult/RoIBResult",
           "MuCTPI_RDO/MUCTPI_RDO",        
           "L2Result/L2Result",
           "CTP_RDO/CTP_RDO",
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
index 0d77f77c555b..991e6f8bbe01 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.BSOverlayFilter_tf.py
@@ -69,8 +69,8 @@ from TrigT1ResultByteStream.TrigT1ResultByteStreamConf import CTPByteStreamTool,
 if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
     from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
     svcMgr += ByteStreamAddressProviderSvc()
-#svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["ROIB::RoIBResult/RoIBResult", "MuCTPI_RDO/MUCTPI_RDO", "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO"]
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["ROIB::RoIBResult/RoIBResult",  "HLT::HLTResult/HLTResult_EF","HLT::HLTResult/HLTResult_L2","HLT::HLTResult/HLTResult_HLT", 
+#svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["MuCTPI_RDO/MUCTPI_RDO", "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO"]
+svcMgr.ByteStreamAddressProviderSvc.TypeNames += ["HLT::HLTResult/HLTResult_EF","HLT::HLTResult/HLTResult_L2","HLT::HLTResult/HLTResult_HLT", 
                                                   "CTP_RDO/CTP_RDO", "CTP_RIO/CTP_RIO"]
 
 # main alg
diff --git a/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py b/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
index 15b222c340e0..24f74a1a1b47 100644
--- a/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
+++ b/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
@@ -225,7 +225,6 @@ ToolSvc+=theCaloNoiseTool
 from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool
 
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult",
     "MuCTPI_RDO/MUCTPI_RDO",
     "CTP_RDO/CTP_RDO",
     'HLT::HLTResult/HLTResult_L2',
diff --git a/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py b/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py
index fb7780507e51..6b20c2ad9d2c 100644
--- a/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py
+++ b/Reconstruction/RecExample/RecExCommon/share/BSRead_config.py
@@ -58,7 +58,6 @@ if DetFlags.readRDOBS.Tile_on():
 
 if DetFlags.readRDOBS.LVL1_on():
     svcMgr.ByteStreamAddressProviderSvc.TypeNames += [                
-        "ROIB::RoIBResult/RoIBResult",
         "MuCTPI_RDO/MUCTPI_RDO",        
         "CTP_RDO/CTP_RDO",
         "L1TopoRDOCollection/L1TopoRDOCollection"
diff --git a/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py b/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
index 1b8cb0dde06a..0bfdbc0c7dbc 100644
--- a/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
+++ b/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
@@ -334,8 +334,7 @@ if doAtlantis:
         from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc
         svcMgr += ByteStreamAddressProviderSvc()
 
-    svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ 'ROIB::RoIBResult/RoIBResult'
-                                                      , 'MuCTPI_RDO/MUCTPI_RDO'
+    svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  'MuCTPI_RDO/MUCTPI_RDO'
                                                       , 'MuCTPI_RIO/MUCTPI_RIO'
                                                       , 'LVL_ROI/LVL_ROI' ]
 
diff --git a/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py b/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py
index 1f96fecaada0..44e7450d244a 100644
--- a/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py
+++ b/Trigger/TrigMonitoring/TrigCostMonitor/share/readDataRate.py
@@ -26,11 +26,9 @@ TriggerFlags.doEF   = False
 include("ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py")
 
 svcMgr.ByteStreamCnvSvc.InitCnvs += [ "EventInfo",
-                                      "ROIB::RoIBResult",
                                       "HLT::HLTResult" ]
 
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult",
-                                                   "HLT::HLTResult/HLTResult_L2",
+svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "HLT::HLTResult/HLTResult_L2",
                                                    "HLT::HLTResult/HLTResult_EF" ]
 
 #----------------------------------------------------------------------
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
index 060a9fae2665..a869bead2e62 100755
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
@@ -102,7 +102,6 @@ if data_type == 'bytestream':
 
     theByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
     theByteStreamAddressProviderSvc.TypeNames += ['HLT::HLTResult/HLTResult_HLT',
-        "ROIB::RoIBResult/RoIBResult",
         "MuCTPI_RDO/MUCTPI_RDO",
         "CTP_RDO/CTP_RDO",
         ]
diff --git a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py
index 289335a6ee37..5602fe8a7af7 100755
--- a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py
+++ b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/share/L1Topo_ReadBS_test.py
@@ -71,7 +71,6 @@ if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
 
 # This is the list of proxies to set up so that retrieval attempt will trigger the BS conversion
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult",
     "MuCTPI_RDO/MUCTPI_RDO",
     "CTP_RDO/CTP_RDO",
     "MuCTPI_RIO/MUCTPI_RIO",
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
index d155ccdc728d..263daec0b4df 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
@@ -270,7 +270,6 @@ if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
     from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
     svcMgr += ByteStreamAddressProviderSvc()
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult",
     "MuCTPI_RDO/MUCTPI_RDO",
     "CTP_RDO/CTP_RDO",
     "MuCTPI_RIO/MUCTPI_RIO",
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
index 16cbb43a8285..77b3ddfd5d51 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
@@ -28,7 +28,6 @@ if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
     svcMgr += ByteStreamAddressProviderSvc()
 
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult",
     "MuCTPI_RDO/MUCTPI_RDO",
     "CTP_RDO/CTP_RDO",
     "MuCTPI_RIO/MUCTPI_RIO",
diff --git a/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_Run2.py b/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_Run2.py
index ef985eeab960..c0e45cd004d1 100644
--- a/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_Run2.py
+++ b/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_Run2.py
@@ -50,7 +50,6 @@ if l1caloRawMon:
             from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
             svcMgr += ByteStreamAddressProviderSvc()
         svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "CTP_RDO/CTP_RDO" ]
-        svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult" ]
         svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "L1TopoRDOCollection/L1TopoRDOCollection" ] 
 
     if isData and isCalo and (Online or rec.triggerStream() == "express"
diff --git a/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_cpu.py b/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_cpu.py
index d810d9e6535a..41a39a3e8078 100644
--- a/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_cpu.py
+++ b/Trigger/TrigT1/TrigT1Monitoring/share/TrigT1Monitoring_forRecExCommission_cpu.py
@@ -58,7 +58,6 @@ if l1caloRawMon:
             from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
             svcMgr += ByteStreamAddressProviderSvc()
         svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "CTP_RDO/CTP_RDO" ]
-        svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult" ]
     
     if isData and isCalo and (Online or rec.triggerStream() == "express"
                                      or rec.triggerStream() == "JetTauEtmiss"):
diff --git a/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py b/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py
index bab3d27d0e81..41758f914b68 100644
--- a/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/TopOptions_WriteBS_LVL1sim_fromAthena.py
@@ -142,7 +142,6 @@ ByteStreamAddressProviderSvc.TypeNames += [
 	"MdtCsmContainer/MDTCSM",
 	"TgcRdoContainer/TGCRDO",
 	"CscRawDataContainer/CSCRDO",
-	"ROIB::RoIBResult/RoIBResult",
 	"MuCTPI_RDO/MUCTPI_RDO",
         "CTP_RDO/CTP_RDO"
 	] 
diff --git a/Trigger/TriggerRelease/share/jobOfragment_ReadBS_standalone.py b/Trigger/TriggerRelease/share/jobOfragment_ReadBS_standalone.py
index d4b33806e746..0800b73c72e0 100644
--- a/Trigger/TriggerRelease/share/jobOfragment_ReadBS_standalone.py
+++ b/Trigger/TriggerRelease/share/jobOfragment_ReadBS_standalone.py
@@ -29,7 +29,6 @@ if TriggerFlags.doEF() or TriggerFlags.doHLT():
         "RpcDigitContainer/RPC_DIGITS",
         "TgcDigitContainer/TGC_DIGITS",
         "CscDigitContainer/CSC_DIGITS",
-        "ROIB::RecRoIBResult/RecRoIBResult",
         "MuCTPI_RIO/MUCTPI_RIO",
         "CTP_RIO/CTP_RIO"
     ] 
@@ -41,7 +40,6 @@ if TriggerFlags.doEF() or TriggerFlags.doHLT():
 ByteStreamAddressProviderSvc.TypeNames += [ 
     "LArRawChannelContainer/LArRawChannels", 
     "TileRawChannelContainer/TileRawChannelCnt", 
-    "ROIB::RoIBResult/RoIBResult",
     "MuCTPI_RDO/MUCTPI_RDO",        
     "HLT::HLTResult/HLTResult_L2",
     "HLT::HLTResult/HLTResult_EF",
diff --git a/Trigger/TriggerRelease/share/jobOfragment_TransBS_standalone.py b/Trigger/TriggerRelease/share/jobOfragment_TransBS_standalone.py
index 195c598c2978..26801b4c16a5 100644
--- a/Trigger/TriggerRelease/share/jobOfragment_TransBS_standalone.py
+++ b/Trigger/TriggerRelease/share/jobOfragment_TransBS_standalone.py
@@ -85,9 +85,6 @@ if TriggerFlags.doMuon():
       "CscRawDataContainer/CSCRDO",
       "MuCTPI_RDO/MUCTPI_RDO"
       ]
-      
-ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult" ]
-ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RecRoIBResult/RecRoIBResult" ]
 
 # this must be in a fragment:
 if not hasattr(ServiceMgr,"ProxyProviderSvc"):                           
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
index 8dbadf38c4e7..aa39c9372dc8 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
@@ -103,7 +103,6 @@ svcMgr.ByteStreamAddressProviderSvc.StoreID = StoreID.UNKNOWN
 
 """
 # LVL1
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult" ]
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "DataVector<LVL1::TriggerTower>/TriggerTowers" ]
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "LVL1::JEPBSCollection/JEPBSCollection" ]
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "LVL1::JEPRoIBSCollection/JEPRoIBSCollection" ]
@@ -137,7 +136,7 @@ svcMgr.ByteStreamAddressProviderSvc.TypeNames   += \
 #         'LVL1::CPBSCollection/CPBSCollection',
 #         'LVL1::JEPBSCollection/JEPBSCollection',
 #         'LVL1::JEPRoIBSCollection/JEPRoIBSCollection',
-         'ROIB::RoIBResult/RoIBResult']
+        ]
 
 
 svcMgr += ProxyProviderSvc()
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py
index a0755d7ba96a..131d4210de65 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py
@@ -231,7 +231,7 @@ if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
    from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
    svcMgr += ByteStreamAddressProviderSvc()
 
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  "ROIB::RoIBResult/RoIBResult", "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO", 
+svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO", 
 "PixelRDO_Container/PixelRDOs", 
 "SCT_RDO_Container/SCT_RDOs", 
 "TRT_RDO_Container/TRT_RDOs", 
@@ -246,7 +246,6 @@ svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  "ROIB::RoIBResult/RoIBResult
 "LArTTL1Container/LArTTL1HAD",
 "TileTTL1Container/TileTTL1Cnt",
 "TileTTL1Container/TileTTL1MBTS",
-"ROIB::RoIBResult/RoIBResult",
 "MuCTPI_RDO/MUCTPI_RDO",
 "CTP_RDO/CTP_RDO",
 "MuCTPI_RIO/MUCTPI_RIO",
@@ -258,7 +257,6 @@ svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  "ROIB::RoIBResult/RoIBResult
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ 
   "LArRawChannelContainer/LArRawChannels", 
   "TileRawChannelContainer/TileRawChannelCnt", 
-  "ROIB::RoIBResult/RoIBResult",
   "MuCTPI_RDO/MUCTPI_RDO",        
   "CTP_RDO/CTP_RDO"
   ] 
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21 b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21
index 0764c210dcd6..979637cbd468 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py.r21
@@ -233,7 +233,7 @@ if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
    from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
    svcMgr += ByteStreamAddressProviderSvc()
 
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  "ROIB::RoIBResult/RoIBResult", "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO", 
+svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "CTP_RDO/CTP_RDO", "MuCTPI_RIO/MUCTPI_RIO", "CTP_RIO/CTP_RIO", 
 "PixelRDO_Container/PixelRDOs", 
 "SCT_RDO_Container/SCT_RDOs", 
 "TRT_RDO_Container/TRT_RDOs", 
@@ -248,7 +248,6 @@ svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  "ROIB::RoIBResult/RoIBResult
 "LArTTL1Container/LArTTL1HAD",
 "TileTTL1Container/TileTTL1Cnt",
 "TileTTL1Container/TileTTL1MBTS",
-"ROIB::RoIBResult/RoIBResult",
 "MuCTPI_RDO/MUCTPI_RDO",
 "CTP_RDO/CTP_RDO",
 "MuCTPI_RIO/MUCTPI_RIO",
@@ -260,7 +259,6 @@ svcMgr.ByteStreamAddressProviderSvc.TypeNames += [  "ROIB::RoIBResult/RoIBResult
 svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ 
   "LArRawChannelContainer/LArRawChannels", 
   "TileRawChannelContainer/TileRawChannelCnt", 
-  "ROIB::RoIBResult/RoIBResult",
   "MuCTPI_RDO/MUCTPI_RDO",        
   "CTP_RDO/CTP_RDO"
   ] 
-- 
GitLab


From c7a53919b31361b835c495d1719b531600366421 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Tue, 7 May 2019 08:08:52 +0000
Subject: [PATCH 119/129] Fix a bug. Store event number to cache.
 (SCT_ByteStreamErrorsTool)

---
 .../SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx
index 63c884ba9279..33d316a19501 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx
@@ -347,7 +347,7 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const {
 
   static const EventContext::ContextEvt_t invalidValue{EventContext::INVALID_CONTEXT_EVT};  
   if (slot>=m_cache.size()) {
-    m_cache.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement.
+    m_cache.resize(slot+1, invalidValue);
     m_bsErrors.resize(slot+1);
     m_tempMaskedChips.resize(slot+1);
     m_abcdErrorChips.resize(slot+1);
@@ -406,6 +406,9 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const {
       }
     }
   }
+
+  m_cache[slot] = evt;
+
   return StatusCode::SUCCESS;
 }
 
-- 
GitLab


From 37e7c33170d312b1b48762fc5ede783382e7dcb2 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Tue, 7 May 2019 09:06:22 +0000
Subject: [PATCH 120/129] To avoid timeout, the number of evens is reduced from
 20 to 6 and timeout was increased from 600 to 720.

---
 .../InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt     | 2 +-
 .../SCT_ConditionsAlgorithms/share/testTdaqEnabled.py           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
index 33375a73faac..11216ce74ca8 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
@@ -97,7 +97,7 @@ atlas_add_test( TestSummary
                 ENVIRONMENT THREADS=5 )
 atlas_add_test( TestTdaqEnabled
                 SCRIPT athena.py --threads=5 SCT_ConditionsAlgorithms/testTdaqEnabled.py
-                PROPERTIES TIMEOUT 600
+                PROPERTIES TIMEOUT 720
                 ENVIRONMENT THREADS=5 )
 
 # Install files from the package:
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py
index 0970353048df..953f741a9723 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py
@@ -110,7 +110,7 @@ ServiceMgr.EventSelector.InitialTimeStamp  = 1476741326 # LB 18 of run 310809, 1
 # increment of 3 minutes
 ServiceMgr.EventSelector.TimeStampInterval = 180
 
-theApp.EvtMax                   = 20
+theApp.EvtMax                   = 6
 
 #--------------------------------------------------------------
 # Set output lvl (VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL)
-- 
GitLab


From 5e03ae99b3d83cf1b0bd58babf6f7345bf3adb6f Mon Sep 17 00:00:00 2001
From: Adam Edward Barton <adam.edward.barton@cern.ch>
Date: Tue, 7 May 2019 10:56:40 +0000
Subject: [PATCH 121/129] IDC: Satisfy some thread warnings

---
 .../EventContainers/IdentifiableContainerBase.h          | 9 +++++----
 Event/EventContainers/src/IdentifiableCacheBase.cxx      | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerBase.h b/Event/EventContainers/EventContainers/IdentifiableContainerBase.h
index e9dce0ba34e4..86d697f8226a 100644
--- a/Event/EventContainers/EventContainers/IdentifiableContainerBase.h
+++ b/Event/EventContainers/EventContainers/IdentifiableContainerBase.h
@@ -7,6 +7,7 @@
 #define EVENTCONTAINERS_IDENTIFIABLECONTAINERBASE_H
 
 #include "EventContainers/IdentifiableCacheBase.h"
+#include "CxxUtils/checker_macros.h"
 
 class IdentifiableContainerBase{
 
@@ -18,11 +19,11 @@ public:
 protected:
     EventContainers::IdentifiableCacheBase *m_cacheLink;
     bool m_OnlineMode;
-    mutable std::atomic<bool> m_waitNeeded;
+    mutable std::atomic<bool> m_waitNeeded ATLAS_THREAD_SAFE; //These mutables are carefully thought out, do not change
     typedef EventContainers::IdentifiableCacheBase IdentifiableCacheBase;
-    mutable std::vector< IdentifierHash > m_waitlist;
-    mutable std::mutex m_waitMutex;
-    mutable std::vector<bool> m_mask;
+    mutable std::vector< IdentifierHash > m_waitlist ATLAS_THREAD_SAFE;
+    mutable std::mutex m_waitMutex ATLAS_THREAD_SAFE;
+    mutable std::vector<bool> m_mask ATLAS_THREAD_SAFE;
     std::vector<IdentifierHash> GetAllCurrentHashes() const;
 
     void Wait() const;
diff --git a/Event/EventContainers/src/IdentifiableCacheBase.cxx b/Event/EventContainers/src/IdentifiableCacheBase.cxx
index 325d2b08bef2..ac2d57b61a00 100644
--- a/Event/EventContainers/src/IdentifiableCacheBase.cxx
+++ b/Event/EventContainers/src/IdentifiableCacheBase.cxx
@@ -20,8 +20,8 @@
 
 namespace EventContainers {
 
-static const void* INVALID = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag);
-static const void* ABORTED = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag);
+const void* const INVALID = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag);
+const void* const ABORTED = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag);
 
 IdentifiableCacheBase::IdentifiableCacheBase (IdentifierHash maxHash,
                                               const IMaker* maker)
-- 
GitLab


From 183f357718e973ad3606cdaa40875f42ec6e1bf5 Mon Sep 17 00:00:00 2001
From: Charles Burton <burton@utexas.edu>
Date: Tue, 7 May 2019 12:30:38 +0000
Subject: [PATCH 122/129] Update Trigger GenericMonitoringTool to match
 AthenaMonitoring

The AthenaMonitoring backend code was expecting the name of the weight variable to appear in the coded string that is passed to HistogramDef to be parsed. This was causing a crash in unit tests. The TrigUpgradeTest/full_menu.py runs successfully with this change.
---
 .../AthenaMonitoring/HistogramDef.h           |  1 +
 .../AthenaMonitoring/HistogramFiller.h        | 13 ++++
 .../python/ExampleMonitorAlgorithm.py         |  2 +-
 .../python/GenericMonitoringTool.py           |  5 +-
 Control/AthenaMonitoring/share/GenericMon.txt | 10 ++--
 .../src/ExampleMonitorAlgorithm.cxx           |  4 +-
 .../src/GenericMonitoringTool.cxx             | 29 ++++++---
 Control/AthenaMonitoring/src/HistogramDef.cxx |  1 +
 .../src/HistogramFiller/HistogramFiller1D.h   | 17 +++++-
 .../src/HistogramFiller/HistogramFiller2D.h   | 57 ++++++++++++++----
 .../HistogramFiller2DProfile.h                | 16 ++++-
 .../HistogramFiller/HistogramFillerProfile.h  | 60 +++++++++++++++----
 .../test/GenericMonFilling_test.cxx           |  3 +-
 .../test/GenericMonParsing_test.cxx           | 23 +++++--
 .../test/test_defineHistogram.py              | 28 +++++----
 15 files changed, 206 insertions(+), 63 deletions(-)

diff --git a/Control/AthenaMonitoring/AthenaMonitoring/HistogramDef.h b/Control/AthenaMonitoring/AthenaMonitoring/HistogramDef.h
index afe8f7f43a9e..3e9ed68b7672 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/HistogramDef.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/HistogramDef.h
@@ -25,6 +25,7 @@ namespace Monitored {
     std::string path;              //!< booking path
     std::string title;             //!< title of the histogram
     std::string opt;               //!< options
+    std::string weight;            //!< names of weights
 
     int xbins{0};  //!< number of bins in X
     float xmin{0}; //!< left
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/HistogramFiller.h b/Control/AthenaMonitoring/AthenaMonitoring/HistogramFiller.h
index 255fe37833c0..3d2387a8fede 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/HistogramFiller.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/HistogramFiller.h
@@ -61,10 +61,22 @@ namespace Monitored {
     void setMonitoredVariables(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> monitoredVariables) {
       m_monVariables = monitoredVariables;
     }
+
+    /** 
+     * @brief Stores histogram weight
+     * @param monitoredWeight weight to use
+     */
+    void setMonitoredWeight(Monitored::IMonitoredVariable* monitoredWeight) {
+            m_monWeight = monitoredWeight;
+    }
   
     std::vector<std::string> histogramVariablesNames() const {
       return m_histDef->name;
     }
+
+    std::string histogramWeightName() {
+      return m_histDef->weight;
+    }
     
   protected:
     template <class H>
@@ -76,6 +88,7 @@ namespace Monitored {
     std::shared_ptr<HistogramDef> m_histDef;
     std::shared_ptr<IHistogramProvider> m_histogramProvider;
     std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> m_monVariables;
+    Monitored::IMonitoredVariable* m_monWeight;
     
   private:
     HistogramFiller& operator=(HistogramFiller const&) = delete;
diff --git a/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py b/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py
index d525ad2db8fa..4b58715f781c 100644
--- a/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py
+++ b/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py
@@ -83,7 +83,7 @@ def ExampleMonitoringConfig(inputFlags):
     myGroup.defineHistogram('lumiPerBCID',title='Luminosity;L/BCID;Events',
                             path='ToRuleThemAll',xbins=10,xmin=0.0,xmax=10.0)
     myGroup.defineHistogram('lb', title='Luminosity Block;lb;Events',
-                            path='ToFindThem',xbins=1000,xmin=-0.5,xmax=999.5)
+                            path='ToFindThem',xbins=1000,xmin=-0.5,xmax=999.5,weight='testweight')
     myGroup.defineHistogram('random', title='LB;x;Events',
                             path='ToBringThemAll',xbins=30,xmin=0,xmax=1,opt='kLBNHistoryDepth=10')
     myGroup.defineHistogram('pT_passed,pT',type='TEfficiency',title='Test TEfficiency;x;Eff',
diff --git a/Control/AthenaMonitoring/python/GenericMonitoringTool.py b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
index cab4d02d7575..5c8a786f5900 100644
--- a/Control/AthenaMonitoring/python/GenericMonitoringTool.py
+++ b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
@@ -23,11 +23,12 @@ class GenericMonitoringTool(_GenericMonitoringTool):
 #  @param varname  one (1D) or two (2D) variable names separated by comma
 #  @param type     histogram type
 #  @param path     top-level histogram directory (e.g. EXPERT, SHIFT, etc.)
+#  @param weight   Name of the variable containing the fill weight
 #  @param title    Histogram title and optional axis title (same syntax as in TH constructor)
 #  @param opt      Histrogram options (see GenericMonitoringTool)
 #  @param labels   List of bin labels (for a 2D histogram, sequential list of x- and y-axis labels)
 def defineHistogram(varname, type='TH1F', path=None,
-                    title=None,
+                    title=None,weight='',
                     xbins=100, xmin=0, xmax=1,
                     ybins=None, ymin=None, ymax=None, zmin=None, zmax=None, opt='', labels=None):
 
@@ -42,7 +43,7 @@ def defineHistogram(varname, type='TH1F', path=None,
         log.warning('Histogram %s of type %s is not supported for online running and will not be added', varname, type)
         return ""
 
-    coded = "%s, %s, %s, %s, %d, %f, %f" % (path, type, varname, title, xbins, xmin, xmax)
+    coded = "%s, %s, %s, %s, %s, %d, %f, %f" % (path, type, weight, varname, title, xbins, xmin, xmax)
     if ybins is not None:
         coded += ", %d, %f, %f" % (ybins, ymin, ymax)
         if zmin is not None:
diff --git a/Control/AthenaMonitoring/share/GenericMon.txt b/Control/AthenaMonitoring/share/GenericMon.txt
index ec95f24e1021..7678aed82c66 100644
--- a/Control/AthenaMonitoring/share/GenericMon.txt
+++ b/Control/AthenaMonitoring/share/GenericMon.txt
@@ -16,10 +16,10 @@ THistSvc.OutputLevel = 0;
 THistSvc.Output= {"EXPERT DATAFILE='expert-monitoring.root' OPT='RECREATE'" };
 ToolSvc.MonTool.OutputLevel =0;
 ToolSvc.MonTool.HistPath="TestGroup";
-ToolSvc.MonTool.Histograms = { "EXPERT, TH1F, Eta, #eta of Clusters; #eta; number of RoIs, 2, -2.500000, 2.500000" };
-ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, Phi, #phi of Clusters; #phi; number of RoIs, 2, -3.15, 3.15" };
-ToolSvc.MonTool.Histograms += { "EXPERT, TH2F, Eta,Phi, #eta vs #phi of Clusters; #eta; #phi; number of RoIs,  2, -2.500000, 2.500000, 2, -3.15, 3.15" };
-ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, TIME_t1, Timing of tool 1, 100, 0., 1000." };
-ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, TIME_t2, Timing of tool 2, 100, 0., 1000." };
+ToolSvc.MonTool.Histograms = { "EXPERT, TH1F, , Eta, #eta of Clusters; #eta; number of RoIs, 2, -2.500000, 2.500000" };
+ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, , Phi, #phi of Clusters; #phi; number of RoIs, 2, -3.15, 3.15" };
+ToolSvc.MonTool.Histograms += { "EXPERT, TH2F, , Eta,Phi, #eta vs #phi of Clusters; #eta; #phi; number of RoIs,  2, -2.500000, 2.500000, 2, -3.15, 3.15" };
+ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, , TIME_t1, Timing of tool 1, 100, 0., 1000." };
+ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, , TIME_t2, Timing of tool 2, 100, 0., 1000." };
 
 
diff --git a/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx
index 1c712557e09e..619983eeb3f3 100644
--- a/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx
+++ b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx
@@ -26,6 +26,7 @@ StatusCode ExampleMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
     auto lb = Monitored::Scalar<int>("lb",0);
     auto run = Monitored::Scalar<int>("run",0);
     auto random = Monitored::Scalar<float>("random",0.0);
+    auto testweight = Monitored::Scalar<float>("testweight",1.0);
 
     // Two variables (value and passed) needed for TEfficiency
     auto pT = Monitored::Scalar<float>("pT",0.0);
@@ -35,6 +36,7 @@ StatusCode ExampleMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
     lumiPerBCID = lbAverageInteractionsPerCrossing();
     lb = GetEventInfo(ctx)->lumiBlock();
     run = GetEventInfo(ctx)->runNumber();
+    testweight = 2.0;
     
     TRandom3 r(ctx.eventID().event_number());
     // Example of using flags
@@ -47,7 +49,7 @@ StatusCode ExampleMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
     pT_passed = pT>r.Poisson(15);
 
     // Fill. First argument is the tool name, all others are the variables to be saved.
-    fill("ExampleMonitor",lumiPerBCID,lb,random,pT,pT_passed);
+    fill("ExampleMonitor",lumiPerBCID,lb,random,pT,pT_passed,testweight);
 
     // Alternative fill method. Get the group yourself, and pass it to the fill function.
     auto tool = getGroup("ExampleMonitor");
diff --git a/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
index 1d1b48a23b74..891a4ff998fb 100644
--- a/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
+++ b/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
@@ -61,13 +61,13 @@ StatusCode GenericMonitoringTool::book() {
     HistogramDef def = HistogramDef::parse(item);
 
     if (def.ok) {
-        std::shared_ptr<HistogramFiller> filler(factory.create(def));
-        
-        if (filler) {
-            m_fillers.push_back(filler);
-        } else {
-          ATH_MSG_WARNING( "The histogram filler cannot be instantiated for: " << def.name );
-        }
+      std::shared_ptr<HistogramFiller> filler(factory.create(def));
+
+      if (filler) {
+        m_fillers.push_back(filler);
+      } else {
+        ATH_MSG_WARNING( "The histogram filler cannot be instantiated for: " << def.name );
+      }
     } else {
       ATH_MSG_ERROR( "Unparsable histogram definition: " << item );
       return StatusCode::FAILURE;
@@ -90,7 +90,9 @@ std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogra
   std::vector<std::shared_ptr<HistogramFiller>> result;
 
   for (auto filler : m_fillers) {
+    // Find the associated monitored variable for each histogram's variable(s)
     auto fillerVariables = filler->histogramVariablesNames();
+
     std::vector<std::reference_wrapper<IMonitoredVariable>> variables;
 
     for (auto fillerVariable : fillerVariables) {
@@ -102,6 +104,18 @@ std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogra
       }
     }
 
+    // Find the weight variable in the list of monitored variables
+    auto fillerWeight = filler->histogramWeightName();
+    Monitored::IMonitoredVariable* weight = nullptr;
+    if ( fillerWeight != "" ) {
+      for (auto monValue : monitoredVariables) {
+        if (fillerWeight.compare(monValue.get().name()) == 0) {
+          weight = &monValue.get();
+          break;
+        }
+      }
+    }
+
     if (fillerVariables.size() != variables.size()) {
       ATH_MSG_DEBUG("Filler has different variables than monitoredVariables");
       continue;
@@ -109,6 +123,7 @@ std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogra
 
     std::shared_ptr<HistogramFiller> fillerCopy(filler->clone());
     fillerCopy->setMonitoredVariables(variables);
+    fillerCopy->setMonitoredWeight(weight);
     result.push_back(fillerCopy);
   }
 
diff --git a/Control/AthenaMonitoring/src/HistogramDef.cxx b/Control/AthenaMonitoring/src/HistogramDef.cxx
index 37a35e888ad5..f377be46e5cb 100644
--- a/Control/AthenaMonitoring/src/HistogramDef.cxx
+++ b/Control/AthenaMonitoring/src/HistogramDef.cxx
@@ -25,6 +25,7 @@ const HistogramDef HistogramDef::parse(const std::string &histogramDefinition) {
 
     result.path = nextProperty(propertiesIterator);
     result.type = nextProperty(propertiesIterator);
+    result.weight = nextProperty(propertiesIterator);
     result.name.push_back(nextProperty(propertiesIterator));
 
     if (result.type.find("TH2") == 0 || result.type == "TProfile" || result.type == "TEfficiency") {
diff --git a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller1D.h b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller1D.h
index c89e94dec5f2..dc1e310836c0 100644
--- a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller1D.h
+++ b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller1D.h
@@ -8,6 +8,7 @@
 #include "TH1.h"
 
 #include "AthenaMonitoring/HistogramFiller.h"
+#include <boost/range/combine.hpp>
 
 namespace Monitored {
   /**
@@ -27,10 +28,22 @@ namespace Monitored {
 
       auto histogram = this->histogram<TH1>();
       auto valuesVector = m_monVariables[0].get().getVectorRepresentation();
+
       std::lock_guard<std::mutex> lock(*(this->m_mutex));
 
-      for (auto value : valuesVector) {
-        histogram->Fill(value);
+      if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector.size() ) {
+        // When using weights, get the weight vector and fill
+        auto weightVector = m_monWeight->getVectorRepresentation();
+        double value,weight;
+        for (const auto& zipped : boost::combine(valuesVector,weightVector)) {
+          boost::tie(value,weight) = zipped;
+          histogram->Fill(value,weight);
+        }
+      } else {
+        // Otherwise, simply loop over the values and fill
+        for (auto value : valuesVector) {
+          histogram->Fill(value);
+        }
       }
 
       return std::size(valuesVector);
diff --git a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2D.h b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2D.h
index 0bc820ab5885..5e5014e114e9 100644
--- a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2D.h
+++ b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2D.h
@@ -8,6 +8,7 @@
 #include "TH2.h"
 
 #include "AthenaMonitoring/HistogramFiller.h"
+#include <boost/range/combine.hpp>
 
 namespace Monitored {
   /**
@@ -42,23 +43,55 @@ namespace Monitored {
       auto histogram = this->histogram<TH2>();
       std::lock_guard<std::mutex> lock(*(this->m_mutex));
 
-      if (areVectorsSameSize) {
-        for (unsigned i = 0; i < size1; ++i) {
-          histogram->Fill(vector1[i], vector2[i]);
+      if (areVectorsSameSize) { // Two equal-size vectors
+        if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==size1 ) {
+          // Weighted fill
+          auto weightVector = m_monWeight->getVectorRepresentation();
+          double value1,value2,weight;
+          for (const auto& zipped : boost::combine(vector1,vector2,weightVector)) {
+            boost::tie(value1,value2,weight) = zipped;
+            histogram->Fill(value1,value2,weight);
+          }
+        } else {
+          // Unweighted fill
+          for (unsigned i = 0; i < size1; ++i) {
+            histogram->Fill(vector1[i], vector2[i]);
+          }
         }
-
         result = size1;
-      } else if (size1 == 1) {
-        for (auto value : vector2) {
-          histogram->Fill(vector1[0], value);
-        }
 
-        result = size2;
-      } else {
-        for (auto value : vector1) {
-          histogram->Fill(value, vector2[0]);
+      } else if (size1 == 1) { // Scalar vector1 and vector vector2
+        if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==size2 ) {
+          // Weighted fill
+          auto weightVector = m_monWeight->getVectorRepresentation();
+          double value,weight;
+          for (const auto& zipped : boost::combine(vector2,weightVector)) {
+            boost::tie(value,weight) = zipped;
+            histogram->Fill(vector1[0],value,weight);
+          }
+        } else {
+          // Unweighted fill
+          for (auto value : vector2) {
+            histogram->Fill(vector1[0], value);
+          }
         }
+        result = size2;
 
+      } else { // Vector vector1 and scalar vector2
+        if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==size1 ) {
+          // Weighted fill
+          auto weightVector = m_monWeight->getVectorRepresentation();
+          double value,weight;
+          for (const auto& zipped : boost::combine(vector1,weightVector)) {
+            boost::tie(value,weight) = zipped;
+            histogram->Fill(value,vector2[0],weight);
+          }
+        } else {
+          // Unweighted fill
+          for (auto value : vector1) {
+            histogram->Fill(value, vector2[0]);
+          }
+        }
         result = size1;
       }
 
diff --git a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2DProfile.h b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2DProfile.h
index 71e607072961..c10efafa3d4f 100644
--- a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2DProfile.h
+++ b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFiller2DProfile.h
@@ -37,10 +37,20 @@ namespace Monitored {
       }*/
 
       //For now lets just consider the case in which all variables are of the same length
-      for (unsigned i = 0; i < std::size(valuesVector1); ++i) {
-        histogram->Fill(valuesVector1[i], valuesVector2[i], valuesVector3[i]);
+      if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector1.size() ) {
+        // Weighted fill
+        auto weightVector = m_monWeight->getVectorRepresentation();
+        double value1,value2,value3,weight;
+        for (const auto& zipped : boost::combine(valuesVector1,valuesVector2,valuesVector3,weightVector)) {
+          boost::tie(value1,value2,value3,weight) = zipped;
+          histogram->Fill(value1,value2,value3,weight);
+        }
+      } else {
+        // Unweighted fill
+        for (unsigned i = 0; i < std::size(valuesVector1); ++i) {
+          histogram->Fill(valuesVector1[i], valuesVector2[i], valuesVector3[i]);
+        }
       }
-      
       return std::size(valuesVector1);
     }
   };
diff --git a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFillerProfile.h b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFillerProfile.h
index d171db2efa79..9fc8fe27dd36 100644
--- a/Control/AthenaMonitoring/src/HistogramFiller/HistogramFillerProfile.h
+++ b/Control/AthenaMonitoring/src/HistogramFiller/HistogramFillerProfile.h
@@ -29,28 +29,66 @@ namespace Monitored {
       auto histogram = this->histogram<TProfile>();
       auto valuesVector1 = m_monVariables[0].get().getVectorRepresentation();
       auto valuesVector2 = m_monVariables[1].get().getVectorRepresentation();
+      const unsigned size1 = std::size(valuesVector1);
+      const unsigned size2 = std::size(valuesVector2);
+      const bool isAnyVectorEmpty = size1 == 0 || size2 == 0;
+      const bool isAnyVectorScalar = size1 == 1 || size2 == 1;
+      const bool areVectorsSameSize = size1 == size2;
+      const bool areVectorsValid = !isAnyVectorEmpty && (areVectorsSameSize || isAnyVectorScalar);
+      if (!areVectorsValid) return 0;
+
       std::lock_guard<std::mutex> lock(*(this->m_mutex));
 
-      if (valuesVector1.size() != valuesVector2.size()) {
-        if (valuesVector1.size() == 1) {
-          // first variable is scalar -- loop over second
+      if (areVectorsSameSize) { // Two equal-size vectors
+        if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector1.size() ) {
+          // Weighted fill
+          auto weightVector = m_monWeight->getVectorRepresentation();
+          double value1,value2,weight;
+          for (const auto& zipped : boost::combine(valuesVector1,valuesVector2,weightVector)) {
+            boost::tie(value1,value2,weight) = zipped;
+            histogram->Fill(value1,value2,weight);
+          }
+        } else {
+          // Unweighted fill
+          for (i = 0; i < std::size(valuesVector1); ++i) {
+            histogram->Fill(valuesVector1[i], valuesVector2[i]);
+          }
+        }
+
+      } else if (size1==1) { // first variable is scalar -- loop over second
+        if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector2.size() ) {
+          // Weighted fill
+          auto weightVector = m_monWeight->getVectorRepresentation();
+          double value2,weight;
+          for (const auto& zipped : boost::combine(valuesVector2,weightVector)) {
+            boost::tie(value2,weight) = zipped;
+            histogram->Fill(valuesVector1[0],value2,weight);
+          }
+        } else {
+          // Unweighted fill
           for (auto value2 : valuesVector2) {
             histogram->Fill(valuesVector1[0], value2);
             ++i;
           }
-        } else if (valuesVector2.size() == 1)  {
-          // second variable is scalar -- loop over first
+        }
+
+      } else if (size2==1) { // second variable is scalar -- loop over first
+        if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector1.size() ) {
+          // Weighted fill
+          auto weightVector = m_monWeight->getVectorRepresentation();
+          double value1,weight;
+          for (const auto& zipped : boost::combine(valuesVector1,weightVector)) {
+            boost::tie(value1,weight) = zipped;
+            histogram->Fill(value1,valuesVector2[0],weight);
+          }
+        } else {
+          // Unweighted fill
           for (auto value1 : valuesVector1) {
             histogram->Fill(value1, valuesVector2[0]); 
             ++i;
-          } 
-        }
-      } else {
-        for (i = 0; i < std::size(valuesVector1); ++i) {
-          histogram->Fill(valuesVector1[i], valuesVector2[i]);
+          }
         }
       }
-      
       return i;
     }
   };
diff --git a/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx b/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx
index 94200d25d4b2..0562945939f4 100644
--- a/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx
+++ b/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx
@@ -333,6 +333,7 @@ int main() {
     return -1;
   }
   MsgStream log( Athena::getMessageSvc(), "GenericMonFilling_test" );
+  log.setLevel(0);
 
   ITHistSvc* histSvc;
   if( pSvcLoc->service( "THistSvc", histSvc, true ).isFailure()  ) {
@@ -344,8 +345,6 @@ int main() {
   ToolHandle<GenericMonitoringTool> emptyMon("");
   VALUE( emptyMon.isEnabled() ) EXPECTED( false ); // self test
   log << MSG::DEBUG << " mon tool validity " << emptyMon.isValid() << endmsg;
-
-    
   
   ToolHandle<GenericMonitoringTool> validMon( "GenericMonitoringTool/MonTool" );
   if ( validMon.retrieve().isFailure() ) {
diff --git a/Control/AthenaMonitoring/test/GenericMonParsing_test.cxx b/Control/AthenaMonitoring/test/GenericMonParsing_test.cxx
index a9ff1cb7f548..b18b39cceeab 100644
--- a/Control/AthenaMonitoring/test/GenericMonParsing_test.cxx
+++ b/Control/AthenaMonitoring/test/GenericMonParsing_test.cxx
@@ -16,7 +16,7 @@ using namespace Monitored;
 
 
 bool parsing1DWorks() {
-  auto def = HistogramDef::parse("EXPERT, TH1F, Eta, #eta of Clusters; #eta; number of RoIs, 50, -2.500000, 2.500000");
+  auto def = HistogramDef::parse("EXPERT, TH1F, , Eta, #eta of Clusters; #eta; number of RoIs, 50, -2.500000, 2.500000");
   VALUE ( def.ok )          EXPECTED ( true );  
   VALUE ( def.path )        EXPECTED ( "EXPERT" );
   VALUE ( def.type )        EXPECTED ( "TH1F" );
@@ -30,7 +30,7 @@ bool parsing1DWorks() {
 }
 
 bool parsing2DWorks() {
-  auto def = HistogramDef::parse("SHIFT, TH2F, Eta,Phi, #eta vs #phi of Clusters; #eta; #phi, 50, -2.500000, 2.500000, 64, -3.200000, 3.200000");
+  auto def = HistogramDef::parse("SHIFT, TH2F, , Eta,Phi, #eta vs #phi of Clusters; #eta; #phi, 50, -2.500000, 2.500000, 64, -3.200000, 3.200000");
   VALUE ( def.ok )           EXPECTED ( true ) ;
   VALUE ( def.path )         EXPECTED ( "SHIFT" );
   VALUE ( def.type )         EXPECTED ( "TH2F" );
@@ -50,7 +50,7 @@ bool parsing2DWorks() {
 }
 
 bool parsing3DWorks() {
-  auto def = HistogramDef::parse("SHIFT, TProfile2D, Eta,Phi,pt, title, 50, -2.500000, 2.500000, 64, -3.200000, 3.200000, -1.000000, 1.000000");
+  auto def = HistogramDef::parse("SHIFT, TProfile2D, , Eta,Phi,pt, title, 50, -2.500000, 2.500000, 64, -3.200000, 3.200000, -1.000000, 1.000000");
   VALUE ( def.ok )           EXPECTED ( true ) ;
   VALUE ( def.path )         EXPECTED ( "SHIFT" );
   VALUE ( def.type )         EXPECTED ( "TProfile2D" );
@@ -72,7 +72,7 @@ bool parsing3DWorks() {
 }
 
 bool parsingLabeledWorks() {
-  auto def = HistogramDef::parse("SHIFT, TH1D, Cut, Cut counter, 5, 0, 5, Cut1:Cut2:Eta:Pt:R");
+  auto def = HistogramDef::parse("SHIFT, TH1D, , Cut, Cut counter, 5, 0, 5, Cut1:Cut2:Eta:Pt:R");
   VALUE ( def.ok )           EXPECTED ( true ) ;
   VALUE ( def.path )         EXPECTED ( "SHIFT" );
   VALUE ( def.type )         EXPECTED ( "TH1D" );
@@ -88,9 +88,22 @@ bool parsingLabeledWorks() {
   return true;
 }
 
+bool parsingWeightedWorks() {
+  auto def = HistogramDef::parse("EXPERT, TH1F, Weight, Cut, Cut counter, 5, 0, 5");
+  VALUE ( def.ok )           EXPECTED ( true ) ;
+  VALUE ( def.path )         EXPECTED ( "EXPERT" );
+  VALUE ( def.type )         EXPECTED ( "TH1F" );
+  VALUE ( def.name.size() )  EXPECTED ( 1 );
+  VALUE ( std::string(def.name[0]) ) EXPECTED ( "Cut");
+  VALUE ( def.labels.size() )EXPECTED ( 5 );
+  VALUE ( def.weight )       EXPECTED ("Weight");
+
+  return true;
+}
+
 bool badDefGeneratesExecption() {
   EXPECT_EXCEPTION( HistogramDefParseException,
-		    HistogramDef::parse("S, TH1D, x, 2.5, 0, 45") ); //2.5 bins can not be valid
+		    HistogramDef::parse("S, TH1D, , x, 2.5, 0, 45") ); //2.5 bins can not be valid
   return true;
 }
 
diff --git a/Control/AthenaMonitoring/test/test_defineHistogram.py b/Control/AthenaMonitoring/test/test_defineHistogram.py
index 1b691a41f89f..35bf12280062 100644
--- a/Control/AthenaMonitoring/test/test_defineHistogram.py
+++ b/Control/AthenaMonitoring/test/test_defineHistogram.py
@@ -8,24 +8,28 @@ from AthenaMonitoring.GenericMonitoringTool import defineHistogram
 
 class Test( unittest.TestCase ):
    def test_1D( self ):
-      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', 10, 0.0, 10.0)
-      self.assertEqual(s, 'EXPERT, TH1F, var, title, 10, 0.000000, 10.000000')
+      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', '', 10, 0.0, 10.0)
+      self.assertEqual(s, 'EXPERT, TH1F, , var, title, 10, 0.000000, 10.000000')
 
    def test_1D_label( self ):
-      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', 10, 0.0, 10.0, labels=['a','b'])
-      self.assertEqual(s, 'EXPERT, TH1F, var, title, 10, 0.000000, 10.000000, a:b:')
+      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', '', 10, 0.0, 10.0, labels=['a','b'])
+      self.assertEqual(s, 'EXPERT, TH1F, , var, title, 10, 0.000000, 10.000000, a:b:')
 
    def test_1D_opt( self ):
-      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', 10, 0.0, 10.0, opt='myopt')
-      self.assertEqual(s, 'EXPERT, TH1F, var, title, 10, 0.000000, 10.000000, myopt')
+      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', '', 10, 0.0, 10.0, opt='myopt')
+      self.assertEqual(s, 'EXPERT, TH1F, , var, title, 10, 0.000000, 10.000000, myopt')
+
+   def test_1D_weight( self ):
+      s = defineHistogram('var', 'TH1F', 'EXPERT', 'title', 'weight', 10, 0.0, 10.0)
+      self.assertEqual(s, 'EXPERT, TH1F, weight, var, title, 10, 0.000000, 10.000000')
 
    def test_2D( self ):
-      s = defineHistogram('var1,var2', 'TH2F', 'EXPERT', 'title', 10, 0.0, 10.0, 20, 0.0, 20.0)
-      self.assertEqual(s, 'EXPERT, TH2F, var1,var2, title, 10, 0.000000, 10.000000, 20, 0.000000, 20.000000')
+      s = defineHistogram('var1,var2', 'TH2F', 'EXPERT', 'title', '', 10, 0.0, 10.0, 20, 0.0, 20.0)
+      self.assertEqual(s, 'EXPERT, TH2F, , var1,var2, title, 10, 0.000000, 10.000000, 20, 0.000000, 20.000000')
 
    def test_3D( self ):
-      s = defineHistogram('var1,var2,var3', 'TProfile2D', 'EXPERT', 'title', 10, 0.0, 10.0, 20, 0.0, 20.0, -1.0, 1.0)
-      self.assertEqual(s, 'EXPERT, TProfile2D, var1,var2,var3, title, 10, 0.000000, 10.000000, 20, 0.000000, 20.000000, -1.000000, 1.000000')
+      s = defineHistogram('var1,var2,var3', 'TProfile2D', 'EXPERT', 'title', '', 10, 0.0, 10.0, 20, 0.0, 20.0, -1.0, 1.0)
+      self.assertEqual(s, 'EXPERT, TProfile2D, , var1,var2,var3, title, 10, 0.000000, 10.000000, 20, 0.000000, 20.000000, -1.000000, 1.000000')
 
    def test_enforcePath( self ):
       with self.assertRaises(AssertionError):
@@ -36,8 +40,8 @@ class Test( unittest.TestCase ):
          defineHistogram('var', 'TH1F', path='EXPERT', labels='l1:l2')
 
    def test_efficiency( self ):
-      s = defineHistogram('var', 'TEfficiency', 'EXPERT', 'title', 10, 0.0, 10.0)
-      self.assertEqual(s, 'EXPERT, TEfficiency, var, title, 10, 0.000000, 10.000000')
+      s = defineHistogram('var', 'TEfficiency', 'EXPERT', 'title', '', 10, 0.0, 10.0)
+      self.assertEqual(s, 'EXPERT, TEfficiency, , var, title, 10, 0.000000, 10.000000')
 
 if __name__ == '__main__':
    unittest.main()
-- 
GitLab


From b7aefdcfd5ba926dca1af74dc45a11f3cfec8922 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Tue, 7 May 2019 12:38:12 +0000
Subject: [PATCH 123/129] Code cleanup of SiSpacePointsSeedTool_xk package

---
 .../SiSpacePointForSeed.h                     |  177 +-
 .../SiSpacePointForSeedITK.h                  |  206 +--
 .../SiSpacePointsProSeed.h                    |  131 +-
 .../SiSpacePointsProSeedITK.h                 |  131 +-
 .../SiSpacePointsSeedMaker_ATLxk.h            |  303 ++--
 .../SiSpacePointsSeedMaker_BeamGas.h          |  279 +---
 .../SiSpacePointsSeedMaker_Cosmic.h           |  249 +--
 .../SiSpacePointsSeedMaker_HeavyIon.h         |  318 ++--
 .../SiSpacePointsSeedMaker_ITK.h              |  260 +--
 .../SiSpacePointsSeedMaker_LowMomentum.h      |  248 +--
 .../SiSpacePointsSeedMaker_Trigger.h          |  297 +---
 .../src/SiSpacePointForSeed.cxx               |  165 ++
 .../src/SiSpacePointForSeedITK.cxx            |  198 +++
 .../src/SiSpacePointsProSeed.cxx              |  127 ++
 .../src/SiSpacePointsProSeedITK.cxx           |  127 ++
 .../src/SiSpacePointsSeedMaker_ATLxk.cxx      |  242 ++-
 .../src/SiSpacePointsSeedMaker_BeamGas.cxx    |  820 +++++-----
 .../src/SiSpacePointsSeedMaker_Cosmic.cxx     |  820 ++++++----
 .../src/SiSpacePointsSeedMaker_HeavyIon.cxx   | 1217 ++++++++------
 .../src/SiSpacePointsSeedMaker_ITK.cxx        | 1437 +++++++++--------
 .../SiSpacePointsSeedMaker_LowMomentum.cxx    |  881 +++++-----
 .../src/SiSpacePointsSeedMaker_Trigger.cxx    | 1161 +++++++------
 22 files changed, 4969 insertions(+), 4825 deletions(-)
 create mode 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeed.cxx
 create mode 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeedITK.cxx
 create mode 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeed.cxx
 create mode 100644 InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeedITK.cxx

diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
index 8d831469829c..9fd2a0b6cfda 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
@@ -15,12 +17,15 @@
 #ifndef SiSpacePointForSeed_h
 #define SiSpacePointForSeed_h
 
-#include "InDetPrepRawData/SiCluster.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "TrkSpacePoint/SpacePoint.h"
-#include "TrkSurfaces/Surface.h"
+#include <cmath>
+
+namespace Trk {
+  class SpacePoint;
+  class Surface;
+}
 
 namespace InDet {
+  class SiCluster;
 
   class SiSpacePointForSeed {
     
@@ -34,15 +39,15 @@ namespace InDet {
     SiSpacePointForSeed(const Trk::SpacePoint*const&,const float*);
     SiSpacePointForSeed(const Trk::SpacePoint*const&,const float*,const float*);
     SiSpacePointForSeed(const SiSpacePointForSeed&);
-    virtual ~SiSpacePointForSeed()                 ;
+    virtual ~SiSpacePointForSeed();
     SiSpacePointForSeed& operator  = (const SiSpacePointForSeed&);
 
-    void set(const Trk::SpacePoint*const&,const float*)  ;
+    void set(const Trk::SpacePoint*const&,const float*);
     void set(const Trk::SpacePoint*const&,const float*,const float*);
     void setQuality(float);
     void setParam(const float&);
 
-    const Trk::SpacePoint* spacepoint              ; 
+    const Trk::SpacePoint* spacepoint; 
     const float&          x() const {return m_x;}
     const float&          y() const {return m_y;}
     const float&          z() const {return m_z;}
@@ -55,7 +60,7 @@ namespace InDet {
     const Trk::Surface* sur() const {return m_su;}
     const Trk::Surface* sun() const {return m_sn;}
 
-  protected:
+  private:
     
     float m_x   ; // x-coordinate in beam system coordinates  
     float m_y   ; // y-coordinate in beam system coordinates
@@ -68,162 +73,6 @@ namespace InDet {
     const Trk::Surface* m_su;
     const Trk::Surface* m_sn;
   };
-
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Inline methods
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed::SiSpacePointForSeed ()
-    {
-      spacepoint = 0;
-      m_x     = 0.;
-      m_y     = 0.;
-      m_z     = 0.;
-      m_r     = 0.;
-      m_covr  = 0.;
-      m_covz  = 0.;
-      m_param = 0.;
-      m_q     = 0.;
-      m_su    = 0 ;
-      m_sn    = 0 ;
-   }
-
-  inline SiSpacePointForSeed& SiSpacePointForSeed::operator = 
-    (const SiSpacePointForSeed& sp) 
-    {
-      if(&sp!=this) {
-	spacepoint  = sp.spacepoint;
-	m_x         = sp.m_x       ;
-	m_y         = sp.m_y       ;
-	m_z         = sp.m_z       ;
-	m_r         = sp.m_r       ;
-	m_covr      = sp.m_covr    ;
-	m_covz      = sp.m_covz    ;
-	m_q         = sp.m_q       ;
-	m_su        = sp.m_su      ;
-	m_sn        = sp.m_sn      ;        
-      }
-      return(*this);
-    }
- 
-  inline SiSpacePointForSeed::SiSpacePointForSeed
-    (const Trk::SpacePoint*const& sp,const float* r) 
-    {
-      set(sp,r); m_param = 0.;
-    }
-
-  inline SiSpacePointForSeed::SiSpacePointForSeed
-    (const Trk::SpacePoint*const& sp,const float* r,const float* sc) 
-    {
-      set(sp,r,sc); m_param = 0.;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Copy constructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed::SiSpacePointForSeed (const SiSpacePointForSeed& sp)
-    {
-      *this = sp;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Destructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed::~SiSpacePointForSeed() 
-  {
-  }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointForSeed::set
-    (const Trk::SpacePoint*const& sp,const float* r)
-    {
-      spacepoint = sp  ;
-      m_x        = r[0];
-      m_y        = r[1];
-      m_z        = r[2];
-      m_r        =sqrt(m_x*m_x+m_y*m_y);
-      m_q        = 100000.;
-
-      const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
-      const InDetDD::SiDetectorElement* de = c ->detectorElement();
-
-      if( de->isPixel() ) {
-      
-	const Amg::MatrixX& v =  c->localCovariance();
-	float f22 = float(v(1,1) );
-	float wid = float(c->width().z());
-	float cov = wid*wid*.08333; if(cov < f22) cov = f22;
-	if(de->isBarrel()) {m_covz = 9.*cov; m_covr = .06;}
-	else               {m_covr = 9.*cov; m_covz = .06;}
-	m_sn = 0;
-      }
-      else                {
-
-	const Amg::MatrixX& v = sp->localCovariance();
-	float f22 = float(v(1,1));
-	if(de->isBarrel()) {m_covz = 8.*f22; m_covr = .1;} 
-	else               {m_covr = 8.*f22; m_covz = .1;} 
-	m_sn =  &sp->clusterList().second->detectorElement()->surface();
-      }
-      m_su = &sp->clusterList().first->detectorElement()->surface();
-    } 
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set with error correction 
-  // sc[0] - barrel pixels error correction
-  // sc[1] - endcap pixels 
-  // sc[2] - barrel sct
-  // sc[3] - endcap sct 
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointForSeed::set
-    (const Trk::SpacePoint*const& sp,const float* r,const float* sc)
-    {
-      spacepoint = sp  ;
-      m_x        = r[0];
-      m_y        = r[1];
-      m_z        = r[2];
-      m_r        =sqrt(m_x*m_x+m_y*m_y);
-      m_q        = 100000.;
-
-      const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
-      const InDetDD::SiDetectorElement* de = c ->detectorElement();
-
-      if( de->isPixel() ) {
-      
-	const Amg::MatrixX& v =  c->localCovariance();
-	float f22 = float(v(1,1));
-	float wid = float(c->width().z());
-	float cov = wid*wid*.08333; if(cov < f22) cov = f22;
-	if(de->isBarrel()) {m_covz = 9.*cov*sc[0]; m_covr = .06;}
-	else               {m_covr = 9.*cov*sc[1]; m_covz = .06;}
-	m_sn = 0;
-      }
-      else                {
-
-	const Amg::MatrixX& v = sp->localCovariance();
-	float f22 = float(v(1,1));
-	if(de->isBarrel()) {m_covz = 8.*f22*sc[2]; m_covr = .1;} 
-	else               {m_covr = 8.*f22*sc[3]; m_covz = .1;} 
-	m_sn =  &sp->clusterList().second->detectorElement()->surface();
-      }
-      m_su = &sp->clusterList().first->detectorElement()->surface();
-    }
-
-  inline void SiSpacePointForSeed::setParam(const float& p)
-    {
-      m_param = p;
-    }
-  inline void  SiSpacePointForSeed::setQuality(float q)
-    {
-      if(q <= m_q) m_q = q;
-    }
  
 } // end of name space
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
index 1a06697da46a..3cab9270db7c 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2017\9 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -15,12 +17,15 @@
 #ifndef SiSpacePointForSeedITK_h
 #define SiSpacePointForSeedITK_h
 
-#include "InDetPrepRawData/SiCluster.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "TrkSpacePoint/SpacePoint.h"
-#include "TrkSurfaces/Surface.h"
+#include <cmath>
+
+namespace Trk {
+  class SpacePoint;
+  class Surface;
+}
 
 namespace InDet {
+  class SiCluster;
 
   class SiSpacePointForSeedITK {
     
@@ -57,7 +62,7 @@ namespace InDet {
 
     bool coordinates(float*,float*);
 
-  protected:
+  private:
     
     float m_x   ; // x-coordinate in beam system coordinates  
     float m_y   ; // y-coordinate in beam system coordinates
@@ -77,195 +82,6 @@ namespace InDet {
     const Trk::Surface* m_sn;
   };
 
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Inline methods
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeedITK::SiSpacePointForSeedITK ()
-    {
-      spacepoint = 0;
-      m_x     = 0.;
-      m_y     = 0.;
-      m_z     = 0.;
-      m_r     = 0.;
-      m_covr  = 0.;
-      m_covz  = 0.;
-      m_param = 0.;
-      m_q     = 0.;
-      m_su    = 0 ;
-      m_sn    = 0 ;
-      for(int i=0; i!=3; ++i) {m_b0[i]=0.; m_b1[i]=0.; m_dr[i]=0.; m_r0[i]=0.;}
-   }
-
-  inline SiSpacePointForSeedITK& SiSpacePointForSeedITK::operator = 
-    (const SiSpacePointForSeedITK& sp) 
-    {
-      if(&sp!=this) {
-	spacepoint  = sp.spacepoint;
-	m_x         = sp.m_x       ;
-	m_y         = sp.m_y       ;
-	m_z         = sp.m_z       ;
-	m_r         = sp.m_r       ;
-	m_covr      = sp.m_covr    ;
-	m_covz      = sp.m_covz    ;
-	m_q         = sp.m_q       ;
-	m_su        = sp.m_su      ;
-	m_sn        = sp.m_sn      ;        
-	for(int i=0; i!=3; ++i) m_b0[i]=sp.m_b0[i];
-	for(int i=0; i!=3; ++i) m_b1[i]=sp.m_b1[i];
-	for(int i=0; i!=3; ++i) m_dr[i]=sp.m_dr[i];
- 	for(int i=0; i!=3; ++i) m_r0[i]=sp.m_r0[i];
-       }
-      return(*this);
-    }
- 
-  inline SiSpacePointForSeedITK::SiSpacePointForSeedITK
-    (const Trk::SpacePoint*const& sp,const float* r) 
-    {
-      set(sp,r); m_param = 0.;
-    }
-
-  inline SiSpacePointForSeedITK::SiSpacePointForSeedITK
-    (const Trk::SpacePoint*const& sp,const float* r,const float* sc) 
-    {
-      set(sp,r,sc); m_param = 0.;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Copy constructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeedITK::SiSpacePointForSeedITK (const SiSpacePointForSeedITK& sp)
-    {
-      *this = sp;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Destructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeedITK::~SiSpacePointForSeedITK() 
-  {
-  }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointForSeedITK::set
-    (const Trk::SpacePoint*const& sp,const float* r)
-    {
-      spacepoint = sp  ;
-      m_x        = r[0];
-      m_y        = r[1];
-      m_z        = r[2];
-      m_r        =sqrt(m_x*m_x+m_y*m_y);
-      m_q        = 100000.;
-
-      const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
-      const InDetDD::SiDetectorElement* de = c ->detectorElement();
-
-      if( de->isPixel() ) {
-      
-	const Amg::MatrixX& v =  c->localCovariance();
-	float f22 = float(v(1,1) );
-	float wid = float(c->width().z());
-	float cov = wid*wid*.08333; if(cov < f22) cov = f22;
-	if(de->isBarrel()) {m_covz = 9.*cov; m_covr = .06;}
-	else               {m_covr = 9.*cov; m_covz = .06;}
-	m_sn = 0;
-      }
-      else                {
-
-	const Amg::MatrixX& v = sp->localCovariance();
-	float f22 = float(v(1,1));
-	if(de->isBarrel()) {m_covz = 8.*f22; m_covr = .1;} 
-	else               {m_covr = 8.*f22; m_covz = .1;} 
-	m_sn =  &sp->clusterList().second->detectorElement()->surface();
-
-	for(int i=0; i!=3; ++i) {m_b0[i]=r[3 +i]; m_b1[i]=r[6 +i]; m_dr[i]=r[9 +i]; m_r0[i]=r[12+i];}
-	
-      }
-      m_su = &sp->clusterList().first->detectorElement()->surface();
-    } 
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set with error correction 
-  // sc[0] - barrel pixels error correction
-  // sc[1] - endcap pixels 
-  // sc[2] - barrel sct
-  // sc[3] - endcap sct 
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointForSeedITK::set
-    (const Trk::SpacePoint*const& sp,const float* r,const float* sc)
-    {
-      spacepoint = sp  ;
-      m_x        = r[0];
-      m_y        = r[1];
-      m_z        = r[2];
-      m_r        =sqrt(m_x*m_x+m_y*m_y);
-      m_q        = 100000.;
-
-      const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
-      const InDetDD::SiDetectorElement* de = c ->detectorElement();
-
-      if( de->isPixel() ) {
-      
-	const Amg::MatrixX& v =  c->localCovariance();
-	float f22 = float(v(1,1));
-	float wid = float(c->width().z());
-	float cov = wid*wid*.08333; if(cov < f22) cov = f22;
-	if(de->isBarrel()) {m_covz = 9.*cov*sc[0]; m_covr = .06;}
-	else               {m_covr = 9.*cov*sc[1]; m_covz = .06;}
-	m_sn = 0;
-      }
-      else                {
-
-	const Amg::MatrixX& v = sp->localCovariance();
-	float f22 = float(v(1,1));
-	if(de->isBarrel()) {m_covz = 8.*f22*sc[2]; m_covr = .1;} 
-	else               {m_covr = 8.*f22*sc[3]; m_covz = .1;} 
-	m_sn =  &sp->clusterList().second->detectorElement()->surface();
-
-	for(int i=0; i!=3; ++i) {m_b0[i]=r[3 +i]; m_b1[i]=r[6 +i]; m_dr[i]=r[9 +i]; m_r0[i]=r[12+i];}
-      }
-      m_su = &sp->clusterList().first->detectorElement()->surface();
-    }
-
-  inline void SiSpacePointForSeedITK::setParam(const float& p)
-    {
-      m_param = p;
-    }
-  inline void  SiSpacePointForSeedITK::setQuality(float q)
-    {
-      if(q <= m_q) m_q = q;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Coordinate of cross points two SCT strip calculation for given direction
-  // d - input direction
-  // r - output coordinates
-  // true if cross point is inside detector elements 
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline bool SiSpacePointForSeedITK::coordinates(float* d,float* r)
-    {
-      float d0[3] = {m_b1[1]*d[2]-m_b1[2]*d[1],m_b1[2]*d[0]-m_b1[0]*d[2],m_b1[0]*d[1]-m_b1[1]*d[0]};
-      float bd0   =  m_b0[0]*d0[0]+m_b0[1]*d0[1]+m_b0[2]*d0[2];       if(     bd0==0.          ) return false;
-      float s0    =-(m_dr[0]*d0[0]+m_dr[1]*d0[1]+m_dr[2]*d0[2])/bd0;  if(s0 < -.05 || s0 > 1.05) return false;
-
-      float d1[3] = {m_b0[1]*d[2]-m_b0[2]*d[1],m_b0[2]*d[0]-m_b0[0]*d[2],m_b0[0]*d[1]-m_b0[1]*d[0]};
-      float bd1   =  m_b1[0]*d1[0]+m_b1[1]*d1[1]+m_b1[2]*d1[2];       if(       bd1==0.        ) return false;
-      float s1    = (m_dr[0]*d1[0]+m_dr[1]*d1[1]+m_dr[2]*d1[2])/bd1;  if(s1 < -.05 || s1 > 1.05) return false;
-      
-      r[0] = m_r0[0]+m_b0[0]*s0;
-      r[1] = m_r0[1]+m_b0[1]*s0;
-      r[2] = m_r0[2]+m_b0[2]*s0;
-      return true;
-    }
-
 } // end of name space
 
 #endif  // SiSpacePointForSeedITK_h
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h
index 56de9c1ad357..f7595db7d84c 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
@@ -15,10 +17,9 @@
 #ifndef SiSpacePointsProSeed_h
 #define SiSpacePointsProSeed_h
 
-#include "SiSpacePointsSeed/SiSpacePointsSeed.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
-
 namespace InDet {
+  class SiSpacePointForSeed;
+  class SiSpacePointsSeed;
 
   class SiSpacePointsProSeed {
     
@@ -46,7 +47,7 @@ namespace InDet {
     bool set3(InDet::SiSpacePointsSeed&);
     void set2(InDet::SiSpacePointsSeed&);
 
-  protected:
+  private:
     
     SiSpacePointForSeed* m_s0;
     SiSpacePointForSeed* m_s1;
@@ -54,128 +55,6 @@ namespace InDet {
     float                m_z ;
     float                m_q ;
   };
-
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Inline methods
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointsProSeed::SiSpacePointsProSeed ()
-    {
-      m_s0 = 0 ;
-      m_s1 = 0 ;
-      m_s2 = 0 ;
-      m_z  = 0.;
-      m_q  = 0.;
-    }
-
-  inline SiSpacePointsProSeed& SiSpacePointsProSeed::operator = 
-    (const SiSpacePointsProSeed& sp) 
-    {
-      if(&sp!=this) {
-
-	m_z   = sp.m_z ;
-	m_q   = sp.m_q ;
-	m_s0  = sp.m_s0;
-	m_s1  = sp.m_s1;
-	m_s2  = sp.m_s2;
-      }
-      return(*this);
-    }
- 
-  inline SiSpacePointsProSeed::SiSpacePointsProSeed
-    (SiSpacePointForSeed*& s0,SiSpacePointForSeed*& s1,SiSpacePointForSeed*& s2,float z)
-    {
-      set(s0,s1,s2,z); m_q = 0.;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Copy constructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointsProSeed::SiSpacePointsProSeed (const SiSpacePointsProSeed& sp): m_s0(sp.m_s0),m_s1(sp.m_s1),m_s2(sp.m_s2)
-    {
-      *this = sp;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Destructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointsProSeed::~SiSpacePointsProSeed() 
-  {
-  }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set 
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsProSeed::set
-    (SiSpacePointForSeed*& s0,SiSpacePointForSeed*& s1,SiSpacePointForSeed*& s2,float z)
-    {
-      m_z   = z ;
-      m_s0  = s0;
-      m_s1  = s1;
-      m_s2  = s2;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set two space points seed
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsProSeed::set2(InDet::SiSpacePointsSeed& s)
-    {
-      s.erase();
-      s.add(m_s0->spacepoint);
-      s.add(m_s1->spacepoint);
-      s.setZVertex(double(m_z));
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set three space points seed
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline bool SiSpacePointsProSeed::set3(InDet::SiSpacePointsSeed& s)
-    {
-      
-      bool pixb = !m_s0->spacepoint->clusterList().second;
-      bool pixt = !m_s2->spacepoint->clusterList().second;
-      
-      if(pixb!=pixt) {
-	if(m_q > m_s0->quality() && m_q > m_s1->quality() && m_q > m_s2->quality()) return false;
-      }
-     
-      m_s0->setQuality(m_q);
-      m_s1->setQuality(m_q);
-      m_s2->setQuality(m_q);
-      
-      s.erase();
-      s.add(m_s0->spacepoint);
-      s.add(m_s1->spacepoint);
-      s.add(m_s2->spacepoint);
-      s.setZVertex(double(m_z)); 
-      return true;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set quality in pro seed
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline bool SiSpacePointsProSeed::setQuality(float q)
-    {
-      m_q = q;
-      bool pixb = !m_s0->spacepoint->clusterList().second;
-      bool pixt = !m_s2->spacepoint->clusterList().second;
-      if(pixb==pixt) {
-	m_s0->setQuality(q);
-	m_s1->setQuality(q);
-	m_s2->setQuality(q);
-	return true;
-      }
-      if(q < m_s0->quality() || q < m_s1->quality() || q < m_s2->quality()) return true;
-      return false;
-    }
-
 } // end of name space
 
 #endif  // SiSpacePointsProSeed_h
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h
index 0ca769dc559a..d9b07d7da0fa 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
@@ -15,10 +17,9 @@
 #ifndef SiSpacePointsProSeedITK_h
 #define SiSpacePointsProSeedITK_h
 
-#include "SiSpacePointsSeed/SiSpacePointsSeed.h"
-#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h"
-
 namespace InDet {
+  class SiSpacePointForSeedITK;
+  class SiSpacePointsSeed;
 
   class SiSpacePointsProSeedITK {
     
@@ -46,7 +47,7 @@ namespace InDet {
     bool set3(InDet::SiSpacePointsSeed&);
     void set2(InDet::SiSpacePointsSeed&);
 
-  protected:
+  private:
     
     SiSpacePointForSeedITK* m_s0;
     SiSpacePointForSeedITK* m_s1;
@@ -54,128 +55,6 @@ namespace InDet {
     float                   m_z ;
     float                   m_q ;
   };
-
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Inline methods
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointsProSeedITK::SiSpacePointsProSeedITK ()
-    {
-      m_s0 = 0 ;
-      m_s1 = 0 ;
-      m_s2 = 0 ;
-      m_z  = 0.;
-      m_q  = 0.;
-    }
-
-  inline SiSpacePointsProSeedITK& SiSpacePointsProSeedITK::operator = 
-    (const SiSpacePointsProSeedITK& sp) 
-    {
-      if(&sp!=this) {
-
-	m_z   = sp.m_z ;
-	m_q   = sp.m_q ;
-	m_s0  = sp.m_s0;
-	m_s1  = sp.m_s1;
-	m_s2  = sp.m_s2;
-      }
-      return(*this);
-    }
- 
-  inline SiSpacePointsProSeedITK::SiSpacePointsProSeedITK
-    (SiSpacePointForSeedITK*& s0,SiSpacePointForSeedITK*& s1,SiSpacePointForSeedITK*& s2,float z)
-    {
-      set(s0,s1,s2,z); m_q = 0.;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Copy constructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointsProSeedITK::SiSpacePointsProSeedITK (const SiSpacePointsProSeedITK& sp): m_s0(sp.m_s0),m_s1(sp.m_s1),m_s2(sp.m_s2)
-    {
-      *this = sp;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Destructor
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointsProSeedITK::~SiSpacePointsProSeedITK() 
-  {
-  }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set 
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsProSeedITK::set
-    (SiSpacePointForSeedITK*& s0,SiSpacePointForSeedITK*& s1,SiSpacePointForSeedITK*& s2,float z)
-    {
-      m_z   = z ;
-      m_s0  = s0;
-      m_s1  = s1;
-      m_s2  = s2;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set two space points seed
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsProSeedITK::set2(InDet::SiSpacePointsSeed& s)
-    {
-      s.erase();
-      s.add(m_s0->spacepoint);
-      s.add(m_s1->spacepoint);
-      s.setZVertex(double(m_z));
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set three space points seed
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline bool SiSpacePointsProSeedITK::set3(InDet::SiSpacePointsSeed& s)
-    {
-      
-      bool pixb = !m_s0->spacepoint->clusterList().second;
-      bool pixt = !m_s2->spacepoint->clusterList().second;
-      
-      if(pixb!=pixt) {
-	if(m_q > m_s0->quality() && m_q > m_s1->quality() && m_q > m_s2->quality()) return false;
-      }
-     
-      m_s0->setQuality(m_q);
-      m_s1->setQuality(m_q);
-      m_s2->setQuality(m_q);
-      
-      s.erase();
-      s.add(m_s0->spacepoint);
-      s.add(m_s1->spacepoint);
-      s.add(m_s2->spacepoint);
-      s.setZVertex(double(m_z)); 
-      return true;
-    }
-
-  /////////////////////////////////////////////////////////////////////////////////
-  // Set quality in pro seed
-  /////////////////////////////////////////////////////////////////////////////////
-
-  inline bool SiSpacePointsProSeedITK::setQuality(float q)
-    {
-      m_q = q;
-      bool pixb = !m_s0->spacepoint->clusterList().second;
-      bool pixt = !m_s2->spacepoint->clusterList().second;
-      if(pixb==pixt) {
-	m_s0->setQuality(q);
-	m_s1->setQuality(q);
-	m_s2->setQuality(q);
-	return true;
-      }
-      if(q < m_s0->quality() || q < m_s1->quality() || q < m_s2->quality()) return true;
-      return false;
-    }
-
 } // end of name space
 
 #endif  // SiSpacePointsProSeedITK_h
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
index 8036fac97acf..4d41fe555b47 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
@@ -25,9 +25,9 @@
 #include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h" 
-#include "TrkToolInterfaces/IPRD_AssociationTool.h"
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
+#include "TrkToolInterfaces/IPRD_AssociationTool.h"
 
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
@@ -42,7 +42,6 @@ class MsgStream;
 
 namespace InDet {
 
-
   class SiSpacePointsSeedMaker_ATLxk : 
     virtual public ISiSpacePointsSeedMaker, public AthAlgTool
   {
@@ -56,36 +55,33 @@ namespace InDet {
     // Standard tool methods
     ///////////////////////////////////////////////////////////////////
 
-    SiSpacePointsSeedMaker_ATLxk
-    (const std::string&,const std::string&,const IInterface*);
+    SiSpacePointsSeedMaker_ATLxk(const std::string&, const std::string&, const IInterface*);
     virtual ~SiSpacePointsSeedMaker_ATLxk();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
 
-    void newEvent (int);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD);
       
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
@@ -93,25 +89,25 @@ namespace InDet {
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
  
-    void findVSp (const std::list<Trk::Vertex>&);
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
       
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
       
-    const SiSpacePointsSeed* next();
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump(MsgStream   & out) const;
-    std::ostream& dump(std::ostream& out) const;
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
-  protected:
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
   
     ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
@@ -124,7 +120,7 @@ namespace InDet {
     SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
     SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
 
-    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
+    SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
 
     // Properties, which will not be changed after construction
     BooleanProperty m_pixel{this, "usePixel", true};
@@ -174,59 +170,69 @@ namespace InDet {
     float m_drminv{20.};
 
     // Updated only in initialize
-    int m_outputlevel{};
+    int m_outputlevel{0};
 
     // Updated only in buildFrameWork in initialize
-    float                       m_dzdrmin0{}                      ;
-    float                       m_dzdrmax0{}                      ;
-    float                       m_ipt{}                           ;
-    float                       m_ipt2{}                          ;
-    float                       m_COF{}                           ;
-    int m_r_size {}                                               ;
-    int m_fNmax{},m_fvNmax{}                                      ;
-    int m_rfz_b[583],m_rfz_t[583],m_rfz_ib[583][9],m_rfz_it[583][9];
-    int m_rfzv_n[300],m_rfzv_i[300][6]                            ;
-    float m_sF{}                                                  ;
-    float m_sFv{}                                                 ;
+    float m_dzdrmin0{0.};
+    float m_dzdrmax0{0.};
+    float m_ipt{0.};
+    float m_ipt2{0.};
+    float m_COF{0.};
+    int m_r_size{0};
+    int m_fNmax{0};
+    int m_fvNmax{0};
+    int m_rfz_b[583];
+    int m_rfz_t[583];
+    int m_rfz_ib[583][9];
+    int m_rfz_it[583][9];
+    int m_rfzv_n[300];
+    int m_rfzv_i[300][6];
+    float m_sF{0};
+    float m_sFv{0};
 
     // Updated in buildFramework, newEvent, newRegion methods
-    float m_K{};
-    int m_ns{};
-    int m_nr{};
+    float m_K{0.};
+    int m_ns{0};
+    int m_nr{0};
     int* m_r_index{nullptr};
     int* m_r_map{nullptr};
     std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
 
     // Updated in buildFramework and other many mthods
-    int m_nsaz{}, m_nsazv{}                                       ;
-    int m_nrfz{},  m_rfz_index  [583], m_rfz_map  [583]           ;
-    int m_nrfzv{}, m_rfzv_index [300], m_rfzv_map [300]           ;
-    std::list<InDet::SiSpacePointsProSeed*>           m_l_seeds   ;
-    std::list<InDet::SiSpacePointsProSeed*>::iterator m_i_seed    ;
-    std::list<InDet::SiSpacePointsProSeed*>::iterator m_i_seede   ;
-    InDet::SiSpacePointsSeed*                m_seedOutput{nullptr};
-    InDet::SiSpacePointsProSeed*               m_OneSeeds{nullptr};
+    int m_nsaz{0};
+    int m_nsazv{0};
+    int m_nrfz{0};
+    int m_rfz_index[583];
+    int m_rfz_map[583];
+    int m_nrfzv{0};
+    int m_rfzv_index[300];
+    int m_rfzv_map[300];
+    std::list<InDet::SiSpacePointsProSeed*>           m_l_seeds;
+    std::list<InDet::SiSpacePointsProSeed*>::iterator m_i_seed;
+    std::list<InDet::SiSpacePointsProSeed*>::iterator m_i_seede;
+    InDet::SiSpacePointsSeed* m_seedOutput{nullptr};
+    InDet::SiSpacePointsProSeed* m_OneSeeds{nullptr};
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
     // Updated in buildFramework and other many mthods
     ///////////////////////////////////////////////////////////////////
-    InDet::SiSpacePointForSeed** m_SP{nullptr}                    ;
-    float               *  m_Zo{nullptr}                          ;
-    float               *  m_Tz{nullptr}                          ;
-    float               *  m_R{nullptr}                           ;
-    float               *  m_U{nullptr}                           ;
-    float               *  m_V{nullptr}                           ;
-    float               *  m_Er{nullptr}                          ;
+    InDet::SiSpacePointForSeed** m_SP{nullptr};
+    float* m_Zo{nullptr};
+    float* m_Tz{nullptr};
+    float* m_R{nullptr};
+    float* m_U{nullptr};
+    float* m_V{nullptr};
+    float* m_Er{nullptr};
 
     // Updated only in newEvent and newRegion
-    float              m_dzdrmin{}; // Always equals to m_dzdrmin0
-    float              m_dzdrmax{}; // Always equals to m_dzdrmax0
-    float              m_ipt2C{}; // Always equals to m_ipt2*m_COF
-    bool               m_trigger{false}                  ;
-    int                m_iteration{}                     ;
-    float              m_ipt2K{}                         ;
-    float              m_COFK{}                          ;
-    int                m_r_first{}                       ;
+    float m_dzdrmin{0.}; // Always equals to m_dzdrmin0
+    float m_dzdrmax{0.}; // Always equals to m_dzdrmax0
+    float m_ipt2C{0.}; // Always equals to m_ipt2*m_COF
+    bool m_trigger{false};
+    int m_iteration{0};
+    float m_ipt2K{0.};
+    float m_COFK{0.};
+    int m_r_first{0};
 
     ///////////////////////////////////////////////////////////////////
     // Beam geometry
@@ -238,39 +244,40 @@ namespace InDet {
     float m_zbeam[4]{0., 0., 0., 1.}; // z,ax,ay,az - center and z-axis direction
 
     // Updated in many methods
-    bool                        m_endlist{true}                   ;
-    bool                        m_isvertex{false}                 ;
-    int                         m_nprint{}                        ;
-    int                         m_state{0}                        ;
-    int                         m_nspoint{2}                      ;
-    int                         m_mode{0}                         ;
-    int                         m_nlist{0}                        ;
-    float                       m_zminU{}                         ;
-    float                       m_zmaxU{}                         ;
-    float                       m_zminB{}                         ;
-    float                       m_zmaxB{}                         ;
-    float                       m_ftrig{}                         ;
-    float                       m_ftrigW{}                        ;
-    float                       m_umax{}                          ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    bool m_endlist{true};
+    bool m_isvertex{false};
+    int m_nprint{0};
+    int m_state{0};
+    int m_nspoint{2};
+    int m_mode{0};
+    int m_nlist{0};
+    float m_zminU{0.};
+    float m_zmaxU{0.};
+    float m_zminB{0.};
+    float m_zmaxB{0.};
+    float m_ftrig{0.};
+    float m_ftrigW{0.};
+    float m_umax{0.};
+    std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted[583];
+    std::list<InDet::SiSpacePointForSeed*> m_rfzv_Sorted[300];
+    std::list<InDet::SiSpacePointForSeed*> m_l_spforseed;
     std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin       ;
-    int m_fNmin{},m_fvNmin{}                                      ;
-    int m_zMin{}                                                  ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin;
+    int m_fNmin{0};
+    int m_fvNmin{0};
+    int m_zMin{0};
 
-    std::multimap<float,InDet::SiSpacePointsProSeed*> m_seeds         ;
+    std::multimap<float,InDet::SiSpacePointsProSeed*> m_seeds;
     std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator m_seed;
 
     std::multimap<float,InDet::SiSpacePointsProSeed*> m_mapOneSeeds;
-    int                                               m_nOneSeeds{};
-    int                                               m_fillOneSeeds{};
-    std::set<float>                                   m_l_vertex   ;
+    int m_nOneSeeds{};
+    int m_fillOneSeeds{};
+    std::set<float> m_l_vertex;
     std::vector<std::pair<float,InDet::SiSpacePointForSeed*>> m_CmSp;
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
 
     /**    @name Disallow default instantiation, copy, assignment */
@@ -286,14 +293,14 @@ namespace InDet {
     void buildFrameWork();
     void buildBeamFrameWork();
 
-    SiSpacePointForSeed* newSpacePoint(const Trk::SpacePoint*const&);
-    void newSeed(SiSpacePointForSeed*&, SiSpacePointForSeed*&, float);
+    SiSpacePointForSeed* newSpacePoint(const Trk::SpacePoint*const& sp);
+    void newSeed(SiSpacePointForSeed*& p1, SiSpacePointForSeed*& p2, float z);
 
-    void newOneSeed(SiSpacePointForSeed*&, SiSpacePointForSeed*&,
-                    SiSpacePointForSeed*&, float, float);
+    void newOneSeed(SiSpacePointForSeed*& p1, SiSpacePointForSeed*& p2,
+                    SiSpacePointForSeed*& p3, float z, float q);
 
     void newOneSeedWithCurvaturesComparison
-    (SiSpacePointForSeed*&, SiSpacePointForSeed*&, float);
+    (SiSpacePointForSeed*& SPb, SiSpacePointForSeed*& SP0, float Zob);
 
     void fillSeeds();
     void fillLists();
@@ -301,119 +308,27 @@ namespace InDet {
     void production2Sp();
     void production3Sp();
     void production3Sp
-    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     int, int, int&);
+    (std::list<InDet::SiSpacePointForSeed*>::iterator* rb,
+     std::list<InDet::SiSpacePointForSeed*>::iterator* rbe,
+     std::list<InDet::SiSpacePointForSeed*>::iterator* rt,
+     std::list<InDet::SiSpacePointForSeed*>::iterator* rte,
+     int NB, int NT, int& nseed);
     void production3SpTrigger
-    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     int, int, int&);
+    (std::list<InDet::SiSpacePointForSeed*>::iterator* rb,
+     std::list<InDet::SiSpacePointForSeed*>::iterator* rbe,
+     std::list<InDet::SiSpacePointForSeed*>::iterator* rt,
+     std::list<InDet::SiSpacePointForSeed*>::iterator* rte,
+     int NB, int NT, int& nseed);
  
-    bool newVertices(const std::list<Trk::Vertex>&);
+    bool newVertices(const std::list<Trk::Vertex>& lV);
     void findNext();
     bool isZCompatible(float& Zv, float& R, float& T) const;
     void convertToBeamFrameWork(const Trk::SpacePoint*const& sp, float* r) const;
     bool isUsed(const Trk::SpacePoint* sp) const;
   };
 
-  MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_ATLxk&);
-  std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_ATLxk&);
-
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_ATLxk::next()
-  {
-    if (m_nspoint==3) {
-      do {
-        if (m_i_seed==m_i_seede) {
-          findNext();
-          if (m_i_seed==m_i_seede) return nullptr;
-        }
-        ++m_i_seed;
-      } while (!(*m_seed++).second->set3(*m_seedOutput));
-      return (m_seedOutput);
-    } else {
-      if (m_i_seed==m_i_seede) {
-        findNext();
-        if (m_i_seed==m_i_seede) return nullptr;
-      } 
-      (*m_i_seed++)->set2(*m_seedOutput);
-      return (m_seedOutput);
-    }
-    return nullptr;
-  }
-
-  inline bool SiSpacePointsSeedMaker_ATLxk::isZCompatible  
-  (float& Zv,float& R,float& T) const
-  {
-    if (Zv < m_zminU || Zv > m_zmaxU) return false;
-    if (!m_isvertex) return true;
-
-    std::set<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-
-    float dZmin = fabs((*v)-Zv);
-    for (++v; v!=ve; ++v) {
-      float dZ = fabs((*v)-Zv);
-      if (dZ >= dZmin) break;
-      dZmin=dZ;
-    }
-    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_ATLxk::newSpacePoint
-  (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3];
-    convertToBeamFrameWork(sp,r);
-
-    if (m_checketa) {
-
-      float z = (fabs(r[2])+m_zmax);
-      float x = r[0]*m_dzdrmin     ;
-      float y = r[1]*m_dzdrmin     ;
-      if ((z*z )<(x*x+y*y)) return nullptr;
-    }
-
-    if (m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++);
-      sps->set(sp,r);
-    } else {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_ATLxk::newSeed
-  (SiSpacePointForSeed*& p1,SiSpacePointForSeed*& p2, float z) 
-  {
-    SiSpacePointForSeed* p3 = nullptr;
-
-    if (m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsProSeed* s = (*m_i_seede++);
-      s->set(p1,p2,p3,z);
-    } else {
-      m_l_seeds.push_back(new SiSpacePointsProSeed(p1,p2,p3,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
+  MsgStream&    operator << (MsgStream& sl, const SiSpacePointsSeedMaker_ATLxk& se);
+  std::ostream& operator << (std::ostream& sl, const SiSpacePointsSeedMaker_ATLxk& se);
   
 } // end of name space
 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
index de4f17631327..f3578e456a0f 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
@@ -57,35 +57,33 @@ namespace InDet {
     ///////////////////////////////////////////////////////////////////
 
     SiSpacePointsSeedMaker_BeamGas
-    (const std::string&,const std::string&,const IInterface*);
+    (const std::string&, const std::string&, const IInterface*);
     virtual ~SiSpacePointsSeedMaker_BeamGas();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
 
-    void newEvent (int);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD);
       
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
@@ -93,49 +91,43 @@ namespace InDet {
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
  
-    void findVSp (const std::list<Trk::Vertex>&);
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
       
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
-      
-    const SiSpacePointsSeed* next();
+
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump          (MsgStream   & out) const;
-    std::ostream& dump          (std::ostream& out) const;
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
-  protected:
-    /**    @name Disallow default instantiation, copy, assignment */
-    //@{
-    SiSpacePointsSeedMaker_BeamGas() = delete;
-    SiSpacePointsSeedMaker_BeamGas(const SiSpacePointsSeedMaker_BeamGas&) = delete;
-    SiSpacePointsSeedMaker_BeamGas &operator=(const SiSpacePointsSeedMaker_BeamGas&) = delete;
-    //@}
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
       
     ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
 
-    PublicToolHandle<Trk::IPRD_AssociationTool>  m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
+    PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
 
     BooleanProperty m_pixel{this, "usePixel", true};
     BooleanProperty m_sct{this, "useSCT""useSCT", true};
-    bool                        m_endlist  {true}                     ;
+    bool                        m_endlist  {true};
     BooleanProperty m_useOverlap{this, "useOverlapSpCollection", true};
     BooleanProperty m_useassoTool{this, "UseAssociationTool", true};
-    int                         m_outputlevel{}                   ;
-    int                         m_nprint {}                       ;
-    int                         m_state {0}                        ;
-    int                         m_nspoint{2}                       ;
-    int                         m_mode {0}                         ;
-    int                         m_nlist{0}                         ;
+    int                         m_outputlevel{};
+    int                         m_nprint {};
+    int                         m_state {0};
+    int                         m_nspoint{2};
+    int                         m_mode {0};
+    int                         m_nlist{0};
     IntegerProperty m_maxsize{this, "maxSize", 20000};
     FloatProperty m_r1min{this, "minRadius1", 0.};
     FloatProperty m_r1max{this, "maxRadius1", 450.};
@@ -146,8 +138,8 @@ namespace InDet {
     FloatProperty m_drmin{this, "mindRadius", 10.};
     FloatProperty m_drmax{this, "maxdRadius", 270.};
     FloatProperty m_rapcut{this, "RapidityCut", 5.3};
-    float                       m_dzdrmin{}                       ;
-    float                       m_dzdrmax{}                       ;
+    float                       m_dzdrmin{};
+    float                       m_dzdrmax{};
     FloatProperty m_zmin{this, "minZ", -5000.};
     FloatProperty m_zmax{this, "maxZ", +5000.};
     FloatProperty m_r_rmax{this, "radMax", 600.};
@@ -156,54 +148,54 @@ namespace InDet {
     FloatProperty m_dzdrver{this, "maxdZdRver", 0.02};
     FloatProperty m_diver{this, "maxdImpact", 10.};
     FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7};
-    float                       m_dazmax{.02}                        ;
+    float                       m_dazmax{.02};
     FloatProperty m_ptmin{this, "pTmin", 1000.};
-    float                       m_ipt  {}                         ;
-    float                       m_ipt2 {}                         ;
-    float                       m_COF {}                          ;
-    float                       m_K  {}                           ;
-
-    int m_r_size {}                                               ;
-    int m_rf_size  {}                                             ;
-    int m_rfz_size {}                                             ;
+    float                       m_ipt  {};
+    float                       m_ipt2 {};
+    float                       m_COF {};
+    float                       m_K  {};
+
+    int m_r_size {};
+    int m_rf_size  {};
+    int m_rfz_size {};
     std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
-    std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed       ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53];
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583];
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed;
     std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-    int m_ns{},m_nsaz {}                                            ;
-    int m_fNmax {}                                                ;
-    int m_fNmin {}                                                ;
-    int m_zMin {}                                                 ;
-    int  m_nr{}     ; int* m_r_index{nullptr}   ; int* m_r_map {nullptr}            ;
-    int  m_nrf {}   , m_rf_index   [ 53], m_rf_map   [ 53]        ;
-    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]        ;
-    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12]   ;
-    float m_sF {}                                                 ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin;
+
+    int m_ns{},m_nsaz {};
+    int m_fNmax {};
+    int m_fNmin {};
+    int m_zMin {};
+    int  m_nr{}; int* m_r_index{nullptr}; int* m_r_map {nullptr};
+    int  m_nrf {}   , m_rf_index   [ 53], m_rf_map   [ 53];
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583];
+    int m_rfz_b[583],m_rfz_t[583],m_rfz_ib[583][12],m_rfz_it[583][12];
+    float m_sF {};
 
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
     ///////////////////////////////////////////////////////////////////
      
     IntegerProperty m_maxsizeSP{this, "maxSizeSP", 1500};
-    InDet::SiSpacePointForSeed** m_SP {nullptr}                          ;
-    float               *  m_R {nullptr}                                 ;
-    float               *  m_Tz {nullptr}                                ;
-    float               *  m_Er {nullptr}                                ;
-    float               *  m_U {nullptr}                                 ;
-    float               *  m_V {nullptr}                                 ;
-    float               *  m_Zo{nullptr}                                 ;
-
-    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
+    InDet::SiSpacePointForSeed** m_SP {nullptr};
+    float               *  m_R {nullptr};
+    float               *  m_Tz {nullptr};
+    float               *  m_Er {nullptr};
+    float               *  m_U {nullptr};
+    float               *  m_V {nullptr};
+    float               *  m_Zo{nullptr};
+
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede;
 
     std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-    InDet::SiSpacePointsSeed*                      m_OneSeeds {nullptr}  ;
+    InDet::SiSpacePointsSeed*                      m_OneSeeds {nullptr};
     IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 5};
-    int                                            m_nOneSeeds{}  ;
+    int                                            m_nOneSeeds{};
 
     ///////////////////////////////////////////////////////////////////
     // Beam geometry
@@ -222,155 +214,56 @@ namespace InDet {
     SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
 
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_BeamGas() = delete;
+    SiSpacePointsSeedMaker_BeamGas(const SiSpacePointsSeedMaker_BeamGas&) = delete;
+    SiSpacePointsSeedMaker_BeamGas &operator=(const SiSpacePointsSeedMaker_BeamGas&) = delete;
+    //@}
+
     MsgStream&    dumpConditions(MsgStream   & out) const;
     MsgStream&    dumpEvent     (MsgStream   & out) const;
 
-    void buildFrameWork()                                       ;
-    void buildBeamFrameWork()                                   ;
+    void buildFrameWork();
+    void buildBeamFrameWork();
 
     SiSpacePointForSeed* newSpacePoint
-    (const Trk::SpacePoint*const&)                            ;
+    (const Trk::SpacePoint*const&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const float&)                                              ;
+     const float&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&)                      ;
+     const Trk::SpacePoint*&,const float&);
 
     void newOneSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&,const float&)         ;
-    void fillSeeds()                                            ;
+     const Trk::SpacePoint*&,const float&,const float&);
+    void fillSeeds();
 
-    void fillLists     ()                                       ;
-    void erase         ()                                       ;
-    void production2Sp ()                                       ;
-    void production3Sp ()                                       ;
+    void fillLists     ();
+    void erase         ();
+    void production2Sp ();
+    void production3Sp ();
     void production3Sp
     (std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     int,int,int&)                                            ;
+     int,int,int&);
 
-    void findNext()                                             ;
-    bool isZCompatible     (float&)                             ;
-    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-    bool isUsed(const Trk::SpacePoint*)                         ;
+    void findNext();
+    bool isZCompatible     (float&);
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*);
+    bool isUsed(const Trk::SpacePoint*);
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_BeamGas&);
   std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_BeamGas&);
 
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_BeamGas::next()
-  {
-    if(m_i_seed==m_i_seede) {
-      findNext(); if(m_i_seed==m_i_seede) return 0;
-    } 
-    return(*m_i_seed++);
-  }
-    
-  inline bool SiSpacePointsSeedMaker_BeamGas::isZCompatible  
-  (float& Zv)
-  {
-    return  Zv > m_zmin && Zv < m_zmax;
-  }
-  
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_BeamGas::newSpacePoint
-  (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3]; convertToBeamFrameWork(sp,r);
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_BeamGas::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 3 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_BeamGas::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const Trk::SpacePoint*& p3,const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->add       (p3);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // Fill seeds
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_BeamGas::fillSeeds ()
-  {
-    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-      l  = m_mapOneSeeds.begin(),
-      le = m_mapOneSeeds.end  ();
-
-    for(; l!=le; ++l) {
-
-      if(m_i_seede!=m_l_seeds.end()) {
-        SiSpacePointsSeed* s = (*m_i_seede++);
-        *s = *(*l).second;
-      }
-      else                  {
-        m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
-        m_i_seede = m_l_seeds.end();
-      }
-    }
-  }
-  
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_BeamGas_H
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
index a709d6f56dc9..71ab183b6291 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
@@ -56,35 +56,32 @@ namespace InDet {
     ///////////////////////////////////////////////////////////////////
 
     SiSpacePointsSeedMaker_Cosmic
-    (const std::string&,const std::string&,const IInterface*);
+    (const std::string&, const std::string&, const IInterface*);
     virtual ~SiSpacePointsSeedMaker_Cosmic();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
-
-    void newEvent (int);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD);
       
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
@@ -92,33 +89,25 @@ namespace InDet {
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
  
-    void findVSp (const std::list<Trk::Vertex>&);
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
       
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
       
-    const SiSpacePointsSeed* next();
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump          (MsgStream   & out) const;
-    std::ostream& dump          (std::ostream& out) const;
-
-  protected:
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
-    /**    @name Disallow default instantiation, copy, assignment */
-    //@{
-    SiSpacePointsSeedMaker_Cosmic() = delete;
-    SiSpacePointsSeedMaker_Cosmic(const SiSpacePointsSeedMaker_Cosmic&) = delete;
-    SiSpacePointsSeedMaker_Cosmic &operator=(const SiSpacePointsSeedMaker_Cosmic&) = delete;
-    //@}
-      
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
       
     ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
@@ -130,49 +119,49 @@ namespace InDet {
     BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
     BooleanProperty m_useassoTool{this, "UseAssociationTool", false};
     BooleanProperty m_checketa{this, "checkEta", false};
-    int                         m_outputlevel {}                   ;
-    int                         m_nprint {}                        ;
+    int                         m_outputlevel {};
+    int                         m_nprint {};
     bool m_state{0};
     int m_nspoint{2};
     int m_mode{0};
     int m_nlist{0};
     IntegerProperty m_maxsize{this, "maxSize", 100};
-    int                         m_nseeds {}                        ;
+    int                         m_nseeds {};
     FloatProperty m_ptmin{this, "pTmin", 500.};
     FloatProperty m_drmin{this, "mindRadius", 5.};
     FloatProperty m_drmax{this, "maxdRadius", 1000.};
     FloatProperty m_rapcut{this, "RapidityCut", 2.3};
-    float                       m_dzdrmin {}                       ;
-    float                       m_dzdrmax {}                       ;
+    float                       m_dzdrmin {};
+    float                       m_dzdrmax {};
     FloatProperty m_zmin{this, "minZ", -10000.};
     FloatProperty m_zmax{this, "maxZ", +10000.};
     FloatProperty m_r_rmax{this, "radMax", 600.};
     FloatProperty m_r_rstep{this, "radStep", 5.};
     FloatProperty m_diver{this, "maxdImpact", 10.};
-    float                       m_dazmax  {}                       ;
+    float                       m_dazmax  {};
     FloatProperty m_diverpps{this, "maxdImpactPPS", 0.};
     FloatProperty m_diversss{this, "maxdImpactSSS", 0.};
     FloatProperty m_etamin{this, "etaMin", 0.};
     FloatProperty m_etamax{this, "etaMax", 0.};
-    int m_r_size {}                                                ;
-    int m_rf_size {}                                               ;
-    int m_rfz_size {}                                              ;
+    int m_r_size {};
+    int m_rf_size {};
+    int m_rfz_size {};
     std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
-    std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed       ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rf_Sorted  [    53];
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583];
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed;
     std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-    int m_ns{} ,m_nsaz {}                                             ;
-    int m_fNmax  {}                                                ;
-    int m_fNmin{}                                                  ;
-    int m_zMin {}                                                  ;
-    int  m_nr{}      ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
-    int  m_nrf{}     , m_rf_index   [ 53], m_rf_map   [ 53]        ;
-    int  m_nrfz{}    , m_rfz_index  [583], m_rfz_map  [583]        ;
-    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12] ;
-    float m_sF {}                                                  ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin;
+
+    int m_ns{} ,m_nsaz {};
+    int m_fNmax  {};
+    int m_fNmin{};
+    int m_zMin {};
+    int  m_nr{}; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrf{}     , m_rf_index   [ 53], m_rf_map   [ 53];
+    int  m_nrfz{}    , m_rfz_index  [583], m_rfz_map  [583];
+    int m_rfz_b[583],m_rfz_t[583],m_rfz_ib[583][12],m_rfz_it[583][12];
+    float m_sF {};
 
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
@@ -187,7 +176,7 @@ namespace InDet {
     float               *  m_V{nullptr};
 
     std::multimap<float,InDet::SiSpacePointsSeed*>           m_l_seeds;
-    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seed ;
+    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seed;
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seede;
     InDet::SiSpacePointsSeed*                                m_seeds{nullptr};
 
@@ -200,175 +189,55 @@ namespace InDet {
     SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_Cosmic() = delete;
+    SiSpacePointsSeedMaker_Cosmic(const SiSpacePointsSeedMaker_Cosmic&) = delete;
+    SiSpacePointsSeedMaker_Cosmic &operator=(const SiSpacePointsSeedMaker_Cosmic&) = delete;
+    //@}
 
     MsgStream&    dumpConditions(MsgStream   & out) const;
     MsgStream&    dumpEvent     (MsgStream   & out) const;
 
-    void buildFrameWork()                                       ;
+    void buildFrameWork();
 
     SiSpacePointForSeed* newSpacePoint
-    (const Trk::SpacePoint*const&)                            ;
+    (const Trk::SpacePoint*const&);
     SiSpacePointForSeed* newSpacePoint
-    (const Trk::SpacePoint*const&,const float*)               ;
+    (const Trk::SpacePoint*const&,const float*);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const float&)                                              ;
+     const float&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&)                      ;
-    void fillLists     ()                                       ;
-    void erase         ()                                       ;
-    void production2Sp ()                                       ;
-    void production3Sp ()                                       ;
+     const Trk::SpacePoint*&,const float&);
+    void fillLists     ();
+    void erase         ();
+    void production2Sp ();
+    void production3Sp ();
     void production3Sp
     (std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     int,int,float,float)                                     ;
+     int,int,float,float);
 
-    void production3SpWithoutField()                            ;
+    void production3SpWithoutField();
     void production3SpWithoutField
     (std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     int,int,float)                                           ;
-
+     int,int,float);
 
-     
-    bool isUsed(const Trk::SpacePoint*)                         ;
+    bool isUsed(const Trk::SpacePoint*);
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_Cosmic&);
   std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_Cosmic&);
 
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_Cosmic::next()
-  {
-    if(m_i_seed==m_i_seede) return 0;
-    SiSpacePointsSeed* sp = (*m_i_seed).second; ++m_i_seed;
-    return(sp);
-  }
-    
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_Cosmic::newSpacePoint
-  (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3] = {float(sp->globalPosition().x()),
-                  float(sp->globalPosition().y()),
-                  float(sp->globalPosition().z())};
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds with error correction
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_Cosmic::newSpacePoint
-  (const Trk::SpacePoint*const& sp,const float* sc) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3]; r[0]=sp->globalPosition().x(); r[1]=sp->globalPosition().y(); r[2]=sp->globalPosition().z();
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r,sc);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r,sc)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_Cosmic::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const float& z) 
-  {
-
-    if(m_nseeds < m_maxsize) {
-
-      m_seeds[m_nseeds].erase     (  );
-      m_seeds[m_nseeds].add       (p1);
-      m_seeds[m_nseeds].add       (p2);
-      m_seeds[m_nseeds].setZVertex(0.);
-      m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
-      ++m_nseeds;
-    }
-    else                     {
-
-      std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
-      if((*l).first <= z) return;
-      InDet::SiSpacePointsSeed* s = (*l).second;
-      m_l_seeds.erase((*l).first);
-
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->setZVertex(0.);
-      m_l_seeds.insert(std::make_pair(z,s));
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 3 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_Cosmic::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const Trk::SpacePoint*& p3,const float& z) 
-  {
-    if(m_nseeds < m_maxsize) {
-
-      m_seeds[m_nseeds].erase     (  );
-      m_seeds[m_nseeds].add       (p1);
-      m_seeds[m_nseeds].add       (p2);
-      m_seeds[m_nseeds].add       (p3);
-      m_seeds[m_nseeds].setZVertex(0.);
-      m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
-      ++m_nseeds;
-    }
-    else                     {
-
-      std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
-      if((*l).first <= z) return;
-      InDet::SiSpacePointsSeed* s = (*l).second;
-      m_l_seeds.erase((*l).first);
-
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->add       (p3);
-      s->setZVertex(0.);
-      m_l_seeds.insert(std::make_pair(z,s));
-    }
-  }
-  
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_Cosmic_H
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
index 2176f41603f1..3ea95daa4558 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
@@ -19,8 +19,8 @@
 #define SiSpacePointsSeedMaker_HeavyIon_H
 
 #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
+
 #include "BeamSpotConditionsData/BeamSpotData.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
@@ -55,68 +55,57 @@ namespace InDet {
     SiSpacePointsSeedMaker_HeavyIon
     (const std::string&,const std::string&,const IInterface*);
     virtual ~SiSpacePointsSeedMaker_HeavyIon();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
 
-    void newEvent (int);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>&vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>&vSCT, const IRoiDescriptor& IRD);
      
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with variable number space points with or without vertex constraint
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
- 
-    void findVSp (const std::list<Trk::Vertex>&);
-      
+
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
+
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
       
-    const SiSpacePointsSeed* next();
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump          (MsgStream   & out) const;
-    std::ostream& dump          (std::ostream& out) const;
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
-  protected:
-      
-      
-    /**    @name Disallow default instantiation, copy, assignment */
-    //@{
-    SiSpacePointsSeedMaker_HeavyIon() = delete;
-    SiSpacePointsSeedMaker_HeavyIon(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
-    SiSpacePointsSeedMaker_HeavyIon &operator=(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
-    //@}     
-      
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
       
     ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
@@ -124,16 +113,16 @@ namespace InDet {
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
     BooleanProperty m_pixel{this, "usePixel", true};
     BooleanProperty m_sct{this, "useSCT", true};
-    bool                        m_endlist {true}                      ;
+    bool                        m_endlist {true};
     BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
-    bool                        m_trigger  {false}                     ;
-    bool                        m_izvertex  {}                    ;
-    int                         m_outputlevel  {}                 ;
-    int                         m_nprint  {}                      ;
-    int                         m_state {0}                        ;
-    int                         m_nspoint {2}                      ;
-    int                         m_mode   {0}                       ;
-    int                         m_nlist  {0}                       ;
+    bool                        m_trigger  {false};
+    bool                        m_izvertex  {};
+    int                         m_outputlevel  {};
+    int                         m_nprint  {};
+    int                         m_state {0};
+    int                         m_nspoint {2};
+    int                         m_mode   {0};
+    int                         m_nlist  {0};
     IntegerProperty m_maxsize{this, "maxSize", 20000};
     UnsignedIntegerProperty m_maxNumberVertices{this, "maxNumberVertices", 1};
     FloatProperty m_r1min{this, "minRadius1", 0.};
@@ -147,17 +136,17 @@ namespace InDet {
     FloatProperty m_r3min{this, "minRadius3", 0.};
     FloatProperty m_r3max{this, "maxRadius3", 600.};
     FloatProperty m_drmin{this, "mindRadius", 10.};
-    float m_drminv {20.}              ;
+    float m_drminv {20.};
     FloatProperty m_drmax{this, "maxdRadius", 270.};
     FloatProperty m_rapcut{this, "RapidityCut", 2.7};
-    float                       m_dzdrmin{}                       ;
-    float                       m_dzdrmax {}                      ;
+    float                       m_dzdrmin{};
+    float                       m_dzdrmax {};
     FloatProperty m_zmin{this, "minZ", -250.};
     FloatProperty m_zmax{this, "maxZ", +250.};
-    float                       m_zminU  {}                       ;
-    float                       m_zmaxU  {}                       ;
-    float                       m_ftrig {}                        ;
-    float                       m_ftrigW {}                       ;
+    float                       m_zminU  {};
+    float                       m_zmaxU  {};
+    float                       m_ftrig {};
+    float                       m_ftrigW {};
     FloatProperty m_r_rmax{this, "radMax", 600.};
     FloatProperty m_r_rstep{this, "radStep", 2.};
     FloatProperty m_dzver{this, "maxdZver", 5.};
@@ -165,56 +154,56 @@ namespace InDet {
     FloatProperty m_diver{this, "maxdImpact", 10.};
     FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7};
     FloatProperty m_diversss{this, "maxdImpactSSS", 1000.};
-    float                       m_dazmax  {.02}                      ;
+    float                       m_dazmax  {.02};
     FloatProperty m_ptmin{this, "pTmin", 500.};
-    float                       m_ipt   {}                        ;
-    float                       m_ipt2  {}                        ;
-    float                       m_COF {}                          ;
-    float                       m_K  {}                           ;
-    int m_r_size      {}                                            ;
-    int m_rf_size  {}                                               ;
-    int m_rfz_size  {}                                              ;
-    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted  {nullptr}          ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    float                       m_ipt   {};
+    float                       m_ipt2  {};
+    float                       m_COF {};
+    float                       m_K  {};
+    int m_r_size      {};
+    int m_rf_size  {};
+    int m_rfz_size  {};
+    std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted  {nullptr};
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583];
+    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300];
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed;
     std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-    int m_ns{},m_nsaz{},m_nsazv {}                                    ;
-    int m_fNmax{},m_fvNmax {}                                       ;
-    int m_fNmin{},m_fvNmin    {}                                    ;
-    int m_zMin{}                                                  ;
-    int  m_nr{}     ; int* m_r_index{nullptr}   ; int* m_r_map{nullptr}                 ;
-    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
-    int  m_nrfzv{}  , m_rfzv_index [300], m_rfzv_map [300]            ;
-    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
-    int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
-    float m_sF{}                                                  ;
-    float m_sFv {}                                                ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin;
+
+    int m_ns{},m_nsaz{},m_nsazv {};
+    int m_fNmax{},m_fvNmax {};
+    int m_fNmin{},m_fvNmin    {};
+    int m_zMin{};
+    int  m_nr{}; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583];
+    int  m_nrfzv{}  , m_rfzv_index [300], m_rfzv_map [300];
+    int m_rfz_b[583],m_rfz_t[583],m_rfz_ib[583][9],m_rfz_it[583][9];
+    int m_rfzv_n[300],m_rfzv_i[300][6];
+    float m_sF{};
+    float m_sFv {};
 
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
     ///////////////////////////////////////////////////////////////////
      
     IntegerProperty m_maxsizeSP{this, "maxSizeSP", 4000};
-    InDet::SiSpacePointForSeed** m_SP  {nullptr}                         ;
-    float               *  m_Zo {nullptr}                                ;
-    float               *  m_Tz {nullptr}                                ;
-    float               *  m_R  {nullptr}                                ;
-    float               *  m_U {nullptr}                                 ;
-    float               *  m_V  {nullptr}                                ;
-    float               *  m_Er {nullptr}                                ;
-
-    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
+    InDet::SiSpacePointForSeed** m_SP  {nullptr};
+    float               *  m_Zo {nullptr};
+    float               *  m_Tz {nullptr};
+    float               *  m_R  {nullptr};
+    float               *  m_U {nullptr};
+    float               *  m_V  {nullptr};
+    float               *  m_Er {nullptr};
+
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede;
 
     std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-    InDet::SiSpacePointsSeed*                      m_OneSeeds {}  ;
+    InDet::SiSpacePointsSeed*                      m_OneSeeds {};
     IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 6};
-    int                                            m_nOneSeeds {} ;
-    std::list<float>                               m_l_vertex   ;
+    int                                            m_nOneSeeds {};
+    std::list<float>                               m_l_vertex;
  
     ///////////////////////////////////////////////////////////////////
     // Beam geometry
@@ -233,33 +222,39 @@ namespace InDet {
     SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_HeavyIon() = delete;
+    SiSpacePointsSeedMaker_HeavyIon(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
+    SiSpacePointsSeedMaker_HeavyIon &operator=(const SiSpacePointsSeedMaker_HeavyIon&) = delete;
+    //@}     
 
     MsgStream&    dumpConditions(MsgStream   & out) const;
     MsgStream&    dumpEvent     (MsgStream   & out) const;
 
-    void buildFrameWork()                                       ;
-    void buildBeamFrameWork()                                   ;
+    void buildFrameWork();
+    void buildBeamFrameWork();
 
     SiSpacePointForSeed* newSpacePoint
-    (const Trk::SpacePoint*const&)                            ;
+    (const Trk::SpacePoint*const&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const float&)                                              ;
+     const float&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&)                      ;
+     const Trk::SpacePoint*&,const float&);
 
     void newOneSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&,const float&)         ;
-    void fillSeeds()                                            ;
+     const Trk::SpacePoint*&,const float&,const float&);
+    void fillSeeds();
 
-    void fillLists     ()                                       ;
-    void erase         ()                                       ;
-    void production2Sp ()                                       ;
-    void production3Sp ()                                       ;
+    void fillLists     ();
+    void erase         ();
+    void production2Sp ();
+    void production3Sp ();
     void production3Sp
     (std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
@@ -279,139 +274,16 @@ namespace InDet {
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      int,int,int&);
 
-    bool newVertices(const std::list<Trk::Vertex>&)             ;
-    void findNext()                                             ;
-    bool isZCompatible     (float&,float&,float&)               ;
-    float dZVertexMin(float&)                                   ;
-    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    bool newVertices(const std::list<Trk::Vertex>&);
+    void findNext();
+    bool isZCompatible     (float&,float&,float&);
+    float dZVertexMin(float&);
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*);
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_HeavyIon&);
   std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_HeavyIon&);
 
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_HeavyIon::next()
-  {
-    if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
-    return(*m_i_seed++);
-  }
-
-  inline bool SiSpacePointsSeedMaker_HeavyIon::isZCompatible  
-  (float& Zv,float& R,float& T)
-  {
-    if(Zv < m_zmin || Zv > m_zmax) return false;
-    if(!m_izvertex               ) return true ;
-
-    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-
-    float dZmin = fabs((*v)-Zv); ++v;
-
-    for(; v!=ve; ++v) {
-      float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
-    }
-    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
-  }
-
-  inline float SiSpacePointsSeedMaker_HeavyIon::dZVertexMin(float& Z)
-  {
-    float dZm = 1.E10;
-    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-
-    for(; v!=ve; ++v) {float dZ = fabs((*v)-Z); if(dZ<dZm) dZm = dZ;}
-    return dZm;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_HeavyIon::newSpacePoint
-  (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3]; convertToBeamFrameWork(sp,r);
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_HeavyIon::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 3 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_HeavyIon::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const Trk::SpacePoint*& p3,const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->add       (p3);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-  
-  ///////////////////////////////////////////////////////////////////
-  // Fill seeds
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_HeavyIon::fillSeeds ()
-  {
-    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-      l  = m_mapOneSeeds.begin(),
-      le = m_mapOneSeeds.end  ();
-
-    for(; l!=le; ++l) {
-
-      if(m_i_seede!=m_l_seeds.end()) {
-        SiSpacePointsSeed* s = (*m_i_seede++);
-        *s = *(*l).second;
-      }
-      else                  {
-        m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
-        m_i_seede = m_l_seeds.end();
-      }
-    }
-  }
-  
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_HeavyIon_H
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
index 291cb73ab189..ee98c6cf1780 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
@@ -61,33 +61,31 @@ namespace InDet {
     SiSpacePointsSeedMaker_ITK
     (const std::string&,const std::string&,const IInterface*);
     virtual ~SiSpacePointsSeedMaker_ITK();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
 
-    void newEvent (int);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD);
       
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
@@ -95,26 +93,25 @@ namespace InDet {
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
  
-    void findVSp (const std::list<Trk::Vertex>&);
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
       
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
       
-    const SiSpacePointsSeed* next();
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump          (MsgStream   & out) const;
-    std::ostream& dump          (std::ostream& out) const;
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
-  protected:
-      
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
   
     ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
@@ -122,22 +119,22 @@ namespace InDet {
     SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
     BooleanProperty m_pixel{this, "usePixel", true};
     BooleanProperty m_sct{this, "useSCT", true};
-    bool                        m_endlist {true}                      ;
+    bool                        m_endlist {true};
     BooleanProperty m_useOverlap{this, "useOverlapSpCollection", true};
     BooleanProperty m_useassoTool{this, "UseAssociationTool", false};
-    bool                        m_trigger {false}                      ;
+    bool                        m_trigger {false};
     BooleanProperty m_checketa{this, "checkEta", false};
-    bool                        m_isvertex {}                     ;
+    bool                        m_isvertex {};
     BooleanProperty m_dbm{this, "useDBM", false};
-    int                         m_outputlevel  {}                 ;
-    int                         m_nprint   {}                     ;
-    int                         m_state    {0}                     ;
-    int                         m_nspoint  {2}                     ;
-    int                         m_mode     {0}                     ;
-    int                         m_nlist     {0}                    ;
+    int                         m_outputlevel  {};
+    int                         m_nprint   {};
+    int                         m_state    {0};
+    int                         m_nspoint  {2};
+    int                         m_mode     {0};
+    int                         m_nlist     {0};
     IntegerProperty m_maxsize{this, "maxSize", 50000};
-    int                         m_iteration   {}                  ;
-    int                         m_iteration0    {}                ;
+    int                         m_iteration   {};
+    int                         m_iteration0    {};
     UnsignedIntegerProperty m_maxNumberVertices{this, "maxNumberVertices", 99};
     FloatProperty m_etamin{this, "etaMin", 0.};
     FloatProperty m_etamax{this, "etaMax", 2.7};
@@ -155,18 +152,18 @@ namespace InDet {
     float m_drminv{20.};
     FloatProperty m_drmax{this, "maxdRadius", 300.};
     FloatProperty m_rapcut{this, "RapidityCut", 2.7};
-    float                       m_dzdrmin0 {}                     ;
-    float                       m_dzdrmax0 {}                     ;
-    float                       m_dzdrmin {}                      ;
-    float                       m_dzdrmax {}                      ;
+    float                       m_dzdrmin0 {};
+    float                       m_dzdrmax0 {};
+    float                       m_dzdrmin {};
+    float                       m_dzdrmax {};
     FloatProperty m_zmin{this, "minZ", -250.};
     FloatProperty m_zmax{this , "maxZ", +250.};
-    float                       m_zminU {}                        ;
-    float                       m_zmaxU  {}                       ;
-    float                       m_zminB  {}                       ;
-    float                       m_zmaxB   {}                      ;
-    float                       m_ftrig    {}                     ;
-    float                       m_ftrigW  {}                      ;
+    float                       m_zminU {};
+    float                       m_zmaxU  {};
+    float                       m_zminB  {};
+    float                       m_zmaxB   {};
+    float                       m_ftrig    {};
+    float                       m_ftrigW  {};
     FloatProperty m_r_rmax{this, "radMax", 1100.};
     FloatProperty m_r_rmin{this, "radMin", 0.};
     FloatProperty m_r_rstep{this, "radStep", 2.};
@@ -178,37 +175,37 @@ namespace InDet {
     FloatProperty m_divermax{this, "maxdImpactForDecays", 20.};
     float                       m_dazmax{0.02};
     FloatProperty m_ptmin{this, "pTmin", 500.};
-    float                       m_ipt    {}                       ;
-    float                       m_ipt2   {}                       ;
-    float                       m_COF    {}                       ;
-    float                       m_K      {}                       ;
-    float                       m_ipt2K   {}                      ;
-    float                       m_ipt2C   {}                      ;
-    float                       m_COFK   {}                       ;
+    float                       m_ipt    {};
+    float                       m_ipt2   {};
+    float                       m_COF    {};
+    float                       m_K      {};
+    float                       m_ipt2K   {};
+    float                       m_ipt2C   {};
+    float                       m_COFK   {};
     FloatProperty m_umax{this, "minSeedsQuality", 0.};
     FloatProperty m_dzmaxPPP{this, "dZmaxForPPPSeeds", 600.};
-    int m_r_size {}                                               ;
-    int m_r_first  {}                                             ;
-    int m_rf_size  {}                                             ;
-    int m_rfz_size {}                                             ;
+    int m_r_size {};
+    int m_r_first  {};
+    int m_rf_size  {};
+    int m_rfz_size {};
     std::list<InDet::SiSpacePointForSeedITK*>* m_r_Sorted{nullptr};
-    std::list<InDet::SiSpacePointForSeedITK*>  m_rfz_Sorted [   583] ;
-    std::list<InDet::SiSpacePointForSeedITK*>  m_rfzv_Sorted[   300] ;
-    std::list<InDet::SiSpacePointForSeedITK*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeedITK*>  m_rfz_Sorted [   583];
+    std::list<InDet::SiSpacePointForSeedITK*>  m_rfzv_Sorted[   300];
+    std::list<InDet::SiSpacePointForSeedITK*>  m_l_spforseed;
     std::list<InDet::SiSpacePointForSeedITK*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeedITK*>::iterator m_rMin  ;
-
-    int m_ns{},m_nsaz{},m_nsazv {}                                    ;
-    int m_fNmax{},m_fvNmax {}                                       ;
-    int m_fNmin{},m_fvNmin  {}                                      ;
-    int m_zMin{}                                                  ;
-    int  m_nr {}    ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
-    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
-    int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300]            ;
-    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
-    int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
-    float m_sF {}                                                 ;
-    float m_sFv {}                                                ;
+    std::list<InDet::SiSpacePointForSeedITK*>::iterator m_rMin;
+
+    int m_ns{},m_nsaz{},m_nsazv {};
+    int m_fNmax{},m_fvNmax {};
+    int m_fNmin{},m_fvNmin  {};
+    int m_zMin{};
+    int  m_nr {}; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583];
+    int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300];
+    int m_rfz_b[583],m_rfz_t[583],m_rfz_ib[583][9],m_rfz_it[583][9];
+    int m_rfzv_n[300],m_rfzv_i[300][6];
+    float m_sF {};
+    float m_sFv {};
 
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
@@ -228,18 +225,18 @@ namespace InDet {
     InDet::SiSpacePointsSeed* m_seedOutput{nullptr};
 
     std::list<InDet::SiSpacePointsProSeedITK*>           m_l_seeds;
-    std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seed ;
-    std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seede ;
+    std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seed;
+    std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seede;
 
-    std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_seeds          ;
-    std::multimap<float,InDet::SiSpacePointsProSeedITK*>::iterator m_seed ;
+    std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_seeds;
+    std::multimap<float,InDet::SiSpacePointsProSeedITK*>::iterator m_seed;
 
     std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_mapOneSeeds;
     InDet::SiSpacePointsProSeedITK*                   m_OneSeeds{nullptr};
     IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 5};
-    int                                               m_nOneSeeds {} ;
+    int                                               m_nOneSeeds {};
     int                                               m_fillOneSeeds{};
-    std::set<float>                                   m_l_vertex     ;
+    std::set<float>                                   m_l_vertex;
     std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>> m_CmSp;
 
     ///////////////////////////////////////////////////////////////////
@@ -261,32 +258,38 @@ namespace InDet {
     PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_ITK() = delete;
+    SiSpacePointsSeedMaker_ITK(const SiSpacePointsSeedMaker_ITK&) = delete;
+    SiSpacePointsSeedMaker_ITK &operator=(const SiSpacePointsSeedMaker_ITK&) = delete;
+    //@}
 
     MsgStream&    dumpConditions(MsgStream   & out) const;
     MsgStream&    dumpEvent     (MsgStream   & out) const;
 
-    void buildFrameWork()                                       ;
-    void buildBeamFrameWork()                                   ;
+    void buildFrameWork();
+    void buildBeamFrameWork();
 
     SiSpacePointForSeedITK* newSpacePoint
-    (const Trk::SpacePoint*const&)                            ;
+    (const Trk::SpacePoint*const&);
     void newSeed
-    (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float)         ;
+    (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float);
 
     void newOneSeed
     (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,
-     SiSpacePointForSeedITK*&,float,float)                       ;
+     SiSpacePointForSeedITK*&,float,float);
 
     void newOneSeedWithCurvaturesComparison
     (SiSpacePointForSeedITK*&,SiSpacePointForSeedITK*&,float);
 
-    void fillSeeds()                                            ;
-    void fillLists     ()                                       ;
-    void erase         ()                                       ;
-    void production2Sp ()                                       ;
-    void production3Sp ()                                       ;
+    void fillSeeds();
+    void fillLists     ();
+    void erase         ();
+    void production2Sp ();
+    void production3Sp ();
     void production3SpSSS
     (std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
      std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
@@ -306,10 +309,10 @@ namespace InDet {
      std::list<InDet::SiSpacePointForSeedITK*>::iterator*,
      int,int,int&);
  
-    bool newVertices(const std::list<Trk::Vertex>&)             ;
-    void findNext()                                             ;
-    bool isZCompatible     (float&,float&,float&)               ;
-    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    bool newVertices(const std::list<Trk::Vertex>&);
+    void findNext();
+    bool isZCompatible     (float&,float&,float&);
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*);
     bool isUsed(const Trk::SpacePoint*);
    
   };
@@ -317,91 +320,6 @@ namespace InDet {
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_ITK&);
   std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_ITK&);
 
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_ITK::next()
-  {
-    if(m_nspoint==3) {
-      do {
-        if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} ++m_i_seed;
-      } 
-      while(!(*m_seed++).second->set3(*m_seedOutput));
-      return(m_seedOutput);
-    }
-    else             {
-      if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
-      (*m_i_seed++)->set2(*m_seedOutput); return(m_seedOutput);
-    }
-    return 0;
-  }
-  
-
-  inline bool SiSpacePointsSeedMaker_ITK::isZCompatible  
-  (float& Zv,float& R,float& T)
-  {
-    if(Zv < m_zminU || Zv > m_zmaxU) return false;
-    if(!m_isvertex) return true;
-
-    std::set<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-
-    float dZmin = fabs((*v)-Zv);
-    for(++v; v!=ve; ++v) {
-      float dZ = fabs((*v)-Zv); if(dZ >= dZmin) break; dZmin=dZ;
-    }
-    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeedITK* SiSpacePointsSeedMaker_ITK::newSpacePoint
-  (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeedITK* sps;
-
-    float r[15]; convertToBeamFrameWork(sp,r);
-
-    if(m_checketa) {
-
-      float z = (fabs(r[2])+m_zmax);
-      float x = r[0]*m_dzdrmin     ;
-      float y = r[1]*m_dzdrmin     ;
-      if((z*z )<(x*x+y*y)) return 0;
-    }
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeedITK(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_ITK::newSeed
-  (SiSpacePointForSeedITK*& p1,SiSpacePointForSeedITK*& p2, float z) 
-  {
-    SiSpacePointForSeedITK* p3 = 0;
-
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsProSeedITK* s = (*m_i_seede++);
-      s->set(p1,p2,p3,z);
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsProSeedITK(p1,p2,p3,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-  
 } // end of name space
 
 ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
index 5367b650a3b5..67b4fc3dcc8f 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
@@ -58,33 +58,31 @@ namespace InDet {
     SiSpacePointsSeedMaker_LowMomentum
     (const std::string&,const std::string&,const IInterface*);
     virtual ~SiSpacePointsSeedMaker_LowMomentum();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
 
-    void newEvent (int);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-    (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD);
        
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
@@ -92,34 +90,25 @@ namespace InDet {
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
  
-    void findVSp (const std::list<Trk::Vertex>&);
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
       
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
       
-    const SiSpacePointsSeed* next();
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump          (MsgStream   & out) const;
-    std::ostream& dump          (std::ostream& out) const;
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
-  protected:
-    
-    
-    /**    @name Disallow default instantiation, copy, assignment */
-    //@{
-    SiSpacePointsSeedMaker_LowMomentum() = delete;
-    SiSpacePointsSeedMaker_LowMomentum(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
-    SiSpacePointsSeedMaker_LowMomentum &operator=(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
-    //@}    
-      
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
       
     ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
@@ -130,9 +119,9 @@ namespace InDet {
     bool m_endlist{true};
     BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
     BooleanProperty m_useassoTool{this, "UseAssociationTool", true};
-    bool                        m_trigger  {}                     ;
-    int                         m_outputlevel  {}                 ;
-    int                         m_nprint {}                       ;
+    bool                        m_trigger  {};
+    int                         m_outputlevel  {};
+    int                         m_nprint {};
     int m_state{0};
     int m_nspoint{2};
     int m_mode{0};
@@ -147,12 +136,12 @@ namespace InDet {
     FloatProperty m_drmin{this, "mindRadius", 10.};
     FloatProperty m_drmax{this, "maxdRadius", 200.};
     FloatProperty m_rapcut{this, "RapidityCut", 2.7};
-    float                       m_dzdrmin  {}                     ;
-    float                       m_dzdrmax  {}                     ;
+    float                       m_dzdrmin  {};
+    float                       m_dzdrmax  {};
     FloatProperty m_zmin{this, "minZ", -250.};
     FloatProperty m_zmax{this, "maxZ", +250.};
-    float                       m_zminU   {}                      ;
-    float                       m_zmaxU   {}                      ;
+    float                       m_zminU   {};
+    float                       m_zmaxU   {};
     FloatProperty m_r_rmax{this, "radMax", 200.};
     FloatProperty m_r_rstep{this, "radStep", 2.};
     FloatProperty m_dzver{this, "maxdZver", 5.};
@@ -162,26 +151,26 @@ namespace InDet {
     float                       m_dazmax{0.02};
     FloatProperty m_ptmin{this, "pTmin", 100.};
     FloatProperty m_ptmax{this, "pTmax", 500.};
-    float                       m_iptmin   {}                     ;
+    float                       m_iptmin   {};
     float                       m_iptmax{1./400.};
 
-    int m_r_size   {}                                               ;
-    int m_rf_size   {}                                              ;
-    int m_rfz_size   {}                                             ;
+    int m_r_size   {};
+    int m_rf_size   {};
+    int m_rfz_size   {};
     std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
-    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [  220]  ;
-    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [  220];
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed;
     std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin;
   
-    int m_ns{},m_nsaz  {}                                           ;
-    int m_fNmax  {}                                               ;
-    int m_fNmin  {}                                               ;
-    int m_zMin  {}                                                ;
-    int  m_nr  {}   ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
-    int  m_nrfz {}  , m_rfz_index  [220], m_rfz_map  [220]            ;
-    int m_rfz_b[220],m_rfz_t[220],m_rfz_ib[220][9],m_rfz_it[220][9]     ;
-    float m_sF {}                                                ;
+    int m_ns{},m_nsaz  {};
+    int m_fNmax  {};
+    int m_fNmin  {};
+    int m_zMin  {};
+    int  m_nr  {}; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [220], m_rfz_map  [220];
+    int m_rfz_b[220],m_rfz_t[220],m_rfz_ib[220][9],m_rfz_it[220][9];
+    float m_sF {};
 
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
@@ -196,15 +185,15 @@ namespace InDet {
     float                *  m_V{nullptr};
     float                *  m_Zo{nullptr};
 
-    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds      ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed       ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede      ;
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede;
 
     std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
     InDet::SiSpacePointsSeed*                       m_OneSeeds{nullptr};
     IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 5};
     int                                             m_nOneSeeds {};
-    std::list<float>                                m_l_vertex  ;
+    std::list<float>                                m_l_vertex;
  
     ///////////////////////////////////////////////////////////////////
     // Beam geometry
@@ -225,167 +214,56 @@ namespace InDet {
     PublicToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_LowMomentum() = delete;
+    SiSpacePointsSeedMaker_LowMomentum(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
+    SiSpacePointsSeedMaker_LowMomentum &operator=(const SiSpacePointsSeedMaker_LowMomentum&) = delete;
+    //@}    
 
     MsgStream&    dumpConditions(MsgStream   & out) const;
     MsgStream&    dumpEvent     (MsgStream   & out) const;
 
-    void buildFrameWork()                                       ;
-    void buildBeamFrameWork()                                   ;
+    void buildFrameWork();
+    void buildBeamFrameWork();
 
     SiSpacePointForSeed* newSpacePoint
-    (const Trk::SpacePoint*const&)                            ;
+    (const Trk::SpacePoint*const&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const float&)                                              ;
+     const float&);
     void newSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&)                      ;
+     const Trk::SpacePoint*&,const float&);
 
     void newOneSeed
     (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-     const Trk::SpacePoint*&,const float&,const float&)         ;
-    void fillSeeds()                                            ;
+     const Trk::SpacePoint*&,const float&,const float&);
+    void fillSeeds();
 
-    void fillLists     ()                                       ;
-    void erase         ()                                       ;
-    void production2Sp ()                                       ;
-    void production3Sp ()                                       ;
+    void fillLists     ();
+    void erase         ();
+    void production2Sp ();
+    void production3Sp ();
     void production3Sp
     (std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
      std::list<InDet::SiSpacePointForSeed*>::iterator*,
-     int,int,int&,float)                                      ;
+     int,int,int&,float);
      
-    bool newVertices(const std::list<Trk::Vertex>&)             ;
-    void findNext()                                             ;
-    bool isZCompatible     (float&,float&,float&)               ;
-    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
+    bool newVertices(const std::list<Trk::Vertex>&);
+    void findNext();
+    bool isZCompatible     (float&,float&,float&);
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*);
     bool isUsed(const Trk::SpacePoint*);
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_LowMomentum&);
   std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_LowMomentum&);
 
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_LowMomentum::next()
-  {
-    if(m_i_seed==m_i_seede) {
-      findNext();
-      if(m_i_seed==m_i_seede) return 0;
-    } 
-    return(*m_i_seed++);
-  }
-
-  inline bool SiSpacePointsSeedMaker_LowMomentum::isZCompatible  
-  (float& Zv,float& R,float& T)
-  {
-    if(Zv < m_zmin || Zv > m_zmax) return false;
-
-    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-    if(v==ve) return true;
-
-    float dZmin = fabs((*v)-Zv); ++v;
-
-    for(; v!=ve; ++v) {
-      float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
-    }
-    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
-  }
-  
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_LowMomentum::newSpacePoint
-  (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3]; convertToBeamFrameWork(sp,r);
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_LowMomentum::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 3 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_LowMomentum::newSeed
-  (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-   const Trk::SpacePoint*& p3,const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->add       (p3);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,p3,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // Fill seeds
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_LowMomentum::fillSeeds ()
-  {
-    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-      l  = m_mapOneSeeds.begin(),
-      le = m_mapOneSeeds.end  ();
-
-    for(; l!=le; ++l) {
-
-      if(m_i_seede!=m_l_seeds.end()) {
-        SiSpacePointsSeed* s = (*m_i_seede++);
-        *s = *(*l).second;
-      }
-      else                  {
-        m_l_seeds.push_back(new SiSpacePointsSeed(*(*l).second));
-        m_i_seede = m_l_seeds.end();
-      }
-    }
-  }
-  
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_LowMomentum_H
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
index f2ce863faa03..59ee46c30ad8 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
@@ -51,36 +51,33 @@ namespace InDet {
     // Standard tool methods
     ///////////////////////////////////////////////////////////////////
 
-    SiSpacePointsSeedMaker_Trigger
-      (const std::string&,const std::string&,const IInterface*);
+    SiSpacePointsSeedMaker_Trigger(const std::string&, const std::string&, const IInterface*);
     virtual ~SiSpacePointsSeedMaker_Trigger();
-    virtual StatusCode               initialize();
-    virtual StatusCode               finalize  ();
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initialize tool for new event or region
     ///////////////////////////////////////////////////////////////////
 
-    void newEvent (int);
-    void newRegion
-      (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&);
-    void newRegion
-      (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&,const IRoiDescriptor&);
+    virtual void newEvent(int iteration);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT);
+    virtual void newRegion(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& ORD);
       
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with two space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find2Sp (const std::list<Trk::Vertex>&);
+    virtual void find2Sp(const std::list<Trk::Vertex>& lv);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
     // with three space points with or without vertex constraint
     ///////////////////////////////////////////////////////////////////
 
-    void find3Sp (const std::list<Trk::Vertex>&);
-    void find3Sp (const std::list<Trk::Vertex>&,const double*);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv);
+    virtual void find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex);
 
     ///////////////////////////////////////////////////////////////////
     // Methods to initilize different strategies of seeds production
@@ -88,32 +85,25 @@ namespace InDet {
     // Variable means (2,3,4,....) any number space points
     ///////////////////////////////////////////////////////////////////
  
-    void findVSp (const std::list<Trk::Vertex>&);
+    virtual void findVSp(const std::list<Trk::Vertex>& lv);
       
     ///////////////////////////////////////////////////////////////////
     // Iterator through seeds pseudo collection produced accordingly
     // methods find    
     ///////////////////////////////////////////////////////////////////
       
-    const SiSpacePointsSeed* next();
+    virtual const SiSpacePointsSeed* next();
       
     ///////////////////////////////////////////////////////////////////
     // Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
 
-    MsgStream&    dump          (MsgStream   & out) const;
-    std::ostream& dump          (std::ostream& out) const;
-
-  protected:
-    /**    @name Disallow default instantiation, copy, assignment */
-    //@{
-    SiSpacePointsSeedMaker_Trigger() = delete;
-    SiSpacePointsSeedMaker_Trigger(const SiSpacePointsSeedMaker_Trigger&) = delete;
-    SiSpacePointsSeedMaker_Trigger &operator=(const SiSpacePointsSeedMaker_Trigger&) = delete;
-    //@}
+    virtual MsgStream&    dump(MsgStream   & out) const;
+    virtual std::ostream& dump(std::ostream& out) const;
 
+  private:
     ///////////////////////////////////////////////////////////////////
-    // Protected data and methods
+    // Private data and methods
     ///////////////////////////////////////////////////////////////////
       
     ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
@@ -124,8 +114,8 @@ namespace InDet {
     bool                        m_endlist{true};
     BooleanProperty m_useOverlap{this, "useOverlapSpCollection", true};
     bool                        m_trigger{false};
-    int                         m_outputlevel {}                  ;
-    int                         m_nprint   {}                     ;
+    int                         m_outputlevel {};
+    int                         m_nprint   {};
     int                         m_state{0};
     int                         m_nspoint{2};
     int                         m_mode{0};
@@ -146,16 +136,16 @@ namespace InDet {
     float m_drminv{20.};
     FloatProperty m_drmax{this, "maxdRadius", 270.};
     FloatProperty m_rapcut{this, "RapidityCut", 2.7};
-    float                       m_dzdrmin {}                      ;
-    float                       m_dzdrmax {}                      ;
+    float                       m_dzdrmin {};
+    float                       m_dzdrmax {};
     FloatProperty m_zmin{this, "minZ", -250.};
     FloatProperty m_zmax{this, "maxZ", +250.};
-    float                       m_zminU {}                        ;
-    float                       m_zmaxU  {}                       ;
-    float                       m_zminB  {}                       ;
-    float                       m_zmaxB  {}                       ;
-    float                       m_ftrig  {}                       ;
-    float                       m_ftrigW {}                       ;
+    float                       m_zminU {};
+    float                       m_zmaxU  {};
+    float                       m_zminB  {};
+    float                       m_zmaxB  {};
+    float                       m_ftrig  {};
+    float                       m_ftrigW {};
     FloatProperty m_r_rmax{this, "radMax", 600.};
     FloatProperty m_r_rstep{this, "radStep", 2.};
     FloatProperty m_dzver{this, "maxdZver", 5.};
@@ -165,31 +155,31 @@ namespace InDet {
     FloatProperty m_diversss{this, "maxdImpactSSS", 1000.};
     float                       m_dazmax{0.02};
     FloatProperty m_ptmin{this, "pTmin", 500.};
-    float                       m_ipt      {}                     ;
-    float                       m_ipt2     {}                     ;
-    float                       m_COF     {}                      ;
-    float                       m_K      {}                       ;
-    int m_r_size {}                                                 ;
-    int m_rf_size   {}                                              ;
-    int m_rfz_size  {}                                              ;
+    float                       m_ipt      {};
+    float                       m_ipt2     {};
+    float                       m_COF     {};
+    float                       m_K      {};
+    int m_r_size {};
+    int m_rf_size   {};
+    int m_rfz_size  {};
     std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted{nullptr};
-    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300] ;
-    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed         ;
+    std::list<InDet::SiSpacePointForSeed*>  m_rfz_Sorted [   583];
+    std::list<InDet::SiSpacePointForSeed*>  m_rfzv_Sorted[   300];
+    std::list<InDet::SiSpacePointForSeed*>  m_l_spforseed;
     std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed;
-    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin     ;
-
-    int m_ns{},m_nsaz{},m_nsazv   {}                                  ;
-    int m_fNmax{},m_fvNmax  {}                                      ;
-    int m_fNmin{},m_fvNmin{}                                        ;
-    int m_zMin  {}                                                ;
-    int  m_nr {}    ; int* m_r_index{nullptr}; int* m_r_map{nullptr};
-    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583]            ;
-    int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300]            ;
-    int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9]     ;
-    int m_rfzv_n[300],m_rfzv_i[300][6]                              ;
-    float m_sF {}                                                 ;
-    float m_sFv  {}                                               ;
+    std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin;
+
+    int m_ns{},m_nsaz{},m_nsazv   {};
+    int m_fNmax{},m_fvNmax  {};
+    int m_fNmin{},m_fvNmin{};
+    int m_zMin  {};
+    int  m_nr {}; int* m_r_index{nullptr}; int* m_r_map{nullptr};
+    int  m_nrfz {}  , m_rfz_index  [583], m_rfz_map  [583];
+    int  m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300];
+    int m_rfz_b[583],m_rfz_t[583],m_rfz_ib[583][9],m_rfz_it[583][9];
+    int m_rfzv_n[300],m_rfzv_i[300][6];
+    float m_sF {};
+    float m_sFv  {};
 
     ///////////////////////////////////////////////////////////////////
     // Tables for 3 space points seeds search
@@ -204,19 +194,19 @@ namespace InDet {
     float               *  m_V{nullptr};
     float               *  m_Er{nullptr};
 
-    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds    ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed     ;
-    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede    ;
+    std::list<InDet::SiSpacePointsSeed*>           m_l_seeds;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed;
+    std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede;
 
     std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds;
-    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapSeeds   ;
+    std::multimap<float,InDet::SiSpacePointsSeed*> m_mapSeeds;
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seed;
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seede;
 
     InDet::SiSpacePointsSeed*                      m_OneSeeds{nullptr};
     IntegerProperty m_maxOneSize{this, "maxSeedsForSpacePoint", 3};
-    int                                            m_nOneSeeds {} ;
-    std::list<float>                               m_l_vertex   ;
+    int                                            m_nOneSeeds {};
+    std::list<float>                               m_l_vertex;
  
     ///////////////////////////////////////////////////////////////////
     // Beam geometry
@@ -234,168 +224,59 @@ namespace InDet {
     SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
 
     ///////////////////////////////////////////////////////////////////
-    // Protected methods
+    // Private methods
     ///////////////////////////////////////////////////////////////////
+    /**    @name Disallow default instantiation, copy, assignment */
+    //@{
+    SiSpacePointsSeedMaker_Trigger() = delete;
+    SiSpacePointsSeedMaker_Trigger(const SiSpacePointsSeedMaker_Trigger&) = delete;
+    SiSpacePointsSeedMaker_Trigger &operator=(const SiSpacePointsSeedMaker_Trigger&) = delete;
+    //@}
 
     MsgStream&    dumpConditions(MsgStream   & out) const;
     MsgStream&    dumpEvent     (MsgStream   & out) const;
 
-    void buildFrameWork()                                       ;
-    void buildBeamFrameWork()                                   ;
+    void buildFrameWork();
+    void buildBeamFrameWork();
 
     SiSpacePointForSeed* newSpacePoint
-      (const Trk::SpacePoint*const&)                            ;
+    (const Trk::SpacePoint*const&);
     void newSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const float&)                                              ;
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const float&);
 
     void newOneSeed
-      (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
-       const Trk::SpacePoint*&,const float&,const float&)         ;
-    void fillSeeds()                                            ;
-
-    void fillLists     ()                                       ;
-    void erase         ()                                       ;
-    void production2Sp ()                                       ;
-    void production3Sp ()                                       ;
+    (const Trk::SpacePoint*&,const Trk::SpacePoint*&,
+     const Trk::SpacePoint*&,const float&,const float&);
+    void fillSeeds();
+
+    void fillLists     ();
+    void erase         ();
+    void production2Sp ();
+    void production3Sp ();
     void production3Sp
-      (std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       int,int,int&);
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&);
     void production3SpTrigger
-      (std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       std::list<InDet::SiSpacePointForSeed*>::iterator*,
-       int,int,int&);
+    (std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     std::list<InDet::SiSpacePointForSeed*>::iterator*,
+     int,int,int&);
  
-    bool newVertices(const std::list<Trk::Vertex>&)             ;
-    void findNext()                                             ;
-    bool isZCompatible     (float&,float&,float&)               ;
-    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*)  ;
-    float dZVertexMin(float&)                                   ;
+    bool newVertices(const std::list<Trk::Vertex>&);
+    void findNext();
+    bool isZCompatible     (float&,float&,float&);
+    void convertToBeamFrameWork(const Trk::SpacePoint*const&,float*);
+    float dZVertexMin(float&);
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeedMaker_Trigger&);
   std::ostream& operator << (std::ostream&,const SiSpacePointsSeedMaker_Trigger&);
 
-  ///////////////////////////////////////////////////////////////////
-  // Inline methods
-  ///////////////////////////////////////////////////////////////////
-
-  inline const SiSpacePointsSeed* SiSpacePointsSeedMaker_Trigger::next()
-  {
-    if(m_i_seed==m_i_seede) {findNext(); if(m_i_seed==m_i_seede) return 0;} 
-    if(m_mode==0 || m_mode==1) return(*m_i_seed++);
-    ++m_i_seed;
-    return (*m_seed++).second;
-  }
-    
-  inline bool SiSpacePointsSeedMaker_Trigger::isZCompatible  
-    (float& Zv,float& R,float& T)
-  {
-    if(Zv < m_zmin || Zv > m_zmax) return false;
-
-    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-    if(v==ve) return true;
-
-    float dZmin = fabs((*v)-Zv); ++v;
-
-    for(; v!=ve; ++v) {
-      float dZ = fabs((*v)-Zv); if(dZ<dZmin) dZmin=dZ;
-    }
-    return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
-  }
-
-  inline float SiSpacePointsSeedMaker_Trigger::dZVertexMin(float& Z)
-  {
-    std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
-    if(v==ve) return 0.;
-
-    float dZm = 1.E10;
-    for(; v!=ve; ++v) {float dZ = fabs((*v)-Z); if(dZ<dZm) dZm = dZ;}
-    return dZm;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New space point for seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline SiSpacePointForSeed* SiSpacePointsSeedMaker_Trigger::newSpacePoint
-    (const Trk::SpacePoint*const& sp) 
-  {
-    SiSpacePointForSeed* sps;
-
-    float r[3]; convertToBeamFrameWork(sp,r);
-
-    if(m_i_spforseed!=m_l_spforseed.end()) {
-      sps = (*m_i_spforseed++); sps->set(sp,r);
-    }
-    else                               {
-      m_l_spforseed.push_back((sps=new SiSpacePointForSeed(sp,r)));
-      m_i_spforseed = m_l_spforseed.end();
-    }
-      
-    return sps;
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // New 2 space points seeds 
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_Trigger::newSeed
-    (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
-     const float& z) 
-  {
-    if(m_i_seede!=m_l_seeds.end()) {
-      SiSpacePointsSeed* s = (*m_i_seede++);
-      s->erase     (  );
-      s->add       (p1);
-      s->add       (p2);
-      s->setZVertex(double(z));
-    }
-    else                  {
-      m_l_seeds.push_back(new SiSpacePointsSeed(p1,p2,z));
-      m_i_seede = m_l_seeds.end();
-    }
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  // Fill seeds
-  ///////////////////////////////////////////////////////////////////
-
-  inline void SiSpacePointsSeedMaker_Trigger::fillSeeds ()
-  {
-    std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
-      l  = m_mapOneSeeds.begin(),
-      le = m_mapOneSeeds.end  ();
-
-    for(; l!=le; ++l) {
-
-      float                     q  = (*l).first;
-      InDet::SiSpacePointsSeed* s0 = (*l).second;
-
-      if((*s0->spacePoints().rbegin())->clusterList().second) {
-        (*s0->spacePoints().begin())->clusterList().second ? q+=1000. : q+=10000.;
-      }
-
-      if(m_i_seede!=m_l_seeds.end()) {
-        InDet::SiSpacePointsSeed* s = (*m_i_seede++);
-        *s = *s0;
-        m_mapSeeds.insert(std::make_pair(q,s));
-      }
-      else                  {
-
-        InDet::SiSpacePointsSeed* s = new InDet::SiSpacePointsSeed(*s0);
-        m_l_seeds.push_back(s);
-        m_i_seede = m_l_seeds.end();
-        m_mapSeeds.insert(std::make_pair(q,s));
-      }
-    }
-  }
-  
 } // end of name space
 
 #endif // SiSpacePointsSeedMaker_Trigger_H
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeed.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeed.cxx
new file mode 100644
index 000000000000..4317758532ec
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeed.cxx
@@ -0,0 +1,165 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+
+#include "InDetPrepRawData/SiCluster.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkSpacePoint/SpacePoint.h"
+#include "TrkSurfaces/Surface.h"
+
+namespace InDet {
+
+  SiSpacePointForSeed::SiSpacePointForSeed ()
+  {
+    spacepoint = 0;
+    m_x     = 0.;
+    m_y     = 0.;
+    m_z     = 0.;
+    m_r     = 0.;
+    m_covr  = 0.;
+    m_covz  = 0.;
+    m_param = 0.;
+    m_q     = 0.;
+    m_su    = 0 ;
+    m_sn    = 0 ;
+  }
+
+  SiSpacePointForSeed& SiSpacePointForSeed::operator = 
+  (const SiSpacePointForSeed& sp) 
+  {
+    if(&sp!=this) {
+      spacepoint  = sp.spacepoint;
+      m_x         = sp.m_x       ;
+      m_y         = sp.m_y       ;
+      m_z         = sp.m_z       ;
+      m_r         = sp.m_r       ;
+      m_covr      = sp.m_covr    ;
+      m_covz      = sp.m_covz    ;
+      m_q         = sp.m_q       ;
+      m_su        = sp.m_su      ;
+      m_sn        = sp.m_sn      ;        
+    }
+    return(*this);
+  }
+ 
+  SiSpacePointForSeed::SiSpacePointForSeed
+  (const Trk::SpacePoint*const& sp,const float* r) 
+  {
+    set(sp,r); m_param = 0.;
+  }
+
+  SiSpacePointForSeed::SiSpacePointForSeed
+  (const Trk::SpacePoint*const& sp,const float* r,const float* sc) 
+  {
+    set(sp,r,sc); m_param = 0.;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Copy constructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointForSeed::SiSpacePointForSeed (const SiSpacePointForSeed& sp)
+  {
+    *this = sp;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Destructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointForSeed::~SiSpacePointForSeed() 
+  {
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointForSeed::set
+  (const Trk::SpacePoint*const& sp,const float* r)
+  {
+    spacepoint = sp  ;
+    m_x        = r[0];
+    m_y        = r[1];
+    m_z        = r[2];
+    m_r        =sqrt(m_x*m_x+m_y*m_y);
+    m_q        = 100000.;
+
+    const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
+    const InDetDD::SiDetectorElement* de = c ->detectorElement();
+
+    if( de->isPixel() ) {
+      
+      const Amg::MatrixX& v =  c->localCovariance();
+      float f22 = float(v(1,1) );
+      float wid = float(c->width().z());
+      float cov = wid*wid*.08333; if(cov < f22) cov = f22;
+      if(de->isBarrel()) {m_covz = 9.*cov; m_covr = .06;}
+      else               {m_covr = 9.*cov; m_covz = .06;}
+      m_sn = 0;
+    }
+    else                {
+
+      const Amg::MatrixX& v = sp->localCovariance();
+      float f22 = float(v(1,1));
+      if(de->isBarrel()) {m_covz = 8.*f22; m_covr = .1;} 
+      else               {m_covr = 8.*f22; m_covz = .1;} 
+      m_sn =  &sp->clusterList().second->detectorElement()->surface();
+    }
+    m_su = &sp->clusterList().first->detectorElement()->surface();
+  } 
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set with error correction 
+  // sc[0] - barrel pixels error correction
+  // sc[1] - endcap pixels 
+  // sc[2] - barrel sct
+  // sc[3] - endcap sct 
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointForSeed::set
+  (const Trk::SpacePoint*const& sp,const float* r,const float* sc)
+  {
+    spacepoint = sp  ;
+    m_x        = r[0];
+    m_y        = r[1];
+    m_z        = r[2];
+    m_r        =sqrt(m_x*m_x+m_y*m_y);
+    m_q        = 100000.;
+
+    const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
+    const InDetDD::SiDetectorElement* de = c ->detectorElement();
+
+    if( de->isPixel() ) {
+      
+      const Amg::MatrixX& v =  c->localCovariance();
+      float f22 = float(v(1,1));
+      float wid = float(c->width().z());
+      float cov = wid*wid*.08333; if(cov < f22) cov = f22;
+      if(de->isBarrel()) {m_covz = 9.*cov*sc[0]; m_covr = .06;}
+      else               {m_covr = 9.*cov*sc[1]; m_covz = .06;}
+      m_sn = 0;
+    }
+    else                {
+
+      const Amg::MatrixX& v = sp->localCovariance();
+      float f22 = float(v(1,1));
+      if(de->isBarrel()) {m_covz = 8.*f22*sc[2]; m_covr = .1;} 
+      else               {m_covr = 8.*f22*sc[3]; m_covz = .1;} 
+      m_sn =  &sp->clusterList().second->detectorElement()->surface();
+    }
+    m_su = &sp->clusterList().first->detectorElement()->surface();
+  }
+
+  void SiSpacePointForSeed::setParam(const float& p)
+  {
+    m_param = p;
+  }
+  void  SiSpacePointForSeed::setQuality(float q)
+  {
+    if(q <= m_q) m_q = q;
+  }
+ 
+} // end of name space
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeedITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeedITK.cxx
new file mode 100644
index 000000000000..f27f5874f64f
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointForSeedITK.cxx
@@ -0,0 +1,198 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h"
+
+#include "InDetPrepRawData/SiCluster.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkSpacePoint/SpacePoint.h"
+#include "TrkSurfaces/Surface.h"
+
+namespace InDet {
+
+  SiSpacePointForSeedITK::SiSpacePointForSeedITK ()
+  {
+    spacepoint = 0;
+    m_x     = 0.;
+    m_y     = 0.;
+    m_z     = 0.;
+    m_r     = 0.;
+    m_covr  = 0.;
+    m_covz  = 0.;
+    m_param = 0.;
+    m_q     = 0.;
+    m_su    = 0 ;
+    m_sn    = 0 ;
+    for(int i=0; i!=3; ++i) {m_b0[i]=0.; m_b1[i]=0.; m_dr[i]=0.; m_r0[i]=0.;}
+  }
+
+  SiSpacePointForSeedITK& SiSpacePointForSeedITK::operator = 
+  (const SiSpacePointForSeedITK& sp) 
+  {
+    if(&sp!=this) {
+      spacepoint  = sp.spacepoint;
+      m_x         = sp.m_x       ;
+      m_y         = sp.m_y       ;
+      m_z         = sp.m_z       ;
+      m_r         = sp.m_r       ;
+      m_covr      = sp.m_covr    ;
+      m_covz      = sp.m_covz    ;
+      m_q         = sp.m_q       ;
+      m_su        = sp.m_su      ;
+      m_sn        = sp.m_sn      ;        
+      for(int i=0; i!=3; ++i) m_b0[i]=sp.m_b0[i];
+      for(int i=0; i!=3; ++i) m_b1[i]=sp.m_b1[i];
+      for(int i=0; i!=3; ++i) m_dr[i]=sp.m_dr[i];
+      for(int i=0; i!=3; ++i) m_r0[i]=sp.m_r0[i];
+    }
+    return(*this);
+  }
+ 
+  SiSpacePointForSeedITK::SiSpacePointForSeedITK
+  (const Trk::SpacePoint*const& sp,const float* r) 
+  {
+    set(sp,r); m_param = 0.;
+  }
+
+  SiSpacePointForSeedITK::SiSpacePointForSeedITK
+  (const Trk::SpacePoint*const& sp,const float* r,const float* sc) 
+  {
+    set(sp,r,sc); m_param = 0.;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Copy constructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointForSeedITK::SiSpacePointForSeedITK (const SiSpacePointForSeedITK& sp)
+  {
+    *this = sp;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Destructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointForSeedITK::~SiSpacePointForSeedITK() 
+  {
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointForSeedITK::set
+  (const Trk::SpacePoint*const& sp,const float* r)
+  {
+    spacepoint = sp  ;
+    m_x        = r[0];
+    m_y        = r[1];
+    m_z        = r[2];
+    m_r        =sqrt(m_x*m_x+m_y*m_y);
+    m_q        = 100000.;
+
+    const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
+    const InDetDD::SiDetectorElement* de = c ->detectorElement();
+
+    if( de->isPixel() ) {
+      
+      const Amg::MatrixX& v =  c->localCovariance();
+      float f22 = float(v(1,1) );
+      float wid = float(c->width().z());
+      float cov = wid*wid*.08333; if(cov < f22) cov = f22;
+      if(de->isBarrel()) {m_covz = 9.*cov; m_covr = .06;}
+      else               {m_covr = 9.*cov; m_covz = .06;}
+      m_sn = 0;
+    }
+    else                {
+
+      const Amg::MatrixX& v = sp->localCovariance();
+      float f22 = float(v(1,1));
+      if(de->isBarrel()) {m_covz = 8.*f22; m_covr = .1;} 
+      else               {m_covr = 8.*f22; m_covz = .1;} 
+      m_sn =  &sp->clusterList().second->detectorElement()->surface();
+
+      for(int i=0; i!=3; ++i) {m_b0[i]=r[3 +i]; m_b1[i]=r[6 +i]; m_dr[i]=r[9 +i]; m_r0[i]=r[12+i];}
+	
+    }
+    m_su = &sp->clusterList().first->detectorElement()->surface();
+  } 
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set with error correction 
+  // sc[0] - barrel pixels error correction
+  // sc[1] - endcap pixels 
+  // sc[2] - barrel sct
+  // sc[3] - endcap sct 
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointForSeedITK::set
+  (const Trk::SpacePoint*const& sp,const float* r,const float* sc)
+  {
+    spacepoint = sp  ;
+    m_x        = r[0];
+    m_y        = r[1];
+    m_z        = r[2];
+    m_r        =sqrt(m_x*m_x+m_y*m_y);
+    m_q        = 100000.;
+
+    const InDet::SiCluster*           c  = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
+    const InDetDD::SiDetectorElement* de = c ->detectorElement();
+
+    if( de->isPixel() ) {
+      
+      const Amg::MatrixX& v =  c->localCovariance();
+      float f22 = float(v(1,1));
+      float wid = float(c->width().z());
+      float cov = wid*wid*.08333; if(cov < f22) cov = f22;
+      if(de->isBarrel()) {m_covz = 9.*cov*sc[0]; m_covr = .06;}
+      else               {m_covr = 9.*cov*sc[1]; m_covz = .06;}
+      m_sn = 0;
+    }
+    else                {
+
+      const Amg::MatrixX& v = sp->localCovariance();
+      float f22 = float(v(1,1));
+      if(de->isBarrel()) {m_covz = 8.*f22*sc[2]; m_covr = .1;} 
+      else               {m_covr = 8.*f22*sc[3]; m_covz = .1;} 
+      m_sn =  &sp->clusterList().second->detectorElement()->surface();
+
+      for(int i=0; i!=3; ++i) {m_b0[i]=r[3 +i]; m_b1[i]=r[6 +i]; m_dr[i]=r[9 +i]; m_r0[i]=r[12+i];}
+    }
+    m_su = &sp->clusterList().first->detectorElement()->surface();
+  }
+
+  void SiSpacePointForSeedITK::setParam(const float& p)
+  {
+    m_param = p;
+  }
+  void  SiSpacePointForSeedITK::setQuality(float q)
+  {
+    if(q <= m_q) m_q = q;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Coordinate of cross points two SCT strip calculation for given direction
+  // d - input direction
+  // r - output coordinates
+  // true if cross point is inside detector elements 
+  /////////////////////////////////////////////////////////////////////////////////
+
+  bool SiSpacePointForSeedITK::coordinates(float* d,float* r)
+  {
+    float d0[3] = {m_b1[1]*d[2]-m_b1[2]*d[1],m_b1[2]*d[0]-m_b1[0]*d[2],m_b1[0]*d[1]-m_b1[1]*d[0]};
+    float bd0   =  m_b0[0]*d0[0]+m_b0[1]*d0[1]+m_b0[2]*d0[2];       if(     bd0==0.          ) return false;
+    float s0    =-(m_dr[0]*d0[0]+m_dr[1]*d0[1]+m_dr[2]*d0[2])/bd0;  if(s0 < -.05 || s0 > 1.05) return false;
+
+    float d1[3] = {m_b0[1]*d[2]-m_b0[2]*d[1],m_b0[2]*d[0]-m_b0[0]*d[2],m_b0[0]*d[1]-m_b0[1]*d[0]};
+    float bd1   =  m_b1[0]*d1[0]+m_b1[1]*d1[1]+m_b1[2]*d1[2];       if(       bd1==0.        ) return false;
+    float s1    = (m_dr[0]*d1[0]+m_dr[1]*d1[1]+m_dr[2]*d1[2])/bd1;  if(s1 < -.05 || s1 > 1.05) return false;
+      
+    r[0] = m_r0[0]+m_b0[0]*s0;
+    r[1] = m_r0[1]+m_b0[1]*s0;
+    r[2] = m_r0[2]+m_b0[2]*s0;
+    return true;
+  }
+
+} // end of name space
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeed.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeed.cxx
new file mode 100644
index 000000000000..cb616f3a55c3
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeed.cxx
@@ -0,0 +1,127 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h"
+
+#include "SiSpacePointsSeed/SiSpacePointsSeed.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h"
+
+namespace InDet {
+  SiSpacePointsProSeed::SiSpacePointsProSeed ()
+  {
+    m_s0 = 0 ;
+    m_s1 = 0 ;
+    m_s2 = 0 ;
+    m_z  = 0.;
+    m_q  = 0.;
+  }
+
+  SiSpacePointsProSeed& SiSpacePointsProSeed::operator = 
+  (const SiSpacePointsProSeed& sp) 
+  {
+    if(&sp!=this) {
+
+      m_z   = sp.m_z ;
+      m_q   = sp.m_q ;
+      m_s0  = sp.m_s0;
+      m_s1  = sp.m_s1;
+      m_s2  = sp.m_s2;
+    }
+    return(*this);
+  }
+ 
+  SiSpacePointsProSeed::SiSpacePointsProSeed
+  (SiSpacePointForSeed*& s0,SiSpacePointForSeed*& s1,SiSpacePointForSeed*& s2,float z)
+  {
+    set(s0,s1,s2,z); m_q = 0.;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Copy constructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointsProSeed::SiSpacePointsProSeed (const SiSpacePointsProSeed& sp): m_s0(sp.m_s0),m_s1(sp.m_s1),m_s2(sp.m_s2)
+  {
+    *this = sp;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Destructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointsProSeed::~SiSpacePointsProSeed() 
+  {
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set 
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointsProSeed::set
+  (SiSpacePointForSeed*& s0,SiSpacePointForSeed*& s1,SiSpacePointForSeed*& s2,float z)
+  {
+    m_z   = z ;
+    m_s0  = s0;
+    m_s1  = s1;
+    m_s2  = s2;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set two space points seed
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointsProSeed::set2(InDet::SiSpacePointsSeed& s)
+  {
+    s.erase();
+    s.add(m_s0->spacepoint);
+    s.add(m_s1->spacepoint);
+    s.setZVertex(double(m_z));
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set three space points seed
+  /////////////////////////////////////////////////////////////////////////////////
+
+  bool SiSpacePointsProSeed::set3(InDet::SiSpacePointsSeed& s)
+  {
+      
+    bool pixb = !m_s0->spacepoint->clusterList().second;
+    bool pixt = !m_s2->spacepoint->clusterList().second;
+      
+    if(pixb!=pixt) {
+      if(m_q > m_s0->quality() && m_q > m_s1->quality() && m_q > m_s2->quality()) return false;
+    }
+     
+    m_s0->setQuality(m_q);
+    m_s1->setQuality(m_q);
+    m_s2->setQuality(m_q);
+      
+    s.erase();
+    s.add(m_s0->spacepoint);
+    s.add(m_s1->spacepoint);
+    s.add(m_s2->spacepoint);
+    s.setZVertex(double(m_z)); 
+    return true;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set quality in pro seed
+  /////////////////////////////////////////////////////////////////////////////////
+
+  bool SiSpacePointsProSeed::setQuality(float q)
+  {
+    m_q = q;
+    bool pixb = !m_s0->spacepoint->clusterList().second;
+    bool pixt = !m_s2->spacepoint->clusterList().second;
+    if(pixb==pixt) {
+      m_s0->setQuality(q);
+      m_s1->setQuality(q);
+      m_s2->setQuality(q);
+      return true;
+    }
+    if(q < m_s0->quality() || q < m_s1->quality() || q < m_s2->quality()) return true;
+    return false;
+  }
+
+} // end of name space
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeedITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeedITK.cxx
new file mode 100644
index 000000000000..99167a6f1773
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsProSeedITK.cxx
@@ -0,0 +1,127 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h"
+
+#include "SiSpacePointsSeed/SiSpacePointsSeed.h"
+#include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h"
+
+namespace InDet {
+  SiSpacePointsProSeedITK::SiSpacePointsProSeedITK ()
+    {
+      m_s0 = 0 ;
+      m_s1 = 0 ;
+      m_s2 = 0 ;
+      m_z  = 0.;
+      m_q  = 0.;
+    }
+
+  SiSpacePointsProSeedITK& SiSpacePointsProSeedITK::operator = 
+    (const SiSpacePointsProSeedITK& sp) 
+    {
+      if(&sp!=this) {
+
+	m_z   = sp.m_z ;
+	m_q   = sp.m_q ;
+	m_s0  = sp.m_s0;
+	m_s1  = sp.m_s1;
+	m_s2  = sp.m_s2;
+      }
+      return(*this);
+    }
+ 
+  SiSpacePointsProSeedITK::SiSpacePointsProSeedITK
+    (SiSpacePointForSeedITK*& s0,SiSpacePointForSeedITK*& s1,SiSpacePointForSeedITK*& s2,float z)
+    {
+      set(s0,s1,s2,z); m_q = 0.;
+    }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Copy constructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointsProSeedITK::SiSpacePointsProSeedITK (const SiSpacePointsProSeedITK& sp): m_s0(sp.m_s0),m_s1(sp.m_s1),m_s2(sp.m_s2)
+    {
+      *this = sp;
+    }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Destructor
+  /////////////////////////////////////////////////////////////////////////////////
+
+  SiSpacePointsProSeedITK::~SiSpacePointsProSeedITK() 
+  {
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set 
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointsProSeedITK::set
+    (SiSpacePointForSeedITK*& s0,SiSpacePointForSeedITK*& s1,SiSpacePointForSeedITK*& s2,float z)
+    {
+      m_z   = z ;
+      m_s0  = s0;
+      m_s1  = s1;
+      m_s2  = s2;
+    }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set two space points seed
+  /////////////////////////////////////////////////////////////////////////////////
+
+  void SiSpacePointsProSeedITK::set2(InDet::SiSpacePointsSeed& s)
+    {
+      s.erase();
+      s.add(m_s0->spacepoint);
+      s.add(m_s1->spacepoint);
+      s.setZVertex(double(m_z));
+    }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set three space points seed
+  /////////////////////////////////////////////////////////////////////////////////
+
+  bool SiSpacePointsProSeedITK::set3(InDet::SiSpacePointsSeed& s)
+    {
+      
+      bool pixb = !m_s0->spacepoint->clusterList().second;
+      bool pixt = !m_s2->spacepoint->clusterList().second;
+      
+      if(pixb!=pixt) {
+	if(m_q > m_s0->quality() && m_q > m_s1->quality() && m_q > m_s2->quality()) return false;
+      }
+     
+      m_s0->setQuality(m_q);
+      m_s1->setQuality(m_q);
+      m_s2->setQuality(m_q);
+      
+      s.erase();
+      s.add(m_s0->spacepoint);
+      s.add(m_s1->spacepoint);
+      s.add(m_s2->spacepoint);
+      s.setZVertex(double(m_z)); 
+      return true;
+    }
+
+  /////////////////////////////////////////////////////////////////////////////////
+  // Set quality in pro seed
+  /////////////////////////////////////////////////////////////////////////////////
+
+  bool SiSpacePointsProSeedITK::setQuality(float q)
+    {
+      m_q = q;
+      bool pixb = !m_s0->spacepoint->clusterList().second;
+      bool pixt = !m_s2->spacepoint->clusterList().second;
+      if(pixb==pixt) {
+	m_s0->setQuality(q);
+	m_s1->setQuality(q);
+	m_s2->setQuality(q);
+	return true;
+      }
+      if(q < m_s0->quality() || q < m_s1->quality() || q < m_s2->quality()) return true;
+      return false;
+    }
+
+} // end of name space
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
index b3d8fee00eb1..c97d507a972b 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
@@ -15,6 +15,9 @@
 
 #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h"
 
+#include "InDetPrepRawData/SiCluster.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+
 #include <iomanip>
 #include <ostream>
 
@@ -26,9 +29,7 @@ InDet::SiSpacePointsSeedMaker_ATLxk::SiSpacePointsSeedMaker_ATLxk
 (const std::string& t,const std::string& n,const IInterface* p)
   : AthAlgTool(t,n,p)
 {
-
   declareInterface<ISiSpacePointsSeedMaker>(this);
-
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -245,7 +246,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(int iteration)
           InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
           if (!sps) continue;
 
-          int   ir = static_cast<int>(sps->radius()*irstep);
+          int ir = static_cast<int>(sps->radius()*irstep);
           if (ir>irmax) ir = irmax;
           m_r_Sorted[ir].push_back(sps);
           ++m_r_map[ir];
@@ -371,19 +372,18 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
     if (spacepointsSCT.isValid()) {
-
       SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
       for (const IdentifierHash& l: vSCT) {
-        SpacePointContainer::const_iterator  w = spacepointsSCT->indexFind(l);
+        SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
         if (w==spce) continue;
         for (const Trk::SpacePoint* sp: **w) {
           float r = sp->r();
           if (r > m_r_rmax) continue;
-          InDet::SiSpacePointForSeed* sps = newSpacePoint(sp); 
-          int   ir = static_cast<int>(sps->radius()*irstep);
+          InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+          int ir = static_cast<int>(sps->radius()*irstep);
           if (ir>irmax) ir = irmax;
           m_r_Sorted[ir].push_back(sps);
           ++m_r_map[ir];
@@ -401,21 +401,22 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion
-(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT,const IRoiDescriptor& IRD)
+(const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD)
 {
+  constexpr float pi2 = 2.*M_PI;
   newRegion(vPixel,vSCT);
   m_trigger = true;
 
   double dzdrmin = 1./tan(2.*atan(exp(-IRD.etaMinus())));
   double dzdrmax = 1./tan(2.*atan(exp(-IRD.etaPlus ())));
  
-  m_zminB        = IRD.zedMinus()-m_zbeam[0];    // min bottom Z
-  m_zmaxB        = IRD.zedPlus ()-m_zbeam[0];    // max bottom Z
+  m_zminB        = IRD.zedMinus()-m_zbeam[0]; // min bottom Z
+  m_zmaxB        = IRD.zedPlus ()-m_zbeam[0]; // max bottom Z
   m_zminU        = m_zminB+550.*dzdrmin;
   m_zmaxU        = m_zmaxB+550.*dzdrmax;
   double fmax    = IRD.phiPlus ();
   double fmin    = IRD.phiMinus();
-  if (fmin > fmax) fmin-=(2.*M_PI);
+  if (fmin > fmax) fmin -= pi2;
   m_ftrig        = (fmin+fmax)*.5;
   m_ftrigW       = (fmax-fmin)*.5;
 }
@@ -495,7 +496,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const std::list<Trk::Vertex>&
 // with three space points with or without vertex constraint
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const std::list<Trk::Vertex>& lv,const double* ZVertex) 
+void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const std::list<Trk::Vertex>& lv, const double* ZVertex) 
 {
   m_zminU     = ZVertex[0];
   if (m_zminU < m_zmin) m_zminU = m_zmin;
@@ -539,7 +540,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::findVSp (const std::list<Trk::Vertex>&
   m_zmaxU     = m_zmax;
 
   int mode;
-  lv.begin()!=lv.end() ? mode = 6 : mode = 5; 
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   bool newv = newVertices(lv);
   
   if (newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
@@ -568,7 +569,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::findVSp (const std::list<Trk::Vertex>&
 // Dumps relevant information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dump( MsgStream& out ) const
+MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dump(MsgStream& out) const
 {
   if (m_nprint) return dumpEvent(out);
   return dumpConditions(out);
@@ -578,7 +579,7 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dump( MsgStream& out ) const
 // Dumps conditions information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions( MsgStream& out ) const
+MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions(MsgStream& out) const
 {
   int n = 42-m_spacepointsPixel.key().size();
   std::string s2;
@@ -599,124 +600,124 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions( MsgStream& out )
 
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(4)<<m_r1max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ    impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ/dR impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzdrver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact pps    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diverpps
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact sss    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diversss
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Beam X center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Y center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Z center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam X-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Y-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Z-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -724,25 +725,24 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions( MsgStream& out )
 // Dumps event information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpEvent( MsgStream& out ) const
+MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpEvent(MsgStream& out) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsazv                 | "
      <<std::setw(12)<<m_nsazv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -750,7 +750,7 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpEvent( MsgStream& out ) cons
 // Dumps relevant information into the ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::SiSpacePointsSeedMaker_ATLxk::dump( std::ostream& out ) const
+std::ostream& InDet::SiSpacePointsSeedMaker_ATLxk::dump(std::ostream& out) const
 {
   return out;
 }
@@ -760,7 +760,7 @@ std::ostream& InDet::SiSpacePointsSeedMaker_ATLxk::dump( std::ostream& out ) con
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_ATLxk& se)
+(MsgStream& sl, const InDet::SiSpacePointsSeedMaker_ATLxk& se)
 { 
   return se.dump(sl);
 }
@@ -770,7 +770,7 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_ATLxk& se)
+(std::ostream& sl, const InDet::SiSpacePointsSeedMaker_ATLxk& se)
 { 
   return se.dump(sl);
 }   
@@ -779,7 +779,7 @@ std::ostream& InDet::operator <<
 // Find next set space points
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiSpacePointsSeedMaker_ATLxk::findNext () 
+void InDet::SiSpacePointsSeedMaker_ATLxk::findNext() 
 {
   if (m_endlist) return;
 
@@ -871,10 +871,10 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::buildFrameWork()
 
   // Build radius-azimuthal sorted containers
   //
-  const float pi2     = 2.*M_PI            ;
-  const int   NFmax    = 53                ;
-  const float sFmax   = static_cast<float>(NFmax )/pi2;
-  const float sFmin = 100./60.          ;
+  constexpr float pi2 = 2.*M_PI;
+  const int   NFmax = 53;
+  const float sFmax = static_cast<float>(NFmax)/pi2;
+  const float sFmin = 100./60.;
 
   float ptm = 400.;
   if (!m_dbm && m_ptmin < ptm) ptm = m_ptmin;
@@ -1069,7 +1069,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::buildBeamFrameWork()
 ///////////////////////////////////////////////////////////////////
 
 void  InDet::SiSpacePointsSeedMaker_ATLxk::convertToBeamFrameWork
-(const Trk::SpacePoint*const& sp,float* r) const
+(const Trk::SpacePoint*const& sp, float* r) const
 {
   
   r[0] = static_cast<float>(sp->globalPosition().x())-m_xbeam[0];
@@ -1083,8 +1083,8 @@ void  InDet::SiSpacePointsSeedMaker_ATLxk::convertToBeamFrameWork
 
 void InDet::SiSpacePointsSeedMaker_ATLxk::fillLists() 
 {
-  const float pi2 = 2.*M_PI;
-  std::list<InDet::SiSpacePointForSeed*>::iterator r,re;
+  constexpr float pi2 = 2.*M_PI;
+  std::list<InDet::SiSpacePointForSeed*>::iterator r, re;
 
   int  ir0 =     0;
   bool ibl = false;
@@ -1567,7 +1567,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger
     m_endlist = true;
   }
 
-  const float pi = M_PI, pi2 = 2.*pi;
+  constexpr float pi2 = 2.*M_PI;
 
   float ipt2K = m_ipt2K   ;
   float ipt2C = m_ipt2C   ;
@@ -1722,7 +1722,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger
         float y  = 1.;
         float x  = 2.*B*R-A;
         float df = fabs(atan2(ay*y-ax*x,ax*y+ay*x)-m_ftrig);
-        if (df > pi      ) df=pi2-df;
+        if (df > M_PI) df = pi2-df;
         if (df > m_ftrigW) continue;
         m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t]));
         m_SP[t]->setParam(Im);
@@ -1748,7 +1748,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger
 
 void InDet::SiSpacePointsSeedMaker_ATLxk::newOneSeed
 (InDet::SiSpacePointForSeed*& p1, InDet::SiSpacePointForSeed*& p2,
- InDet::SiSpacePointForSeed*& p3,float z,float q)
+ InDet::SiSpacePointForSeed*& p3, float z, float q)
 {
   if (m_nOneSeeds < m_maxOneSize) {
 
@@ -1851,7 +1851,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newOneSeedWithCurvaturesComparison
 // Fill seeds
 ///////////////////////////////////////////////////////////////////
 
-void InDet::SiSpacePointsSeedMaker_ATLxk::fillSeeds ()
+void InDet::SiSpacePointsSeedMaker_ATLxk::fillSeeds()
 {
   m_fillOneSeeds = 0;
 
@@ -1888,3 +1888,89 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::fillSeeds ()
     ++m_fillOneSeeds;
   }
 }
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_ATLxk::next()
+{
+  if (m_nspoint==3) {
+    do {
+      if (m_i_seed==m_i_seede) {
+        findNext();
+        if (m_i_seed==m_i_seede) return nullptr;
+      }
+      ++m_i_seed;
+    } while (!(*m_seed++).second->set3(*m_seedOutput));
+    return m_seedOutput;
+  } else {
+    if (m_i_seed==m_i_seede) {
+      findNext();
+      if (m_i_seed==m_i_seede) return nullptr;
+    } 
+    (*m_i_seed++)->set2(*m_seedOutput);
+    return m_seedOutput;
+  }
+  return nullptr;
+}
+
+bool InDet::SiSpacePointsSeedMaker_ATLxk::isZCompatible  
+(float& Zv, float& R, float& T) const
+{
+  if (Zv < m_zminU or Zv > m_zmaxU) return false;
+  if (not m_isvertex) return true;
+
+  float dZmin = std::numeric_limits<float>::max();
+  for (const float& v: m_l_vertex) {
+    float dZ = fabs(v-Zv);
+    if (dZ >= dZmin) break;
+    dZmin = dZ;
+  }
+  return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+}
+
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_ATLxk::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3];
+  convertToBeamFrameWork(sp, r);
+
+  if (m_checketa) {
+    float z = (fabs(r[2])+m_zmax);
+    float x = r[0]*m_dzdrmin;
+    float y = r[1]*m_dzdrmin;
+    if ((z*z )<(x*x+y*y)) return sps;
+  }
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp,r);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_ATLxk::newSeed
+(InDet::SiSpacePointForSeed*& p1, InDet::SiSpacePointForSeed*& p2, float z) 
+{
+  InDet::SiSpacePointForSeed* p3 = nullptr;
+
+  if (m_i_seede!=m_l_seeds.end()) {
+    SiSpacePointsProSeed* s = (*m_i_seede++);
+    s->set(p1, p2, p3, z);
+  } else {
+    m_l_seeds.push_back(new SiSpacePointsProSeed(p1, p2, p3, z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
index 0b02bb08a9e4..c2584d7a7d9b 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
@@ -36,31 +36,30 @@ InDet::SiSpacePointsSeedMaker_BeamGas::SiSpacePointsSeedMaker_BeamGas
 
 InDet::SiSpacePointsSeedMaker_BeamGas::~SiSpacePointsSeedMaker_BeamGas()
 {
-  if(m_r_index ) delete [] m_r_index ;
-  if(m_r_map   ) delete [] m_r_map   ; 
-  if(m_r_Sorted) delete [] m_r_Sorted;
+  delete [] m_r_index ;
+  delete [] m_r_map   ; 
+  delete [] m_r_Sorted;
 
   // Delete seeds
   //
-  for(m_i_seed=m_l_seeds.begin(); m_i_seed!=m_l_seeds.end (); ++m_i_seed) {
-    delete *m_i_seed;
+  for (InDet::SiSpacePointsSeed* seed: m_l_seeds) {
+    delete seed;
   }
   // Delete space points for reconstruction
   //
-  m_i_spforseed=m_l_spforseed.begin();
-  for(; m_i_spforseed!=m_l_spforseed.end(); ++m_i_spforseed) {
-    delete *m_i_spforseed;
-  } 
+  for (InDet::SiSpacePointForSeed* spforseed: m_l_spforseed) {
+    delete spforseed;
+  }
 
-  if(m_SP) delete [] m_SP;
-  if(m_R ) delete [] m_R ;
-  if(m_Tz) delete [] m_Tz;
-  if(m_Er) delete [] m_Er;
-  if(m_U ) delete [] m_U ;
-  if(m_V ) delete [] m_V ;
-  if(m_Zo) delete [] m_Zo;
-  if(m_OneSeeds) delete [] m_OneSeeds;
- }
+  delete [] m_SP;
+  delete [] m_R ;
+  delete [] m_Tz;
+  delete [] m_Er;
+  delete [] m_U ;
+  delete [] m_V ;
+  delete [] m_Zo;
+  delete [] m_OneSeeds;
+}
 
 ///////////////////////////////////////////////////////////////////
 // Initialisation
@@ -68,7 +67,7 @@ InDet::SiSpacePointsSeedMaker_BeamGas::~SiSpacePointsSeedMaker_BeamGas()
 
 StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
   ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
@@ -80,7 +79,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
 
   // Get magnetic field service
   //
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ){
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
@@ -88,12 +87,12 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
 
   // Get tool for track-prd association
   //
-  if( m_useassoTool ) {
-    if( m_assoTool.retrieve().isFailure()) {
-      msg(MSG::FATAL)<<"Failed to retrieve tool "<< m_assoTool<<endmsg; 
+  if ( m_useassoTool ) {
+    if ( m_assoTool.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool "<< m_assoTool);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_assoTool << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_assoTool);
     }
   } else {
     m_assoTool.disable();
@@ -106,8 +105,9 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
-  if(m_outputlevel<=0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=0;
+    ATH_MSG_DEBUG(*this);
   }
 
   return sc;
@@ -119,7 +119,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::initialize()
 
 StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -128,16 +128,18 @@ StatusCode InDet::SiSpacePointsSeedMaker_BeamGas::finalize()
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
 {
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
   }
-  else m_K = 2./(300.* 5. );
 
   m_i_spforseed   = m_l_spforseed.begin();
 
@@ -145,28 +147,22 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
   
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel) {
+  if (m_pixel) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      for(; spc != spce; ++spc) {
-
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
-	  
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  int   ir = int(r*irstep); 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+    if (spacepointsPixel.isValid()) {
+
+      for (const SpacePointCollection* spc: *spacepointsPixel) {
+        for (const Trk::SpacePoint* sp: *spc) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool &&  isUsed(sp)) continue;
+
+	  int ir = static_cast<int>(r*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -175,28 +171,22 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct) {
+  if (m_sct) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      for(; spc != spce; ++spc) {
-
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  int   ir = int(r*irstep); 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+    if (spacepointsSCT.isValid()) {
+
+      for (const SpacePointCollection* spc: *spacepointsSCT) {
+        for (const Trk::SpacePoint* sp: *spc) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+
+	  int ir = static_cast<int>(r*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -204,23 +194,22 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newEvent (int)
 
     // Get sct overlap space points containers from store gate 
     //
-    if(m_useOverlap) {
+    if (m_useOverlap) {
 
       SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
-      if(spacepointsOverlap.isValid()) {
-	
-	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
-	
-	for (; sp!=spe; ++sp) {
+      if (spacepointsOverlap.isValid()) {
+
+        for (const Trk::SpacePoint* sp: *spacepointsOverlap) {
 
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
 
-	  int   ir = int(r*irstep); 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(r*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -237,16 +226,18 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 (const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT)
 {
 
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
   }
-  else m_K = 2./(300.* 5. );
 
   m_i_spforseed = m_l_spforseed.begin();
 
@@ -254,32 +245,26 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel && vPixel.size()) {
+  if (m_pixel && vPixel.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
+    if (spacepointsPixel.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-	
-	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  int   ir = int(r*irstep); 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+	  int ir = static_cast<int>(r*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -288,32 +273,26 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct && vSCT.size()) {
+  if (m_sct && vSCT.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
+    if (spacepointsSCT.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-
-	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  int   ir = int(r*irstep); 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+	  int ir = static_cast<int>(r*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -340,9 +319,10 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newRegion
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::find2Sp(const std::list<Trk::Vertex>& lv) 
 {
-  int mode; lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
+  int mode;
+  lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
   
-  if(!m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
+  if (!m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin();
     m_state   = 1   ;
@@ -356,8 +336,9 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::find2Sp(const std::list<Trk::Vertex>
   }
   m_i_seed  = m_l_seeds.begin();
   
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -368,9 +349,10 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::find2Sp(const std::list<Trk::Vertex>
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::find3Sp(const std::list<Trk::Vertex>& lv) 
 {
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 3 : mode = 2;
 
-  if(!m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (!m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -384,8 +366,9 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::find3Sp(const std::list<Trk::Vertex>
   }
   m_i_seed  = m_l_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 void InDet::SiSpacePointsSeedMaker_BeamGas::find3Sp(const std::list<Trk::Vertex>& lv,const double*) 
@@ -401,9 +384,10 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::find3Sp(const std::list<Trk::Vertex>
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::findVSp (const std::list<Trk::Vertex>& lv)
 {
-  int mode; lv.begin()!=lv.end() ? mode = 6 : mode = 5; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   
-  if(!m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
+  if (!m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -417,8 +401,9 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::findVSp (const std::list<Trk::Vertex
   }
   m_i_seed  = m_l_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -428,7 +413,7 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::findVSp (const std::list<Trk::Vertex
 
 MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dump( MsgStream& out ) const
 {
-  if(m_nprint)  return dumpEvent(out);
+  if (m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -439,119 +424,119 @@ MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dump( MsgStream& out ) const
 MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dumpConditions( MsgStream& out ) const
 {
   int n = 42-m_spacepointsPixel.key().size();
-  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
+  std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 42-m_spacepointsSCT.key().size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
   n     = 42-m_spacepointsOverlap.key().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
+  std::string s5; for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key() <<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key() <<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(4)<<m_r1max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ    impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ/dR impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzdrver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact pps    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diverpps
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Beam X center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Y center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Z center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam X-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Y-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Z-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -561,51 +546,19 @@ MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dumpConditions( MsgStream& out
 
 MsgStream& InDet::SiSpacePointsSeedMaker_BeamGas::dumpEvent( MsgStream& out ) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
-  /*
-  if(m_outputlevel==0) return out; 
-
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-
-  out<<"|  Azimuthal  |    n   | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4]  |";
-  out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |"
-     <<std::endl;
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  
-  float sF1 = pi2/float(m_fNmax+1);
-  
-  
-  for(int f=0; f<=m_fNmax; ++f) {
-    out<<"|  "
-       <<std::setw(10)<<std::setprecision(4)<<sF1*float(f)<<" | "
-       <<std::setw(6)<<rf_map[f]<<" |";
-    for(int z=0; z!=11; ++z) {
-      out<<std::setw(6)<<rfz_map[(f*11+z)]<<" |";
-    }
-    out<<std::endl;
-  } 
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  out<<std::endl;
-  */
+     <<endmsg;
   return out;
 }
 
@@ -623,9 +576,9 @@ std::ostream& InDet::SiSpacePointsSeedMaker_BeamGas::dump( std::ostream& out ) c
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiSpacePointsSeedMaker_BeamGas& se)
+(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_BeamGas& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -633,9 +586,9 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiSpacePointsSeedMaker_BeamGas& se)
+(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_BeamGas& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }   
 
 ///////////////////////////////////////////////////////////////////
@@ -644,12 +597,12 @@ std::ostream& InDet::operator <<
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::findNext () 
 {
-  if(m_endlist) return;
+  if (m_endlist) return;
 
   m_i_seede = m_l_seeds.begin();
-  if     (m_mode==0 || m_mode==1) production2Sp ();
-  else if(m_mode==2 || m_mode==3) production3Sp ();
-  else if(m_mode==5 || m_mode==6) production3Sp ();
+  if      (m_mode==0 || m_mode==1) production2Sp ();
+  else if (m_mode==2 || m_mode==3) production3Sp ();
+  else if (m_mode==5 || m_mode==6) production3Sp ();
 
   m_i_seed  = m_l_seeds.begin();
   ++m_nlist;
@@ -661,9 +614,9 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::findNext ()
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::buildFrameWork() 
 {
-  m_ptmin     = fabs(m_ptmin)                  ;  if(m_ptmin < 300.) m_ptmin = 300.;
+  m_ptmin     = fabs(m_ptmin)                  ;  if (m_ptmin < 300.) m_ptmin = 300.;
   m_rapcut    = fabs(m_rapcut)                 ;
-  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut))); 
+  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut)));
   m_dzdrmin   =-m_dzdrmax                      ;
   m_COF       =  134*.05*9.                    ;
   m_ipt       = 1./fabs(.9*m_ptmin)            ;
@@ -674,97 +627,98 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::buildFrameWork()
 
   // Build radius sorted containers
   //
-  m_r_size = int((m_r_rmax+.1)/m_r_rstep);
+  m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep);
   m_r_Sorted = new std::list<InDet::SiSpacePointForSeed*>[m_r_size];
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
-  m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
+  m_r_map    = new int[m_r_size];
+  m_nr   = 0; for (int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
 
   // Build radius-azimuthal sorted containers
   //
   const float pi2     = 2.*M_PI            ;
   const int   NFmax    = 53                ;
-  const float sFmax   = float(NFmax )/pi2;
+  const float sFmax   = static_cast<float>(NFmax )/pi2;
   const float sFmin = 100./60.          ;
 
-  m_sF        = m_ptmin /60. ; if(m_sF    >sFmax ) m_sF    = sFmax  ; else if(m_sF < sFmin) m_sF = sFmin;
-  m_fNmax     = int(pi2*m_sF); if(m_fNmax >=NFmax) m_fNmax = NFmax-1;
+  m_sF        = m_ptmin /60. ;
+  if (m_sF    >sFmax ) m_sF    = sFmax  ;
+  else if (m_sF < sFmin) m_sF = sFmin;
+  m_fNmax     = static_cast<int>(pi2*m_sF);
+  if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
 
-  m_nrf   = 0; for(int i=0; i!= 53; ++i) {m_rf_index  [i]=0; m_rf_map  [i]=0;}
+  m_nrf   = 0; for (int i=0; i!= 53; ++i) {m_rf_index  [i]=0; m_rf_map  [i]=0;}
 
   // Build radius-azimuthal-Z sorted containers
   //
-  m_nrfz  = 0; for(int i=0; i!=583; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
+  m_nrfz  = 0; for (int i=0; i!=583; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
 
   // Build maps for radius-azimuthal-Z sorted collections 
   //
-  for(int f=0; f<=m_fNmax; ++f) {
+  for (int f=0; f<=m_fNmax; ++f) {
 
-    int fb = f-1; if(fb<0      ) fb=m_fNmax; 
-    int ft = f+1; if(ft>m_fNmax) ft=0; 
+    int fb = f-1; if (fb<0      ) fb=m_fNmax;
+    int ft = f+1; if (ft>m_fNmax) ft=0;
     
     // For each azimuthal region loop through all Z regions
     //
-    for(int z=0; z!=11; ++z) {
+    for (int z=0; z!=11; ++z) {
  
       int a        = f *11+z;
       int b        = fb*11+z;
       int c        = ft*11+z;
       m_rfz_b [a]    = 3; m_rfz_t [a]    = 3;
-      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; 
-      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; 
-      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; 
+      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
+      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
+      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
       if     (z==5) {
 
 	m_rfz_t [a]    = 9 ;   m_rfz_b [a]    = 9 ;
-	m_rfz_it[a][3] = a+1;  m_rfz_ib[a][3] = a+1; 
-	m_rfz_it[a][4] = b+1;  m_rfz_ib[a][4] = b+1; 
-	m_rfz_it[a][5] = c+1;  m_rfz_ib[a][5] = c+1; 
-	m_rfz_it[a][6] = a-1;  m_rfz_ib[a][6] = a-1; 
-	m_rfz_it[a][7] = b-1;  m_rfz_ib[a][7] = b-1; 
-	m_rfz_it[a][8] = c-1;  m_rfz_ib[a][8] = c-1; 
-      }
-      else if(z> 5) {
+	m_rfz_it[a][3] = a+1;  m_rfz_ib[a][3] = a+1;
+	m_rfz_it[a][4] = b+1;  m_rfz_ib[a][4] = b+1;
+	m_rfz_it[a][5] = c+1;  m_rfz_ib[a][5] = c+1;
+	m_rfz_it[a][6] = a-1;  m_rfz_ib[a][6] = a-1;
+	m_rfz_it[a][7] = b-1;  m_rfz_ib[a][7] = b-1;
+	m_rfz_it[a][8] = c-1;  m_rfz_ib[a][8] = c-1;
+      } else if (z> 5) {
 
 	m_rfz_b [a]    = 6 ;   m_rfz_t [a]    = 6  ;
 	m_rfz_ib[a][3] = a-1;  m_rfz_it[a][3] = a-1;
-	m_rfz_ib[a][4] = b-1;  m_rfz_it[a][4] = b-1; 
-	m_rfz_ib[a][5] = c-1;  m_rfz_it[a][5] = c-1; 
+	m_rfz_ib[a][4] = b-1;  m_rfz_it[a][4] = b-1;
+	m_rfz_ib[a][5] = c-1;  m_rfz_it[a][5] = c-1;
 
-	if(z<10) {
+	if (z<10) {
 
 	  m_rfz_t [a]    = 9 ;  m_rfz_b [a]    = 9  ;
-	  m_rfz_it[a][6] = a+1; m_rfz_ib[a][6] = a+1; 
+	  m_rfz_it[a][6] = a+1; m_rfz_ib[a][6] = a+1;
 	  m_rfz_it[a][7] = b+1; m_rfz_ib[a][7] = b+1;
-	  m_rfz_it[a][8] = c+1; m_rfz_ib[a][8] = c+1; 
+	  m_rfz_it[a][8] = c+1; m_rfz_ib[a][8] = c+1;
 	}
-      }
-      else {
+      } else {
 
 	m_rfz_b [a]    = 6  ;   m_rfz_t [a]    = 6 ;
-	m_rfz_ib[a][3] = a+1;   m_rfz_it[a][3] = a+1; 
-	m_rfz_ib[a][4] = b+1;   m_rfz_it[a][4] = b+1; 
-	m_rfz_ib[a][5] = c+1;   m_rfz_it[a][5] = c+1; 
+	m_rfz_ib[a][3] = a+1;   m_rfz_it[a][3] = a+1;
+	m_rfz_ib[a][4] = b+1;   m_rfz_it[a][4] = b+1;
+	m_rfz_ib[a][5] = c+1;   m_rfz_it[a][5] = c+1;
 
-	if(z>0) {
+	if (z>0) {
 
 	  m_rfz_t [a]    = 9  ; m_rfz_b [a]    = 9 ;
-	  m_rfz_it[a][6] = a-1; m_rfz_ib[a][6] = a-1; 
-	  m_rfz_it[a][7] = b-1; m_rfz_ib[a][7] = b-1; 
-	  m_rfz_it[a][8] = c-1; m_rfz_ib[a][8] = c-1; 
+	  m_rfz_it[a][6] = a-1; m_rfz_ib[a][6] = a-1;
+	  m_rfz_it[a][7] = b-1; m_rfz_ib[a][7] = b-1;
+	  m_rfz_it[a][8] = c-1; m_rfz_ib[a][8] = c-1;
 	}
       }
     }
   }
   
-  if(!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
-  if(!m_R ) m_R    = new                      float[m_maxsizeSP];
-  if(!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
-  if(!m_Er) m_Er   = new                      float[m_maxsizeSP];
-  if(!m_U ) m_U    = new                      float[m_maxsizeSP]; 
-  if(!m_V ) m_V    = new                      float[m_maxsizeSP];
-  if(!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
-  if(!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsSeed [m_maxOneSize];  
+  if (!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
+  if (!m_R ) m_R    = new                      float[m_maxsizeSP];
+  if (!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
+  if (!m_Er) m_Er   = new                      float[m_maxsizeSP];
+  if (!m_U ) m_U    = new                      float[m_maxsizeSP];
+  if (!m_V ) m_V    = new                      float[m_maxsizeSP];
+  if (!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
+  if (!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsSeed [m_maxOneSize];
 
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
@@ -789,20 +743,20 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::buildBeamFrameWork()
   double sinp = sin(ph);
   double cosp = cos(ph);
   
-  m_xbeam[0] = float(cb.x())                  ; 
-  m_xbeam[1] = float(cost*cosp*cosp+sinp*sinp);
-  m_xbeam[2] = float(cost*sinp*cosp-sinp*cosp);
-  m_xbeam[3] =-float(sint*cosp               );
+  m_xbeam[0] = static_cast<float>(cb.x())                  ;
+  m_xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp);
+  m_xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp);
+  m_xbeam[3] =-static_cast<float>(sint*cosp               );
   
-  m_ybeam[0] = float(cb.y())                  ; 
-  m_ybeam[1] = float(cost*cosp*sinp-sinp*cosp);
-  m_ybeam[2] = float(cost*sinp*sinp+cosp*cosp);
-  m_ybeam[3] =-float(sint*sinp               );
+  m_ybeam[0] = static_cast<float>(cb.y())                  ;
+  m_ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp);
+  m_ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp);
+  m_ybeam[3] =-static_cast<float>(sint*sinp               );
   
-  m_zbeam[0] = float(cb.z())                  ; 
-  m_zbeam[1] = float(sint*cosp)               ;
-  m_zbeam[2] = float(sint*sinp)               ;
-  m_zbeam[3] = float(cost)                    ;
+  m_zbeam[0] = static_cast<float>(cb.z())                  ;
+  m_zbeam[1] = static_cast<float>(sint*cosp)               ;
+  m_zbeam[2] = static_cast<float>(sint*sinp)               ;
+  m_zbeam[3] = static_cast<float>(cost)                    ;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -813,9 +767,9 @@ void  InDet::SiSpacePointsSeedMaker_BeamGas::convertToBeamFrameWork
 (const Trk::SpacePoint*const& sp,float* r) 
 {
   
-  float x = float(sp->globalPosition().x())-m_xbeam[0];
-  float y = float(sp->globalPosition().y())-m_ybeam[0];
-  float z = float(sp->globalPosition().z())-m_zbeam[0];
+  float x = static_cast<float>(sp->globalPosition().x())-m_xbeam[0];
+  float y = static_cast<float>(sp->globalPosition().y())-m_ybeam[0];
+  float z = static_cast<float>(sp->globalPosition().z())-m_zbeam[0];
   r[0]     = m_xbeam[1]*x+m_xbeam[2]*y+m_xbeam[3]*z;
   r[1]     = m_ybeam[1]*x+m_ybeam[2]*y+m_ybeam[3]*z;
   r[2]     = m_zbeam[1]*x+m_zbeam[2]*y+m_zbeam[3]*z;
@@ -830,37 +784,34 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::fillLists()
   const float pi2 = 2.*M_PI;
   std::list<InDet::SiSpacePointForSeed*>::iterator r;
   
-  for(int i=0; i!= m_r_size;  ++i) {
+  for (int i=0; i!= m_r_size;  ++i) {
 
-    if(!m_r_map[i]) continue;
+    if (!m_r_map[i]) continue;
     r = m_r_Sorted[i].begin();
 
-    while(r!=m_r_Sorted[i].end()) {
+    while (r!=m_r_Sorted[i].end()) {
       
       // Azimuthal angle sort
       //
-      float F = (*r)->phi(); if(F<0.) F+=pi2;
+      float F = (*r)->phi(); if (F<0.) F+=pi2;
 
-      int   f = int(F*m_sF);
-      if (f < 0)
-        f = m_fNmax;
-      else if (f > m_fNmax)
-        f = 0;
+      int   f = static_cast<int>(F*m_sF);
+      if (f < 0) f = m_fNmax;
+      else if (f > m_fNmax) f = 0;
 
-      m_rf_Sorted[f].push_back(*r); if(!m_rf_map[f]++) m_rf_index[m_nrf++] = f;
+      m_rf_Sorted[f].push_back(*r); if (!m_rf_map[f]++) m_rf_index[m_nrf++] = f;
 
       int z; float Z = (*r)->z();
 
       // Azimuthal angle and Z-coordinate sort
       //
-      if(Z>0.) {
+      if (Z>0.) {
 	Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10;
-      }
-      else     {
+      } else {
 	Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0;
       }
       int n = f*11+z; ++m_nsaz;
-      m_rfz_Sorted[n].push_back(*r); if(!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
+      m_rfz_Sorted[n].push_back(*r); if (!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
       m_r_Sorted[i].erase(r++);
     }
     m_r_map[i] = 0;
@@ -875,17 +826,17 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::fillLists()
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::erase()
 {
-  for(int i=0; i!=m_nr;    ++i) {
+  for (int i=0; i!=m_nr;    ++i) {
     int n = m_r_index[i]; m_r_map[n] = 0;
     m_r_Sorted[n].erase(m_r_Sorted[n].begin(),m_r_Sorted[n].end());
   }
 
-  for(int i=0; i!=m_nrf;   ++i) {
+  for (int i=0; i!=m_nrf;   ++i) {
     int n = m_rf_index[i]; m_rf_map[n] = 0;
     m_rf_Sorted[n].erase(m_rf_Sorted[n].begin(),m_rf_Sorted[n].end());
   }
 
-  for(int i=0; i!=m_nrfz;  ++i) {
+  for (int i=0; i!=m_nrfz;  ++i) {
     int n = m_rfz_index[i]; m_rfz_map[n] = 0;
     m_rfz_Sorted[n].erase(m_rfz_Sorted[n].begin(),m_rfz_Sorted[n].end());
   }
@@ -913,38 +864,38 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production2Sp()
 
 void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp()
 { 
-  if(m_nsaz<3) return;
+  if (m_nsaz<3) return;
 
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0; if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
-      int a  = f *11+ZI[z];  if(!m_rfz_map[a]) continue;
+      int a  = f *11+ZI[z];  if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
+	if (!m_rfz_map[an]) continue;
 	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
+	if (!m_rfz_map[an]) continue; 
 	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
       } 
       production3Sp(rb,rbe,rt,rte,NB,NT,nseed);
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
+      if (!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
     }
   }
   m_endlist = true;
@@ -962,20 +913,23 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float R  = (*r0)->radius(); if(R<m_r2min) continue; if(R>m_r2max) break;
+    float R = (*r0)->radius();
+    if (R<m_r2min) continue;
+    if (R>m_r2max) break;
 
     const Trk::SpacePoint* SP0 = (*r0)->spacepoint;
 
-    bool pix = true; if(SP0->clusterList().second) pix = false;
+    bool pix = true;
+    if (SP0->clusterList().second) pix = false;
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
     float               Y    = (*r0)->y()  ;
@@ -984,63 +938,66 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
-	if(Rb<m_r1min) {rb[i]=r; continue;}  if(Rb>m_r1max) break;
+	float Rb =(*r)->radius();
+	if (Rb<m_r1min) {rb[i]=r; continue;}
+        if (Rb>m_r1max) break;
 	
-	float dR = R-Rb; 
-	if(dR<m_drmin) break;
+	float dR = R-Rb;
+	if (dR<m_drmin) break;
 
-	if(dR > m_drmax || (*r)->sur()==sur0) continue;
+	if (dR > m_drmax || (*r)->sur()==sur0) continue;
 
-	if( !pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( !pix && !(*r)->spacepoint->clusterList().second) continue;
 	
-	float Tz = (Z-(*r)->z())/dR; 
+	float Tz = (Z-(*r)->z())/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 	
 	// Comparison with vertices Z coordinates
 	//
-	if(pix) {
-	  float Zo = Z-R*Tz; if(!isZCompatible(Zo)) continue;
+	if (pix) {
+	  float Zo = Z-R*Tz;
+          if (!isZCompatible(Zo)) continue;
 	}
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	m_SP[Nb] = (*r); if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin || Rt<m_r3min) {rt[i]=r; continue;}
-	if(Rt>m_r3max || dR>m_drmax) break;
+	float dR = Rt-R;
+        if (dR<m_drmin || Rt<m_r3min) {rt[i]=r; continue;}
+	if (Rt>m_r3max || dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0) continue;
+	if ( (*r)->sur()==sur0) continue;
 
-	float Tz = ((*r)->z()-Z)/dR; 
+	float Tz = ((*r)->z()-Z)/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	if(pix) {
-	  float Zo = Z-R*Tz; if(!isZCompatible(Zo)) continue;
+	if (pix) {
+	  float Zo = Z-R*Tz; if (!isZCompatible(Zo)) continue;
 	}
-	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	m_SP[Nt] = (*r); if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
@@ -1048,9 +1005,9 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeed* sp = m_SP[i];  
+      InDet::SiSpacePointForSeed* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1059,7 +1016,7 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
       float y   =-dx*ay+dy*ax ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ; if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1077,13 +1034,13 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
     float COF   = m_COF     ;
     float ipt2K = ipt2/K2   ;
     float ipt2C = ipt2*COF  ;
-    float COFK  = COF*K2    ;  
+    float COFK  = COF*K2    ;
     covr0      *= 2.        ;
     covz0      *= 2.        ;
     
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       const Trk::SpacePoint* SPb = m_SP[b]->spacepoint;
  
@@ -1098,29 +1055,29 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
       float  CSA  = Tzb2*COFK    ;
       float ICSA  = Tzb2*ipt2C   ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 	
 	float Ts  = .5*(Tzb+m_Tz[t])                          ;
 	float dt  =     Tzb-m_Tz[t]                           ;
 	float dT  = dt*dt-Erb-m_Er[t]-m_R[t]*(Ts*Ts*Rb2r+Rb2z);
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0. ) continue;
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub; if (dU == 0. ) continue;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
-	float Im  = fabs((A-B*R)*R)                  ; 
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	float Im  = fabs((A-B*R)*R)                  ;
 	
-	if(pix) {
-	  if(                                             Im > imc ) continue;
-	  if(m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
+	if (pix) {
+	  if (                                             Im > imc ) continue;
+	  if (m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
 	}
 	newOneSeed(SPb,SP0,m_SP[t]->spacepoint,Zob,Im);
       }
     }
     nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    if (nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
   }
 }
 
@@ -1130,11 +1087,11 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::production3Sp
 
 bool InDet::SiSpacePointsSeedMaker_BeamGas::isUsed(const Trk::SpacePoint* sp)
 {
-  const Trk::PrepRawData* d = sp->clusterList().first ; 
-  if(!d || !m_assoTool->isUsed(*d)) return false;
+  const Trk::PrepRawData* d = sp->clusterList().first;
+  if (!d || !m_assoTool->isUsed(*d)) return false;
 
   d = sp->clusterList().second;
-  if(!d || m_assoTool->isUsed(*d)) return true;
+  if (!d || m_assoTool->isUsed(*d)) return true;
 
   return false;
 }
@@ -1147,32 +1104,133 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::newOneSeed
 (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
  const Trk::SpacePoint*& p3,const float& z,const float& q) 
 {
-  if(m_nOneSeeds < m_maxOneSize) {
+  if (m_nOneSeeds < m_maxOneSize) {
 
-    m_OneSeeds [m_nOneSeeds].erase     (  ); 
-    m_OneSeeds [m_nOneSeeds].add       (p1); 
-    m_OneSeeds [m_nOneSeeds].add       (p2); 
-    m_OneSeeds [m_nOneSeeds].add       (p3); 
-    m_OneSeeds [m_nOneSeeds].setZVertex(double(z));
+    m_OneSeeds [m_nOneSeeds].erase     (  );
+    m_OneSeeds [m_nOneSeeds].add       (p1);
+    m_OneSeeds [m_nOneSeeds].add       (p2);
+    m_OneSeeds [m_nOneSeeds].add       (p3);
+    m_OneSeeds [m_nOneSeeds].setZVertex(static_cast<double>(z));
     m_mapOneSeeds.insert(std::make_pair(q,m_OneSeeds+m_nOneSeeds));
     ++m_nOneSeeds;
-  }
-  else                     {
+  } else {
     std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator 
       l = m_mapOneSeeds.rbegin();
-    if((*l).first <= q) return;
+    if ((*l).first <= q) return;
     
     InDet::SiSpacePointsSeed* s = (*l).second;
-    s->erase     (  ); 
-    s->add       (p1); 
-    s->add       (p2); 
-    s->add       (p3); 
-    s->setZVertex(double(z));
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
       i = m_mapOneSeeds.insert(std::make_pair(q,s));
 	
-    for(++i; i!=m_mapOneSeeds.end(); ++i) {
-      if((*i).second==s) {m_mapOneSeeds.erase(i); return;}
+    for (++i; i!=m_mapOneSeeds.end(); ++i) {
+      if ((*i).second==s) {m_mapOneSeeds.erase(i); return;}
+    }
+  }
+}
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_BeamGas::next()
+{
+  if (m_i_seed==m_i_seede) {
+    findNext();
+    if (m_i_seed==m_i_seede) return nullptr;
+  } 
+  return(*m_i_seed++);
+}
+    
+bool InDet::SiSpacePointsSeedMaker_BeamGas::isZCompatible  
+(float& Zv)
+{
+  return Zv > m_zmin && Zv < m_zmax;
+}
+  
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_BeamGas::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3];
+  convertToBeamFrameWork(sp, r);
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp, r);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_BeamGas::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// New 3 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_BeamGas::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const Trk::SpacePoint*& p3,const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,p3,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// Fill seeds
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_BeamGas::fillSeeds ()
+{
+  std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
+    l  = m_mapOneSeeds.begin(),
+    le = m_mapOneSeeds.end  ();
+
+  for (; l!=le; ++l) {
+    if (m_i_seede!=m_l_seeds.end()) {
+      InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+      *s = *(*l).second;
+    } else {
+      m_l_seeds.push_back(new InDet::SiSpacePointsSeed(*(*l).second));
+      m_i_seede = m_l_seeds.end();
     }
   }
 }
+  
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
index 63888d037625..2a7eac255fd3 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
@@ -36,25 +36,24 @@ InDet::SiSpacePointsSeedMaker_Cosmic::SiSpacePointsSeedMaker_Cosmic
 
 InDet::SiSpacePointsSeedMaker_Cosmic::~SiSpacePointsSeedMaker_Cosmic()
 {
-  if(m_r_index ) delete [] m_r_index ;
-  if(m_r_map   ) delete [] m_r_map   ; 
-  if(m_r_Sorted) delete [] m_r_Sorted;
+  delete [] m_r_index ;
+  delete [] m_r_map   ;
+  delete [] m_r_Sorted;
 
   // Delete space points for reconstruction
   //
-  m_i_spforseed=m_l_spforseed.begin();
-  for(; m_i_spforseed!=m_l_spforseed.end(); ++m_i_spforseed) {
-    delete *m_i_spforseed;
-  } 
-
-  if(m_SP) delete [] m_SP;
-  if(m_R ) delete [] m_R ;
-  if(m_Tz) delete [] m_Tz;
-  if(m_Er) delete [] m_Er;
-  if(m_U ) delete [] m_U ;
-  if(m_V ) delete [] m_V ;
-  if(m_seeds) delete [] m_seeds;
- }
+  for (InDet::SiSpacePointForSeed* spforseed: m_l_spforseed) {
+    delete spforseed;
+  }
+
+  delete [] m_SP;
+  delete [] m_R ;
+  delete [] m_Tz;
+  delete [] m_Er;
+  delete [] m_U ;
+  delete [] m_V ;
+  delete [] m_seeds;
+}
 
 ///////////////////////////////////////////////////////////////////
 // Initialisation
@@ -62,7 +61,7 @@ InDet::SiSpacePointsSeedMaker_Cosmic::~SiSpacePointsSeedMaker_Cosmic()
 
 StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
   ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
@@ -70,7 +69,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
 
   // Get magnetic field service
   //
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ){
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
@@ -78,12 +77,12 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
 
   // Get tool for track-prd association
   //
-  if( m_useassoTool ) {
-    if( m_assoTool.retrieve().isFailure()) {
-      msg(MSG::FATAL)<<"Failed to retrieve tool "<< m_assoTool<<endmsg; 
+  if ( m_useassoTool ) {
+    if ( m_assoTool.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool "<< m_assoTool);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_assoTool << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_assoTool);
     }
   } else {
     m_assoTool.disable();
@@ -92,13 +91,14 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
   // Build framework
   //
   buildFrameWork();
-  if( m_ptmin < 300.) m_ptmin = 300.;
+  if ( m_ptmin < 300.) m_ptmin = 300.;
 
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
-  if(m_outputlevel<=0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=0;
+    ATH_MSG_DEBUG(*this);
   }
 
   return sc;
@@ -110,7 +110,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::initialize()
 
 StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::finalize()
 {
-  StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -119,7 +119,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_Cosmic::finalize()
 
 void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
 {
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   m_i_spforseed   = m_l_spforseed.begin();
 
@@ -128,29 +128,24 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel) {
+  if (m_pixel) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      for(; spc != spce; ++spc) {
+    if (spacepointsPixel.isValid()) {
 
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
+      for (const SpacePointCollection* spc: *spacepointsPixel) {
+        for (const Trk::SpacePoint* sp: *spc) {
 	  
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool &&  isUsed(sp)) continue;
 
-	  int   ir = int(((*sp)->globalPosition().y()+m_r_rmax)*irstep);
+	  int   ir = static_cast<int>((sp->globalPosition().y()+m_r_rmax)*irstep);
 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp),errorsc); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp, errorsc);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -159,29 +154,24 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct) {
+  if (m_sct) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
+    if (spacepointsSCT.isValid()) {
 
-      for(; spc != spce; ++spc) {
+      for (const SpacePointCollection* spc: *spacepointsSCT) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
 	  
-	  int   ir = int(((*sp)->globalPosition().y()+m_r_rmax)*irstep);
+	  int   ir = static_cast<int>((sp->globalPosition().y()+m_r_rmax)*irstep);
 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp),errorsc); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp, errorsc);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -189,24 +179,23 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newEvent (int)
 
     // Get sct overlap space points containers from store gate 
     //
-    if(m_useOverlap) {
+    if (m_useOverlap) {
 
       SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
-      if(spacepointsOverlap.isValid()) {
-	
-	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
+      if (spacepointsOverlap.isValid()) {
 	
-	for (; sp!=spe; ++sp) {
+        for (const Trk::SpacePoint* sp: *spacepointsOverlap) {
 
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
 
-	  int   ir = int(((*sp)->globalPosition().y()+m_r_rmax)*irstep);
+	  int   ir = static_cast<int>((sp->globalPosition().y()+m_r_rmax)*irstep);
 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp),errorsc); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp, errorsc);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -223,7 +212,7 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
 (const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT)
 {
 
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   m_i_spforseed = m_l_spforseed.begin();
 
@@ -232,32 +221,27 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel && vPixel.size()) {
+  if (m_pixel && vPixel.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
+    if (spacepointsPixel.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-	
-	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  int   ir = int(((*sp)->globalPosition().y()+m_r_rmax)*irstep);
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp),errorsc); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+
+	  int   ir = static_cast<int>((sp->globalPosition().y()+m_r_rmax)*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp, errorsc);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -266,32 +250,27 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct && vSCT.size()) {
+  if (m_sct && vSCT.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
+    if (spacepointsSCT.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-
-	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  int   ir = int(((*sp)->globalPosition().y()+m_r_rmax)*irstep);
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp),errorsc); 
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vSCT) {
+	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+
+	  int ir = static_cast<int>((sp->globalPosition().y()+m_r_rmax)*irstep);
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp, errorsc);
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -317,11 +296,13 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
 
 void InDet::SiSpacePointsSeedMaker_Cosmic::find2Sp(const std::list<Trk::Vertex>& lv) 
 {
-  int mode; lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
+  int mode;
+  lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
 
-  m_nseeds = 0; m_l_seeds.erase(m_l_seeds.begin(),m_l_seeds.end());
+  m_nseeds = 0;
+  m_l_seeds.erase(m_l_seeds.begin(),m_l_seeds.end());
   
-  if( !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
+  if ( !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
 
     m_state   = 1   ;
     m_nspoint = 2   ;
@@ -336,8 +317,9 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::find2Sp(const std::list<Trk::Vertex>&
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -348,11 +330,13 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::find2Sp(const std::list<Trk::Vertex>&
 
 void InDet::SiSpacePointsSeedMaker_Cosmic::find3Sp(const std::list<Trk::Vertex>& lv) 
 {
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 3 : mode = 2;
 
-  m_nseeds = 0; m_l_seeds.erase(m_l_seeds.begin(),m_l_seeds.end());
+  m_nseeds = 0;
+  m_l_seeds.erase(m_l_seeds.begin(),m_l_seeds.end());
 
-  if(!m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (!m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
 
     m_state   = 1               ;
     m_nspoint = 3               ;
@@ -367,8 +351,9 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::find3Sp(const std::list<Trk::Vertex>&
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -385,9 +370,10 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::find3Sp(const std::list<Trk::Vertex>&
 
 void InDet::SiSpacePointsSeedMaker_Cosmic::findVSp (const std::list<Trk::Vertex>& lv)
 {
-  int mode; lv.begin()!=lv.end() ? mode = 6 : mode = 5; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   
-  if(!m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
+  if (!m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
 
     m_state   = 1               ;
     m_nspoint = 4               ;
@@ -402,8 +388,9 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::findVSp (const std::list<Trk::Vertex>
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -413,7 +400,7 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::findVSp (const std::list<Trk::Vertex>
 
 MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dump( MsgStream& out ) const
 {
-  if(m_nprint)  return dumpEvent(out);
+  if (m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -424,62 +411,62 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dump( MsgStream& out ) const
 MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dumpConditions( MsgStream& out ) const
 {
   int n = 42-m_spacepointsPixel.key().size();
-  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
+  std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 42-m_spacepointsSCT.key().size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
   n     = 42-m_spacepointsOverlap.key().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
 
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key() <<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -489,51 +476,19 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dumpConditions( MsgStream& out
 
 MsgStream& InDet::SiSpacePointsSeedMaker_Cosmic::dumpEvent( MsgStream& out ) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
-  /*
-  if(m_outputlevel==0) return out; 
-
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-
-  out<<"|  Azimuthal  |    n   | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4]  |";
-  out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |"
-     <<std::endl;
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  
-  float sF1 = pi2/float(m_fNmax+1);
-  
-  
-  for(int f=0; f<=m_fNmax; ++f) {
-    out<<"|  "
-       <<std::setw(10)<<std::setprecision(4)<<sF1*float(f)<<" | "
-       <<std::setw(6)<<rf_map[f]<<" |";
-    for(int z=0; z!=11; ++z) {
-      out<<std::setw(6)<<rfz_map[(f*11+z)]<<" |";
-    }
-    out<<std::endl;
-  } 
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  out<<std::endl;
-  */
+     <<endmsg;
   return out;
 }
 
@@ -551,9 +506,9 @@ std::ostream& InDet::SiSpacePointsSeedMaker_Cosmic::dump( std::ostream& out ) co
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiSpacePointsSeedMaker_Cosmic& se)
+(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_Cosmic& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -561,9 +516,9 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiSpacePointsSeedMaker_Cosmic& se)
+(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_Cosmic& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }   
 
 ///////////////////////////////////////////////////////////////////
@@ -573,116 +528,128 @@ std::ostream& InDet::operator <<
 void InDet::SiSpacePointsSeedMaker_Cosmic::buildFrameWork() 
 {
   m_rapcut    = fabs(m_rapcut)                 ;
-  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut))); 
+  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut)));
   m_dzdrmin   =-m_dzdrmax                      ;
 
   m_ns = m_nsaz = m_nr = m_nrf = m_nrfz = 0;
 
   // Build radius sorted containers
   //
-  m_r_size = int((m_r_rmax+.1)/m_r_rstep)*2;
+  m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep)*2;
   m_r_Sorted = new std::list<InDet::SiSpacePointForSeed*>[m_r_size];
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
-  m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
+  m_r_map    = new int[m_r_size];
+  m_nr = 0;
+  for (int i=0; i!=m_r_size; ++i) {
+    m_r_index[i]=0;
+    m_r_map[i]=0;
+  }
 
   // Build radius-azimuthal sorted containers
   //
   const float pi2     = 2.*M_PI            ;
   const int   NFmax    = 53                ;
-  const float sFmax   = float(NFmax )/pi2;
+  const float sFmax   = static_cast<float>(NFmax )/pi2;
   const float sFmin = 50./60.           ;
 
-  m_sF        = 50./60. ; if(m_sF    >sFmax ) m_sF    = sFmax  ; else if(m_sF < sFmin) m_sF = sFmin;
-  m_fNmax     = int(pi2*m_sF); if(m_fNmax >=NFmax) m_fNmax = NFmax-1;
+  m_sF        = 50./60. ;
+  if (m_sF    >sFmax ) m_sF    = sFmax  ;
+  else if (m_sF < sFmin) m_sF = sFmin;
+  m_fNmax     = static_cast<int>(pi2*m_sF);
+  if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
 
-  m_nrf   = 0; for(int i=0; i!= 53; ++i) {m_rf_index  [i]=0; m_rf_map  [i]=0;}
+  m_nrf = 0;
+  for (int i=0; i!= 53; ++i) {
+    m_rf_index[i]=0;
+    m_rf_map[i]=0;
+  }
 
   // Build radius-azimuthal-Z sorted containers
   //
-  m_nrfz  = 0; for(int i=0; i!=583; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
+  m_nrfz = 0;
+  for (int i=0; i!=583; ++i) {
+    m_rfz_index[i]=0;
+    m_rfz_map[i]=0;
+  }
 
   // Build maps for radius-azimuthal-Z sorted collections 
   //
-  for(int f=0; f<=m_fNmax; ++f) {
+  for (int f=0; f<=m_fNmax; ++f) {
 
-    int fb = f-1; if(fb<0      ) fb=m_fNmax; 
-    int ft = f+1; if(ft>m_fNmax) ft=0; 
+    int fb = f-1; if (fb<0      ) fb=m_fNmax;
+    int ft = f+1; if (ft>m_fNmax) ft=0;
     
     // For each azimuthal region loop through all Z regions
     //
-    for(int z=0; z!=11; ++z) {
+    for (int z=0; z!=11; ++z) {
  
       int a        = f *11+z;
       int b        = fb*11+z;
       int c        = ft*11+z;
       m_rfz_b [a]    = 3; m_rfz_t [a]    = 3;
-      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; 
-      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; 
-      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; 
-      if     (z==5) {
+      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
+      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
+      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
+      if (z==5) {
 
 	m_rfz_t [a]    = 9 ;   m_rfz_b [a]    = 9 ;
-	m_rfz_it[a][3] = a+1;  m_rfz_ib[a][3] = a+1; 
-	m_rfz_it[a][4] = b+1;  m_rfz_ib[a][4] = b+1; 
-	m_rfz_it[a][5] = c+1;  m_rfz_ib[a][5] = c+1; 
-	m_rfz_it[a][6] = a-1;  m_rfz_ib[a][6] = a-1; 
-	m_rfz_it[a][7] = b-1;  m_rfz_ib[a][7] = b-1; 
-	m_rfz_it[a][8] = c-1;  m_rfz_ib[a][8] = c-1; 
-      }
-      else if(z> 5) {
+	m_rfz_it[a][3] = a+1;  m_rfz_ib[a][3] = a+1;
+	m_rfz_it[a][4] = b+1;  m_rfz_ib[a][4] = b+1;
+	m_rfz_it[a][5] = c+1;  m_rfz_ib[a][5] = c+1;
+	m_rfz_it[a][6] = a-1;  m_rfz_ib[a][6] = a-1;
+	m_rfz_it[a][7] = b-1;  m_rfz_ib[a][7] = b-1;
+	m_rfz_it[a][8] = c-1;  m_rfz_ib[a][8] = c-1;
+      } else if (z> 5) {
 
 	m_rfz_b [a]    = 6 ;   m_rfz_t [a]    = 6  ;
 	m_rfz_ib[a][3] = a-1;  m_rfz_it[a][3] = a-1;
-	m_rfz_ib[a][4] = b-1;  m_rfz_it[a][4] = b-1; 
-	m_rfz_ib[a][5] = c-1;  m_rfz_it[a][5] = c-1; 
+	m_rfz_ib[a][4] = b-1;  m_rfz_it[a][4] = b-1;
+	m_rfz_ib[a][5] = c-1;  m_rfz_it[a][5] = c-1;
 
-	if(z<10) {
+	if (z<10) {
 
 	  m_rfz_t [a]    = 9 ;  m_rfz_b [a]    = 9  ;
-	  m_rfz_it[a][6] = a+1; m_rfz_ib[a][6] = a+1; 
+	  m_rfz_it[a][6] = a+1; m_rfz_ib[a][6] = a+1;
 	  m_rfz_it[a][7] = b+1; m_rfz_ib[a][7] = b+1;
-	  m_rfz_it[a][8] = c+1; m_rfz_ib[a][8] = c+1; 
+	  m_rfz_it[a][8] = c+1; m_rfz_ib[a][8] = c+1;
 	}
-      }
-      else {
+      } else {
 
 	m_rfz_b [a]    = 6  ;   m_rfz_t [a]    = 6 ;
-	m_rfz_ib[a][3] = a+1;   m_rfz_it[a][3] = a+1; 
-	m_rfz_ib[a][4] = b+1;   m_rfz_it[a][4] = b+1; 
-	m_rfz_ib[a][5] = c+1;   m_rfz_it[a][5] = c+1; 
+	m_rfz_ib[a][3] = a+1;   m_rfz_it[a][3] = a+1;
+	m_rfz_ib[a][4] = b+1;   m_rfz_it[a][4] = b+1;
+	m_rfz_ib[a][5] = c+1;   m_rfz_it[a][5] = c+1;
 
-	if(z>0) {
+	if (z>0) {
 
 	  m_rfz_t [a]    = 9  ; m_rfz_b [a]    = 9 ;
-	  m_rfz_it[a][6] = a-1; m_rfz_ib[a][6] = a-1; 
-	  m_rfz_it[a][7] = b-1; m_rfz_ib[a][7] = b-1; 
-	  m_rfz_it[a][8] = c-1; m_rfz_ib[a][8] = c-1; 
+	  m_rfz_it[a][6] = a-1; m_rfz_ib[a][6] = a-1;
+	  m_rfz_it[a][7] = b-1; m_rfz_ib[a][7] = b-1;
+	  m_rfz_it[a][8] = c-1; m_rfz_ib[a][8] = c-1;
 	}
       }
       
-      if     (z==3) {
+      if (z==3) {
 	m_rfz_b[a]      = 12;  m_rfz_t [a]     = 12;
-	m_rfz_ib[a][ 9] = a+2; m_rfz_it[a][ 9] = a+2; 
+	m_rfz_ib[a][ 9] = a+2; m_rfz_it[a][ 9] = a+2;
 	m_rfz_ib[a][10] = b+2; m_rfz_it[a][10] = b+2;
-	m_rfz_ib[a][11] = c+2; m_rfz_it[a][11] = c+2; 
-      }
-      else if(z==7) {
+	m_rfz_ib[a][11] = c+2; m_rfz_it[a][11] = c+2;
+      } else if (z==7) {
 	m_rfz_b[a]      = 12;  m_rfz_t [a]     = 12;
-	m_rfz_ib[a][ 9] = a-2; m_rfz_it[a][ 9] = a-2;  
-	m_rfz_ib[a][10] = b-2; m_rfz_it[a][10] = b-2; 
-	m_rfz_ib[a][11] = c-2; m_rfz_it[a][11] = c-2; 
+	m_rfz_ib[a][ 9] = a-2; m_rfz_it[a][ 9] = a-2;
+	m_rfz_ib[a][10] = b-2; m_rfz_it[a][10] = b-2;
+	m_rfz_ib[a][11] = c-2; m_rfz_it[a][11] = c-2;
       }
     }
   }
   
-  if(!m_SP) m_SP       = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
-  if(!m_R ) m_R        = new                      float[m_maxsizeSP];
-  if(!m_Tz) m_Tz       = new                      float[m_maxsizeSP];
-  if(!m_Er) m_Er       = new                      float[m_maxsizeSP];
-  if(!m_U ) m_U        = new                      float[m_maxsizeSP]; 
-  if(!m_V ) m_V        = new                      float[m_maxsizeSP];
-  if(!m_seeds) m_seeds = new InDet::SiSpacePointsSeed   [m_maxsize+5];  
+  if (!m_SP) m_SP       = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
+  if (!m_R ) m_R        = new                      float[m_maxsizeSP];
+  if (!m_Tz) m_Tz       = new                      float[m_maxsizeSP];
+  if (!m_Er) m_Er       = new                      float[m_maxsizeSP];
+  if (!m_U ) m_U        = new                      float[m_maxsizeSP];
+  if (!m_V ) m_V        = new                      float[m_maxsizeSP];
+  if (!m_seeds) m_seeds = new InDet::SiSpacePointsSeed[m_maxsize+5];
 }
    
 ///////////////////////////////////////////////////////////////////
@@ -694,33 +661,37 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::fillLists()
   const float pi2 = 2.*M_PI;
   std::list<InDet::SiSpacePointForSeed*>::iterator r;
   
-  for(int i=0; i!= m_r_size;  ++i) {
+  for (int i=0; i!= m_r_size;  ++i) {
 
-    if(!m_r_map[i]) continue;
+    if (!m_r_map[i]) continue;
     r = m_r_Sorted[i].begin();
 
-    while(r!=m_r_Sorted[i].end()) {
+    while (r!=m_r_Sorted[i].end()) {
       
       // Azimuthal angle sort
       //
-      float F = (*r)->phi(); if(F<0.) F+=pi2;
+      float F = (*r)->phi();
+      if (F<0.) F+=pi2;
 
-      //int   f = int(F*m_sF); f<0 ? f = m_fNmax : f>m_fNmax ? f = 0 : f=f;
+      //int   f = static_cast<int>(F*m_sF); f<0 ? f = m_fNmax : f>m_fNmax ? f = 0 : f=f;
       int f = 1;
-      m_rf_Sorted[f].push_back(*r); if(!m_rf_map[f]++) m_rf_index[m_nrf++] = f;
+      m_rf_Sorted[f].push_back(*r);
+      if (!m_rf_map[f]++) m_rf_index[m_nrf++] = f;
 
-      int z; float Z = (*r)->z();
+      int z;
+      float Z = (*r)->z();
 
       // Azimuthal angle and Z-coordinate sort
       //
-      if(Z>0.) {
+      if (Z>0.) {
 	Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10;
-      }
-      else     {
+      } else {
 	Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0;
       }
-      int n = f*11+z; ++m_nsaz;
-      m_rfz_Sorted[n].push_back(*r); if(!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
+      int n = f*11+z;
+      ++m_nsaz;
+      m_rfz_Sorted[n].push_back(*r);
+      if (!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
       m_r_Sorted[i].erase(r++);
     }
     m_r_map[i] = 0;
@@ -735,18 +706,21 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::fillLists()
 
 void InDet::SiSpacePointsSeedMaker_Cosmic::erase()
 {
-  for(int i=0; i!=m_nr;    ++i) {
-    int n = m_r_index[i]; m_r_map[n] = 0;
+  for (int i=0; i!=m_nr;    ++i) {
+    int n = m_r_index[i];
+    m_r_map[n] = 0;
     m_r_Sorted[n].erase(m_r_Sorted[n].begin(),m_r_Sorted[n].end());
   }
 
-  for(int i=0; i!=m_nrf;   ++i) {
-    int n = m_rf_index[i]; m_rf_map[n] = 0;
+  for (int i=0; i!=m_nrf;   ++i) {
+    int n = m_rf_index[i];
+    m_rf_map[n] = 0;
     m_rf_Sorted[n].erase(m_rf_Sorted[n].begin(),m_rf_Sorted[n].end());
   }
 
-  for(int i=0; i!=m_nrfz;  ++i) {
-    int n = m_rfz_index[i]; m_rfz_map[n] = 0;
+  for (int i=0; i!=m_nrfz;  ++i) {
+    int n = m_rfz_index[i];
+    m_rfz_map[n] = 0;
     m_rfz_Sorted[n].erase(m_rfz_Sorted[n].begin(),m_rfz_Sorted[n].end());
   }
 
@@ -773,48 +747,54 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production2Sp()
 
 void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp()
 { 
-  if(m_nsaz<3) return;
+  if (m_nsaz<3) return;
 
   float K   = 0.;
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    K = 2./(300.*f[2]);
   }
-  if(!K) return production3SpWithoutField();
+  if (!K) return production3SpWithoutField();
 
-  float ipt = 100000000.; if(m_ptmin!=0.) ipt= 1./fabs(.9*m_ptmin);
+  float ipt = 100000000.;
+  if (m_ptmin!=0.) ipt= 1./fabs(.9*m_ptmin);
 
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
-      int a  = f *11+ZI[z];  if(!m_rfz_map[a]) continue;
+      int a = f *11+ZI[z];
+      if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
-	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rb [NB] = m_rfz_Sorted[an].begin();
+        rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
-	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rt [NT] = m_rfz_Sorted[an].begin();
+        rte[NT++] = m_rfz_Sorted[an].end();
       } 
       production3Sp(rb,rbe,rt,rte,NB,NT,K,ipt);
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
+      if (!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
     }
   }
   m_endlist = true;
@@ -827,36 +807,41 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp()
 void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField()
 { 
 
-  float ipt = 100000000.; if(m_ptmin!=0.) ipt= 1./fabs(.9*m_ptmin);
+  float ipt = 100000000.;
+  if (m_ptmin!=0.) ipt= 1./fabs(.9*m_ptmin);
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
-      int a  = f *11+ZI[z];  if(!m_rfz_map[a]) continue;
+      int a  = f *11+ZI[z];
+      if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
-	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rb [NB] = m_rfz_Sorted[an].begin();
+        rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
-	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rt [NT] = m_rfz_Sorted[an].begin();
+        rte[NT++] = m_rfz_Sorted[an].end();
       } 
       production3SpWithoutField(rb,rbe,rt,rte,NB,NT,ipt);
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
+      if (!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
     }
   }
   m_endlist = true;
@@ -876,15 +861,16 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp
   const float COF = 134*.05*9.;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 	
-    bool              pix   = true; if((*r0)->spacepoint->clusterList().second) pix = false;
-    float              R    = (*r0)->radius() ; 
-    const Trk::Surface* sur0 = (*r0)->sur()  ;
+    bool              pix   = true;
+    if ((*r0)->spacepoint->clusterList().second) pix = false;
+    float              R    = (*r0)->radius();
+    const Trk::Surface* sur0 = (*r0)->sur();
     float              X    = (*r0)->x()    ;
     float              Y    = (*r0)->y()    ;
     float              Z    = (*r0)->z()    ;
@@ -897,17 +883,17 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
 	
 	float dy = (*r)->y()-Y ;
-	if(-dy < m_drmin) break; 
-	if(-dy > m_drmax || (*r)->sur()==sur0) continue;
+	if (-dy < m_drmin) break;
+	if (-dy > m_drmax || (*r)->sur()==sur0) continue;
 
-	if(!pix && !(*r)->spacepoint->clusterList().second) continue;
-	if( pix &&  (*r)->spacepoint->clusterList().second) continue;
+	if (!pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( pix &&  (*r)->spacepoint->clusterList().second) continue;
 
 	float dx = (*r)->x()-X;
 	float dz = (*r)->z()-Z;
@@ -918,34 +904,34 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp
 	float dr = sqrt(r2)    ;
 	m_Tz[Nb]  =-dz*dr       ;
         
-	if(m_Tz[Nb]<m_dzdrmin || m_Tz[Nb]>m_dzdrmax) continue;
+	if (m_Tz[Nb]<m_dzdrmin || m_Tz[Nb]>m_dzdrmax) continue;
 	
-	m_SP[Nb] = (*r); 
+	m_SP[Nb] = (*r);
 	m_U [Nb] = x*r2;
 	m_V [Nb] = y*r2;
 	m_Er[Nb] = (covz0+m_SP[Nb]->covz()+m_Tz[Nb]*m_Tz[Nb]*(covr0+m_SP[Nb]->covr()))*r2;
 	m_R [Nb] = dr  ;
-	if(++Nb==m_maxsizeSP) goto breakb;
+	if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
 
-    if(!Nb || Nb==m_maxsizeSP) continue;
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float dy = (*r)->y()-Y ;
-	if(dy < m_drmin) {rt[i]=r; continue;}
-	if(dy>m_drmax) break;
-	if((*r)->sur()==sur0) continue;
+	if (dy < m_drmin) {rt[i]=r; continue;}
+	if (dy>m_drmax) break;
+	if ((*r)->sur()==sur0) continue;
 
-	if( pix &&  (*r)->spacepoint->clusterList().second) continue;
-	if(!pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( pix &&  (*r)->spacepoint->clusterList().second) continue;
+	if (!pix && !(*r)->spacepoint->clusterList().second) continue;
 
 	float dx = (*r)->x()-X ;
 	float dz = (*r)->z()-Z ;
@@ -955,42 +941,42 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp
 	float r2 = 1./(x*x+y*y);
 	float dr = sqrt(r2)    ;
 	m_Tz[Nt]  = dz*dr       ;
-	if(m_Tz[Nt]<m_dzdrmin || m_Tz[Nt]>m_dzdrmax) continue;
+	if (m_Tz[Nt]<m_dzdrmin || m_Tz[Nt]>m_dzdrmax) continue;
 	
 	m_SP[Nt] = (*r);
 	m_U [Nt] = x*r2;
 	m_V [Nt] = y*r2;
 	m_Er[Nt] = (covz0+m_SP[Nt]->covz()+m_Tz[Nt]*m_Tz[Nt]*(covr0+m_SP[Nt]->covr()))*r2;
-	m_R [Nt] = dr  ;  
-	if(++Nt==m_maxsizeSP) goto breakt;
+	m_R [Nt] = dr;
+	if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
 
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     // Three space points comparison
     //
-    for(int b=Nb-1; b>=0; --b) {
+    for (int b=Nb-1; b>=0; --b) {
       
       float SA  = 1.+m_Tz[b]*m_Tz[b];
       
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 
 	float Ts = .5*(m_Tz[b]+m_Tz[t]);
 	float dt =  m_Tz[b]-m_Tz[t]    ;
 	float dT = dt*dt-m_Er[b]-m_Er[t]-2.*m_R[b]*m_R[t]*(Ts*Ts*covr0+covz0);
-	if( dT > 0. && dT > (ipt*ipt)*COF*SA ) continue;
-	float dU = m_U[t]-m_U[b]; if(dU == 0.) continue;
+	if ( dT > 0. && dT > (ipt*ipt)*COF*SA ) continue;
+	float dU = m_U[t]-m_U[b]; if (dU == 0.) continue;
 	float A  = (m_V[t]-m_V[b])/dU                  ;
 	float B  =  m_V[t]-A*m_U[t]                    ;
 	float S2 = 1.+A*A                              ;
 	float S  = sqrt(S2)                            ;
 	float BK = fabs(B*K)                           ;
-	if(BK > ipt*S) continue                        ; // Momentum    cut
+	if (BK > ipt*S) continue                       ; // Momentum    cut
 	dT       -= ((BK*BK)*COF*SA/S2)                ;
-	if(dT > 0.) continue                           ; // Polar angle cut
+	if (dT > 0.) continue                          ; // Polar angle cut
 	dT*= ((m_R[b]*m_R[t])/(m_R[b]+m_R[t]));
 
 	newSeed(m_SP[b]->spacepoint,(*r0)->spacepoint,m_SP[t]->spacepoint,dT);
@@ -1014,13 +1000,14 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
   const float dFcut  = .96       ;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 	
-    bool                pix  = true; if((*r0)->spacepoint->clusterList().second) pix = false;
+    bool                pix  = true;
+    if ((*r0)->spacepoint->clusterList().second) pix = false;
     const Trk::Surface* sur0 = (*r0)->sur()  ;
     float              X    = (*r0)->x()    ;
     float              Y    = (*r0)->y()    ;
@@ -1032,17 +1019,17 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
 	
 	float dy = Y-(*r)->y() ;
-	if( dy < m_drmin) break; 
-	if( dy > m_drmax || (*r)->sur()==sur0) continue;
+	if ( dy < m_drmin) break;
+	if ( dy > m_drmax || (*r)->sur()==sur0) continue;
 
-	if(!pix && !(*r)->spacepoint->clusterList().second) continue;
-	if( pix &&  (*r)->spacepoint->clusterList().second) continue;
+	if (!pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( pix &&  (*r)->spacepoint->clusterList().second) continue;
 
 	float dx = X-(*r)->x()     ;
 	float dz = Z-(*r)->z()     ;
@@ -1050,34 +1037,34 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
 	float dr = sqrt(r2)        ;
 	m_Tz[Nb]  = dz*dr           ;
 	
-	if(m_Tz[Nb]<m_dzdrmin || m_Tz[Nb]>m_dzdrmax) continue;
+	if (m_Tz[Nb]<m_dzdrmin || m_Tz[Nb]>m_dzdrmax) continue;
 
-	m_SP[Nb] = (*r) ; 
+	m_SP[Nb] = (*r) ;
 	m_U [Nb] = dx*dr;
 	m_V [Nb] = dy*dr;
 	m_Er[Nb] = (covz0+m_SP[Nb]->covz()+m_Tz[Nb]*m_Tz[Nb]*(covr0+m_SP[Nb]->covr()))*r2;
 	m_R [Nb] = dr   ;
-	if(++Nb==m_maxsizeSP) goto breakb;
+	if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
 
-    if(!Nb || Nb==m_maxsizeSP) continue;
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float dy = (*r)->y()-Y ;
-	if(dy < m_drmin) {rt[i]=r; continue;}
-	if(dy>m_drmax) break;
-	if((*r)->sur()==sur0) continue;
+	if (dy < m_drmin) {rt[i]=r; continue;}
+	if (dy>m_drmax) break;
+	if ((*r)->sur()==sur0) continue;
 
-	if( pix &&  (*r)->spacepoint->clusterList().second) continue;
-	if(!pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( pix &&  (*r)->spacepoint->clusterList().second) continue;
+	if (!pix && !(*r)->spacepoint->clusterList().second) continue;
 
 	float dx = (*r)->x()-X     ;
 	float dz = (*r)->z()-Z     ;
@@ -1085,33 +1072,33 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
 	float dr = sqrt(r2)        ;
 	m_Tz[Nt]  = dz*dr           ;
 
-	if(m_Tz[Nt]<m_dzdrmin || m_Tz[Nt]>m_dzdrmax) continue;
+	if (m_Tz[Nt]<m_dzdrmin || m_Tz[Nt]>m_dzdrmax) continue;
 
-	m_SP[Nt] = (*r) ; 
+	m_SP[Nt] = (*r) ;
 	m_U [Nt] = dx*dr;
 	m_V [Nt] = dy*dr;
 	m_Er[Nt] = (covz0+m_SP[Nt]->covz()+m_Tz[Nt]*m_Tz[Nt]*(covr0+m_SP[Nt]->covr()))*r2;
 	m_R [Nt] = dr   ;
-	if(++Nt==m_maxsizeSP) goto breakt;
+	if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
 
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     // Three space points comparison
     //
-    for(int b=Nb-1; b>=0; --b) {
+    for (int b=Nb-1; b>=0; --b) {
       
       float SA  = 1.+m_Tz[b]*m_Tz[b];
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 
 	// Azimuth angle cut
 	//
 	float dF = m_U[b]*m_U[t]+m_V[b]*m_V[t];
-	if(dF < dFcut) continue;
+	if (dF < dFcut) continue;
 	
 	// Polar angle cut
 	//
@@ -1119,7 +1106,7 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
 	float dT =  m_Tz[b]-m_Tz[t]    ;
 	dT        = dT*dT-m_Er[b]-m_Er[t]-2.*m_R[b]*m_R[t]*(Ts*Ts*covr0+covz0);
 	dT       -= (ipt*ipt)*COF*SA    ;
-	if( dT > 0. ) continue          ;
+	if ( dT > 0. ) continue          ;
 
 	dT*= ((m_R[b]*m_R[t])/(m_R[b]+m_R[t]));
 
@@ -1135,11 +1122,130 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
 
 bool InDet::SiSpacePointsSeedMaker_Cosmic::isUsed(const Trk::SpacePoint* sp)
 {
-  const Trk::PrepRawData* d = sp->clusterList().first ; 
-  if(!d || !m_assoTool->isUsed(*d)) return false;
+  const Trk::PrepRawData* d = sp->clusterList().first;
+  if (!d || !m_assoTool->isUsed(*d)) return false;
 
   d = sp->clusterList().second;
-  if(!d || m_assoTool->isUsed(*d)) return true;
+  if (!d || m_assoTool->isUsed(*d)) return true;
 
   return false;
 }
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_Cosmic::next()
+{
+  if (m_i_seed==m_i_seede) return nullptr;
+  InDet::SiSpacePointsSeed* sp = (*m_i_seed).second;
+  ++m_i_seed;
+  return(sp);
+}
+    
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_Cosmic::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3] = {static_cast<float>(sp->globalPosition().x()),
+                static_cast<float>(sp->globalPosition().y()),
+                static_cast<float>(sp->globalPosition().z())};
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp, r);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New space point for seeds with error correction
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_Cosmic::newSpacePoint
+(const Trk::SpacePoint*const& sp,const float* sc) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3];
+  r[0]=sp->globalPosition().x();
+  r[1]=sp->globalPosition().y();
+  r[2]=sp->globalPosition().z();
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp, r, sc);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r, sc);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_Cosmic::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const float& z) 
+{
+  if (m_nseeds < m_maxsize) {
+    m_seeds[m_nseeds].erase     (  );
+    m_seeds[m_nseeds].add       (p1);
+    m_seeds[m_nseeds].add       (p2);
+    m_seeds[m_nseeds].setZVertex(0.);
+    m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
+    ++m_nseeds;
+  } else {
+    std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
+    if ((*l).first <= z) return;
+    InDet::SiSpacePointsSeed* s = (*l).second;
+    m_l_seeds.erase((*l).first);
+
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->setZVertex(0.);
+    m_l_seeds.insert(std::make_pair(z,s));
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// New 3 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_Cosmic::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const Trk::SpacePoint*& p3,const float& z) 
+{
+  if (m_nseeds < m_maxsize) {
+    m_seeds[m_nseeds].erase     (  );
+    m_seeds[m_nseeds].add       (p1);
+    m_seeds[m_nseeds].add       (p2);
+    m_seeds[m_nseeds].add       (p3);
+    m_seeds[m_nseeds].setZVertex(0.);
+    m_l_seeds.insert(std::make_pair(z,m_seeds+m_nseeds));
+    ++m_nseeds;
+  } else {
+    std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator l = m_l_seeds.rbegin();
+    if ((*l).first <= z) return;
+    InDet::SiSpacePointsSeed* s = (*l).second;
+    m_l_seeds.erase((*l).first);
+
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(0.);
+    m_l_seeds.insert(std::make_pair(z,s));
+  }
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
index c15057cfe539..00d91ac47412 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
@@ -34,31 +34,30 @@ InDet::SiSpacePointsSeedMaker_HeavyIon::SiSpacePointsSeedMaker_HeavyIon
 
 InDet::SiSpacePointsSeedMaker_HeavyIon::~SiSpacePointsSeedMaker_HeavyIon()
 {
-  if(m_r_index ) delete [] m_r_index ;
-  if(m_r_map   ) delete [] m_r_map   ; 
-  if(m_r_Sorted) delete [] m_r_Sorted;
+  delete [] m_r_index ;
+  delete [] m_r_map   ;
+  delete [] m_r_Sorted;
 
   // Delete seeds
   //
-  for(m_i_seed=m_l_seeds.begin(); m_i_seed!=m_l_seeds.end (); ++m_i_seed) {
-    delete *m_i_seed;
+  for (InDet::SiSpacePointsSeed* seed: m_l_seeds) {
+    delete seed;
   }
   // Delete space points for reconstruction
   //
-  m_i_spforseed=m_l_spforseed.begin();
-  for(; m_i_spforseed!=m_l_spforseed.end(); ++m_i_spforseed) {
-    delete *m_i_spforseed;
-  } 
+  for (InDet::SiSpacePointForSeed* spforseed: m_l_spforseed) {
+    delete spforseed;
+  }
 
-  if(m_SP) delete [] m_SP;
-  if(m_R ) delete [] m_R ;
-  if(m_Tz) delete [] m_Tz;
-  if(m_Er) delete [] m_Er;
-  if(m_U ) delete [] m_U ;
-  if(m_V ) delete [] m_V ;
-  if(m_Zo) delete [] m_Zo;
-  if(m_OneSeeds) delete [] m_OneSeeds;
- }
+  delete [] m_SP;
+  delete [] m_R ;
+  delete [] m_Tz;
+  delete [] m_Er;
+  delete [] m_U ;
+  delete [] m_V ;
+  delete [] m_Zo;
+  delete [] m_OneSeeds;
+}
 
 ///////////////////////////////////////////////////////////////////
 // Initialisation
@@ -66,7 +65,7 @@ InDet::SiSpacePointsSeedMaker_HeavyIon::~SiSpacePointsSeedMaker_HeavyIon()
 
 StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
   ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
@@ -78,7 +77,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::initialize()
 
   // Get magnetic field service
   //
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ){
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
@@ -91,8 +90,9 @@ StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::initialize()
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
-  if(m_outputlevel<=0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=0;
+    ATH_MSG_DEBUG(*this);
   }
   return sc;
 }
@@ -103,7 +103,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::initialize()
 
 StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -113,16 +113,18 @@ StatusCode InDet::SiSpacePointsSeedMaker_HeavyIon::finalize()
 void InDet::SiSpacePointsSeedMaker_HeavyIon::newEvent (int)
 {
   m_trigger = false;
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
   }
-  else m_K = 2./(300.* 5. );
 
   m_i_spforseed   = m_l_spforseed.begin();
 
@@ -131,27 +133,22 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newEvent (int)
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel) {
+  if (m_pixel) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      for(; spc != spce; ++spc) {
-
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
-	  
-	  float r = (*sp)->r(); if(r < 43. || r>=m_r_rmax) continue;
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+    if (spacepointsPixel.isValid()) {
+
+      for (const SpacePointCollection* spc: *spacepointsPixel) {
+        for (const Trk::SpacePoint* sp: *spc) {	  
+	  float r = sp->r();
+          if (r < 43. || r>=m_r_rmax) continue;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -160,27 +157,23 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newEvent (int)
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct) {
+  if (m_sct) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
+    if (spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      for(; spc != spce; ++spc) {
-
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
+      for (const SpacePointCollection* spc: *spacepointsSCT) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -197,17 +190,19 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
 (const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT)
 {
   m_trigger = false;
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
 
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
   }
-  else m_K = 2./(300.* 5. );
  
   m_i_spforseed = m_l_spforseed.begin();
 
@@ -216,31 +211,26 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
  
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel && vPixel.size()) {
+  if (m_pixel && vPixel.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
+    if (spacepointsPixel.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-	
-	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -249,31 +239,26 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct && vSCT.size()) {
+  if (m_sct && vSCT.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
+    if (spacepointsSCT.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-
-	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vSCT) {
+	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -299,12 +284,13 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newRegion
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::find2Sp(const std::list<Trk::Vertex>& lv) 
 {
-  lv.empty() ? m_izvertex = false : m_izvertex = true;  
+  lv.empty() ? m_izvertex = false : m_izvertex = true;
 
-  int mode; lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
+  int mode;
+  lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin();
     m_state   = 1   ;
@@ -319,8 +305,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::find2Sp(const std::list<Trk::Vertex
   }
   m_i_seed  = m_l_seeds.begin();
   
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -331,12 +318,13 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::find2Sp(const std::list<Trk::Vertex
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::find3Sp(const std::list<Trk::Vertex>& lv) 
 {
-  lv.empty() ? m_izvertex = false : m_izvertex = true;  
+  lv.empty() ? m_izvertex = false : m_izvertex = true;
 
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 3 : mode = 2;
   bool newv = newVertices(lv);
 
-  if(newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -351,8 +339,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::find3Sp(const std::list<Trk::Vertex
   }
   m_i_seed  = m_l_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -370,10 +359,11 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::find3Sp(const std::list<Trk::Vertex
 void InDet::SiSpacePointsSeedMaker_HeavyIon::findVSp (const std::list<Trk::Vertex>& lv)
 {
 
-  int mode; lv.begin()!=lv.end() ? mode = 6 : mode = 5; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -388,8 +378,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::findVSp (const std::list<Trk::Verte
   }
   m_i_seed  = m_l_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -399,7 +390,7 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::findVSp (const std::list<Trk::Verte
 
 MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dump( MsgStream& out ) const
 {
-  if(m_nprint)  return dumpEvent(out);
+  if (m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -410,134 +401,134 @@ MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dump( MsgStream& out ) const
 MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dumpConditions( MsgStream& out ) const
 {
   int n = 42-m_spacepointsPixel.key().size();
-  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
+  std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 42-m_spacepointsSCT.key().size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
   n     = 42-m_spacepointsOverlap.key().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
+  std::string s5; for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(4)<<m_r1max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ    impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ/dR impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzdrver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact pps    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diverpps
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact sss    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diversss
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Beam X center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Y center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Z center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam X-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Y-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Z-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -547,54 +538,22 @@ MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dumpConditions( MsgStream& ou
 
 MsgStream& InDet::SiSpacePointsSeedMaker_HeavyIon::dumpEvent( MsgStream& out ) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsazv                 | "
      <<std::setw(12)<<m_nsazv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
-  /*
-  if(m_outputlevel==0) return out; 
-
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-
-  out<<"|  Azimuthal  |    n   | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4]  |";
-  out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |"
-     <<std::endl;
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  
-  float sF1 = pi2/float(m_fNmax+1);
-  
-  
-  for(int f=0; f<=m_fNmax; ++f) {
-    out<<"|  "
-       <<std::setw(10)<<std::setprecision(4)<<sF1*float(f)<<" | "
-       <<std::setw(6)<<rf_map[f]<<" |";
-    for(int z=0; z!=11; ++z) {
-      out<<std::setw(6)<<rfz_map[(f*11+z)]<<" |";
-    }
-    out<<std::endl;
-  } 
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  out<<std::endl;
-  */
+     <<endmsg;
   return out;
 }
 
@@ -612,9 +571,9 @@ std::ostream& InDet::SiSpacePointsSeedMaker_HeavyIon::dump( std::ostream& out )
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiSpacePointsSeedMaker_HeavyIon& se)
+(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_HeavyIon& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -622,9 +581,9 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiSpacePointsSeedMaker_HeavyIon& se)
+(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_HeavyIon& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }   
 
 ///////////////////////////////////////////////////////////////////
@@ -633,12 +592,12 @@ std::ostream& InDet::operator <<
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::findNext () 
 {
-  if(m_endlist) return;
+  if (m_endlist) return;
 
   m_i_seede = m_l_seeds.begin();
-  if     (m_mode==0 || m_mode==1) production2Sp ();
-  else if(m_mode==2 || m_mode==3) production3Sp ();
-  else if(m_mode==5 || m_mode==6) production3Sp ();
+  if      (m_mode==0 || m_mode==1) production2Sp ();
+  else if (m_mode==2 || m_mode==3) production3Sp ();
+  else if (m_mode==5 || m_mode==6) production3Sp ();
 
   m_i_seed  = m_l_seeds.begin();
   ++m_nlist;
@@ -650,17 +609,17 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::findNext ()
 
 bool InDet::SiSpacePointsSeedMaker_HeavyIon::newVertices(const std::list<Trk::Vertex>& lV)
 {
-  unsigned int s1 = m_l_vertex.size(); 
-  unsigned int s2 = lV      .size(); 
+  unsigned int s1 = m_l_vertex.size();
+  unsigned int s2 = lV.size();
 
-  if(s1==0 && s2==0) return false;
+  if (s1==0 && s2==0) return false;
 
   std::list<Trk::Vertex>::const_iterator v;
   m_l_vertex.erase(m_l_vertex.begin(),m_l_vertex.end());
 
-  for(v=lV.begin(); v!=lV.end(); ++v) {
-    m_l_vertex.push_back(float((*v).position().z()));
-    if(m_l_vertex.size() >= m_maxNumberVertices) break;
+  for (v=lV.begin(); v!=lV.end(); ++v) {
+    m_l_vertex.push_back(static_cast<float>((*v).position().z()));
+    if (m_l_vertex.size() >= m_maxNumberVertices) break;
   }
   return false;
 }
@@ -671,11 +630,12 @@ bool InDet::SiSpacePointsSeedMaker_HeavyIon::newVertices(const std::list<Trk::Ve
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::buildFrameWork() 
 {
-  m_ptmin     = fabs(m_ptmin)                  ;  if(m_ptmin < 100.) m_ptmin = 100.;
+  m_ptmin     = fabs(m_ptmin)                  ;
+  if (m_ptmin < 100.) m_ptmin = 100.;
   m_rapcut    = fabs(m_rapcut)                 ;
-  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut))); 
+  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut)));
   m_dzdrmin   =-m_dzdrmax                      ;
-  m_r3max     = m_r_rmax                         ; 
+  m_r3max     = m_r_rmax                       ;
   m_COF       =  134*.05*9.                    ;
   m_ipt       = 1./fabs(.9*m_ptmin)            ;
   m_ipt2      = m_ipt*m_ipt                    ;
@@ -685,133 +645,148 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::buildFrameWork()
 
   // Build radius sorted containers
   //
-  m_r_size = int((m_r_rmax+.1)/m_r_rstep);
+  m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep);
   m_r_Sorted = new std::list<InDet::SiSpacePointForSeed*>[m_r_size];
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
-  m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
+  m_r_map    = new int[m_r_size];
+  m_nr = 0;
+  for (int i=0; i!=m_r_size; ++i) {
+    m_r_index[i]=0;
+    m_r_map[i]=0;
+  }
 
   // Build radius-azimuthal sorted containers
   //
   const float pi2     = 2.*M_PI            ;
   const int   NFmax    = 53                ;
-  const float sFmax   = float(NFmax )/pi2;
+  const float sFmax   = static_cast<float>(NFmax )/pi2;
   const float sFmin = 100./60.          ;
 
-  m_sF        = m_ptmin /60. ; if(m_sF    >sFmax ) m_sF    = sFmax  ; else if(m_sF < sFmin) m_sF = sFmin;
-  m_fNmax     = int(pi2*m_sF); if(m_fNmax >=NFmax) m_fNmax = NFmax-1;
+  m_sF        = m_ptmin /60. ;
+  if (m_sF    >sFmax ) m_sF    = sFmax  ;
+  else if (m_sF < sFmin) m_sF = sFmin;
+  m_fNmax     = static_cast<int>(pi2*m_sF);
+  if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
 
   // Build radius-azimuthal-Z sorted containers
   //
-  m_nrfz  = 0; for(int i=0; i!=583; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
+  m_nrfz  = 0;
+  for (int i=0; i!=583; ++i) {
+    m_rfz_index [i]=0;
+    m_rfz_map [i]=0;
+  }
 
   // Build radius-azimuthal-Z sorted containers for Z-vertices
   //
-  const int   NFtmax  = 100               ;
-  const float sFvmax = float(NFtmax)/pi2;
-  m_sFv       = m_ptmin/120.  ; if(m_sFv   >sFvmax)  m_sFv    = sFvmax; 
-  m_fvNmax    = int(pi2*m_sFv); if(m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1;
-  m_nrfzv = 0; for(int i=0; i!=300; ++i) {m_rfzv_index[i]=0; m_rfzv_map[i]=0;}
+  const int   NFtmax = 100               ;
+  const float sFvmax = static_cast<float>(NFtmax)/pi2;
+  m_sFv       = m_ptmin/120.;
+  if (m_sFv   >sFvmax)  m_sFv    = sFvmax; 
+  m_fvNmax    = static_cast<int>(pi2*m_sFv);
+  if (m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1;
+  m_nrfzv = 0;
+  for (int i=0; i!=300; ++i) {
+    m_rfzv_index[i]=0;
+    m_rfzv_map[i]=0;
+  }
 
   // Build maps for radius-azimuthal-Z sorted collections 
   //
-  for(int f=0; f<=m_fNmax; ++f) {
+  for (int f=0; f<=m_fNmax; ++f) {
 
-    int fb = f-1; if(fb<0      ) fb=m_fNmax; 
-    int ft = f+1; if(ft>m_fNmax) ft=0; 
+    int fb = f-1;
+    if (fb<0) fb = m_fNmax;
+    int ft = f+1;
+    if (ft>m_fNmax) ft = 0;
     
     // For each azimuthal region loop through all Z regions
     //
-    for(int z=0; z!=11; ++z) {
+    for (int z=0; z!=11; ++z) {
  
       int a        = f *11+z;
       int b        = fb*11+z;
       int c        = ft*11+z;
       m_rfz_b [a]    = 3; m_rfz_t [a]    = 3;
-      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; 
-      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; 
-      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; 
-      if     (z==5) {
+      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
+      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
+      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
+      if (z==5) {
 
 	m_rfz_t [a]    = 9 ;
-	m_rfz_it[a][3] = a+1; 
-	m_rfz_it[a][4] = b+1; 
-	m_rfz_it[a][5] = c+1; 
-	m_rfz_it[a][6] = a-1; 
-	m_rfz_it[a][7] = b-1; 
-	m_rfz_it[a][8] = c-1; 
-      }
-      else if(z> 5) {
+	m_rfz_it[a][3] = a+1;
+	m_rfz_it[a][4] = b+1;
+	m_rfz_it[a][5] = c+1;
+	m_rfz_it[a][6] = a-1;
+	m_rfz_it[a][7] = b-1;
+	m_rfz_it[a][8] = c-1;
+      } else if (z> 5) {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a-1; 
-	m_rfz_ib[a][4] = b-1; 
-	m_rfz_ib[a][5] = c-1; 
+	m_rfz_ib[a][3] = a-1;
+	m_rfz_ib[a][4] = b-1;
+	m_rfz_ib[a][5] = c-1;
 
-	if(z<10) {
+	if (z<10) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a+1; 
-	  m_rfz_it[a][4] = b+1; 
-	  m_rfz_it[a][5] = c+1; 
+	  m_rfz_it[a][3] = a+1;
+	  m_rfz_it[a][4] = b+1;
+	  m_rfz_it[a][5] = c+1;
 	}
-      }
-      else {
+      } else {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a+1; 
-	m_rfz_ib[a][4] = b+1; 
-	m_rfz_ib[a][5] = c+1; 
+	m_rfz_ib[a][3] = a+1;
+	m_rfz_ib[a][4] = b+1;
+	m_rfz_ib[a][5] = c+1;
 
-	if(z>0) {
+	if (z>0) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a-1; 
-	  m_rfz_it[a][4] = b-1; 
-	  m_rfz_it[a][5] = c-1; 
+	  m_rfz_it[a][3] = a-1;
+	  m_rfz_it[a][4] = b-1;
+	  m_rfz_it[a][5] = c-1;
 	}
       }
 
-      if     (z==3) {
+      if (z==3) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a+2; 
-	m_rfz_ib[a][7] = b+2; 
-	m_rfz_ib[a][8] = c+2; 
-      }
-      else if(z==7) {
+	m_rfz_ib[a][6] = a+2;
+	m_rfz_ib[a][7] = b+2;
+	m_rfz_ib[a][8] = c+2;
+      } else if (z==7) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a-2; 
-	m_rfz_ib[a][7] = b-2; 
-	m_rfz_ib[a][8] = c-2; 
+	m_rfz_ib[a][6] = a-2;
+	m_rfz_ib[a][7] = b-2;
+	m_rfz_ib[a][8] = c-2;
       }
     }
   }
 
   // Build maps for radius-azimuthal-Z sorted collections for Z
   //
-  for(int f=0; f<=m_fvNmax; ++f) {
+  for (int f=0; f<=m_fvNmax; ++f) {
 
-    int fb = f-1; if(fb<0       ) fb=m_fvNmax; 
-    int ft = f+1; if(ft>m_fvNmax) ft=0; 
+    int fb = f-1; if (fb<0       ) fb=m_fvNmax;
+    int ft = f+1; if (ft>m_fvNmax) ft=0;
     
     // For each azimuthal region loop through central Z regions
     //
-    for(int z=0; z!=3; ++z) {
+    for (int z=0; z!=3; ++z) {
       
-      int a  = f *3+z; 
+      int a  = f *3+z;
       int b  = fb*3+z;
       int c  = ft*3+z;
       m_rfzv_n[a]    = 3;
       m_rfzv_i[a][0] = a;
       m_rfzv_i[a][1] = b;
       m_rfzv_i[a][2] = c;
-      if     (z>1) {
+      if (z>1) {
 	m_rfzv_n[a]    = 6;
 	m_rfzv_i[a][3] = a-1;
 	m_rfzv_i[a][4] = b-1;
 	m_rfzv_i[a][5] = c-1;
-      }
-      else if(z<1) {
+      } else if (z<1) {
 	m_rfzv_n[a]    = 6;
 	m_rfzv_i[a][3] = a+1;
 	m_rfzv_i[a][4] = b+1;
@@ -820,14 +795,14 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::buildFrameWork()
     }
   }
   
-  if(!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
-  if(!m_R ) m_R    = new                      float[m_maxsizeSP];
-  if(!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
-  if(!m_Er) m_Er   = new                      float[m_maxsizeSP];
-  if(!m_U ) m_U    = new                      float[m_maxsizeSP]; 
-  if(!m_V ) m_V    = new                      float[m_maxsizeSP];
-  if(!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
-  if(!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsSeed [m_maxOneSize];  
+  if (!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
+  if (!m_R ) m_R    = new                      float[m_maxsizeSP];
+  if (!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
+  if (!m_Er) m_Er   = new                      float[m_maxsizeSP];
+  if (!m_U ) m_U    = new                      float[m_maxsizeSP];
+  if (!m_V ) m_V    = new                      float[m_maxsizeSP];
+  if (!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
+  if (!m_OneSeeds) m_OneSeeds = new InDet::SiSpacePointsSeed[m_maxOneSize];
 
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
@@ -852,20 +827,20 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::buildBeamFrameWork()
   double sinp = sin(ph);
   double cosp = cos(ph);
   
-  m_xbeam[0] = float(cb.x())                  ; 
-  m_xbeam[1] = float(cost*cosp*cosp+sinp*sinp);
-  m_xbeam[2] = float(cost*sinp*cosp-sinp*cosp);
-  m_xbeam[3] =-float(sint*cosp               );
+  m_xbeam[0] = static_cast<float>(cb.x())                  ;
+  m_xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp);
+  m_xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp);
+  m_xbeam[3] =-static_cast<float>(sint*cosp               );
   
-  m_ybeam[0] = float(cb.y())                  ; 
-  m_ybeam[1] = float(cost*cosp*sinp-sinp*cosp);
-  m_ybeam[2] = float(cost*sinp*sinp+cosp*cosp);
-  m_ybeam[3] =-float(sint*sinp               );
+  m_ybeam[0] = static_cast<float>(cb.y())                  ;
+  m_ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp);
+  m_ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp);
+  m_ybeam[3] =-static_cast<float>(sint*sinp               );
   
-  m_zbeam[0] = float(cb.z())                  ; 
-  m_zbeam[1] = float(sint*cosp)               ;
-  m_zbeam[2] = float(sint*sinp)               ;
-  m_zbeam[3] = float(cost)                    ;
+  m_zbeam[0] = static_cast<float>(cb.z())                  ;
+  m_zbeam[1] = static_cast<float>(sint*cosp)               ;
+  m_zbeam[2] = static_cast<float>(sint*sinp)               ;
+  m_zbeam[3] = static_cast<float>(cost)                    ;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -875,9 +850,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::buildBeamFrameWork()
 void  InDet::SiSpacePointsSeedMaker_HeavyIon::convertToBeamFrameWork
 (const Trk::SpacePoint*const& sp,float* r) 
 {
-  r[0] = float(sp->globalPosition().x())-m_xbeam[0];
-  r[1] = float(sp->globalPosition().y())-m_ybeam[0];
-  r[2] = float(sp->globalPosition().z())-m_zbeam[0];
+  r[0] = static_cast<float>(sp->globalPosition().x())-m_xbeam[0];
+  r[1] = static_cast<float>(sp->globalPosition().y())-m_ybeam[0];
+  r[2] = static_cast<float>(sp->globalPosition().z())-m_zbeam[0];
 }
    
 ///////////////////////////////////////////////////////////////////
@@ -889,48 +864,48 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::fillLists()
   const float pi2 = 2.*M_PI;
   std::list<InDet::SiSpacePointForSeed*>::iterator r;
   
-  for(int i=0; i!= m_r_size;  ++i) {
+  for (int i=0; i!= m_r_size;  ++i) {
 
-    if(!m_r_map[i]) continue;
+    if (!m_r_map[i]) continue;
     r = m_r_Sorted[i].begin();
 
-    while(r!=m_r_Sorted[i].end()) {
+    while (r!=m_r_Sorted[i].end()) {
       
       // Azimuthal angle sort
       //
-      float F = (*r)->phi(); if(F<0.) F+=pi2;
+      float F = (*r)->phi(); if (F<0.) F+=pi2;
 
-      int   f = int(F*m_sF);
-      if (f < 0)
-        f = m_fNmax;
-      else if (f > m_fNmax)
-        f = 0;
+      int   f = static_cast<int>(F*m_sF);
+      if (f < 0) f = m_fNmax;
+      else if (f > m_fNmax) f = 0;
 
-      int z; float Z = (*r)->z();
+      int z;
+      float Z = (*r)->z();
 
       // Azimuthal angle and Z-coordinate sort
       //
-      if(Z>0.) {
+      if (Z>0.) {
 	Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10;
-      }
-      else     {
+      } else {
 	Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0;
       }
-      int n = f*11+z; ++m_nsaz;
-      m_rfz_Sorted[n].push_back(*r); if(!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
+      int n = f*11+z;
+      ++m_nsaz;
+      m_rfz_Sorted[n].push_back(*r);
+      if (!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
 
-      if((*r)->spacepoint->clusterList().second == 0 && z>=3 && z<=7) { 
+      if ((*r)->spacepoint->clusterList().second == 0 && z>=3 && z<=7) { 
 	z<=4 ? z=0 : z>=6 ? z=2 : z=1;
 	
 	// Azimuthal angle and Z-coordinate sort for fast vertex search
 	//
-	f = int(F*m_sFv);
-        if (f < 0)
-          f += m_fvNmax;
-        else if (f> m_fvNmax)
-          f -= m_fvNmax;
-	n = f*3+z; ++m_nsazv;
-	m_rfzv_Sorted[n].push_back(*r); if(!m_rfzv_map[n]++) m_rfzv_index[m_nrfzv++] = n;
+	f = static_cast<int>(F*m_sFv);
+        if (f < 0) f += m_fvNmax;
+        else if (f> m_fvNmax) f -= m_fvNmax;
+	n = f*3+z;
+        ++m_nsazv;
+	m_rfzv_Sorted[n].push_back(*r);
+        if (!m_rfzv_map[n]++) m_rfzv_index[m_nrfzv++] = n;
       }
       m_r_Sorted[i].erase(r++);
     }
@@ -946,18 +921,21 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::fillLists()
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::erase()
 {
-  for(int i=0; i!=m_nr;    ++i) {
-    int n = m_r_index[i]; m_r_map[n] = 0;
+  for (int i=0; i!=m_nr;    ++i) {
+    int n = m_r_index[i];
+    m_r_map[n] = 0;
     m_r_Sorted[n].clear();
   }
 
-  for(int i=0; i!=m_nrfz;  ++i) {
-    int n = m_rfz_index[i]; m_rfz_map[n] = 0;
+  for (int i=0; i!=m_nrfz;  ++i) {
+    int n = m_rfz_index[i];
+    m_rfz_map[n] = 0;
     m_rfz_Sorted[n].clear();
   }
 
-  for(int i=0; i!=m_nrfzv; ++i) {
-    int n = m_rfzv_index[i]; m_rfzv_map[n] = 0;
+  for (int i=0; i!=m_nrfzv; ++i) {
+    int n = m_rfzv_index[i];
+    m_rfzv_map[n] = 0;
     m_rfzv_Sorted[n].clear();
   }
   m_state = 0;
@@ -975,35 +953,37 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::erase()
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::production2Sp()
 {
-  if(m_nsazv<2) return;
+  if (m_nsazv<2) return;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0,r0e,r,re;
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fvNmin; f<=m_fvNmax; ++f) {
+  for (int f=m_fvNmin; f<=m_fvNmax; ++f) {
 
     // For each azimuthal region loop through Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
-    for(; z!=3; ++z) {
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
+    for (; z!=3; ++z) {
       
-      int a  = f*3+z;  if(!m_rfzv_map[a]) continue; 
-      r0  = m_rfzv_Sorted[a].begin(); 
-      r0e = m_rfzv_Sorted[a].end  (); 
+      int a  = f*3+z;
+      if (!m_rfzv_map[a]) continue;
+      r0  = m_rfzv_Sorted[a].begin();
+      r0e = m_rfzv_Sorted[a].end  ();
 
-      if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+      if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
       // Loop through trigger space points
       //
-      for(; r0!=r0e; ++r0) {
+      for (; r0!=r0e; ++r0) {
 
 	float X  = (*r0)->x();
 	float Y  = (*r0)->y();
 	float R  = (*r0)->radius();
-	if(R<m_r2minv) continue;
-        if(R>m_r2maxv) break;
+	if (R<m_r2minv) continue;
+        if (R>m_r2maxv) break;
 	float Z  = (*r0)->z();
 	float ax = X/R;
 	float ay = Y/R;
@@ -1011,50 +991,54 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production2Sp()
 	// Bottom links production
 	//
 	int NB = m_rfzv_n[a];
-	for(int i=0; i!=NB; ++i) {
+	for (int i=0; i!=NB; ++i) {
 	  
 	  int an = m_rfzv_i[a][i];
-	  if(!m_rfzv_map[an]) continue; 
+	  if (!m_rfzv_map[an]) continue;
 
 	  r  =  m_rfzv_Sorted[an].begin();
 	  re =  m_rfzv_Sorted[an].end  ();
 	  
-	  for(; r!=re; ++r) {
+	  for (; r!=re; ++r) {
 	    
 	    float Rb =(*r)->radius();
-	    if(Rb<m_r1minv) continue;
-            if(Rb>m_r1maxv) break;
-	    float dR = R-Rb; 
-	    if(dR<m_drminv) break;
-            if(dR>m_drmax) continue;
+	    if (Rb<m_r1minv) continue;
+            if (Rb>m_r1maxv) break;
+	    float dR = R-Rb;
+	    if (dR<m_drminv) break;
+            if (dR>m_drmax) continue;
 	    float dZ = Z-(*r)->z();
-	    float Tz = dZ/dR; if(Tz<m_dzdrmin || Tz>m_dzdrmax) continue;
-	    float Zo = Z-R*Tz;	          
+	    float Tz = dZ/dR;
+            if (Tz<m_dzdrmin || Tz>m_dzdrmax) continue;
+	    float Zo = Z-R*Tz;
 
 	    // Comparison with vertices Z coordinates
 	    //
-	    if(!isZCompatible(Zo,Rb,Tz)) continue;
+	    if (!isZCompatible(Zo,Rb,Tz)) continue;
 
 	    // Momentum cut
 	    //
-	    float dx =(*r)->x()-X; 
-	    float dy =(*r)->y()-Y; 
+	    float dx =(*r)->x()-X;
+	    float dy =(*r)->y()-Y;
 	    float x  = dx*ax+dy*ay          ;
 	    float y  =-dx*ay+dy*ax          ;
-	    float xy = x*x+y*y              ; if(xy == 0.) continue;
+	    float xy = x*x+y*y              ; if (xy == 0.) continue;
 	    float r2 = 1./xy                ;
 	    float Ut = x*r2                 ;
 	    float Vt = y*r2                 ;
-	    float UR = Ut*R+1.              ; if(UR == 0.) continue;
+	    float UR = Ut*R+1.              ; if (UR == 0.) continue;
 	    float A  = Vt*R/UR              ;
 	    float B  = Vt-A*Ut              ;
-	    if(fabs(B*m_K) > m_ipt*sqrt(1.+A*A)) continue;
+	    if (fabs(B*m_K) > m_ipt*sqrt(1.+A*A)) continue;
             ++nseed;
 	    newSeed((*r)->spacepoint,(*r0)->spacepoint,Zo);
 	  }
 	}
-	if(nseed < m_maxsize) continue; 
-	m_endlist=false; m_rMin = (++r0); m_fvNmin=f; m_zMin=z; 
+	if (nseed < m_maxsize) continue;
+	m_endlist=false;
+        m_rMin = (++r0);
+        m_fvNmin=f;
+        m_zMin=z;
 	return;
       }
     }
@@ -1068,44 +1052,47 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production2Sp()
 
 void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp()
 { 
-  if(m_nsaz<3) return;
+  if (m_nsaz<3) return;
 
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
-      int a  = f *11+ZI[z];  if(!m_rfz_map[a]) continue;
+      int a  = f *11+ZI[z];
+      if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
-	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rb [NB] = m_rfz_Sorted[an].begin();
+        rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
-	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rt [NT] = m_rfz_Sorted[an].begin();
+        rte[NT++] = m_rfz_Sorted[an].end();
       } 
-      if(m_izvertex) {
-	if(!m_trigger) production3Sp       (rb,rbe,rt,rte,NB,NT,nseed);
-	else           production3SpTrigger(rb,rbe,rt,rte,NB,NT,nseed);
-      }
-      else          {
+      if (m_izvertex) {
+	if (!m_trigger) production3Sp       (rb,rbe,rt,rte,NB,NT,nseed);
+	else            production3SpTrigger(rb,rbe,rt,rte,NB,NT,nseed);
+      } else {
 	production3SpNoVertex(rb,rbe,rt,rte,NB,NT,nseed);
       }
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
+      if (!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
     }
   }
   m_endlist = true;
@@ -1123,19 +1110,19 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float R  = (*r0)->radius(); 
+    float R  = (*r0)->radius();
 
     const Trk::SpacePoint* SP0 = (*r0)->spacepoint;
-    if(SP0->clusterList().second) break;
+    if (SP0->clusterList().second) break;
 
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
@@ -1145,54 +1132,62 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
-	float dR = R-Rb; 
-	if(dR > m_drmax) {rb[i]=r; continue;}
-	if(dR < m_drmin) break;
-	if((*r)->sur()==sur0) continue;
+	float Rb =(*r)->radius();
+	float dR = R-Rb;
+	if (dR > m_drmax) {rb[i]=r; continue;}
+	if (dR < m_drmin) break;
+	if ((*r)->sur()==sur0) continue;
 
-	float Tz = (Z-(*r)->z())/dR; 
+	float Tz = (Z-(*r)->z())/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 	
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rb,Tz)) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rb,Tz)) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin) {rt[i]=r; continue;}
-	if(dR>m_drmax) break;
-	if( (*r)->sur()==sur0) continue;
+	float dR = Rt-R;
+        if (dR<m_drmin) {
+          rt[i]=r;
+          continue;
+        }
+	if (dR>m_drmax) break;
+	if ( (*r)->sur()==sur0) continue;
 
-	float Tz = ((*r)->z()-Z)/dR; 
+	float Tz = ((*r)->z()-Z)/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,R ,Tz)) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,R ,Tz)) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
@@ -1200,9 +1195,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeed* sp = m_SP[i];  
+      InDet::SiSpacePointForSeed* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1211,7 +1206,8 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp
       float y   =-dx*ay+dy*ax ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1228,12 +1224,12 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp
     float COF   = m_COF     ;
     float ipt2K = ipt2/K2   ;
     float ipt2C = ipt2*COF  ;
-    float COFK  = COF*K2    ;  
+    float COFK  = COF*K2    ;
     covr0      *= 2.        ;
     covz0      *= 2.        ;
 
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       const Trk::SpacePoint* SPb = m_SP[b]->spacepoint;
  
@@ -1250,27 +1246,33 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3Sp
       float dZ    = dZVertexMin(Zob);
       float Iz    = (dZ*dZ)/Tzb2 ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 	
 	float Ts  = .5*(Tzb+m_Tz[t])                          ;
 	float dt  =     Tzb-m_Tz[t]                           ;
 	float dT  = dt*dt-Erb-m_Er[t]-m_R[t]*(Ts*Ts*Rb2r+Rb2z);
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ; 
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub; if (dU == 0.) continue ;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
-	float Im  = fabs((A-B*R)*R)                  ; 
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	float Im  = fabs((A-B*R)*R)                  ;
 
-	if( Im > imc ) continue;
+	if ( Im > imc ) continue;
 	Im = Im*Im+Iz;
 	newOneSeed(SPb,SP0,m_SP[t]->spacepoint,Zob,Im);
       }
     }
-    nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    nseed += m_mapOneSeeds.size();
+    fillSeeds();
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    } 
   }
 }
 
@@ -1285,22 +1287,23 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpTrigger
   std::list<InDet::SiSpacePointForSeed*>::iterator* rte,
   int NB, int NT, int& nseed) 
 {
-  const float pi = M_PI, pi2 = 2.*pi; 
+  const float pi = M_PI, pi2 = 2.*pi;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float R  = (*r0)->radius(); 
+    float R  = (*r0)->radius();
 
     const Trk::SpacePoint* SP0 = (*r0)->spacepoint;
-    bool pix = true; if(SP0->clusterList().second) pix = false;
+    bool pix = true;
+    if (SP0->clusterList().second) pix = false;
 
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
@@ -1310,63 +1313,72 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpTrigger
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
+	float Rb =(*r)->radius();
 
-	float dR = R-Rb; 
-	if(dR<m_drmin) break;
-	if(dR > m_drmax) {rb[i]=r; continue;}
+	float dR = R-Rb;
+	if (dR<m_drmin) break;
+	if (dR > m_drmax) {rb[i]=r; continue;}
 
-	if((*r)->sur()==sur0) continue;
-	if(!pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ((*r)->sur()==sur0) continue;
+	if (!pix && !(*r)->spacepoint->clusterList().second) continue;
 
-	float Tz = (Z-(*r)->z())/dR; 
+	float Tz = (Z-(*r)->z())/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 	
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rb,Tz)) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rb,Tz)) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin) {rt[i]=r; continue;}
-	if(dR>m_drmax) break;
+	float dR = Rt-R;
+        if (dR<m_drmin) {
+          rt[i]=r;
+          continue;
+        }
+	if (dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0) continue;
+	if ( (*r)->sur()==sur0) continue;
 
-	float Tz = ((*r)->z()-Z)/dR; 
+	float Tz = ((*r)->z()-Z)/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,R,Tz)) continue;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,R,Tz)) continue;
 	
 	// Polar angle test
 	//
-	Zo = (*r)->z()+(550.-Rt)*Tz; if( Zo < m_zminU || Zo > m_zmaxU) continue;
+	Zo = (*r)->z()+(550.-Rt)*Tz;
+        if ( Zo < m_zminU || Zo > m_zmaxU) continue;
 	
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
@@ -1374,9 +1386,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpTrigger
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeed* sp = m_SP[i];  
+      InDet::SiSpacePointForSeed* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1385,7 +1397,8 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpTrigger
       float y   =-dx*ay+dy*ax ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1402,13 +1415,13 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpTrigger
     float COF   = m_COF     ;
     float ipt2K = ipt2/K2   ;
     float ipt2C = ipt2*COF  ;
-    float COFK  = COF*K2    ;  
+    float COFK  = COF*K2    ;
     covr0      *= 2.        ;
     covz0      *= 2.        ;
   
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
 
       const Trk::SpacePoint* SPb = m_SP[b]->spacepoint;
  
@@ -1425,35 +1438,41 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpTrigger
       float dZ    = dZVertexMin(Zob);
       float Iz    = (dZ*dZ)/Tzb2 ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 	
 	float Ts  = .5*(Tzb+m_Tz[t])                          ;
 	float dt  =     Tzb-m_Tz[t]                           ;
 	float dT  = dt*dt-Erb-m_Er[t]-m_R[t]*(Ts*Ts*Rb2r+Rb2z);
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ;
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub; if (dU == 0.) continue ;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
-	float Im  = fabs((A-B*R)*R)                  ; 
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	float Im  = fabs((A-B*R)*R)                  ;
 	
-	if(Im > imc ) continue;
+	if (Im > imc ) continue;
 
 	// Azimuthal angle test
 	//
 	float y  = 1.;
 	float x  = 2.*B*R-A;
 	float df = fabs(atan2(ay*y-ax*x,ax*y+ay*x)-m_ftrig);
-	if(df > pi      ) df=pi2-df;
-	if(df > m_ftrigW) continue;
+	if (df > pi      ) df=pi2-df;
+	if (df > m_ftrigW) continue;
 	Im = Im*Im+Iz;
 	newOneSeed(SPb,SP0,m_SP[t]->spacepoint,Zob,Im);
       }
     }
-    nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    nseed += m_mapOneSeeds.size();
+    fillSeeds();
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    }
   }
 }
       
@@ -1470,20 +1489,24 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpNoVertex
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {
+    r0 = m_rMin;
+    m_endlist = true;
+  }
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float R  = (*r0)->radius(); 
+    float R  = (*r0)->radius();
 
     const Trk::SpacePoint* SP0 = (*r0)->spacepoint;
 
-    bool pix = true; if(SP0->clusterList().second) pix = false;
+    bool pix = true;
+    if (SP0->clusterList().second) pix = false;
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
     float               Y    = (*r0)->y()  ;
@@ -1492,58 +1515,69 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpNoVertex
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
+	float Rb =(*r)->radius();
 	float dR = R-Rb;
- 	if(dR > m_drmax) {rb[i]=r; continue;}
-	if(dR < m_drmin) break;
+ 	if (dR > m_drmax) {
+          rb[i]=r;
+          continue;
+        }
+	if (dR < m_drmin) break;
 
-	if((*r)->sur()==sur0) continue;
+	if ((*r)->sur()==sur0) continue;
 
-	if( !pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( !pix && !(*r)->spacepoint->clusterList().second) continue;
 	
-	float Tz = (Z-(*r)->z())/dR; 
+	float Tz = (Z-(*r)->z())/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 	
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rb,Tz)) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rb,Tz)) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin) {rt[i]=r; continue;}
-	if(dR > m_drmax) break;
+	float dR = Rt-R;
+        if (dR<m_drmin) {
+          rt[i]=r;
+          continue;
+        }
+	if (dR > m_drmax) break;
 
-	if( (*r)->sur()==sur0) continue;
+	if ( (*r)->sur()==sur0) continue;
 
-	float Tz = ((*r)->z()-Z)/dR; 
+	float Tz = ((*r)->z()-Z)/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,R,Tz)) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,R,Tz)) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
@@ -1551,9 +1585,9 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpNoVertex
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeed* sp = m_SP[i];  
+      InDet::SiSpacePointForSeed* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1562,7 +1596,8 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpNoVertex
       float y   =-dx*ay+dy*ax ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1580,13 +1615,13 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpNoVertex
     float COF   = m_COF     ;
     float ipt2K = ipt2/K2   ;
     float ipt2C = ipt2*COF  ;
-    float COFK  = COF*K2    ;  
+    float COFK  = COF*K2    ;
     covr0      *= 2.        ;
     covz0      *= 2.        ;
     
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       const Trk::SpacePoint* SPb = m_SP[b]->spacepoint;
  
@@ -1601,30 +1636,38 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::production3SpNoVertex
       float  CSA  = Tzb2*COFK    ;
       float ICSA  = Tzb2*ipt2C   ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 	
 	float Ts  = .5*(Tzb+m_Tz[t])                          ;
 	float dt  =     Tzb-m_Tz[t]                           ;
 	float dT  = dt*dt-Erb-m_Er[t]-m_R[t]*(Ts*Ts*Rb2r+Rb2z);
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ; 
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub;
+        if (dU == 0.) continue;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
-	float Im  = fabs((A-B*R)*R)                  ; 
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	float Im  = fabs((A-B*R)*R)                  ;
 	
-	if(pix) {
-	  if(                                             Im > imc ) continue;
-	  if(m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
-	}
-	else if(Im > m_diversss) continue;
+	if (pix) {
+	  if (                                             Im > imc ) continue;
+	  if (m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
+	} else if (Im > m_diversss) {
+          continue;
+        }
 	newOneSeed(SPb,SP0,m_SP[t]->spacepoint,Zob,Im);
       }
     }
-    nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    nseed += m_mapOneSeeds.size();
+    fillSeeds();
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    } 
   }
 }
 
@@ -1636,32 +1679,156 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::newOneSeed
 (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
  const Trk::SpacePoint*& p3,const float& z,const float& q) 
 {
-  if(m_nOneSeeds < m_maxOneSize) {
+  if (m_nOneSeeds < m_maxOneSize) {
 
-    m_OneSeeds [m_nOneSeeds].erase     (  ); 
-    m_OneSeeds [m_nOneSeeds].add       (p1); 
-    m_OneSeeds [m_nOneSeeds].add       (p2); 
-    m_OneSeeds [m_nOneSeeds].add       (p3); 
-    m_OneSeeds [m_nOneSeeds].setZVertex(double(z));
+    m_OneSeeds [m_nOneSeeds].erase     (  );
+    m_OneSeeds [m_nOneSeeds].add       (p1);
+    m_OneSeeds [m_nOneSeeds].add       (p2);
+    m_OneSeeds [m_nOneSeeds].add       (p3);
+    m_OneSeeds [m_nOneSeeds].setZVertex(static_cast<double>(z));
     m_mapOneSeeds.insert(std::make_pair(q,m_OneSeeds+m_nOneSeeds));
     ++m_nOneSeeds;
-  }
-  else                     {
+  } else {
     std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator 
       l = m_mapOneSeeds.rbegin();
-    if((*l).first <= q) return;
+    if ((*l).first <= q) return;
     
     InDet::SiSpacePointsSeed* s = (*l).second;
-    s->erase     (  ); 
-    s->add       (p1); 
-    s->add       (p2); 
-    s->add       (p3); 
-    s->setZVertex(double(z));
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
       i = m_mapOneSeeds.insert(std::make_pair(q,s));
 	
-    for(++i; i!=m_mapOneSeeds.end(); ++i) {
-      if((*i).second==s) {m_mapOneSeeds.erase(i); return;}
+    for (++i; i!=m_mapOneSeeds.end(); ++i) {
+      if ((*i).second==s) {
+        m_mapOneSeeds.erase(i);
+        return;
+      }
+    }
+  }
+}
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_HeavyIon::next()
+{
+  if (m_i_seed==m_i_seede) {
+    findNext();
+    if (m_i_seed==m_i_seede) return nullptr;
+  } 
+  return(*m_i_seed++);
+}
+
+bool InDet::SiSpacePointsSeedMaker_HeavyIon::isZCompatible  
+(float& Zv,float& R,float& T)
+{
+  if (Zv < m_zmin || Zv > m_zmax) return false;
+  if (!m_izvertex               ) return true;
+
+  std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+
+  float dZmin = fabs((*v)-Zv);
+  ++v;
+  for (; v!=ve; ++v) {
+    float dZ = fabs((*v)-Zv); if (dZ<dZmin) dZmin=dZ;
+  }
+  return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+}
+
+float InDet::SiSpacePointsSeedMaker_HeavyIon::dZVertexMin(float& Z)
+{
+  float dZm = 1.E10;
+  std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+
+  for (; v!=ve; ++v) {
+    float dZ = fabs((*v)-Z);
+    if (dZ<dZm) dZm = dZ;
+  }
+  return dZm;
+}
+
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_HeavyIon::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3];
+  convertToBeamFrameWork(sp, r);
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp,r);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_HeavyIon::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// New 3 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_HeavyIon::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const Trk::SpacePoint*& p3,const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,p3,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+  
+///////////////////////////////////////////////////////////////////
+// Fill seeds
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_HeavyIon::fillSeeds ()
+{
+  std::multimap<float, InDet::SiSpacePointsSeed*>::iterator 
+    l  = m_mapOneSeeds.begin(),
+    le = m_mapOneSeeds.end  ();
+  for (; l!=le; ++l) {
+    if (m_i_seede!=m_l_seeds.end()) {
+      InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+      *s = *(*l).second;
+    } else {
+      m_l_seeds.push_back(new InDet::SiSpacePointsSeed(*(*l).second));
+      m_i_seede = m_l_seeds.end();
     }
   }
 }
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
index fe74fccf4f8f..1f4ceaaf34dd 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-     
 ///////////////////////////////////////////////////////////////////
 //   Implementation file for class SiSpacePointsSeedMaker_ITK
 ///////////////////////////////////////////////////////////////////
@@ -15,6 +14,7 @@
 
 #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h"
 
+#include "InDetPrepRawData/SiCluster.h"
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
 
 #include <iomanip>
@@ -37,34 +37,33 @@ InDet::SiSpacePointsSeedMaker_ITK::SiSpacePointsSeedMaker_ITK
 
 InDet::SiSpacePointsSeedMaker_ITK::~SiSpacePointsSeedMaker_ITK()
 {
-  if(m_r_index ) delete [] m_r_index ;
-  if(m_r_map   ) delete [] m_r_map   ; 
-  if(m_r_Sorted) delete [] m_r_Sorted;
+  delete [] m_r_index ;
+  delete [] m_r_map   ;
+  delete [] m_r_Sorted;
 
   // Delete seeds
   //
-  for(m_i_seed=m_l_seeds.begin(); m_i_seed!=m_l_seeds.end (); ++m_i_seed) {
-    delete *m_i_seed;
+  for (InDet::SiSpacePointsProSeedITK* seed: m_l_seeds) {
+    delete seed;
   }
   // Delete space points for reconstruction
   //
-  m_i_spforseed=m_l_spforseed.begin();
-  for(; m_i_spforseed!=m_l_spforseed.end(); ++m_i_spforseed) {
-    delete *m_i_spforseed;
-  } 
-  if(m_seedOutput) delete m_seedOutput; 
-
-  if(m_SP) delete [] m_SP;
-  if(m_R ) delete [] m_R ;
-  if(m_X ) delete [] m_X ;
-  if(m_Y ) delete [] m_Y ;
-  if(m_Tz) delete [] m_Tz;
-  if(m_Er) delete [] m_Er;
-  if(m_U ) delete [] m_U ;
-  if(m_V ) delete [] m_V ;
-  if(m_Zo) delete [] m_Zo;
-  if(m_OneSeeds) delete [] m_OneSeeds;
- }
+  for (InDet::SiSpacePointForSeedITK* spforseed: m_l_spforseed) {
+    delete spforseed;
+  }
+  delete m_seedOutput;
+
+  delete [] m_SP;
+  delete [] m_R ;
+  delete [] m_X ;
+  delete [] m_Y ;
+  delete [] m_Tz;
+  delete [] m_Er;
+  delete [] m_U ;
+  delete [] m_V ;
+  delete [] m_Zo;
+  delete [] m_OneSeeds;
+}
 
 ///////////////////////////////////////////////////////////////////
 // Initialisation
@@ -72,7 +71,7 @@ InDet::SiSpacePointsSeedMaker_ITK::~SiSpacePointsSeedMaker_ITK()
 
 StatusCode InDet::SiSpacePointsSeedMaker_ITK::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
   ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
@@ -84,7 +83,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_ITK::initialize()
 
   // Get magnetic field service
   //
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ){
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
@@ -92,29 +91,30 @@ StatusCode InDet::SiSpacePointsSeedMaker_ITK::initialize()
 
   // Get tool for track-prd association
   //
-  if( m_useassoTool ) {
-    if( m_assoTool.retrieve().isFailure()) {
-      msg(MSG::FATAL)<<"Failed to retrieve tool "<< m_assoTool<<endmsg; 
+  if ( m_useassoTool ) {
+    if ( m_assoTool.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool "<< m_assoTool);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_assoTool << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_assoTool);
     }
   } else {
     m_assoTool.disable();
   }
 
-  if(m_r_rmax < 1100.) m_r_rmax = 1100.; 
+  if (m_r_rmax < 1100.) m_r_rmax = 1100.;
   
   // Build framework
   //
   buildFrameWork();
-  m_CmSp.reserve(500); 
+  m_CmSp.reserve(500);
 
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
-  if(m_outputlevel<=0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=0;
+    ATH_MSG_DEBUG(*this);
   }
   m_umax = 100.-fabs(m_umax)*300.;
   return sc;
@@ -126,7 +126,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_ITK::initialize()
 
 StatusCode InDet::SiSpacePointsSeedMaker_ITK::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -137,64 +137,67 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
 {
   m_iteration0 = iteration;
   m_trigger = false;
-  if(!m_pixel && !m_sct) return; 
+  if (!m_pixel && !m_sct) return;
 
   iteration <=0 ? m_iteration = 0 : m_iteration = iteration;
   erase();
   m_dzdrmin =  m_dzdrmin0;
   m_dzdrmax =  m_dzdrmax0;
 
-  if(!m_iteration) {
+  if (!m_iteration) {
     buildBeamFrameWork();
 
-    double f[3], gP[3] ={10.,10.,0.}; 
-    if(m_fieldServiceHandle->solenoidOn()) {
-      m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+    double f[3], gP[3] ={10.,10.,0.};
+    if (m_fieldServiceHandle->solenoidOn()) {
+      m_fieldServiceHandle->getFieldZR(gP,f);
+      m_K = 2./(300.*f[2]);
+    } else {
+      m_K = 2./(300.* 5. );
     }
-    else m_K = 2./(300.* 5. );
 
     m_ipt2K     = m_ipt2/(m_K*m_K);
     m_ipt2C     = m_ipt2*m_COF    ;
-    m_COFK      = m_COF*(m_K*m_K) ;  
+    m_COFK      = m_COF*(m_K*m_K) ;
     m_i_spforseed = m_l_spforseed.begin();
-  }
-  else {
-    m_r_first = 0; fillLists(); return;
+  } else {
+    m_r_first = 0;
+    fillLists();
+    return;
   }
 
   m_checketa = m_dzdrmin > 1.;
 
   float irstep = 1./m_r_rstep;
   int   irmax  = m_r_size-1  ;
-  for(int i=0; i!=m_nr; ++i) {int n = m_r_index[i]; m_r_map[n] = 0; m_r_Sorted[n].clear();}
+  for (int i=0; i!=m_nr; ++i) {
+    int n = m_r_index[i];
+    m_r_map[n] = 0;
+    m_r_Sorted[n].clear();
+  }
   m_ns = m_nr = 0;
 
   // Get pixels space points containers from store gate 
   //
   m_r_first = 0;
-  if(m_pixel) {
+  if (m_pixel) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
+    if (spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
+      for (const SpacePointCollection* spc: *spacepointsPixel) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-      for(; spc != spce; ++spc) {
+	  if ((m_useassoTool && isUsed(sp)) || sp->r() > m_r_rmax || sp->r() < m_r_rmin ) continue;
 
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
-
-	  if ((m_useassoTool &&  isUsed(*sp)) || (*sp)->r() > m_r_rmax || (*sp)->r() < m_r_rmin ) continue;
-
-	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint((*sp)); if(!sps) continue;
+	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(sp);
+          if (!sps) continue;
 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
-	  if(ir > m_r_first) m_r_first = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  if (ir > m_r_first) m_r_first = ir;
 	  ++m_ns;
 	}
       }
@@ -204,28 +207,24 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct) {
+  if (m_sct) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
+    if (spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      for(; spc != spce; ++spc) {
-
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
+      for (const SpacePointCollection* spc: *spacepointsSCT) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-	  if ((m_useassoTool &&  isUsed(*sp)) || (*sp)->r() > m_r_rmax || (*sp)->r() < m_r_rmin ) continue;
+	  if ((m_useassoTool && isUsed(sp)) || sp->r() > m_r_rmax || sp->r() < m_r_rmin ) continue;
 
-	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint((*sp)); if(!sps) continue;
+	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(sp);
+          if (!sps) continue;
 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -233,30 +232,30 @@ void InDet::SiSpacePointsSeedMaker_ITK::newEvent(int iteration)
 
     // Get sct overlap space points containers from store gate 
     //
-    if(m_useOverlap) {
+    if (m_useOverlap) {
 
       SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
-      if(spacepointsOverlap.isValid()) {
+      if (spacepointsOverlap.isValid()) {
 	
-	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
-	
-	for (; sp!=spe; ++sp) {
+        for (const Trk::SpacePoint* sp: *spacepointsOverlap) {
 
-	  if ((m_useassoTool &&  isUsed(*sp)) || (*sp)->r() > m_r_rmax || (*sp)->r() < m_r_rmin) continue;
+	  if ((m_useassoTool && isUsed(sp)) || sp->r() > m_r_rmax || sp->r() < m_r_rmin) continue;
 
-	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint((*sp)); if(!sps) continue;
+	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(sp);
+          if (!sps) continue;
 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
     }
   }
 
-  if(iteration < 0) m_r_first = 0;
+  if (iteration < 0) m_r_first = 0;
   fillLists();
 }
 
@@ -270,23 +269,25 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
   m_iteration  = 0    ;
   m_trigger    = false;
   erase();
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
 
   m_dzdrmin =  m_dzdrmin0;
   m_dzdrmax =  m_dzdrmax0;
 
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-      m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
-    }
-  else m_K = 2./(300.* 5. );
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
+  }
 
   m_ipt2K     = m_ipt2/(m_K*m_K);
   m_ipt2C     = m_ipt2*m_COF    ;
-  m_COFK      = m_COF*(m_K*m_K) ;  
+  m_COFK      = m_COF*(m_K*m_K) ;
 
   m_i_spforseed = m_l_spforseed.begin();
 
@@ -296,35 +297,35 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
   m_r_first      = 0         ;
   m_checketa   = false     ;
 
-  for(int i=0; i!=m_nr; ++i) {int n = m_r_index[i]; m_r_map[n] = 0; m_r_Sorted[n].clear();}
+  for (int i=0; i!=m_nr; ++i) {
+    int n = m_r_index[i];
+    m_r_map[n] = 0;
+    m_r_Sorted[n].clear();
+  }
   m_ns = m_nr = 0;
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel && vPixel.size()) {
+  if (m_pixel && vPixel.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
+    if (spacepointsPixel.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-	
-	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r > m_r_rmax || r < m_r_rmin) continue;
-	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint((*sp)); 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r > m_r_rmax || r < m_r_rmin) continue;
+	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -333,30 +334,26 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct && vSCT.size()) {
+  if (m_sct && vSCT.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
+    if (spacepointsSCT.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-
-	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r > m_r_rmax || r < m_r_rmin) continue;
-	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint((*sp)); 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vSCT) {
+	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r > m_r_rmax || r < m_r_rmin) continue;
+	  InDet::SiSpacePointForSeedITK* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -378,13 +375,13 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion
   double dzdrmin = 1./tan(2.*atan(exp(-IRD.etaMinus())));
   double dzdrmax = 1./tan(2.*atan(exp(-IRD.etaPlus ())));
  
-  m_zminB        = IRD.zedMinus()-m_zbeam[0];    // min bottom Z
-  m_zmaxB        = IRD.zedPlus ()-m_zbeam[0];    // max bottom Z
+  m_zminB        = IRD.zedMinus()-m_zbeam[0]; // min bottom Z
+  m_zmaxB        = IRD.zedPlus ()-m_zbeam[0]; // max bottom Z
   m_zminU        = m_zminB+550.*dzdrmin;
   m_zmaxU        = m_zmaxB+550.*dzdrmax;
   double fmax    = IRD.phiPlus ();
   double fmin    = IRD.phiMinus();
-  if(fmin > fmax) fmin-=(2.*M_PI);
+  if (fmin > fmax) fmin-=(2.*M_PI);
   m_ftrig        = (fmin+fmax)*.5;
   m_ftrigW       = (fmax-fmin)*.5;
 }
@@ -402,7 +399,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::find2Sp(const std::list<Trk::Vertex>& lv
   int mode; lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin();
     m_state   = 1   ;
@@ -417,8 +414,9 @@ void InDet::SiSpacePointsSeedMaker_ITK::find2Sp(const std::list<Trk::Vertex>& lv
   }
   m_i_seed  = m_l_seeds.begin();
   
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -432,10 +430,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::find3Sp(const std::list<Trk::Vertex>& lv
   m_zminU     = m_zmin;
   m_zmaxU     = m_zmax;
 
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 3 : mode = 2;
   bool newv = newVertices(lv);
 
-  if(newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
     m_nspoint = 3               ;
@@ -450,8 +449,9 @@ void InDet::SiSpacePointsSeedMaker_ITK::find3Sp(const std::list<Trk::Vertex>& lv
   m_i_seed  = m_l_seeds.begin();
   m_seed  = m_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -462,13 +462,15 @@ void InDet::SiSpacePointsSeedMaker_ITK::find3Sp(const std::list<Trk::Vertex>& lv
 
 void InDet::SiSpacePointsSeedMaker_ITK::find3Sp(const std::list<Trk::Vertex>& lv,const double* ZVertex) 
 {
-  m_zminU     = ZVertex[0]; if(m_zminU < m_zmin) m_zminU = m_zmin; 
-  m_zmaxU     = ZVertex[1]; if(m_zmaxU > m_zmax) m_zmaxU = m_zmax;
+  m_zminU = ZVertex[0];
+  if (m_zminU < m_zmin) m_zminU = m_zmin;
+  m_zmaxU = ZVertex[1];
+  if (m_zmaxU > m_zmax) m_zmaxU = m_zmax;
 
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2;
   bool newv = newVertices(lv);
 
-  if(newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
     m_nspoint = 3               ;
@@ -483,8 +485,9 @@ void InDet::SiSpacePointsSeedMaker_ITK::find3Sp(const std::list<Trk::Vertex>& lv
   m_i_seed  = m_l_seeds.begin();
   m_seed  = m_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -499,10 +502,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::findVSp (const std::list<Trk::Vertex>& l
   m_zminU     = m_zmin;
   m_zmaxU     = m_zmax;
 
-  int mode; lv.begin()!=lv.end() ? mode = 6 : mode = 5; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -518,8 +522,9 @@ void InDet::SiSpacePointsSeedMaker_ITK::findVSp (const std::list<Trk::Vertex>& l
   m_i_seed  = m_l_seeds.begin();
   m_seed  = m_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -529,7 +534,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::findVSp (const std::list<Trk::Vertex>& l
 
 MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dump( MsgStream& out ) const
 {
-  if(m_nprint)  return dumpEvent(out);
+  if (m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -540,137 +545,137 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dump( MsgStream& out ) const
 MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dumpConditions( MsgStream& out ) const
 {
   int n = 42-m_spacepointsPixel.key().size();
-  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
+  std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 42-m_spacepointsSCT.key().size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
   n     = 42-m_spacepointsOverlap.key().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
+  std::string s5; for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmin 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(4)<<m_r1max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ    impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ/dR impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzdrver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact pps    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diverpps
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact sss    | "
-    <<std::setw(12)<<std::setprecision(5)<<m_diversss
-    <<"                              |"<<std::endl;
+     <<std::setw(12)<<std::setprecision(5)<<m_diversss
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Beam X center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Y center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Z center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam X-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Y-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Z-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -680,54 +685,22 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dumpConditions( MsgStream& out ) c
 
 MsgStream& InDet::SiSpacePointsSeedMaker_ITK::dumpEvent( MsgStream& out ) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsazv                 | "
      <<std::setw(12)<<m_nsazv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
-  /*
-  if(m_outputlevel==0) return out; 
-
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-
-  out<<"|  Azimuthal  |    n   | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4]  |";
-  out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |"
-     <<std::endl;
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  
-  float sF1 = pi2/float(m_fNmax+1);
-  
-  
-  for(int f=0; f<=m_fNmax; ++f) {
-    out<<"|  "
-       <<std::setw(10)<<std::setprecision(4)<<sF1*float(f)<<" | "
-       <<std::setw(6)<<rf_map[f]<<" |";
-    for(int z=0; z!=11; ++z) {
-      out<<std::setw(6)<<rfz_map[(f*11+z)]<<" |";
-    }
-    out<<std::endl;
-  } 
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  out<<std::endl;
-  */
+     <<endmsg;
   return out;
 }
 
@@ -745,9 +718,9 @@ std::ostream& InDet::SiSpacePointsSeedMaker_ITK::dump( std::ostream& out ) const
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiSpacePointsSeedMaker_ITK& se)
+(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_ITK& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -755,10 +728,10 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiSpacePointsSeedMaker_ITK& se)
+(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_ITK& se)
 { 
-  return se.dump(sl); 
-}   
+  return se.dump(sl);
+}
 
 ///////////////////////////////////////////////////////////////////
 // Find next set space points
@@ -766,16 +739,16 @@ std::ostream& InDet::operator <<
 
 void InDet::SiSpacePointsSeedMaker_ITK::findNext () 
 {
-  if(m_endlist) return;
+  if (m_endlist) return;
 
   m_i_seede = m_l_seeds.begin();
 
-  if     (m_mode==0 || m_mode==1) production2Sp ();
-  else if(m_mode==2 || m_mode==3) production3Sp ();
-  else if(m_mode==5 || m_mode==6) production3Sp ();
+  if      (m_mode==0 || m_mode==1) production2Sp ();
+  else if (m_mode==2 || m_mode==3) production3Sp ();
+  else if (m_mode==5 || m_mode==6) production3Sp ();
 
   m_i_seed  = m_l_seeds.begin();
-  m_seed  = m_seeds.begin(); 
+  m_seed  = m_seeds.begin();
   ++m_nlist;
 }                       
 
@@ -785,21 +758,25 @@ void InDet::SiSpacePointsSeedMaker_ITK::findNext ()
 
 bool InDet::SiSpacePointsSeedMaker_ITK::newVertices(const std::list<Trk::Vertex>& lV)
 {
-  unsigned int s1 = m_l_vertex.size(); 
-  unsigned int s2 = lV      .size(); 
+  unsigned int s1 = m_l_vertex.size();
+  unsigned int s2 = lV.size();
 
   m_isvertex = false;
-  if(s1==0 && s2==0) return false;
+  if (s1==0 && s2==0) return false;
 
   std::list<Trk::Vertex>::const_iterator v;
   m_l_vertex.clear();
-  if(s2 == 0) return false;
+  if (s2 == 0) return false;
 
   m_isvertex = true;
-  for(v=lV.begin(); v!=lV.end(); ++v) {m_l_vertex.insert(float((*v).position().z()));}
+  for (v=lV.begin(); v!=lV.end(); ++v) {
+    m_l_vertex.insert(static_cast<float>((*v).position().z()));
+  }
 
-  m_zminU = (*m_l_vertex. begin())-20.; if( m_zminU < m_zmin) m_zminU = m_zmin;
-  m_zmaxU = (*m_l_vertex.rbegin())+20.; if( m_zmaxU > m_zmax) m_zmaxU = m_zmax;
+  m_zminU = (*m_l_vertex. begin())-20.;
+  if ( m_zminU < m_zmin) m_zminU = m_zmin;
+  m_zmaxU = (*m_l_vertex.rbegin())+20.;
+  if ( m_zmaxU > m_zmax) m_zmaxU = m_zmax;
 
   return false;
 }
@@ -810,14 +787,14 @@ bool InDet::SiSpacePointsSeedMaker_ITK::newVertices(const std::list<Trk::Vertex>
 
 void InDet::SiSpacePointsSeedMaker_ITK::buildFrameWork() 
 {
-  m_ptmin     = fabs(m_ptmin);  
+  m_ptmin     = fabs(m_ptmin);
   
-  if(m_ptmin < 100.) m_ptmin = 100.;
+  if (m_ptmin < 100.) m_ptmin = 100.;
 
-  if(m_diversss < m_diver   ) m_diversss = m_diver   ; 
-  if(m_divermax < m_diversss) m_divermax = m_diversss;
+  if (m_diversss < m_diver   ) m_diversss = m_diver   ;
+  if (m_divermax < m_diversss) m_divermax = m_diversss;
 
-  if(fabs(m_etamin) < .1) m_etamin = -m_etamax ;
+  if (fabs(m_etamin) < .1) m_etamin = -m_etamax ;
   m_dzdrmax0  = 1./tan(2.*atan(exp(-m_etamax)));
   m_dzdrmin0  = 1./tan(2.*atan(exp(-m_etamin)));
   
@@ -830,136 +807,152 @@ void InDet::SiSpacePointsSeedMaker_ITK::buildFrameWork()
 
   // Build radius sorted containers
   //
-  m_r_size = int((m_r_rmax+.1)/m_r_rstep);
+  m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep);
   m_r_Sorted = new std::list<InDet::SiSpacePointForSeedITK*>[m_r_size];
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
-  m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
+  m_r_map    = new int[m_r_size];
+  m_nr = 0;
+  for (int i=0; i!=m_r_size; ++i) {
+    m_r_index[i]=0;
+    m_r_map[i]=0;
+  }
 
   // Build radius-azimuthal sorted containers
   //
   const float pi2     = 2.*M_PI            ;
   const int   NFmax    = 53                ;
-  const float sFmax   = float(NFmax )/pi2;
+  const float sFmax   = static_cast<float>(NFmax )/pi2;
   const float sFmin = 100./60.          ;
 
-  float ptm = 400.; if(m_ptmin < ptm) ptm = m_ptmin;
+  float ptm = 400.;
+  if (m_ptmin < ptm) ptm = m_ptmin;
 
-  m_sF        = ptm /60. ; if(m_sF    >sFmax ) m_sF    = sFmax  ; else if(m_sF < sFmin) m_sF = sFmin;
-  m_fNmax     = int(pi2*m_sF); if(m_fNmax >=NFmax) m_fNmax = NFmax-1;
+  m_sF        = ptm /60. ;
+  if (m_sF    >sFmax ) m_sF    = sFmax  ;
+  else if (m_sF < sFmin) m_sF = sFmin;
+  m_fNmax     = static_cast<int>(pi2*m_sF);
+  if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
 
 
   // Build radius-azimuthal-Z sorted containers
   //
-  m_nrfz  = 0; for(int i=0; i!=583; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
+  m_nrfz  = 0;
+  for (int i=0; i!=583; ++i) {
+    m_rfz_index [i]=0;
+    m_rfz_map [i]=0;
+  }
 
   // Build radius-azimuthal-Z sorted containers for Z-vertices
   //
   const int   NFtmax  = 100               ;
-  const float sFvmax = float(NFtmax)/pi2;
-  m_sFv       = m_ptmin/120.  ; if(m_sFv   >sFvmax)  m_sFv    = sFvmax; 
-  m_fvNmax    = int(pi2*m_sFv); if(m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1;
-  m_nrfzv = 0; for(int i=0; i!=300; ++i) {m_rfzv_index[i]=0; m_rfzv_map[i]=0;}
+  const float sFvmax = static_cast<float>(NFtmax)/pi2;
+  m_sFv       = m_ptmin/120.;
+  if (m_sFv>sFvmax)  m_sFv = sFvmax; 
+  m_fvNmax    = static_cast<int>(pi2*m_sFv);
+  if (m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1;
+  m_nrfzv = 0;
+  for (int i=0; i!=300; ++i) {
+    m_rfzv_index[i]=0;
+    m_rfzv_map[i]=0;
+  }
 
   // Build maps for radius-azimuthal-Z sorted collections 
   //
-  for(int f=0; f<=m_fNmax; ++f) {
+  for (int f=0; f<=m_fNmax; ++f) {
 
-    int fb = f-1; if(fb<0      ) fb=m_fNmax; 
-    int ft = f+1; if(ft>m_fNmax) ft=0; 
+    int fb = f-1; if (fb<0      ) fb=m_fNmax;
+    int ft = f+1; if (ft>m_fNmax) ft=0;
     
     // For each azimuthal region loop through all Z regions
     //
-    for(int z=0; z!=11; ++z) {
+    for (int z=0; z!=11; ++z) {
  
       int a        = f *11+z;
       int b        = fb*11+z;
       int c        = ft*11+z;
       m_rfz_b [a]    = 3; m_rfz_t [a]    = 3;
-      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; 
-      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; 
-      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; 
-      if     (z==5) {
+      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
+      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
+      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
+      if (z==5) {
 
 	m_rfz_t [a]    = 9 ;
-	m_rfz_it[a][3] = a+1; 
-	m_rfz_it[a][4] = b+1; 
-	m_rfz_it[a][5] = c+1; 
-	m_rfz_it[a][6] = a-1; 
-	m_rfz_it[a][7] = b-1; 
-	m_rfz_it[a][8] = c-1; 
-      }
-      else if(z> 5) {
+	m_rfz_it[a][3] = a+1;
+	m_rfz_it[a][4] = b+1;
+	m_rfz_it[a][5] = c+1;
+	m_rfz_it[a][6] = a-1;
+	m_rfz_it[a][7] = b-1;
+	m_rfz_it[a][8] = c-1;
+      } else if (z> 5) {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a-1; 
-	m_rfz_ib[a][4] = b-1; 
-	m_rfz_ib[a][5] = c-1; 
+	m_rfz_ib[a][3] = a-1;
+	m_rfz_ib[a][4] = b-1;
+	m_rfz_ib[a][5] = c-1;
 
-	if(z<10) {
+	if (z<10) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a+1; 
-	  m_rfz_it[a][4] = b+1; 
-	  m_rfz_it[a][5] = c+1; 
+	  m_rfz_it[a][3] = a+1;
+	  m_rfz_it[a][4] = b+1;
+	  m_rfz_it[a][5] = c+1;
 	}
-      }
-      else {
+      } else {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a+1; 
-	m_rfz_ib[a][4] = b+1; 
-	m_rfz_ib[a][5] = c+1; 
+	m_rfz_ib[a][3] = a+1;
+	m_rfz_ib[a][4] = b+1;
+	m_rfz_ib[a][5] = c+1;
 
-	if(z>0) {
+	if (z>0) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a-1; 
-	  m_rfz_it[a][4] = b-1; 
-	  m_rfz_it[a][5] = c-1; 
+	  m_rfz_it[a][3] = a-1;
+	  m_rfz_it[a][4] = b-1;
+	  m_rfz_it[a][5] = c-1;
 	}
       }
 
-      if     (z==3) {
+      if (z==3) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a+2; 
-	m_rfz_ib[a][7] = b+2; 
-	m_rfz_ib[a][8] = c+2; 
-      }
-      else if(z==7) {
+	m_rfz_ib[a][6] = a+2;
+	m_rfz_ib[a][7] = b+2;
+	m_rfz_ib[a][8] = c+2;
+      } else if (z==7) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a-2; 
-	m_rfz_ib[a][7] = b-2; 
-	m_rfz_ib[a][8] = c-2; 
+	m_rfz_ib[a][6] = a-2;
+	m_rfz_ib[a][7] = b-2;
+	m_rfz_ib[a][8] = c-2;
       }
     }
   }
 
   // Build maps for radius-azimuthal-Z sorted collections for Z
   //
-  for(int f=0; f<=m_fvNmax; ++f) {
+  for (int f=0; f<=m_fvNmax; ++f) {
 
-    int fb = f-1; if(fb<0       ) fb=m_fvNmax; 
-    int ft = f+1; if(ft>m_fvNmax) ft=0; 
+    int fb = f-1;
+    if (fb<0) fb=m_fvNmax;
+    int ft = f+1;
+    if (ft>m_fvNmax) ft=0;
     
     // For each azimuthal region loop through central Z regions
     //
-    for(int z=0; z!=3; ++z) {
+    for (int z=0; z!=3; ++z) {
       
-      int a  = f *3+z; 
+      int a  = f *3+z;
       int b  = fb*3+z;
       int c  = ft*3+z;
       m_rfzv_n[a]    = 3;
       m_rfzv_i[a][0] = a;
       m_rfzv_i[a][1] = b;
       m_rfzv_i[a][2] = c;
-      if     (z>1) {
+      if (z>1) {
 	m_rfzv_n[a]    = 6;
 	m_rfzv_i[a][3] = a-1;
 	m_rfzv_i[a][4] = b-1;
 	m_rfzv_i[a][5] = c-1;
-      }
-      else if(z<1) {
+      } else if (z<1) {
 	m_rfzv_n[a]    = 6;
 	m_rfzv_i[a][3] = a+1;
 	m_rfzv_i[a][4] = b+1;
@@ -968,18 +961,18 @@ void InDet::SiSpacePointsSeedMaker_ITK::buildFrameWork()
     }
   }
   
-  if(!m_SP) m_SP   = new InDet::SiSpacePointForSeedITK*[m_maxsizeSP];
-  if(!m_R ) m_R    = new                          float[m_maxsizeSP];
-  if(!m_X ) m_X    = new                          float[m_maxsizeSP];
-  if(!m_Y ) m_Y    = new                          float[m_maxsizeSP];
-  if(!m_Tz) m_Tz   = new                          float[m_maxsizeSP];
-  if(!m_Er) m_Er   = new                          float[m_maxsizeSP];
-  if(!m_U ) m_U    = new                          float[m_maxsizeSP]; 
-  if(!m_V ) m_V    = new                          float[m_maxsizeSP];
-  if(!m_Zo) m_Zo   = new                          float[m_maxsizeSP];
-  if(!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsProSeedITK [m_maxOneSize];  
-
-  if(!m_seedOutput) m_seedOutput = new InDet::SiSpacePointsSeed();
+  if (!m_SP) m_SP   = new InDet::SiSpacePointForSeedITK*[m_maxsizeSP];
+  if (!m_R ) m_R    = new                          float[m_maxsizeSP];
+  if (!m_X ) m_X    = new                          float[m_maxsizeSP];
+  if (!m_Y ) m_Y    = new                          float[m_maxsizeSP];
+  if (!m_Tz) m_Tz   = new                          float[m_maxsizeSP];
+  if (!m_Er) m_Er   = new                          float[m_maxsizeSP];
+  if (!m_U ) m_U    = new                          float[m_maxsizeSP];
+  if (!m_V ) m_V    = new                          float[m_maxsizeSP];
+  if (!m_Zo) m_Zo   = new                          float[m_maxsizeSP];
+  if (!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsProSeedITK[m_maxOneSize];
+
+  if (!m_seedOutput) m_seedOutput = new InDet::SiSpacePointsSeed();
 
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
@@ -1004,20 +997,20 @@ void InDet::SiSpacePointsSeedMaker_ITK::buildBeamFrameWork()
   double sinp = sin(ph);
   double cosp = cos(ph);
   
-  m_xbeam[0] = float(cb.x())                  ; 
-  m_xbeam[1] = float(cost*cosp*cosp+sinp*sinp);
-  m_xbeam[2] = float(cost*sinp*cosp-sinp*cosp);
-  m_xbeam[3] =-float(sint*cosp               );
+  m_xbeam[0] = static_cast<float>(cb.x())                  ;
+  m_xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp);
+  m_xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp);
+  m_xbeam[3] =-static_cast<float>(sint*cosp               );
   
-  m_ybeam[0] = float(cb.y())                  ; 
-  m_ybeam[1] = float(cost*cosp*sinp-sinp*cosp);
-  m_ybeam[2] = float(cost*sinp*sinp+cosp*cosp);
-  m_ybeam[3] =-float(sint*sinp               );
+  m_ybeam[0] = static_cast<float>(cb.y())                  ;
+  m_ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp);
+  m_ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp);
+  m_ybeam[3] =-static_cast<float>(sint*sinp               );
   
-  m_zbeam[0] = float(cb.z())                  ; 
-  m_zbeam[1] = float(sint*cosp)               ;
-  m_zbeam[2] = float(sint*sinp)               ;
-  m_zbeam[3] = float(cost)                    ;
+  m_zbeam[0] = static_cast<float>(cb.z())                  ;
+  m_zbeam[1] = static_cast<float>(sint*cosp)               ;
+  m_zbeam[2] = static_cast<float>(sint*sinp)               ;
+  m_zbeam[3] = static_cast<float>(cost)                    ;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -1027,48 +1020,48 @@ void  InDet::SiSpacePointsSeedMaker_ITK::convertToBeamFrameWork
 (const  Trk::SpacePoint*const& sp,float* r)
 {
   
-  r[0] = float(sp->globalPosition().x())-m_xbeam[0];
-  r[1] = float(sp->globalPosition().y())-m_ybeam[0];
-  r[2] = float(sp->globalPosition().z())-m_zbeam[0];
+  r[0] = static_cast<float>(sp->globalPosition().x())-m_xbeam[0];
+  r[1] = static_cast<float>(sp->globalPosition().y())-m_ybeam[0];
+  r[2] = static_cast<float>(sp->globalPosition().z())-m_zbeam[0];
 
-  if(!sp->clusterList().second) return;
+  if (!sp->clusterList().second) return;
 
   // Only for SCT space points
   //
   const InDet::SiCluster* c0 = static_cast<const InDet::SiCluster*>(sp->clusterList().first );
   const InDet::SiCluster* c1 = static_cast<const InDet::SiCluster*>(sp->clusterList().second);
   
-  Amg::Vector2D lc0 = c0->localPosition();  
-  Amg::Vector2D lc1 = c1->localPosition();  
+  Amg::Vector2D lc0 = c0->localPosition();
+  Amg::Vector2D lc1 = c1->localPosition();
   
   std::pair<Amg::Vector3D, Amg::Vector3D > e0 =
-    (c0->detectorElement()->endsOfStrip(InDetDD::SiLocalPosition(lc0.y(),lc0.x(),0.))); 
+    (c0->detectorElement()->endsOfStrip(InDetDD::SiLocalPosition(lc0.y(),lc0.x(),0.)));
   std::pair<Amg::Vector3D, Amg::Vector3D > e1 =
-    (c1->detectorElement()->endsOfStrip(InDetDD::SiLocalPosition(lc1.y(),lc1.x(),0.))); 
+    (c1->detectorElement()->endsOfStrip(InDetDD::SiLocalPosition(lc1.y(),lc1.x(),0.)));
 
   Amg::Vector3D b0 (e0.second-e0.first);
   Amg::Vector3D b1 (e1.second-e1.first);
   Amg::Vector3D d02(e0.first -e1.first);
 
   // b0
-  r[ 3] = float(b0[0]);
-  r[ 4] = float(b0[1]);
-  r[ 5] = float(b0[2]);
+  r[ 3] = static_cast<float>(b0[0]);
+  r[ 4] = static_cast<float>(b0[1]);
+  r[ 5] = static_cast<float>(b0[2]);
   
   // b1
-  r[ 6] = float(b1[0]);
-  r[ 7] = float(b1[1]);
-  r[ 8] = float(b1[2]);
+  r[ 6] = static_cast<float>(b1[0]);
+  r[ 7] = static_cast<float>(b1[1]);
+  r[ 8] = static_cast<float>(b1[2]);
 
   // r0-r2
-  r[ 9] = float(d02[0]);
-  r[10] = float(d02[1]);
-  r[11] = float(d02[2]);
+  r[ 9] = static_cast<float>(d02[0]);
+  r[10] = static_cast<float>(d02[1]);
+  r[11] = static_cast<float>(d02[2]);
 
   // r0
-  r[12] = float(e0.first[0])-m_xbeam[0];
-  r[13] = float(e0.first[1])-m_ybeam[0];
-  r[14] = float(e0.first[2])-m_zbeam[0];
+  r[12] = static_cast<float>(e0.first[0])-m_xbeam[0];
+  r[13] = static_cast<float>(e0.first[1])-m_ybeam[0];
+  r[14] = static_cast<float>(e0.first[2])-m_zbeam[0];
 }
    
 ///////////////////////////////////////////////////////////////////
@@ -1082,53 +1075,55 @@ void InDet::SiSpacePointsSeedMaker_ITK::fillLists()
 
   int  ir0 =0;
   
-  for(int i=m_r_first; i!=m_r_size;  ++i) {
+  for (int i=m_r_first; i!=m_r_size;  ++i) {
 
-    if(!m_r_map[i]) continue;
-    r = m_r_Sorted[i].begin(); re = m_r_Sorted[i].end();
-    if(!ir0) ir0 = i;
+    if (!m_r_map[i]) continue;
+    r = m_r_Sorted[i].begin();
+    re = m_r_Sorted[i].end();
+    if (!ir0) ir0 = i;
 
-    if(m_iteration && (*r)->spacepoint->clusterList().second) break;
+    if (m_iteration && (*r)->spacepoint->clusterList().second) break;
 
-    for(; r!=re; ++r) {
+    for (; r!=re; ++r) {
       
       // Azimuthal angle sort
       //
-      float F = (*r)->phi(); if(F<0.) F+=pi2;
+      float F = (*r)->phi();
+      if (F<0.) F+=pi2;
 
-      int   f = int(F*m_sF);
-      if (f < 0)
-        f = m_fNmax;
-      else if (f > m_fNmax)
-        f = 0;
+      int   f = static_cast<int>(F*m_sF);
+      if (f < 0) f = m_fNmax;
+      else if (f > m_fNmax) f = 0;
 
-      int z; float Z = (*r)->z();
+      int z;
+      float Z = (*r)->z();
 
       // Azimuthal angle and Z-coordinate sort
       //
-      if(Z>0.) {
+      if (Z>0.) {
 	Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10;
-      }
-      else     {
+      } else {
 	Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0;
       }
 
-      int n = f*11+z; ++m_nsaz;
-      m_rfz_Sorted[n].push_back(*r); if(!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
+      int n = f*11+z;
+      ++m_nsaz;
+      m_rfz_Sorted[n].push_back(*r);
+      if (!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
       
-      if(!m_iteration && (*r)->spacepoint->clusterList().second == 0 && z>=3 && z<=7) { 
+      if (!m_iteration && (*r)->spacepoint->clusterList().second == 0 && z>=3 && z<=7) { 
 	z<=4 ? z=0 : z>=6 ? z=2 : z=1;
 
 	// Azimuthal angle and Z-coordinate sort for fast vertex search
 	//
-	f = int(F*m_sFv);
-        if (f < 0)
-          f += m_fvNmax;
-        else if (f> m_fvNmax)
-          f -= m_fvNmax;
-
-        n = f*3+z; ++m_nsazv;
-	m_rfzv_Sorted[n].push_back(*r); if(!m_rfzv_map[n]++) m_rfzv_index[m_nrfzv++] = n;
+	f = static_cast<int>(F*m_sFv);
+        if (f < 0) f += m_fvNmax;
+        else if (f> m_fvNmax) f -= m_fvNmax;
+
+        n = f*3+z;
+        ++m_nsazv;
+	m_rfzv_Sorted[n].push_back(*r);
+        if (!m_rfzv_map[n]++) m_rfzv_index[m_nrfzv++] = n;
       }
     }
   }
@@ -1141,13 +1136,15 @@ void InDet::SiSpacePointsSeedMaker_ITK::fillLists()
 
 void InDet::SiSpacePointsSeedMaker_ITK::erase()
 {
-  for(int i=0; i!=m_nrfz;  ++i) {
-    int n = m_rfz_index[i]; m_rfz_map[n] = 0;
+  for (int i=0; i!=m_nrfz; ++i) {
+    int n = m_rfz_index[i];
+    m_rfz_map[n] = 0;
     m_rfz_Sorted[n].clear();
   }
   
-  for(int i=0; i!=m_nrfzv; ++i) {
-    int n = m_rfzv_index[i]; m_rfzv_map[n] = 0;
+  for (int i=0; i!=m_nrfzv; ++i) {
+    int n = m_rfzv_index[i];
+    m_rfzv_map[n] = 0;
     m_rfzv_Sorted[n].clear();
   }
   m_state = 0;
@@ -1163,11 +1160,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::erase()
 
 bool InDet::SiSpacePointsSeedMaker_ITK::isUsed(const Trk::SpacePoint* sp)
 {
-  const Trk::PrepRawData* d = sp->clusterList().first ; 
-  if(!d || !m_assoTool->isUsed(*d)) return false;
+  const Trk::PrepRawData* d = sp->clusterList().first;
+  if (!d || !m_assoTool->isUsed(*d)) return false;
 
   d = sp->clusterList().second;
-  if(!d || m_assoTool->isUsed(*d)) return true;
+  if (!d || m_assoTool->isUsed(*d)) return true;
 
   return false;
 }
@@ -1178,35 +1175,40 @@ bool InDet::SiSpacePointsSeedMaker_ITK::isUsed(const Trk::SpacePoint* sp)
 
 void InDet::SiSpacePointsSeedMaker_ITK::production2Sp()
 {
-  if(m_nsazv<2) return;
+  if (m_nsazv<2) return;
 
   std::list<InDet::SiSpacePointForSeedITK*>::iterator r0,r0e,r,re;
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fvNmin; f<=m_fvNmax; ++f) {
+  for (int f=m_fvNmin; f<=m_fvNmax; ++f) {
 
     // For each azimuthal region loop through Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
-    for(; z!=3; ++z) {
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
+    for (; z!=3; ++z) {
       
-      int a  = f*3+z;  if(!m_rfzv_map[a]) continue; 
-      r0  = m_rfzv_Sorted[a].begin(); 
-      r0e = m_rfzv_Sorted[a].end  (); 
-
-      if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+      int a = f*3+z;
+      if (!m_rfzv_map[a]) continue;
+      r0  = m_rfzv_Sorted[a].begin();
+      r0e = m_rfzv_Sorted[a].end  ();
+
+      if (!m_endlist) {
+        r0 = m_rMin;
+        m_endlist = true;
+      }
 
       // Loop through trigger space points
       //
-      for(; r0!=r0e; ++r0) {
+      for (; r0!=r0e; ++r0) {
 
 	float X  = (*r0)->x();
 	float Y  = (*r0)->y();
 	float R  = (*r0)->radius();
-	if(R<m_r2minv) continue;
-        if(R>m_r2maxv) break;
+	if (R<m_r2minv) continue;
+        if (R>m_r2maxv) break;
 	float Z  = (*r0)->z();
 	float ax = X/R;
 	float ay = Y/R;
@@ -1214,50 +1216,54 @@ void InDet::SiSpacePointsSeedMaker_ITK::production2Sp()
 	// Bottom links production
 	//
 	int NB = m_rfzv_n[a];
-	for(int i=0; i!=NB; ++i) {
+	for (int i=0; i!=NB; ++i) {
 	  
 	  int an = m_rfzv_i[a][i];
-	  if(!m_rfzv_map[an]) continue; 
+	  if (!m_rfzv_map[an]) continue;
 
 	  r  =  m_rfzv_Sorted[an].begin();
 	  re =  m_rfzv_Sorted[an].end  ();
 	  
-	  for(; r!=re; ++r) {
+	  for (; r!=re; ++r) {
 	    
 	    float Rb =(*r)->radius();
-	    if(Rb<m_r1minv) continue;
-            if(Rb>m_r1maxv) break;
-	    float dR = R-Rb; 
-	    if(dR<m_drminv) break;
-            if(dR>m_drmax) continue;
+	    if (Rb<m_r1minv) continue;
+            if (Rb>m_r1maxv) break;
+	    float dR = R-Rb;
+	    if (dR<m_drminv) break;
+            if (dR>m_drmax) continue;
 	    float dZ = Z-(*r)->z();
-	    float Tz = dZ/dR; if(Tz<m_dzdrmin || Tz>m_dzdrmax) continue;
-	    float Zo = Z-R*Tz;	          
+	    float Tz = dZ/dR;
+            if (Tz<m_dzdrmin || Tz>m_dzdrmax) continue;
+	    float Zo = Z-R*Tz;
 
 	    // Comparison with vertices Z coordinates
 	    //
-	    if(!isZCompatible(Zo,Rb,Tz)) continue;
+	    if (!isZCompatible(Zo,Rb,Tz)) continue;
 
 	    // Momentum cut
 	    //
-	    float dx =(*r)->x()-X; 
-	    float dy =(*r)->y()-Y; 
+	    float dx =(*r)->x()-X;
+	    float dy =(*r)->y()-Y;
 	    float x  = dx*ax+dy*ay          ;
 	    float y  =-dx*ay+dy*ax          ;
-	    float xy = x*x+y*y              ; if(xy == 0.) continue;
+	    float xy = x*x+y*y              ; if (xy == 0.) continue;
 	    float r2 = 1./xy                ;
 	    float Ut = x*r2                 ;
 	    float Vt = y*r2                 ;
-	    float UR = Ut*R+1.              ; if(UR == 0.) continue;
+	    float UR = Ut*R+1.              ; if (UR == 0.) continue;
 	    float A  = Vt*R/UR              ;
 	    float B  = Vt-A*Ut              ;
-	    if(fabs(B*m_K) > m_ipt*sqrt(1.+A*A)) continue;
+	    if (fabs(B*m_K) > m_ipt*sqrt(1.+A*A)) continue;
             ++nseed;
 	    newSeed((*r),(*r0),Zo);
 	  }
 	}
-	if(nseed < m_maxsize) continue; 
-	m_endlist=false; m_rMin = (++r0); m_fvNmin=f; m_zMin=z; 
+	if (nseed < m_maxsize) continue;
+	m_endlist=false;
+        m_rMin = (++r0);
+        m_fvNmin=f;
+        m_zMin=z;
 	return;
       }
     }
@@ -1271,42 +1277,49 @@ void InDet::SiSpacePointsSeedMaker_ITK::production2Sp()
 
 void InDet::SiSpacePointsSeedMaker_ITK::production3Sp()
 { 
-  if(m_nsaz<3) return; 
+  if (m_nsaz<3) return;
   m_seeds.clear();
 
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeedITK*>::iterator rt[9],rte[9],rb[9],rbe[9];
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
-      int a  = f *11+ZI[z];  if(!m_rfz_map[a]) continue;
+      int a  = f *11+ZI[z];
+      if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
-	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rb [NB] = m_rfz_Sorted[an].begin();
+        rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
-	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rt [NT] = m_rfz_Sorted[an].begin();
+        rte[NT++] = m_rfz_Sorted[an].end();
       } 
 
-      if(m_iteration == 0  && m_iteration0 ==0) production3SpSSS(rb,rbe,rt,rte,NB,NT,nseed);
-      else                                      production3SpPPP(rb,rbe,rt,rte,NB,NT,nseed);
+      if (m_iteration == 0  && m_iteration0 ==0) production3SpSSS(rb,rbe,rt,rte,NB,NT,nseed);
+      else                                       production3SpPPP(rb,rbe,rt,rte,NB,NT,nseed);
 
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
+      if (!m_endlist) {
+        m_fNmin=f; 
+        m_zMin = z; return;
+      }
     }
   }
   m_endlist = true;
@@ -1324,11 +1337,14 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpPPP
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeedITK*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {
+    r0 = m_rMin;
+    m_endlist = true;
+  }
 
   float ipt2K = m_ipt2K   ;
   float ipt2C = m_ipt2C   ;
-  float COFK  = m_COFK    ; 
+  float COFK  = m_COFK    ;
   float imaxp = m_diver   ;
   float imaxs = m_divermax;
 
@@ -1336,12 +1352,12 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpPPP
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.clear();
 
-    float R  = (*r0)->radius(); 
+    float R  = (*r0)->radius();
 
     const Trk::Surface* sur0 = (*r0)->sur();
     const Trk::Surface* surn = (*r0)->sun();
@@ -1352,66 +1368,76 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpPPP
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
-	float dR = R-Rb; 
+	float Rb =(*r)->radius();
+	float dR = R-Rb;
 
-	if(dR > m_drmax) {rb[i]=r; continue;}   
-	if(dR < m_drmin) break;
-	if((*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
+	if (dR > m_drmax) {
+          rb[i]=r;
+          continue;
+        }
+	if (dR < m_drmin) break;
+	if ((*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
 
 	float Tz = (Z-(*r)->z())/dR, aTz =fabs(Tz);
 
-	if(aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
+	if (aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
 	
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rb,Tz)) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rb,Tz)) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; 
+	float dR = Rt-R;
 	
-	if(dR<m_drmin) {rt[i]=r; continue;}
-	if(dR>m_drmax) break;
+	if (dR<m_drmin) {
+          rt[i]=r;
+          continue;
+        }
+	if (dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
+	if ( (*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
 
-	float Tz = ((*r)->z()-Z)/dR, aTz =fabs(Tz);  
+	float Tz = ((*r)->z()-Z)/dR, aTz =fabs(Tz);
 
-	if(aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
+	if (aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,R ,Tz)) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,R ,Tz)) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
     float ax    = X/R           ;
     float ay    = Y/R           ;
 
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeedITK* sp = m_SP[i];  
+      InDet::SiSpacePointForSeedITK* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1420,7 +1446,8 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpPPP
       float y   = dy*ax-dx*ay ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1434,7 +1461,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpPPP
    
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       float  Zob  = m_Zo[b]      ;
       float  Tzb  = m_Tz[b]      ;
@@ -1447,31 +1474,41 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpPPP
       float sTzb2 = sqrt(Tzb2)   ;
       float  CSA  = Tzb2*COFK    ;
       float ICSA  = Tzb2*ipt2C   ;
-      float imax  = imaxp        ; if(m_SP[b]->spacepoint->clusterList().second) imax = imaxs;
+      float imax  = imaxp        ;
+      if (m_SP[b]->spacepoint->clusterList().second) imax = imaxs;
   
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb; t!=Nt; ++t) {
 	
 	float dT  = ((Tzb-m_Tz[t])*(Tzb-m_Tz[t])-m_R[t]*Rb2z-(Erb+m_Er[t]))-(m_R[t]*Rb2r)*((Tzb+m_Tz[t])*(Tzb+m_Tz[t]));
-	if( dT > ICSA) continue;
+	if ( dT > ICSA) continue;
 
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ; 
+	float dU  = m_U[t]-Ub; if (dU == 0.) continue;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
 
-	float Im  = fabs((A-B*R)*R)                  ; 
+	float Im  = fabs((A-B*R)*R)                  ;
 
-	if(Im <= imax) {
-	  float dr; m_R[t] < m_R[b] ? dr = m_R[t] : dr = m_R[b]; Im+=fabs((Tzb-m_Tz[t])/(dr*sTzb2));
-	  m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t])); m_SP[t]->setParam(Im);
+	if (Im <= imax) {
+	  float dr;
+          m_R[t] < m_R[b] ? dr = m_R[t] : dr = m_R[b];
+          Im+=fabs((Tzb-m_Tz[t])/(dr*sTzb2));
+	  m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t]));
+          m_SP[t]->setParam(Im);
 	}
       }
-      if(!m_CmSp.empty()) {newOneSeedWithCurvaturesComparison(m_SP[b],(*r0),Zob);}
+      if (!m_CmSp.empty()) {newOneSeedWithCurvaturesComparison(m_SP[b],(*r0),Zob);}
+    }
+    fillSeeds();
+    nseed += m_fillOneSeeds;
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
     }
-    fillSeeds();  nseed += m_fillOneSeeds;
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
   }
 }
 
@@ -1487,23 +1524,26 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeedITK*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {
+    r0 = m_rMin;
+    m_endlist = true;
+  }
 
   float ipt2K = m_ipt2K   ;
   float ipt2C = m_ipt2C   ;
-  float COFK  = m_COFK    ; 
+  float COFK  = m_COFK    ;
   float imaxs = m_divermax;
 
   m_CmSp.clear();
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.clear();
 
-    float R  = (*r0)->radius(); 
+    float R  = (*r0)->radius();
 
     const Trk::Surface* sur0 = (*r0)->sur();
     const Trk::Surface* surn = (*r0)->sun();
@@ -1514,64 +1554,74 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
-	float dR = R-Rb; 
-
-	if(dR > m_drmax) {rb[i]=r; continue;} 
-	if(dR < m_drmin) break;
-	if((*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
+	float Rb =(*r)->radius();
+	float dR = R-Rb;
+
+	if (dR > m_drmax) {
+          rb[i]=r;
+          continue;
+        }
+	if (dR < m_drmin) break;
+	if ((*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
 	float Tz = (Z-(*r)->z())/dR, aTz =fabs(Tz);
 
-	if(aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
+	if (aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rb,Tz)) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rb,Tz)) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; 
+	float dR = Rt-R;
 	
-	if(dR<m_drmin) {rt[i]=r; continue;}
-	if(dR>m_drmax) break;
+	if (dR<m_drmin) {
+          rt[i]=r; 
+          continue;
+        }
+	if (dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
-	float Tz = ((*r)->z()-Z)/dR, aTz =fabs(Tz);  
+	if ( (*r)->sur()==sur0 || (surn && surn==(*r)->sun())) continue;
+	float Tz = ((*r)->z()-Z)/dR, aTz =fabs(Tz);
 
-	if(aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
+	if (aTz < m_dzdrmin || aTz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,R ,Tz)) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,R ,Tz)) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
     float ax    = X/R           ;
     float ay    = Y/R           ;
 
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeedITK* sp = m_SP[i];  
+      InDet::SiSpacePointForSeedITK* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1580,7 +1630,8 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
       float y   = dy*ax-dx*ay ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_X [i]   = x                                             ;
       m_Y [i]   = y                                             ;
@@ -1596,7 +1647,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
    
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       float  Zob  = m_Zo[b]      ;
       float  Tzb  = m_Tz[b]      ;
@@ -1609,41 +1660,43 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
       float sTzb2 = sqrt(Tzb2)   ;
       float  CSA  = Tzb2*COFK    ;
       float ICSA  = Tzb2*ipt2C   ;
-      float imax  = imaxs        ; 
+      float imax  = imaxs        ;
       
       float Se    = 1./sqrt(1.+Tzb*Tzb);
       float Ce    = Se*Tzb             ;
       float Sx    = Se*ax              ;
       float Sy    = Se*ay              ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb; t!=Nt; ++t) {
 
 
 	// Trigger point
 	//	
-	float dU0   =  m_U[t]-Ub       ;  if(dU0 == 0.) continue; 
+	float dU0   =  m_U[t]-Ub       ;
+        if (dU0 == 0.) continue; 
 	float A0    = (m_V[t]-Vb)/dU0  ;
 	float C0    = 1./sqrt(1.+A0*A0); 
 	float S0    = A0*C0            ;
-	float d0[3] = {Sx*C0-Sy*S0,Sx*S0+Sy*C0,Ce};  
-	float rn[3]; if(!   (*r0)->coordinates(d0,rn)) continue;
+	float d0[3] = {Sx*C0-Sy*S0, Sx*S0+Sy*C0, Ce};
+	float rn[3];
+        if (!(*r0)->coordinates(d0,rn)) continue;
 
 	// Bottom  point
 	//
 	float B0    = 2.*(Vb-A0*Ub);
 	float Cb    = (1.-B0*m_Y[b])*C0;
 	float Sb    = (A0+B0*m_X[b])*C0;
-	float db[3] = {Sx*Cb-Sy*Sb,Sx*Sb+Sy*Cb,Ce};  
-	float rbDup[3];  //a new and different rb
-	if(!m_SP[b]->coordinates(db,rbDup)) continue;
+	float db[3] = {Sx*Cb-Sy*Sb,Sx*Sb+Sy*Cb,Ce};
+	float rbDup[3]; //a new and different rb
+	if (!m_SP[b]->coordinates(db,rbDup)) continue;
 
 	// Top     point
 	//
 	float Ct    = (1.-B0*m_Y[t])*C0;
 	float St    = (A0+B0*m_X[t])*C0;
-	float dt[3] = {Sx*Ct-Sy*St,Sx*St+Sy*Ct,Ce};  
-	float rtDup[3];  //doesnt hide previous declaration of rt
-	if(!m_SP[t]->coordinates(dt,rtDup)) continue;
+	float dt[3] = {Sx*Ct-Sy*St,Sx*St+Sy*Ct,Ce};
+	float rtDup[3]; //doesnt hide previous declaration of rt
+	if (!m_SP[t]->coordinates(dt,rtDup)) continue;
 
 	float xb    = rbDup[0]-rn[0];
 	float yb    = rbDup[1]-rn[1];
@@ -1657,7 +1710,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
 	float tz    =  (rtDup[2]-rn[2])*sqrt(rt2);
 
 	float dT  = ((tb-tz)*(tb-tz)-m_R[t]*Rb2z-(Erb+m_Er[t]))-(m_R[t]*Rb2r)*((tb+tz)*(tb+tz));
-	if( dT > ICSA) continue;
+	if ( dT > ICSA) continue;
 
 	float Rn    = sqrt(rn[0]*rn[0]+rn[1]*rn[1]);
 	float Ax    = rn[0]/Rn;
@@ -1668,29 +1721,35 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS
 	float ut    = (xt*Ax+yt*Ay)*rt2;
 	float vt    = (yt*Ax-xt*Ay)*rt2;
 	
-	float dU  = ut-ub; 
-	if(dU == 0.) continue;	
+	float dU  = ut-ub;
+	if (dU == 0.) continue;
 	float A   = (vt-vb)/dU;
 	float S2  = 1.+A*A                           ;
 	float B   = vb-A*ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
 
-	float Im  = fabs((A-B*Rn)*Rn)                ; 
+	float Im  = fabs((A-B*Rn)*Rn)                ;
 
-	if(Im <= imax) {
-	  float dr; 
-	  m_R[t] < m_R[b] ? dr = m_R[t] : dr = m_R[b]; 
+	if (Im <= imax) {
+	  float dr;
+	  m_R[t] < m_R[b] ? dr = m_R[t] : dr = m_R[b];
 	  Im+=fabs((Tzb-m_Tz[t])/(dr*sTzb2));
-	  m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t])); 
+	  m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t]));
 	  m_SP[t]->setParam(Im);
 	}
 	
       }
-      if(!m_CmSp.empty()) {newOneSeedWithCurvaturesComparison(m_SP[b],(*r0),Zob);}
+      if (!m_CmSp.empty()) {newOneSeedWithCurvaturesComparison(m_SP[b],(*r0),Zob);}
+    }
+    fillSeeds();
+    nseed += m_fillOneSeeds;
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
     }
-    fillSeeds();  nseed += m_fillOneSeeds;
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
   }
 }
 
@@ -1707,13 +1766,13 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpTrigger
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeedITK*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {r0 = m_rMin; m_endlist = true;}
 
-  const float pi = M_PI, pi2 = 2.*pi; 
+  const float pi = M_PI, pi2 = 2.*pi;
 
   float ipt2K = m_ipt2K   ;
   float ipt2C = m_ipt2C   ;
-  float COFK  = m_COFK    ; 
+  float COFK  = m_COFK    ;
   float imaxp = m_diver   ;
   float imaxs = m_diversss;
 
@@ -1721,12 +1780,12 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpTrigger
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.clear();
 	
-    float R  = (*r0)->radius(); 
+    float R  = (*r0)->radius();
 
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
@@ -1736,62 +1795,71 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpTrigger
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
+	float Rb =(*r)->radius();
 
-	float dR = R-Rb; 
-	if(dR < m_drmin || (m_iteration && (*r)->spacepoint->clusterList().second)) break;
-	if(dR > m_drmax || (*r)->sur()==sur0) continue;
+	float dR = R-Rb;
+	if (dR < m_drmin || (m_iteration && (*r)->spacepoint->clusterList().second)) break;
+	if (dR > m_drmax || (*r)->sur()==sur0) continue;
 
 	// Comparison with  bottom and top Z 
 	//
 	float Tz = (Z-(*r)->z())/dR;
-	float Zo = Z-R*Tz          ; if(Zo < m_zminB || Zo > m_zmaxB) continue;
-	float Zu = Z+(550.-R)*Tz   ; if(Zu < m_zminU || Zu > m_zmaxU) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz          ;
+        if (Zo < m_zminB || Zo > m_zmaxB) continue;
+	float Zu = Z+(550.-R)*Tz   ;
+        if (Zu < m_zminU || Zu > m_zmaxU) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; 
+	float dR = Rt-R;
 	
-	if(dR<m_drmin) {rt[i]=r; continue;}
-	if(dR>m_drmax) break;
+	if (dR<m_drmin) {
+          rt[i]=r;
+          continue;
+        }
+	if (dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0) continue;
+	if ( (*r)->sur()==sur0) continue;
 
 	// Comparison with  bottom and top Z 
 	//
-	float Tz = ((*r)->z()-Z)/dR;  
-	float Zo = Z-R*Tz          ; if(Zo < m_zminB || Zo > m_zmaxB) continue;
-	float Zu = Z+(550.-R)*Tz   ; if(Zu < m_zminU || Zu > m_zmaxU) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Tz = ((*r)->z()-Z)/dR;
+	float Zo = Z-R*Tz          ;
+        if (Zo < m_zminB || Zo > m_zmaxB) continue;
+	float Zu = Z+(550.-R)*Tz   ;
+        if (Zu < m_zminU || Zu > m_zmaxU) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
 
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeedITK* sp = m_SP[i];  
+      InDet::SiSpacePointForSeedITK* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1800,7 +1868,8 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpTrigger
       float y   = dy*ax-dx*ay ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_X [i]   = x                                             ;
       m_Y [i]   = y                                             ;
@@ -1816,7 +1885,7 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpTrigger
    
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       float  Zob  = m_Zo[b]      ;
       float  Tzb  = m_Tz[b]      ;
@@ -1828,35 +1897,44 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpTrigger
       float  Tzb2 = (1.+Tzb*Tzb) ;
       float  CSA  = Tzb2*COFK    ;
       float ICSA  = Tzb2*ipt2C   ;
-      float imax  = imaxp        ; if(m_SP[b]->spacepoint->clusterList().second) imax = imaxs;
+      float imax  = imaxp        ;
+      if (m_SP[b]->spacepoint->clusterList().second) imax = imaxs;
       
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 
 	float dT  = ((Tzb-m_Tz[t])*(Tzb-m_Tz[t])-m_R[t]*Rb2z-(Erb+m_Er[t]))-(m_R[t]*Rb2r)*((Tzb+m_Tz[t])*(Tzb+m_Tz[t]));
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ; 
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub;
+        if (dU == 0.) continue;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
 
-	float Im  = fabs((A-B*R)*R)                  ; 
-	if(Im > imax) continue;
+	float Im  = fabs((A-B*R)*R)                  ;
+	if (Im > imax) continue;
 
 	// Azimuthal angle test
 	//
 	float y  = 1.;
 	float x  = 2.*B*R-A;
 	float df = fabs(atan2(ay*y-ax*x,ax*y+ay*x)-m_ftrig);
-	if(df > pi      ) df=pi2-df;
-	if(df > m_ftrigW) continue;
-	m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t])); m_SP[t]->setParam(Im);
+	if (df > pi      ) df=pi2-df;
+	if (df > m_ftrigW) continue;
+	m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t]));
+        m_SP[t]->setParam(Im);
       }
-      if(!m_CmSp.empty()) {newOneSeedWithCurvaturesComparison(m_SP[b],(*r0),Zob);}
+      if (!m_CmSp.empty()) {newOneSeedWithCurvaturesComparison(m_SP[b],(*r0),Zob);}
     }
-    fillSeeds();  nseed += m_fillOneSeeds;
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    fillSeeds();
+    nseed += m_fillOneSeeds;
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    } 
   }
 }
 
@@ -1868,25 +1946,28 @@ void InDet::SiSpacePointsSeedMaker_ITK::newOneSeed
 (InDet::SiSpacePointForSeedITK*& p1, InDet::SiSpacePointForSeedITK*& p2,
  InDet::SiSpacePointForSeedITK*& p3,float z,float q)
 {
-  if(m_nOneSeeds < m_maxOneSize) {
+  if (m_nOneSeeds < m_maxOneSize) {
 
-    m_OneSeeds[m_nOneSeeds].set(p1,p2,p3,z); 
+    m_OneSeeds[m_nOneSeeds].set(p1,p2,p3,z);
     m_mapOneSeeds.insert(std::make_pair(q,m_OneSeeds+m_nOneSeeds));
     ++m_nOneSeeds;
-  }
-  else                     {
+  } else {
     std::multimap<float,InDet::SiSpacePointsProSeedITK*>::reverse_iterator 
       l = m_mapOneSeeds.rbegin();
 
-    if((*l).first <= q) return;
+    if ((*l).first <= q) return;
     
-    InDet::SiSpacePointsProSeedITK* s = (*l).second; s->set(p1,p2,p3,z);
+    InDet::SiSpacePointsProSeedITK* s = (*l).second;
+    s->set(p1,p2,p3,z);
 
     std::multimap<float,InDet::SiSpacePointsProSeedITK*>::iterator 
       i = m_mapOneSeeds.insert(std::make_pair(q,s));
 	
-    for(++i; i!=m_mapOneSeeds.end(); ++i) {
-      if((*i).second==s) {m_mapOneSeeds.erase(i); return;}
+    for (++i; i!=m_mapOneSeeds.end(); ++i) {
+      if ((*i).second==s) {
+        m_mapOneSeeds.erase(i);
+        return;
+      }
     }
   }
 }
@@ -1896,54 +1977,60 @@ void InDet::SiSpacePointsSeedMaker_ITK::newOneSeed
 ///////////////////////////////////////////////////////////////////
 
 void InDet::SiSpacePointsSeedMaker_ITK::newOneSeedWithCurvaturesComparison
-	(SiSpacePointForSeedITK*& SPb,SiSpacePointForSeedITK*& SP0,float Zob)
+(SiSpacePointForSeedITK*& SPb,SiSpacePointForSeedITK*& SP0,float Zob)
 {
   const float dC = .00003;
 
   bool  pixb = !SPb->spacepoint->clusterList().second;
 
   std::sort(m_CmSp.begin(),m_CmSp.end(),comCurvatureITK());
-  std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>>::iterator j,jn,i = m_CmSp.begin(),ie = m_CmSp.end(); jn=i; 
+  std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>>::iterator j,jn,i = m_CmSp.begin(),ie = m_CmSp.end();
+  jn=i;
       
-  for(; i!=ie; ++i) {
+  for (; i!=ie; ++i) {
 
-    float u    = (*i).second->param(); 
+    float u    = (*i).second->param();
 
     bool                pixt = !(*i).second->spacepoint->clusterList().second;
     
-    if(pixt && fabs(SPb->z() -(*i).second->z()) > m_dzmaxPPP) continue;  
+    if (pixt && fabs(SPb->z() -(*i).second->z()) > m_dzmaxPPP) continue;
 
     const Trk::Surface* Sui  = (*i).second->sur   ();
-    float               Ri   = (*i).second->radius();  
+    float               Ri   = (*i).second->radius();
     float               Ci1  =(*i).first-dC         ;
     float               Ci2  =(*i).first+dC         ;
     float               Rmi  = 0.                   ;
     float               Rma  = 0.                   ;
     bool                in   = false;
     
-    if     (!pixb) u-=400.;
-    else if( pixt) u-=200.;
+    if      (!pixb) u-=400.;
+    else if ( pixt) u-=200.;
 
-    for(j=jn;  j!=ie; ++j) {
+    for (j=jn;  j!=ie; ++j) {
       
-      if(       j == i           ) continue;
-      if( (*j).first < Ci1       ) {jn=j; ++jn; continue;}
-      if( (*j).first > Ci2       ) break;
-      if( (*j).second->sur()==Sui) continue;
+      if (       j == i           ) continue;
+      if ( (*j).first < Ci1       ) {jn=j; ++jn; continue;}
+      if ( (*j).first > Ci2       ) break;
+      if ( (*j).second->sur()==Sui) continue;
       
-      float Rj = (*j).second->radius(); if(fabs(Rj-Ri) < m_drmin) continue;
+      float Rj = (*j).second->radius();
+      if (fabs(Rj-Ri) < m_drmin) continue;
 
-      if(in) {
-	if     (Rj > Rma) Rma = Rj;
-	else if(Rj < Rmi) Rmi = Rj;
+      if (in) {
+	if      (Rj > Rma) Rma = Rj;
+	else if (Rj < Rmi) Rmi = Rj;
 	else continue;
-	if( (Rma-Rmi) > 20.) {u-=200.; break;}
-      }
-      else {
-	in=true; Rma=Rmi=Rj; u-=200.;
+	if ( (Rma-Rmi) > 20.) {
+          u-=200.;
+          break;
+        }
+      } else {
+	in=true;
+        Rma=Rmi=Rj;
+        u-=200.;
       }
     }
-    if(u > m_umax) continue;
+    if (u > m_umax) continue;
 
     newOneSeed(SPb,SP0,(*i).second,Zob,u);
   }
@@ -1963,31 +2050,121 @@ void InDet::SiSpacePointsSeedMaker_ITK::fillSeeds ()
     l  = m_mapOneSeeds.begin(),
     le = m_mapOneSeeds.end  ();
   
-  if(l==le) return;
+  if (l==le) return;
 
-  SiSpacePointsProSeedITK* s;
+  SiSpacePointsProSeedITK* s = nullptr;
 
-  for(; l!=le; ++l) {
+  for (; l!=le; ++l) {
 
     float w = (*l).first ;
     s       = (*l).second;
-    if(l!=lf && s->spacepoint0()->radius() < 43. && w > -200.) continue;
-    if(!s->setQuality(w)) continue;
+    if (l!=lf && s->spacepoint0()->radius() < 43. && w > -200.) continue;
+    if (!s->setQuality(w)) continue;
     
-    if(m_i_seede!=m_l_seeds.end()) {
+    if (m_i_seede!=m_l_seeds.end()) {
       s  = (*m_i_seede++);
       *s = *(*l).second;
-    }
-    else                  {
+    } else {
       s = new SiSpacePointsProSeedITK(*(*l).second);
       m_l_seeds.push_back(s);
-      m_i_seede = m_l_seeds.end(); 
+      m_i_seede = m_l_seeds.end();
     }
     
-    if     (s->spacepoint0()->spacepoint->clusterList().second) w-=3000.;
-    else if(s->spacepoint1()->spacepoint->clusterList().second) w-=2000.;
-    else if(s->spacepoint2()->spacepoint->clusterList().second) w-=1000.;
+    if      (s->spacepoint0()->spacepoint->clusterList().second) w-=3000.;
+    else if (s->spacepoint1()->spacepoint->clusterList().second) w-=2000.;
+    else if (s->spacepoint2()->spacepoint->clusterList().second) w-=1000.;
+
+    m_seeds.insert(std::make_pair(w,s));
+    ++m_fillOneSeeds;
+  }
+}
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_ITK::next()
+{
+  if (m_nspoint==3) {
+    do {
+      if (m_i_seed==m_i_seede) {
+        findNext();
+        if (m_i_seed==m_i_seede) return nullptr;
+      }
+      ++m_i_seed;
+    } while (!(*m_seed++).second->set3(*m_seedOutput));
+    return m_seedOutput;
+  } else {
+    if (m_i_seed==m_i_seede) {
+      findNext();
+      if (m_i_seed==m_i_seede) return nullptr;
+    } 
+    (*m_i_seed++)->set2(*m_seedOutput);
+    return m_seedOutput;
+  }
+  return nullptr;
+}
+  
+
+bool InDet::SiSpacePointsSeedMaker_ITK::isZCompatible  
+(float& Zv,float& R,float& T)
+{
+  if (Zv < m_zminU || Zv > m_zmaxU) return false;
+  if (!m_isvertex) return true;
 
-    m_seeds.insert(std::make_pair(w,s)); ++m_fillOneSeeds;
+  std::set<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+
+  float dZmin = fabs((*v)-Zv);
+  for (++v; v!=ve; ++v) {
+    float dZ = fabs((*v)-Zv);
+    if (dZ >= dZmin) break;
+    dZmin=dZ;
+  }
+  return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+}
+
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeedITK* InDet::SiSpacePointsSeedMaker_ITK::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeedITK* sps = nullptr;
+
+  float r[15];
+  convertToBeamFrameWork(sp, r);
+
+  if (m_checketa) {
+    float z = (fabs(r[2])+m_zmax);
+    float x = r[0]*m_dzdrmin;
+    float y = r[1]*m_dzdrmin;
+    if ((z*z )<(x*x+y*y)) return sps;
+  }
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp, r);
+  } else {
+    sps = new InDet::SiSpacePointForSeedITK(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_ITK::newSeed
+(InDet::SiSpacePointForSeedITK*& p1, InDet::SiSpacePointForSeedITK*& p2, float z) 
+{
+  InDet::SiSpacePointForSeedITK* p3 = nullptr;
+
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsProSeedITK* s = (*m_i_seede++);
+    s->set(p1,p2,p3,z);
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsProSeedITK(p1,p2,p3,z));
+    m_i_seede = m_l_seeds.end();
   }
 }
+ 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
index 85e9474ec6ec..5ba54b99abba 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
@@ -36,31 +36,30 @@ InDet::SiSpacePointsSeedMaker_LowMomentum::SiSpacePointsSeedMaker_LowMomentum
 
 InDet::SiSpacePointsSeedMaker_LowMomentum::~SiSpacePointsSeedMaker_LowMomentum()
 {
-  if(m_r_index ) delete [] m_r_index ;
-  if(m_r_map   ) delete [] m_r_map   ; 
-  if(m_r_Sorted) delete [] m_r_Sorted;
+  delete [] m_r_index ;
+  delete [] m_r_map   ;
+  delete [] m_r_Sorted;
 
   // Delete seeds
   //
-  for(m_i_seed=m_l_seeds.begin(); m_i_seed!=m_l_seeds.end (); ++m_i_seed) {
-    delete *m_i_seed;
+  for (InDet::SiSpacePointsSeed* seed: m_l_seeds) {
+    delete seed;
   }
   // Delete space points for reconstruction
   //
-  m_i_spforseed=m_l_spforseed.begin();
-  for(; m_i_spforseed!=m_l_spforseed.end(); ++m_i_spforseed) {
-    delete *m_i_spforseed;
-  } 
+  for (InDet::SiSpacePointForSeed* seed: m_l_spforseed) {
+    delete seed;
+  }
 
-  if(m_SP) delete [] m_SP;
-  if(m_R ) delete [] m_R ;
-  if(m_Tz) delete [] m_Tz;
-  if(m_Er) delete [] m_Er;
-  if(m_U ) delete [] m_U ;
-  if(m_V ) delete [] m_V ;
-  if(m_Zo) delete [] m_Zo;
-  if(m_OneSeeds) delete [] m_OneSeeds;
- }
+  delete [] m_SP;
+  delete [] m_R ;
+  delete [] m_Tz;
+  delete [] m_Er;
+  delete [] m_U ;
+  delete [] m_V ;
+  delete [] m_Zo;
+  delete [] m_OneSeeds;
+}
 
 ///////////////////////////////////////////////////////////////////
 // Initialisation
@@ -68,7 +67,7 @@ InDet::SiSpacePointsSeedMaker_LowMomentum::~SiSpacePointsSeedMaker_LowMomentum()
 
 StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
   ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
@@ -80,7 +79,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
 
   // Get magnetic field service
   //
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ){
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
@@ -88,12 +87,12 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
 
   // Get tool for track-prd association
   //
-  if( m_useassoTool ) {
-    if( m_assoTool.retrieve().isFailure()) {
-      msg(MSG::FATAL)<<"Failed to retrieve tool "<< m_assoTool<<endmsg; 
+  if ( m_useassoTool ) {
+    if ( m_assoTool.retrieve().isFailure()) {
+      ATH_MSG_FATAL("Failed to retrieve tool "<< m_assoTool);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_assoTool << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_assoTool);
     }
   } else {
     m_assoTool.disable();
@@ -106,8 +105,9 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
-  if(m_outputlevel<=0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=0;
+    ATH_MSG_DEBUG(*this);
   }
   return sc;
 }
@@ -118,7 +118,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::initialize()
 
 StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -128,7 +128,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_LowMomentum::finalize()
 void InDet::SiSpacePointsSeedMaker_LowMomentum::newEvent (int)
 {
   m_trigger = false;
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   m_i_spforseed   = m_l_spforseed.begin();
   buildBeamFrameWork();
@@ -138,29 +138,25 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newEvent (int)
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel) {
+  if (m_pixel) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
+    if (spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
+      for (const SpacePointCollection* spc: *spacepointsPixel) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-      for(; spc != spce; ++spc) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
 
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
 
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -169,29 +165,25 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newEvent (int)
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct) {
+  if (m_sct) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
+    if (spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
+      for (const SpacePointCollection* spc: *spacepointsSCT) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-      for(; spc != spce; ++spc) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
 
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
 
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -208,7 +200,7 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
 (const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT)
 {
   m_trigger = false;
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   m_i_spforseed = m_l_spforseed.begin();
   buildBeamFrameWork();
@@ -218,33 +210,29 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel && vPixel.size()) {
+  if (m_pixel && vPixel.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
+    if (spacepointsPixel.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-	
-	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+	SpacePointContainer::const_iterator w = spacepointsPixel->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -253,33 +241,28 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct && vSCT.size()) {
+  if (m_sct && vSCT.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
+    if (spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
+      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-
-	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  if(m_useassoTool &&  isUsed(*sp)           ) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vSCT) {
+	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  if (m_useassoTool && isUsed(sp)) continue;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -305,10 +288,11 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newRegion
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::find2Sp(const std::list<Trk::Vertex>& lv) 
 {
-  int mode; lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
+  int mode;
+  lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin();
     m_state   = 1   ;
@@ -322,8 +306,9 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::find2Sp(const std::list<Trk::Ver
   }
   m_i_seed  = m_l_seeds.begin();
   
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -334,10 +319,11 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::find2Sp(const std::list<Trk::Ver
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::find3Sp(const std::list<Trk::Vertex>& lv) 
 {
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 3 : mode = 2;
   bool newv = newVertices(lv);
 
-  if(newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -351,8 +337,9 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::find3Sp(const std::list<Trk::Ver
   }
   m_i_seed  = m_l_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -369,10 +356,11 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::find3Sp(const std::list<Trk::Ver
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::findVSp (const std::list<Trk::Vertex>& lv)
 {
-  int mode; lv.begin()!=lv.end() ? mode = 6 : mode = 5;
+  int mode;
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -386,8 +374,9 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::findVSp (const std::list<Trk::Ve
   }
   m_i_seed  = m_l_seeds.begin();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -397,7 +386,7 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::findVSp (const std::list<Trk::Ve
 
 MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dump( MsgStream& out ) const
 {
-  if(m_nprint)  return dumpEvent(out);
+  if (m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -408,124 +397,124 @@ MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dump( MsgStream& out ) con
 MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dumpConditions( MsgStream& out ) const
 {
   int n = 42-m_spacepointsPixel.key().size();
-  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
+  std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 42-m_spacepointsSCT.key().size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
   n     = 42-m_spacepointsOverlap.key().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
+  std::string s5; for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key()<<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key()<<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Use association tool ?  | "
      <<std::setw(12)<<m_useassoTool 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmax  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(4)<<m_r1max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ    impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ/dR impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzdrver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact pps    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diverpps
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Beam X center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Y center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Z center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam X-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Y-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Z-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -535,51 +524,19 @@ MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dumpConditions( MsgStream&
 
 MsgStream& InDet::SiSpacePointsSeedMaker_LowMomentum::dumpEvent( MsgStream& out ) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
-  /*
-  if(m_outputlevel==0) return out; 
-
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-
-  out<<"|  Azimuthal  |    n   | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4]  |";
-  out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |"
-     <<std::endl;
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  
-  float sF1 = pi2/float(m_fNmax+1);
-  
-  
-  for(int f=0; f<=m_fNmax; ++f) {
-    out<<"|  "
-       <<std::setw(10)<<std::setprecision(4)<<sF1*float(f)<<" | "
-       <<std::setw(6)<<rf_map[f]<<" |";
-    for(int z=0; z!=11; ++z) {
-      out<<std::setw(6)<<rfz_map[(f*11+z)]<<" |";
-    }
-    out<<std::endl;
-  } 
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  out<<std::endl;
-  */
+     <<endmsg;
   return out;
 }
 
@@ -597,9 +554,9 @@ std::ostream& InDet::SiSpacePointsSeedMaker_LowMomentum::dump( std::ostream& out
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiSpacePointsSeedMaker_LowMomentum& se)
+(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_LowMomentum& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -607,9 +564,9 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiSpacePointsSeedMaker_LowMomentum& se)
+(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_LowMomentum& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }   
 
 ///////////////////////////////////////////////////////////////////
@@ -618,19 +575,15 @@ std::ostream& InDet::operator <<
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::findNext () 
 {
-  if(m_endlist) return;
+  if (m_endlist) return;
   
   m_i_seede = m_l_seeds.begin();
-  if     (m_mode==0 || m_mode==1) production2Sp ();
-  else if(m_mode==2 || m_mode==3) {
-
-    production3Sp   ();
-
-  }
-  else if(m_mode==5 || m_mode==6) {
-
-    production3Sp   ();
-
+  if      (m_mode==0 || m_mode==1) {
+    production2Sp();
+  } else if (m_mode==2 || m_mode==3) {
+    production3Sp();
+  } else if (m_mode==5 || m_mode==6) {
+    production3Sp();
   }
 
   m_i_seed  = m_l_seeds.begin();
@@ -643,16 +596,16 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::findNext ()
 
 bool InDet::SiSpacePointsSeedMaker_LowMomentum::newVertices(const std::list<Trk::Vertex>& lV)
 {
-  unsigned int s1 = m_l_vertex.size(); 
-  unsigned int s2 = lV      .size(); 
+  unsigned int s1 = m_l_vertex.size();
+  unsigned int s2 = lV.size();
 
-  if(s1==0 && s2==0) return false;
+  if (s1==0 && s2==0) return false;
 
   std::list<Trk::Vertex>::const_iterator v;
   m_l_vertex.erase(m_l_vertex.begin(),m_l_vertex.end());
   
-  for(v=lV.begin(); v!=lV.end(); ++v) {
-    m_l_vertex.push_back(float((*v).position().z()));
+  for (v=lV.begin(); v!=lV.end(); ++v) {
+    m_l_vertex.push_back(static_cast<float>((*v).position().z()));
   }
   return false;
 }
@@ -663,122 +616,130 @@ bool InDet::SiSpacePointsSeedMaker_LowMomentum::newVertices(const std::list<Trk:
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::buildFrameWork() 
 {
-  m_ptmin     = fabs(m_ptmin)                  ;  if(m_ptmin < 50.) m_ptmin = 50.;
+  m_ptmin     = fabs(m_ptmin)                  ;
+  if (m_ptmin < 50.) m_ptmin = 50.;
   m_iptmax  = 1./fabs(m_ptmax)                 ;
   m_iptmin  = 1./fabs(m_ptmin)                 ;
   m_rapcut    = fabs(m_rapcut)                 ;
-  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut))); 
+  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut)));
   m_dzdrmin   =-m_dzdrmax                      ;
-  m_r3max     = m_r_rmax                         ; 
+  m_r3max     = m_r_rmax                       ;
 
   m_ns = m_nsaz = m_nr = m_nrfz = 0;
 
   // Build radius sorted containers
   //
-  m_r_size = int((m_r_rmax+.1)/m_r_rstep);
+  m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep);
   m_r_Sorted = new std::list<InDet::SiSpacePointForSeed*>[m_r_size];
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
-  m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
+  m_r_map    = new int[m_r_size];
+  m_nr = 0;
+  for (int i=0; i!=m_r_size; ++i) {
+    m_r_index[i]=0;
+    m_r_map[i]=0;
+  }
 
   // Build radius-azimuthal sorted containers
   //
   const float pi2     = 2.*M_PI            ;
   const int   NFmax    = 20                ;
-  const float sFmax   = float(NFmax )/pi2;
+  const float sFmax   = static_cast<float>(NFmax )/pi2;
   const float sFmin   = 100./60.          ;
 
-  m_sF        = m_ptmin /60. ; 
-  if(m_sF    >sFmax ) m_sF    = sFmax  ; else if(m_sF < sFmin) m_sF = sFmin;
-  m_fNmax     = int(pi2*m_sF); if(m_fNmax >=NFmax) m_fNmax = NFmax-1;
+  m_sF        = m_ptmin /60.;
+  if (m_sF    >sFmax ) m_sF    = sFmax  ;
+  else if (m_sF < sFmin) m_sF = sFmin;
+  m_fNmax     = static_cast<int>(pi2*m_sF);
+  if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
 
   // Build radius-azimuthal-Z sorted containers
   //
-  m_nrfz  = 0; for(int i=0; i!=220; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
+  m_nrfz  = 0;
+  for (int i=0; i!=220; ++i) {
+    m_rfz_index [i]=0;
+    m_rfz_map [i]=0;
+  }
 
 
   // Build maps for radius-azimuthal-Z sorted collections 
   //
-  for(int f=0; f<=m_fNmax; ++f) {
+  for (int f=0; f<=m_fNmax; ++f) {
 
-    int fb = f-1; if(fb<0      ) fb=m_fNmax; 
-    int ft = f+1; if(ft>m_fNmax) ft=0; 
+    int fb = f-1; if (fb<0      ) fb=m_fNmax;
+    int ft = f+1; if (ft>m_fNmax) ft=0;
     
     // For each azimuthal region loop through all Z regions
     //
-    for(int z=0; z!=11; ++z) {
+    for (int z=0; z!=11; ++z) {
  
       int a        = f *11+z;
       int b        = fb*11+z;
       int c        = ft*11+z;
       m_rfz_b [a]    = 3; m_rfz_t [a]    = 3;
-      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; 
-      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; 
-      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; 
-      if     (z==5) {
+      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
+      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
+      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
+      if (z==5) {
 
 	m_rfz_t [a]    = 9 ;
-	m_rfz_it[a][3] = a+1; 
-	m_rfz_it[a][4] = b+1; 
-	m_rfz_it[a][5] = c+1; 
-	m_rfz_it[a][6] = a-1; 
-	m_rfz_it[a][7] = b-1; 
-	m_rfz_it[a][8] = c-1; 
-      }
-      else if(z> 5) {
+	m_rfz_it[a][3] = a+1;
+	m_rfz_it[a][4] = b+1;
+	m_rfz_it[a][5] = c+1;
+	m_rfz_it[a][6] = a-1;
+	m_rfz_it[a][7] = b-1;
+	m_rfz_it[a][8] = c-1;
+      } else if (z> 5) {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a-1; 
-	m_rfz_ib[a][4] = b-1; 
-	m_rfz_ib[a][5] = c-1; 
+	m_rfz_ib[a][3] = a-1;
+	m_rfz_ib[a][4] = b-1;
+	m_rfz_ib[a][5] = c-1;
 
-	if(z<10) {
+	if (z<10) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a+1; 
-	  m_rfz_it[a][4] = b+1; 
-	  m_rfz_it[a][5] = c+1; 
+	  m_rfz_it[a][3] = a+1;
+	  m_rfz_it[a][4] = b+1;
+	  m_rfz_it[a][5] = c+1;
 	}
-      }
-      else {
+      } else {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a+1; 
-	m_rfz_ib[a][4] = b+1; 
-	m_rfz_ib[a][5] = c+1; 
+	m_rfz_ib[a][3] = a+1;
+	m_rfz_ib[a][4] = b+1;
+	m_rfz_ib[a][5] = c+1;
 
-	if(z>0) {
+	if (z>0) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a-1; 
-	  m_rfz_it[a][4] = b-1; 
-	  m_rfz_it[a][5] = c-1; 
+	  m_rfz_it[a][3] = a-1;
+	  m_rfz_it[a][4] = b-1;
+	  m_rfz_it[a][5] = c-1;
 	}
       }
 
-      if     (z==3) {
+      if (z==3) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a+2; 
-	m_rfz_ib[a][7] = b+2; 
-	m_rfz_ib[a][8] = c+2; 
-      }
-      else if(z==7) {
+	m_rfz_ib[a][6] = a+2;
+	m_rfz_ib[a][7] = b+2;
+	m_rfz_ib[a][8] = c+2;
+      } else if (z==7) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a-2; 
-	m_rfz_ib[a][7] = b-2; 
-	m_rfz_ib[a][8] = c-2; 
+	m_rfz_ib[a][6] = a-2;
+	m_rfz_ib[a][7] = b-2;
+	m_rfz_ib[a][8] = c-2;
       }
     }
   }
   
-  if(!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
-  if(!m_R ) m_R    = new                      float[m_maxsizeSP];
-  if(!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
-  if(!m_Er) m_Er   = new                      float[m_maxsizeSP];
-  if(!m_U ) m_U    = new                      float[m_maxsizeSP]; 
-  if(!m_V ) m_V    = new                      float[m_maxsizeSP];
-  if(!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
-  if(!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsSeed [m_maxOneSize];  
+  if (!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
+  if (!m_R ) m_R    = new                      float[m_maxsizeSP];
+  if (!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
+  if (!m_Er) m_Er   = new                      float[m_maxsizeSP];
+  if (!m_U ) m_U    = new                      float[m_maxsizeSP];
+  if (!m_V ) m_V    = new                      float[m_maxsizeSP];
+  if (!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
+  if (!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsSeed[m_maxOneSize];
 
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
@@ -803,20 +764,20 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::buildBeamFrameWork()
   double sinp = sin(ph);
   double cosp = cos(ph);
   
-  m_xbeam[0] = float(cb.x())                  ; 
-  m_xbeam[1] = float(cost*cosp*cosp+sinp*sinp);
-  m_xbeam[2] = float(cost*sinp*cosp-sinp*cosp);
-  m_xbeam[3] =-float(sint*cosp               );
+  m_xbeam[0] = static_cast<float>(cb.x())                  ;
+  m_xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp);
+  m_xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp);
+  m_xbeam[3] =-static_cast<float>(sint*cosp               );
   
-  m_ybeam[0] = float(cb.y())                  ; 
-  m_ybeam[1] = float(cost*cosp*sinp-sinp*cosp);
-  m_ybeam[2] = float(cost*sinp*sinp+cosp*cosp);
-  m_ybeam[3] =-float(sint*sinp               );
+  m_ybeam[0] = static_cast<float>(cb.y())                  ;
+  m_ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp);
+  m_ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp);
+  m_ybeam[3] =-static_cast<float>(sint*sinp               );
   
-  m_zbeam[0] = float(cb.z())                  ; 
-  m_zbeam[1] = float(sint*cosp)               ;
-  m_zbeam[2] = float(sint*sinp)               ;
-  m_zbeam[3] = float(cost)                    ;
+  m_zbeam[0] = static_cast<float>(cb.z())                  ;
+  m_zbeam[1] = static_cast<float>(sint*cosp)               ;
+  m_zbeam[2] = static_cast<float>(sint*sinp)               ;
+  m_zbeam[3] = static_cast<float>(cost)                    ;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -827,9 +788,9 @@ void  InDet::SiSpacePointsSeedMaker_LowMomentum::convertToBeamFrameWork
 (const Trk::SpacePoint*const& sp,float* r) 
 {
   
-  r[0] = float(sp->globalPosition().x())-m_xbeam[0];
-  r[1] = float(sp->globalPosition().y())-m_ybeam[0];
-  r[2] = float(sp->globalPosition().z())-m_zbeam[0];
+  r[0] = static_cast<float>(sp->globalPosition().x())-m_xbeam[0];
+  r[1] = static_cast<float>(sp->globalPosition().y())-m_ybeam[0];
+  r[2] = static_cast<float>(sp->globalPosition().z())-m_zbeam[0];
 }
    
 ///////////////////////////////////////////////////////////////////
@@ -841,35 +802,36 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::fillLists()
   const float pi2 = 2.*M_PI;
   std::list<InDet::SiSpacePointForSeed*>::iterator r;
   
-  for(int i=0; i!= m_r_size;  ++i) {
+  for (int i=0; i!= m_r_size;  ++i) {
 
-    if(!m_r_map[i]) continue;
+    if (!m_r_map[i]) continue;
     r = m_r_Sorted[i].begin();
 
-    while(r!=m_r_Sorted[i].end()) {
+    while (r!=m_r_Sorted[i].end()) {
       
       // Azimuthal angle sort
       //
-      float F = (*r)->phi(); if(F<0.) F+=pi2;
+      float F = (*r)->phi();
+      if (F<0.) F+=pi2;
 
-      int   f = int(F*m_sF);
-      if (f < 0)
-        f = m_fNmax;
-      else if (f > m_fNmax)
-        f = 0;
+      int   f = static_cast<int>(F*m_sF);
+      if (f < 0) f = m_fNmax;
+      else if (f > m_fNmax) f = 0;
 
-      int z; float Z = (*r)->z();
+      int z;
+      float Z = (*r)->z();
 
       // Azimuthal angle and Z-coordinate sort
       //
-      if(Z>0.) {
+      if (Z>0.) {
 	Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10;
-      }
-      else     {
+      } else {
 	Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0;
       }
-      int n = f*11+z; ++m_nsaz;
-      m_rfz_Sorted[n].push_back(*r); if(!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
+      int n = f*11+z;
+      ++m_nsaz;
+      m_rfz_Sorted[n].push_back(*r);
+      if (!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
       m_r_Sorted[i].erase(r++);
     }
     m_r_map[i] = 0;
@@ -884,13 +846,15 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::fillLists()
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::erase()
 {
-  for(int i=0; i!=m_nr;    ++i) {
-    int n = m_r_index[i]; m_r_map[n] = 0;
+  for (int i=0; i!=m_nr;    ++i) {
+    int n = m_r_index[i];
+    m_r_map[n] = 0;
     m_r_Sorted[n].clear();
   }
 
-  for(int i=0; i!=m_nrfz;  ++i) {
-    int n = m_rfz_index[i]; m_rfz_map[n] = 0;
+  for (int i=0; i!=m_nrfz;  ++i) {
+    int n = m_rfz_index[i];
+    m_rfz_map[n] = 0;
     m_rfz_Sorted[n].clear();
   }
 
@@ -916,48 +880,57 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::production2Sp()
 
 void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp()
 { 
-  if(m_nsaz<3) return;
+  if (m_nsaz<3) return;
 
   float K = 0.;
   double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    K = 2./(300.*f[2]);
+  } else {
+    K = 2./(300.* 5. );
   }
-  else K = 2./(300.* 5. );
 
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
 
       int a  = f *11+ZI[z];
-      if(!m_rfz_map[a]) continue;
+      if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
-	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rb [NB] = m_rfz_Sorted[an].begin();
+        rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
-	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rt [NT] = m_rfz_Sorted[an].begin();
+        rte[NT++] = m_rfz_Sorted[an].end();
       } 
       production3Sp(rb,rbe,rt,rte,NB,NT,nseed,K);
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
+      if (!m_endlist) {
+        m_fNmin=f;
+        m_zMin = z;
+        return;
+      }
     }
   }
   m_endlist = true;
@@ -979,18 +952,24 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp
   const float COFP = 134*.2*9. ;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {
+    r0 = m_rMin;
+    m_endlist = true;
+  }
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float              R    = (*r0)->radius(); if(R<m_r2min) continue; if(R>m_r2max) break;
+    float              R    = (*r0)->radius();
+    if (R<m_r2min) continue;
+    if (R>m_r2max) break;
 
-    bool pix = true; if((*r0)->spacepoint->clusterList().second) pix = false;
+    bool pix = true;
+    if ((*r0)->spacepoint->clusterList().second) pix = false;
     const Trk::Surface* sur0 = (*r0)->sur();
     float              X    = (*r0)->x();
     float              Y    = (*r0)->y();
@@ -1000,69 +979,82 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp
     
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
       
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
 	float Rb =(*r)->radius();
-	if(Rb<m_r1min) {rb[i]=r; continue;}  if(Rb>m_r1max) break;
+	if (Rb<m_r1min) {
+          rb[i]=r;
+          continue;
+        }
+        if (Rb>m_r1max) break;
 	
-	float dR = R-Rb; if(dR<m_drmin) break; 
+	float dR = R-Rb;
+        if (dR<m_drmin) break;
 
-	if(dR>m_drmax || (*r)->sur()==sur0) continue;
+	if (dR>m_drmax || (*r)->sur()==sur0) continue;
 
-	if( !pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( !pix && !(*r)->spacepoint->clusterList().second) continue;
 
 	float dx = X-(*r)->x();
 	float dy = Y-(*r)->y();
 	float dZ = Z-(*r)->z();
-	m_Tz[Nb] = dZ/sqrt(dx*dx+dy*dy); if(m_Tz[Nb]<m_dzdrmin || m_Tz[Nb]>m_dzdrmax) continue;
-	m_Zo[Nb] = Z-R*m_Tz[Nb];	          
+	m_Tz[Nb] = dZ/sqrt(dx*dx+dy*dy);
+        if (m_Tz[Nb]<m_dzdrmin || m_Tz[Nb]>m_dzdrmax) continue;
+	m_Zo[Nb] = Z-R*m_Tz[Nb];
 
 	// Comparison with vertices Z coordinates
 	//
-	if(!isZCompatible(m_Zo[Nb],Rb,m_Tz[Nb])) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	if (!isZCompatible(m_Zo[Nb],Rb,m_Tz[Nb])) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin || Rt<m_r3min) {rt[i]=r; continue;}
-	if(Rt>m_r3max || dR>m_drmax) break;
+	float dR = Rt-R;
+        if (dR<m_drmin || Rt<m_r3min) {
+          rt[i]=r;
+          continue;
+        }
+	if (Rt>m_r3max || dR>m_drmax) break;
 
-	if((*r)->sur()==sur0) continue;
+	if ((*r)->sur()==sur0) continue;
 
 	float dx = X-(*r)->x();
 	float dy = Y-(*r)->y();
-	float dZ = (*r)->z()-Z; m_Tz[Nt]   = dZ/sqrt(dx*dx+dy*dy);
-	if(m_Tz[Nt]<m_dzdrmin || m_Tz[Nt]>m_dzdrmax) continue;
-	m_Zo[Nt]   = Z-R*m_Tz[Nt];	  
+	float dZ = (*r)->z()-Z;
+        m_Tz[Nt]   = dZ/sqrt(dx*dx+dy*dy);
+	if (m_Tz[Nt]<m_dzdrmin || m_Tz[Nt]>m_dzdrmax) continue;
+	m_Zo[Nt]   = Z-R*m_Tz[Nt];
 
 	// Comparison with vertices Z coordinates
 	//
-	if(!isZCompatible(m_Zo[Nt],Rt,m_Tz[Nt])) continue;
-	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	if (!isZCompatible(m_Zo[Nt],Rt,m_Tz[Nt])) continue;
+	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
       float dx = m_SP[i]->x()-X;
       float dy = m_SP[i]->y()-Y;
@@ -1082,37 +1074,44 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp
 
     // Three space points comparison
     //
-    for(int b=Nb-1; b>=0; --b) {
+    for (int b=Nb-1; b>=0; --b) {
 
       float SA  = 1.+m_Tz[b]*m_Tz[b];
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 
 	float cof = COF;
-	if(!m_SP[t]->spacepoint->clusterList().second) cof = COFP;
+	if (!m_SP[t]->spacepoint->clusterList().second) cof = COFP;
 
 	float Ts = .5*(m_Tz[b]+m_Tz[t]);
 	float dT =  m_Tz[b]-m_Tz[t]    ;
 	dT        = dT*dT-m_Er[b]-m_Er[t]-2.*m_R[b]*m_R[t]*(Ts*Ts*covr0+covz0);
 
-	if( dT > 0. && dT > (m_iptmin*m_iptmin)*cof*SA) continue;
-	float dU = m_U[t]-m_U[b]; if(dU == 0.) continue;
+	if ( dT > 0. && dT > (m_iptmin*m_iptmin)*cof*SA) continue;
+	float dU = m_U[t]-m_U[b];
+        if (dU == 0.) continue;
 	float A  = (m_V[t]-m_V[b])/dU                  ;
 	float B  =  m_V[t]-A*m_U[t]                    ;
 	float S2 = 1.+A*A                              ;
 	float S  = sqrt(S2)                            ;
 	float BK = fabs(B*K)                           ;
-	if(BK > m_iptmin*S || BK < m_iptmax*S) continue ; // Momentum    cut
-	if(dT > 0. && dT  > (BK*BK/S2)*cof*SA) continue ; // Polar angle cut
+	if (BK > m_iptmin*S || BK < m_iptmax*S) continue; // Momentum    cut
+	if (dT > 0. && dT  > (BK*BK/S2)*cof*SA) continue; // Polar angle cut
 
 	float Im = fabs((A-B*R)*R)                     ;
-	if(Im > m_diver) continue;
+	if (Im > m_diver) continue;
 
 	newOneSeed(m_SP[b]->spacepoint,(*r0)->spacepoint,m_SP[t]->spacepoint,m_Zo[b],Im);
       }
     }
-    nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    nseed += m_mapOneSeeds.size();
+    fillSeeds();
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    } 
   }
 }
 
@@ -1122,11 +1121,11 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::production3Sp
 
 bool InDet::SiSpacePointsSeedMaker_LowMomentum::isUsed(const Trk::SpacePoint* sp)
 {
-  const Trk::PrepRawData* d = sp->clusterList().first ; 
-  if(!d || !m_assoTool->isUsed(*d)) return false;
+  const Trk::PrepRawData* d = sp->clusterList().first;
+  if (!d || !m_assoTool->isUsed(*d)) return false;
 
   d = sp->clusterList().second;
-  if(!d || m_assoTool->isUsed(*d)) return true;
+  if (!d || m_assoTool->isUsed(*d)) return true;
 
   return false;
 }
@@ -1139,32 +1138,148 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::newOneSeed
 (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
  const Trk::SpacePoint*& p3,const float& z,const float& q) 
 {
-  if(m_nOneSeeds < m_maxOneSize) {
+  if (m_nOneSeeds < m_maxOneSize) {
 
-    m_OneSeeds [m_nOneSeeds].erase     (  ); 
-    m_OneSeeds [m_nOneSeeds].add       (p1); 
-    m_OneSeeds [m_nOneSeeds].add       (p2); 
-    m_OneSeeds [m_nOneSeeds].add       (p3); 
-    m_OneSeeds [m_nOneSeeds].setZVertex(double(z));
+    m_OneSeeds [m_nOneSeeds].erase     (  );
+    m_OneSeeds [m_nOneSeeds].add       (p1);
+    m_OneSeeds [m_nOneSeeds].add       (p2);
+    m_OneSeeds [m_nOneSeeds].add       (p3);
+    m_OneSeeds [m_nOneSeeds].setZVertex(static_cast<double>(z));
     m_mapOneSeeds.insert(std::make_pair(q,m_OneSeeds+m_nOneSeeds));
     ++m_nOneSeeds;
-  }
-  else                     {
+  } else {
     std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator 
       l = m_mapOneSeeds.rbegin();
-    if((*l).first <= q) return;
+    if ((*l).first <= q) return;
     
     InDet::SiSpacePointsSeed* s = (*l).second;
-    s->erase     (  ); 
-    s->add       (p1); 
-    s->add       (p2); 
-    s->add       (p3); 
-    s->setZVertex(double(z));
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
       i = m_mapOneSeeds.insert(std::make_pair(q,s));
 	
-    for(++i; i!=m_mapOneSeeds.end(); ++i) {
-      if((*i).second==s) {m_mapOneSeeds.erase(i); return;}
+    for (++i; i!=m_mapOneSeeds.end(); ++i) {
+      if ((*i).second==s) {
+        m_mapOneSeeds.erase(i);
+        return;
+      }
     }
   }
 }
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_LowMomentum::next()
+{
+  if (m_i_seed==m_i_seede) {
+    findNext();
+    if (m_i_seed==m_i_seede) return nullptr;
+  } 
+  return(*m_i_seed++);
+}
+
+bool InDet::SiSpacePointsSeedMaker_LowMomentum::isZCompatible  
+(float& Zv,float& R,float& T)
+{
+  if (Zv < m_zmin || Zv > m_zmax) return false;
+
+  std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+  if (v==ve) return true;
+
+  float dZmin = fabs((*v)-Zv);
+  ++v;
+
+  for (; v!=ve; ++v) {
+    float dZ = fabs((*v)-Zv);
+    if (dZ<dZmin) dZmin=dZ;
+  }
+  return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+}
+  
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_LowMomentum::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3];
+  convertToBeamFrameWork(sp, r);
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp, r);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
+      
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_LowMomentum::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// New 3 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_LowMomentum::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const Trk::SpacePoint*& p3,const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,p3,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// Fill seeds
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_LowMomentum::fillSeeds ()
+{
+  std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
+    l  = m_mapOneSeeds.begin(),
+    le = m_mapOneSeeds.end  ();
+
+  for (; l!=le; ++l) {
+    if (m_i_seede!=m_l_seeds.end()) {
+      InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+      *s = *(*l).second;
+    } else {
+      m_l_seeds.push_back(new InDet::SiSpacePointsSeed(*(*l).second));
+      m_i_seede = m_l_seeds.end();
+    }
+  }
+}
+  
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
index 49d78720bc8f..80746ed6d8ef 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
@@ -34,31 +34,30 @@ InDet::SiSpacePointsSeedMaker_Trigger::SiSpacePointsSeedMaker_Trigger
 
 InDet::SiSpacePointsSeedMaker_Trigger::~SiSpacePointsSeedMaker_Trigger()
 {
-  if(m_r_index ) delete [] m_r_index ;
-  if(m_r_map   ) delete [] m_r_map   ; 
-  if(m_r_Sorted) delete [] m_r_Sorted;
+  delete [] m_r_index ;
+  delete [] m_r_map   ;
+  delete [] m_r_Sorted;
 
   // Delete seeds
   //
-  for(m_i_seed=m_l_seeds.begin(); m_i_seed!=m_l_seeds.end (); ++m_i_seed) {
-    delete *m_i_seed;
+  for (InDet::SiSpacePointsSeed* seed: m_l_seeds) {
+    delete seed;
   }
   // Delete space points for reconstruction
   //
-  m_i_spforseed=m_l_spforseed.begin();
-  for(; m_i_spforseed!=m_l_spforseed.end(); ++m_i_spforseed) {
-    delete *m_i_spforseed;
-  } 
-
-  if(m_SP) delete [] m_SP;
-  if(m_R ) delete [] m_R ;
-  if(m_Tz) delete [] m_Tz;
-  if(m_Er) delete [] m_Er;
-  if(m_U ) delete [] m_U ;
-  if(m_V ) delete [] m_V ;
-  if(m_Zo) delete [] m_Zo;
-  if(m_OneSeeds) delete [] m_OneSeeds;
- }
+  for (InDet::SiSpacePointForSeed* spforseed: m_l_spforseed) {
+    delete spforseed;
+  }
+
+  delete [] m_SP;
+  delete [] m_R ;
+  delete [] m_Tz;
+  delete [] m_Er;
+  delete [] m_U ;
+  delete [] m_V ;
+  delete [] m_Zo;
+  delete [] m_OneSeeds;
+}
 
 ///////////////////////////////////////////////////////////////////
 // Initialisation
@@ -66,7 +65,7 @@ InDet::SiSpacePointsSeedMaker_Trigger::~SiSpacePointsSeedMaker_Trigger()
 
 StatusCode InDet::SiSpacePointsSeedMaker_Trigger::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   ATH_CHECK(m_spacepointsPixel.initialize(m_pixel));
   ATH_CHECK(m_spacepointsSCT.initialize(m_sct));
@@ -78,7 +77,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_Trigger::initialize()
 
   // Get magnetic field service
   //
-  if( !m_fieldServiceHandle.retrieve() ){
+  if ( !m_fieldServiceHandle.retrieve() ){
     ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
     return StatusCode::FAILURE;
   }    
@@ -91,8 +90,9 @@ StatusCode InDet::SiSpacePointsSeedMaker_Trigger::initialize()
   // Get output print level
   //
   m_outputlevel = msg().level()-MSG::DEBUG;
-  if(m_outputlevel<=0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=0;
+    ATH_MSG_DEBUG(*this);
   }
   return sc;
 }
@@ -103,7 +103,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_Trigger::initialize()
 
 StatusCode InDet::SiSpacePointsSeedMaker_Trigger::finalize()
 {
-   StatusCode sc = AlgTool::finalize(); return sc;
+  return AlgTool::finalize();
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -113,16 +113,18 @@ StatusCode InDet::SiSpacePointsSeedMaker_Trigger::finalize()
 void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
 {
   m_trigger = false;
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
+  double f[3], gP[3] ={10.,10.,0.};
 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
   }
-  else m_K = 2./(300.* 5. );
 
   m_i_spforseed   = m_l_spforseed.begin();
 
@@ -131,28 +133,24 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel) {
+  if (m_pixel) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
+    if (spacepointsPixel.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsPixel->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      for(; spc != spce; ++spc) {
-
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
+      for (const SpacePointCollection* spc: *spacepointsPixel) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -161,28 +159,24 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct) {
+  if (m_sct) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
+    if (spacepointsSCT.isValid()) {
 
-      SpacePointContainer::const_iterator spc  =  spacepointsSCT->begin();
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
+      for (const SpacePointCollection* spc: *spacepointsSCT) {
+        for (const Trk::SpacePoint* sp: *spc) {
 
-      for(; spc != spce; ++spc) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
 
-	SpacePointCollection::const_iterator sp  = (*spc)->begin();
-	SpacePointCollection::const_iterator spe = (*spc)->end  ();
-    
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int   ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -190,24 +184,23 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newEvent (int)
 
     // Get sct overlap space points containers from store gate 
     //
-    if(m_useOverlap) {
+    if (m_useOverlap) {
 
       SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap};
-      if(spacepointsOverlap.isValid()) {
+      if (spacepointsOverlap.isValid()) {
 	
-	SpacePointOverlapCollection::const_iterator sp  = spacepointsOverlap->begin();
-	SpacePointOverlapCollection::const_iterator spe = spacepointsOverlap->end  ();
-	
-	for (; sp!=spe; ++sp) {
+        for (const Trk::SpacePoint* sp: *spacepointsOverlap) {
 
-	  float r = (*sp)->r(); 
-	  if(r<0. || r>=m_r_rmax) continue;
+	  float r = sp->r();
+	  if (r<0. || r>=m_r_rmax) continue;
 
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
 
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -224,16 +217,18 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
 (const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT)
 {
   m_trigger = false;
-  if(!m_pixel && !m_sct) return;
+  if (!m_pixel && !m_sct) return;
   erase();
 
   buildBeamFrameWork();
 
-  double f[3], gP[3] ={10.,10.,0.}; 
-  if(m_fieldServiceHandle->solenoidOn()) {
-    m_fieldServiceHandle->getFieldZR(gP,f); m_K = 2./(300.*f[2]);
+  double f[3], gP[3] ={10.,10.,0.};
+  if (m_fieldServiceHandle->solenoidOn()) {
+    m_fieldServiceHandle->getFieldZR(gP,f);
+    m_K = 2./(300.*f[2]);
+  } else {
+    m_K = 2./(300.* 5. );
   }
-  else m_K = 2./(300.* 5. );
 
   m_i_spforseed = m_l_spforseed.begin();
 
@@ -242,32 +237,26 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
 
   // Get pixels space points containers from store gate 
   //
-  if(m_pixel && vPixel.size()) {
+  if (m_pixel && vPixel.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel};
-    if(spacepointsPixel.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsPixel->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vPixel.begin(), le = vPixel.end();
+    if (spacepointsPixel.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsPixel->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-	
-	SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vPixel) {
+        SpacePointContainer::const_iterator  w =  spacepointsPixel->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -276,32 +265,26 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
 
   // Get sct space points containers from store gate 
   //
-  if(m_sct && vSCT.size()) {
+  if (m_sct && vSCT.size()) {
 
     SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT};
-    if(spacepointsSCT.isValid()) {
-
-      SpacePointContainer::const_iterator spce =  spacepointsSCT->end  ();
-
-      std::vector<IdentifierHash>::const_iterator l = vSCT.begin(), le = vSCT.end();
+    if (spacepointsSCT.isValid()) {
+      SpacePointContainer::const_iterator spce = spacepointsSCT->end();
 
       // Loop through all trigger collections
       //
-      for(; l!=le; ++l) {
-
-	SpacePointContainer::const_iterator  w =  spacepointsSCT->indexFind((*l));
-	if(w==spce) continue;
-	SpacePointCollection::const_iterator sp = (*w)->begin(), spe = (*w)->end();
-
-	for(; sp != spe; ++sp) {
-
-	  float r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-
-	  InDet::SiSpacePointForSeed* sps = newSpacePoint((*sp)); 
-
-	  int   ir = int(sps->radius()*irstep); if(ir>irmax) ir = irmax;
-	  m_r_Sorted[ir].push_back(sps); ++m_r_map[ir];
-	  if(m_r_map[ir]==1) m_r_index[m_nr++] = ir;
+      for (const IdentifierHash& l: vSCT) {
+	SpacePointContainer::const_iterator w = spacepointsSCT->indexFind(l);
+	if (w==spce) continue;
+        for (const Trk::SpacePoint* sp: **w) {
+	  float r = sp->r();
+          if (r<0. || r>=m_r_rmax) continue;
+	  InDet::SiSpacePointForSeed* sps = newSpacePoint(sp);
+	  int ir = static_cast<int>(sps->radius()*irstep);
+          if (ir>irmax) ir = irmax;
+	  m_r_Sorted[ir].push_back(sps);
+          ++m_r_map[ir];
+	  if (m_r_map[ir]==1) m_r_index[m_nr++] = ir;
 	  ++m_ns;
 	}
       }
@@ -323,13 +306,13 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
   double dzdrmin = 1./tan(2.*atan(exp(-IRD.etaMinus())));
   double dzdrmax = 1./tan(2.*atan(exp(-IRD.etaPlus ())));
  
-  m_zminB        = IRD.zedMinus()-m_zbeam[0];    // min bottom Z
-  m_zmaxB        = IRD.zedPlus ()-m_zbeam[0];    // max bottom Z
+  m_zminB        = IRD.zedMinus()-m_zbeam[0]; // min bottom Z
+  m_zmaxB        = IRD.zedPlus ()-m_zbeam[0]; // max bottom Z
   m_zminU        = m_zminB+550.*dzdrmin;
   m_zmaxU        = m_zmaxB+550.*dzdrmax;
   double fmax    = IRD.phiPlus ();
   double fmin    = IRD.phiMinus();
-  if(fmin > fmax) fmin-=(2.*M_PI);
+  if (fmin > fmax) fmin-=(2.*M_PI);
   m_ftrig        = (fmin+fmax)*.5;
   m_ftrigW       = (fmax-fmin)*.5;
 }
@@ -342,10 +325,11 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newRegion
 void InDet::SiSpacePointsSeedMaker_Trigger::find2Sp(const std::list<Trk::Vertex>& lv) 
 {
 
-  int mode; lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
+  int mode;
+  lv.begin()!=lv.end() ?  mode = 1 : mode = 0;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=2 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin();
     m_state   = 1   ;
@@ -360,8 +344,9 @@ void InDet::SiSpacePointsSeedMaker_Trigger::find2Sp(const std::list<Trk::Vertex>
   }
   m_i_seed  = m_l_seeds.begin();
   
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -373,10 +358,11 @@ void InDet::SiSpacePointsSeedMaker_Trigger::find2Sp(const std::list<Trk::Vertex>
 void InDet::SiSpacePointsSeedMaker_Trigger::find3Sp(const std::list<Trk::Vertex>& lv) 
 {
 
-  int mode; lv.begin()!=lv.end() ? mode = 3 : mode = 2; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 3 : mode = 2;
   bool newv = newVertices(lv);
 
-  if(newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=3 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -393,8 +379,9 @@ void InDet::SiSpacePointsSeedMaker_Trigger::find3Sp(const std::list<Trk::Vertex>
   m_seed  = m_mapSeeds.begin();
   m_seede = m_mapSeeds.end  ();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -412,10 +399,11 @@ void InDet::SiSpacePointsSeedMaker_Trigger::find3Sp(const std::list<Trk::Vertex>
 void InDet::SiSpacePointsSeedMaker_Trigger::findVSp (const std::list<Trk::Vertex>& lv)
 {
 
-  int mode; lv.begin()!=lv.end() ? mode = 6 : mode = 5; 
+  int mode;
+  lv.begin()!=lv.end() ? mode = 6 : mode = 5;
   bool newv = newVertices(lv);
   
-  if(newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
+  if (newv || !m_state || m_nspoint!=4 || m_mode!=mode || m_nlist) {
 
     m_i_seede   = m_l_seeds.begin() ;
     m_state   = 1               ;
@@ -432,8 +420,9 @@ void InDet::SiSpacePointsSeedMaker_Trigger::findVSp (const std::list<Trk::Vertex
   m_seed  = m_mapSeeds.begin();
   m_seede = m_mapSeeds.end  ();
 
-  if(m_outputlevel<=0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  if (m_outputlevel<=0) {
+    m_nprint=1;
+    ATH_MSG_DEBUG(*this);
   }
 }
 
@@ -443,7 +432,7 @@ void InDet::SiSpacePointsSeedMaker_Trigger::findVSp (const std::list<Trk::Vertex
 
 MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dump( MsgStream& out ) const
 {
-  if(m_nprint)  return dumpEvent(out);
+  if (m_nprint)  return dumpEvent(out);
   return dumpConditions(out);
 }
 
@@ -454,134 +443,134 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dump( MsgStream& out ) const
 MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dumpConditions( MsgStream& out ) const
 {
   int n = 42-m_spacepointsPixel.key().size();
-  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
+  std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 42-m_spacepointsSCT.key().size();
-  std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
+  std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
   n     = 42-m_spacepointsOverlap.key().size();
-  std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
+  std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
   n     = 42-m_beamSpotKey.key().size();
-  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
+  std::string s5; for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
 
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Pixel    space points   | "<<m_spacepointsPixel.key() <<s2
-     <<std::endl;
+     <<endmsg;
   out<<"| SCT      space points   | "<<m_spacepointsSCT.key() <<s3
-     <<std::endl;
+     <<endmsg;
   out<<"| Overlap  space points   | "<<m_spacepointsOverlap.key() <<s4
-     <<std::endl;
+     <<endmsg;
   out<<"| BeamConditionsService   | "<<m_beamSpotKey.key()<<s5
-     <<std::endl;
+     <<endmsg;
   out<<"| usePixel                | "
      <<std::setw(12)<<m_pixel 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| useSCT                  | "
      <<std::setw(12)<<m_sct 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSize                 | "
      <<std::setw(12)<<m_maxsize 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| maxSizeSP               | "
      <<std::setw(12)<<m_maxsizeSP
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| pTmin  (mev)            | "
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| |rapidity|          <=  | " 
      <<std::setw(12)<<std::setprecision(5)<<m_rapcut
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius SP           | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max Z-vertex position   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3min
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(3) | "
      <<std::setw(12)<<std::setprecision(4)<<m_r1max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius last   SP(3) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r3max
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2minv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius first  SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r1maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max radius second SP(2) | "
      <<std::setw(12)<<std::setprecision(5)<<m_r2maxv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| min space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmin
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max space points dR     | "
      <<std::setw(12)<<std::setprecision(5)<<m_drmax
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ    impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max dZ/dR impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_dzdrver 
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact        | "
      <<std::setw(12)<<std::setprecision(5)<<m_diver
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact pps    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diverpps
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| max       impact sss    | "
      <<std::setw(12)<<std::setprecision(5)<<m_diversss
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| Beam X center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Y center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam Z center           | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[0]
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| Beam X-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_xbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Y-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_ybeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"| Beam Z-axis direction   | "
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[1]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[2]
      <<std::setw(12)<<std::setprecision(5)<<m_zbeam[3]
-     <<"      |"<<std::endl;
+     <<"      |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   return out;
 }
 
@@ -591,54 +580,22 @@ MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dumpConditions( MsgStream& out
 
 MsgStream& InDet::SiSpacePointsSeedMaker_Trigger::dumpEvent( MsgStream& out ) const
 {
-  //const float pi2    = 2.*M_PI;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
+     <<endmsg;
   out<<"| m_ns                    | "
      <<std::setw(12)<<m_ns
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsaz                  | "
      <<std::setw(12)<<m_nsaz
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| m_nsazv                 | "
      <<std::setw(12)<<m_nsazv
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"| seeds                   | "
      <<std::setw(12)<<m_l_seeds.size()
-     <<"                              |"<<std::endl;
+     <<"                              |"<<endmsg;
   out<<"|---------------------------------------------------------------------|"
-     <<std::endl;
-  /*
-  if(m_outputlevel==0) return out; 
-
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-
-  out<<"|  Azimuthal  |    n   | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4]  |";
-  out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |"
-     <<std::endl;
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  
-  float sF1 = pi2/float(m_fNmax+1);
-  
-  
-  for(int f=0; f<=m_fNmax; ++f) {
-    out<<"|  "
-       <<std::setw(10)<<std::setprecision(4)<<sF1*float(f)<<" | "
-       <<std::setw(6)<<rf_map[f]<<" |";
-    for(int z=0; z!=11; ++z) {
-      out<<std::setw(6)<<rfz_map[(f*11+z)]<<" |";
-    }
-    out<<std::endl;
-  } 
-  out<<"|-------------|--------|-------|-------|-------|-------|-------|";
-  out<<"-------|-------|-------|-------|-------|-------|"
-     <<std::endl;
-  out<<std::endl;
-  */
+     <<endmsg;
   return out;
 }
 
@@ -656,9 +613,9 @@ std::ostream& InDet::SiSpacePointsSeedMaker_Trigger::dump( std::ostream& out ) c
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::SiSpacePointsSeedMaker_Trigger& se)
+(MsgStream& sl,const InDet::SiSpacePointsSeedMaker_Trigger& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -666,9 +623,9 @@ MsgStream& InDet::operator    <<
 ///////////////////////////////////////////////////////////////////
 
 std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::SiSpacePointsSeedMaker_Trigger& se)
+(std::ostream& sl,const InDet::SiSpacePointsSeedMaker_Trigger& se)
 { 
-  return se.dump(sl); 
+  return se.dump(sl);
 }   
 
 ///////////////////////////////////////////////////////////////////
@@ -677,13 +634,13 @@ std::ostream& InDet::operator <<
 
 void InDet::SiSpacePointsSeedMaker_Trigger::findNext () 
 {
-  if(m_endlist) return;
+  if (m_endlist) return;
 
   m_i_seede = m_l_seeds.begin();
 
-  if     (m_mode==0 || m_mode==1) production2Sp ();
-  else if(m_mode==2 || m_mode==3) production3Sp ();
-  else if(m_mode==5 || m_mode==6) production3Sp ();
+  if      (m_mode==0 || m_mode==1) production2Sp ();
+  else if (m_mode==2 || m_mode==3) production3Sp ();
+  else if (m_mode==5 || m_mode==6) production3Sp ();
 
   m_i_seed  = m_l_seeds.begin();
   m_seed  = m_mapSeeds.begin();
@@ -697,17 +654,17 @@ void InDet::SiSpacePointsSeedMaker_Trigger::findNext ()
 
 bool InDet::SiSpacePointsSeedMaker_Trigger::newVertices(const std::list<Trk::Vertex>& lV)
 {
-  unsigned int s1 = m_l_vertex.size(); 
-  unsigned int s2 = lV      .size(); 
+  unsigned int s1 = m_l_vertex.size();
+  unsigned int s2 = lV.size();
 
-  if(s1==0 && s2==0) return false;
+  if (s1==0 && s2==0) return false;
 
   std::list<Trk::Vertex>::const_iterator v;
   m_l_vertex.erase(m_l_vertex.begin(),m_l_vertex.end());
   
-  for(v=lV.begin(); v!=lV.end(); ++v) {
-    m_l_vertex.push_back(float((*v).position().z()));
-    if(m_l_vertex.size() >= m_maxNumberVertices) break;
+  for (v=lV.begin(); v!=lV.end(); ++v) {
+    m_l_vertex.push_back(static_cast<float>((*v).position().z()));
+    if (m_l_vertex.size() >= m_maxNumberVertices) break;
   }
   return false;
 }
@@ -718,11 +675,12 @@ bool InDet::SiSpacePointsSeedMaker_Trigger::newVertices(const std::list<Trk::Ver
 
 void InDet::SiSpacePointsSeedMaker_Trigger::buildFrameWork() 
 {
-  m_ptmin     = fabs(m_ptmin)                  ;  if(m_ptmin < 100.) m_ptmin = 100.;
+  m_ptmin     = fabs(m_ptmin)                  ;
+  if (m_ptmin < 100.) m_ptmin = 100.;
   m_rapcut    = fabs(m_rapcut)                 ;
-  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut))); 
+  m_dzdrmax   = 1./tan(2.*atan(exp(-m_rapcut)));
   m_dzdrmin   =-m_dzdrmax                      ;
-  m_r3max     = m_r_rmax                         ; 
+  m_r3max     = m_r_rmax                       ;
   m_COF       =  134*.05*9.                    ;
   m_ipt       = 1./fabs(.9*m_ptmin)            ;
   m_ipt2      = m_ipt*m_ipt                    ;
@@ -732,134 +690,151 @@ void InDet::SiSpacePointsSeedMaker_Trigger::buildFrameWork()
 
   // Build radius sorted containers
   //
-  m_r_size = int((m_r_rmax+.1)/m_r_rstep);
+  m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep);
   m_r_Sorted = new std::list<InDet::SiSpacePointForSeed*>[m_r_size];
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
-  m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
+  m_r_map    = new int[m_r_size];
+  m_nr   = 0;
+  for (int i=0; i!=m_r_size; ++i) {
+    m_r_index[i]=0;
+    m_r_map[i]=0;
+  }
 
   // Build radius-azimuthal sorted containers
   //
   const float pi2     = 2.*M_PI            ;
   const int   NFmax    = 53                ;
-  const float sFmax   = float(NFmax )/pi2;
+  const float sFmax   = static_cast<float>(NFmax )/pi2;
   const float sFmin = 100./60.          ;
 
-  m_sF        = m_ptmin /60. ; if(m_sF    >sFmax ) m_sF    = sFmax  ; else if(m_sF < sFmin) m_sF = sFmin;
-  m_fNmax     = int(pi2*m_sF); if(m_fNmax >=NFmax) m_fNmax = NFmax-1;
+  m_sF        = m_ptmin /60. ;
+  if (m_sF    >sFmax ) m_sF    = sFmax  ;
+  else if (m_sF < sFmin) m_sF = sFmin;
+  m_fNmax     = static_cast<int>(pi2*m_sF);
+  if (m_fNmax >=NFmax) m_fNmax = NFmax-1;
 
  
   // Build radius-azimuthal-Z sorted containers
   //
-  m_nrfz  = 0; for(int i=0; i!=583; ++i) {m_rfz_index [i]=0; m_rfz_map [i]=0;}
+  m_nrfz  = 0;
+  for (int i=0; i!=583; ++i) {
+    m_rfz_index [i]=0;
+    m_rfz_map [i]=0;
+  }
 
   // Build radius-azimuthal-Z sorted containers for Z-vertices
   //
   const int   NFtmax  = 100               ;
-  const float sFvmax = float(NFtmax)/pi2;
-  m_sFv       = m_ptmin/120.  ; if(m_sFv   >sFvmax)  m_sFv    = sFvmax; 
-  m_fvNmax    = int(pi2*m_sFv); if(m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1;
-  m_nrfzv = 0; for(int i=0; i!=300; ++i) {m_rfzv_index[i]=0; m_rfzv_map[i]=0;}
+  const float sFvmax = static_cast<float>(NFtmax)/pi2;
+  m_sFv       = m_ptmin/120.  ;
+  if (m_sFv   >sFvmax)  m_sFv    = sFvmax;
+  m_fvNmax    = static_cast<int>(pi2*m_sFv);
+  if (m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1;
+  m_nrfzv = 0;
+  for (int i=0; i!=300; ++i) {
+    m_rfzv_index[i]=0;
+    m_rfzv_map[i]=0;
+  }
 
   // Build maps for radius-azimuthal-Z sorted collections 
   //
-  for(int f=0; f<=m_fNmax; ++f) {
+  for (int f=0; f<=m_fNmax; ++f) {
 
-    int fb = f-1; if(fb<0      ) fb=m_fNmax; 
-    int ft = f+1; if(ft>m_fNmax) ft=0; 
+    int fb = f-1;
+    if (fb<0) fb=m_fNmax; 
+    int ft = f+1;
+    if (ft>m_fNmax) ft=0;
     
     // For each azimuthal region loop through all Z regions
     //
-    for(int z=0; z!=11; ++z) {
+    for (int z=0; z!=11; ++z) {
  
       int a        = f *11+z;
       int b        = fb*11+z;
       int c        = ft*11+z;
       m_rfz_b [a]    = 3; m_rfz_t [a]    = 3;
-      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; 
-      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; 
-      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; 
-      if     (z==5) {
+      m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a;
+      m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b;
+      m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c;
+      if (z==5) {
 
 	m_rfz_t [a]    = 9 ;
-	m_rfz_it[a][3] = a+1; 
-	m_rfz_it[a][4] = b+1; 
-	m_rfz_it[a][5] = c+1; 
-	m_rfz_it[a][6] = a-1; 
-	m_rfz_it[a][7] = b-1; 
-	m_rfz_it[a][8] = c-1; 
-      }
-      else if(z> 5) {
+	m_rfz_it[a][3] = a+1;
+	m_rfz_it[a][4] = b+1;
+	m_rfz_it[a][5] = c+1;
+	m_rfz_it[a][6] = a-1;
+	m_rfz_it[a][7] = b-1;
+	m_rfz_it[a][8] = c-1;
+      } else if (z> 5) {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a-1; 
-	m_rfz_ib[a][4] = b-1; 
-	m_rfz_ib[a][5] = c-1; 
+	m_rfz_ib[a][3] = a-1;
+	m_rfz_ib[a][4] = b-1;
+	m_rfz_ib[a][5] = c-1;
 
-	if(z<10) {
+	if (z<10) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a+1; 
-	  m_rfz_it[a][4] = b+1; 
-	  m_rfz_it[a][5] = c+1; 
+	  m_rfz_it[a][3] = a+1;
+	  m_rfz_it[a][4] = b+1;
+	  m_rfz_it[a][5] = c+1;
 	}
-      }
-      else {
+      } else {
 
 	m_rfz_b [a]    = 6 ;
-	m_rfz_ib[a][3] = a+1; 
-	m_rfz_ib[a][4] = b+1; 
-	m_rfz_ib[a][5] = c+1; 
+	m_rfz_ib[a][3] = a+1;
+	m_rfz_ib[a][4] = b+1;
+	m_rfz_ib[a][5] = c+1;
 
-	if(z>0) {
+	if (z>0) {
 
 	  m_rfz_t [a]    = 6 ;
-	  m_rfz_it[a][3] = a-1; 
-	  m_rfz_it[a][4] = b-1; 
-	  m_rfz_it[a][5] = c-1; 
+	  m_rfz_it[a][3] = a-1;
+	  m_rfz_it[a][4] = b-1;
+	  m_rfz_it[a][5] = c-1;
 	}
       }
 
-      if     (z==3) {
+      if (z==3) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a+2; 
-	m_rfz_ib[a][7] = b+2; 
-	m_rfz_ib[a][8] = c+2; 
-      }
-      else if(z==7) {
+	m_rfz_ib[a][6] = a+2;
+	m_rfz_ib[a][7] = b+2;
+	m_rfz_ib[a][8] = c+2;
+      } else if (z==7) {
 	m_rfz_b[a]      = 9;
-	m_rfz_ib[a][6] = a-2; 
-	m_rfz_ib[a][7] = b-2; 
-	m_rfz_ib[a][8] = c-2; 
+	m_rfz_ib[a][6] = a-2;
+	m_rfz_ib[a][7] = b-2;
+	m_rfz_ib[a][8] = c-2;
       }
     }
   }
 
   // Build maps for radius-azimuthal-Z sorted collections for Z
   //
-  for(int f=0; f<=m_fvNmax; ++f) {
+  for (int f=0; f<=m_fvNmax; ++f) {
 
-    int fb = f-1; if(fb<0       ) fb=m_fvNmax; 
-    int ft = f+1; if(ft>m_fvNmax) ft=0; 
+    int fb = f-1;
+    if (fb<0) fb=m_fvNmax;
+    int ft = f+1;
+    if (ft>m_fvNmax) ft=0;
     
     // For each azimuthal region loop through central Z regions
     //
-    for(int z=0; z!=3; ++z) {
+    for (int z=0; z!=3; ++z) {
       
-      int a  = f *3+z; 
+      int a  = f *3+z;
       int b  = fb*3+z;
       int c  = ft*3+z;
       m_rfzv_n[a]    = 3;
       m_rfzv_i[a][0] = a;
       m_rfzv_i[a][1] = b;
       m_rfzv_i[a][2] = c;
-      if     (z>1) {
+      if (z>1) {
 	m_rfzv_n[a]    = 6;
 	m_rfzv_i[a][3] = a-1;
 	m_rfzv_i[a][4] = b-1;
 	m_rfzv_i[a][5] = c-1;
-      }
-      else if(z<1) {
+      } else if (z<1) {
 	m_rfzv_n[a]    = 6;
 	m_rfzv_i[a][3] = a+1;
 	m_rfzv_i[a][4] = b+1;
@@ -868,14 +843,14 @@ void InDet::SiSpacePointsSeedMaker_Trigger::buildFrameWork()
     }
   }
   
-  if(!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
-  if(!m_R ) m_R    = new                      float[m_maxsizeSP];
-  if(!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
-  if(!m_Er) m_Er   = new                      float[m_maxsizeSP];
-  if(!m_U ) m_U    = new                      float[m_maxsizeSP]; 
-  if(!m_V ) m_V    = new                      float[m_maxsizeSP];
-  if(!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
-  if(!m_OneSeeds) m_OneSeeds  = new InDet::SiSpacePointsSeed [m_maxOneSize];  
+  if (!m_SP) m_SP   = new InDet::SiSpacePointForSeed*[m_maxsizeSP];
+  if (!m_R ) m_R    = new                      float[m_maxsizeSP];
+  if (!m_Tz) m_Tz   = new                      float[m_maxsizeSP];
+  if (!m_Er) m_Er   = new                      float[m_maxsizeSP];
+  if (!m_U ) m_U    = new                      float[m_maxsizeSP];
+  if (!m_V ) m_V    = new                      float[m_maxsizeSP];
+  if (!m_Zo) m_Zo   = new                      float[m_maxsizeSP];
+  if (!m_OneSeeds) m_OneSeeds = new InDet::SiSpacePointsSeed[m_maxOneSize];
 
   m_i_seed  = m_l_seeds.begin();
   m_i_seede = m_l_seeds.end  ();
@@ -902,20 +877,20 @@ void InDet::SiSpacePointsSeedMaker_Trigger::buildBeamFrameWork()
   double sinp = sin(ph);
   double cosp = cos(ph);
   
-  m_xbeam[0] = float(cb.x())                  ; 
-  m_xbeam[1] = float(cost*cosp*cosp+sinp*sinp);
-  m_xbeam[2] = float(cost*sinp*cosp-sinp*cosp);
-  m_xbeam[3] =-float(sint*cosp               );
+  m_xbeam[0] = static_cast<float>(cb.x())                  ;
+  m_xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp);
+  m_xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp);
+  m_xbeam[3] =-static_cast<float>(sint*cosp               );
   
-  m_ybeam[0] = float(cb.y())                  ; 
-  m_ybeam[1] = float(cost*cosp*sinp-sinp*cosp);
-  m_ybeam[2] = float(cost*sinp*sinp+cosp*cosp);
-  m_ybeam[3] =-float(sint*sinp               );
+  m_ybeam[0] = static_cast<float>(cb.y())                  ;
+  m_ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp);
+  m_ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp);
+  m_ybeam[3] =-static_cast<float>(sint*sinp               );
   
-  m_zbeam[0] = float(cb.z())                  ; 
-  m_zbeam[1] = float(sint*cosp)               ;
-  m_zbeam[2] = float(sint*sinp)               ;
-  m_zbeam[3] = float(cost)                    ;
+  m_zbeam[0] = static_cast<float>(cb.z())                  ;
+  m_zbeam[1] = static_cast<float>(sint*cosp)               ;
+  m_zbeam[2] = static_cast<float>(sint*sinp)               ;
+  m_zbeam[3] = static_cast<float>(cost)                    ;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -925,9 +900,9 @@ void InDet::SiSpacePointsSeedMaker_Trigger::buildBeamFrameWork()
 void  InDet::SiSpacePointsSeedMaker_Trigger::convertToBeamFrameWork
 (const Trk::SpacePoint*const& sp,float* r) 
 { 
-  r[0] = float(sp->globalPosition().x())-m_xbeam[0];
-  r[1] = float(sp->globalPosition().y())-m_ybeam[0];
-  r[2] = float(sp->globalPosition().z())-m_zbeam[0];
+  r[0] = static_cast<float>(sp->globalPosition().x())-m_xbeam[0];
+  r[1] = static_cast<float>(sp->globalPosition().y())-m_ybeam[0];
+  r[2] = static_cast<float>(sp->globalPosition().z())-m_zbeam[0];
 }
    
 ///////////////////////////////////////////////////////////////////
@@ -939,45 +914,47 @@ void InDet::SiSpacePointsSeedMaker_Trigger::fillLists()
   const float pi2 = 2.*M_PI;
   std::list<InDet::SiSpacePointForSeed*>::iterator r;
   
-  for(int i=0; i!= m_r_size;  ++i) {
+  for (int i=0; i!= m_r_size;  ++i) {
 
-    if(!m_r_map[i]) continue;
+    if (!m_r_map[i]) continue;
     r = m_r_Sorted[i].begin();
 
-    while(r!=m_r_Sorted[i].end()) {
+    while (r!=m_r_Sorted[i].end()) {
       
       // Azimuthal angle sort
       //
-      float F = (*r)->phi(); if(F<0.) F+=pi2;
+      float F = (*r)->phi();
+      if (F<0.) F+=pi2;
 
-      int   f = int(F*m_sF);
-      if (f < 0)
-        f = m_fNmax;
-      else if (f > m_fNmax)
-        f = 0;
+      int   f = static_cast<int>(F*m_sF);
+      if (f < 0) f = m_fNmax;
+      else if (f > m_fNmax) f = 0;
 
-      int z; float Z = (*r)->z();
+      int z;
+      float Z = (*r)->z();
 
       // Azimuthal angle and Z-coordinate sort
       //
-      if(Z>0.) {Z < 250.? z=5 : z=6;}
-      else     {Z >-250.? z=5 : z=4;}
-      int n = f*11+z; ++m_nsaz;
-      m_rfz_Sorted[n].push_back(*r); if(!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
-
-      if((*r)->spacepoint->clusterList().second == 0 && z>=3 && z<=7) { 
+      if (Z>0.) {Z < 250.? z=5 : z=6;}
+      else      {Z >-250.? z=5 : z=4;}
+      int n = f*11+z;
+      ++m_nsaz;
+      m_rfz_Sorted[n].push_back(*r);
+      if (!m_rfz_map[n]++) m_rfz_index[m_nrfz++] = n;
+
+      if ((*r)->spacepoint->clusterList().second == 0 && z>=3 && z<=7) { 
 	z<=4 ? z=0 : z>=6 ? z=2 : z=1;
 	
 	// Azimuthal angle and Z-coordinate sort for fast vertex search
 	//
-	f = int(F*m_sFv);
-        if (f < 0)
-          f+=m_fvNmax;
-        else if (f> m_fvNmax)
-          f-=m_fvNmax;
-
-	n = f*3+z; ++m_nsazv;
-	m_rfzv_Sorted[n].push_back(*r); if(!m_rfzv_map[n]++) m_rfzv_index[m_nrfzv++] = n;
+	f = static_cast<int>(F*m_sFv);
+        if (f < 0) f+=m_fvNmax;
+        else if (f> m_fvNmax) f-=m_fvNmax;
+
+	n = f*3+z;
+        ++m_nsazv;
+	m_rfzv_Sorted[n].push_back(*r);
+        if (!m_rfzv_map[n]++) m_rfzv_index[m_nrfzv++] = n;
       }
       m_r_Sorted[i].erase(r++);
     }
@@ -993,18 +970,21 @@ void InDet::SiSpacePointsSeedMaker_Trigger::fillLists()
 
 void InDet::SiSpacePointsSeedMaker_Trigger::erase()
 {
-  for(int i=0; i!=m_nr;    ++i) {
-    int n = m_r_index[i]; m_r_map[n] = 0;
+  for (int i=0; i!=m_nr;    ++i) {
+    int n = m_r_index[i];
+    m_r_map[n] = 0;
     m_r_Sorted[n].clear();
   }
 
-  for(int i=0; i!=m_nrfz;  ++i) {
-    int n = m_rfz_index[i]; m_rfz_map[n] = 0;
+  for (int i=0; i!=m_nrfz;  ++i) {
+    int n = m_rfz_index[i];
+    m_rfz_map[n] = 0;
     m_rfz_Sorted[n].clear();
   }
 
-  for(int i=0; i!=m_nrfzv; ++i) {
-    int n = m_rfzv_index[i]; m_rfzv_map[n] = 0;
+  for (int i=0; i!=m_nrfzv; ++i) {
+    int n = m_rfzv_index[i];
+    m_rfzv_map[n] = 0;
     m_rfzv_Sorted[n].clear();
   }
   m_state = 0;
@@ -1022,35 +1002,39 @@ void InDet::SiSpacePointsSeedMaker_Trigger::erase()
 
 void InDet::SiSpacePointsSeedMaker_Trigger::production2Sp()
 {
-  if(m_nsazv<2) return;
+  if (m_nsazv<2) return;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0,r0e,r,re;
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fvNmin; f<=m_fvNmax; ++f) {
+  for (int f=m_fvNmin; f<=m_fvNmax; ++f) {
 
     // For each azimuthal region loop through Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
-    for(; z!=3; ++z) {
+    int z = 0; if (!m_endlist) z = m_zMin;
+    for (; z!=3; ++z) {
       
-      int a  = f*3+z;  if(!m_rfzv_map[a]) continue; 
-      r0  = m_rfzv_Sorted[a].begin(); 
-      r0e = m_rfzv_Sorted[a].end  (); 
-
-      if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+      int a  = f*3+z;
+      if (!m_rfzv_map[a]) continue;
+      r0  = m_rfzv_Sorted[a].begin();
+      r0e = m_rfzv_Sorted[a].end  ();
+
+      if (!m_endlist) {
+        r0 = m_rMin;
+        m_endlist = true;
+      }
 
       // Loop through trigger space points
       //
-      for(; r0!=r0e; ++r0) {
+      for (; r0!=r0e; ++r0) {
 
 	float X  = (*r0)->x();
 	float Y  = (*r0)->y();
 	float R  = (*r0)->radius();
-	if(R<m_r2minv) continue;
-        if(R>m_r2maxv) break;
+	if (R<m_r2minv) continue;
+        if (R>m_r2maxv) break;
 	float Z  = (*r0)->z();
 	float ax = X/R;
 	float ay = Y/R;
@@ -1058,50 +1042,54 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production2Sp()
 	// Bottom links production
 	//
 	int NB = m_rfzv_n[a];
-	for(int i=0; i!=NB; ++i) {
+	for (int i=0; i!=NB; ++i) {
 	  
 	  int an = m_rfzv_i[a][i];
-	  if(!m_rfzv_map[an]) continue; 
+	  if (!m_rfzv_map[an]) continue;
 
 	  r  =  m_rfzv_Sorted[an].begin();
 	  re =  m_rfzv_Sorted[an].end  ();
 	  
-	  for(; r!=re; ++r) {
+	  for (; r!=re; ++r) {
 	    
 	    float Rb =(*r)->radius();
-	    if(Rb<m_r1minv) continue;
-            if(Rb>m_r1maxv) break;
-	    float dR = R-Rb; 
-	    if(dR<m_drminv) break;
-            if(dR>m_drmax) continue;
+	    if (Rb<m_r1minv) continue;
+            if (Rb>m_r1maxv) break;
+	    float dR = R-Rb;
+	    if (dR<m_drminv) break;
+            if (dR>m_drmax) continue;
 	    float dZ = Z-(*r)->z();
-	    float Tz = dZ/dR; if(Tz<m_dzdrmin || Tz>m_dzdrmax) continue;
-	    float Zo = Z-R*Tz;	          
+	    float Tz = dZ/dR;
+            if (Tz<m_dzdrmin || Tz>m_dzdrmax) continue;
+	    float Zo = Z-R*Tz;
 
 	    // Comparison with vertices Z coordinates
 	    //
-	    if(!isZCompatible(Zo,Rb,Tz)) continue;
+	    if (!isZCompatible(Zo,Rb,Tz)) continue;
 
 	    // Momentum cut
 	    //
-	    float dx =(*r)->x()-X; 
-	    float dy =(*r)->y()-Y; 
+	    float dx =(*r)->x()-X;
+	    float dy =(*r)->y()-Y;
 	    float x  = dx*ax+dy*ay          ;
 	    float y  =-dx*ay+dy*ax          ;
-	    float xy = x*x+y*y              ; if(xy == 0.) continue;
+	    float xy = x*x+y*y              ; if (xy == 0.) continue;
 	    float r2 = 1./xy                ;
 	    float Ut = x*r2                 ;
 	    float Vt = y*r2                 ;
-	    float UR = Ut*R+1.              ; if(UR == 0.) continue;
+	    float UR = Ut*R+1.              ; if (UR == 0.) continue;
 	    float A  = Vt*R/UR              ;
 	    float B  = Vt-A*Ut              ;
-	    if(fabs(B*m_K) > m_ipt*sqrt(1.+A*A)) continue;
+	    if (fabs(B*m_K) > m_ipt*sqrt(1.+A*A)) continue;
             ++nseed;
 	    newSeed((*r)->spacepoint,(*r0)->spacepoint,Zo);
 	  }
 	}
-	if(nseed < m_maxsize) continue; 
-	m_endlist=false; m_rMin = (++r0); m_fvNmin=f; m_zMin=z; 
+	if (nseed < m_maxsize) continue;
+	m_endlist=false;
+        m_rMin = (++r0);
+        m_fvNmin=f;
+        m_zMin=z;
 	return;
       }
     }
@@ -1115,39 +1103,48 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production2Sp()
 
 void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp()
 { 
-  m_mapSeeds.clear(); if(m_nsaz<3) return;
+  m_mapSeeds.clear();
+  if (m_nsaz<3) return;
 
   const int   ZI[11]= {5,6,7,8,9,10,4,3,2,1,0};
   std::list<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9];
-  int nseed = 0; 
+  int nseed = 0;
 
   // Loop thorugh all azimuthal regions
   //
-  for(int f=m_fNmin; f<=m_fNmax; ++f) {
+  for (int f=m_fNmin; f<=m_fNmax; ++f) {
     
     // For each azimuthal region loop through all Z regions
     //
-    int z = 0; if(!m_endlist) z = m_zMin;
+    int z = 0;
+    if (!m_endlist) z = m_zMin;
 
-    for(; z!=11; ++z) {
+    for (; z!=11; ++z) {
 
-      int a  = f *11+ZI[z];  if(!m_rfz_map[a]) continue;
+      int a  = f *11+ZI[z];
+      if (!m_rfz_map[a]) continue;
       int NB = 0, NT = 0;
-      for(int i=0; i!=m_rfz_b[a]; ++i) {
+      for (int i=0; i!=m_rfz_b[a]; ++i) {
 	
 	int an =  m_rfz_ib[a][i];
-	if(!m_rfz_map[an]) continue;
-	rb [NB] = m_rfz_Sorted[an].begin(); rbe[NB++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rb [NB] = m_rfz_Sorted[an].begin();
+        rbe[NB++] = m_rfz_Sorted[an].end();
       } 
-      for(int i=0; i!=m_rfz_t[a]; ++i) {
+      for (int i=0; i!=m_rfz_t[a]; ++i) {
 	
 	int an =  m_rfz_it[a][i];
-	if(!m_rfz_map[an]) continue; 
-	rt [NT] = m_rfz_Sorted[an].begin(); rte[NT++] = m_rfz_Sorted[an].end();
+	if (!m_rfz_map[an]) continue;
+	rt [NT] = m_rfz_Sorted[an].begin();
+        rte[NT++] = m_rfz_Sorted[an].end();
+      } 
+      if (!m_trigger) production3Sp       (rb,rbe,rt,rte,NB,NT,nseed);
+      else            production3SpTrigger(rb,rbe,rt,rte,NB,NT,nseed);
+      if (!m_endlist) {
+        m_fNmin = f;
+        m_zMin = z;
+        return;
       } 
-      if(!m_trigger) production3Sp       (rb,rbe,rt,rte,NB,NT,nseed);
-      else           production3SpTrigger(rb,rbe,rt,rte,NB,NT,nseed);
-      if(!m_endlist) {m_fNmin=f; m_zMin = z; return;} 
     }
   }
   m_endlist = true;
@@ -1165,20 +1162,26 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp
   int NB, int NT, int& nseed) 
 {
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {
+    r0 = m_rMin;
+    m_endlist = true;
+  }
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float R  = (*r0)->radius(); if(R<m_r2min) continue; if(R>m_r2max) break;
+    float R  = (*r0)->radius();
+    if (R<m_r2min) continue;
+    if (R>m_r2max) break;
 
     const Trk::SpacePoint* SP0 = (*r0)->spacepoint;
 
-    bool pix = true; if(SP0->clusterList().second) pix = false;
+    bool pix = true;
+    if (SP0->clusterList().second) pix = false;
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
     float               Y    = (*r0)->y()  ;
@@ -1187,59 +1190,71 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
-	if(Rb<m_r1min) {rb[i]=r; continue;}  if(Rb>m_r1max) break;
+	float Rb =(*r)->radius();
+	if (Rb<m_r1min) {
+          rb[i]=r;
+          continue;
+        }
+        if (Rb>m_r1max) break;
 
-	float dR = R-Rb; 
-	if(dR<m_drmin) break;
+	float dR = R-Rb;
+	if (dR<m_drmin) break;
 
-	if(dR > m_drmax || (*r)->sur()==sur0) continue;
+	if (dR > m_drmax || (*r)->sur()==sur0) continue;
 
-	if( !pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( !pix && !(*r)->spacepoint->clusterList().second) continue;
 	
-	float Tz = (Z-(*r)->z())/dR; 
+	float Tz = (Z-(*r)->z())/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 	
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rb,Tz)) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rb,Tz)) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin || Rt<m_r3min) {rt[i]=r; continue;}
-	if(Rt>m_r3max || dR>m_drmax) break;
+	float dR = Rt-R;
+        if (dR<m_drmin || Rt<m_r3min) {
+          rt[i]=r;
+          continue;
+        }
+	if (Rt>m_r3max || dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0) continue;
+	if ( (*r)->sur()==sur0) continue;
 
-	float Tz = ((*r)->z()-Z)/dR; 
+	float Tz = ((*r)->z()-Z)/dR;
 
-	if(Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
+	if (Tz < m_dzdrmin || Tz > m_dzdrmax) continue;
 
 	// Comparison with vertices Z coordinates
 	//
-	float Zo = Z-R*Tz; if(!isZCompatible(Zo,Rt,Tz)) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Zo = Z-R*Tz;
+        if (!isZCompatible(Zo,Rt,Tz)) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
@@ -1247,9 +1262,9 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeed* sp = m_SP[i];  
+      InDet::SiSpacePointForSeed* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1258,7 +1273,8 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp
       float y   =-dx*ay+dy*ax ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1276,13 +1292,13 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp
     float COF   = m_COF     ;
     float ipt2K = ipt2/K2   ;
     float ipt2C = ipt2*COF  ;
-    float COFK  = COF*K2    ;  
+    float COFK  = COF*K2    ;
     covr0      *= 2.        ;
     covz0      *= 2.        ;
     
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
     
       const Trk::SpacePoint* SPb = m_SP[b]->spacepoint;
  
@@ -1299,32 +1315,39 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3Sp
       float dZ    = dZVertexMin(Zob);
       float Iz    = (dZ*dZ)/Tzb2 ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 	
 	float Ts  = .5*(Tzb+m_Tz[t])                          ;
 	float dt  =     Tzb-m_Tz[t]                           ;
 	float dT  = dt*dt-Erb-m_Er[t]-m_R[t]*(Ts*Ts*Rb2r+Rb2z);
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ; 
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub;
+        if (dU == 0.) continue;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
 	float Im  = fabs((A-B*R)*R)                  ;
 	
-	if(Im > imc ) continue;
+	if (Im > imc ) continue;
 	
-	if(pix) {
-	  if(m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
+	if (pix) {
+	  if (m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
 	}
-	if(Im > m_diversss) continue;
+	if (Im > m_diversss) continue;
 	Im = Im*Im+Iz;
 	newOneSeed(SPb,SP0,m_SP[t]->spacepoint,Zob,Im);
       }
     }
-    nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    nseed += m_mapOneSeeds.size();
+    fillSeeds();
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    }
   }
 }
 
@@ -1339,23 +1362,29 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3SpTrigger
   std::list<InDet::SiSpacePointForSeed*>::iterator* rte,
   int NB, int NT, int& nseed) 
 {
-  const float pi = M_PI, pi2 = 2.*pi; 
+  const float pi = M_PI, pi2 = 2.*pi;
 
   std::list<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r;
-  if(!m_endlist) {r0 = m_rMin; m_endlist = true;}
+  if (!m_endlist) {
+    r0 = m_rMin;
+    m_endlist = true;
+  }
 
   // Loop through all trigger space points
   //
-  for(; r0!=rbe[0]; ++r0) {
+  for (; r0!=rbe[0]; ++r0) {
 
     m_nOneSeeds = 0;
     m_mapOneSeeds.erase(m_mapOneSeeds.begin(), m_mapOneSeeds.end());
 	
-    float R  = (*r0)->radius(); if(R<m_r2min) continue; if(R>m_r2max) break;
+    float R  = (*r0)->radius();
+    if (R<m_r2min) continue;
+    if (R>m_r2max) break;
 
     const Trk::SpacePoint* SP0 = (*r0)->spacepoint;
 
-    bool pix = true; if(SP0->clusterList().second) pix = false;
+    bool pix = true;
+    if (SP0->clusterList().second) pix = false;
     const Trk::Surface* sur0 = (*r0)->sur();
     float               X    = (*r0)->x()  ;
     float               Y    = (*r0)->y()  ;
@@ -1364,55 +1393,69 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3SpTrigger
 
     // Bottom links production
     //
-    for(int i=0; i!=NB; ++i) {
+    for (int i=0; i!=NB; ++i) {
 
-      for(r=rb[i]; r!=rbe[i]; ++r) {
+      for (r=rb[i]; r!=rbe[i]; ++r) {
 	
-	float Rb =(*r)->radius();  
-	if(Rb<m_r1min) {rb[i]=r; continue;}  if(Rb>m_r1max) break;
+	float Rb =(*r)->radius();
+	if (Rb<m_r1min) {
+          rb[i]=r;
+          continue;
+        }
+        if (Rb>m_r1max) break;
 
-	float dR = R-Rb; 
-	if(dR<m_drmin) break;
+	float dR = R-Rb;
+	if (dR<m_drmin) break;
 
-	if(dR > m_drmax || (*r)->sur()==sur0) continue;
+	if (dR > m_drmax || (*r)->sur()==sur0) continue;
 
-	if( !pix && !(*r)->spacepoint->clusterList().second) continue;
+	if ( !pix && !(*r)->spacepoint->clusterList().second) continue;
 	
 	// Comparison with  bottom and top Z 
 	//
 	float Tz = (Z-(*r)->z())/dR;
-	float Zo = Z-R*Tz          ; if(Zo < m_zminB || Zo > m_zmaxB) continue;
-	float Zu = Z+(550.-R)*Tz   ; if(Zu < m_zminU || Zu > m_zmaxU) continue;
-	m_SP[Nb] = (*r); if(++Nb==m_maxsizeSP) goto breakb;
+	float Zo = Z-R*Tz          ;
+        if (Zo < m_zminB || Zo > m_zmaxB) continue;
+	float Zu = Z+(550.-R)*Tz   ;
+        if (Zu < m_zminU || Zu > m_zmaxU) continue;
+	m_SP[Nb] = (*r);
+        if (++Nb==m_maxsizeSP) goto breakb;
       }
     }
   breakb:
-    if(!Nb || Nb==m_maxsizeSP) continue;  
+    if (!Nb || Nb==m_maxsizeSP) continue;
     int Nt = Nb;
     
     // Top   links production
     //
-    for(int i=0; i!=NT; ++i) {
+    for (int i=0; i!=NT; ++i) {
       
-      for(r=rt[i]; r!=rte[i]; ++r) {
+      for (r=rt[i]; r!=rte[i]; ++r) {
 	
 	float Rt =(*r)->radius();
-	float dR = Rt-R; if(dR<m_drmin || Rt<m_r3min) {rt[i]=r; continue;}
-	if(Rt>m_r3max || dR>m_drmax) break;
+	float dR = Rt-R;
+        if (dR<m_drmin || Rt<m_r3min) {
+          rt[i]=r;
+          continue;
+        }
+	if (Rt>m_r3max || dR>m_drmax) break;
 
-	if( (*r)->sur()==sur0) continue;
+	if ( (*r)->sur()==sur0) continue;
 
 	// Comparison with  bottom and top Z 
 	//
-	float Tz = ((*r)->z()-Z)/dR;  
-	float Zo = Z-R*Tz          ; if(Zo < m_zminB || Zo > m_zmaxB) continue;
-	float Zu = Z+(550.-R)*Tz   ; if(Zu < m_zminU || Zu > m_zmaxU) continue;
-  	m_SP[Nt] = (*r); if(++Nt==m_maxsizeSP) goto breakt;
+	float Tz = ((*r)->z()-Z)/dR;
+	float Zo = Z-R*Tz          ;
+        if (Zo < m_zminB || Zo > m_zmaxB) continue;
+	float Zu = Z+(550.-R)*Tz   ;
+        if (Zu < m_zminU || Zu > m_zmaxU) continue;
+  	m_SP[Nt] = (*r);
+        if (++Nt==m_maxsizeSP) goto breakt;
       }
     }
     
   breakt:
-    if(!(Nt-Nb)) continue;
+    if (!(Nt-Nb)) continue;
 
     float covr0 = (*r0)->covr ();
     float covz0 = (*r0)->covz ();
@@ -1420,9 +1463,9 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3SpTrigger
     float ax   = X/R;
     float ay   = Y/R;
     
-    for(int i=0; i!=Nt; ++i) {
+    for (int i=0; i!=Nt; ++i) {
 
-      InDet::SiSpacePointForSeed* sp = m_SP[i];  
+      InDet::SiSpacePointForSeed* sp = m_SP[i];
 
       float dx  = sp->x()-X   ;
       float dy  = sp->y()-Y   ;
@@ -1431,7 +1474,8 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3SpTrigger
       float y   =-dx*ay+dy*ax ;
       float r2  = 1./(x*x+y*y);
       float dr  = sqrt(r2)    ;
-      float tz  = dz*dr       ; if(i < Nb) tz = -tz;
+      float tz  = dz*dr       ;
+      if (i < Nb) tz = -tz;
 
       m_Tz[i]   = tz                                            ;
       m_Zo[i]   = Z-R*tz                                        ;
@@ -1449,13 +1493,13 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3SpTrigger
     float COF   = m_COF     ;
     float ipt2K = ipt2/K2   ;
     float ipt2C = ipt2*COF  ;
-    float COFK  = COF*K2    ;  
+    float COFK  = COF*K2    ;
     covr0      *= 2.        ;
     covz0      *= 2.        ;
    
     // Three space points comparison
     //
-    for(int b=0; b!=Nb; ++b) {
+    for (int b=0; b!=Nb; ++b) {
 
       const Trk::SpacePoint* SPb = m_SP[b]->spacepoint;
  
@@ -1472,40 +1516,47 @@ void InDet::SiSpacePointsSeedMaker_Trigger::production3SpTrigger
       float dZ    = dZVertexMin(Zob);
       float Iz    = (dZ*dZ)/Tzb2 ;
 
-      for(int t=Nb;  t!=Nt; ++t) {
+      for (int t=Nb;  t!=Nt; ++t) {
 	
 	float Ts  = .5*(Tzb+m_Tz[t])                          ;
 	float dt  =     Tzb-m_Tz[t]                           ;
 	float dT  = dt*dt-Erb-m_Er[t]-m_R[t]*(Ts*Ts*Rb2r+Rb2z);
-	if( dT > ICSA) continue;
-	float dU  = m_U[t]-Ub; if(dU == 0.) continue ;
+	if ( dT > ICSA) continue;
+	float dU  = m_U[t]-Ub;
+        if (dU == 0.) continue ;
 	float A   = (m_V[t]-Vb)/dU                   ;
 	float S2  = 1.+A*A                           ;
 	float B   = Vb-A*Ub                          ;
 	float B2  = B*B                              ;
-	if(B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
+	if (B2  > ipt2K*S2 || dT*S2 > B2*CSA) continue;
 	float Im  = fabs((A-B*R)*R)                  ;
 
-	if(Im > imc ) continue;
-	if(pix) {
-	  if(m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
+	if (Im > imc ) continue;
+	if (pix) {
+	  if (m_SP[t]->spacepoint->clusterList().second && Im > imcs) continue;
 	}
 
-	if(Im > m_diversss) continue;
+	if (Im > m_diversss) continue;
 
 	// Azimuthal angle test
 	//
 	float y  = 1.;
 	float x  = 2.*B*R-A;
 	float df = fabs(atan2(ay*y-ax*x,ax*y+ay*x)-m_ftrig);
-	if(df > pi      ) df=pi2-df;
-	if(df > m_ftrigW) continue;
+	if (df > pi      ) df=pi2-df;
+	if (df > m_ftrigW) continue;
 	Im = Im*Im+Iz;
 	newOneSeed(SPb,SP0,m_SP[t]->spacepoint,Zob,Im);
       }
     }
-    nseed += m_mapOneSeeds.size(); fillSeeds();
-    if(nseed>=m_maxsize) {m_endlist=false; ++r0; m_rMin = r0;  return;} 
+    nseed += m_mapOneSeeds.size();
+    fillSeeds();
+    if (nseed>=m_maxsize) {
+      m_endlist=false;
+      ++r0;
+      m_rMin = r0;
+      return;
+    }
   }
 }
 
@@ -1517,33 +1568,151 @@ void InDet::SiSpacePointsSeedMaker_Trigger::newOneSeed
 (const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
  const Trk::SpacePoint*& p3,const float& z,const float& q) 
 {
-  if(m_nOneSeeds < m_maxOneSize) {
+  if (m_nOneSeeds < m_maxOneSize) {
 
-    m_OneSeeds [m_nOneSeeds].erase     (  ); 
-    m_OneSeeds [m_nOneSeeds].add       (p1); 
-    m_OneSeeds [m_nOneSeeds].add       (p2); 
-    m_OneSeeds [m_nOneSeeds].add       (p3); 
-    m_OneSeeds [m_nOneSeeds].setZVertex(double(z));
+    m_OneSeeds [m_nOneSeeds].erase     (  );
+    m_OneSeeds [m_nOneSeeds].add       (p1);
+    m_OneSeeds [m_nOneSeeds].add       (p2);
+    m_OneSeeds [m_nOneSeeds].add       (p3);
+    m_OneSeeds [m_nOneSeeds].setZVertex(static_cast<double>(z));
     m_mapOneSeeds.insert(std::make_pair(q,m_OneSeeds+m_nOneSeeds));
     ++m_nOneSeeds;
-  }
-  else                     {
+  } else {
     std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator 
       l = m_mapOneSeeds.rbegin();
-    if((*l).first <= q) return;
+    if ((*l).first <= q) return;
     
     InDet::SiSpacePointsSeed* s = (*l).second;
-    s->erase     (  ); 
-    s->add       (p1); 
-    s->add       (p2); 
-    s->add       (p3); 
-    s->setZVertex(double(z));
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->add       (p3);
+    s->setZVertex(static_cast<double>(z));
     std::multimap<float,InDet::SiSpacePointsSeed*>::iterator 
       i = m_mapOneSeeds.insert(std::make_pair(q,s));
 	
-    for(++i; i!=m_mapOneSeeds.end(); ++i) {
-      if((*i).second==s) {m_mapOneSeeds.erase(i); return;}
+    for (++i; i!=m_mapOneSeeds.end(); ++i) {
+      if ((*i).second==s) {
+        m_mapOneSeeds.erase(i);
+        return;
+      }
     }
   }
 }
+
+const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_Trigger::next()
+{
+  if (m_i_seed==m_i_seede) {
+    findNext();
+    if (m_i_seed==m_i_seede) return nullptr;
+  }
+  if (m_mode==0 || m_mode==1) return(*m_i_seed++);
+  ++m_i_seed;
+  return (*m_seed++).second;
+}
+    
+bool InDet::SiSpacePointsSeedMaker_Trigger::isZCompatible  
+(float& Zv,float& R,float& T)
+{
+  if (Zv < m_zmin || Zv > m_zmax) return false;
+
+  std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+  if (v==ve) return true;
+
+  float dZmin = fabs((*v)-Zv);
+  ++v;
+  for (; v!=ve; ++v) {
+    float dZ = fabs((*v)-Zv);
+    if (dZ<dZmin) dZmin=dZ;
+  }
+  return dZmin < (m_dzver+m_dzdrver*R)*sqrt(1.+T*T);
+}
+
+float InDet::SiSpacePointsSeedMaker_Trigger::dZVertexMin(float& Z)
+{
+  std::list<float>::iterator v=m_l_vertex.begin(),ve=m_l_vertex.end();
+  if (v==ve) return 0.;
+
+  float dZm = 1.E10;
+  for (; v!=ve; ++v) {
+    float dZ = fabs((*v)-Z);
+    if (dZ<dZm) dZm = dZ;
+  }
+  return dZm;
+}
+
+///////////////////////////////////////////////////////////////////
+// New space point for seeds 
+///////////////////////////////////////////////////////////////////
+
+InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_Trigger::newSpacePoint
+(const Trk::SpacePoint*const& sp) 
+{
+  InDet::SiSpacePointForSeed* sps = nullptr;
+
+  float r[3];
+  convertToBeamFrameWork(sp, r);
+
+  if (m_i_spforseed!=m_l_spforseed.end()) {
+    sps = (*m_i_spforseed++);
+    sps->set(sp, r);
+  } else {
+    sps = new InDet::SiSpacePointForSeed(sp, r);
+    m_l_spforseed.push_back(sps);
+    m_i_spforseed = m_l_spforseed.end();
+  }
       
+  return sps;
+}
+
+///////////////////////////////////////////////////////////////////
+// New 2 space points seeds 
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_Trigger::newSeed
+(const Trk::SpacePoint*& p1,const Trk::SpacePoint*& p2, 
+ const float& z) 
+{
+  if (m_i_seede!=m_l_seeds.end()) {
+    InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+    s->erase     (  );
+    s->add       (p1);
+    s->add       (p2);
+    s->setZVertex(static_cast<double>(z));
+  } else {
+    m_l_seeds.push_back(new InDet::SiSpacePointsSeed(p1,p2,z));
+    m_i_seede = m_l_seeds.end();
+  }
+}
+
+///////////////////////////////////////////////////////////////////
+// Fill seeds
+///////////////////////////////////////////////////////////////////
+
+void InDet::SiSpacePointsSeedMaker_Trigger::fillSeeds()
+{
+  std::multimap<float, InDet::SiSpacePointsSeed*>::iterator 
+    l  = m_mapOneSeeds.begin(),
+    le = m_mapOneSeeds.end  ();
+
+  for (; l!=le; ++l) {
+    float                     q  = (*l).first;
+    InDet::SiSpacePointsSeed* s0 = (*l).second;
+
+    if ((*s0->spacePoints().rbegin())->clusterList().second) {
+      (*s0->spacePoints().begin())->clusterList().second ? q+=1000. : q+=10000.;
+    }
+
+    if (m_i_seede!=m_l_seeds.end()) {
+      InDet::SiSpacePointsSeed* s = (*m_i_seede++);
+      *s = *s0;
+      m_mapSeeds.insert(std::make_pair(q,s));
+    } else {
+      InDet::SiSpacePointsSeed* s = new InDet::SiSpacePointsSeed(*s0);
+      m_l_seeds.push_back(s);
+      m_i_seede = m_l_seeds.end();
+      m_mapSeeds.insert(std::make_pair(q,s));
+    }
+  }
+}
+  
-- 
GitLab


From d66fc37aa8df0ca1a04cfe1e62f46e9797a41bec Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Tue, 7 May 2019 13:51:18 +0000
Subject: [PATCH 124/129] LArElecCalib: Remove ILArHVCorrTool.

Remove obsolete interface ILArHVCorrTool.
---
 .../LArElecCalib/ILArHVCorrTool.h             |  44 --
 LArCalorimeter/LArElecCalib/doc/packagedoc.h  |   3 +-
 .../python/LArHVCorrToolDefault.py            |  49 --
 .../LArRecUtils/python/LArRecUtilsConfigDb.py |   3 +-
 .../LArRecUtils/src/LArHVCorrTool.cxx         | 743 ------------------
 .../LArRecUtils/src/LArHVCorrTool.h           | 145 ----
 .../src/components/LArRecUtils_entries.cxx    |   2 -
 7 files changed, 2 insertions(+), 987 deletions(-)
 delete mode 100755 LArCalorimeter/LArElecCalib/LArElecCalib/ILArHVCorrTool.h
 delete mode 100644 LArCalorimeter/LArRecUtils/python/LArHVCorrToolDefault.py
 delete mode 100644 LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
 delete mode 100644 LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h

diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArHVCorrTool.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArHVCorrTool.h
deleted file mode 100755
index 6de643eb7d3a..000000000000
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArHVCorrTool.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef LARELECCALIB_ILARHVCORRTOOL_H
-#define LARELECCALIB_ILARHVCORRTOOL_H
-
-#include "GaudiKernel/IAlgTool.h"
-#include "Identifier/HWIdentifier.h"
-#include "Identifier/Identifier.h"
-#include "AthenaKernel/IOVSvcDefs.h"
-
-
-
-static const InterfaceID IID_ILArHVCorrTool("ILArHVCorrTool", 1 , 0);
-
-class ILArHVCorrTool: virtual public IAlgTool {
-  /**
-   * AlgoTool to compute HV correction for Cell energy
-   *
-   * @author G.Unal
-   * @version 0-0-1, 09/11/2006
-   *
-   */
-
- public: 
-
-  virtual ~ILArHVCorrTool() {};
-  
-  virtual float Scale(const HWIdentifier& id)  const = 0 ;
-  
-  virtual float Scale(const Identifier& id)  const = 0 ;
-
-  static const InterfaceID& interfaceID() { return IID_ILArHVCorrTool; }
-
-  virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) = 0;
- 
-  virtual StatusCode record() = 0;
-
-  virtual bool updateOnLastCallback() const = 0 ;
-  
-};
-
-#endif 
diff --git a/LArCalorimeter/LArElecCalib/doc/packagedoc.h b/LArCalorimeter/LArElecCalib/doc/packagedoc.h
index 6853b97d1b19..a5445fc208eb 100644
--- a/LArCalorimeter/LArElecCalib/doc/packagedoc.h
+++ b/LArCalorimeter/LArElecCalib/doc/packagedoc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -39,7 +39,6 @@ href="http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/offline/LArCalorimeter/LArRa
   - ILArGlobal
   - ILArGlobalTimeOffset
   - ILArH6Oscillation
-  - ILArHVCorrTool
   - ILArMinBias
   - ILArMphysOverMcal
   - ILArNoise
diff --git a/LArCalorimeter/LArRecUtils/python/LArHVCorrToolDefault.py b/LArCalorimeter/LArRecUtils/python/LArHVCorrToolDefault.py
deleted file mode 100644
index 93c7a423fad8..000000000000
--- a/LArCalorimeter/LArRecUtils/python/LArHVCorrToolDefault.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from AthenaCommon.Logging import logging
-from AthenaCommon.AppMgr import ServiceMgr
-
-# import the base class
-from LArRecUtils.LArRecUtilsConf import LArHVCorrTool
-
-def LArHVCorrToolDefault (name="LArHVCorrToolDefault", **kw):
-    mlog = logging.getLogger( 'LArHVCorrToolDefault::__init__ ' )
-    #Check if the tool exits already in ToolSvc
-    if hasattr(ServiceMgr.ToolSvc,name):
-        mlog.info("LArHVCorrTool with name "+ name+" already known to ToolSvc")
-        return getattr(ServiceMgr.ToolSvc,name)
-    
-
-    # call base class constructor
-    from AthenaCommon import CfgMgr
-    kw['name'] = name
-    tool = CfgMgr.LArHVCorrTool (**kw)
-
-
-    mlog.info("entering")
-
-    from AthenaCommon.GlobalFlags import globalflags 
-
-    # do the configuration
-    if globalflags.DataSource()=='data':
-        from LArConditionsCommon import LArHVDB
-
-        from LArCondUtils.LArCondUtilsConf import LArHVToolDB
-        theLArHVToolDB = LArHVToolDB("LArHVToolDB")
-        from AthenaCommon.AppMgr import ToolSvc
-        ToolSvc += theLArHVToolDB
-
-        tool.HVTool = theLArHVToolDB
-        tool.doTdrift = False
-        tool.DeltaTupdate = 0 # seconds (if 0, no time-dependent update applied)
-        #tool.OutputLevel = 2 # 2 = DEBUG 
-        mlog.info("in data case")
-
-        # example to force some HV corection factors for some regions
-        # tool.fixHVCorr = ["1 1 3 2.1 2.3 0.1963 0.3926 2.","1 1 3 2.1 2.3 0.7854 0.98175 2.","1 1 3 2.1 2.3 1.7672 1.9635 2.","1 1 3 -2.5 -2.3 1.3745 1.5708 2."]
-
-    else:
-        mlog.info("in MC case")
-
-    ToolSvc+=tool
-    return tool
diff --git a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py
index ecf2c8f6ae15..323afecdfa24 100644
--- a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py
+++ b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py
@@ -1,10 +1,9 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.CfgGetter import addTool
 addTool("LArRecUtils.LArADC2MeVToolDefault.LArADC2MeVToolDefault" , "LArADC2MeVToolDefault")
 addTool("LArRecUtils.LArOFCToolDefault.LArOFCToolDefault" , "LArOFCToolDefault")
 addTool("LArRecUtils.LArAutoCorrNoiseToolDefault.LArAutoCorrNoiseToolDefault" , "LArAutoCorrNoiseToolDefault")
 addTool("LArRecUtils.LArAutoCorrTotalToolDefault.LArAutoCorrTotalToolDefault","LArAutoCorrTotalToolDefault")
-addTool("LArRecUtils.LArHVCorrToolDefault.LArHVCorrToolDefault","LArHVCorrToolDefault")
 addTool("LArRecUtils.LArOFPeakRecoToolDefault.LArOFPeakRecoToolDefault","LArOFPeakRecoToolDefault")
 addTool("LArRecUtils.LArParabolaPeakRecoToolDefault.LArParabolaPeakRecoToolDefault","LArParabolaPeakRecoToolDefault")
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
deleted file mode 100644
index 3f6fcca977c7..000000000000
--- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
+++ /dev/null
@@ -1,743 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "LArHVCorrTool.h"
-#include "AthenaKernel/errorcheck.h"
-#include "GaudiKernel/IIncidentSvc.h"
-#include "CaloDetDescr/CaloDetDescrElement.h"
-#include "xAODEventInfo/EventInfo.h"
-
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-#include "CoralBase/Blob.h"
-#include "LArCOOLConditions/LArHVScaleCorrFlat.h"
-
-#include "GaudiKernel/IChronoStatSvc.h"
-#include "CLHEP/Units/SystemOfUnits.h"
-#include "LArIdentifier/LArElectrodeID.h"
-
-#include <cmath>
-#include <bitset>
-
-using CLHEP::microsecond;
-using CLHEP::second;
-
-LArHVCorrTool::LArHVCorrTool(const std::string& type, 
-			     const std::string& name, 
-			     const IInterface* parent) 
-  : 
-    AthAlgTool(type, name, parent),
-    m_lar_on_id(nullptr),
-    m_calocell_id(nullptr),
-    m_larem_id(nullptr),
-    m_larhec_id(nullptr),
-    m_larfcal_id(nullptr),
-    m_electrodeID(nullptr),
-    m_cablingService("LArCablingLegacyService"),
-    m_hvtool("LArHVToolMC",this)
-{
-  declareInterface<ILArHVCorrTool>(this);
-
-  m_Tdrift = nullptr;
-  m_ownScale = true;
-  m_keyOutput = "LArHVScaleCorr";
-  m_keyOutputTd = "LArTdrift";
-  m_cacheFilled = false;
-  m_updateOnLastCallback=true;
-  m_doTdrift = true;
-  m_deltatupdate = 0;
-  m_T0 = 90.371;   // parameter for vdrift
-  m_allCallBack=false;
-
-  declareProperty("keyOutput",m_keyOutput="LArHVScaleCorr","Output key for LArHVScaleCorr");
-  declareProperty("keyOutputTd",m_keyOutputTd,"Output key for LArTdrift");
-  declareProperty("folderName",m_folderName="/LAR/ElecCalibFlat/HVScaleCorr",
-		  "Folder to store the CondAttrListCollection containing the HVScale correction");
-  declareProperty("HVTool",m_hvtool,"HV tool used");
-  declareProperty("doTdrift",m_doTdrift,"Compute drift time");
-  declareProperty("allHVCallBack",m_allCallBack,"recompute correction for each HV db callback instead of only once per run/lbn");
-  declareProperty("fixHVCorr",    m_fixHVStrings);
-  declareProperty("DeltaTupdate", m_deltatupdate);
-  declareProperty("UpdateIfChanged",m_updateIfChanged=true,"Update HV regions for which the HV has acutally changed");
-
-}
-
-
-LArHVCorrTool::~LArHVCorrTool() {
-   if (m_ownScale) {
-     if (m_Tdrift) delete m_Tdrift;
-   }
-}
-
-StatusCode LArHVCorrTool::initialize() {
-  ATH_MSG_DEBUG("LArHVCorrTool initialize() begin");
-  
-  ATH_CHECK( detStore()->retrieve(m_lar_on_id,"LArOnlineID") );
-  ATH_CHECK( detStore()->retrieve(m_calocell_id,"CaloCell_ID") );
-
-  m_larem_id   = m_calocell_id->em_idHelper();
-  m_larhec_id   = m_calocell_id->hec_idHelper();
-  m_larfcal_id   = m_calocell_id->fcal_idHelper();
-
-  ATH_CHECK( m_cablingService.retrieve() );
-  ATH_CHECK( detStore()->retrieve(m_electrodeID) );
-  ATH_CHECK( m_hvtool.retrieve() );
-
-  ATH_CHECK( detStore()->regFcn(&ILArHVTool::LoadCalibration,dynamic_cast<ILArHVTool*>(&(*m_hvtool)),
-                                &ILArHVCorrTool::LoadCalibration,dynamic_cast<ILArHVCorrTool*>(this)) );
-
-  ATH_CHECK( this->buildFixHVList() );
-
-  //Initialize hash-ranges
-  //FIXME: Hardcoded numbers are not ideal
-  //But the identifier helpers don't provide them. 
-
-  const unsigned A=0; //According to LArElectrodeID.h A side =0 C-side=1
-  const unsigned C=1;
-  //Offline hash ranges:
-  m_hashRanges[A].resize(NHVPARTITION);
-  m_hashRanges[C].resize(NHVPARTITION);
-  m_hashRanges[C][EMECIW]=std::make_pair<IdentifierHash,IdentifierHash>(0,896);
-  m_hashRanges[C][EMECPS]=std::make_pair<IdentifierHash,IdentifierHash>(896,1664);
-  m_hashRanges[C][EMECOW]=std::make_pair<IdentifierHash,IdentifierHash>(1664,31872);
-  m_hashRanges[C][EMBPS]=std::make_pair<IdentifierHash,IdentifierHash>(31872,35776);
-  m_hashRanges[C][EMB]=std::make_pair<IdentifierHash,IdentifierHash>(35776,86656);
-  m_hashRanges[A][EMBPS]=std::make_pair<IdentifierHash,IdentifierHash>(86656,90560);
-  m_hashRanges[A][EMB]=std::make_pair<IdentifierHash,IdentifierHash>(90560,141440);
-  m_hashRanges[A][EMECPS]=std::make_pair<IdentifierHash,IdentifierHash>(141440,142208);
-  m_hashRanges[A][EMECOW]=std::make_pair<IdentifierHash,IdentifierHash>(142208,172416);
-  m_hashRanges[A][EMECIW]=std::make_pair<IdentifierHash,IdentifierHash>(172416,173312);
-  m_hashRanges[C][HEC]=std::make_pair<IdentifierHash,IdentifierHash>(173312,176128);
-  m_hashRanges[A][HEC]=std::make_pair<IdentifierHash,IdentifierHash>(176128,178944);
-  m_hashRanges[C][FCAL]=std::make_pair<IdentifierHash,IdentifierHash>(178944,180706);
-  m_hashRanges[A][FCAL]=std::make_pair<IdentifierHash,IdentifierHash>(180706,182468);
-
-  m_completeRange.push_back(std::make_pair<IdentifierHash,IdentifierHash>(0,182468));
-
-  m_vScale.resize(182468,(float)1.0);
-
-  if (m_updateIfChanged) 
-    msg(MSG::INFO) << "Will re-compute HV correction for channels with updated voltage" << endmsg;
-  else {
-    if (m_allCallBack) 
-      msg(MSG::INFO) << "Will re-compute HV corrections for all channels on each callback" << endmsg;
-    else {
-      if (m_deltatupdate) 
-	msg(MSG::INFO) << "Will re-compute HV corrections after " << m_deltatupdate <<" seconds." << endmsg;
-      msg(MSG::INFO) << "Will re-compute HV corrections for each new LumiBlock" << endmsg;
-    }
-  }
-
-  ATH_MSG_DEBUG("LArHVCorrTool initialize() end");
-  return StatusCode::SUCCESS;
-}
-
-StatusCode LArHVCorrTool::LoadCalibration(IOVSVC_CALLBACK_ARGS) {
-  ATH_MSG_DEBUG("LArHVCorrTool LoadCalibration()"); 
-  m_updateOnLastCallback=false;
-  if (m_updateIfChanged) {
-    const std::vector<HWIdentifier>& updatedElectrodes=m_hvtool->getUpdatedElectrodes();
-    if (updatedElectrodes.size()) {
-      const HASHRANGEVEC hashranges=this->electrodeIDsToPartition(updatedElectrodes);
-      StatusCode sc=this->getScale(hashranges);
-      if (sc.isFailure()) {
-	msg(MSG::ERROR) << " LArHVCorrTool::LoadCalibration error in getScale" << endmsg;
-	return sc;
-      }
-    }
-    else {
-      ATH_MSG_DEBUG("No real voltage change, no update necessary");
-      return StatusCode::SUCCESS;
-    }
-  }//end if updateIfChanges
-  else {
-    static unsigned int timestamp_old = 0; 
-    static unsigned int lumiblock_old = 0;
-    static unsigned int run_old = 0;
-    const xAOD::EventInfo* eventInfo;
-    if (evtStore()->retrieve(eventInfo).isFailure()) {
-      msg(MSG::WARNING) << " Cannot access to event info " << endmsg;
-      return StatusCode::SUCCESS;
-    }
-    const unsigned int lumiblock = eventInfo->lumiBlock();
-    const unsigned int run       = eventInfo->runNumber();
-    const unsigned int timestamp = eventInfo->timeStamp();
-  
-    ATH_MSG_DEBUG("run|lbn|timestamp [CURRENT][CACHED] --> [ " 
-		  << run << " | " << lumiblock << " | " << timestamp << " ] [ " 
-		  << run_old << " | " << lumiblock_old << " | " << timestamp_old << " ] ");
-    
-    const bool updateAfterDeltaT = ( m_deltatupdate && (timestamp - timestamp_old) >= m_deltatupdate );
-
-    if (lumiblock != lumiblock_old || run != run_old || m_allCallBack || updateAfterDeltaT ) {
-      
-      timestamp_old = timestamp;    
-      lumiblock_old = lumiblock;
-      run_old       = run;
-
-      const std::vector<HWIdentifier>& updatedElectrodes=m_hvtool->getUpdatedElectrodes();
-      if (updatedElectrodes.size()) {
-	IChronoStatSvc* chrono;
-	if (StatusCode::SUCCESS!=service("ChronoStatSvc" , chrono )) {
-	  msg(MSG::ERROR) <<"cannot find chronostat " << std::endl;
-	  return StatusCode::FAILURE;
-	}
-	std::string chronoName = "LArHVCorrTool";
-	chrono -> chronoStart( chronoName); 
-	StatusCode sc=this->getScale(m_completeRange);
-	if (sc.isFailure()) {
-	  msg(MSG::ERROR) << " LArHVCorrTool::LoadCalibration error in getScale" << endmsg;
-	  return sc;
-	}
-	chrono -> chronoStop( chronoName );
-	ATH_MSG_DEBUG("LArHVCorrTool Chrono stop : delta " 
-		      << chrono->chronoDelta (chronoName,IChronoStatSvc::USER ) 
-		      * (microsecond / second) << " second ");
-
-      }
-    }//end if 
-  }//end else m_updateIfChanged
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode LArHVCorrTool::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
-
-// *** compute global ADC2MeV factor from subfactors *** 
-StatusCode LArHVCorrTool::getScale(const HASHRANGEVEC& hashranges) const {
-  
-  const CaloDetDescrManager* calodetdescrmgr = nullptr;
-  ATH_CHECK( detStore()->retrieve(calodetdescrmgr) );
-
-  if (m_doTdrift && m_Tdrift==nullptr) {
-    m_Tdrift = new LArTdriftComplete();
-    if( (m_Tdrift->setGroupingType("ExtendedSubDetector",msg())).isFailure()) {
-      msg(MSG::ERROR) << " cannot setGroupingType " << endmsg;
-      return StatusCode::FAILURE;
-    }
-    if( (m_Tdrift->initialize()).isFailure()) {
-      msg(MSG::ERROR) << "cannot initialize tdrift " << endmsg;
-      return StatusCode::FAILURE;
-    }
-  }
-  float drift_time = 460.;  // test
-  //const size_t nCells=m_vScale.size();
-
-  unsigned nChannelsUpdates=0;
-
-  HASHRANGEVEC::const_iterator rit=hashranges.begin();
-  HASHRANGEVEC::const_iterator rit_e=hashranges.end();
-  for (;rit!=rit_e;++rit) {
-    for (size_t idx=rit->first;idx<rit->second;++idx) {
-      const IdentifierHash oflHash(idx);
-      float mycorr;
-      float mynorm;
-      float mySum;
-      float myTdrift;
-
-      double d=.2;  // nominal gap  in cm
-      double nominal=2000.;  // nominal HV  in Volts
-      double T=88.;  // temperature  in Kelvin
-
-      bool isbarrelEM=false;
-      bool isFCAL1=false;
-
-      unsigned int subdet=99;
-      unsigned int layer=99;
-      const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(oflHash);
-      if (!calodde) {
-	msg(MSG::WARNING) << "No DDE found for cell " << oflHash << endmsg;
-        continue;
-      }
-      const Identifier offid=calodde->identify();
-      const float eta_raw = calodde->eta_raw();
-      const float phi_raw = calodde->phi_raw();
-
-
-      // EM calorimeter
-      if (m_larem_id->is_lar_em(offid)) {
-	// barrel
-	if (abs(m_larem_id->barrel_ec(offid))==1) {
-	  subdet=0;
-	  layer = m_larem_id->sampling(offid);
-	  // EMB
-	  if (m_larem_id->sampling(offid)>0) {
-	    d=0.209;
-	    nominal=2000.;
-	    T=88.37;
-	    isbarrelEM=true;
-	  }
-	  // EMBPS
-	  else {
-	    nominal = 2000.;
-	    T = 88.37;
-	    const int ieta=m_larem_id->eta(offid);
-	    if (ieta>=0 && ieta<16)        d = 0.196; //cm
-	    else if (ieta>=16 && ieta<32)  d = 0.193; //cm
-	    else if (ieta>=32 && ieta<48)  d = 0.2; //cm
-	    else  d = 0.190; //cm
-	  }
-	}
-	// endcap
-	else {
-	  subdet=1;
-	  layer = m_larem_id->sampling(offid);
-	  // End-Cap pre-sampler
-	  if (abs(m_larem_id->barrel_ec(offid))==2 && m_larem_id->sampling(offid)==0){
-	    T = 88.65; // temperature remainder Calorimeter
-	    nominal = -2000.;
-	    d = 0.2; 
-	  }
-	  //EMEC      
-	  else {
-	    T = 88.65;
-	    float aeta_raw = std::fabs(eta_raw);
-	    double Zsamp;
-	    if ( m_larem_id->sampling(offid)==1 && m_larem_id->region(offid)>=0 )  Zsamp = 3760.; //mm
-	    else if ( m_larem_id->sampling(offid)==2 && m_larem_id->region(offid)<=1 )  Zsamp = 3880.; //mm
-	    else if(aeta_raw< 2.) Zsamp=4200.-40.*(aeta_raw-1.5);
-	    else Zsamp = 4180. - 160.*(aeta_raw-2.);
-	    nominal = EMEC_nominal(aeta_raw);
-	    d = EMEC_gap(aeta_raw, Zsamp)*0.1; //cm
-	  }//end EMEC
-	}//end endcap
-      }//end is-em
-      // Forward Calorimeter
-      else if ( m_larfcal_id->is_lar_fcal(offid)) {
-	subdet=3;
-	layer = m_larfcal_id->module(offid);
-	T = 88.65;
-	if (m_larfcal_id->module(offid)==1){ 
-	  d =0.0269; //cm
-	  nominal = 250.;
-	  isFCAL1=true;
-	}
-	else  if (m_larfcal_id->module(offid)==2){
-	  d =0.0376;//cm
-	  nominal = 375.;
-	}
-	else { 
-	  d =0.0508;//cm
-	  nominal = 500.;
-	}
-      }
-      // Hadronic Calorimeter
-      else if ( m_larhec_id->is_lar_hec(offid)) {
-	subdet=2;
-	layer = m_larhec_id->sampling(offid);
-	T = 88.65;
-	nominal = 1800.;
-	d = 0.196;//cm
-      }
-      T = T - m_T0;
-
-      const double E_nominal = champ_e(nominal,d);
-      std::vector<ILArHVTool::HV_t> hvlist;
-      StatusCode sc = m_hvtool->getHV(offid,hvlist);
-
-      if (sc.isFailure() || hvlist.size()==0) {
-	mycorr=1.;
-	mynorm=1.;
-	mySum=0.;
-	msg(MSG::WARNING) << " HV value no found for cell " << m_larem_id->show_to_string(offid) << endmsg;
-      }
-
-      else {
-	// dump values
-	bool notfound=false;
-	//        if (m_larem_id->is_lar_em(offid))
-	//           log << MSG::DEBUG << " EM offlineID,onlineID,HV values " << m_larem_id->barrel_ec(offid) << " " << m_larem_id->show_to_string(offid)
-	//            << " " << m_lar_on_id->show_to_string(id);
-	//        if (m_larhec_id->is_lar_hec(offid))
-	//            log << MSG::DEBUG << " HEC offlineID,onlineID,HV values " << m_larhec_id->show_to_string(offid)
-	//            << " " << m_lar_on_id->show_to_string(id);
-	//        if (m_larfcal_id->is_lar_fcal(offid))
-	//            log << MSG::DEBUG << " FCAL  offlineID,onlineID,HV values " << m_larhec_id->show_to_string(offid)
-	//              << " " << m_lar_on_id->show_to_string(id);
-	for (unsigned int i=0;i<hvlist.size();i++) {
-	  //           log << MSG::DEBUG << " " << hvlist[i].hv;
-	  if (hvlist[i].hv<-10000) notfound=true;
-	}
-	//        log << MSG::DEBUG << endmsg;
-
-	if (notfound) {
-	  msg(MSG::WARNING) << " At least one HV value not found in database for cell " << m_larem_id->show_to_string(offid) << endmsg;
-	}
-
-	mycorr=0.;
-	mySum=0.;
-	mynorm=0.;
-	for (unsigned int i=0;i<hvlist.size();i++) {
-	  double E = champ_e(hvlist[i].hv,d);
-
-	  // dont correct if E is very close to E nominal to avoid small glitches
-	  if (std::fabs(E_nominal)>1e-3) {
-	    const double deviation = std::fabs((E-E_nominal)/E_nominal);
-	    if (deviation<1e-3) E = E_nominal;
-	  }
-
-// barrel accordion
-	  if (isbarrelEM) {
-	    const double corr = this->Scale_barrel(hvlist[i].hv)*hvlist[i].weight;
-	    mycorr += corr;
-	    if (m_doTdrift) mySum+= corr/(drift_time*t_drift(E,E_nominal,d,T)/t_drift(E_nominal,E_nominal,d,T));
-	  }
-//FCAL module 1
-	  else if (isFCAL1) {
-	    const double corr = this->Scale_FCAL1(hvlist[i].hv) * hvlist[i].weight;
-	    mycorr+=corr;
-	    if (m_doTdrift) mySum+=corr/t_drift(E,E_nominal,d,T);
-	  }
-// other subdetectors
-	  else {
-	    const double corr = Respo(E,E_nominal,T)*hvlist[i].weight;
-	    mycorr+= corr;
-	    if (m_doTdrift) mySum+= corr/t_drift(E,E_nominal,d,T);
-	  }    
-	  mynorm += hvlist[i].weight;
-	}
-      }
-
-      if(mySum>1e-9) myTdrift=mycorr/mySum;
-      else myTdrift = 460.;
-
-      if (mycorr>1e-2) mycorr = mynorm/mycorr;
-      else mycorr=1.;
-
-// Add protection against correction factor > 10
-      if (mycorr>10.) {
-          ATH_MSG_DEBUG("Correction factor > 10, ignore it... for cell " <<  m_larem_id->show_to_string(offid) << " " << mycorr);
-          mycorr=1.;
-      }   
-
-      for (unsigned int ii=0;ii<m_HVfix.size();ii++) {
-	if (subdet == m_HVfix[ii].subdet && layer >= m_HVfix[ii].layer_min && layer <= m_HVfix[ii].layer_max &&
-	    eta_raw >= m_HVfix[ii].eta_min && eta_raw < m_HVfix[ii].eta_max &&
-	    phi_raw >= m_HVfix[ii].phi_min && phi_raw < m_HVfix[ii].phi_max ) {
-	  ATH_MSG_DEBUG("Overwrite correction for cell " <<  m_larem_id->show_to_string(offid) << " " << m_HVfix[ii].corr);
-	  mycorr = m_HVfix[ii].corr;
-	}
-      }
-    
-      ++nChannelsUpdates;
-      m_vScale[idx]=mycorr;
-      if (m_doTdrift) {
-	const HWIdentifier hwid=m_cablingService->createSignalChannelIDFromHash(oflHash);
-	m_Tdrift->set(hwid,myTdrift);
-      }
-    }// end loop over cells 
-  }//end loop over ranges'
-  m_cacheFilled=true;
-  m_updateOnLastCallback=true;
-  ATH_MSG_DEBUG("(re)computed HV scale corrections for " << nChannelsUpdates << " channels");
-  return StatusCode::SUCCESS;  
-}
-
-float LArHVCorrTool::champ_e(float hv, float d) const
-{
-  float e1;
-  if (hv < -3000.){ 
-    return -1000.;
-  }
-  else
-    e1 = fabs(hv)/(d*1e3);
-  if ( e1 < 0.01 ) e1 = 0.01;
-  return e1;
-}
-
-float LArHVCorrTool::vdrift(float e, float tempe) const
-{	    
-  const float T = tempe;                
-  static const float P[6] = {-0.01481,-0.0075,0.141,12.4,1.627,0.317};
-  if ( e < -999.) return 0.;
-  float vd = (P[0]*T+1)*( P[2]*e*log(1+ (P[3]/e)) + P[4]*pow(e,P[5])) + P[1]*T; // vdrift formula walcowialk mm/micro_s
-  return vd;
-}
-
-float LArHVCorrTool::InvCharge(float e) const
-// returns 1/charge from recombination effect
-{ 
-  float q = 1.;
-  if ( e > 2.) q=(1.+0.36/e);
-  else if (e>1e-6) q =(1.04+0.25/e);
-  return q;
-}
-
-float LArHVCorrTool::Respo(float e, float e_nominal,float tempe) const
-{ 
-  if (e < -999.) return 1.;
-  if (e < 0.01) return 0;
-  if ( e > e_nominal ) return 1;
-  float resp = (InvCharge(e_nominal)*vdrift(e,tempe))/(InvCharge(e)*vdrift(e_nominal,tempe));
-  return resp;
-}
-
-float LArHVCorrTool::t_drift(float e, float e_nominal, float d, float tempe) const
-{
-  if ( e < -999.) return (d*1e4)/vdrift(e_nominal, tempe) ;
-  if (e > e_nominal ) e = e_nominal;
-  return (d*1e4)/vdrift(e, tempe); // ns
-}
-
-float LArHVCorrTool::EMEC_nominal(const float aeta) const
-{
-  if ( aeta<1.5 ) return 2500.;
-  else if (aeta<1.6) return 2300.;
-  else if (aeta<1.8 ) return 2100.;
-  else if (aeta < 2.0 ) return 1700.;
-  else if (aeta < 2.1 ) return 1500.;
-  else if (aeta < 2.3 ) return 1250.;
-  else if (aeta < 2.5 ) return 1000.;
-  else if (aeta < 2.8 ) return 2300.;
-  else return 1800.;
-}
-
-float LArHVCorrTool::EMEC_gap(const float aeta, float Zeta) const
-{
-  float EMECg;
-  if (aeta<=2.5 ) EMECg = 0.9 +1.9*(  ( Zeta - 40. )/(10*sinh(aeta)) - 60.)/140.;
-  else EMECg = 1.8 + 1.3*(  ( Zeta - 40. )/(10*sinh(aeta)) - 30.)/40.;
-  return EMECg;
-}
-
-float LArHVCorrTool::Scale_FCAL1(const float hv) const
-{
-  if (hv<5.0) return 0;
-  const float R0=-2.612;
-  const float alpha=2.336;
-  const float beta=0.079;
-  const float scale=R0+alpha*pow(hv,beta);
-  return scale;
-}
-  
-
-
-float LArHVCorrTool::Scale_barrel(const float hv) const
-{
-   const float hvref[18]={1.,50.,100.,150.,200.,300.,400.,500.,600.,700.,800.,900.,1000.,1200.,1400.,1600.,1800.,2000.};
-   const float hvmax = 1998.;
-   const float facteur[18]={0.,0.1209,0.2135,0.2829,0.3390,0.4270,0.4961,0.5556,0.6065,0.6527,0.6906,
-			    0.7290,0.7626,0.8224,0.8754,0.9190,0.9606,1.};
-
-// 0 HV, returns 0 response
-   if (hv<-999.) {
-      return 0;
-   }
-   else if (hv<hvref[0]) {
-      float resp=facteur[0];
-      return resp;
-   }
-// 2000 HV, returns response=1
-   if (hv>hvmax) {
-      float resp=facteur[17];
-      return resp;
-   }
-
-// intermediate HV, find values between which to extrapolate
-   int i1,i2;
-   i1=1;
-   for (int i=0;i<18;i++) {
-    if (hv<hvref[i]) {
-       i1=i-1;
-       break;
-    }
-   }
-   i2=i1+1;
-   float resp=0.;
-
-// if lowHV>=50 V, logarithmic extrapolation
-   if (i1>0) {
-     const float b=(log(facteur[i2])-log(facteur[i1]))/(log(hvref[i2])-log(hvref[i1]));
-     const float a=log(facteur[i2])-b*log(hvref[i2]);
-     resp = exp(a+b*log(hv));
-   } 
-// if between 0 and 50 V, scales linearly
-   else {
-     resp=facteur[0]*(hv/hvref[0]);
-   }
-   //std::cout << " hv,i1,i2,resp " << hv << " " << i1 << " " << i2 << " " << resp << std::endl;
-   return resp;
-}
-
-
-// *** retrieve HVCorr for a given cell ***
-float LArHVCorrTool::Scale(const HWIdentifier& CellID) const {
-  const Identifier id=m_cablingService->cnvToIdentifier(CellID);
-  return this->Scale(id);
-}
-
-// *** retrieve HVCorr for a given cell ***
-float LArHVCorrTool::Scale(const Identifier& CellID) const {
-  const IdentifierHash hash=m_calocell_id->calo_cell_hash(CellID);
-  return this->Scale(hash);
-}
-
-
-float LArHVCorrTool::Scale(const IdentifierHash& hash) const {
-  if (!m_cacheFilled) {
-    StatusCode sc=this->getScale(m_completeRange);
-    if (sc.isFailure())  {
-      msg(MSG::ERROR) << " cannot compute HV correction values ... " << endmsg;
-      return 1;
-    }
-  }
-  if (hash>m_vScale.size()) {
-    msg(MSG::ERROR) << "Cell outside hash range! hash=" << hash << " range=" << m_vScale.size() << endmsg;
-    return 1;
-  }
-  return m_vScale[hash];
-}
-
-StatusCode LArHVCorrTool::record()  {
-
-  if (!m_cacheFilled) {
-    StatusCode sc=this->getScale(m_completeRange);
-    if (sc.isFailure()) {
-      msg(MSG::ERROR) << " cannot compute HV correction values ... " << endmsg;
-      return sc;
-    }
-  }
-
-  const unsigned hashMax=m_lar_on_id->channelHashMax();
-  coral::AttributeListSpecification* spec = new coral::AttributeListSpecification();
-  spec->extend("HVScaleCorr", "blob");
-  spec->extend<unsigned>("version");
-  CondAttrListCollection* coll=new CondAttrListCollection(true);
-  coral::AttributeList* attrList = new coral::AttributeList(*spec);
-  (*attrList)["version"].setValue(0U);
-  coral::Blob& blob=(*attrList)["HVScaleCorr"].data<coral::Blob>();
-  blob.resize(hashMax*sizeof(float));
-  float* pblob=static_cast<float*>(blob.startingAddress());
-  //Loop over online hash (to make sure that *every* field of the blob gets filled
-  for (unsigned hs=0;hs<hashMax;++hs) {
-    float value=1.0;
-    if (m_cablingService->isOnlineConnectedFromHash(hs)) {
-      const Identifier id=m_cablingService->cnvToIdentifierFromHash(hs);
-      ATH_MSG_VERBOSE("Filling value for id " << id.get_identifier32().get_compact());
-      value=this->Scale(id);
-    }
-    pblob[hs]=value;
-  }
-  coll->add(1,*attrList); //Add as channel 1 to AttrListCollection
-
-  StatusCode sc=detStore()->record(coll,m_folderName);
-  if (sc.isFailure()) {
-    msg(MSG::ERROR) << " cannot record CondAttrListCollection with key " << m_folderName << endmsg;
-    delete coll;
-    return sc;
-  }
- 
-  LArHVScaleCorrFlat* flatHVScale=new LArHVScaleCorrFlat(coll);
-  sc=detStore()->record(flatHVScale,m_keyOutput);
-  if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record LArHVScaleCorrFlat with key " << m_keyOutput << endmsg;
-    delete flatHVScale;
-    return sc;
-  }
-  
-
-  if (m_doTdrift) {
-    sc=detStore()->record(m_Tdrift,m_keyOutputTd);
-    if (sc.isFailure()) {
-      msg(MSG::ERROR) << " cannot record LArTdrift in detStore " << endmsg;
-      return sc;
-    }
-  }
-  m_ownScale = false; //Matters only for m_Tdrift
-
-  if (m_doTdrift) {
-    sc=detStore()->symLink(m_Tdrift, (ILArTdrift*)m_Tdrift);
-    if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Failed to symlink LArTdrift object" << endmsg;
-      return sc;
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-// *** Build list of correction to hardcode by jobOptions
-StatusCode LArHVCorrTool::buildFixHVList() {
-
-  m_HVfix.clear();
-  std::vector<std::string>::const_iterator itrStringID=m_fixHVStrings.begin();
-  for (;itrStringID!=m_fixHVStrings.end();++itrStringID) {
-    std::string theString=*itrStringID;
-    std::stringstream is;
-    is << theString << std::endl;
-  
-    unsigned int iDetector,ilayer_min,ilayer_max;
-    float eta_min,eta_max,phi_min,phi_max,corr;
-    is >> iDetector >> ilayer_min >> ilayer_max >> eta_min >> eta_max >> phi_min >> phi_max >> corr;
-
-    HVfix_t myfix;
-    myfix.subdet = iDetector;
-    myfix.layer_min = ilayer_min;
-    myfix.layer_max = ilayer_max;
-    myfix.eta_min = eta_min;
-    myfix.eta_max = eta_max;
-    myfix.phi_min = phi_min;
-    myfix.phi_max = phi_max;
-    myfix.corr = corr;
-    m_HVfix.push_back(myfix);
-  }
-
-  msg(MSG::INFO) << "  Number of regions with overwritten HV corrections from jobOptions " << m_HVfix.size() << endmsg;
-
-
-  return StatusCode::SUCCESS;
-}
-
-
-LArHVCorrTool::HASHRANGEVEC LArHVCorrTool::electrodeIDsToPartition(const std::vector<HWIdentifier>& electrodeIDvec) const {
-  HASHRANGEVEC ranges;
-  if (electrodeIDvec.size()>=m_electrodeID->electrodeHashMax()) {
-    ranges.push_back(std::make_pair<IdentifierHash,IdentifierHash>(0,m_vScale.size()));
-  }
-  else {
-    std::bitset<NHVPARTITION> hasPartition[2]; 
-    std::vector<HWIdentifier>::const_iterator it=electrodeIDvec.begin();
-    std::vector<HWIdentifier>::const_iterator it_e=electrodeIDvec.end();
-    for (;it!=it_e;++it) {
-      const HWIdentifier elId=*it;
-      const int zside=m_electrodeID->zside(elId);
-      const int detector=m_electrodeID->detector(elId);
-      switch (detector) {
-      case 0: //EMB
-	hasPartition[zside].set(EMB);
-	break;
-      case 1: // EMBPS
-	hasPartition[zside].set(EMBPS);
-	break;
-      case 2: //EMEC
-	if (m_electrodeID->hv_eta(elId) < 7)
-	  hasPartition[zside].set(EMECOW);
-	else
-	  hasPartition[zside].set(EMECIW);
-	break;
-      case 3: //EMECPS
-	hasPartition[zside].set(EMECPS);
-	break;
-      case 4: //HEC
-	hasPartition[zside].set(HEC);
-	break;
-      case 5:
-	hasPartition[zside].set(FCAL);
-	break;
-      default: //Ignore electrodes of purity monitors
-	break;
-      }//end switch statement
-    }//end loop over electrode IDs
-    for (unsigned z=0;z<2;++z) { //Loop over detector sides
-      for (unsigned i=0;i<NHVPARTITION;++i) {
-	if (hasPartition[z].test(i))  ranges.push_back(m_hashRanges[z][i]);
-      } //end loop over partitions
-    }// end loop over sides
-  }//end else not complete
-  return ranges;
-}
-
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h
deleted file mode 100644
index 5f7c49daddd5..000000000000
--- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-//Dear emacs, this is -*-c++-*-
-
-#ifndef LARRECUTILS_LARHVCORRTOOL_H
-#define LARRECUTILS_LARHVCORRTOOL_H
-
-//#include "GaudiKernel/AlgTool.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "LArElecCalib/ILArHVCorrTool.h"
-#include "LArElecCalib/ILArHVTool.h"
-
-#include "GaudiKernel/ToolHandle.h"
-
-#include "StoreGate/DataHandle.h"
-#include "LArCabling/LArCablingLegacyService.h"
-#include "LArIdentifier/LArOnlineID.h"
-#include "CaloIdentifier/LArID.h"
-#include "CaloDetDescr/CaloDetDescrManager.h"
-
-#include "LArRawConditions/LArHVScaleCorrComplete.h"
-#include "LArRawConditions/LArTdriftComplete.h"
-
-class StoreGateSvc; 
-class LArElectrodeID;
-
-class LArHVCorrTool: public AthAlgTool,
-		     virtual public ILArHVCorrTool
-{
- public:
-  
-  // constructor
-  LArHVCorrTool(const std::string& type, 
-		const std::string& name, 
-		const IInterface* parent); 
-  
-  // destructor 
-  virtual ~LArHVCorrTool();
-  
-  // retrieve methods 
-  float Scale(const HWIdentifier& id)  const;
-  float Scale(const Identifier& id)  const;
-  float Scale(const IdentifierHash& hash) const;
-  
-  // initialize and finalize methods
-  virtual StatusCode initialize();
-  virtual StatusCode finalize();
-
-  //IOV Callback functions
-  virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS);
-
-  static const InterfaceID& interfaceID() { 
-    return ILArHVCorrTool::interfaceID();}
-
-  StatusCode record();
-
-  bool updateOnLastCallback() const {return m_updateOnLastCallback;}
-
- private:
-
-  mutable bool m_cacheFilled;
-  mutable bool m_updateOnLastCallback;
-
-  const LArOnlineID*    m_lar_on_id; 	
-  const CaloCell_ID*    m_calocell_id;	
-  const LArEM_ID*       m_larem_id;	
-  const LArHEC_ID*      m_larhec_id;	
-  const LArFCAL_ID*     m_larfcal_id;	
-  const LArElectrodeID* m_electrodeID;  
-
-  ToolHandle<LArCablingLegacyService>  m_cablingService;  
-  ToolHandle<ILArHVTool> m_hvtool;
-
-  float Scale_barrel(const float hv) const;
-  float Scale_FCAL1(const float hv) const;
-  float champ_e(float hv, float d) const;
-  float vdrift(float e,float tempe) const;  
-  float InvCharge(float e) const;  
-  float Respo(float e,float e_nominal,float tempe) const;  
-  float t_drift (float e, float e_nominal,float d, float tempe) const;  
-  float EMEC_nominal(const float eta_r) const;    
-  float EMEC_gap(const float eta_r, float Zeta) const;
-  StatusCode buildFixHVList();
-  float m_T0;
-  bool m_allCallBack;
-
-  /*##########################################################################
-    definitions of new functions and variables                       units
-    ---------------------------------------------------------------------
-    d              gap distancia between cells in calorimeters       cm
-    nominal        subdetector nominal voltage                       volt
-    E              electric field in the cell                        kvolt/cm
-    E_nominal      nominal electric field in the cell                kvolt/cm
-    T              temperature of cryostat                           Kelvin
-    Zsamp          Z coordinate for samplings in EMEC                mm
-    champ_e        computes electric field                           kvolt/cm
-    vdrift         computes drift velocity                           mm/micro_s
-    Charge         computes recombination charge                     Coulomb
-    Respo          computes the correction factors to HV!=nominal    -
-    t_drift        computes drift times                              ns
-    EMEC_nominal   finds nominal voltages in EMEC                    volt
-    EMEC_gap       finds gap distances in EMEC                       mm
-    ########################################################################## 
-  */
-
-  //Internal cache:
-  mutable LArTdriftComplete* m_Tdrift;
-
-  mutable std::vector<float> m_vScale;
-
-  bool m_ownScale;
-
-  std::string m_keyOutput;
-  std::string m_keyOutputTd;
-  std::string m_folderName;
-
-  bool m_doTdrift;
-  unsigned int m_deltatupdate;
-  bool m_updateIfChanged;
-
-  struct HVfix_t {
-    unsigned int subdet;   // 0-1-2-3 for EMB-EMEC-HEC-FCAL
-    unsigned int layer_min;
-    unsigned int layer_max;
-    float eta_min;
-    float eta_max;
-    float phi_min;
-    float phi_max;
-    float corr;
-  };
-
-  std::vector<HVfix_t> m_HVfix;    
-  std::vector<std::string> m_fixHVStrings;
-
-  enum HVPARTITION {FCAL=0,HEC,EMECIW,EMECOW,EMECPS,EMB,EMBPS,NHVPARTITION}; //x2 for the side  
-  typedef std::vector<std::pair<IdentifierHash,IdentifierHash> > HASHRANGEVEC;
-  HASHRANGEVEC m_hashRanges[2];//x2 for the side
-  HASHRANGEVEC m_completeRange;
-  HASHRANGEVEC electrodeIDsToPartition(const std::vector<HWIdentifier>& electrodeIDvec) const;
-  StatusCode getScale(const HASHRANGEVEC& hashranges) const;
-};
-
-#endif
diff --git a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx
index 36d0d4769eea..c7171e5635b7 100644
--- a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx
+++ b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx
@@ -3,7 +3,6 @@
 #include "../LArAutoCorrTotalTool.h"
 #include "../LArCellFakeProbElectronics.h"
 //#include "LArRecUtils/LArCellFakeProbHV.h"
-#include "../LArHVCorrTool.h"
 //#include "LArRecUtils/LArHVGeometryTool.h"
 #include "../LArOFCTool.h"
 #include "LArRecUtils/LArOFPeakRecoTool.h"
@@ -36,7 +35,6 @@ DECLARE_COMPONENT( LArAutoCorrNoiseTool )
 DECLARE_COMPONENT( LArAutoCorrTotalTool )
 DECLARE_COMPONENT( LArCellFakeProbElectronics )
 //DECLARE_COMPONENT( LArCellFakeProbHV )
-DECLARE_COMPONENT( LArHVCorrTool )
 //DECLARE_COMPONENT( LArHVGeometryTool )
 DECLARE_COMPONENT( LArOFCTool )
 DECLARE_COMPONENT( LArOFPeakRecoTool )
-- 
GitLab


From 31957f9d81cb7475a682a3a1cdca59e124bc665b Mon Sep 17 00:00:00 2001
From: Marilena Bandieramonte <marilena.bandieramonte@cern.ch>
Date: Tue, 7 May 2019 13:53:26 +0000
Subject: [PATCH 125/129] Fix thread-unsafety in EscapedEnergyRegistry class
 [ATLASSIM-4106]

EscapedEnergyRegistry class was implemented as a singleton, so it was not thread-safe.
This affected the HITs of LArCalibrationHitDeadMaterial when running in MT with the CaloCalibration on.
Added the #ifdef G4MULTITHREADED directive to handle
the multithreaded case. One instance of the class will be created
per each thread and stored in a tbb::concurrent_unordered_map that
is hashed with the threadID number.
---
 .../CaloG4Sim/EscapedEnergyRegistry.h         | 28 ++++++++++++-
 .../CaloG4Sim/src/EscapedEnergyRegistry.cc    | 41 ++++++++++++++++---
 .../LArG4/LArG4H6SD/src/H62004DeadSDTool.cc   |  4 +-
 .../LArG4/LArG4H8SD/src/H8CalibSDTool.cc      |  4 +-
 .../LArG4/LArG4SD/src/DeadSDTool.cc           |  4 +-
 .../TileGeoG4Calib/src/TileGeoG4CalibSD.cc    |  2 +-
 6 files changed, 69 insertions(+), 14 deletions(-)

diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h b/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h
index 1c02fa07b93b..7c5168ef08dd 100644
--- a/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h
+++ b/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CaloG4_EscapedEnergyRegistry_H
@@ -10,6 +10,10 @@
 
 #include <map>
 
+#include <thread>
+#ifdef G4MULTITHREADED
+#  include "tbb/concurrent_unordered_map.h"
+#endif
 namespace CaloG4
 {
 
@@ -30,6 +34,15 @@ namespace CaloG4
   /// Since there's only one registry, this class uses the singleton
   /// pattern.
   ///
+  /// UPDATE:
+  ///
+  ///12-Apr-2019 Marilena Bandieramonte
+  ///
+  /// This singleton class was not thread-safe.
+  /// Added the #ifdef G4MULTITHREADED directive to handle
+  /// the multithreaded case. One instance of the class will be created
+  /// per each thread and stored in a tbb::concurrent_unordered_map that
+  /// is hashed with the threadID number.
   class EscapedEnergyRegistry
   {
   public:
@@ -57,7 +70,18 @@ namespace CaloG4
     typedef m_processingMap_t::iterator                           m_processingMap_ptr_t;
     typedef m_processingMap_t::const_iterator                     m_processingMap_const_ptr_t;
     m_processingMap_t                                             m_processingMap;
-
+#ifdef G4MULTITHREADED
+     // Thread-to-EscapeEnergyRegistry concurrent map type
+    using EERThreadMap_t = tbb::concurrent_unordered_map< std::thread::id, EscapedEnergyRegistry*, std::hash<std::thread::id> >;
+    // Concurrent map of EERs, one for each thread
+    static EERThreadMap_t m_EERThreadMap;
+    // @brief Search inside m_EERThreadMap the element with the current threadID 
+    // and return it or return a null pointer if the element is not found
+    static EscapedEnergyRegistry* getEER();
+    // @brief Insert the current EER in m_EERThreadMap and 
+    // associate it with the current threadID
+    static EscapedEnergyRegistry* setEER();
+#endif
   };
 
 } // namespace CaloG4
diff --git a/Calorimeter/CaloG4Sim/src/EscapedEnergyRegistry.cc b/Calorimeter/CaloG4Sim/src/EscapedEnergyRegistry.cc
index 11a9808cc89d..40c265b9df68 100644
--- a/Calorimeter/CaloG4Sim/src/EscapedEnergyRegistry.cc
+++ b/Calorimeter/CaloG4Sim/src/EscapedEnergyRegistry.cc
@@ -1,10 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // EscapedEnergyRegistry
 // 15-Jul-2004 William Seligman
-
+// 12-Apr-2019 Marilena Bandieramonte
+//
 #include "CaloG4Sim/EscapedEnergyRegistry.h"
 #include "CaloG4Sim/VEscapedEnergyProcessing.h"
 
@@ -15,14 +16,24 @@
 
 namespace CaloG4
 {
+#ifdef G4MULTITHREADED
+EscapedEnergyRegistry::EERThreadMap_t EscapedEnergyRegistry::m_EERThreadMap;
+#endif
 
-  // Standard implementation of a singleton pattern.
-  EscapedEnergyRegistry* EscapedEnergyRegistry::GetInstance()
+EscapedEnergyRegistry* EscapedEnergyRegistry::GetInstance()
   {
+#ifdef G4MULTITHREADED
+    auto eer = getEER();
+    if (!eer) //nullpointer if it is not found
+      return setEER();
+    else return eer;
+#else
+    //Standard implementation of a Singleton Pattern
     static EscapedEnergyRegistry instance;
     return &instance;
+#endif
   }
-
+    
   EscapedEnergyRegistry::EscapedEnergyRegistry()
   {}
 
@@ -37,6 +48,26 @@ namespace CaloG4
     }
   }
 
+#ifdef G4MULTITHREADED
+  EscapedEnergyRegistry* EscapedEnergyRegistry::getEER()
+  {
+   // Get current thread-ID
+   const auto tid = std::this_thread::get_id();
+   auto eerPair = m_EERThreadMap.find(tid);
+   if(eerPair == m_EERThreadMap.end())
+     return nullptr; //if not found return null pointer
+   else return eerPair->second;
+  }
+
+  EscapedEnergyRegistry* EscapedEnergyRegistry::setEER()
+  {
+    EscapedEnergyRegistry* instance = new EscapedEnergyRegistry;
+    const auto tid = std::this_thread::get_id();
+    auto inserted = m_EERThreadMap.insert( std::make_pair(tid, instance)).first;
+    return (EscapedEnergyRegistry*) inserted->second;
+  }
+#endif
+
   void EscapedEnergyRegistry::AddAndAdoptProcessing( const G4String& name,
                                                      VEscapedEnergyProcessing* process )
   {
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc
index 9f654e6e0be6..cec5ec420c18 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "H62004DeadSDTool.h"
@@ -50,7 +50,7 @@ namespace LArG4
       // Initialize the escaped energy processing for LAr volumes.
       // This is from initialize processing in the former LArG4CalibSD.
       // I still think we can do better than this, though.
-      // FIXME: I don't think this is thread safe!!
+      // UPDATE: this is thread-safe now
       ATH_MSG_DEBUG("Creating EscapedEnergyProcessing and adding to registry");
       CaloG4::VEscapedEnergyProcessing* eep =
         new EscapedEnergyProcessing( uninstSD.get() );
diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc
index 19664e06660b..3fae5f8e7b0d 100644
--- a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "H8CalibSDTool.h"
@@ -96,7 +96,7 @@ StatusCode H8CalibSDTool::initializeCalculators()
     std::vector<std::string> emptyStringVec;
     auto uninstSD =
       makeOneSD("Default::Dead::Uninstrumented::Calibration::Region", &*m_h8defaultcalc, emptyStringVec);
-    // WARNING: This probably isn't thread safe!
+    // UPDATE: This is thread-safe now
     CaloG4::VEscapedEnergyProcessing* eep =
       new EscapedEnergyProcessing( uninstSD.get() );
     auto registry = CaloG4::EscapedEnergyRegistry::GetInstance();
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc
index c1212f206bc2..c63dae803f8a 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "DeadSDTool.h"
@@ -120,7 +120,7 @@ namespace LArG4
         // Initialize the escaped energy processing for LAr volumes.
         // This is from initialize processing in the former LArG4CalibSD.
         // I still think we can do better than this, though.
-        // FIXME: I don't think this is thread safe!!
+        // UPDATE: this is thread-safe now
         ATH_MSG_DEBUG("Creating EscapedEnergyProcessing and adding to registry");
         CaloG4::VEscapedEnergyProcessing* eep =
           new EscapedEnergyProcessing( uninstSD.get() );
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc
index 29fab721b693..9b41c559b099 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc
@@ -126,7 +126,7 @@ TileGeoG4CalibSD::TileGeoG4CalibSD(const G4String& name, const std::vector<std::
   m_tile_eep->SetEnergy5(0.);
   m_tile_eep->SetEscapedEnergy(0.);
 
-  // @TODO : Watch out for this!!  Is it a singleton or something??
+  // @UPDATE: this is thread-safe now. EscapedEnergyRegistry is not a singleton in MT mode
   CaloG4::EscapedEnergyRegistry* registry = CaloG4::EscapedEnergyRegistry::GetInstance();
   registry->AddAndAdoptProcessing("Tile", m_tile_eep);
 
-- 
GitLab


From 8678ea7a466ac9b2c76c0dea987f29ce9632df83 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Tue, 7 May 2019 14:11:39 +0000
Subject: [PATCH 126/129] Make SiCombinatorialTrackFinder_xk private

---
 .../InDetRecExample/share/InDetRecLoadTools.py    |  2 --
 .../python/InDetTrigConfigRecBackTracking.py      | 15 ---------------
 .../python/InDetTrigConfigRecLoadTools.py         |  1 -
 .../python/InDetTrigConfigRecLoadToolsLowPt.py    |  1 -
 .../SiTrackMakerTool_xk/SiTrackMaker_xk.h         |  2 +-
 .../src/TRT_SeededTrackFinder_ATL.cxx             |  2 +-
 .../python/TrigInDetRecoTools_ConfigC.py          |  1 -
 7 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py
index 02162b4e223c..22060ee13aa8 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py
@@ -1201,7 +1201,6 @@ if InDetFlags.doPattern():
                                                                         MagneticFieldMode     = "NoField",
                                                                         TrackQualityCut       = 9.3
                                                                         )
-        ToolSvc += InDetSiComTrackFinderDBM
     if InDetFlags.doDBMstandalone():
         InDetSiComTrackFinder.MagneticFieldMode     =  "NoField"
     if (DetFlags.haveRIO.SCT_on()):
@@ -1209,7 +1208,6 @@ if InDetFlags.doPattern():
     else:
       InDetSiComTrackFinder.SctSummaryTool = None
 
-    ToolSvc += InDetSiComTrackFinder
     if (InDetFlags.doPrintConfigurables()):
       print InDetSiComTrackFinder
       if InDetFlags.doDBM():
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
index 634f51769ae5..01f0cef44d56 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecBackTracking.py
@@ -221,21 +221,6 @@ class TRT_TrigSeededTrackFinder_EF( InDet__TRT_TrigSeededTrackFinder ):
       # and also change the name of the instance 
       #
       
-      # from AthenaCommon.DetFlags    import DetFlags
-      # from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk
-      # InDetTrigSiComTrackFinder = InDet__SiCombinatorialTrackFinder_xk(name                   = 'InDetTrigSiComTrackFinder2',
-      #                                                                  PropagatorTool         = InDetTrigPatternPropagator,
-      #                                                                  UpdatorTool            = InDetTrigPatternUpdator,
-      #                                                                  RIOonTrackTool         = InDetTrigRotCreator,
-      #                                                                  AssosiationTool        = InDetTrigPrdAssociationTool,
-      #                                                                  usePixel               = DetFlags.haveRIO.pixel_on(),
-      #                                                                  useSCT                 = DetFlags.haveRIO.SCT_on(),
-      #                                                                  PixManagerLocation     = 'Pixel',
-      #                                                                  SCTManagerLocation     = 'SCT',
-      #                                                                  PixelClusterContainer  = 'PixelTrigClusters',
-      #
-      #                                                                  SCT_ClusterContainer   = 'SCT_TrigClusters')
-
       # if (DetFlags.haveRIO.SCT_on()):
       #    InDetTrigSiComTrackFinder.SctSummaryTool = InDetTrigSCTConditionsSummaryTool
       # else:
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
index 4954c6a1a018..0344672c8723 100755
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py
@@ -940,7 +940,6 @@ if InDetTrigFlags.doNewTracking():
                                                                  PixelSummaryTool = InDetTrigPixelConditionsSummaryTool,
                                                                  SctSummaryTool = InDetTrigSCTConditionsSummaryTool
                                                                  )															
-  ToolSvc += InDetTrigSiComTrackFinder
   if DetFlags.haveRIO.SCT_on():
     # Condition algorithm for SiCombinatorialTrackFinder_xk
     from AthenaCommon.AlgSequence import AthSequencer
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
index e2ac58b45f9a..1c535814e962 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py
@@ -99,7 +99,6 @@ InDetTrigSiComTrackFinderLowPt = \
                                          PixelSummaryTool = InDetTrigPixelConditionsSummaryTool,
                                          SctSummaryTool = InDetTrigSCTConditionsSummaryTool
                                          )															
-ToolSvc += InDetTrigSiComTrackFinderLowPt
 if DetFlags.haveRIO.SCT_on():
   # Condition algorithm for SiCombinatorialTrackFinder_xk
   from AthenaCommon.AlgSequence import AthSequencer
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
index c312f3bb51e8..de514e65d592 100644
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h
@@ -103,7 +103,7 @@ namespace InDet{
 
       ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle{this, "MagFieldSvc", "AtlasFieldSvc"};
       ToolHandle<InDet::ISiDetElementsRoadMaker> m_roadmaker{this, "RoadTool", "InDet::SiDetElementsRoadMaker_xk"};
-      PublicToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder{this, "CombinatorialTrackFinder", "InDet::SiCombinatorialTrackFinder_xk"};
+      ToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder{this, "CombinatorialTrackFinder", "InDet::SiCombinatorialTrackFinder_xk"};
       ToolHandle<InDet::ISeedToTrackConversionTool> m_seedtrack{this, "SeedToTrackConversion", "InDet::SeedToTrackConversionTool"};
 
       SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
diff --git a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx
index 16096e6b3312..addd000195d2 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx
+++ b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx
@@ -81,7 +81,7 @@ InDet::TRT_SeededTrackFinder_ATL::TRT_SeededTrackFinder_ATL
     m_roadmaker("InDet::SiDetElementsRoadMaker_xk"),
     m_proptool("Trk::RungeKuttaPropagator/InDetPropagator"),
     m_updatorTool("Trk::KalmanUpdator_xk/InDetPatternUpdator"),
-    m_tracksfinder("InDet::SiCombinatorialTrackFinder_xk"),
+    m_tracksfinder("InDet::SiCombinatorialTrackFinder_xk", this),
     m_trtId(nullptr)
 {
   m_fieldmode    = "MapSolenoid"    ;   //Field Mode
diff --git a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py
index 20e86644dcf3..78640087ef7b 100644
--- a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py
+++ b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py
@@ -78,7 +78,6 @@ class FactoryForStrategyC() :
                                                                   SCT_ClusterContainer = 'SCT_ClusterCache',
                                                                   PixelSummaryTool = InDetTrigPixelConditionsSummaryTool,
                                                                   SctSummaryTool = InDetTrigSCTConditionsSummaryTool)
-             ToolSvc += TrackFinder_C
              if DetFlags.haveRIO.SCT_on():
                  # Condition algorithm for SiCombinatorialTrackFinder_xk
                  from AthenaCommon.AlgSequence import AthSequencer
-- 
GitLab


From e4a1a4aabaa979b268d497809ac4601bd72508db Mon Sep 17 00:00:00 2001
From: Marcin Nowak <marcin.nowak@cern.ch>
Date: Tue, 7 May 2019 17:56:56 +0000
Subject: [PATCH 127/129] Fix.fast.pool.merge

---
 .../RootStorageSvc/src/RootTreeContainer.cpp  |   8 +-
 .../APR/StorageSvc/StorageSvc/DbDatabase.h    |  16 +-
 Database/APR/StorageSvc/StorageSvc/DbObject.h |  34 +---
 .../StorageSvc/StorageSvc/DbObjectAccessor.h  |  22 +--
 Database/APR/StorageSvc/src/DbDatabase.cpp    |  18 +-
 Database/APR/StorageSvc/src/DbDatabaseObj.cpp | 160 ++++++++++++------
 Database/APR/StorageSvc/src/DbDatabaseObj.h   |  10 +-
 Database/APR/StorageSvc/src/DbObject.cpp      |  25 +--
 Database/APR/StorageSvc/src/DbStorageSvc.cpp  |  40 ++---
 .../AthenaPOOL/RootFileTools/src/merge.cxx    |   9 +-
 10 files changed, 168 insertions(+), 174 deletions(-)

diff --git a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
index e43728054afb..198f7ae90431 100755
--- a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
+++ b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
@@ -124,9 +124,6 @@ void fixupPackedConversion (TBranch* br)
 static UCharDbArrayAthena  s_char_Blob;
 static IntDbArray   s_int_Blob;
 
-//#include <iostream>
-//using namespace std;
-
 
 RootTreeContainer::RootTreeContainer()
 : m_tree(nullptr), m_type(0), m_dbH(POOL_StorageType), 
@@ -171,13 +168,12 @@ TBranch* RootTreeContainer::branch(const std::string& nam)  const  {
   return nullptr;
 }
 
-
 DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
 {
    //clear aux branches write marker
    for( auto &descMapElem: m_auxBranchMap ) {
       descMapElem.second.written = false;
-   }      
+   }
    int icol;
    int num_bytes = 0;
    Branches::iterator k;
@@ -191,8 +187,6 @@ DbStatus RootTreeContainer::writeObject( ActionList::value_type& action )
           dsc.object            = p.ptr;
           p.ptr                 = &dsc.object;
           if( dsc.aux_iostore_IFoffset >= 0 ) {
-             // cout << "---  write object IAuxStoreIO "<<endl;
-             // DbPrint::setMsgVerbosity(coral::Debug);
              DbPrint log(m_name);
              log << DbPrintLvl::Debug << " SG::IAuxStoreIO* detected in " << dsc.branch->GetName() << DbPrint::endmsg;
              auto *store = reinterpret_cast<SG::IAuxStoreIO*>( (char*)dsc.object + dsc.aux_iostore_IFoffset );
diff --git a/Database/APR/StorageSvc/StorageSvc/DbDatabase.h b/Database/APR/StorageSvc/StorageSvc/DbDatabase.h
index e3375122f541..03198de58ca7 100644
--- a/Database/APR/StorageSvc/StorageSvc/DbDatabase.h
+++ b/Database/APR/StorageSvc/StorageSvc/DbDatabase.h
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: DbDatabase.h 726071 2016-02-25 09:23:05Z krasznaa $
 //====================================================================
 //  DbDatabase and related class definitions
 //--------------------------------------------------------------------
@@ -42,6 +41,7 @@ namespace pool  {
   class DbContainerObj;
   class DbOption;
   class DbTypeInfo;
+  typedef const class Shape        *ShapeH;
 
   /** @class DbDatabase DbDatabase.h StorageSvc/DbDatabase.h
    *
@@ -160,15 +160,15 @@ namespace pool  {
     DbStatus param(const std::string& nam, std::string& val) const;
     /// Retrieve all parameters
     DbStatus params(Parameters& vals) const;
-    /// Retrieve association link from link container with also using section information
-    DbStatus getRedirection(const Token& token, Token::OID_t& linkH) const;
     /// Access to all token redirections from merged files
     const Redirections& redirections() const;
 
-    /// Retrieve association link from link container with also using section information
-    DbStatus getLink(const Token::OID_t& lnkH, Token* pToken, const DbSection& section) const;
-    /// Retrieve association link from link container
-    DbStatus getLink(const Token::OID_t& lnkH, Token* pToken) const;
+    /// read an object referenced by the token
+    DbStatus read(const Token& token, ShapeH shape, void** object);
+    /// Calculate required OID modification (shift) for source OID (oid) for a given merge section 
+    DbStatus getRedirection(const Token::OID_t& oid, int merge_section, Token::OID_t& shift);
+    /// Expand OID into a full Token, based on the Links table. For merged files provide links section#
+    DbStatus getLink(const Token::OID_t& oid, int merge_section, Token* pTok);
     /// Retrieve container name from link container (using token oid, rather than contID)
     std::string cntName(const Token& token) const;
     /// Add association link to link container
diff --git a/Database/APR/StorageSvc/StorageSvc/DbObject.h b/Database/APR/StorageSvc/StorageSvc/DbObject.h
index 062584ff0b9d..3af36cd4daa6 100644
--- a/Database/APR/StorageSvc/StorageSvc/DbObject.h
+++ b/Database/APR/StorageSvc/StorageSvc/DbObject.h
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: DbObject.h 726071 2016-02-25 09:23:05Z krasznaa $
 //====================================================================
 //  DbObject definition
 //--------------------------------------------------------------------
@@ -142,16 +141,9 @@ namespace pool {
     Token::OID_t& oid() const;
     /// Add persistent association entry
     DbStatus makeLink(const Token* pToken, Token::OID_t& linkH) const;
-    /// Validate an object association
-    DbStatus getLink(const Token::OID_t& lnkH, Token* p)  const;
-
-    static DbStatus openEx( const DbContainer&  cntH,
-                            const Token&        tokenH, 
-                            void**              ptr,
-                            ShapeH              shape,
-                            DbAccessMode        mod = pool::READ);
   };
 
+
   template <class USER> class DbHandle : public DbObjectHandle< USER> {
     typedef DbObjectHandle< USER> Handle;
   public:
@@ -204,15 +196,6 @@ namespace pool {
 namespace pool {
 #ifndef __no_inline
 
-  /// Open handle
-  template <> inline
-  DbStatus DbObjectHandle<DbObject>::openEx(const DbContainer&  cntH,  
-                                            const Token&        tokenH,
-                                            void**              ptr,
-                                            ShapeH              shape,
-                                            DbAccessMode        mod)
-  { return DbObjectAccessor::open(ptr, shape, cntH, tokenH, mod);        }
-
   /// Retrieve hosting container
   template <class T> inline
   const DbContainer& DbObjectHandle<T>::containedIn() const  
@@ -228,19 +211,6 @@ namespace pool {
   DbStatus DbObjectHandle<T>::makeLink(const Token* pToken, Token::OID_t& linkH) const 
   { return DbObjectAccessor::makeObjectLink(Base::ptr(), pToken, linkH); }
 
-  /// Validate an object association
-  template <class T> inline
-  DbStatus DbObjectHandle<T>::getLink(const Token::OID_t& linkH, Token* pToken) const 
-  { return DbObjectAccessor::getObjectLink(Base::ptr(), linkH, pToken);  }
-
-  /// Open handle
-  template <class T> inline
-  DbStatus DbObjectHandle<T>::openEx(const DbContainer& cntH,
-                                     const Token&       tokenH,
-                                     void**             ptr,
-                                     ShapeH             shape,
-                                     DbAccessMode       mod)
-  { return DbObjectAccessor::open(ptr, shape, cntH, tokenH, mod);        }
 #endif
 }       // End namespace pool
 #endif  // POOL_DBOBJECT_H
diff --git a/Database/APR/StorageSvc/StorageSvc/DbObjectAccessor.h b/Database/APR/StorageSvc/StorageSvc/DbObjectAccessor.h
index afe123ab63f5..f544d3e6421f 100644
--- a/Database/APR/StorageSvc/StorageSvc/DbObjectAccessor.h
+++ b/Database/APR/StorageSvc/StorageSvc/DbObjectAccessor.h
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: DbObjectAccessor.h 726071 2016-02-25 09:23:05Z krasznaa $
 //====================================================================
 //
 //  @author      M.Frank
@@ -29,21 +28,20 @@ namespace pool  {
   */
   class DbObjectAccessor   {
   public:
-    /** Open object using either handle starting
-      * from the container handle of the originating object.
+    /** Read object from a container, using its OID
       *
-      * @param objH      [IN/OUT] Handle to the object to be loaded.
+      * @param ptr       [OUT]    Pointer to the retrieved object 
+      * @param shape     [IN]     Object type information
       * @param cntH      [IN]     Handle to source object's container.
-      * @param tokenH    [IN]     Reference to token of the target object.
-      * @param mod       [IN]     Desired opening mode.
+      * @param OID       [IN]     OID of the target object.
       *
       * @return DbStatus code indicating success or failure.
       */
-    static DbStatus open( void**                    ptr,
+    static DbStatus read( void**                    ptr,
                           ShapeH                    shape,
                           const DbContainer&        cntH,
-                          const Token&              tokenH, 
-                          DbAccessMode              mod);
+                          const Token::OID_t&       oid,
+                          int                       merge_section );
 
     /// Retrieve hosting container
     static const DbContainer& containedIn(const DbObject* pObj);
@@ -56,10 +54,6 @@ namespace pool  {
                                     const Token*        pToken,
                                     Token::OID_t&       tokenH);
     
-    /// Validate an object association
-    static DbStatus getObjectLink(  const DbObject*     pObj,
-                                    const Token::OID_t& tokenH,
-                                    Token*              pToken);
   };
 }       // End namespace pool
 #endif  // POOL_DBOBJECTACCESSOR_H
diff --git a/Database/APR/StorageSvc/src/DbDatabase.cpp b/Database/APR/StorageSvc/src/DbDatabase.cpp
index bdfaf68d0396..ca2c906e4bf5 100644
--- a/Database/APR/StorageSvc/src/DbDatabase.cpp
+++ b/Database/APR/StorageSvc/src/DbDatabase.cpp
@@ -139,17 +139,17 @@ const DbDatabase::Redirections& DbDatabase::redirections() const {
   return isValid() ? ptr()->redirections() : s_redirects; 
 }
 
-/// Retrieve redirected association link from link container
-DbStatus DbDatabase::getRedirection(const Token& token, Token::OID_t& lnkH) const
-{  return isValid() ? ptr()->getRedirection(token,lnkH) : Error;  }
+/// read an object referenced by the token
+DbStatus DbDatabase::read(const Token& token, ShapeH shape, void** object)
+{  return isValid() ? ptr()->read(token, shape, object) : Error;  }
 
-/// Retrieve association link from link container
-DbStatus DbDatabase::getLink(const Token::OID_t& lnkH, Token* pTok) const
-{  return isValid() ? ptr()->getLink(lnkH, pTok, DbSection()) : Error;  }
+/// Calculate required OID modification (shift) for source OID (oid) for a given merge section 
+DbStatus DbDatabase::getRedirection(const Token::OID_t& oid, int merge_section, Token::OID_t& shift)
+{  return isValid() ? ptr()->getRedirection(oid, merge_section, shift) : Error;  }
 
-/// Retrieve association link from link container with also using section information
-DbStatus DbDatabase::getLink(const Token::OID_t& lnkH, Token* pTok, const DbSection& s) const
-{  return isValid() ? ptr()->getLink(lnkH, pTok, s) : Error;            }
+/// Expand OID into a full Token, based on the Links table. For merged files provide links section#
+DbStatus DbDatabase::getLink(const Token::OID_t& oid, int merge_section, Token* pTok)
+{  return isValid() ? ptr()->getLink(oid, merge_section, pTok) : Error;  }
 
 /// Access local container token (if container exists)
 std::string DbDatabase::cntName(const Token& token) const
diff --git a/Database/APR/StorageSvc/src/DbDatabaseObj.cpp b/Database/APR/StorageSvc/src/DbDatabaseObj.cpp
index 14f7a2432b54..28e6889e1fb8 100644
--- a/Database/APR/StorageSvc/src/DbDatabaseObj.cpp
+++ b/Database/APR/StorageSvc/src/DbDatabaseObj.cpp
@@ -668,32 +668,63 @@ DbStatus DbDatabaseObj::params(Parameters& vals)   {
   return Error;
 }
 
-/// Retrieve association link from link container with also using section information
-DbStatus DbDatabaseObj::getLink(const Token::OID_t& lnkH, Token* pTok, const DbSection& section)  {
-  if ( 0 == m_info ) open();
-  if ( 0 != m_info && 0 != pTok )    {
-    int lnk = lnkH.first;
-    if ( lnk >= 0 )  {
-      lnk += section.offset;
-      if ( lnk < int(m_linkVec.size()) )   {
-	DbToken* link = m_linkVec[lnk];
-	bool local = link->isLocal();
-	pTok->oid().first  = lnk;
-	pTok->oid().second = local ? lnkH.second + section.start : lnkH.second;
-	if ( !(pTok->type() & DbToken::TOKEN_FULL_KEY) )  {
-	  if ( typeid(*pTok) == typeid(DbToken) )  {
+/// Calculate required OID modification (shift) for source OID (oid) for a given merge section
+DbStatus DbDatabaseObj::getRedirection(const Token::OID_t& oid, int merge_section, Token::OID_t& shift)
+{
+   if( merge_section > 0 ) {
+      // find the offset in the links table
+      Sections::const_iterator j = m_sections.find("##Links");
+      if( j == m_sections.end() )
+         return Error;
+      const ContainerSections& sections = (*j).second;
+      if( merge_section < (int)sections.size() ) {
+         shift.first = sections[merge_section].start;
+      }
+      DbToken* link = m_linkVec[ oid.first + shift.first ];
+       if( link->isLocal() ) {
+         // MN: assuming only internal links need OID_2 adjustment
+         // find the start of the section for this container
+         j = m_sections.find( link->contID() );
+         if( j == m_sections.end() )
+            return Error;
+         const ContainerSections& sections = (*j).second;
+         if( merge_section < (int)sections.size() ) {
+            shift.second = sections[merge_section].start;
+         }
+      }
+   }
+   return Success;
+}
+
+/// Expand OID into a full Token, based on the Links table. For merged files provide links section#
+DbStatus DbDatabaseObj::getLink(const Token::OID_t& oid, int merge_section, Token* pTok)
+{
+   if ( 0 == m_info ) open();
+   if ( 0 != m_info && 0 != pTok && oid.first >= 0 ) {
+      Token::OID_t shift(0,0);
+      if( merge_section > 0 ) {
+         if( getRedirection(oid, merge_section, shift) != Success )
+            return Error; 
+      }
+      int lnk = oid.first + shift.first;
+      if( lnk >= int(m_linkVec.size()) )
+         return Error;
+
+      pTok->oid().first  = lnk;
+      pTok->oid().second = oid.second + shift.second;
+      if( !(pTok->type() & DbToken::TOKEN_FULL_KEY) )  {
+         if( typeid(*pTok) == typeid(DbToken) )  {
 	    DbToken* pdbTok = (DbToken*)pTok;
 	    pdbTok->setKey(DbToken::TOKEN_FULL_KEY);
-	  }
-	}
-	link->set(pTok);
-	return Success;
+         }
       }
-    }
-  }
-  return Error;
+      m_linkVec[lnk]->set(pTok);
+      return Success;
+   }
+   return Error;
 }
 
+
 std::string DbDatabaseObj::cntName(const Token& token) {
   if ( 0 == m_info ) open();
   if ( 0 != m_info )    {
@@ -721,38 +752,67 @@ std::string DbDatabaseObj::cntName(const Token& token) {
   return "";
 }
 
-/// Retrieve association link from token with redirection when file is merged.
-DbStatus DbDatabaseObj::getRedirection(const Token& token, Token::OID_t& obj_linkH)  {
-  if ( 0 == m_info ) open();
-  if ( 0 != m_info )    {
-    const Token::OID_t& lnkH = token.oid();
-    if ( token.dbID() != name() ) {
-      // We get here if the token is *part* of a merged file, but still hosted within this DB
-      // See if this is true. If so, return the redirected link handle.
-      int lnk = lnkH.first;
-      if ( lnk >= 0 )  {
-	Redirections::iterator i=m_redirects.find(token.dbID().toString());
-	Sections::const_iterator j=m_sections.find(cntName(token));
-	if ( i != m_redirects.end() && j != m_sections.end() ) {
-	  const ContainerSections& cs = (*j).second;
-          int csi = (*i).second.first;
-	  if ( csi < int(cs.size()) ) {
-	    const DbSection& s = cs[csi];
-	    obj_linkH.first  = csi;
-	    obj_linkH.second = lnkH.second + s.start;
-	    return Success;
-	  }
-	}
+
+DbStatus DbDatabaseObj::read(const Token& token, ShapeH shape, void** object) 
+{
+   if( 0 == m_info ) open();
+   if( 0 != m_info ) {
+      Token::OID_t oid = token.oid();
+      std::string containerName = token.contID();
+      size_t    sectionN = 0;
+      if( token.dbID() == name() ) {
+         // Regular read operation, make sure we know the container name
+         if( containerName.empty() ) {
+             containerName = m_linkVec[ oid.first ]->contID();
+         }
+         Sections::const_iterator j = m_sections.find( containerName );
+         if( j != m_sections.end() ) {
+            const ContainerSections& sections = (*j).second;
+            for( sectionN=0; sectionN < sections.size(); sectionN++ ) {
+               if( sections[sectionN].start <= oid.second
+                   && oid.second < sections[sectionN].start + sections[sectionN].length )
+                  break;
+            }
+            // reset if not found in the sections list
+            if( sectionN >= sections.size() ) sectionN = 0;
+         }
       }
-    }
-    else {
-      obj_linkH = lnkH;
-      return Success;
-    }
-  }
-  return Error;
+      else {
+         // We get here if the token is *part* of a merged file, but still hosted within this DB
+         Redirections::iterator i = m_redirects.find( token.dbID().toString() );
+         // find out which section to read from
+         if( i!=m_redirects.end() ) sectionN = i->second.first;
+         if( sectionN > 0 ) {
+            Token::OID_t shift(0,0);
+            getRedirection(oid, sectionN, shift);
+            if( DbPrintLvl::outputLvl == DbPrintLvl::Verbose ) {
+               DbPrint log( name() );
+               log << DbPrintLvl::Verbose << "Reading object OID=(" << oid.first << ", " << oid.second
+                   << ")  from merged file section # " << sectionN
+                   << ", Adjusted OID=(" << oid.first + shift.first << ", " << oid.second + shift.second << ")"
+                   << DbPrint::endmsg;
+            }
+            oid.first += shift.first;
+            oid.second += shift.second;
+         }
+         containerName = m_linkVec[ oid.first ]->contID();
+      }
+
+      DbContainer cntH( type() );
+      const DbTypeInfo* typ_info = objectShape( token.classID() );
+      if( cntH.open( DbDatabase(this), containerName, typ_info, token.technology(), mode() ).isSuccess() )  {
+         if ( typ_info && typ_info == shape ) {
+            return DbObjectAccessor::read(object, shape, cntH, oid, sectionN );
+         }
+         DbPrint log( name() );
+         log << DbPrintLvl::Error << " The object shape " << token.classID().toString()
+             << " is unknown for this container!" << DbPrint::endmsg;
+      }
+   }
+   return Error;
 }
 
+
 /// Allow access to all known containers
 DbStatus DbDatabaseObj::containers(vector<const Token*>& conts,bool with_internals)  {
   conts.clear();
diff --git a/Database/APR/StorageSvc/src/DbDatabaseObj.h b/Database/APR/StorageSvc/src/DbDatabaseObj.h
index 43d5c930bc3f..1a0098c03d1e 100644
--- a/Database/APR/StorageSvc/src/DbDatabaseObj.h
+++ b/Database/APR/StorageSvc/src/DbDatabaseObj.h
@@ -144,10 +144,12 @@ namespace pool    {
     /// Execute Database Transaction action
     DbStatus transAct(Transaction::Action action);
 
-    /// Retrieve association link from token with redirection when file is merged.
-    DbStatus getRedirection(const Token& token, Token::OID_t& obj_linkH);
-    /// Retrieve association link from link container with also using section information
-    DbStatus getLink(const Token::OID_t& lnkH, Token* pToken, const DbSection& section);
+    /// read an object referenced by the token
+    DbStatus read(const Token& token, ShapeH shape, void** object);
+    /// Calculate required OID modification (shift) for source OID (oid) for a given merge section 
+    DbStatus getRedirection(const Token::OID_t& oid, int merge_section, Token::OID_t& shift);
+    /// Expand OID into a full Token, based on the Links table. For merged files provide links section#
+    DbStatus getLink(const Token::OID_t& oid, int merge_section, Token* pTok);
     /// Retrieve container name from link container (using token oid, rather than contID)
     std::string cntName(const Token& token);
     /// Add association link to link container
diff --git a/Database/APR/StorageSvc/src/DbObject.cpp b/Database/APR/StorageSvc/src/DbObject.cpp
index 83b1f0626718..764bc4d542de 100644
--- a/Database/APR/StorageSvc/src/DbObject.cpp
+++ b/Database/APR/StorageSvc/src/DbObject.cpp
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: DbObject.cpp 726071 2016-02-25 09:23:05Z krasznaa $
 //====================================================================
 //  DbObject implementation
 //--------------------------------------------------------------------
@@ -74,25 +73,17 @@ DbStatus DbObjectAccessor::makeObjectLink(const DbObject* pObj,
   return Error;
 }
 
-/// Validate an association of an object
-DbStatus DbObjectAccessor::getObjectLink( const DbObject* pObj,
-                                          const Token::OID_t& lnkH,
-                                          Token*        pTok)
-{
-  return DbHeap::container(pObj).containedIn().getLink(lnkH, pTok);
-}
-
 /// Validate an association of an object
 Token::OID_t& DbObjectAccessor::objectOid(const DbObject* pObj) {
   return DbHeap::oid(pObj);
 }
 
-/// Open handle
-DbStatus DbObjectAccessor::open(void**                    ptr,
-                                ShapeH                    shape,
-                                const DbContainer&        cntH, 
-                                const Token&              tokenH, 
-                                DbAccessMode )
+/// Read an object from a container
+DbStatus DbObjectAccessor::read( void**                  ptr,
+                                 ShapeH                  shape,
+                                 const DbContainer&      cntH, 
+                                 const Token::OID_t&     oid,
+                                 int                     /* merge_section_n */ )
 {
-  return cntH.load(ptr, shape, tokenH.oid());
+   return cntH.load(ptr, shape, oid);
 }
diff --git a/Database/APR/StorageSvc/src/DbStorageSvc.cpp b/Database/APR/StorageSvc/src/DbStorageSvc.cpp
index 24b5411c1e0d..15aec32f72fe 100644
--- a/Database/APR/StorageSvc/src/DbStorageSvc.cpp
+++ b/Database/APR/StorageSvc/src/DbStorageSvc.cpp
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Header: /cvs/PF/pool/StorageSvc/src/DbStorageSvc.cpp,v 1.81 2010/05/05 11:43:26 frankb Exp $
 //  ====================================================================
 //
 //  DbStorageSvc.cpp
@@ -323,36 +322,21 @@ DbStatus DbStorageSvc::read( const FileDescriptor& fDesc,
     if ( m_domH.type() == typ ) {
       DbDatabase dbH(m_domH.type());
       const string& fid = fDesc.FID();
-      if ( dbH.open(m_domH, fDesc.PFN(), fid, mode).isSuccess() ) {
-        DbContainer cntH(dbH.type());
-        const DbTypeInfo* typ_info = dbH.objectShape(token.classID());
-        if ( cntH.open(dbH, dbH.cntName(token), typ_info, typ, dbH.openMode()).isSuccess() )  {
-          if ( typ_info && typ_info == shape ) {
-	    Token::OID_t link;
-	    if ( dbH.getRedirection(token,link).isSuccess() ) {
-	      Token* pt = const_cast<Token*>(&token);
-	      pt->oid() = link;
-              return ObjHandle::openEx(cntH, token, object, shape, mode);
-	    }
-          }
-          err = " The object shape "+token.classID().toString()+
-                " is unknown for this container!";
-        }
-        else  {
-          err = "The requested Database:"+token.dbID().toString()+" cannot be opened!";
-        }
-      }
-      else  {
-        err = "The requested Database:"+token.dbID().toString()+" cannot be opened!";
+      if( dbH.open(m_domH, fDesc.PFN(), fid, mode).isSuccess() ) {
+         if( dbH.read( token, shape, object).isSuccess() ) {
+            return Success;
+         }
       }
+      DbPrint log( name() );
+      log << DbPrintLvl::Error << "The requested Database: " << token.dbID().toString()
+          << " cannot be opened!" << DbPrint::endmsg;
     }
-    else  {
-      err = "Wait a minute...You cannot mix the technologies:"+
-        typ.storageName()+" and "+m_domH.type().storageName();
+    else {
+       DbPrint log( name());
+       log << DbPrintLvl::Error << "Wait a minute...You cannot mix the technologies:"
+           << typ.storageName() << " and " << m_domH.type().storageName() << DbPrint::endmsg;
     }
   }
-  DbPrint log( name());
-  log << DbPrintLvl::Error << err << DbPrint::endmsg;
   return Error;
 }
 
diff --git a/Database/AthenaPOOL/RootFileTools/src/merge.cxx b/Database/AthenaPOOL/RootFileTools/src/merge.cxx
index e13e9cae5979..d6e2a1dca9da 100644
--- a/Database/AthenaPOOL/RootFileTools/src/merge.cxx
+++ b/Database/AthenaPOOL/RootFileTools/src/merge.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PersistentDataModel/Guid.h"
@@ -501,11 +501,11 @@ DbStatus DbDatabaseMerger::merge(const string& fid, const std::set<std::string>&
                Long64_t src_entries = src_tree->GetEntries();
                m_output->cd();
                DbContainerSection s;
-               s.start = 0;
+               s.start  = 0;
                s.length = (int)src_entries;
                s.offset = (int)lnk_offset;
                DbContainerSection s0;
-               s0.start = 0;
+               s0.start  = 0;
                s0.length = 0;
                s0.offset = 0;
 
@@ -515,10 +515,9 @@ DbStatus DbDatabaseMerger::merge(const string& fid, const std::set<std::string>&
                   if ( s_dbg ) cout << "+++ Created new Tree " << out_tree->GetName() << endl;
                } else {
                   m_output->GetObject(key->GetName(),out_tree);
+                  s.start = (int) out_tree->GetEntries();
                   if (name == "##Params") {
                      if ( s_dbg ) cout << "+++ Slow merge for " << name << endl;
-                     Long64_t out_entries = out_tree->GetEntries();
-                     s.start = (int)out_entries;
                      out_tree->CopyAddresses(src_tree);
                      for (Long64_t i=0; i<src_entries; i++) {
                         src_tree->GetEntry(i);
-- 
GitLab


From 02f3f4a468eecfcaa4770ede5f1e91d4bdeb9f2f Mon Sep 17 00:00:00 2001
From: Pascal Boeschoten <pascal.boeschoten@cern.ch>
Date: Wed, 8 May 2019 07:44:31 +0000
Subject: [PATCH 128/129] Remove the no longer needed separate
 SpectrometerExtrapolator

---
 .../share/MuonScatteringSigToolConfig.py      |  1 -
 .../python/MuonCombinedFitTools.py            |  1 -
 .../share/iPatRec_jobOptions.py               |  1 -
 .../python/AlignmentTrackFitter.py            |  1 -
 .../TrkiPatFitter/MaterialAllocator.h         |  1 -
 .../TrkiPatFitter/src/MaterialAllocator.cxx   | 28 ++++++-------------
 .../TrigMuonEF/python/TrigMuonEFConfig.py     |  1 -
 7 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/MuonScatteringSigToolConfig.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/MuonScatteringSigToolConfig.py
index e31e3339490c..5d1eb264e2c7 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/MuonScatteringSigToolConfig.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/MuonScatteringSigToolConfig.py
@@ -16,7 +16,6 @@ muidMaterialAllocator = Trk__MaterialAllocator(
     name                      = 'MuidMaterialAllocator',
     AggregateMaterial         = True,
     Extrapolator              = atlasExtrapolator,
-    SpectrometerExtrapolator  = muonExtrapolator,
     TrackingGeometrySvc       = ServiceMgr.AtlasTrackingGeometrySvc)
 ToolSvc += muidMaterialAllocator
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
index 4bbea70b70a0..57d7e65dad60 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
@@ -35,7 +35,6 @@ def MuidMaterialAllocator( name='MuidMaterialAllocator', **kwargs):
     kwargs.setdefault("AggregateMaterial",True)
     kwargs.setdefault("AllowReordering",False)
     kwargs.setdefault("Extrapolator", getPublicTool('AtlasExtrapolator') )
-    kwargs.setdefault("SpectrometerExtrapolator", getPublicTool('AtlasExtrapolator'))
     kwargs.setdefault("TrackingGeometrySvc", getService("AtlasTrackingGeometrySvc") )
     return CfgMgr.Trk__MaterialAllocator(name,**kwargs)
 
diff --git a/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py b/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
index da19c50eaa50..81317db6dc99 100755
--- a/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
+++ b/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
@@ -66,7 +66,6 @@ if DetFlags.detdescr.ID_on() and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRI
         name                      = 'iPatMaterialAllocator',
         #AggregateMaterial         = True,
         Extrapolator              = iPatExtrapolator,
-        SpectrometerExtrapolator  = "",
         TrackingGeometrySvc       = ServiceMgr.AtlasTrackingGeometrySvc)
     ToolSvc += iPatMaterialAllocator
 
diff --git a/Tracking/TrkAlignment/TrkAlignGenTools/python/AlignmentTrackFitter.py b/Tracking/TrkAlignment/TrkAlignGenTools/python/AlignmentTrackFitter.py
index 1fc9065b4e0f..7109db6bf791 100644
--- a/Tracking/TrkAlignment/TrkAlignGenTools/python/AlignmentTrackFitter.py
+++ b/Tracking/TrkAlignment/TrkAlignGenTools/python/AlignmentTrackFitter.py
@@ -114,7 +114,6 @@ class AlignmentTrackFitter () :
             name                      = 'MuidMaterialAllocator',
             AggregateMaterial         = True,
             Extrapolator              = MuidExtrapolator,
-            SpectrometerExtrapolator  = MuonExtrapolator,
             TrackingGeometrySvc       = svcMgr.AtlasTrackingGeometrySvc)
         ToolSvc += MuidMaterialAllocator
         
diff --git a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h
index 96246e2d88c1..1eaf7d364006 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h
+++ b/Tracking/TrkFitter/TrkiPatFitter/TrkiPatFitter/MaterialAllocator.h
@@ -132,7 +132,6 @@ private:
     // configurables (svc/tools then options)
     ToolHandle<IExtrapolator>				m_extrapolator;
     mutable ToolHandle<IIntersector>			m_intersector;
-    ToolHandle<IExtrapolator>				m_spectrometerExtrapolator;
     mutable ServiceHandle<ITrackingGeometrySvc> 	m_trackingGeometrySvc;	// init with callback
     ServiceHandle<ITrackingVolumesSvc>			m_trackingVolumesSvc;
     PublicToolHandle<IPropagator>			m_stepPropagator
diff --git a/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx b/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
index e3c71a6aecef..1f55164c59c9 100755
--- a/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
+++ b/Tracking/TrkFitter/TrkiPatFitter/src/MaterialAllocator.cxx
@@ -41,7 +41,6 @@ namespace Trk
     :   AthAlgTool(type, name, parent),
     m_extrapolator("Trk::Extrapolator/AtlasExtrapolator", this),
     m_intersector("Trk::RungeKuttaIntersector/RungeKuttaIntersector", this),
-    m_spectrometerExtrapolator("Trk::Extrapolator/AtlasExtrapolator", this),
     m_trackingGeometrySvc("TrackingGeometrySvc/AtlasTrackingGeometrySvc", name),
     m_trackingVolumesSvc("Trk::TrackingVolumesSvc/TrackingVolumesSvc", name),
     m_aggregateMaterial(true),
@@ -63,7 +62,6 @@ namespace Trk
     declareInterface<IMaterialAllocator>(this);
     declareProperty("Extrapolator", m_extrapolator);
     declareProperty("Intersector", m_intersector);
-    declareProperty("SpectrometerExtrapolator", m_spectrometerExtrapolator);
     declareProperty("TrackingGeometrySvc", m_trackingGeometrySvc);
     declareProperty("TrackingVolumesSvc", m_trackingVolumesSvc);
     declareProperty("AggregateMaterial", m_aggregateMaterial);
@@ -114,14 +112,6 @@ namespace Trk
     } else {
       ATH_MSG_INFO("Retrieved tool " << m_intersector);
     }
-    if (!m_spectrometerExtrapolator.empty()) {
-      if (m_spectrometerExtrapolator.retrieve().isFailure()) {
-        ATH_MSG_FATAL("Failed to retrieve tool " << m_spectrometerExtrapolator);
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("Retrieved tool " << m_spectrometerExtrapolator);
-      }
-    }
 
     // retrieve services
     if (m_trackingGeometrySvc.retrieve().isFailure()) {
@@ -636,7 +626,7 @@ namespace Trk
                                       const TrackParameters& startParameters) const {
     // different strategies used for indet and muon spectrometer
     indetMaterial(measurements, particleHypothesis, startParameters);
-    if (!m_spectrometerExtrapolator.empty()) spectrometerMaterial(measurements,
+    if (!m_extrapolator.empty()) spectrometerMaterial(measurements,
                                                                   particleHypothesis,
                                                                   fitParameters,
                                                                   startParameters);
@@ -745,7 +735,7 @@ namespace Trk
     if (m_calorimeterVolume->inside(spectrometerParameters.position())) return 0;
 
     const TrackParameters* entranceParameters =
-      m_spectrometerExtrapolator->extrapolateToVolume(spectrometerParameters,
+      m_extrapolator->extrapolateToVolume(spectrometerParameters,
                                                       *m_spectrometerEntrance,
                                                       anyDirection,
                                                       Trk::nonInteracting);
@@ -763,7 +753,7 @@ namespace Trk
 
     const Surface& entranceSurface = entranceParameters->associatedSurface();
     const std::vector<const TrackStateOnSurface*>* extrapolatedTSOS =
-      extrapolatedMaterial(m_spectrometerExtrapolator,
+      extrapolatedMaterial(m_extrapolator,
                            spectrometerParameters,
                            entranceSurface,
                            anyDirection,
@@ -955,7 +945,7 @@ namespace Trk
          ++r) {
       if (!(**r).isMaterialDelimiter()) continue;
       const std::vector<const TrackStateOnSurface*>* spectrometerMaterial =
-        extrapolatedMaterial(m_spectrometerExtrapolator,
+        extrapolatedMaterial(m_extrapolator,
                              *trackParameters,
                              *(**r).surface(),
                              oppositeMomentum,
@@ -2346,7 +2336,7 @@ namespace Trk
                                                                              *innerMeasurement,
                                                                              false);
       if (!innerParameters) innerParameters = startParameters.clone();
-      entranceParameters = m_spectrometerExtrapolator->extrapolateToVolume(*innerParameters,
+      entranceParameters = m_extrapolator->extrapolateToVolume(*innerParameters,
                                                                            *m_spectrometerEntrance,
                                                                            anyDirection,
                                                                            Trk::nonInteracting);
@@ -2381,13 +2371,13 @@ namespace Trk
     if (!outerParameters) outerParameters = startParameters.clone();
     const Surface& endSurface = *measurements.back()->surface();
     const TrackParameters* endParameters =
-      m_spectrometerExtrapolator->extrapolate(*outerParameters,
+      m_extrapolator->extrapolate(*outerParameters,
                                               endSurface,
                                               anyDirection,
                                               false,
                                               particleHypothesis);
     if (!endParameters) {
-      endParameters = m_spectrometerExtrapolator->extrapolate(*outerParameters,
+      endParameters = m_extrapolator->extrapolate(*outerParameters,
                                                               endSurface,
                                                               anyDirection,
                                                               false,
@@ -2431,7 +2421,7 @@ namespace Trk
 
     if (entranceParameters) {
       const Surface& entranceSurface = entranceParameters->associatedSurface();
-      spectrometerMaterial = extrapolatedMaterial(m_spectrometerExtrapolator,
+      spectrometerMaterial = extrapolatedMaterial(m_extrapolator,
                                                   *endParameters,
                                                   entranceSurface,
                                                   anyDirection,
@@ -2439,7 +2429,7 @@ namespace Trk
                                                   Trk::muon);
     } else {
       const Surface& entranceSurface = startParameters.associatedSurface();
-      spectrometerMaterial = extrapolatedMaterial(m_spectrometerExtrapolator,
+      spectrometerMaterial = extrapolatedMaterial(m_extrapolator,
                                                   *endParameters,
                                                   entranceSurface,
                                                   anyDirection,
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index ba801404cd5a..1970063a1c5c 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -126,7 +126,6 @@ def TMEF_MatchQuality(name='TMEF_MatchQuality',**kwargs):
 def TMEF_MaterialAllocator(name='TMEF_MaterialAllocator',**kwargs):
     kwargs.setdefault("AggregateMaterial", True)
     kwargs.setdefault("Extrapolator","TMEF_Extrapolator")
-    kwargs.setdefault("SpectrometerExtrapolator", "TMEF_Extrapolator")
     kwargs.setdefault("TrackingGeometrySvc", AtlasTrackingGeometrySvc)
     return CfgMgr.Trk__MaterialAllocator(name,**kwargs)
 
-- 
GitLab


From c0d96c8ec820c53e83990bb5688ca75fff6e511d Mon Sep 17 00:00:00 2001
From: Jack Cranshaw <cranshaw@anl.gov>
Date: Wed, 8 May 2019 07:46:34 +0000
Subject: [PATCH 129/129] Propagate boolean properties of input attribute list
 to output attribute list.

---
 .../AthenaPoolMultiTest/CMakeLists.txt        |   8 +-
 .../share/AthenaPoolMultiTestPropagate.ref    |  13 +
 .../AthenaPoolMultiTestPropagateSelect.ref    | 445 ++++++++++++++++++
 .../share/CheckStreamPropagate_jo.py          |  90 ++++
 .../share/DecisionPropagation_jo.py           |  76 +++
 .../AthenaPoolMultiTest/test/post_check_es.sh |   1 +
 .../AthenaPoolMultiTest/test/post_check_p.sh  | 124 +++++
 .../python/OutputStreamAthenaPool.py          |   5 +-
 .../src/EventInfoAttListTool.cxx              |   2 +-
 .../src/EventInfoTagBuilder.cxx               |  29 ++
 .../src/EventInfoTagBuilder.h                 |   3 +
 11 files changed, 792 insertions(+), 4 deletions(-)
 create mode 100644 AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref
 create mode 100644 AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagateSelect.ref
 create mode 100755 AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/CheckStreamPropagate_jo.py
 create mode 100755 AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/DecisionPropagation_jo.py
 create mode 100755 AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_p.sh

diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
index c0869686e13d..983950c19217 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
@@ -67,9 +67,15 @@ athenapoolmultitest_run_test( AthenaPoolMultiTestEventSplitDecision EventSplitDe
 athenapoolmultitest_run_test( AthenaPoolMultiTestEventNoSplit EventNoSplit_jo
                               post_check_es
                               DEPENDS AthenaPoolMultiTestBuildInput )
+athenapoolmultitest_run_test( AthenaPoolMultiTestPropagate DecisionPropagation_jo
+                              post_check_p
+                              DEPENDS AthenaPoolMultiTestEventSplitDecision )
 athenapoolmultitest_run_test( AthenaPoolMultiTestStreamSelect CheckStreamSelector_jo
                               post_check_ss
-                              DEPENDS AthenaPoolMultiTestEventNoSplit )
+                              DEPENDS AthenaPoolMultiTestEventSplitDecision )
+athenapoolmultitest_run_test( AthenaPoolMultiTestPropagateSelect CheckStreamPropagate_jo
+                              post_check_ss
+                              DEPENDS AthenaPoolMultiTestPropagate )
 #athenapoolmultitest_run_test( AthenaPoolMultiTestCheckNull CheckNull_jo
 #                              post_check_cn
 #                              DEPENDS AthenaPoolMultiTestEventSplit )
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref
new file mode 100644
index 000000000000..0b703c702c84
--- /dev/null
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref
@@ -0,0 +1,13 @@
+Py:Athena            INFO including file "AthenaPoolMultiTest/ExampleStreamConfig.py"
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+DecisionSvc          INFO Inserting stream: StreamAllP with no Algs
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
+StreamAllP.Stre...   INFO Initializing StreamAllP.StreamAllPTool - package version AthenaServices-00-00-00
+StreamAllP.Stre...   INFO Initializing StreamAllP.StreamAllP_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
+StreamAllP           INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAllP_MakeEventStreamInfo'])
+StreamAllP           INFO Data output: AthenaPoolMultiTest_Propagate.root
+StreamAllP           INFO I/O reinitialization...
+StorageSvc           INFO EventStreamInfo_p3 [11DF1B8C-0DEE-4687-80D7-E74B520ACBB4]
+StreamAllP           INFO Records written: 21
+ItemListSvc         DEBUG STREAM StreamAllP has (7) items
+ItemListSvc         DEBUG    - EventStreamInfo_StreamAllP
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagateSelect.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagateSelect.ref
new file mode 100644
index 000000000000..9ce503748369
--- /dev/null
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagateSelect.ref
@@ -0,0 +1,445 @@
+ReadData             INFO in initialize()
+EventSelector.S...  DEBUG Property update for OutputLevel : new value = 2
+EventSelector.S...  DEBUG Property update for OutputLevel : new value = 2
+EventSelector.S...  DEBUG Property update for OutputLevel : new value = 2
+EventSelector        INFO reinitialization...
+EventSelector.S...  DEBUG ... postInitialize
+EventSelector.S...  DEBUG ... postInitialize
+EventSelector.S...  DEBUG ... postInitialize
+EventSelector        INFO EventSelection with query 
+AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 0 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 1.2 y = -2.3 z = 226.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 4.4 y = -8.0 z = 94.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 7.6 y = -13.7 z = 70.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 10.8 y = -19.3 z = 59.9 detector = DummyHitDetector
+ReadData             INFO Hit x = 14.0 y = -25.0 z = 54.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 17.2 y = -30.7 z = 50.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 20.4 y = -36.4 z = 48.1 detector = DummyHitDetector
+ReadData             INFO Hit x = 23.7 y = -42.0 z = 46.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 26.9 y = -47.7 z = 44.9 detector = DummyHitDetector
+ReadData             INFO Hit x = 30.1 y = -53.4 z = 43.8 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 3
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 4
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 5
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 1
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 6
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 6 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 601.2 y = -2.3 z = -373.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 604.4 y = -8.0 z = -505.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 607.6 y = -13.7 z = -529.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 610.8 y = -19.3 z = -540.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 614.0 y = -25.0 z = -545.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 617.2 y = -30.7 z = -549.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 620.4 y = -36.4 z = -551.8 detector = DummyHitDetector
+ReadData             INFO Hit x = 623.7 y = -42.0 z = -553.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 626.9 y = -47.7 z = -555.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 630.1 y = -53.4 z = -556.1 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 2
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 2
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 8
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 2
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 2
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 9
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 3
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 3
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 9 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 901.2 y = -2.3 z = -673.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 904.4 y = -8.0 z = -805.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 907.6 y = -13.7 z = -829.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 910.8 y = -19.3 z = -840.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 914.0 y = -25.0 z = -845.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 917.2 y = -30.7 z = -849.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 920.4 y = -36.4 z = -851.8 detector = DummyHitDetector
+ReadData             INFO Hit x = 923.7 y = -42.0 z = -853.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 926.9 y = -47.7 z = -855.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 930.1 y = -53.4 z = -856.1 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 3
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 3
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 11
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 3
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 3
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 12
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 4
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 4
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 12 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 1201.2 y = -2.3 z = -973.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1204.4 y = -8.0 z = -1105.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 1207.6 y = -13.7 z = -1129.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1210.8 y = -19.3 z = -1140.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1214.0 y = -25.0 z = -1145.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1217.2 y = -30.7 z = -1149.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1220.4 y = -36.4 z = -1151.8 detector = DummyHitDetector
+ReadData             INFO Hit x = 1223.7 y = -42.0 z = -1153.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 1226.9 y = -47.7 z = -1155.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1230.1 y = -53.4 z = -1156.1 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 4
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 4
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 14
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 4
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 4
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 15
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 5
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 5
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 15 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 1501.2 y = -2.3 z = -1273.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1504.4 y = -8.0 z = -1405.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 1507.6 y = -13.7 z = -1429.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1510.8 y = -19.3 z = -1440.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1514.0 y = -25.0 z = -1445.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1517.2 y = -30.7 z = -1449.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1520.4 y = -36.4 z = -1451.8 detector = DummyHitDetector
+ReadData             INFO Hit x = 1523.7 y = -42.0 z = -1453.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 1526.9 y = -47.7 z = -1455.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1530.1 y = -53.4 z = -1456.1 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 6
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 6
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 16 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 1601.2 y = -2.3 z = -1373.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1604.4 y = -8.0 z = -1505.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 1607.6 y = -13.7 z = -1529.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1610.8 y = -19.3 z = -1540.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1614.0 y = -25.0 z = -1545.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1617.2 y = -30.7 z = -1549.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1620.4 y = -36.4 z = -1551.8 detector = DummyHitDetector
+ReadData             INFO Hit x = 1623.7 y = -42.0 z = -1553.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 1626.9 y = -47.7 z = -1555.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1630.1 y = -53.4 z = -1556.1 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 6
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 6
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 18
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 7
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 7
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+ReadData             INFO EventStreamInfo: Number of events = 20
+ReadData             INFO EventStreamInfo: ItemList:
+ReadData             INFO CLID = 2101, key = McEventInfo
+ReadData             INFO CLID = 9102, key = MyHits
+ReadData             INFO CLID = 1287802, key = ExcludeTestTrigMap
+ReadData             INFO CLID = 1287802, key = MultiTestTrigMap
+ReadData             INFO CLID = 38853911, key = EventInfoAux.
+ReadData             INFO CLID = 45903698, key = EventInfo
+ReadData             INFO CLID = 222376821, key = StreamAllP
+ReadData             INFO EventType: Event type: sim/data -  is sim , testbeam/atlas -  is atlas , calib/physics -  is physics 
+ReadData             INFO TagInfo: 
+ReadData             INFO EventInfo event: 18 run: 0
+ReadData             INFO Get Smart data ptr 1
+ReadData             INFO Could not find ExampleTrackContainer/MyTracks
+ReadData             INFO Hit x = 1801.2 y = -2.3 z = -1573.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1804.4 y = -8.0 z = -1705.2 detector = DummyHitDetector
+ReadData             INFO Hit x = 1807.6 y = -13.7 z = -1729.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1810.8 y = -19.3 z = -1740.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1814.0 y = -25.0 z = -1745.7 detector = DummyHitDetector
+ReadData             INFO Hit x = 1817.2 y = -30.7 z = -1749.3 detector = DummyHitDetector
+ReadData             INFO Hit x = 1820.4 y = -36.4 z = -1751.8 detector = DummyHitDetector
+ReadData             INFO Hit x = 1823.7 y = -42.0 z = -1753.6 detector = DummyHitDetector
+ReadData             INFO Hit x = 1826.9 y = -47.7 z = -1755.0 detector = DummyHitDetector
+ReadData             INFO Hit x = 1830.1 y = -53.4 z = -1756.1 detector = DummyHitDetector
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector1: For  'SelectedStream':Stream1 cutflow events = 7
+EventSelector        INFO Request skipping event from: EventSelector.Selector1
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...   INFO Rejecting event
+EventSelector.S...  DEBUG EventSelector.Selector2: For  'SelectedStream':Stream1 cutflow events = 7
+EventSelector        INFO Request skipping event from: EventSelector.Selector2
+EventSelector.S...   INFO StreamSelectorTool::postNext
+EventSelector.S...  DEBUG Found attribute list
+EventSelector.S...  ERROR Stream decision for  'SelectedStream':StreamX does not exist in input
+EventSelector.S...  DEBUG EventSelector.SelectorX: For  'SelectedStream':StreamX cutflow events = 0
+EventSelector        INFO skipping event 20
+EventSelector        INFO Disconnecting input sourceID: 576C6C8B-1EC6-8A46-9DFC-612955C23C42
+ReadData             INFO in finalize()
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/CheckStreamPropagate_jo.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/CheckStreamPropagate_jo.py
new file mode 100755
index 000000000000..67dadfe9cd61
--- /dev/null
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/CheckStreamPropagate_jo.py
@@ -0,0 +1,90 @@
+## @file CheckExplicit_jo.py
+## @brief TopOptions (but dependent SplittableData_jo.py, EventSplit_jo.py):
+## Checks that the root collection is readable with the EventSelector
+## @author Jack Cranshaw (Jack.Cranshaw@cern.ch)
+## $Id: CheckExplicit_jo.py,v 1.9 2009-05-20 13:34:21 cranshaw Exp $
+###############################################################
+#
+# Job options file
+#
+#==============================================================
+
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+from AthenaCommon.AlgSequence import AthSequencer
+topSequence = AthSequencer("AthAlgSeq")
+athRegSeq = AthSequencer("AthRegSeq")
+
+from AthenaCommon.AppMgr import theApp
+
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+
+theApp.EvtMax = 200000
+
+#--------------------------------------------------------------
+# Load POOL support
+#--------------------------------------------------------------
+include( "AthenaPoolExampleConverter/AthenaPoolExampleConverter_jobOption.py" )
+include( "AthenaPoolTestAthenaPool/AthenaPoolTestAthenaPool_joboptions.py" )
+#--------------------------------------------------------------
+#---   Read portion  -----
+#--------------------------------------------------------------
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+from PoolSvc.PoolSvcConf import PoolSvc
+svcMgr += PoolSvc()
+PoolSvc = svcMgr.PoolSvc
+PoolSvc.ReadCatalog = ["xmlcatalog_file:EventSplit.xml"]
+
+EventSelector = svcMgr.EventSelector
+EventSelector.InputCollections  = [ "AthenaPoolMultiTest_Propagate.root" ]; 
+
+# Include the StreamSelectorTool
+from EventBookkeeperTools.EventBookkeeperToolsConf import StreamSelectorTool
+# Select existing Stream1
+selector1 = StreamSelectorTool("Selector1")
+selector1.SelectedStream = "Stream1"
+selector1.OutputLevel = DEBUG
+svcMgr.EventSelector.HelperTools += [selector1]
+# Select existing Stream1, but use a separate CutFlowSvc
+# Create the CutFlowSvc instance(s)
+from EventBookkeeperTools.EventBookkeeperToolsConf import CutFlowSvc
+cfs = CfgMgr.CutFlowSvc("SS_CutFlowSvc")
+svcMgr += cfs
+cfs.InputStream = "StreamAll"
+cfs.OutputCollName = "StreamSelect"
+cfs.OutputIncompleteCollName = "IncompleteStreamSelect"
+
+selector2 = StreamSelectorTool("Selector2")
+selector2.SelectedStream = "Stream1"
+selector2.CutFlowSvc = cfs
+selector2.OutputLevel = DEBUG
+svcMgr.EventSelector.HelperTools += [selector2]
+# Select non-existing StreamX
+selectorx = StreamSelectorTool("SelectorX")
+selectorx.SelectedStream = "StreamX"
+selectorx.OutputLevel = DEBUG
+svcMgr.EventSelector.HelperTools += [selectorx]
+
+#--------------------------------------------------------------
+# Configure the filters
+#--------------------------------------------------------------
+from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__ReadData
+
+topSequence += AthPoolEx__ReadData("ReadData")
+#from AthenaPoolMultiTest.AthenaPoolMultiTestConf import EventTagReader
+
+from AthenaPoolMultiTest.AthenaPoolMultiTestConf import *
+
+#--------------------------------------------------------------
+# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
+#--------------------------------------------------------------
+svcMgr.MessageSvc.infoLimit = 5000
+svcMgr.MessageSvc.debugLimit = 5000
+svcMgr.MessageSvc.OutputLevel = INFO
+#==============================================================
+#
+# End of job options file
+#
+###############################################################
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/DecisionPropagation_jo.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/DecisionPropagation_jo.py
new file mode 100755
index 000000000000..4c1789e960cd
--- /dev/null
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/DecisionPropagation_jo.py
@@ -0,0 +1,76 @@
+#####################################################################
+#
+## @file EventSplitDecision_jo.py
+## @brief
+## Second part of AthenaPoolMultiTest gmake check
+##<br><br>
+## @author JackCranshaw (Jack.Cranshaw@cern.ch)
+## $Id: EventNoSplit_jo.py,v 1.27 2009-05-20 13:34:21 cranshaw Exp $
+#====================================================================
+
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+from AthenaCommon.AlgSequence import AthSequencer
+topSequence = AthSequencer("AthAlgSeq")
+athOutSeq = AthSequencer("AthOutSeq")
+
+from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
+alg = xAODMaker__EventInfoCnvAlg()
+topSequence += alg
+
+
+from AthenaCommon.AppMgr import theApp
+theApp.EvtMax = 200000
+
+#--------------------------------------------------------------
+# Load POOL support
+#--------------------------------------------------------------
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+
+from PoolSvc.PoolSvcConf import PoolSvc
+svcMgr += PoolSvc()
+PoolSvc = svcMgr.PoolSvc
+PoolSvc.ReadCatalog = ["xmlcatalog_file:EventSplit.xml"]
+ 
+svcMgr.EventSelector.InputCollections =  ["AthenaPoolMultiTest_StreamAll2.root"]
+svcMgr.AthenaPoolAddressProviderSvc.DataHeaderIterator = False
+
+#--------------------------------------------------------------
+# Private Application Configuration options
+#--------------------------------------------------------------
+# include stream transform
+include( "AthenaPoolMultiTest/ExampleStreamConfig.py" )
+
+from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
+# Unfiltered stream
+StreamAll = AthenaPoolOutputStream( "StreamAllP", "AthenaPoolMultiTest_Propagate.root", False, noTag=False, decisionFilter="Stream" )
+StreamAll.CheckNumberOfWrites = False
+StreamAll.WritingTool.AttributeListKey="SimpleTag"
+StreamAll.WritingTool.SaveDecisions = False
+StreamAll.TakeItemsFromInput = True
+StreamAll.ForceRead=TRUE
+
+#EventInfoTagBuilder.FilterString = "Stream"
+#EventInfoTagBuilder.PropagateInput=True
+
+# Add the outputstreams to the execution sequence
+#athOutSeq+=StreamAll
+
+#--------------------------------------------------------------
+# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
+#--------------------------------------------------------------
+svcMgr.MessageSvc.OutputLevel = INFO
+svcMgr.MessageSvc.debugLimit = 5000
+import AthenaCommon.CfgMgr as CfgMgr
+if not hasattr(svcMgr, 'DecisionSvc'): svcMgr += CfgMgr.DecisionSvc()
+svcMgr.DecisionSvc.CalcStats = True
+if not hasattr(svcMgr, 'ItemListSvc'): svcMgr += CfgMgr.ItemListSvc()
+svcMgr.ItemListSvc.OutputLevel = DEBUG
+#==============================================================
+#
+# End of job options file
+#
+###############################################################
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh
index 2bf230538821..8a2f37807063 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh
@@ -22,6 +22,7 @@ else
 	reflog=../share/${test}.ref
         grep -e 'Splitter' \
              -e 'Triggered' \
+             -e 'EventInfoTag' \
              -e 'Stream' \
              -e 'Coll' \
              -e 'Others' \
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_p.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_p.sh
new file mode 100755
index 000000000000..cac3c0e3e533
--- /dev/null
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_p.sh
@@ -0,0 +1,124 @@
+#!/bin/sh 
+#/** @file post_check_es.sh
+# @brief sh script that check the return code of an executable and compares
+# its output with a reference (if available). Modified to restrict checks
+# to output from AthenaPoolMultiTest EventSplit test.
+# @param test_name
+#
+# @author Jack Cranshaw (Jack.Cranshaw@cern.ch), Paolo Calafiura.
+# $Id: post_check_es.sh,v 1.6 2009-04-01 21:18:33 cranshaw Exp $
+# **/
+test=$1
+status=${?}
+if [ -z "$status" ]
+    then
+    echo " post_check_es.sh> Warning: athena exit status is not available "
+else 
+    # check exit status
+    joblog=${test}.log
+    if [ "$status" = 0 ]
+	then 
+	#echo " post_check_es.sh> OK: ${test} exited normally. Output is in $joblog "
+	reflog=../share/${test}.ref
+        grep -e 'Splitter' \
+             -e 'Triggered' \
+             -e 'EventInfoTag' \
+             -e 'Stream' \
+             -e 'Coll' \
+             -e 'Others' \
+             -e 'Bad' \
+             -e 'ERROR' \
+             -e 'Error' \
+             ${joblog} | 
+             grep -v 'StreamAll2' |
+             grep -v 'RootDatabase.open' |
+             grep -v 'Handler' |
+             grep -v 'EventSelectorAthenaPool' |\
+             grep -v 'CLIDRegistry' |\
+             grep -v 'PassNumber' |\
+             grep -v 'POOLCollFactory' |\
+             grep -v 'PoolXMLFileCatalog' |\
+             grep -v 'AthenaSealSvc' |\
+             grep -v 'EventBookkeeper' |\
+             grep -v 'EventTagWriter' > ${joblog}.small
+	joblog=${joblog}.small
+	if [ -r $reflog ]
+	    then
+#	    echo " post_check_es.sh> Now comparing output with reference"
+	    diff -a -b -B  $joblog $reflog |\
+                # ignore diff annotations
+	        egrep -a -v '^---|^[[:digit:]]+[acd,][[:digit:]]+' |\
+                # ignore hex addresses
+		egrep -a -v ' 0x\w{4,}' |\
+                # ignore package names e.g. Package-00-00-00
+		egrep -a -v '\w+-[[:digit:]]{2}-[[:digit:]]{2}-[[:digit:]]{2}' |\
+		# ignore cpu usage printouts
+		egrep -a -v 'ChronoStatSvc +INFO Time' |\
+		egrep -a -v 'Time left.+ Seconds' |\
+		egrep -a -v 'Timeleft.+ sec' |\
+		egrep -a -v 'INFO Time User' |\
+                egrep -a -v 'OutputStreamSequencerSvc' |\
+		# ignore clid db file name
+		grep -a -v 'from CLIDDB file'  |\
+		# ignore slug machine printout
+		egrep -a -v ' Machine: .* System and Processor Info'  |\
+		egrep -a -v ' Jobname = .* Machine =' |\
+		# ignore slug pid printout
+		grep -a -v 'Atlas Detector Simulation, Reconstruction and Analysis Running on'  |\
+		egrep -a -v 'Program:  Slug-Dice-Arecon .+ pid +[[:digit:]]+'  |\
+		#ignore DllClassManager DEBUG messages
+		egrep -a -v 'DllClassManager     DEBUG' |\
+		# ignore slug Library printout
+		egrep -a -v 'Library of +[[:digit:]]+ at +[[:digit:]]+'  |\
+		egrep -a -v 'Library compiled on +[[:digit:]]'  |\
+		# ignore ClassIDSvc "in memory db" printouts
+		egrep -a -v 'CLID: .* - type name:' |\
+		# ignore ClassIDSvc "already set" printouts
+		egrep -a -v 'ClassIDSvc .* setTypeNameForID: .* already set for' |\
+		# ignore ClassIDSvc finalize output
+		egrep -a -v 'ClassIDSvc * DEBUG finalize: wrote .*'   |\
+		# ignore rcs version comments
+		egrep -a -v 'Id: .+ Exp \$'  |\
+		# ignore listings
+		egrep -a -v 'athena.*listing'  |\
+		# ignore ptr values for LArCell
+		egrep -a -v 'Found elem'  |\
+                # ignore Dict issues
+                egrep -a -v 'Dict.so' |\
+		# ignore file mgr
+		egrep -a -v 'FileMgr'  |\
+		# ignore file names 
+		egrep -a -v 'Reading file'  |\
+		# ignore root collect key 
+		egrep -a -v 'NewEventCollection.root, recovered' |\
+                # ignore new file catalog messages
+                egrep -a -v 'registerPFN'
+
+	    diffStatus=$?
+	    if [ $diffStatus -ne 1 ] 
+		then
+		echo " post_check_es.sh> ERROR: $joblog and $reflog differ "
+		exit 1
+	    else
+                true
+		#echo " post_check_es.sh> OK: $joblog and $reflog identical "
+	    fi
+	else
+	    tail $joblog
+	    echo " post_check_es.sh> WARNING: reference output $reflog not available "
+	    echo  " post_check_es.sh> Please check ${PWD}/$joblog"
+            exit 1
+	fi
+    else
+	tail $joblog
+	echo  " post_check_es.sh> ERROR: Athena exited abnormally! Exit code: $status "
+	echo  " post_check_es.sh> Please check ${PWD}/$joblog"
+    fi
+fi
+
+# Check output for ERROR/FATAL
+joblog=${test}.log
+#echo 
+
+exit $status
+
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py
index fdbc634abff5..47db4fae9ea8 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py
@@ -14,7 +14,7 @@ from AthenaServices.AthenaServicesConf import AthenaOutputStream
 from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool
 
 def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False,
-                        eventInfoKey = "EventInfo" ):
+                        eventInfoKey = "EventInfo", decisionFilter="" ):
    # define athena output stream
    writingTool = AthenaOutputStreamTool( streamName + "Tool" )
    outputStream = AthenaOutputStream(
@@ -41,7 +41,7 @@ def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False,
          # build eventinfo attribute list
          from .OutputStreamAthenaPoolConf import EventInfoAttListTool, EventInfoTagBuilder
          svcMgr.ToolSvc += EventInfoAttListTool()
-         EventInfoTagBuilder   = EventInfoTagBuilder(AttributeList=key, EventInfoKey=eventInfoKey)
+         EventInfoTagBuilder   = EventInfoTagBuilder(AttributeList=key, EventInfoKey=eventInfoKey, FilterString=decisionFilter)
          topSequence += EventInfoTagBuilder
 
    # decide where to put outputstream in sequencing
@@ -91,3 +91,4 @@ def createOutputConditionStream( streamName, fileName = "" ):
 ## backward compat
 AthenaPoolOutputStream          = createOutputStream
 AthenaPoolOutputConditionStream = createOutputConditionStream
+
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx
index 52c0b166f1ea..102b71a79b85 100755
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx
@@ -30,7 +30,7 @@ Purpose : create a EventInfoAttList - The Tag information associated to the even
 /** the constructor */
 EventInfoAttListTool::EventInfoAttListTool (const std::string& type, const
 					std::string& name, const IInterface* parent) : 
-  AthAlgTool( type, name, parent ) 
+  AthAlgTool( type, name, parent )
 {
   declareInterface<EventInfoAttListTool>( this );
 }
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx
index 4478e948f719..563904bd63fb 100755
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx
@@ -11,7 +11,10 @@ EventInfoTagBuilder::EventInfoTagBuilder( const std::string& name, ISvcLocator*
   : AthAlgorithm(name, pSvcLocator),
     m_tool("EventInfoAttListTool/EventInfoAttListTool",this) {
   declareProperty("EventInfoKey", m_evtKey = "EventInfo");
+  declareProperty("InputList", m_inputAttList = "Input");
   declareProperty("AttributeList", m_attributeListName);
+  declareProperty("PropagateInput", m_propInput = true);
+  declareProperty("FilterString", m_filter = "");
 }
 
 EventInfoTagBuilder::~EventInfoTagBuilder() 
@@ -24,6 +27,7 @@ StatusCode EventInfoTagBuilder::initialize() {
 
   ATH_CHECK( m_evtKey.initialize() );
   ATH_CHECK( m_attributeListName.initialize() );
+  ATH_CHECK( m_inputAttList.initialize() );
 
   return StatusCode::SUCCESS;
 }
@@ -32,6 +36,7 @@ StatusCode EventInfoTagBuilder::initialize() {
 StatusCode EventInfoTagBuilder::execute() {
   ATH_MSG_DEBUG( "Executing " << name() );
 
+
   SG::ReadHandle<xAOD::EventInfo> h_evt(m_evtKey);
 
   /** create a EventInfo Tag and ask the tool to fill it */ 
@@ -39,6 +44,30 @@ StatusCode EventInfoTagBuilder::execute() {
     auto attribList = std::make_unique<AthenaAttributeList>
       ( m_tool->getAttributeList( *h_evt ) );
 
+    // Check whether to propagate
+    if (m_propInput) {
+      SG::ReadHandle<AthenaAttributeList> h_att(m_inputAttList);
+      // Check if there is an input to propagate
+      if (h_att.isValid()) {
+        for (auto it = h_att->specification().begin();
+                  it!= h_att->specification().end(); ++it) {
+          // Only propagate bool properties
+          if (it->typeName()=="bool"&&!attribList->exists(it->name())) {
+            // Check if there is filtering on the name
+            if (m_filter != "") {
+              if (it->name().find(m_filter)!=std::string::npos) {
+                // Add those bools to the output attribute list
+                (*attribList).extend(it->name(),it->type());
+                (*attribList)[it->name()].data<bool>() = (*h_att)[it->name()].data<bool>();
+              }
+            }
+          } // take only bools
+        }   // loop
+      } else {     // valid input
+        ATH_MSG_INFO("No input attribute list");
+      }
+    }       // propagate
+
     /** record attribute list to SG */
     SG::WriteHandle<AthenaAttributeList> wh(m_attributeListName);
     ATH_CHECK( wh.record(std::move(attribList)) );
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.h
index 8fb711f460ac..5e34bf6bf95d 100755
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.h
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.h
@@ -54,7 +54,10 @@ private:
   ToolHandle<EventInfoAttListTool> m_tool;
 
   SG::ReadHandleKey<xAOD::EventInfo> m_evtKey;
+  SG::ReadHandleKey<AthenaAttributeList> m_inputAttList;
   SG::WriteHandleKey<AthenaAttributeList> m_attributeListName;
+  bool m_propInput;
+  std::string m_filter;
 
 };
 
-- 
GitLab